From 1ad90236539e6dc2673145d95674d8484385f7b7 Mon Sep 17 00:00:00 2001 From: Matthias Simon Date: Tue, 6 Sep 2022 09:51:42 +0200 Subject: [PATCH] Add initial ATS from TTCN3_PART1 and TTCN3_PART9 repositories --- .../NegSem_0501_Identifier_001.ttcn | 20 ++ .../NegSyn_0501_Identifier_001.ttcn | 20 ++ .../Syn_0501_Identifier_001.ttcn | 28 ++ .../Sem_050201_Scope_of_parameters_001.ttcn | 43 ++++ .../Sem_050201_Scope_of_parameters_002.ttcn | 38 +++ .../NegSem_050202_Uniqueness_001.ttcn | 18 ++ .../NegSem_050202_Uniqueness_004.ttcn | 22 ++ .../NegSem_050202_Uniqueness_005.ttcn | 23 ++ .../NegSem_050202_Uniqueness_006.ttcn | 18 ++ .../NegSem_050202_Uniqueness_007.ttcn | 22 ++ .../NegSem_050202_Uniqueness_008.ttcn | 22 ++ .../NegSem_050202_Uniqueness_009.ttcn | 22 ++ .../NegSem_050202_Uniqueness_010.ttcn | 23 ++ .../NegSem_050202_Uniqueness_011.ttcn | 21 ++ .../NegSem_050202_Uniqueness_012.ttcn | 28 ++ .../Sem_050202_Uniqueness_001.ttcn | 32 +++ .../Sem_050202_Uniqueness_002.ttcn | 27 ++ .../Sem_050202_Uniqueness_003.ttcn | 27 ++ .../Sem_050202_Uniqueness_004.ttcn | 32 +++ .../Sem_050202_Uniqueness_005.ttcn | 39 +++ .../0502_toplevel/NegSem_0502_Scope_001.ttcn | 29 +++ .../0502_toplevel/NegSem_0502_Scope_002.ttcn | 28 ++ .../0502_toplevel/NegSem_0502_Scope_003.ttcn | 31 +++ .../0502_toplevel/Sem_0502_Scope_001.ttcn | 25 ++ .../0502_toplevel/Sem_0502_Scope_002.ttcn | 39 +++ .../0502_toplevel/Sem_0502_Scope_003.ttcn | 42 +++ .../0502_toplevel/Sem_0502_Scope_004.ttcn | 52 ++++ .../0502_toplevel/Sem_0502_Scope_008.ttcn | 31 +++ .../0502_toplevel/Syn_0502_Scope_001.ttcn | 79 ++++++ .../NegSem_0503_Ordering_001.ttcn | 33 +++ .../NegSem_0503_Ordering_002.ttcn | 36 +++ .../NegSem_0503_Ordering_003.ttcn | 36 +++ .../Sem_0503_Ordering_001.ttcn | 37 +++ .../Sem_0503_Ordering_002.ttcn | 37 +++ .../Sem_0503_Ordering_005.ttcn | 39 +++ ...05040101_parameters_of_kind_value_001.ttcn | 28 ++ ...05040101_parameters_of_kind_value_002.ttcn | 33 +++ ...05040101_parameters_of_kind_value_003.ttcn | 41 +++ ...05040101_parameters_of_kind_value_004.ttcn | 41 +++ ...05040101_parameters_of_kind_value_005.ttcn | 29 +++ ...05040101_parameters_of_kind_value_006.ttcn | 29 +++ ...05040101_parameters_of_kind_value_007.ttcn | 27 ++ ...05040101_parameters_of_kind_value_009.ttcn | 27 ++ ...05040101_parameters_of_kind_value_011.ttcn | 29 +++ ...05040101_parameters_of_kind_value_012.ttcn | 30 +++ ...05040101_parameters_of_kind_value_013.ttcn | 25 ++ ...05040101_parameters_of_kind_value_014.ttcn | 30 +++ ...05040101_parameters_of_kind_value_015.ttcn | 30 +++ ...05040101_parameters_of_kind_value_016.ttcn | 30 +++ ...05040101_parameters_of_kind_value_017.ttcn | 30 +++ ...05040101_parameters_of_kind_value_018.ttcn | 27 ++ ...05040101_parameters_of_kind_value_001.ttcn | 16 ++ ...05040101_parameters_of_kind_value_002.ttcn | 18 ++ ...05040101_parameters_of_kind_value_003.ttcn | 18 ++ ...05040101_parameters_of_kind_value_004.ttcn | 18 ++ ...05040101_parameters_of_kind_value_005.ttcn | 18 ++ ...05040101_parameters_of_kind_value_006.ttcn | 16 ++ ...05040101_parameters_of_kind_value_007.ttcn | 16 ++ ...05040101_parameters_of_kind_value_008.ttcn | 16 ++ ...05040101_parameters_of_kind_value_009.ttcn | 19 ++ ...05040101_parameters_of_kind_value_010.ttcn | 18 ++ ...05040101_parameters_of_kind_value_011.ttcn | 16 ++ ...05040101_parameters_of_kind_value_012.ttcn | 18 ++ ...05040101_parameters_of_kind_value_013.ttcn | 16 ++ ...05040101_parameters_of_kind_value_001.ttcn | 32 +++ ...05040101_parameters_of_kind_value_002.ttcn | 32 +++ ...05040101_parameters_of_kind_value_003.ttcn | 33 +++ ...05040101_parameters_of_kind_value_004.ttcn | 34 +++ ...05040101_parameters_of_kind_value_005.ttcn | 40 +++ ...05040101_parameters_of_kind_value_006.ttcn | 39 +++ ...05040101_parameters_of_kind_value_007.ttcn | 33 +++ ...05040101_parameters_of_kind_value_008.ttcn | 34 +++ ...05040101_parameters_of_kind_value_009.ttcn | 29 +++ ...05040101_parameters_of_kind_value_010.ttcn | 32 +++ ...05040101_parameters_of_kind_value_011.ttcn | 27 ++ ...05040101_parameters_of_kind_value_012.ttcn | 29 +++ ...05040101_parameters_of_kind_value_013.ttcn | 25 ++ ...05040101_parameters_of_kind_value_014.ttcn | 26 ++ ...05040101_parameters_of_kind_value_015.ttcn | 25 ++ ...05040101_parameters_of_kind_value_016.ttcn | 33 +++ ...05040101_parameters_of_kind_value_017.ttcn | 30 +++ ...05040101_parameters_of_kind_value_018.ttcn | 30 +++ ...05040101_parameters_of_kind_value_019.ttcn | 30 +++ ...05040101_parameters_of_kind_value_020.ttcn | 30 +++ ...05040101_parameters_of_kind_value_021.ttcn | 29 +++ ...05040101_parameters_of_kind_value_022.ttcn | 43 ++++ ...05040101_parameters_of_kind_value_023.ttcn | 28 ++ ...05040101_parameters_of_kind_value_024.ttcn | 32 +++ ...05040101_parameters_of_kind_value_025.ttcn | 37 +++ ...40102_parameters_of_kind_template_001.ttcn | 28 ++ ...40102_parameters_of_kind_template_002.ttcn | 33 +++ ...40102_parameters_of_kind_template_003.ttcn | 41 +++ ...40102_parameters_of_kind_template_004.ttcn | 41 +++ ...40102_parameters_of_kind_template_005.ttcn | 29 +++ ...40102_parameters_of_kind_template_006.ttcn | 29 +++ ...40102_parameters_of_kind_template_007.ttcn | 27 ++ ...40102_parameters_of_kind_template_009.ttcn | 27 ++ ...40102_parameters_of_kind_template_011.ttcn | 29 +++ ...40102_parameters_of_kind_template_012.ttcn | 30 +++ ...40102_parameters_of_kind_template_013.ttcn | 25 ++ ...40102_parameters_of_kind_template_014.ttcn | 30 +++ ...40102_parameters_of_kind_template_015.ttcn | 30 +++ ...40102_parameters_of_kind_template_016.ttcn | 30 +++ ...40102_parameters_of_kind_template_017.ttcn | 30 +++ ...40102_parameters_of_kind_template_018.ttcn | 28 ++ ...40102_parameters_of_kind_template_019.ttcn | 28 ++ ...40102_parameters_of_kind_template_001.ttcn | 14 + ...40102_parameters_of_kind_template_001.ttcn | 86 +++++++ ...40102_parameters_of_kind_template_002.ttcn | 79 ++++++ ...40102_parameters_of_kind_template_003.ttcn | 42 +++ ...40102_parameters_of_kind_template_004.ttcn | 41 +++ ...40102_parameters_of_kind_template_005.ttcn | 35 +++ ...40102_parameters_of_kind_template_006.ttcn | 36 +++ ...40102_parameters_of_kind_template_007.ttcn | 32 +++ ...40102_parameters_of_kind_template_008.ttcn | 33 +++ ...40102_parameters_of_kind_template_009.ttcn | 27 ++ ...40102_parameters_of_kind_template_010.ttcn | 29 +++ ...40102_parameters_of_kind_template_011.ttcn | 25 ++ ...40102_parameters_of_kind_template_012.ttcn | 26 ++ ...40102_parameters_of_kind_template_013.ttcn | 25 ++ ...40102_parameters_of_kind_template_014.ttcn | 33 +++ ...40102_parameters_of_kind_template_015.ttcn | 37 +++ ...40102_parameters_of_kind_template_016.ttcn | 36 +++ ...40102_parameters_of_kind_template_017.ttcn | 31 +++ ...40102_parameters_of_kind_template_018.ttcn | 32 +++ ...40102_parameters_of_kind_template_019.ttcn | 28 ++ ...40102_parameters_of_kind_template_020.ttcn | 37 +++ ...40102_parameters_of_kind_template_021.ttcn | 36 +++ ...40102_parameters_of_kind_template_022.ttcn | 31 +++ ...40102_parameters_of_kind_template_023.ttcn | 32 +++ ...40102_parameters_of_kind_template_024.ttcn | 28 ++ ...40102_parameters_of_kind_template_025.ttcn | 37 +++ ...40102_parameters_of_kind_template_026.ttcn | 36 +++ ...40102_parameters_of_kind_template_027.ttcn | 31 +++ ...40102_parameters_of_kind_template_028.ttcn | 32 +++ ...40102_parameters_of_kind_template_029.ttcn | 28 ++ ...40102_parameters_of_kind_template_030.ttcn | 37 +++ ...40102_parameters_of_kind_template_031.ttcn | 36 +++ ...40102_parameters_of_kind_template_032.ttcn | 31 +++ ...40102_parameters_of_kind_template_033.ttcn | 32 +++ ...40102_parameters_of_kind_template_034.ttcn | 28 ++ ...40102_parameters_of_kind_template_035.ttcn | 30 +++ ...40102_parameters_of_kind_template_036.ttcn | 30 +++ ...40102_parameters_of_kind_template_037.ttcn | 30 +++ ...40102_parameters_of_kind_template_038.ttcn | 30 +++ ...40102_parameters_of_kind_template_039.ttcn | 27 ++ ...40102_parameters_of_kind_template_040.ttcn | 32 +++ ...40102_parameters_of_kind_template_041.ttcn | 35 +++ ...05040103_parameters_of_kind_timer_001.ttcn | 33 +++ ...05040103_parameters_of_kind_timer_002.ttcn | 34 +++ ...05040103_parameters_of_kind_timer_003.ttcn | 27 ++ ...05040103_parameters_of_kind_timer_004.ttcn | 29 +++ ...05040103_parameters_of_kind_timer_001.ttcn | 30 +++ ...05040103_parameters_of_kind_timer_002.ttcn | 42 +++ ...05040103_parameters_of_kind_timer_001.ttcn | 98 +++++++ ...05040103_parameters_of_kind_timer_002.ttcn | 30 +++ ...05040103_parameters_of_kind_timer_003.ttcn | 32 +++ ..._05040104_parameters_of_kind_port_001.ttcn | 35 +++ ..._05040104_parameters_of_kind_port_002.ttcn | 38 +++ ..._05040104_parameters_of_kind_port_003.ttcn | 33 +++ ..._05040104_parameters_of_kind_port_004.ttcn | 32 +++ ..._05040104_parameters_of_kind_port_005.ttcn | 33 +++ ..._05040104_parameters_of_kind_port_006.ttcn | 31 +++ ..._05040104_parameters_of_kind_port_001.ttcn | 111 ++++++++ ..._05040104_parameters_of_kind_port_002.ttcn | 33 +++ .../050401_top_level/NOTES | 7 + .../NegSem_050401_top_level_001.ttcn | 43 ++++ .../NegSem_050401_top_level_002.ttcn | 42 +++ .../NegSem_050401_top_level_003.ttcn | 40 +++ .../Sem_050401_top_level_001.ttcn | 29 +++ .../Sem_050401_top_level_002.ttcn | 34 +++ .../Sem_050401_top_level_003.ttcn | 30 +++ .../Sem_050401_top_level_004.ttcn | 30 +++ .../Sem_050401_top_level_005.ttcn | 31 +++ .../Sem_050401_top_level_006.ttcn | 31 +++ .../Sem_050401_top_level_007.ttcn | 32 +++ .../Sem_050401_top_level_008.ttcn | 33 +++ .../Sem_050401_top_level_009.ttcn | 33 +++ .../Sem_050401_top_level_010.ttcn | 35 +++ .../Sem_050401_top_level_011.ttcn | 34 +++ .../Sem_050401_top_level_012.ttcn | 35 +++ .../Sem_050401_top_level_013.ttcn | 34 +++ .../Sem_050401_top_level_014.ttcn | 34 +++ .../Sem_050401_top_level_015.ttcn | 34 +++ .../Sem_050401_top_level_016.ttcn | 40 +++ .../Sem_050401_top_level_017.ttcn | 42 +++ .../Sem_050401_top_level_018.ttcn | 35 +++ .../Sem_050401_top_level_019.ttcn | 29 +++ .../Sem_050401_top_level_020.ttcn | 29 +++ .../Sem_050401_top_level_021.ttcn | 35 +++ .../Sem_050401_top_level_022.ttcn | 29 +++ .../Sem_050401_top_level_023.ttcn | 29 +++ .../Sem_050401_top_level_024.ttcn | 35 +++ .../Sem_050401_top_level_025.ttcn | 39 +++ .../Sem_050401_top_level_026.ttcn | 39 +++ .../Sem_050401_top_level_027.ttcn | 36 +++ .../Sem_050401_top_level_028.ttcn | 36 +++ .../Sem_050401_top_level_029.ttcn | 39 +++ .../NegSem_050402_actual_parameters_001.ttcn | 33 +++ .../NegSem_050402_actual_parameters_002.ttcn | 32 +++ .../NegSem_050402_actual_parameters_003.ttcn | 36 +++ .../NegSem_050402_actual_parameters_004.ttcn | 38 +++ .../NegSem_050402_actual_parameters_005.ttcn | 37 +++ .../NegSem_050402_actual_parameters_006.ttcn | 34 +++ .../NegSem_050402_actual_parameters_007.ttcn | 33 +++ .../NegSem_050402_actual_parameters_008.ttcn | 37 +++ .../NegSem_050402_actual_parameters_009.ttcn | 39 +++ .../NegSem_050402_actual_parameters_010.ttcn | 38 +++ .../NegSem_050402_actual_parameters_011.ttcn | 37 +++ .../NegSem_050402_actual_parameters_012.ttcn | 36 +++ .../NegSem_050402_actual_parameters_013.ttcn | 40 +++ .../NegSem_050402_actual_parameters_014.ttcn | 42 +++ .../NegSem_050402_actual_parameters_015.ttcn | 41 +++ .../NegSem_050402_actual_parameters_016.ttcn | 29 +++ .../NegSem_050402_actual_parameters_017.ttcn | 28 ++ .../NegSem_050402_actual_parameters_018.ttcn | 31 +++ .../NegSem_050402_actual_parameters_019.ttcn | 33 +++ .../NegSem_050402_actual_parameters_020.ttcn | 32 +++ .../NegSem_050402_actual_parameters_021.ttcn | 30 +++ .../NegSem_050402_actual_parameters_022.ttcn | 32 +++ .../NegSem_050402_actual_parameters_023.ttcn | 32 +++ .../NegSem_050402_actual_parameters_024.ttcn | 34 +++ .../NegSem_050402_actual_parameters_025.ttcn | 35 +++ .../NegSem_050402_actual_parameters_026.ttcn | 32 +++ .../NegSem_050402_actual_parameters_027.ttcn | 31 +++ .../NegSem_050402_actual_parameters_028.ttcn | 35 +++ .../NegSem_050402_actual_parameters_029.ttcn | 37 +++ .../NegSem_050402_actual_parameters_030.ttcn | 36 +++ .../NegSem_050402_actual_parameters_031.ttcn | 35 +++ .../NegSem_050402_actual_parameters_032.ttcn | 38 +++ .../NegSem_050402_actual_parameters_033.ttcn | 34 +++ .../NegSem_050402_actual_parameters_034.ttcn | 36 +++ .../NegSem_050402_actual_parameters_035.ttcn | 36 +++ .../NegSem_050402_actual_parameters_036.ttcn | 38 +++ .../NegSem_050402_actual_parameters_037.ttcn | 39 +++ .../NegSem_050402_actual_parameters_038.ttcn | 36 +++ .../NegSem_050402_actual_parameters_039.ttcn | 35 +++ .../NegSem_050402_actual_parameters_040.ttcn | 39 +++ .../NegSem_050402_actual_parameters_041.ttcn | 41 +++ .../NegSem_050402_actual_parameters_042.ttcn | 40 +++ .../NegSem_050402_actual_parameters_043.ttcn | 39 +++ .../NegSem_050402_actual_parameters_044.ttcn | 42 +++ .../NegSem_050402_actual_parameters_045.ttcn | 26 ++ .../NegSem_050402_actual_parameters_046.ttcn | 28 ++ .../NegSem_050402_actual_parameters_047.ttcn | 28 ++ .../NegSem_050402_actual_parameters_048.ttcn | 30 +++ .../NegSem_050402_actual_parameters_049.ttcn | 31 +++ .../NegSem_050402_actual_parameters_050.ttcn | 28 ++ .../NegSem_050402_actual_parameters_051.ttcn | 26 ++ .../NegSem_050402_actual_parameters_052.ttcn | 30 +++ .../NegSem_050402_actual_parameters_053.ttcn | 32 +++ .../NegSem_050402_actual_parameters_054.ttcn | 31 +++ .../NegSem_050402_actual_parameters_055.ttcn | 31 +++ .../NegSem_050402_actual_parameters_056.ttcn | 34 +++ .../NegSem_050402_actual_parameters_057.ttcn | 30 +++ .../NegSem_050402_actual_parameters_058.ttcn | 32 +++ .../NegSem_050402_actual_parameters_059.ttcn | 32 +++ .../NegSem_050402_actual_parameters_060.ttcn | 34 +++ .../NegSem_050402_actual_parameters_061.ttcn | 35 +++ .../NegSem_050402_actual_parameters_062.ttcn | 32 +++ .../NegSem_050402_actual_parameters_063.ttcn | 34 +++ .../NegSem_050402_actual_parameters_064.ttcn | 36 +++ .../NegSem_050402_actual_parameters_065.ttcn | 36 +++ .../NegSem_050402_actual_parameters_066.ttcn | 38 +++ .../NegSem_050402_actual_parameters_067.ttcn | 39 +++ .../NegSem_050402_actual_parameters_068.ttcn | 36 +++ .../NegSem_050402_actual_parameters_069.ttcn | 26 ++ .../NegSem_050402_actual_parameters_070.ttcn | 28 ++ .../NegSem_050402_actual_parameters_071.ttcn | 28 ++ .../NegSem_050402_actual_parameters_072.ttcn | 30 +++ .../NegSem_050402_actual_parameters_073.ttcn | 31 +++ .../NegSem_050402_actual_parameters_074.ttcn | 28 ++ .../NegSem_050402_actual_parameters_075.ttcn | 31 +++ .../NegSem_050402_actual_parameters_076.ttcn | 33 +++ .../NegSem_050402_actual_parameters_077.ttcn | 33 +++ .../NegSem_050402_actual_parameters_078.ttcn | 35 +++ .../NegSem_050402_actual_parameters_079.ttcn | 36 +++ .../NegSem_050402_actual_parameters_080.ttcn | 33 +++ .../NegSem_050402_actual_parameters_081.ttcn | 34 +++ .../NegSem_050402_actual_parameters_082.ttcn | 36 +++ .../NegSem_050402_actual_parameters_083.ttcn | 37 +++ .../NegSem_050402_actual_parameters_084.ttcn | 39 +++ .../NegSem_050402_actual_parameters_085.ttcn | 40 +++ .../NegSem_050402_actual_parameters_086.ttcn | 37 +++ .../NegSem_050402_actual_parameters_087.ttcn | 27 ++ .../NegSem_050402_actual_parameters_088.ttcn | 29 +++ .../NegSem_050402_actual_parameters_089.ttcn | 29 +++ .../NegSem_050402_actual_parameters_090.ttcn | 31 +++ .../NegSem_050402_actual_parameters_091.ttcn | 32 +++ .../NegSem_050402_actual_parameters_092.ttcn | 29 +++ .../NegSem_050402_actual_parameters_093.ttcn | 42 +++ .../NegSem_050402_actual_parameters_094.ttcn | 43 ++++ .../NegSem_050402_actual_parameters_095.ttcn | 44 ++++ .../NegSem_050402_actual_parameters_096.ttcn | 45 ++++ .../NegSem_050402_actual_parameters_097.ttcn | 33 +++ .../NegSem_050402_actual_parameters_098.ttcn | 30 +++ .../NegSem_050402_actual_parameters_099.ttcn | 35 +++ .../NegSem_050402_actual_parameters_100.ttcn | 29 +++ .../NegSem_050402_actual_parameters_101.ttcn | 28 ++ .../NegSem_050402_actual_parameters_102.ttcn | 28 ++ .../NegSem_050402_actual_parameters_103.ttcn | 29 +++ .../NegSem_050402_actual_parameters_104.ttcn | 29 +++ .../NegSem_050402_actual_parameters_105.ttcn | 29 +++ .../NegSem_050402_actual_parameters_106.ttcn | 28 ++ .../NegSem_050402_actual_parameters_107.ttcn | 40 +++ .../NegSem_050402_actual_parameters_108.ttcn | 42 +++ .../NegSem_050402_actual_parameters_109.ttcn | 39 +++ .../NegSem_050402_actual_parameters_110.ttcn | 36 +++ .../NegSem_050402_actual_parameters_111.ttcn | 29 +++ .../NegSem_050402_actual_parameters_112.ttcn | 29 +++ .../NegSem_050402_actual_parameters_113.ttcn | 29 +++ .../NegSem_050402_actual_parameters_114.ttcn | 39 +++ .../NegSem_050402_actual_parameters_115.ttcn | 31 +++ .../NegSem_050402_actual_parameters_116.ttcn | 26 ++ .../NegSem_050402_actual_parameters_117.ttcn | 36 +++ .../NegSem_050402_actual_parameters_118.ttcn | 29 +++ .../NegSem_050402_actual_parameters_119.ttcn | 36 +++ .../NegSem_050402_actual_parameters_120.ttcn | 36 +++ .../NegSem_050402_actual_parameters_121.ttcn | 36 +++ .../NegSem_050402_actual_parameters_122.ttcn | 36 +++ .../NegSem_050402_actual_parameters_123.ttcn | 36 +++ .../NegSem_050402_actual_parameters_124.ttcn | 36 +++ .../NegSem_050402_actual_parameters_125.ttcn | 31 +++ .../NegSem_050402_actual_parameters_126.ttcn | 31 +++ .../NegSem_050402_actual_parameters_127.ttcn | 31 +++ .../NegSem_050402_actual_parameters_128.ttcn | 31 +++ .../NegSem_050402_actual_parameters_129.ttcn | 39 +++ .../NegSem_050402_actual_parameters_130.ttcn | 39 +++ .../NegSem_050402_actual_parameters_131.ttcn | 40 +++ .../NegSem_050402_actual_parameters_132.ttcn | 37 +++ .../NegSem_050402_actual_parameters_133.ttcn | 37 +++ .../NegSem_050402_actual_parameters_134.ttcn | 37 +++ .../NegSem_050402_actual_parameters_135.ttcn | 35 +++ .../NegSem_050402_actual_parameters_136.ttcn | 43 ++++ .../NegSem_050402_actual_parameters_137.ttcn | 43 ++++ .../NegSem_050402_actual_parameters_138.ttcn | 44 ++++ .../NegSem_050402_actual_parameters_139.ttcn | 41 +++ .../NegSem_050402_actual_parameters_140.ttcn | 41 +++ .../NegSem_050402_actual_parameters_141.ttcn | 41 +++ .../NegSem_050402_actual_parameters_142.ttcn | 39 +++ .../NegSem_050402_actual_parameters_143.ttcn | 38 +++ .../NegSem_050402_actual_parameters_144.ttcn | 33 +++ .../NegSem_050402_actual_parameters_145.ttcn | 27 ++ .../NegSem_050402_actual_parameters_146.ttcn | 32 +++ .../NegSem_050402_actual_parameters_147.ttcn | 37 +++ .../NegSem_050402_actual_parameters_148.ttcn | 36 +++ .../NegSem_050402_actual_parameters_149.ttcn | 34 +++ .../NegSem_050402_actual_parameters_150.ttcn | 34 +++ .../NegSem_050402_actual_parameters_151.ttcn | 33 +++ .../NegSem_050402_actual_parameters_152.ttcn | 36 +++ .../NegSem_050402_actual_parameters_153.ttcn | 41 +++ .../NegSem_050402_actual_parameters_154.ttcn | 40 +++ .../NegSem_050402_actual_parameters_155.ttcn | 38 +++ .../NegSem_050402_actual_parameters_156.ttcn | 38 +++ .../NegSem_050402_actual_parameters_157.ttcn | 37 +++ .../NegSem_050402_actual_parameters_158.ttcn | 29 +++ .../NegSem_050402_actual_parameters_159.ttcn | 27 ++ .../NegSem_050402_actual_parameters_160.ttcn | 33 +++ .../NegSem_050402_actual_parameters_161.ttcn | 25 ++ .../NegSem_050402_actual_parameters_162.ttcn | 34 +++ .../NegSem_050402_actual_parameters_163.ttcn | 34 +++ .../NegSem_050402_actual_parameters_164.ttcn | 34 +++ .../NegSem_050402_actual_parameters_165.ttcn | 32 +++ .../NegSem_050402_actual_parameters_166.ttcn | 36 +++ .../NegSem_050402_actual_parameters_167.ttcn | 38 +++ .../NegSem_050402_actual_parameters_168.ttcn | 37 +++ .../NegSem_050402_actual_parameters_169.ttcn | 36 +++ .../NegSem_050402_actual_parameters_170.ttcn | 39 +++ .../NegSem_050402_actual_parameters_171.ttcn | 36 +++ .../NegSem_050402_actual_parameters_172.ttcn | 40 +++ .../NegSem_050402_actual_parameters_173.ttcn | 42 +++ .../NegSem_050402_actual_parameters_174.ttcn | 41 +++ .../NegSem_050402_actual_parameters_175.ttcn | 40 +++ .../NegSem_050402_actual_parameters_176.ttcn | 43 ++++ .../NegSem_050402_actual_parameters_177.ttcn | 27 ++ .../NegSem_050402_actual_parameters_178.ttcn | 30 +++ .../NegSem_050402_actual_parameters_179.ttcn | 31 +++ .../NegSem_050402_actual_parameters_180.ttcn | 31 +++ .../NegSem_050402_actual_parameters_181.ttcn | 31 +++ .../NegSem_050402_actual_parameters_182.ttcn | 35 +++ .../NegSem_050402_actual_parameters_183.ttcn | 37 +++ .../NegSyn_050402_actual_parameters_001.ttcn | 36 +++ .../Sem_050402_actual_parameters_001.ttcn | 85 ++++++ .../Sem_050402_actual_parameters_002.ttcn | 85 ++++++ .../Sem_050402_actual_parameters_003.ttcn | 31 +++ .../Sem_050402_actual_parameters_004.ttcn | 33 +++ .../Sem_050402_actual_parameters_005.ttcn | 33 +++ .../Sem_050402_actual_parameters_006.ttcn | 32 +++ .../Sem_050402_actual_parameters_007.ttcn | 35 +++ .../Sem_050402_actual_parameters_008.ttcn | 36 +++ .../Sem_050402_actual_parameters_009.ttcn | 38 +++ .../Sem_050402_actual_parameters_010.ttcn | 36 +++ .../Sem_050402_actual_parameters_011.ttcn | 36 +++ .../Sem_050402_actual_parameters_012.ttcn | 32 +++ .../Sem_050402_actual_parameters_013.ttcn | 34 +++ .../Sem_050402_actual_parameters_014.ttcn | 34 +++ .../Sem_050402_actual_parameters_015.ttcn | 33 +++ .../Sem_050402_actual_parameters_016.ttcn | 36 +++ .../Sem_050402_actual_parameters_017.ttcn | 37 +++ .../Sem_050402_actual_parameters_018.ttcn | 39 +++ .../Sem_050402_actual_parameters_019.ttcn | 37 +++ .../Sem_050402_actual_parameters_020.ttcn | 37 +++ .../Sem_050402_actual_parameters_021.ttcn | 35 +++ .../Sem_050402_actual_parameters_022.ttcn | 37 +++ .../Sem_050402_actual_parameters_023.ttcn | 37 +++ .../Sem_050402_actual_parameters_024.ttcn | 36 +++ .../Sem_050402_actual_parameters_025.ttcn | 39 +++ .../Sem_050402_actual_parameters_026.ttcn | 40 +++ .../Sem_050402_actual_parameters_027.ttcn | 42 +++ .../Sem_050402_actual_parameters_028.ttcn | 40 +++ .../Sem_050402_actual_parameters_029.ttcn | 40 +++ .../Sem_050402_actual_parameters_030.ttcn | 27 ++ .../Sem_050402_actual_parameters_031.ttcn | 29 +++ .../Sem_050402_actual_parameters_032.ttcn | 29 +++ .../Sem_050402_actual_parameters_033.ttcn | 28 ++ .../Sem_050402_actual_parameters_034.ttcn | 31 +++ .../Sem_050402_actual_parameters_035.ttcn | 31 +++ .../Sem_050402_actual_parameters_036.ttcn | 34 +++ .../Sem_050402_actual_parameters_037.ttcn | 32 +++ .../Sem_050402_actual_parameters_038.ttcn | 32 +++ .../Sem_050402_actual_parameters_039.ttcn | 31 +++ .../Sem_050402_actual_parameters_040.ttcn | 35 +++ .../Sem_050402_actual_parameters_041.ttcn | 37 +++ .../Sem_050402_actual_parameters_042.ttcn | 35 +++ .../Sem_050402_actual_parameters_043.ttcn | 35 +++ .../Sem_050402_actual_parameters_044.ttcn | 38 +++ .../Sem_050402_actual_parameters_045.ttcn | 35 +++ .../Sem_050402_actual_parameters_046.ttcn | 39 +++ .../Sem_050402_actual_parameters_047.ttcn | 41 +++ .../Sem_050402_actual_parameters_048.ttcn | 39 +++ .../Sem_050402_actual_parameters_049.ttcn | 39 +++ .../Sem_050402_actual_parameters_050.ttcn | 42 +++ .../Sem_050402_actual_parameters_051.ttcn | 27 ++ .../Sem_050402_actual_parameters_052.ttcn | 30 +++ .../Sem_050402_actual_parameters_053.ttcn | 33 +++ .../Sem_050402_actual_parameters_054.ttcn | 31 +++ .../Sem_050402_actual_parameters_055.ttcn | 31 +++ .../Sem_050402_actual_parameters_056.ttcn | 35 +++ .../Sem_050402_actual_parameters_057.ttcn | 32 +++ .../Sem_050402_actual_parameters_058.ttcn | 34 +++ .../Sem_050402_actual_parameters_059.ttcn | 34 +++ .../Sem_050402_actual_parameters_060.ttcn | 33 +++ .../Sem_050402_actual_parameters_061.ttcn | 36 +++ .../Sem_050402_actual_parameters_062.ttcn | 37 +++ .../Sem_050402_actual_parameters_063.ttcn | 39 +++ .../Sem_050402_actual_parameters_064.ttcn | 37 +++ .../Sem_050402_actual_parameters_065.ttcn | 37 +++ .../Sem_050402_actual_parameters_066.ttcn | 34 +++ .../Sem_050402_actual_parameters_067.ttcn | 33 +++ .../Sem_050402_actual_parameters_068.ttcn | 37 +++ .../Sem_050402_actual_parameters_069.ttcn | 39 +++ .../Sem_050402_actual_parameters_070.ttcn | 38 +++ .../Sem_050402_actual_parameters_071.ttcn | 33 +++ .../Sem_050402_actual_parameters_072.ttcn | 35 +++ .../Sem_050402_actual_parameters_073.ttcn | 35 +++ .../Sem_050402_actual_parameters_074.ttcn | 34 +++ .../Sem_050402_actual_parameters_075.ttcn | 37 +++ .../Sem_050402_actual_parameters_076.ttcn | 38 +++ .../Sem_050402_actual_parameters_077.ttcn | 40 +++ .../Sem_050402_actual_parameters_078.ttcn | 38 +++ .../Sem_050402_actual_parameters_079.ttcn | 38 +++ .../Sem_050402_actual_parameters_080.ttcn | 35 +++ .../Sem_050402_actual_parameters_081.ttcn | 34 +++ .../Sem_050402_actual_parameters_082.ttcn | 38 +++ .../Sem_050402_actual_parameters_083.ttcn | 40 +++ .../Sem_050402_actual_parameters_084.ttcn | 39 +++ .../Sem_050402_actual_parameters_085.ttcn | 36 +++ .../Sem_050402_actual_parameters_086.ttcn | 38 +++ .../Sem_050402_actual_parameters_087.ttcn | 38 +++ .../Sem_050402_actual_parameters_088.ttcn | 37 +++ .../Sem_050402_actual_parameters_089.ttcn | 40 +++ .../Sem_050402_actual_parameters_090.ttcn | 41 +++ .../Sem_050402_actual_parameters_091.ttcn | 43 ++++ .../Sem_050402_actual_parameters_092.ttcn | 41 +++ .../Sem_050402_actual_parameters_093.ttcn | 41 +++ .../Sem_050402_actual_parameters_094.ttcn | 38 +++ .../Sem_050402_actual_parameters_095.ttcn | 37 +++ .../Sem_050402_actual_parameters_096.ttcn | 41 +++ .../Sem_050402_actual_parameters_097.ttcn | 43 ++++ .../Sem_050402_actual_parameters_098.ttcn | 42 +++ .../Sem_050402_actual_parameters_099.ttcn | 28 ++ .../Sem_050402_actual_parameters_100.ttcn | 30 +++ .../Sem_050402_actual_parameters_101.ttcn | 30 +++ .../Sem_050402_actual_parameters_102.ttcn | 29 +++ .../Sem_050402_actual_parameters_103.ttcn | 32 +++ .../Sem_050402_actual_parameters_104.ttcn | 32 +++ .../Sem_050402_actual_parameters_105.ttcn | 35 +++ .../Sem_050402_actual_parameters_106.ttcn | 33 +++ .../Sem_050402_actual_parameters_107.ttcn | 33 +++ .../Sem_050402_actual_parameters_108.ttcn | 30 +++ .../Sem_050402_actual_parameters_109.ttcn | 29 +++ .../Sem_050402_actual_parameters_110.ttcn | 32 +++ .../Sem_050402_actual_parameters_111.ttcn | 34 +++ .../Sem_050402_actual_parameters_112.ttcn | 33 +++ .../Sem_050402_actual_parameters_113.ttcn | 32 +++ .../Sem_050402_actual_parameters_114.ttcn | 36 +++ .../Sem_050402_actual_parameters_115.ttcn | 38 +++ .../Sem_050402_actual_parameters_116.ttcn | 37 +++ .../Sem_050402_actual_parameters_117.ttcn | 36 +++ .../Sem_050402_actual_parameters_118.ttcn | 39 +++ .../Sem_050402_actual_parameters_119.ttcn | 36 +++ .../Sem_050402_actual_parameters_120.ttcn | 40 +++ .../Sem_050402_actual_parameters_121.ttcn | 42 +++ .../Sem_050402_actual_parameters_122.ttcn | 41 +++ .../Sem_050402_actual_parameters_123.ttcn | 40 +++ .../Sem_050402_actual_parameters_124.ttcn | 43 ++++ .../Sem_050402_actual_parameters_125.ttcn | 27 ++ .../Sem_050402_actual_parameters_126.ttcn | 30 +++ .../Sem_050402_actual_parameters_127.ttcn | 31 +++ .../Sem_050402_actual_parameters_128.ttcn | 31 +++ .../Sem_050402_actual_parameters_129.ttcn | 31 +++ .../Sem_050402_actual_parameters_130.ttcn | 35 +++ .../Sem_050402_actual_parameters_131.ttcn | 32 +++ .../Sem_050402_actual_parameters_132.ttcn | 36 +++ .../Sem_050402_actual_parameters_133.ttcn | 38 +++ .../Sem_050402_actual_parameters_134.ttcn | 37 +++ .../Sem_050402_actual_parameters_135.ttcn | 36 +++ .../Sem_050402_actual_parameters_136.ttcn | 39 +++ .../Sem_050402_actual_parameters_137.ttcn | 36 +++ .../Sem_050402_actual_parameters_138.ttcn | 40 +++ .../Sem_050402_actual_parameters_139.ttcn | 42 +++ .../Sem_050402_actual_parameters_140.ttcn | 41 +++ .../Sem_050402_actual_parameters_141.ttcn | 40 +++ .../Sem_050402_actual_parameters_142.ttcn | 43 ++++ .../Sem_050402_actual_parameters_143.ttcn | 28 ++ .../Sem_050402_actual_parameters_144.ttcn | 31 +++ .../Sem_050402_actual_parameters_145.ttcn | 33 +++ .../Sem_050402_actual_parameters_146.ttcn | 32 +++ .../Sem_050402_actual_parameters_147.ttcn | 32 +++ .../Sem_050402_actual_parameters_148.ttcn | 35 +++ .../Sem_050402_actual_parameters_149.ttcn | 45 ++++ .../Sem_050402_actual_parameters_150.ttcn | 43 ++++ .../Sem_050402_actual_parameters_151.ttcn | 47 ++++ .../Sem_050402_actual_parameters_152.ttcn | 44 ++++ .../Sem_050402_actual_parameters_153.ttcn | 48 ++++ .../Sem_050402_actual_parameters_154.ttcn | 46 ++++ .../Sem_050402_actual_parameters_155.ttcn | 35 +++ .../Sem_050402_actual_parameters_156.ttcn | 35 +++ .../Sem_050402_actual_parameters_157.ttcn | 32 +++ .../Sem_050402_actual_parameters_158.ttcn | 32 +++ .../Sem_050402_actual_parameters_159.ttcn | 36 +++ .../Sem_050402_actual_parameters_160.ttcn | 35 +++ .../Sem_050402_actual_parameters_161.ttcn | 39 +++ .../Sem_050402_actual_parameters_162.ttcn | 29 +++ .../Sem_050402_actual_parameters_163.ttcn | 29 +++ .../Sem_050402_actual_parameters_164.ttcn | 29 +++ .../Sem_050402_actual_parameters_165.ttcn | 29 +++ .../Sem_050402_actual_parameters_166.ttcn | 47 ++++ .../Sem_050402_actual_parameters_167.ttcn | 49 ++++ .../Sem_050402_actual_parameters_168.ttcn | 37 +++ .../Sem_050402_actual_parameters_169.ttcn | 37 +++ .../Sem_050402_actual_parameters_170.ttcn | 37 +++ .../Sem_050402_actual_parameters_171.ttcn | 37 +++ .../Sem_050402_actual_parameters_172.ttcn | 28 ++ .../Sem_050402_actual_parameters_173.ttcn | 28 ++ .../Sem_050402_actual_parameters_174.ttcn | 29 +++ .../Sem_050402_actual_parameters_175.ttcn | 29 +++ .../Sem_050402_actual_parameters_176.ttcn | 29 +++ .../Sem_050402_actual_parameters_177.ttcn | 29 +++ .../Sem_050402_actual_parameters_178.ttcn | 30 +++ .../Sem_050402_actual_parameters_179.ttcn | 31 +++ .../Sem_050402_actual_parameters_180.ttcn | 28 ++ .../Sem_050402_actual_parameters_181.ttcn | 28 ++ .../Sem_050402_actual_parameters_182.ttcn | 29 +++ .../Sem_050402_actual_parameters_183.ttcn | 40 +++ .../Sem_050402_actual_parameters_184.ttcn | 42 +++ .../Sem_050402_actual_parameters_185.ttcn | 29 +++ .../Sem_050402_actual_parameters_186.ttcn | 29 +++ .../Sem_050402_actual_parameters_187.ttcn | 29 +++ .../Sem_050402_actual_parameters_188.ttcn | 41 +++ .../Sem_050402_actual_parameters_189.ttcn | 30 +++ .../Sem_050402_actual_parameters_190.ttcn | 32 +++ .../Sem_050402_actual_parameters_191.ttcn | 37 +++ .../Sem_050402_actual_parameters_192.ttcn | 37 +++ .../Sem_050402_actual_parameters_193.ttcn | 28 ++ .../Sem_050402_actual_parameters_194.ttcn | 30 +++ .../Sem_050402_actual_parameters_195.ttcn | 28 ++ .../Sem_050402_actual_parameters_196.ttcn | 31 +++ .../Sem_050402_actual_parameters_197.ttcn | 28 ++ .../Sem_050402_actual_parameters_198.ttcn | 29 +++ .../Sem_050402_actual_parameters_199.ttcn | 43 ++++ .../Sem_050402_actual_parameters_200.ttcn | 34 +++ .../Sem_050402_actual_parameters_201.ttcn | 46 ++++ .../Sem_050402_actual_parameters_202.ttcn | 31 +++ .../Sem_050402_actual_parameters_203.ttcn | 37 +++ .../Sem_050402_actual_parameters_204.ttcn | 37 +++ .../Sem_050402_actual_parameters_205.ttcn | 40 +++ .../Sem_050402_actual_parameters_206.ttcn | 41 +++ .../Sem_050402_actual_parameters_207.ttcn | 41 +++ .../Sem_050402_actual_parameters_208.ttcn | 40 +++ .../Sem_050402_actual_parameters_209.ttcn | 41 +++ .../Sem_050402_actual_parameters_210.ttcn | 41 +++ .../Sem_050402_actual_parameters_211.ttcn | 32 +++ .../Sem_050402_actual_parameters_212.ttcn | 41 +++ .../Sem_050402_actual_parameters_213.ttcn | 41 +++ .../Sem_050402_actual_parameters_214.ttcn | 44 ++++ .../Sem_050402_actual_parameters_215.ttcn | 45 ++++ .../Sem_050402_actual_parameters_216.ttcn | 45 ++++ .../Sem_050402_actual_parameters_217.ttcn | 44 ++++ .../Sem_050402_actual_parameters_218.ttcn | 45 ++++ .../Sem_050402_actual_parameters_219.ttcn | 45 ++++ .../Sem_050402_actual_parameters_220.ttcn | 36 +++ .../Sem_050402_actual_parameters_221.ttcn | 31 +++ .../Sem_050402_actual_parameters_222.ttcn | 35 +++ .../Sem_050402_actual_parameters_223.ttcn | 30 +++ .../Sem_050402_actual_parameters_224.ttcn | 34 +++ .../Sem_050402_actual_parameters_225.ttcn | 30 +++ .../Sem_050402_actual_parameters_226.ttcn | 34 +++ .../Sem_050402_actual_parameters_227.ttcn | 41 +++ ...4_parametrization_incompatibility_001.ttcn | 61 +++++ ...yn_0504_forbidden_parametrization_001.ttcn | 22 ++ ...yn_0504_forbidden_parametrization_002.ttcn | 22 ++ .../NegSem_0505_cyclic_definitions_001.ttcn | 22 ++ .../NegSem_0505_cyclic_definitions_002.ttcn | 35 +++ .../Sem_0505_cyclic_definitions_001.ttcn | 34 +++ .../Sem_0505_cyclic_definitions_002.ttcn | 36 +++ .../Sem_0505_cyclic_definitions_003.ttcn | 57 +++++ .../Sem_0505_cyclic_definitions_004.ttcn | 52 ++++ .../05_toplevel/NegSyn_05_TopLevel_001.ttcn | 12 + .../NegSyn_060100_SimpleBasicTypes_001.ttcn | 9 + .../NegSyn_060100_SimpleBasicTypes_002.ttcn | 9 + .../NegSyn_060100_SimpleBasicTypes_003.ttcn | 9 + .../NegSyn_060100_SimpleBasicTypes_004.ttcn | 9 + .../NegSyn_060100_SimpleBasicTypes_005.ttcn | 9 + .../NegSyn_060100_SimpleBasicTypes_006.ttcn | 9 + .../Sem_060100_SimpleBasicTypes_001.ttcn | 25 ++ .../Sem_060100_SimpleBasicTypes_002.ttcn | 25 ++ .../Sem_060100_SimpleBasicTypes_003.ttcn | 25 ++ .../Sem_060100_SimpleBasicTypes_004.ttcn | 25 ++ .../Sem_060100_SimpleBasicTypes_005.ttcn | 25 ++ .../Syn_060100_SimpleBasicTypes_001.ttcn | 11 + .../Syn_060100_SimpleBasicTypes_002.ttcn | 10 + .../Syn_060100_SimpleBasicTypes_003.ttcn | 13 + .../Syn_060100_SimpleBasicTypes_004.ttcn | 12 + .../Syn_060100_SimpleBasicTypes_005.ttcn | 10 + .../Syn_060100_SimpleBasicTypes_006.ttcn | 13 + ...Sem_06010101_AccessStringElements_001.ttcn | 32 +++ ...Sem_06010101_AccessStringElements_002.ttcn | 32 +++ ...Syn_06010101_AccessStringElements_001.ttcn | 26 ++ ...Syn_06010101_AccessStringElements_002.ttcn | 26 ++ ...Sem_06010101_AccessStringElements_001.ttcn | 25 ++ ...Sem_06010101_AccessStringElements_002.ttcn | 25 ++ ...Sem_06010101_AccessStringElements_003.ttcn | 25 ++ ...Sem_06010101_AccessStringElements_004.ttcn | 29 +++ ...Sem_06010101_AccessStringElements_005.ttcn | 29 +++ ...Sem_06010101_AccessStringElements_006.ttcn | 26 ++ ...Sem_06010101_AccessStringElements_007.ttcn | 25 ++ ...Sem_06010101_AccessStringElements_008.ttcn | 25 ++ ...Sem_06010101_AccessStringElements_009.ttcn | 26 ++ ...Sem_06010101_AccessStringElements_010.ttcn | 25 ++ .../NegSyn_060101_TopLevel_001.ttcn | 9 + .../NegSyn_060101_TopLevel_002.ttcn | 9 + .../NegSyn_060101_TopLevel_003.ttcn | 9 + .../NegSyn_060101_TopLevel_004.ttcn | 9 + .../NegSyn_060101_TopLevel_005.ttcn | 9 + .../NegSyn_060101_TopLevel_006.ttcn | 9 + .../NegSyn_060101_TopLevel_007.ttcn | 9 + .../NegSyn_060101_TopLevel_008.ttcn | 9 + .../NegSyn_060101_TopLevel_009.ttcn | 9 + .../NegSyn_060101_TopLevel_010.ttcn | 9 + .../Sem_060101_TopLevel_001.ttcn | 25 ++ .../Sem_060101_TopLevel_002.ttcn | 25 ++ .../Sem_060101_TopLevel_003.ttcn | 25 ++ .../Sem_060101_TopLevel_004.ttcn | 32 +++ .../Sem_060101_TopLevel_005.ttcn | 25 ++ .../Sem_060101_TopLevel_006.ttcn | 25 ++ .../Sem_060101_TopLevel_007.ttcn | 42 +++ .../Sem_060101_TopLevel_008.ttcn | 34 +++ .../Sem_060101_TopLevel_009.ttcn | 34 +++ .../Sem_060101_TopLevel_010.ttcn | 34 +++ .../Sem_060101_TopLevel_011.ttcn | 36 +++ .../Sem_060101_TopLevel_012.ttcn | 34 +++ .../Sem_060101_TopLevel_013.ttcn | 35 +++ .../Sem_060101_TopLevel_014.ttcn | 26 ++ .../Sem_060101_TopLevel_015.ttcn | 27 ++ .../Syn_060101_TopLevel_001.ttcn | 13 + .../Syn_060101_TopLevel_002.ttcn | 13 + .../Syn_060101_TopLevel_003.ttcn | 13 + .../06010201_lists_of_values/NOTES | 2 + .../NegSem_06010201_ListOfValues_001.ttcn | 20 ++ .../NegSem_06010201_ListOfValues_002.ttcn | 20 ++ .../NegSem_06010201_ListOfValues_003.ttcn | 20 ++ .../NegSem_06010201_ListOfValues_004.ttcn | 20 ++ .../NegSem_06010201_ListOfValues_005.ttcn | 20 ++ .../NegSem_06010201_ListOfValues_006.ttcn | 20 ++ .../Sem_06010201_ListOfValues_001.ttcn | 25 ++ .../06010202_lists_of_types/NOTES | 1 + .../NegSem_06010202_ListOfTypes_001.ttcn | 22 ++ .../NegSem_06010202_ListOfTypes_002.ttcn | 23 ++ .../NegSem_06010202_ListOfTypes_003.ttcn | 23 ++ .../NegSem_06010202_ListOfTypes_004.ttcn | 23 ++ .../NegSem_06010202_ListOfTypes_005.ttcn | 22 ++ .../NegSem_06010202_ListOfTypes_006.ttcn | 23 ++ .../NegSem_06010202_ListOfTypes_007.ttcn | 23 ++ .../NegSem_06010202_ListOfTypes_008.ttcn | 22 ++ .../NegSem_06010202_ListOfTypes_009.ttcn | 23 ++ .../Sem_06010202_ListOfTypes_001.ttcn | 24 ++ .../Sem_06010202_ListOfTypes_002.ttcn | 24 ++ .../Sem_06010202_ListOfTypes_003.ttcn | 24 ++ .../Sem_06010202_ListOfTypes_004.ttcn | 24 ++ .../Sem_06010202_ListOfTypes_005.ttcn | 24 ++ .../Sem_06010202_ListOfTypes_006.ttcn | 24 ++ .../Sem_06010202_ListOfTypes_007.ttcn | 24 ++ .../Sem_06010202_ListOfTypes_008.ttcn | 22 ++ .../Sem_06010202_ListOfTypes_009.ttcn | 25 ++ .../NegSem_06010203_Ranges_001.ttcn | 20 ++ .../NegSem_06010203_Ranges_002.ttcn | 20 ++ .../NegSem_06010203_Ranges_003.ttcn | 21 ++ .../NegSem_06010203_Ranges_004.ttcn | 20 ++ .../NegSem_06010203_Ranges_005.ttcn | 20 ++ .../NegSem_06010203_Ranges_006.ttcn | 23 ++ .../NegSem_06010203_Ranges_007.ttcn | 21 ++ .../NegSem_06010203_Ranges_008.ttcn | 21 ++ .../NegSem_06010203_Ranges_009.ttcn | 21 ++ .../NegSem_06010203_Ranges_010.ttcn | 20 ++ .../NegSem_06010203_Ranges_011.ttcn | 20 ++ .../NegSem_06010203_Ranges_012.ttcn | 20 ++ .../NegSem_06010203_Ranges_013.ttcn | 21 ++ .../NegSem_06010203_Ranges_014.ttcn | 21 ++ .../NegSem_06010203_Ranges_015.ttcn | 21 ++ .../NegSem_06010203_Ranges_016.ttcn | 21 ++ .../NegSem_06010203_Ranges_017.ttcn | 21 ++ .../Sem_06010203_Ranges_001.ttcn | 23 ++ .../Sem_06010203_Ranges_002.ttcn | 28 ++ .../Sem_06010203_Ranges_003.ttcn | 28 ++ .../Sem_06010203_Ranges_004.ttcn | 24 ++ .../Sem_06010203_Ranges_005.ttcn | 26 ++ .../Sem_06010203_Ranges_006.ttcn | 25 ++ .../Sem_06010203_Ranges_007.ttcn | 21 ++ .../Sem_06010203_Ranges_008.ttcn | 25 ++ .../06010204_string_length_restrictions/NOTES | 1 + ...Sem_06010204_StringLenghtRestrict_001.ttcn | 20 ++ ...Sem_06010204_StringLenghtRestrict_002.ttcn | 20 ++ ...Sem_06010204_StringLenghtRestrict_003.ttcn | 21 ++ ...Sem_06010204_StringLenghtRestrict_004.ttcn | 21 ++ ...Sem_06010204_StringLenghtRestrict_005.ttcn | 21 ++ ...Sem_06010204_StringLenghtRestrict_006.ttcn | 21 ++ ...Sem_06010204_StringLenghtRestrict_007.ttcn | 21 ++ ...Sem_06010204_StringLenghtRestrict_008.ttcn | 21 ++ ...Syn_06010204_StringLenghtRestrict_001.ttcn | 10 + ...Syn_06010204_StringLenghtRestrict_002.ttcn | 10 + ...Sem_06010204_StringLenghtRestrict_001.ttcn | 28 ++ ...Sem_06010204_StringLenghtRestrict_002.ttcn | 28 ++ ...Sem_06010204_StringLenghtRestrict_003.ttcn | 28 ++ ...Sem_06010204_StringLenghtRestrict_004.ttcn | 28 ++ .../NOTES | 1 + .../NegSem_06010205_StringPattern_001.ttcn | 20 ++ .../NegSyn_06010205_StringPattern_001.ttcn | 21 ++ .../NegSyn_06010205_StringPattern_002.ttcn | 21 ++ .../Sem_06010205_StringPattern_001.ttcn | 25 ++ .../Sem_06010205_StringPattern_002.ttcn | 25 ++ .../Sem_06010205_StringPattern_003.ttcn | 33 +++ .../NegSem_0601020601_MixingSubtype_001.ttcn | 20 ++ .../NegSem_0601020601_MixingSubtype_002.ttcn | 20 ++ .../Sem_0601020601_MixingSubtype_001.ttcn | 24 ++ .../Sem_0601020601_MixingSubtype_002.ttcn | 25 ++ .../NOTES | 1 + .../NegSem_0601020602_StringMixing_001.ttcn | 20 ++ .../NegSem_0601020602_StringMixing_002.ttcn | 20 ++ .../NegSem_0601020602_StringMixing_003.ttcn | 20 ++ .../NegSem_0601020602_StringMixing_004.ttcn | 20 ++ .../NegSem_0601020602_StringMixing_005.ttcn | 20 ++ .../NegSem_0601020602_StringMixing_006.ttcn | 20 ++ .../Sem_0601020602_StringMixing_001.ttcn | 25 ++ .../Sem_0601020602_StringMixing_002.ttcn | 24 ++ .../Sem_0601020602_StringMixing_003.ttcn | 23 ++ .../Sem_0601020602_StringMixing_004.ttcn | 23 ++ .../Sem_0601020602_StringMixing_005.ttcn | 23 ++ .../Sem_0601020602_StringMixing_006.ttcn | 23 ++ .../Sem_0601020602_StringMixing_007.ttcn | 31 +++ ..._06020101_ReferencingRecordFields_001.ttcn | 31 +++ ..._06020101_ReferencingRecordFields_002.ttcn | 35 +++ ..._06020101_ReferencingRecordFields_003.ttcn | 38 +++ ..._06020101_ReferencingRecordFields_004.ttcn | 39 +++ ..._06020101_ReferencingRecordFields_001.ttcn | 38 +++ ..._06020101_ReferencingRecordFields_002.ttcn | 38 +++ ..._06020101_ReferencingRecordFields_003.ttcn | 36 +++ ..._06020101_ReferencingRecordFields_004.ttcn | 37 +++ ..._06020101_ReferencingRecordFields_005.ttcn | 38 +++ ..._06020101_ReferencingRecordFields_006.ttcn | 40 +++ ..._06020101_ReferencingRecordFields_007.ttcn | 43 ++++ ..._06020101_ReferencingRecordFields_008.ttcn | 49 ++++ ..._06020101_ReferencingRecordFields_009.ttcn | 49 ++++ ..._06020101_ReferencingRecordFields_010.ttcn | 48 ++++ ..._06020101_ReferencingRecordFields_011.ttcn | 57 +++++ ..._06020101_ReferencingRecordFields_012.ttcn | 56 ++++ ..._06020101_ReferencingRecordFields_013.ttcn | 52 ++++ ..._06020101_ReferencingRecordFields_014.ttcn | 52 ++++ ..._06020101_ReferencingRecordFields_015.ttcn | 51 ++++ ..._06020101_ReferencingRecordFields_016.ttcn | 60 +++++ ..._06020101_ReferencingRecordFields_017.ttcn | 59 +++++ .../NegSem_060201_RecordTypeValues_001.ttcn | 36 +++ .../NegSyn_060201_RecordTypeValues_001.ttcn | 18 ++ .../NegSyn_060201_RecordTypeValues_002.ttcn | 18 ++ .../Sem_060201_RecordTypeValues_001.ttcn | 39 +++ .../Sem_060201_RecordTypeValues_002.ttcn | 40 +++ .../Sem_060201_RecordTypeValues_003.ttcn | 41 +++ .../Sem_060201_RecordTypeValues_004.ttcn | 37 +++ .../Syn_060201_RecordTypeValues_001.ttcn | 19 ++ .../Syn_060201_RecordTypeValues_002.ttcn | 10 + .../NegSem_060202_SetTypeValues_001.ttcn | 31 +++ .../NegSem_060202_SetTypeValues_002.ttcn | 36 +++ .../NegSyn_060202_SetTypeValues_001.ttcn | 18 ++ .../NegSyn_060202_SetTypeValues_002.ttcn | 18 ++ .../Sem_060202_SetTypeValues_001.ttcn | 38 +++ .../Sem_060202_SetTypeValues_002.ttcn | 38 +++ .../Sem_060202_SetTypeValues_003.ttcn | 36 +++ .../Sem_060202_SetTypeValues_004.ttcn | 37 +++ .../Sem_060202_SetTypeValues_005.ttcn | 39 +++ .../Sem_060202_SetTypeValues_006.ttcn | 40 +++ .../Sem_060202_SetTypeValues_007.ttcn | 41 +++ .../Sem_060202_SetTypeValues_008.ttcn | 37 +++ .../Syn_060202_SetTypeValues_001.ttcn | 19 ++ .../Syn_060202_SetTypeValues_002.ttcn | 10 + ..._records_and_sets_of_single_types_001.ttcn | 25 ++ ..._records_and_sets_of_single_types_002.ttcn | 25 ++ ..._records_and_sets_of_single_types_003.ttcn | 29 +++ ..._records_and_sets_of_single_types_004.ttcn | 29 +++ ..._records_and_sets_of_single_types_005.ttcn | 29 +++ ..._records_and_sets_of_single_types_006.ttcn | 29 +++ ..._records_and_sets_of_single_types_007.ttcn | 29 +++ ..._records_and_sets_of_single_types_008.ttcn | 29 +++ ..._records_and_sets_of_single_types_009.ttcn | 29 +++ ..._records_and_sets_of_single_types_010.ttcn | 29 +++ ..._records_and_sets_of_single_types_011.ttcn | 33 +++ ..._records_and_sets_of_single_types_012.ttcn | 33 +++ ..._records_and_sets_of_single_types_013.ttcn | 30 +++ ..._records_and_sets_of_single_types_014.ttcn | 30 +++ ..._records_and_sets_of_single_types_015.ttcn | 34 +++ ..._records_and_sets_of_single_types_016.ttcn | 35 +++ ..._records_and_sets_of_single_types_017.ttcn | 36 +++ ..._records_and_sets_of_single_types_018.ttcn | 36 +++ ..._records_and_sets_of_single_types_019.ttcn | 37 +++ ..._records_and_sets_of_single_types_020.ttcn | 36 +++ ..._records_and_sets_of_single_types_021.ttcn | 37 +++ ..._records_and_sets_of_single_types_022.ttcn | 36 +++ ..._records_and_sets_of_single_types_023.ttcn | 37 +++ ..._records_and_sets_of_single_types_001.ttcn | 28 ++ ..._records_and_sets_of_single_types_001.ttcn | 32 +++ ..._records_and_sets_of_single_types_002.ttcn | 42 +++ ..._records_and_sets_of_single_types_003.ttcn | 42 +++ ..._records_and_sets_of_single_types_004.ttcn | 39 +++ ..._records_and_sets_of_single_types_005.ttcn | 39 +++ ..._records_and_sets_of_single_types_006.ttcn | 42 +++ ..._records_and_sets_of_single_types_007.ttcn | 42 +++ ..._records_and_sets_of_single_types_008.ttcn | 35 +++ ..._records_and_sets_of_single_types_009.ttcn | 35 +++ ..._records_and_sets_of_single_types_010.ttcn | 44 ++++ ..._records_and_sets_of_single_types_011.ttcn | 44 ++++ ..._records_and_sets_of_single_types_012.ttcn | 35 +++ ..._records_and_sets_of_single_types_013.ttcn | 35 +++ ..._records_and_sets_of_single_types_014.ttcn | 36 +++ ..._records_and_sets_of_single_types_015.ttcn | 36 +++ ..._records_and_sets_of_single_types_016.ttcn | 34 +++ ..._records_and_sets_of_single_types_017.ttcn | 34 +++ ..._records_and_sets_of_single_types_019.ttcn | 39 +++ ..._records_and_sets_of_single_types_020.ttcn | 39 +++ ..._records_and_sets_of_single_types_021.ttcn | 38 +++ ..._records_and_sets_of_single_types_022.ttcn | 38 +++ ..._records_and_sets_of_single_types_023.ttcn | 35 +++ ..._records_and_sets_of_single_types_024.ttcn | 36 +++ ..._records_and_sets_of_single_types_025.ttcn | 35 +++ ..._records_and_sets_of_single_types_026.ttcn | 36 +++ ..._records_and_sets_of_single_types_027.ttcn | 36 +++ ..._records_and_sets_of_single_types_028.ttcn | 37 +++ ..._records_and_sets_of_single_types_029.ttcn | 36 +++ ..._records_and_sets_of_single_types_030.ttcn | 37 +++ ..._records_and_sets_of_single_types_031.ttcn | 35 +++ ..._records_and_sets_of_single_types_032.ttcn | 36 +++ ..._records_and_sets_of_single_types_033.ttcn | 35 +++ ..._records_and_sets_of_single_types_034.ttcn | 36 +++ ..._records_and_sets_of_single_types_035.ttcn | 36 +++ ..._records_and_sets_of_single_types_036.ttcn | 37 +++ ..._records_and_sets_of_single_types_037.ttcn | 36 +++ ..._records_and_sets_of_single_types_038.ttcn | 37 +++ ...060204_enumerated_type_and_values_001.ttcn | 18 ++ ...060204_enumerated_type_and_values_002.ttcn | 17 ++ ...060204_enumerated_type_and_values_003.ttcn | 36 +++ ...060204_enumerated_type_and_values_004.ttcn | 37 +++ ...060204_enumerated_type_and_values_005.ttcn | 32 +++ ...060204_enumerated_type_and_values_006.ttcn | 38 +++ ...060204_enumerated_type_and_values_007.ttcn | 40 +++ ...060204_enumerated_type_and_values_008.ttcn | 38 +++ ...060204_enumerated_type_and_values_009.ttcn | 37 +++ ...060204_enumerated_type_and_values_010.ttcn | 38 +++ ...060204_enumerated_type_and_values_011.ttcn | 38 +++ ...060204_enumerated_type_and_values_013.ttcn | 33 +++ ...060204_enumerated_type_and_values_001.ttcn | 18 ++ ...060204_enumerated_type_and_values_002.ttcn | 17 ++ ...060204_enumerated_type_and_values_004.ttcn | 16 ++ ...060204_enumerated_type_and_values_001.ttcn | 22 ++ ...060204_enumerated_type_and_values_002.ttcn | 41 +++ ...060204_enumerated_type_and_values_003.ttcn | 41 +++ ...060204_enumerated_type_and_values_004.ttcn | 41 +++ ...060204_enumerated_type_and_values_005.ttcn | 33 +++ ...060204_enumerated_type_and_values_006.ttcn | 37 +++ ...060204_enumerated_type_and_values_007.ttcn | 37 +++ ...060204_enumerated_type_and_values_001.ttcn | 18 ++ ...060204_enumerated_type_and_values_002.ttcn | 17 ++ ..._referencing_fields_of_union_type_001.ttcn | 34 +++ ..._referencing_fields_of_union_type_002.ttcn | 35 +++ ..._referencing_fields_of_union_type_003.ttcn | 29 +++ ..._referencing_fields_of_union_type_004.ttcn | 30 +++ ..._referencing_fields_of_union_type_005.ttcn | 34 +++ ..._referencing_fields_of_union_type_006.ttcn | 32 +++ ..._referencing_fields_of_union_type_007.ttcn | 38 +++ ..._referencing_fields_of_union_type_008.ttcn | 39 +++ ..._referencing_fields_of_union_type_001.ttcn | 34 +++ ..._referencing_fields_of_union_type_002.ttcn | 35 +++ ..._referencing_fields_of_union_type_003.ttcn | 35 +++ ..._referencing_fields_of_union_type_004.ttcn | 37 +++ ..._referencing_fields_of_union_type_005.ttcn | 42 +++ ..._referencing_fields_of_union_type_006.ttcn | 50 ++++ ..._referencing_fields_of_union_type_007.ttcn | 39 +++ ..._referencing_fields_of_union_type_008.ttcn | 41 +++ .../NegSyn_06020502_option_and_union_001.ttcn | 17 ++ ...d_type_definition_for_field_types_001.ttcn | 27 ++ .../NegSem_060205_top_level_001.ttcn | 30 +++ .../NegSem_060205_top_level_002.ttcn | 31 +++ .../NegSem_060205_top_level_003.ttcn | 29 +++ .../NegSem_060205_top_level_004.ttcn | 29 +++ .../NegSem_060205_top_level_005.ttcn | 28 ++ .../NegSyn_060205_top_level_001.ttcn | 20 ++ .../Sem_060205_top_level_001.ttcn | 30 +++ .../Syn_060205_top_level_001.ttcn | 22 ++ .../Syn_060205_top_level_002.ttcn | 18 ++ .../NegSem_060206_anytype_001.ttcn | 35 +++ .../NegSem_060206_anytype_002.ttcn | 33 +++ .../NegSyn_060206_anytype_001.ttcn | 38 +++ .../NegSyn_060206_anytype_002.ttcn | 35 +++ .../NegSyn_060206_anytype_003.ttcn | 35 +++ .../Sem_060206_anytype_001.ttcn | 36 +++ .../Sem_060206_anytype_002.ttcn | 34 +++ .../Sem_060206_anytype_003.ttcn | 37 +++ .../Sem_060206_anytype_004.ttcn | 35 +++ .../Sem_060206_anytype_005.ttcn | 32 +++ .../Sem_060206_anytype_006.ttcn | 37 +++ .../Sem_060206_anytype_007.ttcn | 34 +++ .../Sem_060206_anytype_008.ttcn | 35 +++ .../Sem_060206_anytype_009.ttcn | 45 ++++ .../Sem_060206_anytype_010.ttcn | 35 +++ .../Sem_060206_anytype_011.ttcn | 40 +++ .../Sem_060206_anytype_012.ttcn | 48 ++++ .../Sem_060206_anytype_013.ttcn | 37 +++ .../Sem_060206_anytype_014.ttcn | 43 ++++ .../Sem_060206_anytype_015.ttcn | 43 ++++ .../Sem_060206_anytype_016.ttcn | 45 ++++ .../Sem_060206_anytype_017.ttcn | 38 +++ .../Sem_060206_anytype_018.ttcn | 43 ++++ .../Sem_060206_anytype_019.ttcn | 45 ++++ .../NegSem_060207_arrays_001.ttcn | 24 ++ .../NegSem_060207_arrays_002.ttcn | 24 ++ .../NegSem_060207_arrays_003.ttcn | 31 +++ .../NegSem_060207_arrays_004.ttcn | 31 +++ .../NegSem_060207_arrays_005.ttcn | 37 +++ .../NegSem_060207_arrays_006.ttcn | 37 +++ .../NegSem_060207_arrays_007.ttcn | 30 +++ .../NegSem_060207_arrays_008.ttcn | 30 +++ .../NegSem_060207_arrays_009.ttcn | 32 +++ .../NegSem_060207_arrays_010.ttcn | 35 +++ .../NegSem_060207_arrays_011.ttcn | 36 +++ .../NegSem_060207_arrays_012.ttcn | 35 +++ .../NegSem_060207_arrays_013.ttcn | 34 +++ .../NegSem_060207_arrays_014.ttcn | 35 +++ .../NegSem_060207_arrays_015.ttcn | 27 ++ .../NegSem_060207_arrays_016.ttcn | 27 ++ .../NegSem_060207_arrays_017.ttcn | 27 ++ .../NegSem_060207_arrays_018.ttcn | 28 ++ .../NegSem_060207_arrays_019.ttcn | 27 ++ .../NegSem_060207_arrays_020.ttcn | 30 +++ .../NegSem_060207_arrays_021.ttcn | 32 +++ .../NegSem_060207_arrays_022.ttcn | 28 ++ .../NegSem_060207_arrays_023.ttcn | 28 ++ .../NegSem_060207_arrays_024.ttcn | 27 ++ .../NegSem_060207_arrays_025.ttcn | 27 ++ .../NegSem_060207_arrays_026.ttcn | 35 +++ .../NegSem_060207_arrays_027.ttcn | 34 +++ .../NegSem_060207_arrays_028.ttcn | 34 +++ .../NegSyn_060207_arrays_001.ttcn | 25 ++ .../NegSyn_060207_arrays_002.ttcn | 25 ++ .../NegSyn_060207_arrays_003.ttcn | 26 ++ .../NegSyn_060207_arrays_004.ttcn | 21 ++ .../NegSyn_060207_arrays_005.ttcn | 15 ++ .../060207_arrays/Sem_060207_arrays_001.ttcn | 35 +++ .../060207_arrays/Sem_060207_arrays_002.ttcn | 43 ++++ .../060207_arrays/Sem_060207_arrays_003.ttcn | 38 +++ .../060207_arrays/Sem_060207_arrays_004.ttcn | 42 +++ .../060207_arrays/Sem_060207_arrays_005.ttcn | 34 +++ .../060207_arrays/Sem_060207_arrays_006.ttcn | 36 +++ .../060207_arrays/Sem_060207_arrays_007.ttcn | 36 +++ .../060207_arrays/Sem_060207_arrays_008.ttcn | 35 +++ .../060207_arrays/Sem_060207_arrays_009.ttcn | 34 +++ .../060207_arrays/Sem_060207_arrays_010.ttcn | 36 +++ .../060207_arrays/Sem_060207_arrays_011.ttcn | 41 +++ .../060207_arrays/Sem_060207_arrays_012.ttcn | 39 +++ .../060207_arrays/Sem_060207_arrays_013.ttcn | 40 +++ .../060207_arrays/Sem_060207_arrays_014.ttcn | 47 ++++ .../060207_arrays/Sem_060207_arrays_015.ttcn | 27 ++ .../060207_arrays/Sem_060207_arrays_016.ttcn | 28 ++ .../060207_arrays/Sem_060207_arrays_017.ttcn | 30 +++ .../060207_arrays/Sem_060207_arrays_018.ttcn | 32 +++ .../060207_arrays/Sem_060207_arrays_019.ttcn | 30 +++ .../060207_arrays/Sem_060207_arrays_020.ttcn | 28 ++ .../060207_arrays/Sem_060207_arrays_021.ttcn | 29 +++ .../060207_arrays/Sem_060207_arrays_022.ttcn | 31 +++ .../060207_arrays/Sem_060207_arrays_023.ttcn | 32 +++ .../060207_arrays/Syn_060207_arrays_001.ttcn | 20 ++ .../060207_arrays/Syn_060207_arrays_002.ttcn | 15 ++ .../060207_arrays/Syn_060207_arrays_003.ttcn | 20 ++ .../060207_arrays/Syn_060207_arrays_004.ttcn | 20 ++ .../060207_arrays/Syn_060207_arrays_005.ttcn | 20 ++ .../060207_arrays/Syn_060207_arrays_006.ttcn | 21 ++ .../060207_arrays/Syn_060207_arrays_007.ttcn | 21 ++ .../060208_default_type/NOTES | 25 ++ .../Sem_060208_default_type_001.ttcn | 32 +++ .../Sem_060208_default_type_002.ttcn | 26 ++ .../Sem_060208_default_type_003.ttcn | 32 +++ .../060209_comm_port_types/NOTES | 5 + ...Sem_060209_CommunicationPortTypes_001.ttcn | 45 ++++ ...Sem_060209_CommunicationPortTypes_002.ttcn | 45 ++++ ...Sem_060209_CommunicationPortTypes_003.ttcn | 45 ++++ ...Sem_060209_CommunicationPortTypes_004.ttcn | 35 +++ ...Sem_060209_CommunicationPortTypes_005.ttcn | 35 +++ ...Sem_060209_CommunicationPortTypes_006.ttcn | 51 ++++ ...Sem_060209_CommunicationPortTypes_007.ttcn | 51 ++++ ...Sem_060209_CommunicationPortTypes_008.ttcn | 51 ++++ ...Sem_060209_CommunicationPortTypes_004.ttcn | 74 ++++++ ...Sem_060209_CommunicationPortTypes_005.ttcn | 241 ++++++++++++++++++ ...Syn_060209_CommunicationPortTypes_001.ttcn | 27 ++ ...Syn_060209_CommunicationPortTypes_002.ttcn | 17 ++ ...Syn_060209_CommunicationPortTypes_003.ttcn | 25 ++ ...Syn_060209_CommunicationPortTypes_004.ttcn | 19 ++ ...Syn_060209_CommunicationPortTypes_005.ttcn | 19 ++ ...Syn_060209_CommunicationPortTypes_006.ttcn | 19 ++ ...Syn_060209_CommunicationPortTypes_007.ttcn | 32 +++ ...Syn_060209_CommunicationPortTypes_008.ttcn | 21 ++ ...Syn_060209_CommunicationPortTypes_009.ttcn | 21 ++ ...Syn_060209_CommunicationPortTypes_010.ttcn | 36 +++ ...gSyn_060210_ReuseofComponentTypes_001.ttcn | 42 +++ ...gSyn_060210_ReuseofComponentTypes_002.ttcn | 44 ++++ ...gSyn_060210_ReuseofComponentTypes_003.ttcn | 41 +++ .../Sem_060210_ReuseofComponentTypes_001.ttcn | 50 ++++ .../Sem_060210_ReuseofComponentTypes_002.ttcn | 86 +++++++ .../Sem_060210_ReuseofComponentTypes_003.ttcn | 90 +++++++ ...60212_AddressingEntitiesInsideSut_001.ttcn | 37 +++ ...60212_AddressingEntitiesInsideSut_002.ttcn | 56 ++++ ...60212_AddressingEntitiesInsideSut_003.ttcn | 60 +++++ ...60212_AddressingEntitiesInsideSut_004.ttcn | 55 ++++ ...60212_AddressingEntitiesInsideSut_001.ttcn | 23 ++ ...60212_AddressingEntitiesInsideSut_002.ttcn | 45 ++++ .../NegSem_06021301_LengthSubtyping_001.ttcn | 13 + .../NegSem_06021301_LengthSubtyping_002.ttcn | 13 + .../NegSem_06021301_LengthSubtyping_003.ttcn | 12 + .../NegSem_06021301_LengthSubtyping_004.ttcn | 12 + .../NegSem_06021301_LengthSubtyping_005.ttcn | 15 ++ .../NegSem_06021301_LengthSubtyping_006.ttcn | 17 ++ .../Syn_06021301_LengthSubtyping_001.ttcn | 14 + .../Syn_06021301_LengthSubtyping_002.ttcn | 14 + .../NegSem_06021302_ListSubtyping_001.ttcn | 24 ++ .../NegSem_06021302_ListSubtyping_002.ttcn | 24 ++ .../Sem_06021302_ListSubtyping_001.ttcn | 40 +++ .../Sem_06021302_ListSubtyping_002.ttcn | 40 +++ .../Sem_06021302_ListSubtyping_003.ttcn | 41 +++ .../NegSem_0602_TopLevel_001.ttcn | 27 ++ .../NegSem_0602_TopLevel_002.ttcn | 34 +++ .../NegSem_0602_TopLevel_003.ttcn | 34 +++ .../NegSem_0602_TopLevel_004.ttcn | 32 +++ .../NegSyn_0602_TopLevel_001.ttcn | 13 + .../NegSyn_0602_TopLevel_002.ttcn | 14 + .../NegSyn_0602_TopLevel_003.ttcn | 18 ++ .../NegSyn_0602_TopLevel_004.ttcn | 23 ++ .../NegSyn_0602_TopLevel_005.ttcn | 37 +++ .../NegSyn_0602_TopLevel_006.ttcn | 41 +++ .../NegSyn_0602_TopLevel_007.ttcn | 37 +++ .../0602_toplevel/Sem_0602_TopLevel_001.ttcn | 37 +++ .../0602_toplevel/Sem_0602_TopLevel_002.ttcn | 33 +++ .../0602_toplevel/Sem_0602_TopLevel_003.ttcn | 39 +++ .../0602_toplevel/Sem_0602_TopLevel_004.ttcn | 33 +++ .../0602_toplevel/Sem_0602_TopLevel_005.ttcn | 35 +++ .../0602_toplevel/Sem_0602_TopLevel_006.ttcn | 32 +++ .../0602_toplevel/Sem_0602_TopLevel_007.ttcn | 33 +++ .../0602_toplevel/Sem_0602_TopLevel_008.ttcn | 29 +++ .../0602_toplevel/Sem_0602_TopLevel_009.ttcn | 32 +++ .../0602_toplevel/Sem_0602_TopLevel_010.ttcn | 29 +++ .../0602_toplevel/Sem_0602_TopLevel_011.ttcn | 29 +++ .../0602_toplevel/Sem_0602_TopLevel_012.ttcn | 32 +++ .../0602_toplevel/Sem_0602_TopLevel_013.ttcn | 32 +++ .../0602_toplevel/Sem_0602_TopLevel_014.ttcn | 34 +++ .../0602_toplevel/Syn_0602_TopLevel_001.ttcn | 13 + .../0602_toplevel/Syn_0602_TopLevel_002.ttcn | 14 + .../0602_toplevel/Syn_0602_TopLevel_003.ttcn | 18 ++ .../0602_toplevel/Syn_0602_TopLevel_004.ttcn | 14 + .../0602_toplevel/Syn_0602_TopLevel_005.ttcn | 20 ++ ...egSem_060301_non_structured_types_001.ttcn | 28 ++ ...egSem_060301_non_structured_types_002.ttcn | 28 ++ ...egSem_060301_non_structured_types_003.ttcn | 27 ++ ...egSem_060301_non_structured_types_004.ttcn | 28 ++ ...egSem_060301_non_structured_types_005.ttcn | 28 ++ ...egSem_060301_non_structured_types_006.ttcn | 27 ++ ...egSem_060301_non_structured_types_007.ttcn | 27 ++ ...egSem_060301_non_structured_types_008.ttcn | 27 ++ ...egSem_060301_non_structured_types_009.ttcn | 27 ++ ...egSem_060301_non_structured_types_010.ttcn | 27 ++ ...egSem_060301_non_structured_types_011.ttcn | 27 ++ ...egSem_060301_non_structured_types_012.ttcn | 26 ++ .../Sem_060301_non_structured_types_001.ttcn | 43 ++++ .../Sem_060301_non_structured_types_002.ttcn | 74 ++++++ .../Sem_060301_non_structured_types_003.ttcn | 45 ++++ .../Sem_060301_non_structured_types_004.ttcn | 42 +++ .../NegSem_060302_structured_types_001.ttcn | 31 +++ .../NegSem_060302_structured_types_002.ttcn | 39 +++ .../NegSem_060302_structured_types_003.ttcn | 39 +++ .../NegSem_060302_structured_types_004.ttcn | 40 +++ .../NegSem_060302_structured_types_005.ttcn | 41 +++ .../NegSem_060302_structured_types_006.ttcn | 32 +++ .../NegSem_060302_structured_types_007.ttcn | 32 +++ .../NegSem_060302_structured_types_008.ttcn | 42 +++ .../NegSem_060302_structured_types_009.ttcn | 41 +++ .../NegSem_060302_structured_types_010.ttcn | 42 +++ .../NegSem_060302_structured_types_011.ttcn | 49 ++++ .../NegSem_060302_structured_types_012.ttcn | 57 +++++ .../NegSem_060302_structured_types_013.ttcn | 57 +++++ .../NegSem_060302_structured_types_014.ttcn | 36 +++ .../NegSem_060302_structured_types_015.ttcn | 36 +++ .../NegSem_060302_structured_types_016.ttcn | 36 +++ .../NegSem_060302_structured_types_017.ttcn | 36 +++ .../NegSem_060302_structured_types_018.ttcn | 32 +++ .../NegSem_060302_structured_types_019.ttcn | 64 +++++ .../Sem_060302_structured_types_001.ttcn | 97 +++++++ .../Sem_060302_structured_types_002.ttcn | 60 +++++ .../Sem_060302_structured_types_003.ttcn | 51 ++++ .../Sem_060302_structured_types_004.ttcn | 50 ++++ .../Sem_060302_structured_types_005.ttcn | 46 ++++ .../Sem_060302_structured_types_006.ttcn | 62 +++++ .../NegSem_060303_component_types_001.ttcn | 43 ++++ .../NegSem_060303_component_types_002.ttcn | 42 +++ .../Sem_060303_component_types_001.ttcn | 45 ++++ .../Sem_060303_component_types_002.ttcn | 44 ++++ ...ility_of_communication_operations_001.ttcn | 36 +++ ...ility_of_communication_operations_002.ttcn | 40 +++ ...ility_of_communication_operations_003.ttcn | 48 ++++ ...ility_of_communication_operations_004.ttcn | 48 ++++ ...ility_of_communication_operations_005.ttcn | 42 +++ ...05_compatibility_of_anytype_types_001.ttcn | 52 ++++ ...05_compatibility_of_anytype_types_001.ttcn | 43 ++++ ...05_compatibility_of_anytype_types_002.ttcn | 43 ++++ .../0604_type_synonym/NOTES | 1 + .../070101_arithmetic_operators/NOTES | 2 + ...NegSem_070101_ArithmeticOperators_001.ttcn | 27 ++ ...NegSem_070101_ArithmeticOperators_002.ttcn | 26 ++ ...NegSem_070101_ArithmeticOperators_003.ttcn | 25 ++ ...NegSem_070101_ArithmeticOperators_004.ttcn | 25 ++ ...NegSem_070101_ArithmeticOperators_008.ttcn | 26 ++ ...NegSem_070101_ArithmeticOperators_009.ttcn | 26 ++ ...NegSem_070101_ArithmeticOperators_010.ttcn | 27 ++ .../Sem_070101_ArithmeticOperators_001.ttcn | 29 +++ .../Sem_070101_ArithmeticOperators_002.ttcn | 31 +++ .../Sem_070101_ArithmeticOperators_003.ttcn | 29 +++ .../Sem_070101_ArithmeticOperators_004.ttcn | 29 +++ .../Sem_070101_ArithmeticOperators_005.ttcn | 30 +++ .../Sem_070101_ArithmeticOperators_006.ttcn | 29 +++ .../Sem_070101_ArithmeticOperators_007.ttcn | 31 +++ .../Sem_070101_ArithmeticOperators_008.ttcn | 29 +++ .../Sem_070101_ArithmeticOperators_009.ttcn | 30 +++ .../Sem_070101_ArithmeticOperators_010.ttcn | 28 ++ .../Sem_070101_ArithmeticOperators_011.ttcn | 28 ++ .../Sem_070101_ArithmeticOperators_012.ttcn | 28 ++ .../Sem_070101_ArithmeticOperators_013.ttcn | 28 ++ .../Sem_070101_ArithmeticOperators_014.ttcn | 28 ++ .../Sem_070101_ArithmeticOperators_015.ttcn | 28 ++ .../Sem_070101_ArithmeticOperators_016.ttcn | 28 ++ .../Sem_070101_ArithmeticOperators_017.ttcn | 28 ++ .../Sem_070101_ArithmeticOperators_018.ttcn | 28 ++ .../Sem_070101_ArithmeticOperators_019.ttcn | 41 +++ .../Sem_070101_ArithmeticOperators_020.ttcn | 41 +++ .../Sem_070101_ArithmeticOperators_021.ttcn | 41 +++ .../Sem_070101_ArithmeticOperators_022.ttcn | 41 +++ .../Sem_070101_ArithmeticOperators_023.ttcn | 40 +++ .../Sem_070101_ArithmeticOperators_024.ttcn | 32 +++ .../Sem_070101_ArithmeticOperators_025.ttcn | 32 +++ .../Sem_070101_ArithmeticOperators_026.ttcn | 30 +++ .../Sem_070101_ArithmeticOperators_027.ttcn | 28 ++ .../Sem_070101_ArithmeticOperators_028.ttcn | 28 ++ .../Sem_070101_ArithmeticOperators_029.ttcn | 28 ++ .../Sem_070101_ArithmeticOperators_030.ttcn | 28 ++ .../Sem_070101_ArithmeticOperators_031.ttcn | 28 ++ .../Sem_070101_ArithmeticOperators_032.ttcn | 28 ++ .../Sem_070101_ArithmeticOperators_033.ttcn | 28 ++ .../Sem_070101_ArithmeticOperators_034.ttcn | 28 ++ .../Sem_070101_ArithmeticOperators_035.ttcn | 28 ++ .../Sem_070101_ArithmeticOperators_036.ttcn | 28 ++ .../Sem_070101_ArithmeticOperators_037.ttcn | 28 ++ .../Sem_070101_ArithmeticOperators_038.ttcn | 28 ++ .../Sem_070101_ArithmeticOperators_039.ttcn | 30 +++ .../Sem_070101_ArithmeticOperators_040.ttcn | 30 +++ .../Sem_070101_ArithmeticOperators_041.ttcn | 29 +++ .../Sem_070101_ArithmeticOperators_042.ttcn | 29 +++ .../Sem_070101_ArithmeticOperators_043.ttcn | 29 +++ .../Sem_070101_ArithmeticOperators_044.ttcn | 29 +++ .../Sem_070101_ArithmeticOperators_045.ttcn | 29 +++ .../Sem_070101_ArithmeticOperators_046.ttcn | 29 +++ .../Sem_070101_ArithmeticOperators_047.ttcn | 29 +++ .../Sem_070101_ArithmeticOperators_048.ttcn | 29 +++ .../Sem_070101_ArithmeticOperators_049.ttcn | 29 +++ .../Sem_070101_ArithmeticOperators_050.ttcn | 30 +++ .../Sem_070101_ArithmeticOperators_051.ttcn | 32 +++ .../Sem_070101_ArithmeticOperators_052.ttcn | 35 +++ .../Sem_070101_ArithmeticOperators_053.ttcn | 26 ++ .../Syn_070101_ArithmeticOperators_001.ttcn | 12 + .../Syn_070101_ArithmeticOperators_002.ttcn | 12 + .../Syn_070101_ArithmeticOperators_003.ttcn | 12 + .../Syn_070101_ArithmeticOperators_004.ttcn | 12 + .../Syn_070101_ArithmeticOperators_005.ttcn | 12 + .../Syn_070101_ArithmeticOperators_006.ttcn | 12 + .../Syn_070101_ArithmeticOperators_007.ttcn | 12 + .../Syn_070101_ArithmeticOperators_008.ttcn | 12 + .../Syn_070101_ArithmeticOperators_009.ttcn | 12 + .../Syn_070101_ArithmeticOperators_010.ttcn | 12 + .../Syn_070101_ArithmeticOperators_011.ttcn | 12 + .../Syn_070101_ArithmeticOperators_012.ttcn | 12 + .../Sem_070102_ListOperator_001.ttcn | 26 ++ .../Sem_070102_ListOperator_002.ttcn | 26 ++ .../Sem_070102_ListOperator_003.ttcn | 31 +++ .../Sem_070102_ListOperator_004.ttcn | 31 +++ .../Sem_070102_ListOperator_005.ttcn | 33 +++ .../Sem_070102_ListOperator_006.ttcn | 30 +++ .../070103_relational_operators/NOTES | 4 + ...NegSem_070103_RelationalOperators_001.ttcn | 33 +++ ...NegSem_070103_RelationalOperators_002.ttcn | 50 ++++ ...NegSem_070103_RelationalOperators_003.ttcn | 51 ++++ ...NegSem_070103_RelationalOperators_004.ttcn | 50 ++++ ...NegSem_070103_RelationalOperators_005.ttcn | 32 +++ ...NegSem_070103_RelationalOperators_006.ttcn | 51 ++++ ...NegSem_070103_RelationalOperators_007.ttcn | 51 ++++ ...NegSem_070103_RelationalOperators_008.ttcn | 50 ++++ ...NegSyn_070103_RelationalOperators_001.ttcn | 32 +++ ...NegSyn_070103_RelationalOperators_002.ttcn | 32 +++ ...NegSyn_070103_RelationalOperators_003.ttcn | 32 +++ ...NegSyn_070103_RelationalOperators_004.ttcn | 32 +++ .../Sem_070103_RelationalOperators_001.ttcn | 25 ++ .../Sem_070103_RelationalOperators_002.ttcn | 25 ++ .../Sem_070103_RelationalOperators_003.ttcn | 32 +++ .../Sem_070103_RelationalOperators_004.ttcn | 25 ++ .../Sem_070103_RelationalOperators_005.ttcn | 25 ++ .../Sem_070103_RelationalOperators_006.ttcn | 32 +++ .../Sem_070103_RelationalOperators_007.ttcn | 25 ++ .../Sem_070103_RelationalOperators_008.ttcn | 25 ++ .../Sem_070103_RelationalOperators_009.ttcn | 25 ++ .../Sem_070103_RelationalOperators_010.ttcn | 25 ++ .../Sem_070103_RelationalOperators_011.ttcn | 32 +++ .../Sem_070103_RelationalOperators_012.ttcn | 32 +++ .../Sem_070103_RelationalOperators_013.ttcn | 25 ++ .../Sem_070103_RelationalOperators_014.ttcn | 25 ++ .../Sem_070103_RelationalOperators_015.ttcn | 32 +++ .../Sem_070103_RelationalOperators_016.ttcn | 25 ++ .../Sem_070103_RelationalOperators_017.ttcn | 25 ++ .../Sem_070103_RelationalOperators_018.ttcn | 25 ++ .../Sem_070103_RelationalOperators_019.ttcn | 25 ++ .../Sem_070103_RelationalOperators_020.ttcn | 32 +++ .../Sem_070103_RelationalOperators_021.ttcn | 32 +++ .../Sem_070103_RelationalOperators_022.ttcn | 25 ++ .../Sem_070103_RelationalOperators_023.ttcn | 25 ++ .../Sem_070103_RelationalOperators_024.ttcn | 32 +++ .../Sem_070103_RelationalOperators_025.ttcn | 33 +++ .../Sem_070103_RelationalOperators_026.ttcn | 33 +++ .../Sem_070103_RelationalOperators_030.ttcn | 33 +++ .../Sem_070103_RelationalOperators_031.ttcn | 33 +++ .../Sem_070103_RelationalOperators_032.ttcn | 33 +++ .../Sem_070103_RelationalOperators_033.ttcn | 33 +++ .../Sem_070103_RelationalOperators_034.ttcn | 33 +++ .../Sem_070103_RelationalOperators_035.ttcn | 34 +++ .../Sem_070103_RelationalOperators_036.ttcn | 33 +++ .../Sem_070103_RelationalOperators_037.ttcn | 38 +++ .../Sem_070103_RelationalOperators_038.ttcn | 31 +++ .../Sem_070103_RelationalOperators_039.ttcn | 31 +++ .../Sem_070103_RelationalOperators_040.ttcn | 31 +++ .../Sem_070103_RelationalOperators_041.ttcn | 31 +++ .../Sem_070103_RelationalOperators_042.ttcn | 30 +++ .../Sem_070103_RelationalOperators_043.ttcn | 30 +++ .../Sem_070103_RelationalOperators_044.ttcn | 30 +++ .../Sem_070103_RelationalOperators_045.ttcn | 30 +++ .../Sem_070103_RelationalOperators_046.ttcn | 29 +++ .../Sem_070103_RelationalOperators_047.ttcn | 27 ++ .../Sem_070103_RelationalOperators_048.ttcn | 40 +++ .../Sem_070103_RelationalOperators_049.ttcn | 39 +++ .../Sem_070103_RelationalOperators_050.ttcn | 41 +++ .../Sem_070104_LogicalOperators_001.ttcn | 28 ++ .../Sem_070104_LogicalOperators_002.ttcn | 30 +++ .../Sem_070105_BitwiseOperators_001.ttcn | 28 ++ .../Sem_070105_BitwiseOperators_002.ttcn | 28 ++ .../Sem_070106_ShiftOperators_001.ttcn | 28 ++ .../Sem_070106_ShiftOperators_002.ttcn | 28 ++ .../Sem_070106_ShiftOperators_003.ttcn | 28 ++ .../Sem_070106_ShiftOperators_004.ttcn | 28 ++ .../Sem_070107_RotateOperators_001.ttcn | 28 ++ .../Sem_070107_RotateOperators_002.ttcn | 28 ++ .../Sem_070107_RotateOperators_003.ttcn | 28 ++ .../Sem_070107_RotateOperators_004.ttcn | 28 ++ ...02_FieldReferencesAndListElements_001.ttcn | 32 +++ ...02_FieldReferencesAndListElements_002.ttcn | 29 +++ .../07_toplevel/NegSem_07_toplevel_001.ttcn | 29 +++ .../07_toplevel/NegSem_07_toplevel_002.ttcn | 32 +++ .../07_toplevel/NegSem_07_toplevel_003.ttcn | 33 +++ .../07_toplevel/NegSem_07_toplevel_004.ttcn | 33 +++ .../07_toplevel/NegSem_07_toplevel_005.ttcn | 28 ++ .../07_toplevel/Sem_07_toplevel_001.ttcn | 31 +++ .../07_toplevel/Sem_07_toplevel_002.ttcn | 28 ++ .../07_toplevel/Sem_07_toplevel_003.ttcn | 33 +++ .../07_toplevel/Sem_07_toplevel_004.ttcn | 30 +++ .../07_toplevel/Sem_07_toplevel_005.ttcn | 30 +++ .../07_toplevel/Sem_07_toplevel_006.ttcn | 34 +++ .../07_toplevel/Sem_07_toplevel_007.ttcn | 34 +++ .../07_toplevel/Sem_07_toplevel_008.ttcn | 31 +++ .../07_toplevel/Sem_07_toplevel_009.ttcn | 34 +++ ATS/core_language/07_expressions/NOTES | 2 + .../NegSyn_0801_DefinitionOfAModule_001.ttcn | 10 + .../Syn_0801_DefinitionOfAModule_001.ttcn | 10 + .../Syn_0801_DefinitionOfAModule_002.ttcn | 10 + .../Syn_0801_DefinitionOfAModule_003.ttcn | 10 + .../Syn_0801_DefinitionOfAModule_004.ttcn | 10 + .../Syn_0801_DefinitionOfAModule_005.ttcn | 10 + .../Syn_0801_DefinitionOfAModule_006.ttcn | 10 + .../Syn_0801_DefinitionOfAModule_007.ttcn | 10 + .../Syn_0801_DefinitionOfAModule_008.ttcn | 10 + .../Syn_0801_DefinitionOfAModule_009.ttcn | 10 + .../Syn_0801_DefinitionOfAModule_010.ttcn | 10 + .../NegSem_080201_ModuleParameters_001.ttcn | 38 +++ .../NegSem_080201_ModuleParameters_002.ttcn | 46 ++++ .../NegSem_080201_ModuleParameters_003.ttcn | 34 +++ .../NegSem_080201_ModuleParameters_004.ttcn | 34 +++ .../NegSem_080201_ModuleParameters_005.ttcn | 28 ++ .../NegSem_080201_ModuleParameters_006.ttcn | 30 +++ .../NegSyn_080201_ModuleParameters_001.ttcn | 17 ++ .../NegSyn_080201_ModuleParameters_002.ttcn | 11 + .../Sem_080201_ModuleParameters_001.ttcn | 27 ++ .../Sem_080201_ModuleParameters_002.ttcn | 29 +++ .../Sem_080201_ModuleParameters_003.ttcn | 29 +++ .../Syn_080201_ModuleParameters_001.ttcn | 10 + .../Syn_080201_ModuleParameters_002.ttcn | 10 + .../Syn_080201_ModuleParameters_003.ttcn | 10 + .../Syn_080202_GroupOfDefinitions_001.ttcn | 18 ++ .../Syn_080202_GroupOfDefinitions_002.ttcn | 17 ++ .../Syn_080202_GroupOfDefinitions_003.ttcn | 16 ++ .../Syn_080202_GroupOfDefinitions_004.ttcn | 18 ++ ...em_08020301_GeneralFormatOfImport_001.ttcn | 23 ++ ...em_08020301_GeneralFormatOfImport_002.ttcn | 21 ++ ...em_08020301_GeneralFormatOfImport_003.ttcn | 37 +++ ...em_08020301_GeneralFormatOfImport_004.ttcn | 35 +++ ...em_08020301_GeneralFormatOfImport_005.ttcn | 33 +++ ...em_08020301_GeneralFormatOfImport_006.ttcn | 33 +++ ...em_08020301_GeneralFormatOfImport_007.ttcn | 40 +++ ...em_08020301_GeneralFormatOfImport_008.ttcn | 24 ++ ...em_08020301_GeneralFormatOfImport_009.ttcn | 24 ++ ...em_08020301_GeneralFormatOfImport_010.ttcn | 26 ++ ...em_08020301_GeneralFormatOfImport_011.ttcn | 26 ++ ...em_08020301_GeneralFormatOfImport_012.ttcn | 28 ++ ...em_08020301_GeneralFormatOfImport_013.ttcn | 27 ++ ...em_08020301_GeneralFormatOfImport_014.ttcn | 27 ++ ...em_08020301_GeneralFormatOfImport_015.ttcn | 31 +++ ...em_08020301_GeneralFormatOfImport_016.ttcn | 23 ++ ...em_08020301_GeneralFormatOfImport_017.ttcn | 25 ++ ...em_08020301_GeneralFormatOfImport_018.ttcn | 25 ++ ...em_08020301_GeneralFormatOfImport_019.ttcn | 25 ++ ...em_08020301_GeneralFormatOfImport_020.ttcn | 25 ++ ...em_08020301_GeneralFormatOfImport_021.ttcn | 25 ++ ...em_08020301_GeneralFormatOfImport_022.ttcn | 25 ++ ...em_08020301_GeneralFormatOfImport_023.ttcn | 27 ++ ...em_08020301_GeneralFormatOfImport_024.ttcn | 25 ++ ...em_08020301_GeneralFormatOfImport_025.ttcn | 26 ++ ...em_08020301_GeneralFormatOfImport_026.ttcn | 26 ++ ...em_08020301_GeneralFormatOfImport_027.ttcn | 28 ++ ...em_08020301_GeneralFormatOfImport_028.ttcn | 26 ++ ...em_08020301_GeneralFormatOfImport_029.ttcn | 27 ++ ...em_08020301_GeneralFormatOfImport_030.ttcn | 26 ++ ...em_08020301_GeneralFormatOfImport_031.ttcn | 25 ++ ...em_08020301_GeneralFormatOfImport_032.ttcn | 25 ++ ...em_08020301_GeneralFormatOfImport_033.ttcn | 27 ++ ...em_08020301_GeneralFormatOfImport_034.ttcn | 27 ++ ...em_08020301_GeneralFormatOfImport_035.ttcn | 27 ++ ...em_08020301_GeneralFormatOfImport_036.ttcn | 26 ++ ...em_08020301_GeneralFormatOfImport_037.ttcn | 27 ++ ...em_08020301_GeneralFormatOfImport_038.ttcn | 24 ++ ...em_08020301_GeneralFormatOfImport_039.ttcn | 34 +++ ...em_08020301_GeneralFormatOfImport_040.ttcn | 37 +++ ...yn_08020301_GeneralFormatOfImport_001.ttcn | 31 +++ ...yn_08020301_GeneralFormatOfImport_002.ttcn | 32 +++ ...em_08020301_GeneralFormatOfImport_001.ttcn | 35 +++ ...em_08020301_GeneralFormatOfImport_002.ttcn | 40 +++ ...em_08020301_GeneralFormatOfImport_003.ttcn | 38 +++ ...em_08020301_GeneralFormatOfImport_004.ttcn | 38 +++ ...em_08020301_GeneralFormatOfImport_005.ttcn | 26 ++ ...em_08020301_GeneralFormatOfImport_006.ttcn | 26 ++ ...em_08020301_GeneralFormatOfImport_007.ttcn | 34 +++ ...em_08020301_GeneralFormatOfImport_008.ttcn | 57 +++++ ...em_08020301_GeneralFormatOfImport_009.ttcn | 53 ++++ ...em_08020301_GeneralFormatOfImport_010.ttcn | 44 ++++ ...em_08020301_GeneralFormatOfImport_011.ttcn | 54 ++++ ...em_08020301_GeneralFormatOfImport_012.ttcn | 46 ++++ ...em_08020301_GeneralFormatOfImport_013.ttcn | 44 ++++ ...em_08020301_GeneralFormatOfImport_014.ttcn | 36 +++ ...em_08020301_GeneralFormatOfImport_015.ttcn | 38 +++ ...em_08020301_GeneralFormatOfImport_016.ttcn | 38 +++ ...em_08020301_GeneralFormatOfImport_017.ttcn | 33 +++ ...em_08020301_GeneralFormatOfImport_018.ttcn | 33 +++ ...em_08020301_GeneralFormatOfImport_019.ttcn | 46 ++++ ...em_08020301_GeneralFormatOfImport_020.ttcn | 44 ++++ ...yn_08020301_GeneralFormatOfImport_001.ttcn | 15 ++ ...yn_08020301_GeneralFormatOfImport_002.ttcn | 24 ++ ...020302_ImportingSingleDefinitions_001.ttcn | 32 +++ ...020302_ImportingSingleDefinitions_002.ttcn | 49 ++++ .../NegSem_08020303_ImportingGroups_001.ttcn | 34 +++ .../Sem_08020303_ImportingGroups_001.ttcn | 34 +++ .../Sem_08020303_ImportingGroups_002.ttcn | 41 +++ .../Sem_08020303_ImportingGroups_003.ttcn | 38 +++ ...ImportingDefinitionsOfTheSameKind_001.ttcn | 32 +++ ...ImportingDefinitionsOfTheSameKind_002.ttcn | 33 +++ ...ImportingDefinitionsOfTheSameKind_003.ttcn | 33 +++ ..._ImportingAllDefinitionsOfAModule_001.ttcn | 40 +++ ..._ImportingAllDefinitionsOfAModule_002.ttcn | 48 ++++ ..._ImportingAllDefinitionsOfAModule_001.ttcn | 29 +++ ..._ImportingAllDefinitionsOfAModule_002.ttcn | 32 +++ ...therT3EditionsAndFromNonT3Modules_001.ttcn | 16 ++ ...therT3EditionsAndFromNonT3Modules_001.ttcn | 16 ++ ...therT3EditionsAndFromNonT3Modules_002.ttcn | 14 + ...ngOfImportStatementsFromT3Modules_001.ttcn | 35 +++ ...ngOfImportStatementsFromT3Modules_002.ttcn | 36 +++ ...ngOfImportStatementsFromT3Modules_001.ttcn | 35 +++ .../NOTES | 3 + ...OfLanguageSpecificationsInImports_001.ttcn | 14 + ...OfLanguageSpecificationsInImports_002.ttcn | 33 +++ ...OfLanguageSpecificationsInImports_003.ttcn | 33 +++ ...OfLanguageSpecificationsInImports_001.ttcn | 33 +++ ...OfLanguageSpecificationsInImports_002.ttcn | 33 +++ ..._080204_DefinitionOfFriendModules_001.ttcn | 29 +++ ..._080204_DefinitionOfFriendModules_002.ttcn | 31 +++ ..._080204_DefinitionOfFriendModules_001.ttcn | 31 +++ ...em_080205_VisibilityOfDefinitions_001.ttcn | 29 +++ ...em_080205_VisibilityOfDefinitions_002.ttcn | 31 +++ ...em_080205_VisibilityOfDefinitions_003.ttcn | 33 +++ ...em_080205_VisibilityOfDefinitions_004.ttcn | 33 +++ ...em_080205_VisibilityOfDefinitions_005.ttcn | 35 +++ ...em_080205_VisibilityOfDefinitions_001.ttcn | 29 +++ ...em_080205_VisibilityOfDefinitions_002.ttcn | 31 +++ ...em_080205_VisibilityOfDefinitions_003.ttcn | 33 +++ ...em_080205_VisibilityOfDefinitions_004.ttcn | 35 +++ ...em_080205_VisibilityOfDefinitions_005.ttcn | 35 +++ .../Syn_0802_ModuleDefinitionsPart_001.ttcn | 15 ++ .../Syn_0802_ModuleDefinitionsPart_002.ttcn | 15 ++ .../NegSyn_0803_ModuleControlPart_001.ttcn | 18 ++ .../Sem_0803_ModuleControlPart_001.ttcn | 31 +++ .../Syn_0803_ModuleControlPart_001.ttcn | 20 ++ .../Syn_0803_ModuleControlPart_002.ttcn | 34 +++ .../Syn_0803_ModuleControlPart_003.ttcn | 14 + ATS/core_language/08_modules/NOTES | 1 + .../NegSem_0901_Communication_ports_001.ttcn | 42 +++ .../NegSem_0901_Communication_ports_002.ttcn | 37 +++ .../NegSem_0901_Communication_ports_003.ttcn | 33 +++ .../NegSem_0901_Communication_ports_004.ttcn | 44 ++++ .../NegSem_0901_Communication_ports_005.ttcn | 35 +++ .../NegSem_0901_Communication_ports_006.ttcn | 45 ++++ .../NegSem_0901_Communication_ports_007.ttcn | 33 +++ .../NegSem_0901_Communication_ports_008.ttcn | 41 +++ .../NegSem_0901_Communication_ports_009.ttcn | 31 +++ .../NegSem_0901_Communication_ports_010.ttcn | 39 +++ .../Sem_0901_Communication_ports_001.ttcn | 40 +++ .../Sem_0901_Communication_ports_002.ttcn | 79 ++++++ .../Sem_0901_Communication_ports_003.ttcn | 97 +++++++ .../Sem_0901_Communication_ports_004.ttcn | 41 +++ .../Sem_0901_Communication_ports_005.ttcn | 100 ++++++++ .../Sem_0901_Communication_ports_006.ttcn | 35 +++ .../Sem_0901_Communication_ports_007.ttcn | 35 +++ .../Sem_0901_Communication_ports_008.ttcn | 48 ++++ .../Sem_0901_Communication_ports_009.ttcn | 49 ++++ .../Sem_0901_Communication_ports_010.ttcn | 44 ++++ .../Sem_0901_Communication_ports_011.ttcn | 45 ++++ .../NegSem_0902_Communication_ports_001.ttcn | 38 +++ .../NegSem_0902_Communication_ports_002.ttcn | 39 +++ .../NegSem_0902_Communication_ports_003.ttcn | 30 +++ .../NegSem_0902_Communication_ports_004.ttcn | 38 +++ .../Sem_0902_Communication_ports_001.ttcn | 48 ++++ .../Sem_0902_Communication_ports_002.ttcn | 57 +++++ .../Syn_0902_Communication_ports_001.ttcn | 35 +++ ATS/core_language/10_constants/NOTES | 3 + .../10_constants/NegSem_10_Constants_001.ttcn | 23 ++ .../10_constants/NegSem_10_Constants_002.ttcn | 21 ++ .../10_constants/NegSem_10_Constants_003.ttcn | 26 ++ .../10_constants/NegSem_10_Constants_004.ttcn | 39 +++ .../10_constants/NegSem_10_Constants_005.ttcn | 37 +++ .../10_constants/Sem_10_Constants_001.ttcn | 27 ++ .../10_constants/Sem_10_Constants_002.ttcn | 27 ++ .../10_constants/Sem_10_Constants_003.ttcn | 30 +++ .../10_constants/Sem_10_Constants_004.ttcn | 38 +++ .../10_constants/Sem_10_Constants_005.ttcn | 28 ++ .../10_constants/Sem_10_Constants_006.ttcn | 37 +++ .../10_constants/Sem_10_Constants_007.ttcn | 39 +++ .../10_constants/Sem_10_Constants_008.ttcn | 37 +++ .../10_constants/Sem_10_Constants_009.ttcn | 39 +++ .../10_constants/Syn_10_Constants_001.ttcn | 12 + .../10_constants/Syn_10_Constants_002.ttcn | 9 + .../10_constants/Syn_10_Constants_003.ttcn | 11 + .../10_constants/Syn_10_Constants_004.ttcn | 33 +++ .../11_variables/1101_value_variables/NOTES | 4 + .../NegSem_1101_ValueVars_001.ttcn | 18 ++ .../NegSem_1101_ValueVars_002.ttcn | 33 +++ .../NegSem_1101_ValueVars_003.ttcn | 41 +++ .../NegSem_1101_ValueVars_004.ttcn | 36 +++ .../NegSem_1101_ValueVars_005.ttcn | 23 ++ .../NegSyn_1101_ValueVars_001.ttcn | 9 + .../Sem_1101_ValueVars_001.ttcn | 40 +++ .../Sem_1101_ValueVars_002.ttcn | 30 +++ .../Sem_1101_ValueVars_003.ttcn | 29 +++ .../Sem_1101_ValueVars_004.ttcn | 34 +++ .../Sem_1101_ValueVars_005.ttcn | 38 +++ .../Sem_1101_ValueVars_006.ttcn | 31 +++ .../Syn_1101_ValueVars_001.ttcn | 30 +++ .../1102_template_variables/NOTES | 4 + .../NegSem_1102_TemplateVars_001.ttcn | 20 ++ .../NegSem_1102_TemplateVars_002.ttcn | 46 ++++ .../NegSem_1102_TemplateVars_003.ttcn | 55 ++++ .../NegSem_1102_TemplateVars_004.ttcn | 49 ++++ .../NegSyn_1102_TemplateVars_001.ttcn | 9 + .../NegSyn_1102_TemplateVars_002.ttcn | 26 ++ .../Sem_1102_TemplateVars_001.ttcn | 40 +++ .../Sem_1102_TemplateVars_002.ttcn | 47 ++++ .../Sem_1102_TemplateVars_003.ttcn | 53 ++++ .../Syn_1102_TemplateVars_001.ttcn | 30 +++ .../NegSem_12_toplevel_timer_001.ttcn | 25 ++ .../NegSem_12_toplevel_timer_002.ttcn | 25 ++ .../NegSem_12_toplevel_timer_003.ttcn | 25 ++ .../NegSem_12_toplevel_timer_004.ttcn | 25 ++ .../NegSem_12_toplevel_timer_005.ttcn | 25 ++ .../NegSem_12_toplevel_timer_006.ttcn | 25 ++ .../NegSem_12_toplevel_timer_007.ttcn | 25 ++ .../NegSem_12_toplevel_timer_008.ttcn | 25 ++ .../NegSyn_12_toplevel_timer_001.ttcn | 35 +++ .../NegSyn_12_toplevel_timer_002.ttcn | 25 ++ .../NegSyn_12_toplevel_timer_003.ttcn | 25 ++ .../NegSyn_12_toplevel_timer_004.ttcn | 25 ++ .../NegSyn_12_toplevel_timer_005.ttcn | 25 ++ .../NegSyn_12_toplevel_timer_006.ttcn | 25 ++ .../NegSyn_12_toplevel_timer_007.ttcn | 25 ++ .../Sem_12_toplevel_timer_001.ttcn | 28 ++ .../Sem_12_toplevel_timer_002.ttcn | 29 +++ .../Sem_12_toplevel_timer_003.ttcn | 39 +++ .../Sem_12_toplevel_timer_004.ttcn | 33 +++ .../Sem_12_toplevel_timer_005.ttcn | 28 ++ .../Sem_12_toplevel_timer_006.ttcn | 42 +++ .../Sem_12_toplevel_timer_007.ttcn | 29 +++ .../Sem_12_toplevel_timer_008.ttcn | 34 +++ .../Sem_12_toplevel_timer_009.ttcn | 37 +++ .../Syn_12_toplevel_timer_001.ttcn | 16 ++ .../Syn_12_toplevel_timer_002.ttcn | 16 ++ .../Syn_12_toplevel_timer_003.ttcn | 16 ++ .../Syn_12_toplevel_timer_004.ttcn | 16 ++ .../Syn_12_toplevel_timer_005.ttcn | 17 ++ .../Syn_12_toplevel_timer_006.ttcn | 20 ++ .../13_toplevel/Sem_13_declaring_msg_001.ttcn | 146 +++++++++++ .../13_toplevel/Sem_13_declaring_msg_002.ttcn | 127 +++++++++ .../13_toplevel/Sem_13_declaring_msg_003.ttcn | 128 ++++++++++ .../13_toplevel/Sem_13_declaring_msg_004.ttcn | 131 ++++++++++ .../13_toplevel/Sem_13_declaring_msg_005.ttcn | 137 ++++++++++ .../13_toplevel/Sem_13_declaring_msg_006.ttcn | 135 ++++++++++ .../13_toplevel/Sem_13_declaring_msg_007.ttcn | 136 ++++++++++ .../13_toplevel/Sem_13_declaring_msg_008.ttcn | 136 ++++++++++ .../13_toplevel/Sem_13_declaring_msg_009.ttcn | 133 ++++++++++ ...level_declaring_msg_various_types_001.ttcn | 142 +++++++++++ ...level_declaring_msg_various_types_002.ttcn | 142 +++++++++++ ...level_declaring_msg_various_types_003.ttcn | 142 +++++++++++ ...level_declaring_msg_various_types_004.ttcn | 142 +++++++++++ ...level_declaring_msg_various_types_005.ttcn | 142 +++++++++++ ...level_declaring_msg_various_types_006.ttcn | 142 +++++++++++ ...level_declaring_msg_various_types_007.ttcn | 142 +++++++++++ ...level_declaring_msg_various_types_008.ttcn | 142 +++++++++++ ...level_declaring_msg_various_types_009.ttcn | 142 +++++++++++ ...level_declaring_msg_various_types_010.ttcn | 142 +++++++++++ ...level_declaring_msg_various_types_011.ttcn | 142 +++++++++++ ...level_declaring_msg_various_types_012.ttcn | 142 +++++++++++ ...level_declaring_msg_various_types_013.ttcn | 142 +++++++++++ ...level_declaring_msg_various_types_014.ttcn | 142 +++++++++++ .../NegSem_1400_procedure_signatures_001.ttcn | 52 ++++ .../NegSem_1400_procedure_signatures_002.ttcn | 73 ++++++ .../Sem_1400_procedure_signatures_001.ttcn | 79 ++++++ .../Sem_1400_procedure_signatures_002.ttcn | 80 ++++++ .../Sem_1400_procedure_signatures_003.ttcn | 72 ++++++ .../Sem_1400_procedure_signatures_004.ttcn | 68 +++++ ...yn_1501_DeclaringMessageTemplates_001.ttcn | 22 ++ ...yn_1501_DeclaringMessageTemplates_002.ttcn | 18 ++ ...yn_1501_DeclaringMessageTemplates_003.ttcn | 18 ++ ...yn_1501_DeclaringMessageTemplates_004.ttcn | 12 + ...yn_1501_DeclaringMessageTemplates_005.ttcn | 12 + ...yn_1501_DeclaringMessageTemplates_006.ttcn | 42 +++ .../1502_declaring_signature_templates/NOTES | 2 + ..._1502_DeclaringSignatureTemplates_001.ttcn | 117 +++++++++ ..._1502_DeclaringSignatureTemplates_002.ttcn | 115 +++++++++ ..._1502_DeclaringSignatureTemplates_003.ttcn | 112 ++++++++ ..._1502_DeclaringSignatureTemplates_001.ttcn | 18 ++ ..._1502_DeclaringSignatureTemplates_002.ttcn | 18 ++ ..._1502_DeclaringSignatureTemplates_003.ttcn | 42 +++ ..._1502_DeclaringSignatureTemplates_004.ttcn | 42 +++ ...gSem_1503_GlobalAndLocalTemplates_001.ttcn | 22 ++ ...gSem_1503_GlobalAndLocalTemplates_002.ttcn | 22 ++ ...gSem_1503_GlobalAndLocalTemplates_003.ttcn | 22 ++ ...gSem_1503_GlobalAndLocalTemplates_004.ttcn | 22 ++ ...gSyn_1503_GlobalAndLocalTemplates_001.ttcn | 17 ++ ...gSyn_1503_GlobalAndLocalTemplates_002.ttcn | 21 ++ ...gSyn_1503_GlobalAndLocalTemplates_003.ttcn | 17 ++ ...gSyn_1503_GlobalAndLocalTemplates_004.ttcn | 21 ++ .../Sem_1503_GlobalAndLocalTemplates_001.ttcn | 41 +++ .../Sem_1503_GlobalAndLocalTemplates_002.ttcn | 41 +++ .../Sem_1503_GlobalAndLocalTemplates_003.ttcn | 40 +++ .../Sem_1503_GlobalAndLocalTemplates_004.ttcn | 40 +++ .../Sem_1503_GlobalAndLocalTemplates_005.ttcn | 46 ++++ .../Sem_1503_GlobalAndLocalTemplates_006.ttcn | 40 +++ .../Syn_1503_GlobalAndLocalTemplates_001.ttcn | 22 ++ .../Syn_1503_GlobalAndLocalTemplates_004.ttcn | 33 +++ .../Syn_1503_GlobalAndLocalTemplates_005.ttcn | 32 +++ .../Syn_1503_GlobalAndLocalTemplates_006.ttcn | 34 +++ .../Syn_1504_InlineTemplates_001.ttcn | 32 +++ .../Syn_1504_InlineTemplates_002.ttcn | 38 +++ .../Syn_1504_InlineTemplates_003.ttcn | 38 +++ .../NegSem_1505_ModifiedTemplates_001.ttcn | 19 ++ .../NegSem_1505_ModifiedTemplates_002.ttcn | 30 +++ .../NegSem_1505_ModifiedTemplates_003.ttcn | 36 +++ .../NegSem_1505_ModifiedTemplates_004.ttcn | 29 +++ .../NegSem_1505_ModifiedTemplates_005.ttcn | 29 +++ .../NegSem_1505_ModifiedTemplates_006.ttcn | 29 +++ .../NegSem_1505_ModifiedTemplates_007.ttcn | 29 +++ .../NegSyn_1505_ModifiedTemplates_001.ttcn | 36 +++ .../Sem_1505_ModifiedTemplates_001.ttcn | 49 ++++ .../Sem_1505_ModifiedTemplates_002.ttcn | 39 +++ .../Sem_1505_ModifiedTemplates_003.ttcn | 44 ++++ .../Sem_1505_ModifiedTemplates_004.ttcn | 43 ++++ .../Sem_1505_ModifiedTemplates_005.ttcn | 41 +++ .../Sem_1505_ModifiedTemplates_006.ttcn | 47 ++++ .../Sem_1505_ModifiedTemplates_007.ttcn | 51 ++++ .../Sem_1505_ModifiedTemplates_008.ttcn | 53 ++++ .../Sem_1505_ModifiedTemplates_009.ttcn | 38 +++ .../Sem_1505_ModifiedTemplates_010.ttcn | 37 +++ .../Syn_1505_ModifiedTemplates_001.ttcn | 26 ++ .../Syn_1505_ModifiedTemplates_002.ttcn | 32 +++ .../Syn_1505_ModifiedTemplates_003.ttcn | 27 ++ .../Syn_1505_ModifiedTemplates_004.ttcn | 26 ++ ...ferencingIndividualStringElements_001.ttcn | 30 +++ ...602_ReferencingRecordAndSetFields_001.ttcn | 40 +++ ...602_ReferencingRecordAndSetFields_002.ttcn | 41 +++ ...602_ReferencingRecordAndSetFields_003.ttcn | 59 +++++ ...602_ReferencingRecordAndSetFields_004.ttcn | 59 +++++ ...602_ReferencingRecordAndSetFields_005.ttcn | 32 +++ ...602_ReferencingRecordAndSetFields_006.ttcn | 37 +++ ...602_ReferencingRecordAndSetFields_001.ttcn | 54 ++++ ...602_ReferencingRecordAndSetFields_002.ttcn | 60 +++++ ...602_ReferencingRecordAndSetFields_003.ttcn | 54 ++++ ...602_ReferencingRecordAndSetFields_004.ttcn | 53 ++++ ...ReferencingRecordOfAndSetElements_001.ttcn | 30 +++ ...ReferencingRecordOfAndSetElements_002.ttcn | 31 +++ ...ReferencingRecordOfAndSetElements_003.ttcn | 30 +++ ...ReferencingRecordOfAndSetElements_004.ttcn | 28 ++ ...ReferencingRecordOfAndSetElements_005.ttcn | 28 ++ ...ReferencingRecordOfAndSetElements_006.ttcn | 28 ++ ...ReferencingRecordOfAndSetElements_007.ttcn | 28 ++ ...ReferencingRecordOfAndSetElements_008.ttcn | 28 ++ ...ReferencingRecordOfAndSetElements_009.ttcn | 28 ++ ...ReferencingRecordOfAndSetElements_010.ttcn | 42 +++ ...ReferencingRecordOfAndSetElements_011.ttcn | 41 +++ ...ReferencingRecordOfAndSetElements_012.ttcn | 41 +++ ...ReferencingRecordOfAndSetElements_013.ttcn | 40 +++ ...ReferencingRecordOfAndSetElements_014.ttcn | 30 +++ ...ReferencingRecordOfAndSetElements_015.ttcn | 32 +++ ...ReferencingRecordOfAndSetElements_001.ttcn | 35 +++ ...ReferencingRecordOfAndSetElements_002.ttcn | 40 +++ ...ReferencingRecordOfAndSetElements_003.ttcn | 41 +++ ...ReferencingRecordOfAndSetElements_004.ttcn | 34 +++ ...ReferencingRecordOfAndSetElements_005.ttcn | 35 +++ ...ReferencingRecordOfAndSetElements_006.ttcn | 38 +++ ...ReferencingRecordOfAndSetElements_007.ttcn | 46 ++++ .../NOTES | 1 + ...04_ReferencingSignatureParameters_001.ttcn | 49 ++++ ...04_ReferencingSignatureParameters_001.ttcn | 78 ++++++ ...05_Referencing_union_alternatives_001.ttcn | 53 ++++ ...05_Referencing_union_alternatives_002.ttcn | 52 ++++ ...05_Referencing_union_alternatives_003.ttcn | 54 ++++ ...05_Referencing_union_alternatives_004.ttcn | 54 ++++ ...05_Referencing_union_alternatives_005.ttcn | 50 ++++ ...05_Referencing_union_alternatives_006.ttcn | 52 ++++ ...05_Referencing_union_alternatives_001.ttcn | 59 +++++ ...05_Referencing_union_alternatives_002.ttcn | 60 +++++ ...05_Referencing_union_alternatives_003.ttcn | 59 +++++ ...05_Referencing_union_alternatives_004.ttcn | 64 +++++ .../1507_template_matching_mechanisms/README | 1 + .../1508_template_restrictions/NOTES | 1 + .../NegSem_1508_TemplateRestrictions_001.ttcn | 17 ++ .../NegSem_1508_TemplateRestrictions_002.ttcn | 17 ++ .../NegSem_1508_TemplateRestrictions_003.ttcn | 17 ++ .../NegSem_1508_TemplateRestrictions_004.ttcn | 17 ++ .../NegSem_1508_TemplateRestrictions_005.ttcn | 17 ++ .../NegSem_1508_TemplateRestrictions_006.ttcn | 18 ++ .../NegSem_1508_TemplateRestrictions_007.ttcn | 18 ++ .../NegSem_1508_TemplateRestrictions_008.ttcn | 18 ++ .../NegSem_1508_TemplateRestrictions_009.ttcn | 18 ++ .../NegSem_1508_TemplateRestrictions_010.ttcn | 18 ++ .../NegSem_1508_TemplateRestrictions_011.ttcn | 17 ++ .../NegSem_1508_TemplateRestrictions_012.ttcn | 17 ++ .../NegSem_1508_TemplateRestrictions_013.ttcn | 16 ++ .../NegSem_1508_TemplateRestrictions_014.ttcn | 17 ++ .../NegSem_1508_TemplateRestrictions_015.ttcn | 17 ++ .../NegSem_1508_TemplateRestrictions_016.ttcn | 17 ++ .../NegSem_1508_TemplateRestrictions_017.ttcn | 17 ++ .../NegSem_1508_TemplateRestrictions_018.ttcn | 17 ++ .../NegSem_1508_TemplateRestrictions_019.ttcn | 17 ++ .../NegSem_1508_TemplateRestrictions_020.ttcn | 18 ++ .../NegSem_1508_TemplateRestrictions_021.ttcn | 18 ++ .../NegSem_1508_TemplateRestrictions_022.ttcn | 18 ++ .../NegSem_1508_TemplateRestrictions_023.ttcn | 17 ++ .../NegSem_1508_TemplateRestrictions_024.ttcn | 17 ++ .../NegSem_1508_TemplateRestrictions_025.ttcn | 17 ++ .../NegSem_1508_TemplateRestrictions_026.ttcn | 17 ++ .../NegSem_1508_TemplateRestrictions_029.ttcn | 41 +++ .../NegSem_1508_TemplateRestrictions_030.ttcn | 41 +++ .../NegSem_1508_TemplateRestrictions_031.ttcn | 39 +++ .../NegSem_1508_TemplateRestrictions_032.ttcn | 43 ++++ .../NegSem_1508_TemplateRestrictions_033.ttcn | 43 ++++ .../NegSem_1508_TemplateRestrictions_034.ttcn | 40 +++ .../NegSem_1508_TemplateRestrictions_035.ttcn | 40 +++ .../NegSem_1508_TemplateRestrictions_036.ttcn | 38 +++ .../NegSem_1508_TemplateRestrictions_037.ttcn | 38 +++ .../NegSem_1508_TemplateRestrictions_038.ttcn | 38 +++ .../NegSem_1508_TemplateRestrictions_039.ttcn | 38 +++ .../NegSem_1508_TemplateRestrictions_040.ttcn | 38 +++ .../NegSem_1508_TemplateRestrictions_041.ttcn | 38 +++ .../NegSem_1508_TemplateRestrictions_042.ttcn | 38 +++ .../NegSem_1508_TemplateRestrictions_049.ttcn | 39 +++ .../NegSem_1508_TemplateRestrictions_050.ttcn | 60 +++++ .../NegSem_1508_TemplateRestrictions_051.ttcn | 59 +++++ .../Sem_1508_TemplateRestrictions_001.ttcn | 29 +++ .../Sem_1508_TemplateRestrictions_002.ttcn | 36 +++ .../Sem_1508_TemplateRestrictions_003.ttcn | 38 +++ .../Sem_1508_TemplateRestrictions_004.ttcn | 29 +++ .../Sem_1508_TemplateRestrictions_005.ttcn | 38 +++ .../Sem_1508_TemplateRestrictions_006.ttcn | 29 +++ .../Sem_1508_TemplateRestrictions_007.ttcn | 38 +++ .../Sem_1508_TemplateRestrictions_008.ttcn | 38 +++ .../Sem_1508_TemplateRestrictions_009.ttcn | 38 +++ .../Sem_1508_TemplateRestrictions_010.ttcn | 29 +++ .../Sem_1508_TemplateRestrictions_011.ttcn | 38 +++ .../Sem_1508_TemplateRestrictions_012.ttcn | 38 +++ .../Sem_1508_TemplateRestrictions_013.ttcn | 38 +++ .../Sem_1508_TemplateRestrictions_014.ttcn | 38 +++ .../Sem_1508_TemplateRestrictions_015.ttcn | 41 +++ .../Sem_1508_TemplateRestrictions_016.ttcn | 41 +++ .../Sem_1508_TemplateRestrictions_017.ttcn | 41 +++ .../Sem_1508_TemplateRestrictions_018.ttcn | 41 +++ .../Sem_1508_TemplateRestrictions_019.ttcn | 41 +++ .../Sem_1508_TemplateRestrictions_020.ttcn | 41 +++ .../Sem_1508_TemplateRestrictions_021.ttcn | 41 +++ .../Sem_1508_TemplateRestrictions_022.ttcn | 41 +++ .../Sem_1508_TemplateRestrictions_023.ttcn | 41 +++ .../Sem_1508_TemplateRestrictions_024.ttcn | 43 ++++ .../Sem_1508_TemplateRestrictions_025.ttcn | 43 ++++ .../Sem_1508_TemplateRestrictions_026.ttcn | 43 ++++ .../Sem_1508_TemplateRestrictions_027.ttcn | 45 ++++ .../Sem_1508_TemplateRestrictions_028.ttcn | 43 ++++ .../Sem_1508_TemplateRestrictions_029.ttcn | 43 ++++ .../Sem_1508_TemplateRestrictions_030.ttcn | 43 ++++ .../Sem_1508_TemplateRestrictions_031.ttcn | 53 ++++ .../Sem_1508_TemplateRestrictions_032.ttcn | 54 ++++ .../Sem_1508_TemplateRestrictions_033.ttcn | 53 ++++ .../Sem_1508_TemplateRestrictions_034.ttcn | 53 ++++ .../Sem_1508_TemplateRestrictions_035.ttcn | 53 ++++ .../Sem_1508_TemplateRestrictions_036.ttcn | 53 ++++ .../Sem_1508_TemplateRestrictions_043.ttcn | 38 +++ .../Sem_1508_TemplateRestrictions_044.ttcn | 38 +++ .../Sem_1508_TemplateRestrictions_045.ttcn | 38 +++ .../Sem_1508_TemplateRestrictions_046.ttcn | 38 +++ .../Sem_1508_TemplateRestrictions_047.ttcn | 38 +++ .../Sem_1508_TemplateRestrictions_048.ttcn | 38 +++ .../Sem_1508_TemplateRestrictions_049.ttcn | 59 +++++ .../Sem_1508_TemplateRestrictions_050.ttcn | 39 +++ .../Sem_1508_TemplateRestrictions_051.ttcn | 44 ++++ .../Syn_1508_TemplateRestrictions_001.ttcn | 17 ++ .../Syn_1508_TemplateRestrictions_002.ttcn | 17 ++ .../Syn_1508_TemplateRestrictions_003.ttcn | 17 ++ .../Syn_1508_TemplateRestrictions_004.ttcn | 17 ++ .../15_templates/1509_match_operation/NOTES | 1 + .../NegSem_1509_MatchOperation_001.ttcn | 27 ++ .../NegSem_1509_MatchOperation_002.ttcn | 32 +++ .../NegSem_1509_MatchOperation_003.ttcn | 31 +++ .../Sem_1509_MatchOperation_001.ttcn | 28 ++ .../Sem_1509_MatchOperation_002.ttcn | 28 ++ .../Sem_1509_MatchOperation_003.ttcn | 39 +++ .../Sem_1509_MatchOperation_004.ttcn | 39 +++ .../Sem_1509_MatchOperation_006.ttcn | 39 +++ .../Sem_1509_MatchOperation_007.ttcn | 39 +++ .../Sem_1509_MatchOperation_008.ttcn | 39 +++ .../Sem_1509_MatchOperation_010.ttcn | 39 +++ .../Sem_1509_MatchOperation_011.ttcn | 39 +++ .../Sem_1509_MatchOperation_012.ttcn | 30 +++ .../Sem_1509_MatchOperation_013.ttcn | 30 +++ .../Sem_1509_MatchOperation_014.ttcn | 31 +++ .../Sem_1509_MatchOperation_015.ttcn | 31 +++ .../Sem_1509_MatchOperation_016.ttcn | 31 +++ .../15_templates/1510_valueof_operation/NOTES | 1 + .../NegSem_1510_ValueOfOperation_001.ttcn | 25 ++ .../NegSem_1510_ValueOfOperation_002.ttcn | 34 +++ .../NegSem_1510_ValueOfOperation_003.ttcn | 33 +++ .../NegSem_1510_ValueOfOperation_004.ttcn | 26 ++ .../NegSem_1510_ValueOfOperation_005.ttcn | 29 +++ .../NegSem_1510_ValueOfOperation_006.ttcn | 35 +++ .../Sem_1510_ValueOfOperation_001.ttcn | 38 +++ ...tingTemplatesOfStringAndListTypes_001.ttcn | 24 ++ ...tingTemplatesOfStringAndListTypes_002.ttcn | 24 ++ ...tingTemplatesOfStringAndListTypes_003.ttcn | 24 ++ ...tingTemplatesOfStringAndListTypes_004.ttcn | 39 +++ ...tingTemplatesOfStringAndListTypes_005.ttcn | 39 +++ ...tingTemplatesOfStringAndListTypes_006.ttcn | 25 ++ ...tingTemplatesOfStringAndListTypes_001.ttcn | 26 ++ ...tingTemplatesOfStringAndListTypes_002.ttcn | 26 ++ ...tingTemplatesOfStringAndListTypes_003.ttcn | 27 ++ ...tingTemplatesOfStringAndListTypes_004.ttcn | 27 ++ ...tingTemplatesOfStringAndListTypes_005.ttcn | 27 ++ ...tingTemplatesOfStringAndListTypes_006.ttcn | 27 ++ ...tingTemplatesOfStringAndListTypes_007.ttcn | 30 +++ ...tingTemplatesOfStringAndListTypes_008.ttcn | 32 +++ ...tingTemplatesOfStringAndListTypes_009.ttcn | 30 +++ ...tingTemplatesOfStringAndListTypes_010.ttcn | 39 +++ ...tingTemplatesOfStringAndListTypes_011.ttcn | 26 ++ ...tingTemplatesOfStringAndListTypes_012.ttcn | 25 ++ ...tingTemplatesOfStringAndListTypes_013.ttcn | 26 ++ ...tingTemplatesOfStringAndListTypes_014.ttcn | 29 +++ ...tingTemplatesOfStringAndListTypes_015.ttcn | 33 +++ .../15_toplevel/NegSem_15_TopLevel_001.ttcn | 23 ++ .../15_toplevel/NegSem_15_TopLevel_002.ttcn | 25 ++ .../15_toplevel/NegSem_15_TopLevel_003.ttcn | 18 ++ .../15_toplevel/NegSem_15_TopLevel_004.ttcn | 20 ++ .../15_toplevel/NegSyn_15_TopLevel_001.ttcn | 22 ++ .../15_toplevel/Syn_15_TopLevel_001.ttcn | 18 ++ .../Sem_160101_invoking_functions_001.ttcn | 42 +++ .../160102_predefined_functions/NOTES | 3 + ...egSem_160102_predefined_functions_001.ttcn | 21 ++ ...egSem_160102_predefined_functions_002.ttcn | 21 ++ ...egSem_160102_predefined_functions_003.ttcn | 27 ++ ...egSem_160102_predefined_functions_004.ttcn | 27 ++ ...egSem_160102_predefined_functions_005.ttcn | 27 ++ ...egSem_160102_predefined_functions_006.ttcn | 27 ++ ...egSem_160102_predefined_functions_007.ttcn | 27 ++ ...egSem_160102_predefined_functions_008.ttcn | 27 ++ ...egSem_160102_predefined_functions_009.ttcn | 36 +++ ...egSem_160102_predefined_functions_010.ttcn | 29 +++ ...egSem_160102_predefined_functions_017.ttcn | 28 ++ ...egSem_160102_predefined_functions_018.ttcn | 28 ++ ...egSem_160102_predefined_functions_019.ttcn | 28 ++ ...egSem_160102_predefined_functions_021.ttcn | 27 ++ ...egSem_160102_predefined_functions_022.ttcn | 27 ++ ...egSem_160102_predefined_functions_023.ttcn | 27 ++ ...egSem_160102_predefined_functions_024.ttcn | 27 ++ ...egSem_160102_predefined_functions_025.ttcn | 27 ++ ...egSem_160102_predefined_functions_026.ttcn | 27 ++ ...egSem_160102_predefined_functions_027.ttcn | 27 ++ ...egSem_160102_predefined_functions_028.ttcn | 49 ++++ ...egSem_160102_predefined_functions_029.ttcn | 49 ++++ ...egSem_160102_predefined_functions_030.ttcn | 50 ++++ ...egSem_160102_predefined_functions_031.ttcn | 33 +++ ...egSem_160102_predefined_functions_032.ttcn | 32 +++ ...egSem_160102_predefined_functions_033.ttcn | 31 +++ ...egSem_160102_predefined_functions_034.ttcn | 35 +++ ...egSem_160102_predefined_functions_036.ttcn | 37 +++ ...egSem_160102_predefined_functions_037.ttcn | 39 +++ ...egSem_160102_predefined_functions_038.ttcn | 40 +++ ...egSem_160102_predefined_functions_039.ttcn | 34 +++ ...egSem_160102_predefined_functions_040.ttcn | 34 +++ .../Sem_160102_predefined_functions_001.ttcn | 69 +++++ .../Sem_160102_predefined_functions_002.ttcn | 78 ++++++ .../Sem_160102_predefined_functions_003.ttcn | 63 +++++ .../Sem_160102_predefined_functions_004.ttcn | 36 +++ .../Sem_160102_predefined_functions_005.ttcn | 49 ++++ .../Sem_160102_predefined_functions_006.ttcn | 27 ++ .../Sem_160102_predefined_functions_007.ttcn | 82 ++++++ .../Sem_160102_predefined_functions_008.ttcn | 41 +++ .../Sem_160102_predefined_functions_009.ttcn | 41 +++ .../Sem_160102_predefined_functions_010.ttcn | 44 ++++ .../Sem_160102_predefined_functions_011.ttcn | 84 ++++++ .../Sem_160102_predefined_functions_012.ttcn | 43 ++++ .../Sem_160102_predefined_functions_013.ttcn | 45 ++++ .../Sem_160102_predefined_functions_014.ttcn | 36 +++ .../Sem_160102_predefined_functions_015.ttcn | 39 +++ .../Sem_160102_predefined_functions_016.ttcn | 34 +++ .../Sem_160102_predefined_functions_017.ttcn | 42 +++ .../Sem_160102_predefined_functions_018.ttcn | 43 ++++ .../Sem_160102_predefined_functions_019.ttcn | 41 +++ .../Sem_160102_predefined_functions_020.ttcn | 42 +++ .../Sem_160102_predefined_functions_021.ttcn | 43 ++++ .../Sem_160102_predefined_functions_022.ttcn | 33 +++ .../Sem_160102_predefined_functions_023.ttcn | 33 +++ .../Sem_160102_predefined_functions_024.ttcn | 32 +++ .../Sem_160102_predefined_functions_025.ttcn | 32 +++ .../Sem_160102_predefined_functions_026.ttcn | 41 +++ .../Sem_160102_predefined_functions_027.ttcn | 41 +++ .../Sem_160102_predefined_functions_028.ttcn | 40 +++ .../Sem_160102_predefined_functions_029.ttcn | 40 +++ .../Sem_160102_predefined_functions_030.ttcn | 40 +++ .../Sem_160102_predefined_functions_031.ttcn | 40 +++ .../Sem_160102_predefined_functions_032.ttcn | 40 +++ .../Sem_160102_predefined_functions_033.ttcn | 40 +++ .../Sem_160102_predefined_functions_034.ttcn | 40 +++ .../Sem_160102_predefined_functions_035.ttcn | 40 +++ .../Sem_160102_predefined_functions_036.ttcn | 40 +++ .../Sem_160102_predefined_functions_037.ttcn | 40 +++ .../Sem_160102_predefined_functions_038.ttcn | 40 +++ .../Sem_160102_predefined_functions_039.ttcn | 40 +++ .../Sem_160102_predefined_functions_040.ttcn | 40 +++ .../Sem_160102_predefined_functions_041.ttcn | 40 +++ .../Sem_160102_predefined_functions_042.ttcn | 35 +++ .../Sem_160102_predefined_functions_043.ttcn | 32 +++ .../Sem_160102_predefined_functions_044.ttcn | 32 +++ .../Sem_160102_predefined_functions_045.ttcn | 33 +++ .../Sem_160102_predefined_functions_046.ttcn | 38 +++ .../Sem_160102_predefined_functions_047.ttcn | 36 +++ .../Sem_160102_predefined_functions_048.ttcn | 34 +++ .../Sem_160102_predefined_functions_049.ttcn | 35 +++ .../Sem_160102_predefined_functions_050.ttcn | 34 +++ .../Sem_160102_predefined_functions_051.ttcn | 34 +++ .../Sem_160102_predefined_functions_052.ttcn | 34 +++ .../Sem_160102_predefined_functions_053.ttcn | 30 +++ .../Sem_160102_predefined_functions_054.ttcn | 31 +++ .../Sem_160102_predefined_functions_055.ttcn | 31 +++ .../Sem_160102_predefined_functions_056.ttcn | 32 +++ .../Sem_160102_predefined_functions_057.ttcn | 33 +++ .../Sem_160102_predefined_functions_058.ttcn | 33 +++ .../Sem_160102_predefined_functions_059.ttcn | 33 +++ .../Sem_160102_predefined_functions_060.ttcn | 33 +++ .../Sem_160102_predefined_functions_061.ttcn | 33 +++ .../Sem_160102_predefined_functions_062.ttcn | 30 +++ .../Sem_160102_predefined_functions_063.ttcn | 40 +++ .../Sem_160102_predefined_functions_064.ttcn | 41 +++ .../Sem_160102_predefined_functions_065.ttcn | 40 +++ .../Sem_160102_predefined_functions_066.ttcn | 38 +++ .../Sem_160102_predefined_functions_067.ttcn | 38 +++ .../Sem_160102_predefined_functions_068.ttcn | 38 +++ .../Sem_160102_predefined_functions_069.ttcn | 38 +++ .../Sem_160102_predefined_functions_070.ttcn | 46 ++++ .../Sem_160102_predefined_functions_071.ttcn | 48 ++++ .../Sem_160102_predefined_functions_072.ttcn | 46 ++++ .../Sem_160102_predefined_functions_073.ttcn | 47 ++++ .../Sem_160102_predefined_functions_074.ttcn | 43 ++++ .../Sem_160102_predefined_functions_075.ttcn | 47 ++++ .../Sem_160102_predefined_functions_076.ttcn | 43 ++++ .../Sem_160102_predefined_functions_077.ttcn | 46 ++++ .../Sem_160102_predefined_functions_078.ttcn | 46 ++++ .../Sem_160102_predefined_functions_079.ttcn | 46 ++++ .../Sem_160102_predefined_functions_080.ttcn | 43 ++++ .../Sem_160102_predefined_functions_081.ttcn | 36 +++ .../Sem_160102_predefined_functions_082.ttcn | 40 +++ .../Sem_160102_predefined_functions_083.ttcn | 39 +++ .../Sem_160102_predefined_functions_084.ttcn | 39 +++ .../Sem_160102_predefined_functions_085.ttcn | 41 +++ .../Sem_160102_predefined_functions_086.ttcn | 38 +++ .../Sem_160102_predefined_functions_087.ttcn | 39 +++ .../Sem_160102_predefined_functions_088.ttcn | 47 ++++ .../Sem_160102_predefined_functions_089.ttcn | 47 ++++ .../Sem_160102_predefined_functions_090.ttcn | 42 +++ .../Sem_160102_predefined_functions_091.ttcn | 54 ++++ .../Sem_160102_predefined_functions_092.ttcn | 39 +++ .../Sem_160102_predefined_functions_093.ttcn | 35 +++ .../Sem_160102_predefined_functions_094.ttcn | 34 +++ .../Sem_160102_predefined_functions_095.ttcn | 36 +++ .../Sem_160102_predefined_functions_096.ttcn | 38 +++ .../Sem_160102_predefined_functions_097.ttcn | 32 +++ .../Sem_160102_predefined_functions_098.ttcn | 33 +++ .../Sem_160102_predefined_functions_099.ttcn | 39 +++ .../Sem_160102_predefined_functions_100.ttcn | 45 ++++ .../Sem_160102_predefined_functions_101.ttcn | 34 +++ .../Sem_160102_predefined_functions_102.ttcn | 33 +++ .../Sem_160102_predefined_functions_103.ttcn | 35 +++ .../Sem_160102_predefined_functions_104.ttcn | 34 +++ .../Sem_160102_predefined_functions_105.ttcn | 34 +++ .../Sem_160102_predefined_functions_106.ttcn | 33 +++ .../Sem_160102_predefined_functions_107.ttcn | 35 +++ .../Sem_160102_predefined_functions_108.ttcn | 34 +++ .../NegSem_160103_external_functions_001.ttcn | 23 ++ .../Sem_160103_external_functions_001.ttcn | 36 +++ .../Sem_160103_external_functions_002.ttcn | 42 +++ ...ng_functions_from_specific_places_001.ttcn | 45 ++++ ...ng_functions_from_specific_places_002.ttcn | 43 ++++ ...ng_functions_from_specific_places_003.ttcn | 39 +++ ...ng_functions_from_specific_places_004.ttcn | 45 ++++ ...ng_functions_from_specific_places_005.ttcn | 43 ++++ ...ng_functions_from_specific_places_006.ttcn | 48 ++++ ...ng_functions_from_specific_places_007.ttcn | 51 ++++ ...ng_functions_from_specific_places_008.ttcn | 51 ++++ ...ng_functions_from_specific_places_009.ttcn | 51 ++++ ...ng_functions_from_specific_places_010.ttcn | 51 ++++ ...ng_functions_from_specific_places_011.ttcn | 48 ++++ ...ng_functions_from_specific_places_012.ttcn | 48 ++++ ...ng_functions_from_specific_places_013.ttcn | 48 ++++ ...ng_functions_from_specific_places_014.ttcn | 48 ++++ ...ng_functions_from_specific_places_015.ttcn | 48 ++++ ...ng_functions_from_specific_places_016.ttcn | 48 ++++ ...ng_functions_from_specific_places_017.ttcn | 43 ++++ ...ng_functions_from_specific_places_018.ttcn | 43 ++++ ...ng_functions_from_specific_places_019.ttcn | 44 ++++ ...ng_functions_from_specific_places_020.ttcn | 44 ++++ ...ng_functions_from_specific_places_021.ttcn | 52 ++++ ...ng_functions_from_specific_places_022.ttcn | 57 +++++ ...ng_functions_from_specific_places_023.ttcn | 58 +++++ ...ng_functions_from_specific_places_024.ttcn | 59 +++++ ...ng_functions_from_specific_places_025.ttcn | 58 +++++ ...ng_functions_from_specific_places_026.ttcn | 59 +++++ ...ng_functions_from_specific_places_027.ttcn | 43 ++++ ...ng_functions_from_specific_places_028.ttcn | 43 ++++ ...ng_functions_from_specific_places_029.ttcn | 43 ++++ ...ng_functions_from_specific_places_030.ttcn | 44 ++++ ...ng_functions_from_specific_places_031.ttcn | 45 ++++ ...ng_functions_from_specific_places_032.ttcn | 42 +++ ...ng_functions_from_specific_places_033.ttcn | 43 ++++ ...ng_functions_from_specific_places_034.ttcn | 44 ++++ ...ng_functions_from_specific_places_035.ttcn | 44 ++++ ...ng_functions_from_specific_places_036.ttcn | 44 ++++ ...ng_functions_from_specific_places_037.ttcn | 44 ++++ ...ng_functions_from_specific_places_038.ttcn | 50 ++++ ...ng_functions_from_specific_places_039.ttcn | 42 +++ ...ng_functions_from_specific_places_040.ttcn | 44 ++++ ...ng_functions_from_specific_places_041.ttcn | 48 ++++ ...ng_functions_from_specific_places_042.ttcn | 48 ++++ ...ng_functions_from_specific_places_043.ttcn | 41 +++ ...ng_functions_from_specific_places_044.ttcn | 46 ++++ ...ng_functions_from_specific_places_045.ttcn | 47 ++++ ...ng_functions_from_specific_places_046.ttcn | 47 ++++ ...ng_functions_from_specific_places_047.ttcn | 52 ++++ ...ng_functions_from_specific_places_048.ttcn | 55 ++++ ...ng_functions_from_specific_places_049.ttcn | 55 ++++ ...ng_functions_from_specific_places_050.ttcn | 55 ++++ ...ng_functions_from_specific_places_051.ttcn | 55 ++++ ...ng_functions_from_specific_places_052.ttcn | 52 ++++ ...ng_functions_from_specific_places_053.ttcn | 52 ++++ ...ng_functions_from_specific_places_054.ttcn | 52 ++++ ...ng_functions_from_specific_places_055.ttcn | 52 ++++ ...ng_functions_from_specific_places_056.ttcn | 52 ++++ ...ng_functions_from_specific_places_057.ttcn | 52 ++++ ...ng_functions_from_specific_places_058.ttcn | 47 ++++ ...ng_functions_from_specific_places_059.ttcn | 47 ++++ ...ng_functions_from_specific_places_060.ttcn | 48 ++++ ...ng_functions_from_specific_places_061.ttcn | 48 ++++ ...ng_functions_from_specific_places_062.ttcn | 56 ++++ ...ng_functions_from_specific_places_063.ttcn | 61 +++++ ...ng_functions_from_specific_places_064.ttcn | 62 +++++ ...ng_functions_from_specific_places_065.ttcn | 63 +++++ ...ng_functions_from_specific_places_066.ttcn | 62 +++++ ...ng_functions_from_specific_places_067.ttcn | 63 +++++ ...ng_functions_from_specific_places_068.ttcn | 47 ++++ ...ng_functions_from_specific_places_069.ttcn | 47 ++++ ...ng_functions_from_specific_places_070.ttcn | 47 ++++ ...ng_functions_from_specific_places_071.ttcn | 48 ++++ ...ng_functions_from_specific_places_072.ttcn | 49 ++++ ...ng_functions_from_specific_places_073.ttcn | 46 ++++ ...ng_functions_from_specific_places_074.ttcn | 47 ++++ ...ng_functions_from_specific_places_075.ttcn | 48 ++++ ...ng_functions_from_specific_places_076.ttcn | 48 ++++ ...ng_functions_from_specific_places_077.ttcn | 48 ++++ ...ng_functions_from_specific_places_078.ttcn | 48 ++++ ...ng_functions_from_specific_places_079.ttcn | 54 ++++ ...ng_functions_from_specific_places_080.ttcn | 46 ++++ ...ng_functions_from_specific_places_081.ttcn | 48 ++++ ...ng_functions_from_specific_places_082.ttcn | 52 ++++ ...ng_functions_from_specific_places_083.ttcn | 52 ++++ ...ng_functions_from_specific_places_084.ttcn | 45 ++++ ...ng_functions_from_specific_places_085.ttcn | 50 ++++ ...ng_functions_from_specific_places_086.ttcn | 51 ++++ ...ng_functions_from_specific_places_087.ttcn | 46 ++++ ...ng_functions_from_specific_places_088.ttcn | 51 ++++ ...ng_functions_from_specific_places_089.ttcn | 54 ++++ ...ng_functions_from_specific_places_090.ttcn | 54 ++++ ...ng_functions_from_specific_places_091.ttcn | 54 ++++ ...ng_functions_from_specific_places_092.ttcn | 54 ++++ ...ng_functions_from_specific_places_093.ttcn | 51 ++++ ...ng_functions_from_specific_places_094.ttcn | 51 ++++ ...ng_functions_from_specific_places_095.ttcn | 51 ++++ ...ng_functions_from_specific_places_096.ttcn | 51 ++++ ...ng_functions_from_specific_places_097.ttcn | 51 ++++ ...ng_functions_from_specific_places_098.ttcn | 51 ++++ ...ng_functions_from_specific_places_099.ttcn | 46 ++++ ...ng_functions_from_specific_places_100.ttcn | 46 ++++ ...ng_functions_from_specific_places_101.ttcn | 47 ++++ ...ng_functions_from_specific_places_102.ttcn | 47 ++++ ...ng_functions_from_specific_places_103.ttcn | 55 ++++ ...ng_functions_from_specific_places_104.ttcn | 60 +++++ ...ng_functions_from_specific_places_105.ttcn | 61 +++++ ...ng_functions_from_specific_places_106.ttcn | 62 +++++ ...ng_functions_from_specific_places_107.ttcn | 61 +++++ ...ng_functions_from_specific_places_108.ttcn | 62 +++++ ...ng_functions_from_specific_places_109.ttcn | 46 ++++ ...ng_functions_from_specific_places_110.ttcn | 46 ++++ ...ng_functions_from_specific_places_111.ttcn | 46 ++++ ...ng_functions_from_specific_places_112.ttcn | 47 ++++ ...ng_functions_from_specific_places_113.ttcn | 48 ++++ ...ng_functions_from_specific_places_114.ttcn | 45 ++++ ...ng_functions_from_specific_places_115.ttcn | 46 ++++ ...ng_functions_from_specific_places_116.ttcn | 47 ++++ ...ng_functions_from_specific_places_117.ttcn | 47 ++++ ...ng_functions_from_specific_places_118.ttcn | 47 ++++ ...ng_functions_from_specific_places_119.ttcn | 47 ++++ ...ng_functions_from_specific_places_120.ttcn | 53 ++++ ...ng_functions_from_specific_places_121.ttcn | 45 ++++ ...ng_functions_from_specific_places_122.ttcn | 47 ++++ ...ng_functions_from_specific_places_123.ttcn | 51 ++++ ...ng_functions_from_specific_places_124.ttcn | 52 ++++ ...ng_functions_from_specific_places_125.ttcn | 44 ++++ ...ng_functions_from_specific_places_126.ttcn | 49 ++++ ...ng_functions_from_specific_places_127.ttcn | 50 ++++ ...ng_functions_from_specific_places_128.ttcn | 47 ++++ ...ng_functions_from_specific_places_129.ttcn | 47 ++++ ...ng_functions_from_specific_places_130.ttcn | 50 ++++ ...ng_functions_from_specific_places_131.ttcn | 55 ++++ ...ng_functions_from_specific_places_132.ttcn | 58 +++++ ...ng_functions_from_specific_places_133.ttcn | 58 +++++ ...ng_functions_from_specific_places_134.ttcn | 58 +++++ ...ng_functions_from_specific_places_135.ttcn | 58 +++++ ...ng_functions_from_specific_places_136.ttcn | 55 ++++ ...ng_functions_from_specific_places_137.ttcn | 55 ++++ ...ng_functions_from_specific_places_138.ttcn | 55 ++++ ...ng_functions_from_specific_places_139.ttcn | 55 ++++ ...ng_functions_from_specific_places_140.ttcn | 55 ++++ ...ng_functions_from_specific_places_141.ttcn | 55 ++++ ...ng_functions_from_specific_places_142.ttcn | 50 ++++ ...ng_functions_from_specific_places_143.ttcn | 50 ++++ ...ng_functions_from_specific_places_144.ttcn | 51 ++++ ...ng_functions_from_specific_places_145.ttcn | 51 ++++ ...ng_functions_from_specific_places_146.ttcn | 59 +++++ ...ng_functions_from_specific_places_147.ttcn | 64 +++++ ...ng_functions_from_specific_places_148.ttcn | 65 +++++ ...ng_functions_from_specific_places_149.ttcn | 66 +++++ ...ng_functions_from_specific_places_150.ttcn | 65 +++++ ...ng_functions_from_specific_places_151.ttcn | 66 +++++ ...ng_functions_from_specific_places_152.ttcn | 50 ++++ ...ng_functions_from_specific_places_153.ttcn | 50 ++++ ...ng_functions_from_specific_places_154.ttcn | 50 ++++ ...ng_functions_from_specific_places_155.ttcn | 51 ++++ ...ng_functions_from_specific_places_156.ttcn | 52 ++++ ...ng_functions_from_specific_places_157.ttcn | 49 ++++ ...ng_functions_from_specific_places_158.ttcn | 50 ++++ ...ng_functions_from_specific_places_159.ttcn | 51 ++++ ...ng_functions_from_specific_places_160.ttcn | 51 ++++ ...ng_functions_from_specific_places_161.ttcn | 51 ++++ ...ng_functions_from_specific_places_162.ttcn | 51 ++++ ...ng_functions_from_specific_places_163.ttcn | 57 +++++ ...ng_functions_from_specific_places_164.ttcn | 49 ++++ ...ng_functions_from_specific_places_165.ttcn | 51 ++++ ...ng_functions_from_specific_places_166.ttcn | 55 ++++ ...ng_functions_from_specific_places_167.ttcn | 56 ++++ ...ng_functions_from_specific_places_168.ttcn | 48 ++++ ...ng_functions_from_specific_places_169.ttcn | 53 ++++ ...ng_functions_from_specific_places_170.ttcn | 54 ++++ ...ng_functions_from_specific_places_171.ttcn | 51 ++++ ...ng_functions_from_specific_places_172.ttcn | 51 ++++ ...ng_functions_from_specific_places_173.ttcn | 44 ++++ ...ng_functions_from_specific_places_174.ttcn | 49 ++++ ...ng_functions_from_specific_places_175.ttcn | 52 ++++ ...ng_functions_from_specific_places_176.ttcn | 52 ++++ ...ng_functions_from_specific_places_177.ttcn | 52 ++++ ...ng_functions_from_specific_places_178.ttcn | 52 ++++ ...ng_functions_from_specific_places_179.ttcn | 49 ++++ ...ng_functions_from_specific_places_180.ttcn | 49 ++++ ...ng_functions_from_specific_places_181.ttcn | 47 ++++ ...ng_functions_from_specific_places_182.ttcn | 47 ++++ ...ng_functions_from_specific_places_183.ttcn | 47 ++++ ...ng_functions_from_specific_places_184.ttcn | 47 ++++ ...ng_functions_from_specific_places_185.ttcn | 44 ++++ ...ng_functions_from_specific_places_186.ttcn | 44 ++++ ...ng_functions_from_specific_places_187.ttcn | 45 ++++ ...ng_functions_from_specific_places_188.ttcn | 45 ++++ ...ng_functions_from_specific_places_189.ttcn | 53 ++++ ...ng_functions_from_specific_places_190.ttcn | 58 +++++ ...ng_functions_from_specific_places_191.ttcn | 59 +++++ ...ng_functions_from_specific_places_192.ttcn | 60 +++++ ...ng_functions_from_specific_places_193.ttcn | 59 +++++ ...ng_functions_from_specific_places_194.ttcn | 60 +++++ ...ng_functions_from_specific_places_195.ttcn | 44 ++++ ...ng_functions_from_specific_places_196.ttcn | 44 ++++ ...ng_functions_from_specific_places_197.ttcn | 44 ++++ ...ng_functions_from_specific_places_198.ttcn | 45 ++++ ...ng_functions_from_specific_places_199.ttcn | 46 ++++ ...ng_functions_from_specific_places_200.ttcn | 43 ++++ ...ng_functions_from_specific_places_201.ttcn | 44 ++++ ...ng_functions_from_specific_places_202.ttcn | 45 ++++ ...ng_functions_from_specific_places_203.ttcn | 45 ++++ ...ng_functions_from_specific_places_204.ttcn | 45 ++++ ...ng_functions_from_specific_places_205.ttcn | 45 ++++ ...ng_functions_from_specific_places_206.ttcn | 45 ++++ ...ng_functions_from_specific_places_207.ttcn | 49 ++++ ...ng_functions_from_specific_places_208.ttcn | 49 ++++ ...ng_functions_from_specific_places_209.ttcn | 47 ++++ ...ng_functions_from_specific_places_210.ttcn | 48 ++++ ...ng_functions_from_specific_places_211.ttcn | 44 ++++ ...ng_functions_from_specific_places_212.ttcn | 46 ++++ ...ng_functions_from_specific_places_213.ttcn | 51 ++++ ...ng_functions_from_specific_places_214.ttcn | 54 ++++ ...ng_functions_from_specific_places_215.ttcn | 54 ++++ ...ng_functions_from_specific_places_216.ttcn | 54 ++++ ...ng_functions_from_specific_places_217.ttcn | 54 ++++ ...ng_functions_from_specific_places_218.ttcn | 51 ++++ ...ng_functions_from_specific_places_219.ttcn | 51 ++++ ...ng_functions_from_specific_places_220.ttcn | 51 ++++ ...ng_functions_from_specific_places_221.ttcn | 51 ++++ ...ng_functions_from_specific_places_222.ttcn | 51 ++++ ...ng_functions_from_specific_places_223.ttcn | 51 ++++ ...ng_functions_from_specific_places_224.ttcn | 46 ++++ ...ng_functions_from_specific_places_225.ttcn | 46 ++++ ...ng_functions_from_specific_places_226.ttcn | 47 ++++ ...ng_functions_from_specific_places_227.ttcn | 47 ++++ ...ng_functions_from_specific_places_228.ttcn | 55 ++++ ...ng_functions_from_specific_places_229.ttcn | 60 +++++ ...ng_functions_from_specific_places_230.ttcn | 61 +++++ ...ng_functions_from_specific_places_231.ttcn | 62 +++++ ...ng_functions_from_specific_places_232.ttcn | 61 +++++ ...ng_functions_from_specific_places_233.ttcn | 62 +++++ ...ng_functions_from_specific_places_234.ttcn | 46 ++++ ...ng_functions_from_specific_places_235.ttcn | 46 ++++ ...ng_functions_from_specific_places_236.ttcn | 46 ++++ ...ng_functions_from_specific_places_237.ttcn | 47 ++++ ...ng_functions_from_specific_places_238.ttcn | 48 ++++ ...ng_functions_from_specific_places_239.ttcn | 45 ++++ ...ng_functions_from_specific_places_240.ttcn | 46 ++++ ...ng_functions_from_specific_places_241.ttcn | 47 ++++ ...ng_functions_from_specific_places_242.ttcn | 47 ++++ ...ng_functions_from_specific_places_243.ttcn | 47 ++++ ...ng_functions_from_specific_places_244.ttcn | 47 ++++ ...ng_functions_from_specific_places_245.ttcn | 53 ++++ ...ng_functions_from_specific_places_246.ttcn | 45 ++++ ...ng_functions_from_specific_places_247.ttcn | 47 ++++ ...ng_functions_from_specific_places_248.ttcn | 51 ++++ ...ng_functions_from_specific_places_249.ttcn | 51 ++++ ...ng_functions_from_specific_places_250.ttcn | 44 ++++ ...ng_functions_from_specific_places_251.ttcn | 49 ++++ ...ng_functions_from_specific_places_252.ttcn | 50 ++++ ...ng_functions_from_specific_places_253.ttcn | 46 ++++ ...ng_functions_from_specific_places_254.ttcn | 46 ++++ ...ng_functions_from_specific_places_255.ttcn | 47 ++++ ...ng_functions_from_specific_places_256.ttcn | 52 ++++ ...ng_functions_from_specific_places_257.ttcn | 55 ++++ ...ng_functions_from_specific_places_258.ttcn | 55 ++++ ...ng_functions_from_specific_places_259.ttcn | 55 ++++ ...ng_functions_from_specific_places_260.ttcn | 55 ++++ ...ng_functions_from_specific_places_261.ttcn | 52 ++++ ...ng_functions_from_specific_places_262.ttcn | 52 ++++ ...ng_functions_from_specific_places_263.ttcn | 52 ++++ ...ng_functions_from_specific_places_264.ttcn | 52 ++++ ...ng_functions_from_specific_places_265.ttcn | 52 ++++ ...ng_functions_from_specific_places_266.ttcn | 52 ++++ ...ng_functions_from_specific_places_267.ttcn | 47 ++++ ...ng_functions_from_specific_places_268.ttcn | 47 ++++ ...ng_functions_from_specific_places_269.ttcn | 48 ++++ ...ng_functions_from_specific_places_270.ttcn | 48 ++++ ...ng_functions_from_specific_places_271.ttcn | 56 ++++ ...ng_functions_from_specific_places_272.ttcn | 61 +++++ ...ng_functions_from_specific_places_273.ttcn | 62 +++++ ...ng_functions_from_specific_places_274.ttcn | 63 +++++ ...ng_functions_from_specific_places_275.ttcn | 62 +++++ ...ng_functions_from_specific_places_276.ttcn | 63 +++++ ...ng_functions_from_specific_places_277.ttcn | 47 ++++ ...ng_functions_from_specific_places_278.ttcn | 47 ++++ ...ng_functions_from_specific_places_279.ttcn | 47 ++++ ...ng_functions_from_specific_places_280.ttcn | 48 ++++ ...ng_functions_from_specific_places_281.ttcn | 49 ++++ ...ng_functions_from_specific_places_282.ttcn | 46 ++++ ...ng_functions_from_specific_places_283.ttcn | 47 ++++ ...ng_functions_from_specific_places_284.ttcn | 48 ++++ ...ng_functions_from_specific_places_285.ttcn | 48 ++++ ...ng_functions_from_specific_places_286.ttcn | 48 ++++ ...ng_functions_from_specific_places_287.ttcn | 48 ++++ ...ng_functions_from_specific_places_288.ttcn | 54 ++++ ...ng_functions_from_specific_places_289.ttcn | 46 ++++ ...ng_functions_from_specific_places_290.ttcn | 48 ++++ ...ng_functions_from_specific_places_291.ttcn | 52 ++++ ...ng_functions_from_specific_places_292.ttcn | 52 ++++ ...ng_functions_from_specific_places_293.ttcn | 45 ++++ ...ng_functions_from_specific_places_294.ttcn | 50 ++++ ...ng_functions_from_specific_places_295.ttcn | 51 ++++ ...ng_functions_from_specific_places_296.ttcn | 47 ++++ ...ng_functions_from_specific_places_297.ttcn | 47 ++++ ...ng_functions_from_specific_places_298.ttcn | 46 ++++ ...ng_functions_from_specific_places_299.ttcn | 44 ++++ ...ng_functions_from_specific_places_300.ttcn | 46 ++++ ...ng_functions_from_specific_places_301.ttcn | 42 +++ ...ng_functions_from_specific_places_302.ttcn | 50 ++++ ...ng_functions_from_specific_places_303.ttcn | 48 ++++ ...ng_functions_from_specific_places_304.ttcn | 50 ++++ ...ng_functions_from_specific_places_305.ttcn | 46 ++++ ...ng_functions_from_specific_places_306.ttcn | 49 ++++ ...ng_functions_from_specific_places_307.ttcn | 47 ++++ ...ng_functions_from_specific_places_308.ttcn | 49 ++++ ...ng_functions_from_specific_places_309.ttcn | 45 ++++ ...ng_functions_from_specific_places_310.ttcn | 53 ++++ ...ng_functions_from_specific_places_311.ttcn | 51 ++++ ...ng_functions_from_specific_places_312.ttcn | 53 ++++ ...ng_functions_from_specific_places_313.ttcn | 49 ++++ ...ng_functions_from_specific_places_314.ttcn | 51 ++++ ...ng_functions_from_specific_places_315.ttcn | 45 ++++ ...ng_functions_from_specific_places_316.ttcn | 51 ++++ ...ng_functions_from_specific_places_317.ttcn | 43 ++++ ...ng_functions_from_specific_places_318.ttcn | 53 ++++ ...ng_functions_from_specific_places_319.ttcn | 47 ++++ ...ng_functions_from_specific_places_320.ttcn | 53 ++++ ...ng_functions_from_specific_places_321.ttcn | 45 ++++ ...ng_functions_from_specific_places_322.ttcn | 54 ++++ ...ng_functions_from_specific_places_323.ttcn | 48 ++++ ...ng_functions_from_specific_places_324.ttcn | 54 ++++ ...ng_functions_from_specific_places_325.ttcn | 46 ++++ .../NegSem_1601_toplevel_001.ttcn | 37 +++ .../NegSem_1601_toplevel_002.ttcn | 28 ++ .../NegSem_1601_toplevel_003.ttcn | 43 ++++ .../NegSem_1601_toplevel_004.ttcn | 37 +++ .../NegSem_1601_toplevel_005.ttcn | 40 +++ .../NegSem_1601_toplevel_006.ttcn | 43 ++++ .../1601_toplevel/Sem_1601_toplevel_001.ttcn | 37 +++ .../1601_toplevel/Sem_1601_toplevel_002.ttcn | 35 +++ .../1601_toplevel/Sem_1601_toplevel_003.ttcn | 43 ++++ .../NegSem_160201_invoking_altsteps_001.ttcn | 66 +++++ .../Sem_160201_invoking_altsteps_001.ttcn | 58 +++++ .../Sem_160201_invoking_altsteps_002.ttcn | 67 +++++ .../Sem_160201_invoking_altsteps_003.ttcn | 58 +++++ .../Sem_160201_invoking_altsteps_004.ttcn | 55 ++++ .../NegSem_1602_toplevel_001.ttcn | 58 +++++ .../NegSem_1602_toplevel_002.ttcn | 51 ++++ .../NegSem_1602_toplevel_003.ttcn | 56 ++++ .../NegSem_1602_toplevel_004.ttcn | 57 +++++ .../NegSem_1602_toplevel_005.ttcn | 50 ++++ .../NegSem_1602_toplevel_006.ttcn | 55 ++++ .../NegSem_1602_toplevel_007.ttcn | 40 +++ .../NegSem_1602_toplevel_008.ttcn | 47 ++++ .../NegSem_1602_toplevel_009.ttcn | 53 ++++ .../NegSem_1602_toplevel_010.ttcn | 56 ++++ .../NegSem_1602_toplevel_011.ttcn | 56 ++++ .../NegSem_1602_toplevel_012.ttcn | 56 ++++ .../NegSem_1602_toplevel_013.ttcn | 56 ++++ .../NegSem_1602_toplevel_014.ttcn | 53 ++++ .../NegSem_1602_toplevel_015.ttcn | 53 ++++ .../NegSem_1602_toplevel_016.ttcn | 49 ++++ .../NegSem_1602_toplevel_017.ttcn | 49 ++++ .../NegSem_1602_toplevel_018.ttcn | 49 ++++ .../NegSem_1602_toplevel_019.ttcn | 49 ++++ .../NegSem_1602_toplevel_020.ttcn | 47 ++++ .../NegSem_1602_toplevel_021.ttcn | 47 ++++ .../NegSem_1602_toplevel_022.ttcn | 48 ++++ .../NegSem_1602_toplevel_023.ttcn | 48 ++++ .../NegSem_1602_toplevel_024.ttcn | 56 ++++ .../NegSem_1602_toplevel_025.ttcn | 61 +++++ .../NegSem_1602_toplevel_026.ttcn | 62 +++++ .../NegSem_1602_toplevel_027.ttcn | 63 +++++ .../NegSem_1602_toplevel_028.ttcn | 62 +++++ .../NegSem_1602_toplevel_029.ttcn | 63 +++++ .../NegSem_1602_toplevel_030.ttcn | 47 ++++ .../NegSem_1602_toplevel_031.ttcn | 47 ++++ .../NegSem_1602_toplevel_032.ttcn | 47 ++++ .../NegSem_1602_toplevel_033.ttcn | 48 ++++ .../NegSem_1602_toplevel_034.ttcn | 49 ++++ .../NegSem_1602_toplevel_035.ttcn | 47 ++++ .../NegSem_1602_toplevel_036.ttcn | 48 ++++ .../NegSem_1602_toplevel_037.ttcn | 49 ++++ .../NegSem_1602_toplevel_038.ttcn | 49 ++++ .../NegSem_1602_toplevel_039.ttcn | 49 ++++ .../NegSem_1602_toplevel_040.ttcn | 49 ++++ .../NegSem_1602_toplevel_041.ttcn | 53 ++++ .../NegSem_1602_toplevel_042.ttcn | 47 ++++ .../NegSem_1602_toplevel_043.ttcn | 48 ++++ .../NegSem_1602_toplevel_044.ttcn | 52 ++++ .../NegSem_1602_toplevel_045.ttcn | 52 ++++ .../NegSem_1602_toplevel_046.ttcn | 47 ++++ .../NegSem_1602_toplevel_047.ttcn | 51 ++++ .../NegSem_1602_toplevel_048.ttcn | 52 ++++ .../NegSem_1602_toplevel_049.ttcn | 55 ++++ .../NegSem_1602_toplevel_050.ttcn | 53 ++++ .../NegSem_1602_toplevel_051.ttcn | 52 ++++ .../NegSem_1602_toplevel_052.ttcn | 47 ++++ .../NegSyn_1602_toplevel_001.ttcn | 57 +++++ .../1602_toplevel/Sem_1602_toplevel_001.ttcn | 56 ++++ .../1602_toplevel/Sem_1602_toplevel_002.ttcn | 40 +++ .../1602_toplevel/Sem_1602_toplevel_003.ttcn | 44 ++++ .../NegSem_1603_testcases_001.ttcn | 29 +++ .../NegSem_1603_testcases_002.ttcn | 29 +++ .../Syn_1603_testcases_001.ttcn | 24 ++ .../NOTES | 1 + .../NegSem_1901_assignments_001.ttcn | 26 ++ .../NegSem_1901_assignments_002.ttcn | 25 ++ .../NegSem_1901_assignments_003.ttcn | 25 ++ .../NegSem_1901_assignments_004.ttcn | 39 +++ .../NegSem_1901_assignments_005.ttcn | 36 +++ .../NegSem_1901_assignments_006.ttcn | 36 +++ .../NegSyn_1901_assignments_001.ttcn | 28 ++ .../Sem_1901_assignments_001.ttcn | 31 +++ .../Sem_1901_assignments_002.ttcn | 39 +++ .../Sem_1901_assignments_003.ttcn | 39 +++ .../Sem_1901_assignments_004.ttcn | 45 ++++ .../NegSyn_1902_if_else_statement_001.ttcn | 29 +++ .../Sem_1902_if_else_statement_001.ttcn | 36 +++ .../Sem_1902_if_else_statement_002.ttcn | 28 ++ ...gSem_190301_select_case_statement_001.ttcn | 44 ++++ ...gSem_190301_select_case_statement_002.ttcn | 44 ++++ .../Sem_190301_select_case_statement_001.ttcn | 38 +++ .../Sem_190301_select_case_statement_002.ttcn | 38 +++ .../Sem_190301_select_case_statement_003.ttcn | 36 +++ .../Sem_190301_select_case_statement_004.ttcn | 38 +++ .../Sem_190301_select_case_statement_005.ttcn | 38 +++ .../Sem_190301_select_case_statement_006.ttcn | 37 +++ ...Sem_190302_select_union_statement_001.ttcn | 39 +++ ...Sem_190302_select_union_statement_002.ttcn | 48 ++++ ...Sem_190302_select_union_statement_003.ttcn | 45 ++++ ...Sem_190302_select_union_statement_004.ttcn | 43 ++++ ...Sem_190302_select_union_statement_005.ttcn | 39 +++ ...Sem_190302_select_union_statement_006.ttcn | 41 +++ ...Sem_190302_select_union_statement_001.ttcn | 38 +++ ...Sem_190302_select_union_statement_002.ttcn | 39 +++ ...Sem_190302_select_union_statement_003.ttcn | 41 +++ ...Sem_190302_select_union_statement_004.ttcn | 40 +++ ...Sem_190302_select_union_statement_005.ttcn | 39 +++ ...Sem_190302_select_union_statement_006.ttcn | 42 +++ .../NegSem_1904_for_statement_001.ttcn | 28 ++ .../Sem_1904_for_statement_001.ttcn | 33 +++ .../Sem_1904_for_statement_002.ttcn | 32 +++ .../Sem_1904_for_statement_003.ttcn | 34 +++ .../NegSem_1905_while_statement_001.ttcn | 31 +++ .../Sem_1905_while_statement_001.ttcn | 32 +++ .../Sem_1905_while_statement_002.ttcn | 32 +++ .../Sem_1905_while_statement_003.ttcn | 36 +++ .../NegSem_1906_do_while_statement_001.ttcn | 31 +++ .../Sem_1906_do_while_statement_001.ttcn | 32 +++ .../Sem_1906_do_while_statement_002.ttcn | 32 +++ .../Sem_1906_do_while_statement_003.ttcn | 36 +++ .../NegSem_1907_label_statement_001.ttcn | 71 ++++++ .../NegSyn_1907_label_statement_001.ttcn | 72 ++++++ .../NegSyn_1907_label_statement_002.ttcn | 73 ++++++ .../Syn_1907_label_statement_001.ttcn | 71 ++++++ .../NegSem_1908_goto_statement_001.ttcn | 73 ++++++ .../NegSem_1908_goto_statement_002.ttcn | 30 +++ .../NegSem_1908_goto_statement_003.ttcn | 33 +++ .../Sem_1908_goto_statement_001.ttcn | 32 +++ .../Sem_1908_goto_statement_002.ttcn | 33 +++ .../Sem_1908_goto_statement_003.ttcn | 34 +++ .../Sem_1909_stop_statement_001.ttcn | 26 ++ .../Sem_1909_stop_statement_002.ttcn | 27 ++ .../Sem_1909_stop_statement_003.ttcn | 38 +++ .../Sem_1909_stop_statement_004.ttcn | 35 +++ .../1910_return_statement/NOTES | 2 + .../NegSem_1910_return_statement_001.ttcn | 26 ++ .../Sem_1910_return_statement_001.ttcn | 35 +++ .../Sem_1910_return_statement_002.ttcn | 35 +++ .../NegSem_1911_log_statement_001.ttcn | 33 +++ .../Sem_1911_log_statement_001.ttcn | 30 +++ .../Sem_1911_log_statement_002.ttcn | 28 ++ .../Sem_1911_log_statement_003.ttcn | 28 ++ .../Sem_1911_log_statement_004.ttcn | 34 +++ .../Sem_1911_log_statement_005.ttcn | 39 +++ .../1912_break_statement/NOTES | 2 + .../Sem_1913_continue_statement_001.ttcn | 33 +++ .../1914_statement_block/NOTES | 2 + .../2001_the_snapshot_mechanism/NOTES | 2 + .../2002_the_alt_statement/NOTES | 3 + .../NegSem_2002_TheAltStatement_001.ttcn | 43 ++++ .../NegSem_2002_TheAltStatement_002.ttcn | 39 +++ .../NegSem_2002_TheAltStatement_003.ttcn | 40 +++ .../NegSem_2002_TheAltStatement_004.ttcn | 39 +++ .../NegSem_2002_TheAltStatement_005.ttcn | 39 +++ .../NegSem_2002_TheAltStatement_006.ttcn | 44 ++++ .../NegSem_2002_TheAltStatement_007.ttcn | 38 +++ .../NegSem_2002_TheAltStatement_008.ttcn | 40 +++ .../NegSem_2002_TheAltStatement_009.ttcn | 38 +++ .../NegSem_2002_TheAltStatement_010.ttcn | 38 +++ .../NegSem_2002_TheAltStatement_011.ttcn | 43 ++++ .../NegSem_2002_TheAltStatement_012.ttcn | 40 +++ .../NegSem_2002_TheAltStatement_013.ttcn | 42 +++ .../NegSem_2002_TheAltStatement_014.ttcn | 40 +++ .../NegSem_2002_TheAltStatement_015.ttcn | 40 +++ .../NegSem_2002_TheAltStatement_016.ttcn | 45 ++++ .../NegSem_2002_TheAltStatement_017.ttcn | 44 ++++ .../NegSem_2002_TheAltStatement_018.ttcn | 49 ++++ .../NegSem_2002_TheAltStatement_019.ttcn | 52 ++++ .../NegSem_2002_TheAltStatement_020.ttcn | 52 ++++ .../NegSem_2002_TheAltStatement_021.ttcn | 52 ++++ .../NegSem_2002_TheAltStatement_022.ttcn | 52 ++++ .../NegSem_2002_TheAltStatement_023.ttcn | 49 ++++ .../NegSem_2002_TheAltStatement_024.ttcn | 49 ++++ .../NegSem_2002_TheAltStatement_025.ttcn | 46 ++++ .../NegSem_2002_TheAltStatement_026.ttcn | 46 ++++ .../NegSem_2002_TheAltStatement_027.ttcn | 46 ++++ .../NegSem_2002_TheAltStatement_028.ttcn | 46 ++++ .../NegSem_2002_TheAltStatement_029.ttcn | 44 ++++ .../NegSem_2002_TheAltStatement_030.ttcn | 44 ++++ .../NegSem_2002_TheAltStatement_031.ttcn | 45 ++++ .../NegSem_2002_TheAltStatement_032.ttcn | 45 ++++ .../NegSem_2002_TheAltStatement_033.ttcn | 53 ++++ .../NegSem_2002_TheAltStatement_034.ttcn | 58 +++++ .../NegSem_2002_TheAltStatement_035.ttcn | 59 +++++ .../NegSem_2002_TheAltStatement_036.ttcn | 60 +++++ .../NegSem_2002_TheAltStatement_037.ttcn | 59 +++++ .../NegSem_2002_TheAltStatement_038.ttcn | 60 +++++ .../NegSem_2002_TheAltStatement_039.ttcn | 44 ++++ .../NegSem_2002_TheAltStatement_040.ttcn | 44 ++++ .../NegSem_2002_TheAltStatement_041.ttcn | 44 ++++ .../NegSem_2002_TheAltStatement_042.ttcn | 45 ++++ .../NegSem_2002_TheAltStatement_043.ttcn | 46 ++++ .../NegSem_2002_TheAltStatement_044.ttcn | 44 ++++ .../NegSem_2002_TheAltStatement_045.ttcn | 45 ++++ .../NegSem_2002_TheAltStatement_046.ttcn | 46 ++++ .../NegSem_2002_TheAltStatement_047.ttcn | 46 ++++ .../NegSem_2002_TheAltStatement_048.ttcn | 46 ++++ .../NegSem_2002_TheAltStatement_049.ttcn | 46 ++++ .../NegSem_2002_TheAltStatement_050.ttcn | 50 ++++ .../NegSem_2002_TheAltStatement_051.ttcn | 44 ++++ .../NegSem_2002_TheAltStatement_052.ttcn | 45 ++++ .../NegSem_2002_TheAltStatement_053.ttcn | 49 ++++ .../NegSem_2002_TheAltStatement_054.ttcn | 49 ++++ .../NegSem_2002_TheAltStatement_055.ttcn | 44 ++++ .../NegSem_2002_TheAltStatement_056.ttcn | 48 ++++ .../NegSem_2002_TheAltStatement_057.ttcn | 49 ++++ .../NegSem_2002_TheAltStatement_058.ttcn | 45 ++++ .../NegSem_2002_TheAltStatement_059.ttcn | 45 ++++ .../NegSem_2002_TheAltStatement_060.ttcn | 40 +++ .../NegSem_2002_TheAltStatement_061.ttcn | 38 +++ .../NegSem_2002_TheAltStatement_062.ttcn | 40 +++ .../NegSem_2002_TheAltStatement_063.ttcn | 38 +++ .../NegSem_2002_TheAltStatement_064.ttcn | 42 +++ .../NegSem_2002_TheAltStatement_065.ttcn | 40 +++ .../NegSem_2002_TheAltStatement_066.ttcn | 39 +++ .../NegSem_2002_TheAltStatement_067.ttcn | 39 +++ .../NegSem_2002_TheAltStatement_068.ttcn | 39 +++ .../NegSem_2002_TheAltStatement_069.ttcn | 39 +++ .../NegSem_2002_TheAltStatement_070.ttcn | 41 +++ .../NegSem_2002_TheAltStatement_071.ttcn | 41 +++ .../NegSem_2002_TheAltStatement_072.ttcn | 44 ++++ .../NegSem_2002_TheAltStatement_073.ttcn | 40 +++ .../NegSem_2002_TheAltStatement_074.ttcn | 40 +++ .../NegSem_2002_TheAltStatement_075.ttcn | 40 +++ .../NegSem_2002_TheAltStatement_076.ttcn | 40 +++ .../NegSem_2002_TheAltStatement_077.ttcn | 42 +++ .../NegSem_2002_TheAltStatement_078.ttcn | 42 +++ .../NegSem_2002_TheAltStatement_079.ttcn | 45 ++++ .../NegSem_2002_TheAltStatement_080.ttcn | 43 ++++ .../NegSem_2002_TheAltStatement_081.ttcn | 43 ++++ .../NegSem_2002_TheAltStatement_082.ttcn | 43 ++++ .../NegSem_2002_TheAltStatement_083.ttcn | 43 ++++ .../NegSem_2002_TheAltStatement_084.ttcn | 45 ++++ .../NegSem_2002_TheAltStatement_085.ttcn | 45 ++++ .../NegSem_2002_TheAltStatement_086.ttcn | 48 ++++ .../NegSem_2002_TheAltStatement_087.ttcn | 52 ++++ .../NegSem_2002_TheAltStatement_088.ttcn | 50 ++++ .../NegSem_2002_TheAltStatement_089.ttcn | 49 ++++ .../NegSem_2002_TheAltStatement_090.ttcn | 44 ++++ .../Sem_2002_TheAltStatement_001.ttcn | 33 +++ .../Sem_2002_TheAltStatement_002.ttcn | 34 +++ .../Sem_2002_TheAltStatement_003.ttcn | 39 +++ .../Sem_2002_TheAltStatement_004.ttcn | 52 ++++ .../Sem_2002_TheAltStatement_005.ttcn | 44 ++++ .../Sem_2002_TheAltStatement_006.ttcn | 46 ++++ .../Sem_2002_TheAltStatement_007.ttcn | 52 ++++ .../Sem_2002_TheAltStatement_008.ttcn | 49 ++++ .../Sem_2002_TheAltStatement_009.ttcn | 49 ++++ .../Sem_2002_TheAltStatement_010.ttcn | 27 ++ .../Sem_2002_TheAltStatement_011.ttcn | 33 +++ .../Sem_2002_TheAltStatement_012.ttcn | 52 ++++ .../Sem_2002_TheAltStatement_013.ttcn | 50 ++++ .../Sem_2002_TheAltStatement_014.ttcn | 45 ++++ .../NegSem_2003_the_repeat_statement_001.ttcn | 40 +++ .../Sem_2003_the_repeat_statement_001.ttcn | 46 ++++ .../Sem_2003_the_repeat_statement_002.ttcn | 50 ++++ .../Sem_2003_the_repeat_statement_003.ttcn | 45 ++++ .../Sem_2003_the_repeat_statement_004.ttcn | 45 ++++ .../NegSem_2004_InterleaveStatement_001.ttcn | 63 +++++ .../NegSem_2004_InterleaveStatement_002.ttcn | 49 ++++ .../NegSem_2004_InterleaveStatement_003.ttcn | 48 ++++ .../NegSem_2004_InterleaveStatement_004.ttcn | 45 ++++ .../NegSem_2004_InterleaveStatement_005.ttcn | 46 ++++ .../NegSem_2004_InterleaveStatement_006.ttcn | 41 +++ .../NegSem_2004_InterleaveStatement_008.ttcn | 41 +++ .../NegSem_2004_InterleaveStatement_010.ttcn | 47 ++++ .../NegSem_2004_InterleaveStatement_011.ttcn | 46 ++++ .../NegSem_2004_InterleaveStatement_012.ttcn | 52 ++++ .../NegSem_2004_InterleaveStatement_013.ttcn | 46 ++++ .../NegSyn_2004_InterleaveStatement_001.ttcn | 62 +++++ .../NegSyn_2004_InterleaveStatement_002.ttcn | 61 +++++ .../Sem_2004_InterleaveStatement_001.ttcn | 66 +++++ .../Sem_2004_InterleaveStatement_002.ttcn | 67 +++++ .../Sem_2004_InterleaveStatement_003.ttcn | 50 ++++ .../Sem_2004_InterleaveStatement_004.ttcn | 65 +++++ .../Sem_2004_InterleaveStatement_005.ttcn | 45 ++++ .../Sem_2004_InterleaveStatement_006.ttcn | 45 ++++ .../Sem_2004_InterleaveStatement_007.ttcn | 43 ++++ .../Sem_2004_InterleaveStatement_008.ttcn | 44 ++++ .../Sem_2004_InterleaveStatement_009.ttcn | 38 +++ .../Sem_2004_InterleaveStatement_010.ttcn | 41 +++ .../Syn_2004_InterleaveStatement_001.ttcn | 53 ++++ ...gSem_200501_the_default_mechanism_001.ttcn | 63 +++++ .../Sem_200501_the_default_mechanism_001.ttcn | 44 ++++ .../Sem_200501_the_default_mechanism_002.ttcn | 55 ++++ .../Sem_200501_the_default_mechanism_003.ttcn | 55 ++++ .../Sem_200501_the_default_mechanism_004.ttcn | 64 +++++ .../Sem_200501_the_default_mechanism_005.ttcn | 66 +++++ .../Sem_200501_the_default_mechanism_006.ttcn | 50 ++++ .../Sem_200501_the_default_mechanism_007.ttcn | 54 ++++ .../Sem_200501_the_default_mechanism_008.ttcn | 43 ++++ ...Sem_200502_the_activate_operation_001.ttcn | 38 +++ ...Sem_200502_the_activate_operation_002.ttcn | 33 +++ ...Sem_200502_the_activate_operation_003.ttcn | 28 ++ ...Sem_200502_the_activate_operation_004.ttcn | 28 ++ ...Sem_200502_the_activate_operation_005.ttcn | 31 +++ ...Sem_200502_the_activate_operation_006.ttcn | 47 ++++ ...Sem_200502_the_activate_operation_007.ttcn | 52 ++++ ...Sem_200502_the_activate_operation_001.ttcn | 36 +++ ...Sem_200502_the_activate_operation_002.ttcn | 48 ++++ ...Sem_200502_the_activate_operation_003.ttcn | 31 +++ ...Sem_200502_the_activate_operation_004.ttcn | 36 +++ ...Sem_200502_the_activate_operation_005.ttcn | 43 ++++ ...Sem_200502_the_activate_operation_006.ttcn | 48 ++++ ...m_200503_the_deactivate_operation_001.ttcn | 43 ++++ ...m_200503_the_deactivate_operation_002.ttcn | 47 ++++ ...m_200503_the_deactivate_operation_003.ttcn | 41 +++ ...m_200503_the_deactivate_operation_001.ttcn | 49 ++++ ...m_200503_the_deactivate_operation_002.ttcn | 57 +++++ ...m_200503_the_deactivate_operation_003.ttcn | 53 ++++ ...m_200503_the_deactivate_operation_004.ttcn | 42 +++ .../20_toplevel/Syn_20_TopLevel_001.ttcn | 36 +++ .../20_toplevel/Syn_20_TopLevel_002.ttcn | 34 +++ .../20_toplevel/Syn_20_TopLevel_003.ttcn | 33 +++ .../20_toplevel/Syn_20_TopLevel_004.ttcn | 36 +++ .../20_toplevel/Syn_20_TopLevel_005.ttcn | 37 +++ .../210101_connect_and_map_operations/NOTES | 1 + ...210101_connect_and_map_operations_001.ttcn | 58 +++++ ...210101_connect_and_map_operations_002.ttcn | 65 +++++ ...210101_connect_and_map_operations_003.ttcn | 54 ++++ ...210101_connect_and_map_operations_004.ttcn | 61 +++++ ...210101_connect_and_map_operations_005.ttcn | 31 +++ ...210101_connect_and_map_operations_006.ttcn | 32 +++ ...210101_connect_and_map_operations_007.ttcn | 32 +++ ...210101_connect_and_map_operations_008.ttcn | 42 +++ ...210101_connect_and_map_operations_009.ttcn | 42 +++ ...210101_connect_and_map_operations_010.ttcn | 39 +++ ...210101_connect_and_map_operations_011.ttcn | 42 +++ ...210101_connect_and_map_operations_012.ttcn | 42 +++ ...210101_connect_and_map_operations_013.ttcn | 40 +++ ...210101_connect_and_map_operations_014.ttcn | 42 +++ .../NegSem_210101_connect_operation_001.ttcn | 33 +++ .../NegSem_210101_map_operation_002.ttcn | 37 +++ ...210101_connect_and_map_operations_001.ttcn | 84 ++++++ ...210101_connect_and_map_operations_002.ttcn | 86 +++++++ ...210101_connect_and_map_operations_003.ttcn | 86 +++++++ ...210101_connect_and_map_operations_004.ttcn | 86 +++++++ ...210101_connect_and_map_operations_005.ttcn | 58 +++++ ...210101_connect_and_map_operations_006.ttcn | 59 +++++ ...210101_connect_and_map_operations_007.ttcn | 61 +++++ ...210101_connect_and_map_operations_008.ttcn | 61 +++++ ...210101_connect_and_map_operations_009.ttcn | 53 ++++ ...210101_connect_and_map_operations_010.ttcn | 36 +++ ...210101_connect_and_map_operations_011.ttcn | 34 +++ ...210101_connect_and_map_operations_012.ttcn | 40 +++ ...2_disconnect_and_unmap_operations_001.ttcn | 35 +++ ...2_disconnect_and_unmap_operations_002.ttcn | 37 +++ ...2_disconnect_and_unmap_operations_003.ttcn | 38 +++ ...2_disconnect_and_unmap_operations_004.ttcn | 32 +++ ...2_disconnect_and_unmap_operations_005.ttcn | 33 +++ ...2_disconnect_and_unmap_operations_006.ttcn | 33 +++ ...2_disconnect_and_unmap_operations_007.ttcn | 38 +++ ...2_disconnect_and_unmap_operations_008.ttcn | 43 ++++ ...2_disconnect_and_unmap_operations_009.ttcn | 43 ++++ ...2_disconnect_and_unmap_operations_010.ttcn | 41 +++ ...2_disconnect_and_unmap_operations_011.ttcn | 43 ++++ ...2_disconnect_and_unmap_operations_012.ttcn | 43 ++++ ...2_disconnect_and_unmap_operations_013.ttcn | 41 +++ ...2_disconnect_and_unmap_operations_014.ttcn | 43 ++++ ...2_disconnect_and_unmap_operations_001.ttcn | 52 ++++ ...2_disconnect_and_unmap_operations_002.ttcn | 53 ++++ ...2_disconnect_and_unmap_operations_003.ttcn | 68 +++++ ...2_disconnect_and_unmap_operations_004.ttcn | 58 +++++ ...2_disconnect_and_unmap_operations_005.ttcn | 50 ++++ ...2_disconnect_and_unmap_operations_006.ttcn | 50 ++++ ...2_disconnect_and_unmap_operations_007.ttcn | 58 +++++ ...2_disconnect_and_unmap_operations_008.ttcn | 57 +++++ ...2_disconnect_and_unmap_operations_009.ttcn | 54 ++++ ...2_disconnect_and_unmap_operations_010.ttcn | 34 +++ ...2_disconnect_and_unmap_operations_011.ttcn | 60 +++++ ...2_disconnect_and_unmap_operations_012.ttcn | 37 +++ ...2_disconnect_and_unmap_operations_013.ttcn | 38 +++ .../Sem_210102_disconnect_operation_001.ttcn | 59 +++++ .../Sem_210102_disconnect_operation_002.ttcn | 43 ++++ .../Sem_210102_disconnect_operation_003.ttcn | 37 +++ .../Sem_210102_unmap_operation_001.ttcn | 50 ++++ .../Sem_210102_unmap_operation_002.ttcn | 50 ++++ .../NegSem_2101_TopLevel_001.ttcn | 28 ++ .../NegSem_2101_TopLevel_002.ttcn | 29 +++ .../NegSem_2102_testcase_stop_001.ttcn | 22 ++ .../NegSem_210301_CreateOperation_001.ttcn | 19 ++ .../NegSem_210301_CreateOperation_002.ttcn | 19 ++ .../NegSem_210301_CreateOperation_003.ttcn | 19 ++ .../Sem_210301_CreateOperation_001.ttcn | 43 ++++ .../Sem_210301_CreateOperation_002.ttcn | 45 ++++ .../Sem_210301_CreateOperation_003.ttcn | 44 ++++ .../Sem_210301_CreateOperation_004.ttcn | 46 ++++ .../Syn_210301_CreateOperation_001.ttcn | 45 ++++ ...egSem_210302_Start_test_component_001.ttcn | 28 ++ ...egSem_210302_Start_test_component_002.ttcn | 25 ++ ...egSem_210302_Start_test_component_004.ttcn | 33 +++ ...egSem_210302_Start_test_component_005.ttcn | 33 +++ ...egSem_210302_Start_test_component_006.ttcn | 38 +++ ...egSem_210302_Start_test_component_007.ttcn | 38 +++ ...egSem_210302_Start_test_component_008.ttcn | 39 +++ ...egSem_210302_Start_test_component_009.ttcn | 36 +++ ...egSem_210302_Start_test_component_010.ttcn | 34 +++ ...egSem_210302_Start_test_component_011.ttcn | 41 +++ ...egSem_210302_Start_test_component_012.ttcn | 40 +++ .../Sem_210302_Start_test_component_001.ttcn | 28 ++ .../Sem_210302_Start_test_component_002.ttcn | 31 +++ .../Sem_210302_Start_test_component_003.ttcn | 34 +++ .../Sem_210302_Start_test_component_004.ttcn | 41 +++ .../Sem_210302_Start_test_component_005.ttcn | 41 +++ .../Sem_210302_Start_test_component_006.ttcn | 45 ++++ .../Sem_210302_Start_test_component_007.ttcn | 39 +++ .../Sem_210302_Start_test_component_008.ttcn | 42 +++ .../Sem_210302_Start_test_component_009.ttcn | 54 ++++ .../Sem_210302_Start_test_component_010.ttcn | 37 +++ .../Sem_210302_Start_test_component_011.ttcn | 41 +++ .../Sem_210302_Start_test_component_012.ttcn | 46 ++++ .../Sem_210302_Start_test_component_013.ttcn | 28 ++ .../Sem_210302_Start_test_component_014.ttcn | 39 +++ ...NegSem_210303_Stop_test_component_001.ttcn | 37 +++ ...NegSem_210303_Stop_test_component_002.ttcn | 36 +++ ...NegSem_210303_Stop_test_component_003.ttcn | 40 +++ ...NegSem_210303_Stop_test_component_004.ttcn | 46 ++++ .../Sem_210303_Stop_test_component_001.ttcn | 46 ++++ .../Sem_210303_Stop_test_component_002.ttcn | 35 +++ .../Sem_210303_Stop_test_component_003.ttcn | 43 ++++ .../Sem_210303_Stop_test_component_004.ttcn | 52 ++++ .../Sem_210303_Stop_test_component_005.ttcn | 40 +++ .../Sem_210303_Stop_test_component_006.ttcn | 52 ++++ .../Sem_210303_Stop_test_component_007.ttcn | 51 ++++ .../Sem_210303_Stop_test_component_008.ttcn | 50 ++++ .../Sem_210303_Stop_test_component_009.ttcn | 46 ++++ .../Sem_210303_Stop_test_component_010.ttcn | 57 +++++ .../Sem_210303_Stop_test_component_011.ttcn | 41 +++ ...NegSem_210304_kill_test_component_001.ttcn | 39 +++ ...NegSem_210304_kill_test_component_002.ttcn | 39 +++ ...NegSem_210304_kill_test_component_003.ttcn | 36 +++ ...NegSem_210304_kill_test_component_004.ttcn | 40 +++ ...NegSem_210304_kill_test_component_005.ttcn | 46 ++++ .../Sem_210304_kill_test_component_001.ttcn | 44 ++++ .../Sem_210304_kill_test_component_002.ttcn | 39 +++ .../Sem_210304_kill_test_component_003.ttcn | 39 +++ .../Sem_210304_kill_test_component_004.ttcn | 34 +++ .../Sem_210304_kill_test_component_005.ttcn | 40 +++ .../Sem_210304_kill_test_component_006.ttcn | 39 +++ .../NegSem_210305_alive_operation_001.ttcn | 35 +++ .../NegSem_210305_alive_operation_002.ttcn | 42 +++ .../NegSem_210305_alive_operation_003.ttcn | 42 +++ .../NegSem_210305_alive_operation_004.ttcn | 46 ++++ .../NegSem_210305_alive_operation_005.ttcn | 46 ++++ .../NegSem_210305_alive_operation_006.ttcn | 37 +++ .../NegSyn_210305_alive_operation_001.ttcn | 37 +++ .../NegSyn_210305_alive_operation_002.ttcn | 37 +++ .../NegSyn_210305_alive_operation_003.ttcn | 37 +++ .../NegSyn_210305_alive_operation_004.ttcn | 41 +++ .../Sem_210305_alive_operation_001.ttcn | 47 ++++ .../Sem_210305_alive_operation_002.ttcn | 39 +++ .../Sem_210305_alive_operation_003.ttcn | 38 +++ .../Sem_210305_alive_operation_004.ttcn | 39 +++ .../Sem_210305_alive_operation_005.ttcn | 36 +++ .../Sem_210305_alive_operation_006.ttcn | 36 +++ .../Sem_210305_alive_operation_007.ttcn | 43 ++++ .../Sem_210305_alive_operation_008.ttcn | 34 +++ .../Sem_210305_alive_operation_009.ttcn | 41 +++ .../Sem_210305_alive_operation_010.ttcn | 41 +++ .../Sem_210305_alive_operation_011.ttcn | 46 ++++ .../Sem_210305_alive_operation_012.ttcn | 34 +++ .../Sem_210305_alive_operation_013.ttcn | 45 ++++ .../Sem_210305_alive_operation_014.ttcn | 45 ++++ .../Sem_210305_alive_operation_015.ttcn | 28 ++ .../NegSem_210306_running_operation_001.ttcn | 35 +++ .../NegSem_210306_running_operation_002.ttcn | 42 +++ .../NegSem_210306_running_operation_003.ttcn | 42 +++ .../NegSem_210306_running_operation_004.ttcn | 46 ++++ .../NegSem_210306_running_operation_005.ttcn | 46 ++++ .../NegSem_210306_running_operation_006.ttcn | 37 +++ .../NegSyn_210306_running_operation_001.ttcn | 37 +++ .../NegSyn_210306_running_operation_002.ttcn | 37 +++ .../NegSyn_210306_running_operation_003.ttcn | 37 +++ .../NegSyn_210306_running_operation_004.ttcn | 41 +++ .../Sem_210306_running_operation_001.ttcn | 36 +++ .../Sem_210306_running_operation_002.ttcn | 37 +++ .../Sem_210306_running_operation_003.ttcn | 35 +++ .../Sem_210306_running_operation_004.ttcn | 42 +++ .../Sem_210306_running_operation_005.ttcn | 34 +++ .../Sem_210306_running_operation_006.ttcn | 34 +++ .../Sem_210306_running_operation_007.ttcn | 41 +++ .../Sem_210306_running_operation_008.ttcn | 41 +++ .../Sem_210306_running_operation_009.ttcn | 46 ++++ .../Sem_210306_running_operation_010.ttcn | 45 ++++ .../Sem_210306_running_operation_011.ttcn | 45 ++++ .../Sem_210306_running_operation_012.ttcn | 45 ++++ .../Sem_210306_running_operation_013.ttcn | 33 +++ .../NegSem_210307_done_operation_001.ttcn | 29 +++ .../NegSem_210307_done_operation_002.ttcn | 33 +++ .../NegSem_210307_done_operation_003.ttcn | 48 ++++ .../NegSem_210307_done_operation_004.ttcn | 48 ++++ .../NegSem_210307_done_operation_005.ttcn | 52 ++++ .../NegSem_210307_done_operation_006.ttcn | 52 ++++ .../NegSem_210307_done_operation_007.ttcn | 34 +++ .../NegSem_210307_done_operation_008.ttcn | 34 +++ .../NegSem_210307_done_operation_009.ttcn | 34 +++ .../NegSem_210307_done_operation_010.ttcn | 34 +++ .../NegSyn_210307_done_operation_001.ttcn | 35 +++ .../NegSyn_210307_done_operation_002.ttcn | 35 +++ .../NegSyn_210307_done_operation_003.ttcn | 35 +++ .../NegSyn_210307_done_operation_004.ttcn | 38 +++ .../Sem_210307_done_operation_001.ttcn | 35 +++ .../Sem_210307_done_operation_002.ttcn | 32 +++ .../Sem_210307_done_operation_003.ttcn | 43 ++++ .../Sem_210307_done_operation_004.ttcn | 43 ++++ .../Sem_210307_done_operation_005.ttcn | 43 ++++ .../Sem_210307_done_operation_006.ttcn | 48 ++++ .../Sem_210307_done_operation_007.ttcn | 39 +++ .../Sem_210307_done_operation_008.ttcn | 54 ++++ .../Sem_210307_done_operation_009.ttcn | 52 ++++ .../Sem_210307_done_operation_010.ttcn | 52 ++++ .../Sem_210307_done_operation_011.ttcn | 39 +++ .../Sem_210307_done_operation_012.ttcn | 36 +++ .../NegSem_210308_killed_operation_001.ttcn | 32 +++ .../NegSem_210308_killed_operation_002.ttcn | 33 +++ .../NegSem_210308_killed_operation_003.ttcn | 48 ++++ .../NegSem_210308_killed_operation_004.ttcn | 48 ++++ .../NegSem_210308_killed_operation_005.ttcn | 52 ++++ .../NegSem_210308_killed_operation_006.ttcn | 52 ++++ .../NegSem_210308_killed_operation_007.ttcn | 34 +++ .../NegSem_210308_killed_operation_008.ttcn | 34 +++ .../NegSem_210308_killed_operation_009.ttcn | 34 +++ .../NegSem_210308_killed_operation_010.ttcn | 34 +++ .../NegSyn_210308_killed_operation_001.ttcn | 35 +++ .../NegSyn_210308_killed_operation_002.ttcn | 35 +++ .../NegSyn_210308_killed_operation_003.ttcn | 35 +++ .../NegSyn_210308_killed_operation_004.ttcn | 38 +++ .../Sem_210308_killed_operation_001.ttcn | 35 +++ .../Sem_210308_killed_operation_002.ttcn | 34 +++ .../Sem_210308_killed_operation_003.ttcn | 35 +++ .../Sem_210308_killed_operation_004.ttcn | 32 +++ .../Sem_210308_killed_operation_005.ttcn | 43 ++++ .../Sem_210308_killed_operation_006.ttcn | 43 ++++ .../Sem_210308_killed_operation_007.ttcn | 43 ++++ .../Sem_210308_killed_operation_008.ttcn | 49 ++++ .../Sem_210308_killed_operation_009.ttcn | 39 +++ .../Sem_210308_killed_operation_010.ttcn | 55 ++++ .../Sem_210308_killed_operation_011.ttcn | 52 ++++ .../Sem_210308_killed_operation_012.ttcn | 52 ++++ .../Sem_210308_killed_operation_013.ttcn | 42 +++ .../Sem_210308_killed_operation_014.ttcn | 36 +++ .../210309_any_and_all_components/NOTES | 1 + .../NegSem_220201_SendOperation_001.ttcn | 104 ++++++++ .../NegSem_220201_SendOperation_002.ttcn | 104 ++++++++ .../NegSem_220201_SendOperation_003.ttcn | 39 +++ .../NegSem_220201_SendOperation_004.ttcn | 63 +++++ .../NegSem_220201_SendOperation_005.ttcn | 51 ++++ .../NegSem_220201_SendOperation_006.ttcn | 35 +++ .../NegSem_220201_SendOperation_007.ttcn | 41 +++ .../NegSem_220201_SendOperation_008.ttcn | 34 +++ .../NegSem_220201_SendOperation_009.ttcn | 35 +++ .../NegSem_220201_SendOperation_010.ttcn | 34 +++ .../NegSem_220201_SendOperation_011.ttcn | 31 +++ .../Sem_220201_SendOperation_001.ttcn | 104 ++++++++ .../Sem_220201_SendOperation_002.ttcn | 39 +++ .../Sem_220201_SendOperation_003.ttcn | 50 ++++ .../Sem_220201_SendOperation_004.ttcn | 39 +++ .../Sem_220201_SendOperation_005.ttcn | 49 ++++ .../Sem_220201_SendOperation_006.ttcn | 49 ++++ .../Sem_220201_SendOperation_007.ttcn | 47 ++++ .../NegSem_220202_ReceiveOperation_001.ttcn | 63 +++++ .../NegSem_220202_ReceiveOperation_002.ttcn | 40 +++ .../NegSem_220202_ReceiveOperation_003.ttcn | 34 +++ .../NegSem_220202_ReceiveOperation_004.ttcn | 43 ++++ .../NegSem_220202_ReceiveOperation_005.ttcn | 46 ++++ .../NegSem_220202_ReceiveOperation_006.ttcn | 42 +++ .../NegSem_220202_ReceiveOperation_007.ttcn | 42 +++ .../NegSem_220202_ReceiveOperation_008.ttcn | 42 +++ .../NegSem_220202_ReceiveOperation_009.ttcn | 43 ++++ .../NegSem_220202_ReceiveOperation_010.ttcn | 36 +++ .../NegSem_220202_ReceiveOperation_011.ttcn | 37 +++ .../NegSem_220202_ReceiveOperation_012.ttcn | 34 +++ .../NegSem_220202_ReceiveOperation_013.ttcn | 35 +++ .../NegSem_220202_ReceiveOperation_014.ttcn | 36 +++ .../NegSem_220202_ReceiveOperation_015.ttcn | 37 +++ .../NegSem_220202_ReceiveOperation_016.ttcn | 36 +++ .../NegSem_220202_ReceiveOperation_017.ttcn | 33 +++ .../NegSem_220202_ReceiveOperation_018.ttcn | 33 +++ .../NegSem_220202_ReceiveOperation_019.ttcn | 32 +++ .../NegSem_220202_ReceiveOperation_020.ttcn | 33 +++ .../NegSem_220202_ReceiveOperation_021.ttcn | 34 +++ .../NegSem_220202_ReceiveOperation_022.ttcn | 38 +++ .../NegSem_220202_ReceiveOperation_023.ttcn | 47 ++++ .../NegSem_220202_ReceiveOperation_024.ttcn | 41 +++ .../Sem_220202_ReceiveOperation_001.ttcn | 41 +++ .../Sem_220202_ReceiveOperation_002.ttcn | 38 +++ .../Sem_220202_ReceiveOperation_003.ttcn | 44 ++++ .../Sem_220202_ReceiveOperation_004.ttcn | 49 ++++ .../Sem_220202_ReceiveOperation_005.ttcn | 38 +++ .../Sem_220202_ReceiveOperation_006.ttcn | 52 ++++ .../Sem_220202_ReceiveOperation_007.ttcn | 53 ++++ .../Sem_220202_ReceiveOperation_008.ttcn | 50 ++++ .../Sem_220202_ReceiveOperation_009.ttcn | 48 ++++ .../Sem_220202_ReceiveOperation_010.ttcn | 45 ++++ .../Sem_220202_ReceiveOperation_011.ttcn | 48 ++++ .../Sem_220202_ReceiveOperation_012.ttcn | 48 ++++ .../Sem_220202_ReceiveOperation_013.ttcn | 48 ++++ .../Sem_220202_ReceiveOperation_014.ttcn | 48 ++++ .../Sem_220202_ReceiveOperation_015.ttcn | 48 ++++ .../Sem_220202_ReceiveOperation_016.ttcn | 46 ++++ .../Sem_220202_ReceiveOperation_017.ttcn | 35 +++ .../Sem_220202_ReceiveOperation_018.ttcn | 35 +++ .../Sem_220202_ReceiveOperation_019.ttcn | 35 +++ .../Sem_220202_ReceiveOperation_020.ttcn | 46 ++++ .../Sem_220202_ReceiveOperation_021.ttcn | 48 ++++ .../Sem_220202_ReceiveOperation_022.ttcn | 38 +++ .../Sem_220202_ReceiveOperation_023.ttcn | 35 +++ .../Sem_220202_ReceiveOperation_024.ttcn | 42 +++ .../Sem_220202_ReceiveOperation_025.ttcn | 44 ++++ .../Sem_220202_ReceiveOperation_026.ttcn | 42 +++ .../Sem_220202_ReceiveOperation_027.ttcn | 42 +++ .../Sem_220202_ReceiveOperation_028.ttcn | 44 ++++ .../Sem_220202_ReceiveOperation_029.ttcn | 42 +++ .../Sem_220202_ReceiveOperation_030.ttcn | 39 +++ .../NegSem_220203_TriggerOperation_001.ttcn | 63 +++++ .../NegSem_220203_TriggerOperation_002.ttcn | 41 +++ .../NegSem_220203_TriggerOperation_003.ttcn | 34 +++ .../NegSem_220203_TriggerOperation_004.ttcn | 43 ++++ .../NegSem_220203_TriggerOperation_005.ttcn | 46 ++++ .../NegSem_220203_TriggerOperation_006.ttcn | 42 +++ .../NegSem_220203_TriggerOperation_007.ttcn | 42 +++ .../NegSem_220203_TriggerOperation_008.ttcn | 42 +++ .../NegSem_220203_TriggerOperation_009.ttcn | 43 ++++ .../NegSem_220203_TriggerOperation_010.ttcn | 37 +++ .../NegSem_220203_TriggerOperation_011.ttcn | 37 +++ .../NegSem_220203_TriggerOperation_012.ttcn | 34 +++ .../NegSem_220203_TriggerOperation_013.ttcn | 35 +++ .../NegSem_220203_TriggerOperation_014.ttcn | 36 +++ .../NegSem_220203_TriggerOperation_015.ttcn | 37 +++ .../NegSem_220203_TriggerOperation_016.ttcn | 36 +++ .../NegSem_220203_TriggerOperation_017.ttcn | 33 +++ .../NegSem_220203_TriggerOperation_018.ttcn | 33 +++ .../NegSem_220203_TriggerOperation_019.ttcn | 32 +++ .../NegSem_220203_TriggerOperation_020.ttcn | 33 +++ .../NegSem_220203_TriggerOperation_021.ttcn | 34 +++ .../NegSem_220203_TriggerOperation_022.ttcn | 38 +++ .../NegSem_220203_TriggerOperation_023.ttcn | 49 ++++ .../NegSem_220203_TriggerOperation_024.ttcn | 44 ++++ .../Sem_220203_TriggerOperation_001.ttcn | 47 ++++ .../Sem_220203_TriggerOperation_002.ttcn | 43 ++++ .../Sem_220203_TriggerOperation_003.ttcn | 49 ++++ .../Sem_220203_TriggerOperation_004.ttcn | 59 +++++ .../Sem_220203_TriggerOperation_005.ttcn | 42 +++ .../Sem_220203_TriggerOperation_006.ttcn | 52 ++++ .../Sem_220203_TriggerOperation_007.ttcn | 52 ++++ .../Sem_220203_TriggerOperation_008.ttcn | 50 ++++ .../Sem_220203_TriggerOperation_009.ttcn | 48 ++++ .../Sem_220203_TriggerOperation_010.ttcn | 45 ++++ .../Sem_220203_TriggerOperation_011.ttcn | 48 ++++ .../Sem_220203_TriggerOperation_012.ttcn | 48 ++++ .../Sem_220203_TriggerOperation_013.ttcn | 48 ++++ .../Sem_220203_TriggerOperation_014.ttcn | 48 ++++ .../Sem_220203_TriggerOperation_015.ttcn | 48 ++++ .../Sem_220203_TriggerOperation_016.ttcn | 46 ++++ .../Sem_220203_TriggerOperation_017.ttcn | 36 +++ .../Sem_220203_TriggerOperation_018.ttcn | 35 +++ .../Sem_220203_TriggerOperation_019.ttcn | 37 +++ .../Sem_220203_TriggerOperation_020.ttcn | 48 ++++ .../Sem_220203_TriggerOperation_021.ttcn | 50 ++++ .../Sem_220203_TriggerOperation_022.ttcn | 41 +++ .../Sem_220203_TriggerOperation_023.ttcn | 42 +++ .../Sem_220203_TriggerOperation_024.ttcn | 44 ++++ .../Sem_220203_TriggerOperation_025.ttcn | 42 +++ .../Sem_220203_TriggerOperation_026.ttcn | 42 +++ .../Sem_220203_TriggerOperation_027.ttcn | 44 ++++ .../Sem_220203_TriggerOperation_028.ttcn | 42 +++ .../NegSem_220301_CallOperation_001.ttcn | 38 +++ .../NegSem_220301_CallOperation_002.ttcn | 121 +++++++++ .../NegSem_220301_CallOperation_003.ttcn | 36 +++ .../NegSem_220301_CallOperation_004.ttcn | 36 +++ .../NegSem_220301_CallOperation_005.ttcn | 36 +++ .../NegSem_220301_CallOperation_006.ttcn | 49 ++++ .../NegSem_220301_CallOperation_007.ttcn | 37 +++ .../NegSem_220301_CallOperation_008.ttcn | 37 +++ .../NegSem_220301_CallOperation_009.ttcn | 37 +++ .../NegSem_220301_CallOperation_010.ttcn | 37 +++ .../NegSem_220301_CallOperation_011.ttcn | 37 +++ .../NegSem_220301_CallOperation_012.ttcn | 50 ++++ .../NegSem_220301_CallOperation_013.ttcn | 42 +++ .../NegSem_220301_CallOperation_014.ttcn | 44 ++++ .../NegSem_220301_CallOperation_015.ttcn | 44 ++++ .../NegSem_220301_CallOperation_016.ttcn | 46 ++++ .../NegSem_220301_CallOperation_017.ttcn | 49 ++++ .../NegSem_220301_CallOperation_018.ttcn | 42 +++ .../NegSem_220301_CallOperation_019.ttcn | 42 +++ .../NegSem_220301_CallOperation_020.ttcn | 31 +++ .../NegSyn_220301_CallOperation_001.ttcn | 41 +++ .../NegSyn_220301_CallOperation_002.ttcn | 45 ++++ .../Sem_220301_CallOperation_001.ttcn | 120 +++++++++ .../Sem_220301_CallOperation_002.ttcn | 120 +++++++++ .../Sem_220301_CallOperation_003.ttcn | 124 +++++++++ .../Sem_220301_CallOperation_004.ttcn | 120 +++++++++ .../Sem_220301_CallOperation_005.ttcn | 123 +++++++++ .../Sem_220301_CallOperation_006.ttcn | 118 +++++++++ .../Sem_220301_CallOperation_007.ttcn | 120 +++++++++ .../Sem_220301_CallOperation_008.ttcn | 53 ++++ .../Sem_220301_CallOperation_009.ttcn | 40 +++ .../Sem_220301_CallOperation_010.ttcn | 49 ++++ .../Sem_220301_CallOperation_011.ttcn | 54 ++++ .../Sem_220301_CallOperation_012.ttcn | 65 +++++ .../Sem_220301_CallOperation_013.ttcn | 63 +++++ .../Sem_220301_CallOperation_014.ttcn | 54 ++++ .../Sem_220301_CallOperation_015.ttcn | 62 +++++ .../Sem_220301_CallOperation_016.ttcn | 44 ++++ .../Sem_220301_CallOperation_017.ttcn | 36 +++ .../Sem_220301_CallOperation_018.ttcn | 36 +++ .../Sem_220301_CallOperation_019.ttcn | 47 ++++ .../Sem_220301_CallOperation_020.ttcn | 47 ++++ .../NegSem_220302_GetcallOperation_001.ttcn | 38 +++ .../NegSem_220302_GetcallOperation_002.ttcn | 123 +++++++++ .../NegSem_220302_GetcallOperation_003.ttcn | 122 +++++++++ .../NegSem_220302_getcall_operation_004.ttcn | 44 ++++ .../NegSem_220302_getcall_operation_005.ttcn | 54 ++++ .../NegSem_220302_getcall_operation_006.ttcn | 54 ++++ .../NegSem_220302_getcall_operation_007.ttcn | 60 +++++ .../NegSem_220302_getcall_operation_008.ttcn | 59 +++++ .../NegSem_220302_getcall_operation_009.ttcn | 46 ++++ .../NegSem_220302_getcall_operation_010.ttcn | 45 ++++ .../NegSem_220302_getcall_operation_011.ttcn | 51 ++++ .../NegSem_220302_getcall_operation_012.ttcn | 46 ++++ .../NegSem_220302_getcall_operation_013.ttcn | 46 ++++ .../NegSem_220302_getcall_operation_014.ttcn | 46 ++++ .../NegSem_220302_getcall_operation_015.ttcn | 47 ++++ .../NegSem_220302_getcall_operation_016.ttcn | 52 ++++ .../NegSem_220302_getcall_operation_017.ttcn | 54 ++++ .../NegSem_220302_getcall_operation_018.ttcn | 44 ++++ .../NegSem_220302_getcall_operation_019.ttcn | 51 ++++ .../NegSyn_220302_getcall_operation_001.ttcn | 44 ++++ .../NegSyn_220302_getcall_operation_002.ttcn | 45 ++++ .../Sem_220302_GetcallOperation_001.ttcn | 126 +++++++++ .../Sem_220302_GetcallOperation_002.ttcn | 132 ++++++++++ .../Sem_220302_GetcallOperation_003.ttcn | 134 ++++++++++ .../Sem_220302_GetcallOperation_004.ttcn | 128 ++++++++++ .../Sem_220302_GetcallOperation_005.ttcn | 117 +++++++++ .../Sem_220302_getcall_operation_006.ttcn | 46 ++++ .../Sem_220302_getcall_operation_007.ttcn | 47 ++++ .../Sem_220302_getcall_operation_008.ttcn | 54 ++++ .../Sem_220302_getcall_operation_009.ttcn | 56 ++++ .../Sem_220302_getcall_operation_010.ttcn | 56 ++++ .../Sem_220302_getcall_operation_011.ttcn | 59 +++++ .../Sem_220302_getcall_operation_012.ttcn | 54 ++++ .../Sem_220302_getcall_operation_013.ttcn | 54 ++++ .../Sem_220302_getcall_operation_014.ttcn | 52 ++++ .../Sem_220302_getcall_operation_015.ttcn | 52 ++++ .../Sem_220302_getcall_operation_016.ttcn | 52 ++++ .../Sem_220302_getcall_operation_017.ttcn | 52 ++++ .../Sem_220302_getcall_operation_018.ttcn | 52 ++++ .../Sem_220302_getcall_operation_019.ttcn | 50 ++++ .../Sem_220302_getcall_operation_020.ttcn | 53 ++++ .../Sem_220302_getcall_operation_021.ttcn | 54 ++++ .../Sem_220302_getcall_operation_022.ttcn | 51 ++++ .../NegSem_220303_ReplyOperation_001.ttcn | 39 +++ .../NegSem_220303_ReplyOperation_002.ttcn | 46 ++++ .../NegSem_220303_ReplyOperation_003.ttcn | 46 ++++ .../NegSem_220303_ReplyOperation_004.ttcn | 32 +++ .../NegSem_220303_ReplyOperation_005.ttcn | 46 ++++ .../NegSem_220303_ReplyOperation_006.ttcn | 51 ++++ .../NegSem_220303_ReplyOperation_007.ttcn | 51 ++++ .../NegSem_220303_ReplyOperation_008.ttcn | 78 ++++++ .../NegSem_220303_ReplyOperation_009.ttcn | 47 ++++ .../NegSem_220303_ReplyOperation_010.ttcn | 46 ++++ .../Sem_220303_ReplyOperation_001.ttcn | 116 +++++++++ .../Sem_220303_ReplyOperation_002.ttcn | 118 +++++++++ .../Sem_220303_ReplyOperation_003.ttcn | 49 ++++ .../Sem_220303_ReplyOperation_004.ttcn | 53 ++++ .../Sem_220303_ReplyOperation_005.ttcn | 51 ++++ .../NegSem_220304_getreply_operation_001.ttcn | 45 ++++ .../NegSem_220304_getreply_operation_002.ttcn | 58 +++++ .../NegSem_220304_getreply_operation_003.ttcn | 58 +++++ .../NegSem_220304_getreply_operation_004.ttcn | 64 +++++ .../NegSem_220304_getreply_operation_005.ttcn | 64 +++++ .../NegSem_220304_getreply_operation_006.ttcn | 46 ++++ .../NegSem_220304_getreply_operation_007.ttcn | 45 ++++ .../NegSem_220304_getreply_operation_008.ttcn | 51 ++++ .../NegSem_220304_getreply_operation_009.ttcn | 45 ++++ .../NegSem_220304_getreply_operation_010.ttcn | 47 ++++ .../NegSem_220304_getreply_operation_011.ttcn | 46 ++++ .../NegSem_220304_getreply_operation_012.ttcn | 47 ++++ .../NegSem_220304_getreply_operation_013.ttcn | 51 ++++ .../NegSem_220304_getreply_operation_014.ttcn | 53 ++++ .../NegSem_220304_getreply_operation_015.ttcn | 55 ++++ .../NegSem_220304_getreply_operation_016.ttcn | 50 ++++ .../NegSem_220304_getreply_operation_017.ttcn | 52 ++++ .../NegSem_220304_getreply_operation_018.ttcn | 51 ++++ .../NegSem_220304_getreply_operation_019.ttcn | 52 ++++ .../NegSem_220304_getreply_operation_020.ttcn | 57 +++++ .../NegSem_220304_getreply_operation_021.ttcn | 45 ++++ .../NegSem_220304_getreply_operation_022.ttcn | 50 ++++ .../NegSyn_220304_getreply_operation_001.ttcn | 46 ++++ .../NegSyn_220304_getreply_operation_002.ttcn | 47 ++++ .../Sem_220304_getreply_operation_001.ttcn | 40 +++ .../Sem_220304_getreply_operation_002.ttcn | 51 ++++ .../Sem_220304_getreply_operation_003.ttcn | 59 +++++ .../Sem_220304_getreply_operation_004.ttcn | 59 +++++ .../Sem_220304_getreply_operation_005.ttcn | 60 +++++ .../Sem_220304_getreply_operation_006.ttcn | 64 +++++ .../Sem_220304_getreply_operation_007.ttcn | 58 +++++ .../Sem_220304_getreply_operation_008.ttcn | 58 +++++ .../Sem_220304_getreply_operation_009.ttcn | 51 ++++ .../Sem_220304_getreply_operation_010.ttcn | 51 ++++ .../Sem_220304_getreply_operation_011.ttcn | 52 ++++ .../Sem_220304_getreply_operation_012.ttcn | 51 ++++ .../Sem_220304_getreply_operation_013.ttcn | 53 ++++ .../Sem_220304_getreply_operation_014.ttcn | 51 ++++ .../Sem_220304_getreply_operation_015.ttcn | 57 +++++ .../Sem_220304_getreply_operation_016.ttcn | 56 ++++ .../Sem_220304_getreply_operation_017.ttcn | 57 +++++ .../Sem_220304_getreply_operation_018.ttcn | 56 ++++ .../Sem_220304_getreply_operation_019.ttcn | 58 +++++ .../Sem_220304_getreply_operation_020.ttcn | 56 ++++ .../Sem_220304_getreply_operation_021.ttcn | 55 ++++ .../Sem_220304_getreply_operation_022.ttcn | 56 ++++ .../Sem_220304_getreply_operation_023.ttcn | 53 ++++ .../NegSem_220305_raise_operation_001.ttcn | 45 ++++ .../NegSem_220305_raise_operation_002.ttcn | 45 ++++ .../NegSem_220305_raise_operation_003.ttcn | 48 ++++ .../NegSem_220305_raise_operation_004.ttcn | 47 ++++ .../NegSem_220305_raise_operation_005.ttcn | 47 ++++ .../NegSem_220305_raise_operation_006.ttcn | 42 +++ .../NegSem_220305_raise_operation_007.ttcn | 44 ++++ .../NegSem_220305_raise_operation_008.ttcn | 42 +++ .../NegSem_220305_raise_operation_009.ttcn | 42 +++ .../NegSem_220305_raise_operation_010.ttcn | 39 +++ .../Sem_220305_raise_operation_001.ttcn | 41 +++ .../Sem_220305_raise_operation_002.ttcn | 52 ++++ .../Sem_220305_raise_operation_003.ttcn | 49 ++++ .../Sem_220305_raise_operation_004.ttcn | 56 ++++ .../NegSem_220306_catch_operation_001.ttcn | 45 ++++ .../NegSem_220306_catch_operation_002.ttcn | 58 +++++ .../NegSem_220306_catch_operation_003.ttcn | 58 +++++ .../NegSem_220306_catch_operation_004.ttcn | 64 +++++ .../NegSem_220306_catch_operation_005.ttcn | 64 +++++ .../NegSem_220306_catch_operation_006.ttcn | 46 ++++ .../NegSem_220306_catch_operation_007.ttcn | 45 ++++ .../NegSem_220306_catch_operation_008.ttcn | 55 ++++ .../NegSem_220306_catch_operation_009.ttcn | 50 ++++ .../NegSem_220306_catch_operation_010.ttcn | 52 ++++ .../NegSem_220306_catch_operation_011.ttcn | 51 ++++ .../NegSem_220306_catch_operation_012.ttcn | 52 ++++ .../NegSem_220306_catch_operation_013.ttcn | 51 ++++ .../NegSem_220306_catch_operation_014.ttcn | 57 +++++ .../NegSem_220306_catch_operation_015.ttcn | 47 ++++ .../NegSem_220306_catch_operation_016.ttcn | 50 ++++ .../NegSyn_220306_catch_operation_001.ttcn | 46 ++++ .../NegSyn_220306_catch_operation_002.ttcn | 47 ++++ .../NegSyn_220306_catch_operation_003.ttcn | 46 ++++ .../Sem_220306_catch_operation_001.ttcn | 40 +++ .../Sem_220306_catch_operation_002.ttcn | 51 ++++ .../Sem_220306_catch_operation_003.ttcn | 59 +++++ .../Sem_220306_catch_operation_004.ttcn | 59 +++++ .../Sem_220306_catch_operation_005.ttcn | 60 +++++ .../Sem_220306_catch_operation_006.ttcn | 64 +++++ .../Sem_220306_catch_operation_007.ttcn | 58 +++++ .../Sem_220306_catch_operation_008.ttcn | 58 +++++ .../Sem_220306_catch_operation_009.ttcn | 57 +++++ .../Sem_220306_catch_operation_010.ttcn | 56 ++++ .../Sem_220306_catch_operation_011.ttcn | 57 +++++ .../Sem_220306_catch_operation_012.ttcn | 56 ++++ .../Sem_220306_catch_operation_013.ttcn | 58 +++++ .../Sem_220306_catch_operation_014.ttcn | 56 ++++ .../Sem_220306_catch_operation_015.ttcn | 57 +++++ .../Sem_220306_catch_operation_016.ttcn | 58 +++++ .../Sem_220306_catch_operation_017.ttcn | 55 ++++ .../NegSem_2204_the_check_operation_001.ttcn | 37 +++ .../NegSem_2204_the_check_operation_002.ttcn | 36 +++ .../NegSem_2204_the_check_operation_003.ttcn | 38 +++ .../NegSem_2204_the_check_operation_004.ttcn | 39 +++ .../NegSem_2204_the_check_operation_005.ttcn | 38 +++ .../Sem_2204_the_check_operation_001.ttcn | 30 +++ .../Sem_2204_the_check_operation_002.ttcn | 35 +++ .../Sem_2204_the_check_operation_003.ttcn | 28 ++ .../Sem_2204_the_check_operation_004.ttcn | 31 +++ .../Sem_2204_the_check_operation_005.ttcn | 30 +++ .../Sem_2204_the_check_operation_006.ttcn | 36 +++ .../Sem_2204_the_check_operation_007.ttcn | 28 ++ .../Sem_2204_the_check_operation_008.ttcn | 31 +++ .../Sem_2204_the_check_operation_009.ttcn | 29 +++ .../Sem_2204_the_check_operation_010.ttcn | 36 +++ .../Sem_2204_the_check_operation_011.ttcn | 33 +++ .../Sem_2204_the_check_operation_012.ttcn | 36 +++ .../Sem_2204_the_check_operation_013.ttcn | 29 +++ .../Sem_2204_the_check_operation_014.ttcn | 37 +++ .../Sem_2204_the_check_operation_015.ttcn | 33 +++ .../Sem_2204_the_check_operation_016.ttcn | 37 +++ .../Sem_2204_the_check_operation_017.ttcn | 30 +++ .../Sem_2204_the_check_operation_018.ttcn | 35 +++ .../Sem_2204_the_check_operation_019.ttcn | 28 ++ .../Sem_2204_the_check_operation_020.ttcn | 30 +++ .../Sem_2204_the_check_operation_021.ttcn | 30 +++ .../Sem_2204_the_check_operation_022.ttcn | 36 +++ .../Sem_2204_the_check_operation_023.ttcn | 28 ++ .../Sem_2204_the_check_operation_024.ttcn | 30 +++ .../Sem_2204_the_check_operation_025.ttcn | 38 +++ .../Sem_2204_the_check_operation_026.ttcn | 42 +++ .../Sem_2204_the_check_operation_027.ttcn | 36 +++ .../Sem_2204_the_check_operation_028.ttcn | 38 +++ .../Sem_2204_the_check_operation_029.ttcn | 39 +++ .../Sem_2204_the_check_operation_030.ttcn | 43 ++++ .../Sem_2204_the_check_operation_031.ttcn | 37 +++ .../Sem_2204_the_check_operation_032.ttcn | 39 +++ .../Sem_2204_the_check_operation_033.ttcn | 37 +++ .../Sem_2204_the_check_operation_034.ttcn | 43 ++++ .../Sem_2204_the_check_operation_035.ttcn | 42 +++ .../Sem_2204_the_check_operation_036.ttcn | 44 ++++ .../Sem_2204_the_check_operation_037.ttcn | 38 +++ .../Sem_2204_the_check_operation_038.ttcn | 44 ++++ .../Sem_2204_the_check_operation_039.ttcn | 43 ++++ .../Sem_2204_the_check_operation_040.ttcn | 45 ++++ .../Sem_2204_the_check_operation_041.ttcn | 38 +++ .../Sem_2204_the_check_operation_042.ttcn | 43 ++++ .../Sem_2204_the_check_operation_043.ttcn | 36 +++ .../Sem_2204_the_check_operation_044.ttcn | 38 +++ .../Sem_2204_the_check_operation_045.ttcn | 39 +++ .../Sem_2204_the_check_operation_046.ttcn | 44 ++++ .../Sem_2204_the_check_operation_047.ttcn | 37 +++ .../Sem_2204_the_check_operation_048.ttcn | 39 +++ .../Sem_2204_the_check_operation_049.ttcn | 40 +++ .../Sem_2204_the_check_operation_050.ttcn | 43 ++++ .../Sem_2204_the_check_operation_051.ttcn | 38 +++ .../Sem_2204_the_check_operation_052.ttcn | 39 +++ .../Sem_2204_the_check_operation_053.ttcn | 41 +++ .../Sem_2204_the_check_operation_054.ttcn | 44 ++++ .../Sem_2204_the_check_operation_055.ttcn | 39 +++ .../Sem_2204_the_check_operation_056.ttcn | 40 +++ .../Sem_2204_the_check_operation_057.ttcn | 39 +++ .../Sem_2204_the_check_operation_058.ttcn | 47 ++++ .../Sem_2204_the_check_operation_059.ttcn | 44 ++++ .../Sem_2204_the_check_operation_060.ttcn | 49 ++++ .../Sem_2204_the_check_operation_061.ttcn | 40 +++ .../Sem_2204_the_check_operation_062.ttcn | 48 ++++ .../Sem_2204_the_check_operation_063.ttcn | 45 ++++ .../Sem_2204_the_check_operation_064.ttcn | 50 ++++ .../Sem_2204_the_check_operation_065.ttcn | 42 +++ .../Sem_2204_the_check_operation_066.ttcn | 44 ++++ .../Sem_2204_the_check_operation_067.ttcn | 38 +++ .../Sem_2204_the_check_operation_068.ttcn | 44 ++++ .../Sem_2204_the_check_operation_069.ttcn | 43 ++++ .../Sem_2204_the_check_operation_070.ttcn | 45 ++++ .../Sem_2204_the_check_operation_071.ttcn | 39 +++ .../Sem_2204_the_check_operation_072.ttcn | 45 ++++ .../Sem_2204_the_check_operation_073.ttcn | 40 +++ .../Sem_2204_the_check_operation_074.ttcn | 43 ++++ .../Sem_2204_the_check_operation_075.ttcn | 38 +++ .../Sem_2204_the_check_operation_076.ttcn | 39 +++ .../Sem_2204_the_check_operation_077.ttcn | 41 +++ .../Sem_2204_the_check_operation_078.ttcn | 44 ++++ .../Sem_2204_the_check_operation_079.ttcn | 39 +++ .../Sem_2204_the_check_operation_080.ttcn | 40 +++ .../Sem_2204_the_check_operation_081.ttcn | 39 +++ .../Sem_2204_the_check_operation_082.ttcn | 47 ++++ .../Sem_2204_the_check_operation_083.ttcn | 44 ++++ .../Sem_2204_the_check_operation_084.ttcn | 49 ++++ .../Sem_2204_the_check_operation_085.ttcn | 40 +++ .../Sem_2204_the_check_operation_086.ttcn | 48 ++++ .../Sem_2204_the_check_operation_087.ttcn | 45 ++++ .../Sem_2204_the_check_operation_088.ttcn | 50 ++++ .../Sem_2204_the_check_operation_089.ttcn | 42 +++ .../Sem_2204_the_check_operation_090.ttcn | 44 ++++ .../Sem_2204_the_check_operation_091.ttcn | 38 +++ .../Sem_2204_the_check_operation_092.ttcn | 44 ++++ .../Sem_2204_the_check_operation_093.ttcn | 43 ++++ .../Sem_2204_the_check_operation_094.ttcn | 45 ++++ .../Sem_2204_the_check_operation_095.ttcn | 39 +++ .../Sem_2204_the_check_operation_096.ttcn | 45 ++++ .../Sem_2204_the_check_operation_097.ttcn | 30 +++ .../Sem_2204_the_check_operation_098.ttcn | 42 +++ .../Sem_2204_the_check_operation_099.ttcn | 38 +++ .../Sem_2204_the_check_operation_100.ttcn | 39 +++ .../Sem_2204_the_check_operation_101.ttcn | 30 +++ .../Sem_2204_the_check_operation_102.ttcn | 43 ++++ .../Sem_2204_the_check_operation_103.ttcn | 39 +++ .../Sem_2204_the_check_operation_104.ttcn | 40 +++ .../Sem_2204_the_check_operation_105.ttcn | 30 +++ .../Sem_2204_the_check_operation_106.ttcn | 43 ++++ .../Sem_2204_the_check_operation_107.ttcn | 44 ++++ .../Sem_2204_the_check_operation_108.ttcn | 48 ++++ .../Sem_2204_the_check_operation_109.ttcn | 31 +++ .../Sem_2204_the_check_operation_110.ttcn | 44 ++++ .../Sem_2204_the_check_operation_111.ttcn | 45 ++++ .../Sem_2204_the_check_operation_112.ttcn | 49 ++++ .../Sem_2204_the_check_operation_113.ttcn | 31 +++ .../Sem_2204_the_check_operation_114.ttcn | 42 +++ .../Sem_2204_the_check_operation_115.ttcn | 38 +++ .../Sem_2204_the_check_operation_116.ttcn | 43 ++++ .../Sem_2204_the_check_operation_117.ttcn | 30 +++ .../Sem_2204_the_check_operation_118.ttcn | 43 ++++ .../Sem_2204_the_check_operation_119.ttcn | 39 +++ .../Sem_2204_the_check_operation_120.ttcn | 44 ++++ .../22_communication_operations/NOTES | 5 + .../NegSem_2302_timer_start_001.ttcn | 25 ++ .../NegSem_2302_timer_start_002.ttcn | 25 ++ .../NegSem_2302_timer_start_003.ttcn | 25 ++ .../NegSem_2302_timer_start_004.ttcn | 25 ++ .../NegSyn_2302_timer_start_001.ttcn | 24 ++ .../NegSyn_2302_timer_start_002.ttcn | 26 ++ .../NegSyn_2302_timer_start_003.ttcn | 25 ++ .../NegSyn_2302_timer_start_004.ttcn | 26 ++ .../NegSyn_2302_timer_start_005.ttcn | 26 ++ .../NegSyn_2302_timer_start_006.ttcn | 26 ++ .../NegSyn_2302_timer_start_007.ttcn | 26 ++ .../NegSyn_2302_timer_start_008.ttcn | 26 ++ .../NegSyn_2302_timer_start_009.ttcn | 26 ++ .../NegSyn_2302_timer_start_010.ttcn | 26 ++ .../NegSyn_2302_timer_start_011.ttcn | 26 ++ .../NegSyn_2302_timer_start_012.ttcn | 26 ++ .../NegSyn_2302_timer_start_013.ttcn | 27 ++ .../Sem_2302_timer_start_001.ttcn | 44 ++++ .../Sem_2302_timer_start_002.ttcn | 53 ++++ .../Sem_2302_timer_start_003.ttcn | 74 ++++++ .../Sem_2302_timer_start_004.ttcn | 45 ++++ .../NegSyn_2303_timer_stop_001.ttcn | 25 ++ .../NegSyn_2303_timer_stop_002.ttcn | 26 ++ .../NegSyn_2303_timer_stop_003.ttcn | 26 ++ .../NegSyn_2303_timer_stop_004.ttcn | 26 ++ .../NegSyn_2303_timer_stop_005.ttcn | 26 ++ .../NegSyn_2303_timer_stop_006.ttcn | 26 ++ .../Sem_2303_timer_stop_002.ttcn | 30 +++ .../Sem_2303_timer_stop_003.ttcn | 30 +++ .../Sem_2303_timer_stop_004.ttcn | 30 +++ .../Syn_2303_timer_stop_006.ttcn | 24 ++ .../Syn_2303_timer_stop_007.ttcn | 26 ++ .../NegSyn_2304_timer_read_001.ttcn | 26 ++ .../NegSyn_2304_timer_read_002.ttcn | 25 ++ .../NegSyn_2304_timer_read_003.ttcn | 25 ++ .../NegSyn_2304_timer_read_004.ttcn | 25 ++ .../NegSyn_2304_timer_read_005.ttcn | 24 ++ .../Sem_2304_timer_read_001.ttcn | 31 +++ .../Sem_2304_timer_read_002.ttcn | 30 +++ .../Sem_2304_timer_read_003.ttcn | 47 ++++ .../NegSyn_2305_timer_running_001.ttcn | 24 ++ .../NegSyn_2305_timer_running_002.ttcn | 25 ++ .../NegSyn_2305_timer_running_003.ttcn | 25 ++ .../NegSyn_2305_timer_running_004.ttcn | 25 ++ .../NegSyn_2305_timer_running_005.ttcn | 25 ++ .../NegSyn_2305_timer_running_006.ttcn | 25 ++ .../Sem_2305_timer_running_001.ttcn | 31 +++ .../Sem_2305_timer_running_002.ttcn | 25 ++ .../Sem_2305_timer_running_003.ttcn | 26 ++ .../Sem_2305_timer_running_004.ttcn | 26 ++ .../Sem_2305_timer_running_005.ttcn | 31 +++ .../NegSyn_2306_timer_timeout_001.ttcn | 26 ++ .../NegSyn_2306_timer_timeout_002.ttcn | 30 +++ .../NegSyn_2306_timer_timeout_003.ttcn | 25 ++ .../NegSyn_2306_timer_timeout_004.ttcn | 24 ++ .../NegSyn_2306_timer_timeout_005.ttcn | 25 ++ .../NegSyn_2306_timer_timeout_006.ttcn | 25 ++ .../NegSyn_2306_timer_timeout_007.ttcn | 25 ++ .../Sem_2306_timer_timeout_001.ttcn | 33 +++ .../Sem_2306_timer_timeout_002.ttcn | 36 +++ .../Sem_2306_timer_timeout_003.ttcn | 54 ++++ .../Sem_2306_timer_timeout_004.ttcn | 37 +++ .../Sem_2306_timer_timeout_005.ttcn | 65 +++++ .../Sem_2306_timer_timeout_006.ttcn | 61 +++++ .../Sem_2306_timer_timeout_007.ttcn | 37 +++ .../Sem_2306_timer_timeout_008.ttcn | 35 +++ .../Sem_2306_timer_timeout_009.ttcn | 26 ++ .../Syn_2306_timer_timeout_001.ttcn | 42 +++ .../23_toplevel/NegSem_23_toplevel_001.ttcn | 25 ++ .../23_toplevel/NegSem_23_toplevel_002.ttcn | 25 ++ .../23_toplevel/NegSyn_23_toplevel_001.ttcn | 12 + .../23_toplevel/NegSyn_23_toplevel_002.ttcn | 12 + .../23_toplevel/Syn_23_toplevel_001.ttcn | 78 ++++++ .../23_toplevel/Syn_23_toplevel_002.ttcn | 78 ++++++ .../2401_the_verdict_mechanism/NOTES | 11 + .../NegSem_2401_SetverdictError.ttcn | 35 +++ .../Sem_2401_GlobalVerdict_001.ttcn | 37 +++ .../Sem_2401_GlobalVerdict_002.ttcn | 37 +++ .../Sem_2401_GlobalVerdict_003.ttcn | 37 +++ .../Sem_2401_GlobalVerdict_004.ttcn | 37 +++ .../Sem_2401_GlobalVerdict_005.ttcn | 37 +++ .../Sem_2401_GlobalVerdict_006.ttcn | 37 +++ .../Sem_2401_GlobalVerdict_007.ttcn | 37 +++ .../Sem_2401_GlobalVerdict_008.ttcn | 37 +++ .../Sem_2401_GlobalVerdict_009.ttcn | 37 +++ .../Sem_2401_GlobalVerdict_010.ttcn | 37 +++ .../Sem_2401_GlobalVerdict_011.ttcn | 37 +++ .../Sem_2401_GlobalVerdict_012.ttcn | 37 +++ .../Sem_2401_InitiallyNone_001.ttcn | 27 ++ .../Sem_2401_LocalVerdict_001.ttcn | 28 ++ .../Sem_2401_LocalVerdict_002.ttcn | 28 ++ .../Sem_2401_LocalVerdict_003.ttcn | 28 ++ .../Sem_2401_LocalVerdict_004.ttcn | 28 ++ .../Sem_2401_LocalVerdict_005.ttcn | 28 ++ .../Sem_2401_LocalVerdict_006.ttcn | 28 ++ .../Sem_2401_LocalVerdict_007.ttcn | 28 ++ .../Sem_2401_LocalVerdict_008.ttcn | 28 ++ .../Sem_2401_LocalVerdict_009.ttcn | 28 ++ .../Sem_2401_LocalVerdict_010.ttcn | 28 ++ .../Sem_2401_LocalVerdict_011.ttcn | 28 ++ .../Sem_2401_LocalVerdict_012.ttcn | 28 ++ .../Syn_2401_FiveValues_001.ttcn | 22 ++ .../NegSem_2402_setverdict_params_001.ttcn | 22 ++ .../NegSem_2402_setverdict_params_002.ttcn | 24 ++ .../NegSem_2402_setverdict_params_003.ttcn | 22 ++ .../NegSem_2402_setverdict_params_004.ttcn | 22 ++ .../NegSem_2402_setverdict_params_005.ttcn | 22 ++ .../Sem_2402_setverdict_logging_001.ttcn | 22 ++ .../Sem_2402_setverdict_params_001.ttcn | 22 ++ .../Sem_2402_setverdict_params_002.ttcn | 22 ++ .../Sem_2402_setverdict_params_003.ttcn | 22 ++ .../Sem_2403_getverdict_001.ttcn | 30 +++ .../Sem_2403_getverdict_002.ttcn | 28 ++ .../Sem_2403_getverdict_003.ttcn | 31 +++ .../Sem_2403_getverdict_004.ttcn | 28 ++ .../Sem_2403_getverdict_005.ttcn | 31 +++ .../24_toplevel/NegSem_24_toplevel_001.ttcn | 24 ++ .../24_toplevel/NegSem_24_toplevel_002.ttcn | 22 ++ .../24_toplevel/NegSem_24_toplevel_003.ttcn | 22 ++ .../24_toplevel/NegSem_24_toplevel_004.ttcn | 26 ++ .../24_toplevel/NegSem_24_toplevel_005.ttcn | 25 ++ .../24_toplevel/Syn_24_toplevel_001.ttcn | 32 +++ .../24_toplevel/Syn_24_toplevel_002.ttcn | 30 +++ .../24_toplevel/Syn_24_toplevel_003.ttcn | 39 +++ .../NegSem_2601_ExecuteStatement_001.ttcn | 20 ++ .../NegSem_2601_ExecuteStatement_002.ttcn | 20 ++ .../NegSem_2601_ExecuteStatement_003.ttcn | 22 ++ .../NegSem_2601_ExecuteStatement_004.ttcn | 21 ++ .../Sem_2601_ExecuteStatement_001.ttcn | 25 ++ .../Sem_2601_ExecuteStatement_002.ttcn | 28 ++ .../Sem_2601_ExecuteStatement_003.ttcn | 26 ++ .../Sem_2601_ExecuteStatement_004.ttcn | 31 +++ .../Sem_2601_ExecuteStatement_005.ttcn | 31 +++ .../Sem_2601_ExecuteStatement_006.ttcn | 31 +++ .../Sem_2601_ExecuteStatement_007.ttcn | 23 ++ .../Sem_2601_ExecuteStatement_008.ttcn | 22 ++ .../Sem_2601_ExecuteStatement_009.ttcn | 21 ++ .../Sem_2601_ExecuteStatement_010.ttcn | 39 +++ .../NegSem_2602_TheControlPart_001.ttcn | 16 ++ .../NegSem_2602_TheControlPart_002.ttcn | 22 ++ .../NegSem_2602_TheControlPart_003.ttcn | 22 ++ .../NegSem_2602_TheControlPart_004.ttcn | 31 +++ .../NegSem_2602_TheControlPart_005.ttcn | 32 +++ .../NegSem_2602_TheControlPart_006.ttcn | 32 +++ .../NegSem_2602_TheControlPart_007.ttcn | 33 +++ .../NegSem_2602_TheControlPart_008.ttcn | 33 +++ .../NegSem_2602_TheControlPart_009.ttcn | 32 +++ .../NegSem_2602_TheControlPart_010.ttcn | 33 +++ .../NegSem_2602_TheControlPart_011.ttcn | 34 +++ .../NegSem_2602_TheControlPart_012.ttcn | 34 +++ .../NegSem_2602_TheControlPart_013.ttcn | 34 +++ .../NegSem_2602_TheControlPart_014.ttcn | 34 +++ .../NegSem_2602_TheControlPart_015.ttcn | 29 +++ .../NegSem_2602_TheControlPart_016.ttcn | 29 +++ .../NegSem_2602_TheControlPart_017.ttcn | 33 +++ .../NegSem_2602_TheControlPart_018.ttcn | 32 +++ .../NegSem_2602_TheControlPart_019.ttcn | 34 +++ .../NegSem_2602_TheControlPart_020.ttcn | 30 +++ .../NegSem_2602_TheControlPart_021.ttcn | 31 +++ .../NegSem_2602_TheControlPart_022.ttcn | 30 +++ .../NegSem_2602_TheControlPart_023.ttcn | 30 +++ .../NegSem_2602_TheControlPart_024.ttcn | 30 +++ .../NegSem_2602_TheControlPart_025.ttcn | 30 +++ .../NegSem_2602_TheControlPart_026.ttcn | 30 +++ .../NegSem_2602_TheControlPart_027.ttcn | 30 +++ .../NegSem_2602_TheControlPart_028.ttcn | 30 +++ .../NegSem_2602_TheControlPart_029.ttcn | 30 +++ .../NegSem_2602_TheControlPart_030.ttcn | 17 ++ .../NegSem_2602_TheControlPart_031.ttcn | 26 ++ .../NegSem_2602_TheControlPart_032.ttcn | 22 ++ .../NegSem_2602_TheControlPart_033.ttcn | 22 ++ .../NegSem_2602_TheControlPart_034.ttcn | 21 ++ .../NegSem_2602_TheControlPart_035.ttcn | 16 ++ .../Sem_2602_TheControlPart_001.ttcn | 34 +++ .../Sem_2602_TheControlPart_002.ttcn | 24 ++ .../Sem_2602_TheControlPart_003.ttcn | 29 +++ .../26_toplevel/Syn_26_ModuleControl_001.ttcn | 14 + .../26_toplevel/Syn_26_ModuleControl_002.ttcn | 18 ++ .../26_toplevel/Syn_26_ModuleControl_003.ttcn | 25 ++ .../26_toplevel/Syn_26_ModuleControl_004.ttcn | 16 ++ .../26_toplevel/Syn_26_ModuleControl_005.ttcn | 17 ++ .../26_toplevel/Syn_26_ModuleControl_006.ttcn | 21 ++ .../26_toplevel/Syn_26_ModuleControl_007.ttcn | 14 + .../26_toplevel/Syn_26_ModuleControl_008.ttcn | 16 ++ .../26_toplevel/Syn_26_ModuleControl_009.ttcn | 16 ++ .../26_toplevel/Syn_26_ModuleControl_010.ttcn | 14 + .../26_toplevel/Syn_26_ModuleControl_011.ttcn | 20 ++ .../26_toplevel/Syn_26_ModuleControl_012.ttcn | 20 ++ .../26_toplevel/Syn_26_ModuleControl_013.ttcn | 23 ++ .../26_toplevel/Syn_26_ModuleControl_015.ttcn | 29 +++ .../26_toplevel/Syn_26_ModuleControl_016.ttcn | 14 + .../26_toplevel/Syn_26_ModuleControl_017.ttcn | 19 ++ .../Syn_270101_ScopeOfAttributes_001.ttcn | 16 ++ .../Syn_270101_ScopeOfAttributes_002.ttcn | 22 ++ .../Syn_270101_ScopeOfAttributes_003.ttcn | 26 ++ .../Syn_270101_ScopeOfAttributes_004.ttcn | 28 ++ .../Syn_270101_ScopeOfAttributes_005.ttcn | 27 ++ .../Sem_27010200_general_001.ttcn | 36 +++ .../Sem_27010200_general_002.ttcn | 39 +++ .../Sem_27010200_general_003.ttcn | 41 +++ .../Sem_27010200_general_004.ttcn | 33 +++ .../Sem_27010200_general_005.ttcn | 43 ++++ .../Sem_27010200_general_006.ttcn | 43 ++++ .../Sem_27010200_general_007.ttcn | 42 +++ .../Sem_27010200_general_008.ttcn | 42 +++ .../Sem_27010200_general_009.ttcn | 43 ++++ .../Sem_27010200_general_010.ttcn | 42 +++ .../Sem_27010200_general_011.ttcn | 40 +++ .../Sem_27010200_general_012.ttcn | 41 +++ .../Sem_27010200_general_013.ttcn | 44 ++++ .../Sem_27010200_general_014.ttcn | 44 ++++ .../Sem_27010200_general_015.ttcn | 43 ++++ .../Sem_27010200_general_016.ttcn | 49 ++++ ...0201_rules_for_variant_attributes_001.ttcn | 43 ++++ ...0201_rules_for_variant_attributes_002.ttcn | 38 +++ ...0201_rules_for_variant_attributes_003.ttcn | 38 +++ ...0202_rules_for_multiple_encodings_001.ttcn | 48 ++++ ...0202_rules_for_multiple_encodings_002.ttcn | 47 ++++ ...3_attributes_of_imported_elements_001.ttcn | 43 ++++ .../NegSem_2702_the_with_statement_001.ttcn | 37 +++ .../NegSem_2702_the_with_statement_002.ttcn | 38 +++ .../NegSem_2702_the_with_statement_003.ttcn | 39 +++ .../NegSem_2702_the_with_statement_004.ttcn | 40 +++ .../NegSem_2702_the_with_statement_005.ttcn | 46 ++++ .../NegSem_2702_the_with_statement_006.ttcn | 42 +++ .../NegSem_2702_the_with_statement_007.ttcn | 42 +++ .../NegSem_2702_the_with_statement_008.ttcn | 32 +++ .../NegSem_2702_the_with_statement_009.ttcn | 30 +++ .../NegSem_2702_the_with_statement_010.ttcn | 34 +++ .../NegSem_2702_the_with_statement_011.ttcn | 32 +++ .../NegSyn_2702_the_with_statement_001.ttcn | 37 +++ .../Sem_2702_the_with_statement_001.ttcn | 36 +++ .../Sem_2702_the_with_statement_002.ttcn | 37 +++ .../Sem_2702_the_with_statement_003.ttcn | 38 +++ .../Sem_2702_the_with_statement_004.ttcn | 38 +++ .../Sem_2702_the_with_statement_005.ttcn | 43 ++++ .../Sem_2702_the_with_statement_006.ttcn | 39 +++ .../Sem_2702_the_with_statement_007.ttcn | 44 ++++ .../Sem_2702_the_with_statement_008.ttcn | 43 ++++ .../NegSem_2703_display_attributes_001.ttcn | 36 +++ .../NegSem_2703_display_attributes_002.ttcn | 36 +++ .../NegSem_2703_display_attributes_003.ttcn | 36 +++ .../Sem_2703_display_attributes_001.ttcn | 35 +++ .../Sem_2704_encoding_attributes_001.ttcn | 45 ++++ .../Sem_2704_encoding_attributes_002.ttcn | 37 +++ .../NegSem_2705_variant_attributes_001.ttcn | 38 +++ .../NegSem_2705_variant_attributes_002.ttcn | 34 +++ .../NegSem_2705_variant_attributes_003.ttcn | 34 +++ .../Sem_2705_variant_attributes_001.ttcn | 39 +++ .../Sem_2705_variant_attributes_002.ttcn | 36 +++ .../Sem_2705_variant_attributes_003.ttcn | 44 ++++ .../Sem_2705_variant_attributes_004.ttcn | 42 +++ .../Sem_2706_extension_attributes_001.ttcn | 34 +++ .../Sem_2706_extension_attributes_002.ttcn | 38 +++ .../NegSem_2707_OptionalAttributes_001.ttcn | 95 +++++++ .../NegSem_2707_OptionalAttributes_002.ttcn | 94 +++++++ .../NegSem_2707_OptionalAttributes_003.ttcn | 103 ++++++++ .../Sem_2707_OptionalAttributes_001.ttcn | 104 ++++++++ .../Sem_2707_OptionalAttributes_002.ttcn | 103 ++++++++ .../Sem_2707_OptionalAttributes_003.ttcn | 103 ++++++++ .../Sem_2707_OptionalAttributes_004.ttcn | 103 ++++++++ .../Sem_2707_OptionalAttributes_005.ttcn | 104 ++++++++ .../Sem_2707_OptionalAttributes_006.ttcn | 103 ++++++++ .../Sem_2707_OptionalAttributes_007.ttcn | 103 ++++++++ .../Syn_2707_OptionalAttributes_001.ttcn | 93 +++++++ ...NegSem_2709_dynamic_configuration_001.ttcn | 56 ++++ ...NegSem_2709_dynamic_configuration_002.ttcn | 56 ++++ ...NegSem_2709_dynamic_configuration_003.ttcn | 50 ++++ ...NegSem_2709_dynamic_configuration_004.ttcn | 45 ++++ .../Sem_2709_dynamic_configuration_001.ttcn | 46 ++++ .../Sem_2709_dynamic_configuration_002.ttcn | 47 ++++ .../Sem_2709_dynamic_configuration_003.ttcn | 46 ++++ .../Sem_2709_dynamic_configuration_004.ttcn | 44 ++++ .../27_specifying_attributes/NOTES | 4 + .../NegSem_B010101_omitting_values_001.ttcn | 59 +++++ .../Sem_B010101_omitting_values_001.ttcn | 67 +++++ .../Sem_B010101_omitting_values_002.ttcn | 67 +++++ ...Sem_B0101_matching_specific_value_001.ttcn | 103 ++++++++ ...Sem_B0101_matching_specific_value_002.ttcn | 103 ++++++++ ...Sem_B0101_matching_specific_value_003.ttcn | 103 ++++++++ ...Sem_B0101_matching_specific_value_004.ttcn | 103 ++++++++ ...Sem_B0101_matching_specific_value_005.ttcn | 103 ++++++++ ...Sem_B0101_matching_specific_value_006.ttcn | 103 ++++++++ ...Sem_B0101_matching_specific_value_007.ttcn | 103 ++++++++ ...Sem_B0101_matching_specific_value_008.ttcn | 103 ++++++++ ...Sem_B0101_matching_specific_value_009.ttcn | 103 ++++++++ ...Sem_B0101_matching_specific_value_010.ttcn | 103 ++++++++ ...Sem_B0101_matching_specific_value_011.ttcn | 103 ++++++++ .../NegSem_B010201_value_list_001.ttcn | 53 ++++ .../NegSem_B010201_value_list_002.ttcn | 52 ++++ .../NegSem_B010201_value_list_003.ttcn | 52 ++++ .../NegSem_B010201_value_list_004.ttcn | 57 +++++ .../Sem_B010201_value_list_001.ttcn | 78 ++++++ .../Sem_B010201_value_list_002.ttcn | 52 ++++ .../Sem_B010201_value_list_003.ttcn | 51 ++++ .../Sem_B010201_value_list_004.ttcn | 54 ++++ ...m_B010202_complemented_value_list_001.ttcn | 59 +++++ ...m_B010202_complemented_value_list_002.ttcn | 61 +++++ ...m_B010202_complemented_value_list_003.ttcn | 73 ++++++ ...m_B010202_complemented_value_list_004.ttcn | 46 ++++ ...m_B010202_complemented_value_list_001.ttcn | 78 ++++++ ...m_B010202_complemented_value_list_002.ttcn | 78 ++++++ ...m_B010202_complemented_value_list_003.ttcn | 78 ++++++ ...m_B010202_complemented_value_list_004.ttcn | 78 ++++++ ...m_B010202_complemented_value_list_005.ttcn | 78 ++++++ ...m_B010202_complemented_value_list_006.ttcn | 78 ++++++ ...m_B010202_complemented_value_list_007.ttcn | 81 ++++++ ...m_B010202_complemented_value_list_008.ttcn | 54 ++++ .../Sem_B010203_any_value_001.ttcn | 82 ++++++ .../Sem_B010203_any_value_002.ttcn | 84 ++++++ .../NegSem_B010204_any_value_or_none_001.ttcn | 73 ++++++ .../NegSem_B010204_any_value_or_none_002.ttcn | 76 ++++++ .../Sem_B010204_any_value_or_none_001.ttcn | 81 ++++++ .../Sem_B010204_any_value_or_none_002.ttcn | 33 +++ .../Sem_B010204_any_value_or_none_003.ttcn | 36 +++ .../Sem_B010204_any_value_or_none_004.ttcn | 38 +++ .../Sem_B010204_any_value_or_none_005.ttcn | 38 +++ .../NegSem_B010205_value_range_001.ttcn | 67 +++++ .../NegSem_B010205_value_range_002.ttcn | 67 +++++ .../NegSem_B010205_value_range_003.ttcn | 67 +++++ .../Sem_B010205_value_range_001.ttcn | 75 ++++++ .../Sem_B010205_value_range_002.ttcn | 75 ++++++ .../Sem_B010205_value_range_003.ttcn | 75 ++++++ .../Sem_B010205_value_range_004.ttcn | 75 ++++++ .../Sem_B010205_value_range_005.ttcn | 75 ++++++ .../Sem_B010205_value_range_006.ttcn | 75 ++++++ .../Sem_B010205_value_range_007.ttcn | 75 ++++++ .../Sem_B010205_value_range_008.ttcn | 75 ++++++ .../NegSem_B010206_superset_001.ttcn | 36 +++ .../NegSem_B010206_superset_002.ttcn | 40 +++ .../NegSem_B010206_superset_003.ttcn | 45 ++++ .../NegSem_B010206_superset_004.ttcn | 45 ++++ .../NegSem_B010206_superset_005.ttcn | 54 ++++ .../NegSem_B010206_superset_006.ttcn | 53 ++++ .../NegSem_B010206_superset_007.ttcn | 53 ++++ .../NegSem_B010206_superset_008.ttcn | 53 ++++ .../NegSem_B010206_superset_009.ttcn | 53 ++++ .../Sem_B010206_superset_001.ttcn | 53 ++++ .../Sem_B010206_superset_002.ttcn | 53 ++++ .../Sem_B010206_superset_003.ttcn | 53 ++++ .../Sem_B010206_superset_004.ttcn | 51 ++++ .../Sem_B010206_superset_005.ttcn | 53 ++++ .../Sem_B010206_superset_006.ttcn | 54 ++++ .../Sem_B010206_superset_007.ttcn | 53 ++++ .../Sem_B010206_superset_008.ttcn | 52 ++++ .../NegSem_B010207_subset_001.ttcn | 36 +++ .../NegSem_B010207_subset_002.ttcn | 50 ++++ .../NegSem_B010207_subset_003.ttcn | 49 ++++ .../NegSem_B010207_subset_004.ttcn | 53 ++++ .../NegSem_B010207_subset_005.ttcn | 53 ++++ .../NegSem_B010207_subset_006.ttcn | 53 ++++ .../NegSem_B010207_subset_007.ttcn | 53 ++++ .../NegSem_B010207_subset_008.ttcn | 54 ++++ .../Sem_B010207_subset_001.ttcn | 53 ++++ .../Sem_B010207_subset_002.ttcn | 53 ++++ .../Sem_B010207_subset_003.ttcn | 53 ++++ .../Sem_B010207_subset_004.ttcn | 49 ++++ .../Sem_B010207_subset_005.ttcn | 52 ++++ .../Sem_B010207_subset_006.ttcn | 53 ++++ .../Sem_B010207_subset_007.ttcn | 50 ++++ .../Sem_B010207_subset_008.ttcn | 50 ++++ .../NegSem_B010208_omit_value_001.ttcn | 82 ++++++ .../NegSem_B010208_omit_value_002.ttcn | 82 ++++++ .../NegSyn_B010208_omit_value_001.ttcn | 19 ++ .../Sem_B010208_omit_value_001.ttcn | 82 ++++++ .../Sem_B010208_omit_value_002.ttcn | 84 ++++++ .../Sem_B010208_omit_value_003.ttcn | 64 +++++ .../Sem_B010208_omit_value_004.ttcn | 65 +++++ .../Sem_B010208_omit_value_005.ttcn | 70 +++++ .../Sem_B010209_decoded_content_001.ttcn | 67 +++++ .../Sem_B010209_decoded_content_002.ttcn | 63 +++++ .../Sem_B010209_decoded_content_003.ttcn | 68 +++++ .../Sem_B010209_decoded_content_004.ttcn | 55 ++++ .../Sem_B010209_decoded_content_005.ttcn | 55 ++++ ...Sem_B010210_enumerated_value_list_001.ttcn | 53 ++++ .../Sem_B010301_any_element_001.ttcn | 59 +++++ .../Sem_B010301_any_element_002.ttcn | 59 +++++ .../Sem_B010301_any_element_003.ttcn | 59 +++++ .../Sem_B010301_any_element_004.ttcn | 59 +++++ .../Sem_B010301_any_element_005.ttcn | 59 +++++ .../Sem_B010301_any_element_006.ttcn | 53 ++++ .../Sem_B010301_any_element_007.ttcn | 53 ++++ .../Sem_B010301_any_element_008.ttcn | 53 ++++ ...02_any_number_of_elements_or_none_001.ttcn | 59 +++++ ...02_any_number_of_elements_or_none_002.ttcn | 59 +++++ ...02_any_number_of_elements_or_none_003.ttcn | 59 +++++ .../NegSem_B010303_permutation_001.ttcn | 59 +++++ .../NegSem_B010303_permutation_002.ttcn | 35 +++ .../NegSem_B010303_permutation_003.ttcn | 34 +++ .../NegSem_B010303_permutation_004.ttcn | 38 +++ .../NegSem_B010303_permutation_005.ttcn | 36 +++ .../NegSem_B010303_permutation_006.ttcn | 39 +++ .../Sem_B010303_permutation_001.ttcn | 62 +++++ .../Sem_B010303_permutation_002.ttcn | 62 +++++ .../Sem_B010303_permutation_003.ttcn | 62 +++++ .../Sem_B010303_permutation_004.ttcn | 62 +++++ .../Sem_B010303_permutation_005.ttcn | 62 +++++ .../Sem_B010303_permutation_006.ttcn | 66 +++++ .../Sem_B010303_permutation_007.ttcn | 36 +++ .../Sem_B010303_permutation_008.ttcn | 38 +++ .../Sem_B010303_permutation_009.ttcn | 62 +++++ ...egSem_B010401_length_restrictions_003.ttcn | 64 +++++ ...egSem_B010401_length_restrictions_004.ttcn | 64 +++++ .../Sem_B010401_length_restrictions_001.ttcn | 68 +++++ .../Sem_B010401_length_restrictions_002.ttcn | 62 +++++ .../Sem_B010401_length_restrictions_003.ttcn | 68 +++++ .../Sem_B010401_length_restrictions_004.ttcn | 68 +++++ ...egSem_B010402_ifPresent_indicator_001.ttcn | 66 +++++ .../Sem_B010402_ifPresent_indicator_001.ttcn | 75 ++++++ .../Sem_B010402_ifPresent_indicator_002.ttcn | 75 ++++++ .../Sem_B010501_set_expression_001.ttcn | 59 +++++ .../Sem_B010501_set_expression_002.ttcn | 59 +++++ .../Sem_B010501_set_expression_003.ttcn | 59 +++++ .../Sem_B010501_set_expression_004.ttcn | 59 +++++ .../Sem_B010501_set_expression_005.ttcn | 59 +++++ .../Sem_B010501_set_expression_006.ttcn | 56 ++++ .../Sem_B010502_reference_expression_001.ttcn | 77 ++++++ .../Sem_B010502_reference_expression_002.ttcn | 77 ++++++ .../Sem_B010502_reference_expression_003.ttcn | 77 ++++++ .../Sem_B010502_reference_expression_004.ttcn | 77 ++++++ .../Sem_B010502_reference_expression_005.ttcn | 79 ++++++ .../Sem_B010502_reference_expression_006.ttcn | 77 ++++++ .../Sem_B010502_reference_expression_007.ttcn | 77 ++++++ .../Sem_B010502_reference_expression_008.ttcn | 77 ++++++ .../Sem_B010502_reference_expression_009.ttcn | 54 ++++ .../Sem_B010502_reference_expression_010.ttcn | 60 +++++ .../Sem_B010502_reference_expression_011.ttcn | 60 +++++ .../Sem_B010503_match_n_times_001.ttcn | 65 +++++ .../Sem_B010503_match_n_times_002.ttcn | 65 +++++ .../Sem_B010503_match_n_times_003.ttcn | 65 +++++ .../Sem_B010503_match_n_times_004.ttcn | 65 +++++ .../Sem_B010503_match_n_times_005.ttcn | 65 +++++ ...10504_match_referenced_characters_001.ttcn | 68 +++++ ...10504_match_referenced_characters_001.ttcn | 76 ++++++ ...10504_match_referenced_characters_002.ttcn | 76 ++++++ ...10504_match_referenced_characters_003.ttcn | 76 ++++++ ...10504_match_referenced_characters_004.ttcn | 76 ++++++ ...10504_match_referenced_characters_005.ttcn | 74 ++++++ ...10504_match_referenced_characters_006.ttcn | 74 ++++++ ...10504_match_referenced_characters_007.ttcn | 76 ++++++ ...Syn_B010505_pattern_compatibility_001.ttcn | 23 ++ ...Sem_B010505_pattern_compatibility_001.ttcn | 80 ++++++ ...Sem_B010505_pattern_compatibility_002.ttcn | 80 ++++++ ...6_case_sensitive_pattern_matching_001.ttcn | 87 +++++++ ...6_case_sensitive_pattern_matching_002.ttcn | 62 +++++ .../Sem_B0105_toplevel_001.ttcn | 65 +++++ .../Sem_B0105_toplevel_002.ttcn | 59 +++++ .../Sem_C0602_The_hostid_function_001.ttcn | 46 ++++ ...m_C0602_The_testcasename_function_001.ttcn | 29 +++ .../C_predefined_functions/NOTES | 1 + .../Sem_D01_macro_module_001.ttcn | 26 ++ .../Sem_D02_macro_file_001.ttcn | 28 ++ .../Sem_D03_macro_bfile_001.ttcn | 26 ++ .../Sem_D04_macro_line_001.ttcn | 27 ++ .../NegSem_D05_macro_scope_001.ttcn | 31 +++ .../Sem_D05_macro_scope_001.ttcn | 26 ++ .../Sem_D05_macro_scope_002.ttcn | 35 +++ ATS/core_language/NOTES | 11 + ATS/core_language/PROGRESS_FILE.txt | 105 ++++++++ .../Pos_050101_namespaces_001.ttcn | 88 +++++++ .../Pos_050101_namespaces_001.xml | 2 + .../Pos_050101_namespaces_001.xsd | 6 + .../Pos_050101_namespaces_002.ttcn | 91 +++++++ .../Pos_050101_namespaces_002.xml | 2 + .../Pos_050101_namespaces_002.xsd | 5 + .../Pos_050101_namespaces_003.ttcn | 87 +++++++ .../Pos_050101_namespaces_003.xml | 2 + .../Pos_050101_namespaces_003.xsd | 6 + .../Pos_050101_namespaces_003_1.xsd | 6 + .../Pos_050101_namespaces_003/XmlDiff.log | 114 +++++++++ .../Pos_050101_namespaces_003_merged.xsd | 13 + .../Pos_050101_namespaces_004.ttcn | 91 +++++++ .../Pos_050101_namespaces_004.xml | 2 + .../Pos_050101_namespaces_004.xsd | 4 + .../Pos_050101_namespaces_004_1.xsd | 4 + .../Pos_050101_namespaces_004_merged.xsd | 5 + .../Pos_050102_includes_001.ttcn | 85 ++++++ .../Pos_050102_includes_001.xml | 2 + .../Pos_050102_includes_001.xsd | 7 + .../Pos_050102_includes_001_1.xsd | 6 + .../Pos_050102_includes_002.ttcn | 88 +++++++ .../Pos_050102_includes_002.xml | 2 + .../Pos_050102_includes_002.xsd | 7 + .../Pos_050102_includes_002_1.xsd | 5 + .../Pos_050102_includes_003.ttcn | 88 +++++++ .../Pos_050102_includes_003.xml | 2 + .../Pos_050102_includes_003.xsd | 7 + .../Pos_050102_includes_003_1.xsd | 5 + .../Neg_050103_imports_001.ttcn | 51 ++++ .../Neg_050103_imports_001.xsd | 7 + .../Neg_050103_imports_001_1.xsd | 6 + .../Pos_050103_imports_001.ttcn | 91 +++++++ .../Pos_050103_imports_001.xml | 2 + .../Pos_050103_imports_001.xsd | 8 + .../Pos_050103_imports_001_1.xsd | 8 + ...ributes_of_the_xsd_schema_element_001.ttcn | 94 +++++++ ...tributes_of_the_xsd_schema_element_001.xml | 5 + ...tributes_of_the_xsd_schema_element_001.xsd | 14 + ...ributes_of_the_xsd_schema_element_002.ttcn | 93 +++++++ ...tributes_of_the_xsd_schema_element_002.xml | 5 + ...tributes_of_the_xsd_schema_element_002.xsd | 14 + ...ributes_of_the_xsd_schema_element_003.ttcn | 95 +++++++ ...tributes_of_the_xsd_schema_element_003.xml | 5 + ...tributes_of_the_xsd_schema_element_003.xsd | 14 + ...ributes_of_the_xsd_schema_element_004.ttcn | 93 +++++++ ...tributes_of_the_xsd_schema_element_004.xml | 4 + ...tributes_of_the_xsd_schema_element_004.xsd | 13 + ...ributes_of_the_xsd_schema_element_005.ttcn | 93 +++++++ ...tributes_of_the_xsd_schema_element_005.xml | 4 + ...tributes_of_the_xsd_schema_element_005.xsd | 14 + ...ributes_of_the_xsd_schema_element_006.ttcn | 95 +++++++ ...tributes_of_the_xsd_schema_element_006.xml | 4 + ...tributes_of_the_xsd_schema_element_006.xsd | 14 + .../Pos_050101_namespaces_004.xml | 2 + .../Pos_050202_name_conversion_rules_001.ttcn | 90 +++++++ .../Pos_050202_name_conversion_rules_001.xml | 4 + .../Pos_050202_name_conversion_rules_001.xsd | 12 + .../Pos_050202_name_conversion_rules_002.ttcn | 90 +++++++ .../Pos_050202_name_conversion_rules_002.xml | 4 + .../Pos_050202_name_conversion_rules_002.xsd | 12 + .../Pos_050202_name_conversion_rules_003.ttcn | 91 +++++++ .../Pos_050202_name_conversion_rules_003.xml | 4 + .../Pos_050202_name_conversion_rules_003.xsd | 12 + .../Pos_050202_name_conversion_rules_004.ttcn | 90 +++++++ .../Pos_050202_name_conversion_rules_004.xml | 4 + .../Pos_050202_name_conversion_rules_004.xsd | 12 + .../Pos_050202_name_conversion_rules_005.ttcn | 85 ++++++ .../Pos_050202_name_conversion_rules_005.xml | 2 + .../Pos_050202_name_conversion_rules_005.xsd | 6 + .../Pos_050202_name_conversion_rules_006.ttcn | 86 +++++++ .../Pos_050202_name_conversion_rules_006.xml | 2 + .../Pos_050202_name_conversion_rules_006.xsd | 6 + .../Pos_050202_name_conversion_rules_007.ttcn | 90 +++++++ .../Pos_050202_name_conversion_rules_007.xml | 4 + .../Pos_050202_name_conversion_rules_007.xsd | 13 + .../Pos_050202_name_conversion_rules_008.ttcn | 86 +++++++ .../Pos_050202_name_conversion_rules_008.xml | 2 + .../Pos_050202_name_conversion_rules_008.xsd | 18 ++ .../Pos_050202_name_conversion_rules_009.ttcn | 90 +++++++ .../Pos_050202_name_conversion_rules_009.xml | 4 + .../Pos_050202_name_conversion_rules_009.xsd | 13 + .../Pos_050202_name_conversion_rules_010.ttcn | 86 +++++++ .../Pos_050202_name_conversion_rules_010.xml | 2 + .../Pos_050202_name_conversion_rules_010.xsd | 18 ++ .../Pos_050202_name_conversion_rules_011.ttcn | 85 ++++++ .../Pos_050202_name_conversion_rules_011.xml | 2 + .../Pos_050202_name_conversion_rules_011.xsd | 6 + .../Pos_050202_name_conversion_rules_012.ttcn | 85 ++++++ .../Pos_050202_name_conversion_rules_012.xml | 4 + .../Pos_050202_name_conversion_rules_012.xsd | 12 + .../Pos_050202_name_conversion_rules_013.ttcn | 85 ++++++ .../Pos_050202_name_conversion_rules_013.xml | 2 + .../Pos_050202_name_conversion_rules_013.xsd | 13 + .../Pos_050202_name_conversion_rules_014.ttcn | 93 +++++++ .../Pos_050202_name_conversion_rules_014.xml | 2 + .../Pos_050202_name_conversion_rules_014.xsd | 8 + .../Pos_050202_name_conversion_rules_015.ttcn | 93 +++++++ .../Pos_050202_name_conversion_rules_015.xml | 2 + .../Pos_050202_name_conversion_rules_015.xsd | 6 + .../Pos_050202_name_conversion_rules_016.ttcn | 93 +++++++ .../Pos_050202_name_conversion_rules_016.xml | 2 + .../Pos_050202_name_conversion_rules_016.xsd | 7 + ...Pos_050202_name_conversion_rules_016_1.xsd | 6 + .../Pos_050202_name_conversion_rules_017.ttcn | 98 +++++++ .../Pos_050202_name_conversion_rules_017.xml | 6 + .../Pos_050202_name_conversion_rules_017.xsd | 14 + .../Pos_050202_name_conversion_rules_018.ttcn | 89 +++++++ .../Pos_050202_name_conversion_rules_018.xml | 4 + .../Pos_050202_name_conversion_rules_018.xsd | 14 + .../Pos_050202_name_conversion_rules_019.ttcn | 89 +++++++ .../Pos_050202_name_conversion_rules_019.xml | 4 + .../Pos_050202_name_conversion_rules_019.xsd | 14 + .../Pos_050202_name_conversion_rules_020.ttcn | 94 +++++++ .../Pos_050202_name_conversion_rules_020.xml | 2 + .../Pos_050202_name_conversion_rules_020.xsd | 15 ++ .../Pos_050202_name_conversion_rules_021.ttcn | 86 +++++++ .../Pos_050202_name_conversion_rules_021.xml | 2 + .../Pos_050202_name_conversion_rules_021.xsd | 13 + .../Pos_050202_name_conversion_rules_022.ttcn | 86 +++++++ .../Pos_050202_name_conversion_rules_022.xml | 2 + .../Pos_050202_name_conversion_rules_022.xsd | 13 + .../Pos_050202_name_conversion_rules_023.ttcn | 93 +++++++ .../Pos_050202_name_conversion_rules_023.xml | 2 + .../Pos_050202_name_conversion_rules_023.xsd | 6 + ...Pos_050202_name_conversion_rules_023_1.xsd | 6 + .../Pos_050202_name_conversion_rules_024.ttcn | 94 +++++++ .../Pos_050202_name_conversion_rules_024.xml | 2 + .../Pos_050202_name_conversion_rules_024.xsd | 6 + ...Pos_050202_name_conversion_rules_024_1.xsd | 6 + .../Pos_050202_name_conversion_rules_025.ttcn | 93 +++++++ .../Pos_050202_name_conversion_rules_025.xml | 2 + .../Pos_050202_name_conversion_rules_025.xsd | 6 + ...Pos_050202_name_conversion_rules_025_1.xsd | 6 + .../Pos_050203_order_of_the_mapping_001.ttcn | 92 +++++++ .../Pos_050203_order_of_the_mapping_001.xml | 2 + .../Pos_050203_order_of_the_mapping_001.xsd | 16 ++ .../Pos_050203_order_of_the_mapping_002.ttcn | 94 +++++++ .../Pos_050203_order_of_the_mapping_002.xml | 2 + .../Pos_050203_order_of_the_mapping_002.xsd | 8 + .../Pos_050203_order_of_the_mapping_003.ttcn | 92 +++++++ .../Pos_050203_order_of_the_mapping_003.xml | 2 + .../Pos_050203_order_of_the_mapping_003.xsd | 9 + .../Pos_050203_order_of_the_mapping_004.ttcn | 80 ++++++ .../Pos_050203_order_of_the_mapping_004.xml | 10 + .../Pos_050203_order_of_the_mapping_004.xsd | 17 ++ .../Pos_050203_order_of_the_mapping_004_1.xsd | 10 + .../Pos_050203_order_of_the_mapping_004_2.xsd | 10 + .../Pos_050203_order_of_the_mapping_005.ttcn | 80 ++++++ .../Pos_050203_order_of_the_mapping_005.xml | 8 + .../Pos_050203_order_of_the_mapping_005.xsd | 17 ++ .../Pos_050203_order_of_the_mapping_005_1.xsd | 6 + .../Pos_050203_order_of_the_mapping_005_2.xsd | 6 + .../Neg_05_top_level_001.ttcn | 51 ++++ .../Neg_05_top_level_001.xsd | 6 + .../Neg_060101_length_001.ttcn | 45 ++++ .../Neg_060101_length_001.xsd | 11 + .../Pos_060101_length_001.ttcn | 79 ++++++ .../Pos_060101_length_001.xml | 4 + .../Pos_060101_length_001.xsd | 11 + .../Pos_060101_length_002.ttcn | 79 ++++++ .../Pos_060101_length_002.xml | 4 + .../Pos_060101_length_002.xsd | 11 + .../Neg_060102_minlength_001.ttcn | 45 ++++ .../Neg_060102_minlength_001.xsd | 12 + .../Pos_060102_minlength_001.ttcn | 79 ++++++ .../Pos_060102_minlength_001.xml | 3 + .../Pos_060102_minlength_001.xsd | 12 + .../Neg_060103_maxlength_001.ttcn | 45 ++++ .../Neg_060103_maxlength_001.xsd | 12 + .../Pos_060103_maxlength_001.ttcn | 79 ++++++ .../Pos_060103_maxlength_001.xml | 3 + .../Pos_060103_maxlength_001.xsd | 12 + .../Neg_060104_pattern_001.ttcn | 45 ++++ .../Neg_060104_pattern_001.xsd | 12 + .../Pos_060104_pattern_001.ttcn | 79 ++++++ .../Pos_060104_pattern_001.xml | 3 + .../Pos_060104_pattern_001.xsd | 12 + .../Neg_060105_enumeration_001.ttcn | 46 ++++ .../Neg_060105_enumeration_001.xsd | 17 ++ .../Neg_060105_enumeration_002.ttcn | 46 ++++ .../Neg_060105_enumeration_002.xsd | 19 ++ .../Neg_060105_enumeration_003.ttcn | 46 ++++ .../Neg_060105_enumeration_003.xsd | 17 ++ .../Neg_060105_enumeration_004.ttcn | 46 ++++ .../Neg_060105_enumeration_004.xml | 2 + .../Neg_060105_enumeration_004.xsd | 26 ++ .../Pos_060105_enumeration_001.ttcn | 81 ++++++ .../Pos_060105_enumeration_001.xml | 4 + .../Pos_060105_enumeration_001.xsd | 12 + .../Pos_060105_enumeration_002.ttcn | 82 ++++++ .../Pos_060105_enumeration_002.xml | 4 + .../Pos_060105_enumeration_002.xsd | 15 ++ .../Pos_060105_enumeration_003.ttcn | 81 ++++++ .../Pos_060105_enumeration_003.xml | 4 + .../Pos_060105_enumeration_003.xsd | 13 + .../Pos_060105_enumeration_004.ttcn | 82 ++++++ .../Pos_060105_enumeration_004.xml | 4 + .../Pos_060105_enumeration_004.xsd | 17 ++ .../Pos_060105_enumeration_005.ttcn | 82 ++++++ .../Pos_060105_enumeration_005.xml | 4 + .../Pos_060105_enumeration_005.xsd | 19 ++ .../Pos_060105_enumeration_006.ttcn | 80 ++++++ .../Pos_060105_enumeration_006.xml | 2 + .../Pos_060105_enumeration_006.xsd | 26 ++ .../Pos_060106_whitespace_001.ttcn | 79 ++++++ .../Pos_060106_whitespace_001.xml | 3 + .../Pos_060106_whitespace_001.xsd | 12 + .../Pos_060106_whitespace_002.ttcn | 80 ++++++ .../Pos_060106_whitespace_002.xml | 3 + .../Pos_060106_whitespace_002.xsd | 12 + .../Pos_060106_whitespace_003.ttcn | 80 ++++++ .../Pos_060106_whitespace_003.xml | 3 + .../Pos_060106_whitespace_003.xsd | 12 + .../Pos_060107_mininclusive_001.ttcn | 79 ++++++ .../Pos_060107_mininclusive_001.xml | 4 + .../Pos_060107_mininclusive_001.xsd | 11 + .../Pos_060107_mininclusive_002.ttcn | 79 ++++++ .../Pos_060107_mininclusive_002.xml | 4 + .../Pos_060107_mininclusive_002.xsd | 11 + .../Pos_060107_mininclusive_003.ttcn | 79 ++++++ .../Pos_060107_mininclusive_003.xml | 4 + .../Pos_060107_mininclusive_003.xsd | 11 + .../Pos_060107_mininclusive_004.ttcn | 79 ++++++ .../Pos_060107_mininclusive_004.xml | 4 + .../Pos_060107_mininclusive_004.xsd | 11 + .../Pos_060107_mininclusive_005.ttcn | 79 ++++++ .../Pos_060107_mininclusive_005.xml | 4 + .../Pos_060107_mininclusive_005.xsd | 11 + .../Pos_060108_maxinclusive_001.ttcn | 79 ++++++ .../Pos_060108_maxinclusive_001.xml | 4 + .../Pos_060108_maxinclusive_001.xsd | 11 + .../Pos_060108_maxinclusive_002.ttcn | 79 ++++++ .../Pos_060108_maxinclusive_002.xml | 4 + .../Pos_060108_maxinclusive_002.xsd | 12 + .../Pos_060108_maxinclusive_003.ttcn | 79 ++++++ .../Pos_060108_maxinclusive_003.xml | 4 + .../Pos_060108_maxinclusive_003.xsd | 11 + .../Pos_060108_maxinclusive_004.ttcn | 79 ++++++ .../Pos_060108_maxinclusive_004.xml | 4 + .../Pos_060108_maxinclusive_004.xsd | 11 + .../Neg_060109_minexclusive_001.ttcn | 46 ++++ .../Neg_060109_minexclusive_001.xsd | 17 ++ .../Neg_060109_minexclusive_002.ttcn | 46 ++++ .../Neg_060109_minexclusive_002.xsd | 17 ++ .../Pos_060109_minexclusive_001.ttcn | 80 ++++++ .../Pos_060109_minexclusive_001.xml | 4 + .../Pos_060109_minexclusive_001.xsd | 17 ++ .../Pos_060109_minexclusive_002.ttcn | 80 ++++++ .../Pos_060109_minexclusive_002.xml | 2 + .../Pos_060109_minexclusive_002.xsd | 17 ++ .../Neg_060110_maxexclusive_001.ttcn | 44 ++++ .../Neg_060110_maxexclusive_001.xsd | 11 + .../Pos_060110_maxexclusive_001.ttcn | 79 ++++++ .../Pos_060110_maxexclusive_001.xml | 4 + .../Pos_060110_maxexclusive_001.xsd | 11 + .../Pos_060110_maxexclusive_002.ttcn | 79 ++++++ .../Pos_060110_maxexclusive_002.xml | 4 + .../Pos_060110_maxexclusive_002.xsd | 11 + .../Pos_060110_maxexclusive_003.ttcn | 79 ++++++ .../Pos_060110_maxexclusive_003.xml | 4 + .../Pos_060110_maxexclusive_003.xsd | 12 + .../Pos_060110_maxexclusive_003_1.xsd | 11 + .../Neg_060111_total_digits_001.ttcn | 46 ++++ .../Neg_060111_total_digits_001.xsd | 11 + .../Neg_060111_total_digits_002.ttcn | 46 ++++ .../Neg_060111_total_digits_002.xsd | 11 + .../Neg_060111_total_digits_003.ttcn | 46 ++++ .../Neg_060111_total_digits_003.xsd | 11 + .../Neg_060111_total_digits_004.ttcn | 46 ++++ .../Neg_060111_total_digits_004.xsd | 11 + .../Pos_060111_total_digits_001.ttcn | 80 ++++++ .../Pos_060111_total_digits_001.xml | 2 + .../Pos_060111_total_digits_001.xsd | 11 + .../Pos_060111_total_digits_002.ttcn | 80 ++++++ .../Pos_060111_total_digits_002.xml | 2 + .../Pos_060111_total_digits_002.xsd | 11 + .../Pos_060111_total_digits_003.ttcn | 80 ++++++ .../Pos_060111_total_digits_003.xml | 2 + .../Pos_060111_total_digits_003.xsd | 11 + .../Pos_060111_total_digits_004.ttcn | 80 ++++++ .../Pos_060111_total_digits_004.xml | 2 + .../Pos_060111_total_digits_004.xsd | 11 + .../Pos_060111_total_digits_005.ttcn | 80 ++++++ .../Pos_060111_total_digits_005.xml | 2 + .../Pos_060111_total_digits_005.xsd | 11 + .../Pos_060112_fraction_digits_001.ttcn | 80 ++++++ .../Pos_060112_fraction_digits_001.xml | 2 + .../Pos_060112_fraction_digits_001.xsd | 12 + .../Pos_060112_fraction_digits_002.ttcn | 81 ++++++ .../Pos_060112_fraction_digits_002.xml | 2 + .../Pos_060112_fraction_digits_002.xsd | 12 + .../Pos_060113_not_mapped_001.ttcn | 80 ++++++ .../Pos_060113_not_mapped_001.xml | 2 + .../Pos_060113_not_mapped_001.xsd | 11 + .../Pos_060201_string_001.ttcn | 79 ++++++ .../Pos_060201_string_001.xml | 4 + .../Pos_060201_string_001.xsd | 9 + .../Pos_060202_normalized_string_001.ttcn | 79 ++++++ .../Pos_060202_normalized_string_001.xml | 3 + .../Pos_060202_normalized_string_001.xsd | 6 + .../Pos_060203_token_001.ttcn | 79 ++++++ .../Pos_060203_token_001.xml | 3 + .../Pos_060203_token_001.xsd | 6 + .../Pos_060204_name_001.ttcn | 79 ++++++ .../Pos_060204_name_001.xml | 4 + .../Pos_060204_name_001.xsd | 9 + .../Pos_060205_nmtoken_001.ttcn | 79 ++++++ .../Pos_060205_nmtoken_001.xml | 3 + .../Pos_060205_nmtoken_001.xsd | 6 + .../Pos_060206_ncname_001.ttcn | 79 ++++++ .../Pos_060206_ncname_001.xml | 3 + .../Pos_060206_ncname_001.xsd | 6 + .../Pos_060207_id_001/Pos_060207_id_001.ttcn | 79 ++++++ .../Pos_060207_id_001/Pos_060207_id_001.xml | 3 + .../Pos_060207_id_001/Pos_060207_id_001.xsd | 6 + .../Pos_060208_idref_001.ttcn | 82 ++++++ .../Pos_060208_idref_001.xml | 6 + .../Pos_060208_idref_001.xsd | 13 + .../Pos_060210_hexadecimal_binary_001.ttcn | 79 ++++++ .../Pos_060210_hexadecimal_binary_001.xml | 3 + .../Pos_060210_hexadecimal_binary_001.xsd | 6 + .../Pos_060211_base_64_binary_001.ttcn | 79 ++++++ .../Pos_060211_base_64_binary_001.xml | 3 + .../Pos_060211_base_64_binary_001.xsd | 6 + .../Neg_060212_any_uri_001.ttcn | 46 ++++ .../Neg_060212_any_uri_001.xsd | 9 + .../Neg_060212_any_uri_002.ttcn | 46 ++++ .../Neg_060212_any_uri_002.xsd | 9 + .../Pos_060212_any_uri_001.ttcn | 80 ++++++ .../Pos_060212_any_uri_001.xml | 4 + .../Pos_060212_any_uri_001.xsd | 9 + .../Pos_060213_language_001.ttcn | 79 ++++++ .../Pos_060213_language_001.xml | 3 + .../Pos_060213_language_001.xsd | 6 + .../Pos_060301_integer_001.ttcn | 79 ++++++ .../Pos_060301_integer_001.xml | 4 + .../Pos_060301_integer_001.xsd | 9 + .../Pos_060302_positive_integer_001.ttcn | 79 ++++++ .../Pos_060302_positive_integer_001.xml | 4 + .../Pos_060302_positive_integer_001.xsd | 9 + .../Pos_060303_non_positive_integer_001.ttcn | 79 ++++++ .../Pos_060303_non_positive_integer_001.xml | 4 + .../Pos_060303_non_positive_integer_001.xsd | 9 + .../Pos_060304_negative_integer_001.ttcn | 79 ++++++ .../Pos_060304_negative_integer_001.xml | 4 + .../Pos_060304_negative_integer_001.xsd | 9 + .../Pos_060305_non_negative_integer_001.ttcn | 79 ++++++ .../Pos_060305_non_negative_integer_001.xml | 4 + .../Pos_060305_non_negative_integer_001.xsd | 9 + .../Pos_060306_long_001.ttcn | 79 ++++++ .../Pos_060306_long_001.xml | 4 + .../Pos_060306_long_001.xsd | 9 + .../Pos_060307_unsigned_long_001.ttcn | 79 ++++++ .../Pos_060307_unsigned_long_001.xml | 4 + .../Pos_060307_unsigned_long_001.xsd | 9 + .../Pos_060308_int_001.ttcn | 79 ++++++ .../Pos_060308_int_001/Pos_060308_int_001.xml | 4 + .../Pos_060308_int_001/Pos_060308_int_001.xsd | 9 + .../Pos_060309_unsigned_int_001.ttcn | 79 ++++++ .../Pos_060309_unsigned_int_001.xml | 4 + .../Pos_060309_unsigned_int_001.xsd | 9 + .../Pos_060310_short_001.ttcn | 79 ++++++ .../Pos_060310_short_001.xml | 4 + .../Pos_060310_short_001.xsd | 9 + .../Pos_060311_unsigned_short_001.ttcn | 79 ++++++ .../Pos_060311_unsigned_short_001.xml | 4 + .../Pos_060311_unsigned_short_001.xsd | 9 + .../Pos_060312_byte_001.ttcn | 79 ++++++ .../Pos_060312_byte_001.xml | 4 + .../Pos_060312_byte_001.xsd | 9 + .../Pos_060313_unsigned_byte_001.ttcn | 79 ++++++ .../Pos_060313_unsigned_byte_001.xml | 4 + .../Pos_060313_unsigned_byte_001.xsd | 9 + .../Pos_060401_decimal_001.ttcn | 79 ++++++ .../Pos_060401_decimal_001.xml | 4 + .../Pos_060401_decimal_001.xsd | 9 + .../Pos_060402_float_001.ttcn | 85 ++++++ .../Pos_060402_float_001.xml | 2 + .../Pos_060402_float_001.xsd | 6 + .../Pos_060403_double_001.ttcn | 79 ++++++ .../Pos_060403_double_001.xml | 4 + .../Pos_060403_double_001.xsd | 9 + .../Pos_060501_duration_001.ttcn | 79 ++++++ .../Pos_060501_duration_001.xml | 3 + .../Pos_060501_duration_001.xsd | 6 + .../Neg_060502_date_and_time_001.ttcn | 45 ++++ .../Neg_060502_date_and_time_001.xsd | 9 + .../Neg_060502_date_and_time_002.ttcn | 45 ++++ .../Neg_060502_date_and_time_002.xsd | 9 + .../Neg_060502_date_and_time_003.ttcn | 45 ++++ .../Neg_060502_date_and_time_003.xsd | 9 + .../Neg_060502_date_and_time_004.ttcn | 45 ++++ .../Neg_060502_date_and_time_004.xsd | 9 + .../Pos_060502_date_and_time_001.ttcn | 79 ++++++ .../Pos_060502_date_and_time_001.xml | 4 + .../Pos_060502_date_and_time_001.xsd | 9 + .../Pos_060502_date_and_time_002.ttcn | 79 ++++++ .../Pos_060502_date_and_time_002.xml | 4 + .../Pos_060502_date_and_time_002.xsd | 9 + .../Pos_060502_date_and_time_003.ttcn | 79 ++++++ .../Pos_060502_date_and_time_003.xml | 4 + .../Pos_060502_date_and_time_003.xsd | 9 + .../Pos_060502_date_and_time_004.ttcn | 79 ++++++ .../Pos_060502_date_and_time_004.xml | 4 + .../Pos_060502_date_and_time_004.xsd | 9 + .../Pos_060503_time/Pos_060503_time_001.ttcn | 79 ++++++ .../Pos_060503_time/Pos_060503_time_001.xml | 3 + .../Pos_060503_time/Pos_060503_time_001.xsd | 6 + .../Neg_060504_date_001.ttcn | 45 ++++ .../Neg_060504_date_001.xsd | 9 + .../Neg_060504_date_002.ttcn | 45 ++++ .../Neg_060504_date_002.xsd | 9 + .../Neg_060504_date_003.ttcn | 45 ++++ .../Neg_060504_date_003.xsd | 9 + .../Neg_060504_date_004.ttcn | 45 ++++ .../Neg_060504_date_004.xsd | 9 + .../Pos_060504_date_001.ttcn | 80 ++++++ .../Pos_060504_date_001.xml | 4 + .../Pos_060504_date_001.xsd | 9 + .../Pos_060504_date_002.ttcn | 79 ++++++ .../Pos_060504_date_002.xml | 4 + .../Pos_060504_date_002.xsd | 9 + .../Pos_060504_date_003.ttcn | 80 ++++++ .../Pos_060504_date_003.xml | 4 + .../Pos_060504_date_003.xsd | 9 + .../Pos_060504_date_004.ttcn | 79 ++++++ .../Pos_060504_date_004.xml | 4 + .../Pos_060504_date_004.xsd | 9 + ...g_060505_gregorian_year_and_month_001.ttcn | 46 ++++ ...eg_060505_gregorian_year_and_month_001.xsd | 9 + ...g_060505_gregorian_year_and_month_002.ttcn | 45 ++++ ...eg_060505_gregorian_year_and_month_002.xsd | 9 + ...g_060505_gregorian_year_and_month_003.ttcn | 45 ++++ ...eg_060505_gregorian_year_and_month_003.xsd | 9 + ...g_060505_gregorian_year_and_month_004.ttcn | 45 ++++ ...eg_060505_gregorian_year_and_month_004.xsd | 9 + ...s_060505_gregorian_year_and_month_001.ttcn | 80 ++++++ ...os_060505_gregorian_year_and_month_001.xml | 4 + ...os_060505_gregorian_year_and_month_001.xsd | 9 + ...s_060505_gregorian_year_and_month_002.ttcn | 79 ++++++ ...os_060505_gregorian_year_and_month_002.xml | 4 + ...os_060505_gregorian_year_and_month_002.xsd | 9 + .../Neg_060506_gregorian_year_001.ttcn | 45 ++++ .../Neg_060506_gregorian_year_001.xsd | 9 + .../Pos_060506_gregorian_year_001.ttcn | 79 ++++++ .../Pos_060506_gregorian_year_001.xml | 4 + .../Pos_060506_gregorian_year_001.xsd | 9 + .../Pos_060506_gregorian_year_002.ttcn | 79 ++++++ .../Pos_060506_gregorian_year_002.xml | 4 + .../Pos_060506_gregorian_year_002.xsd | 9 + .../Pos_060506_gregorian_year_003.ttcn | 80 ++++++ .../Pos_060506_gregorian_year_003.xml | 4 + .../Pos_060506_gregorian_year_003.xsd | 9 + .../Pos_060506_gregorian_year_004.ttcn | 79 ++++++ .../Pos_060506_gregorian_year_004.xml | 4 + .../Pos_060506_gregorian_year_004.xsd | 9 + .../Pos_060506_gregorian_year_005.ttcn | 79 ++++++ .../Pos_060506_gregorian_year_005.xml | 4 + .../Pos_060506_gregorian_year_005.xsd | 9 + .../Pos_060506_gregorian_year_006.ttcn | 80 ++++++ .../Pos_060506_gregorian_year_006.xml | 4 + .../Pos_060506_gregorian_year_006.xsd | 9 + ...os_060507_gregorian_month_and_day_001.ttcn | 79 ++++++ ...Pos_060507_gregorian_month_and_day_001.xml | 3 + ...Pos_060507_gregorian_month_and_day_001.xsd | 6 + .../Pos_060508_gregorian_day_001.ttcn | 79 ++++++ .../Pos_060508_gregorian_day_001.xml | 3 + .../Pos_060508_gregorian_day_001.xsd | 6 + .../Pos_060509_gregorian_month_001.ttcn | 79 ++++++ .../Pos_060509_gregorian_month_001.xml | 3 + .../Pos_060509_gregorian_month_001.xsd | 6 + .../Pos_060601_nmtokens_001.ttcn | 79 ++++++ .../Pos_060601_nmtokens_001.xml | 3 + .../Pos_060601_nmtokens_001.xsd | 6 + .../Pos_060602_idrefs_001.ttcn | 82 ++++++ .../Pos_060602_idrefs_001.xml | 8 + .../Pos_060602_idrefs_001.xsd | 13 + .../Pos_060604_qname_001.ttcn | 82 ++++++ .../Pos_060604_qname_001.xml | 3 + .../Pos_060604_qname_001.xsd | 6 + .../Pos_0607_boolean_type_001.ttcn | 79 ++++++ .../Pos_0607_boolean_type_001.xml | 4 + .../Pos_0607_boolean_type_001.xsd | 9 + .../Pos_0607_boolean_type_002.ttcn | 79 ++++++ .../Pos_0607_boolean_type_002.xml | 4 + .../Pos_0607_boolean_type_002.xsd | 9 + ...8_anytype_and_anysimpletype_types_001.ttcn | 86 +++++++ ...08_anytype_and_anysimpletype_types_001.xml | 2 + ...08_anytype_and_anysimpletype_types_001.xsd | 6 + ...8_anytype_and_anysimpletype_types_002.ttcn | 92 +++++++ ...08_anytype_and_anysimpletype_types_002.xml | 2 + ...08_anytype_and_anysimpletype_types_002.xsd | 9 + ...8_anytype_and_anysimpletype_types_003.ttcn | 96 +++++++ ...08_anytype_and_anysimpletype_types_003.xml | 2 + ...08_anytype_and_anysimpletype_types_003.xsd | 9 + ...8_anytype_and_anysimpletype_types_004.ttcn | 91 +++++++ ...08_anytype_and_anysimpletype_types_004.xml | 2 + ...08_anytype_and_anysimpletype_types_004.xsd | 6 + ...8_anytype_and_anysimpletype_types_005.ttcn | 99 +++++++ ...08_anytype_and_anysimpletype_types_005.xml | 2 + ...08_anytype_and_anysimpletype_types_005.xsd | 8 + ...8_anytype_and_anysimpletype_types_006.ttcn | 63 +++++ ...08_anytype_and_anysimpletype_types_006.xml | 2 + ...08_anytype_and_anysimpletype_types_006.xsd | 6 + ...8_anytype_and_anysimpletype_types_007.ttcn | 63 +++++ ...08_anytype_and_anysimpletype_types_007.xml | 4 + ...08_anytype_and_anysimpletype_types_007.xsd | 8 + .../Pos_06_top_level_001.ttcn | 91 +++++++ .../Pos_06_top_level_001.xml | 2 + .../Pos_06_top_level_001.xsd | 9 + .../Pos_070101_id_001/Pos_070101_id_001.ttcn | 87 +++++++ .../Pos_070101_id_001/Pos_070101_id_001.xml | 5 + .../Pos_070101_id_001/Pos_070101_id_001.xsd | 13 + .../Pos_070101_id_002/Pos_070101_id_002.ttcn | 90 +++++++ .../Pos_070101_id_002/Pos_070101_id_002.xml | 4 + .../Pos_070101_id_002/Pos_070101_id_002.xsd | 12 + ...eg_070104_minoccurs_and_maxoccurs_001.ttcn | 47 ++++ ...Neg_070104_minoccurs_and_maxoccurs_001.xsd | 13 + ...eg_070104_minoccurs_and_maxoccurs_002.ttcn | 46 ++++ ...Neg_070104_minoccurs_and_maxoccurs_002.xsd | 13 + ...eg_070104_minoccurs_and_maxoccurs_003.ttcn | 46 ++++ ...Neg_070104_minoccurs_and_maxoccurs_003.xsd | 13 + ...os_070104_minoccurs_and_maxoccurs_001.ttcn | 80 ++++++ ...Pos_070104_minoccurs_and_maxoccurs_001.xml | 4 + ...Pos_070104_minoccurs_and_maxoccurs_001.xsd | 12 + ...os_070104_minoccurs_and_maxoccurs_002.ttcn | 80 ++++++ ...Pos_070104_minoccurs_and_maxoccurs_002.xml | 5 + ...Pos_070104_minoccurs_and_maxoccurs_002.xsd | 12 + ...os_070104_minoccurs_and_maxoccurs_003.ttcn | 80 ++++++ ...Pos_070104_minoccurs_and_maxoccurs_003.xml | 4 + ...Pos_070104_minoccurs_and_maxoccurs_003.xsd | 13 + ...os_070104_minoccurs_and_maxoccurs_004.ttcn | 80 ++++++ ...Pos_070104_minoccurs_and_maxoccurs_004.xml | 9 + ...Pos_070104_minoccurs_and_maxoccurs_004.xsd | 13 + ...os_070104_minoccurs_and_maxoccurs_005.ttcn | 80 ++++++ ...Pos_070104_minoccurs_and_maxoccurs_005.xml | 9 + ...Pos_070104_minoccurs_and_maxoccurs_005.xsd | 13 + ...os_070104_minoccurs_and_maxoccurs_006.ttcn | 80 ++++++ ...Pos_070104_minoccurs_and_maxoccurs_006.xml | 14 + ...Pos_070104_minoccurs_and_maxoccurs_006.xsd | 13 + ...os_070104_minoccurs_and_maxoccurs_007.ttcn | 80 ++++++ ...Pos_070104_minoccurs_and_maxoccurs_007.xml | 11 + ...Pos_070104_minoccurs_and_maxoccurs_007.xsd | 13 + .../Neg_070105_default_and_fixed_001.ttcn | 54 ++++ .../Neg_070105_default_and_fixed_001.xsd | 6 + .../Pos_070105_default_and_fixed_001.ttcn | 88 +++++++ .../Pos_070105_default_and_fixed_001.xml | 2 + .../Pos_070105_default_and_fixed_001.xsd | 6 + .../Pos_070105_default_and_fixed_002.ttcn | 87 +++++++ .../Pos_070105_default_and_fixed_002.xml | 4 + .../Pos_070105_default_and_fixed_002.xsd | 12 + .../Pos_070105_default_and_fixed_003.ttcn | 82 ++++++ .../Pos_070105_default_and_fixed_003.xml | 4 + .../Pos_070105_default_and_fixed_003.xsd | 12 + .../Pos_070105_default_and_fixed_004.ttcn | 84 ++++++ .../Pos_070105_default_and_fixed_004.xml | 4 + .../Pos_070105_default_and_fixed_004.xsd | 12 + .../Pos_070106_form_001.ttcn | 91 +++++++ .../Pos_070106_form_001.xml | 4 + .../Pos_070106_form_001.xsd | 20 ++ .../Pos_070106_form_002.ttcn | 93 +++++++ .../Pos_070106_form_002.xml | 4 + .../Pos_070106_form_002.xsd | 21 ++ .../Pos_070106_form_003.ttcn | 94 +++++++ .../Pos_070106_form_003.xml | 4 + .../Pos_070106_form_003.xsd | 20 ++ .../Pos_070106_form_004.ttcn | 92 +++++++ .../Pos_070106_form_004.xml | 4 + .../Pos_070106_form_004.xsd | 21 ++ .../Pos_070106_form_005.ttcn | 88 +++++++ .../Pos_070106_form_005.xml | 4 + .../Pos_070106_form_005.xsd | 12 + .../Pos_070106_form_006.ttcn | 91 +++++++ .../Pos_070106_form_006.xml | 4 + .../Pos_070106_form_006.xsd | 13 + .../Pos_070106_form_007.ttcn | 90 +++++++ .../Pos_070106_form_007.xml | 4 + .../Pos_070106_form_007.xsd | 12 + .../Pos_070106_form_008.ttcn | 88 +++++++ .../Pos_070106_form_008.xml | 4 + .../Pos_070106_form_008.xsd | 13 + .../Pos_070106_form_009.ttcn | 84 ++++++ .../Pos_070106_form_009.xml | 11 + .../Pos_070106_form_009.xsd | 17 ++ .../Pos_070106_form_009_2.xsd | 12 + .../Pos_070106_form_010.ttcn | 84 ++++++ .../Pos_070106_form_010.xml | 11 + .../Pos_070106_form_010.xsd | 17 ++ .../Pos_070106_form_010_2.xsd | 12 + .../Pos_070106_form_011.ttcn | 84 ++++++ .../Pos_070106_form_011.xml | 7 + .../Pos_070106_form_011.xsd | 17 ++ .../Pos_070106_form_011_2.xsd | 10 + .../Pos_070106_form_012.ttcn | 84 ++++++ .../Pos_070106_form_012.xml | 7 + .../Pos_070106_form_012.xsd | 17 ++ .../Pos_070106_form_012_2.xsd | 10 + .../Pos_070107_type_001.ttcn | 85 ++++++ .../Pos_070107_type_001.xml | 2 + .../Pos_070107_type_001.xsd | 9 + .../Pos_070107_type_002.ttcn | 88 +++++++ .../Pos_070107_type_002.xml | 5 + .../Pos_070107_type_002.xsd | 12 + .../Pos_070107_type_003.ttcn | 85 ++++++ .../Pos_070107_type_003.xml | 2 + .../Pos_070107_type_003.xsd | 6 + .../Pos_070111_nillable_001.ttcn | 90 +++++++ .../Pos_070111_nillable_001.xml | 2 + .../Pos_070111_nillable_001.xsd | 6 + .../Pos_070111_nillable_002.ttcn | 90 +++++++ .../Pos_070111_nillable_002.xml | 2 + .../Pos_070111_nillable_002.xsd | 6 + .../Pos_070111_nillable_003.ttcn | 93 +++++++ .../Pos_070111_nillable_003.xml | 5 + .../Pos_070111_nillable_003.xsd | 13 + .../Pos_070111_nillable_004.ttcn | 93 +++++++ .../Pos_070111_nillable_004.xml | 5 + .../Pos_070111_nillable_004.xsd | 13 + .../Pos_070111_nillable_005.ttcn | 95 +++++++ .../Pos_070111_nillable_005.xml | 2 + .../Pos_070111_nillable_005.xsd | 14 + .../Pos_070111_nillable_006.ttcn | 97 +++++++ .../Pos_070111_nillable_006.xml | 4 + .../Pos_070111_nillable_006.xsd | 14 + .../Neg_070112_use_001.ttcn | 56 ++++ .../Neg_070112_use_001/Neq_070112_use_001.xsd | 20 ++ .../Pos_070112_use_001.ttcn | 90 +++++++ .../Pos_070112_use_001/Pos_070112_use_001.xml | 4 + .../Pos_070112_use_001/Pos_070112_use_001.xsd | 20 ++ .../Pos_070112_use_002.ttcn | 92 +++++++ .../Pos_070112_use_002/Pos_070112_use_002.xml | 4 + .../Pos_070112_use_002/Pos_070112_use_002.xsd | 20 ++ .../Pos_070112_use_003.ttcn | 89 +++++++ .../Pos_070112_use_003/Pos_070112_use_003.xml | 4 + .../Pos_070112_use_003/Pos_070112_use_003.xsd | 28 ++ .../Pos_070114_final_001.ttcn | 85 ++++++ .../Pos_070114_final_001.xml | 2 + .../Pos_070114_final_001.xsd | 6 + .../Pos_0703_element_component_001.ttcn | 85 ++++++ .../Pos_0703_element_component_001.xml | 2 + .../Pos_0703_element_component_001.xsd | 6 + .../Pos_0703_element_component_002.ttcn | 86 +++++++ .../Pos_0703_element_component_002.xml | 2 + .../Pos_0703_element_component_002.xsd | 9 + .../Pos_0703_element_component_003.ttcn | 88 +++++++ .../Pos_0703_element_component_003.xml | 5 + .../Pos_0703_element_component_003.xsd | 13 + .../Pos_0703_element_component_004.ttcn | 93 +++++++ .../Pos_0703_element_component_004.xml | 4 + .../Pos_0703_element_component_004.xsd | 14 + .../Pos_0703_element_component_004_1.xsd | 6 + ...401_attribute_element_definitions_001.ttcn | 80 ++++++ ...0401_attribute_element_definitions_001.xml | 6 + ...0401_attribute_element_definitions_001.xsd | 13 + ...70402_attribute_group_definitions_001.ttcn | 85 ++++++ ...070402_attribute_group_definitions_001.xml | 6 + ...070402_attribute_group_definitions_001.xsd | 17 ++ ...401_attribute_element_definitions_001.ttcn | 80 ++++++ ...0401_attribute_element_definitions_001.xml | 6 + ...0401_attribute_element_definitions_001.xsd | 13 + ...70402_attribute_group_definitions_001.ttcn | 85 ++++++ ...070402_attribute_group_definitions_001.xml | 6 + ...070402_attribute_group_definitions_001.xsd | 17 ++ ..._070501_derivation_by_restriction_001.ttcn | 86 +++++++ ...s_070501_derivation_by_restriction_001.xml | 2 + ...s_070501_derivation_by_restriction_001.xsd | 14 + ..._070501_derivation_by_restriction_002.ttcn | 86 +++++++ ...s_070501_derivation_by_restriction_002.xml | 2 + ...s_070501_derivation_by_restriction_002.xsd | 18 ++ .../Neg_070502_derivation_by_list_001.ttcn | 85 ++++++ .../Neg_070502_derivation_by_list_001.xsd | 20 ++ .../Neg_070502_derivation_by_list_002.ttcn | 85 ++++++ .../Neg_070502_derivation_by_list_002.xsd | 20 ++ .../Pos_070502_derivation_by_list_001.ttcn | 85 ++++++ .../Pos_070502_derivation_by_list_001.xml | 2 + .../Pos_070502_derivation_by_list_001.xsd | 9 + .../Pos_070502_derivation_by_list_002.ttcn | 85 ++++++ .../Pos_070502_derivation_by_list_002.xml | 2 + .../Pos_070502_derivation_by_list_002.xsd | 14 + .../Pos_070502_derivation_by_list_003.ttcn | 85 ++++++ .../Pos_070502_derivation_by_list_003.xml | 2 + .../Pos_070502_derivation_by_list_003.xsd | 20 ++ .../Pos_070502_derivation_by_list_004.ttcn | 85 ++++++ .../Pos_070502_derivation_by_list_004.xml | 2 + .../Pos_070502_derivation_by_list_004.xsd | 22 ++ .../Pos_070502_derivation_by_list_005.ttcn | 81 ++++++ .../Pos_070502_derivation_by_list_005.xml | 2 + .../Pos_070502_derivation_by_list_005.xsd | 21 ++ .../Pos_070503_derivation_by_union_001.ttcn | 90 +++++++ .../Pos_070503_derivation_by_union_001.xml | 2 + .../Pos_070503_derivation_by_union_001.xsd | 9 + .../Pos_070503_derivation_by_union_002.ttcn | 89 +++++++ .../Pos_070503_derivation_by_union_002.xml | 2 + .../Pos_070503_derivation_by_union_002.xsd | 20 ++ .../Pos_070503_derivation_by_union_003.ttcn | 92 +++++++ .../Pos_070503_derivation_by_union_003.xml | 2 + .../Pos_070503_derivation_by_union_003.xsd | 15 ++ .../Pos_070503_derivation_by_union_004.ttcn | 92 +++++++ .../Pos_070503_derivation_by_union_004.xml | 2 + .../Pos_070503_derivation_by_union_004.xsd | 28 ++ .../Pos_070503_derivation_by_union_005.ttcn | 81 ++++++ .../Pos_070503_derivation_by_union_005.xml | 2 + .../Pos_070503_derivation_by_union_005.xsd | 26 ++ .../Pos_070503_derivation_by_union_006.ttcn | 81 ++++++ .../Pos_070503_derivation_by_union_006.xml | 2 + .../Pos_070503_derivation_by_union_006.xsd | 20 ++ .../Pos_070503_derivation_by_union_007.ttcn | 81 ++++++ .../Pos_070503_derivation_by_union_007.xml | 2 + .../Pos_070503_derivation_by_union_007.xsd | 28 ++ .../Pos_070503_derivation_by_union_008.ttcn | 81 ++++++ .../Pos_070503_derivation_by_union_008.xml | 2 + .../Pos_070503_derivation_by_union_008.xsd | 18 ++ ...07060101_extending_simple_content_001.ttcn | 82 ++++++ ..._07060101_extending_simple_content_001.xml | 4 + ..._07060101_extending_simple_content_001.xsd | 16 ++ ...07060101_extending_simple_content_002.ttcn | 91 +++++++ ..._07060101_extending_simple_content_002.xml | 3 + ..._07060101_extending_simple_content_002.xsd | 26 ++ ...060102_restricting_simple_content_001.ttcn | 50 ++++ ...7060102_restricting_simple_content_001.xsd | 23 ++ ...060102_restricting_simple_content_001.ttcn | 86 +++++++ ...7060102_restricting_simple_content_001.xml | 4 + ...7060102_restricting_simple_content_001.xsd | 23 ++ ...060102_restricting_simple_content_002.ttcn | 89 +++++++ ...7060102_restricting_simple_content_002.xml | 3 + ...7060102_restricting_simple_content_002.xsd | 25 ++ ...Pos_07060201_derived_by_extension_001.ttcn | 125 +++++++++ .../Pos_07060201_derived_by_extension_001.xml | 10 + .../Pos_07060201_derived_by_extension_001.xsd | 41 +++ ...Pos_07060201_derived_by_extension_002.ttcn | 120 +++++++++ .../Pos_07060201_derived_by_extension_002.xml | 9 + .../Pos_07060201_derived_by_extension_002.xsd | 50 ++++ ...Pos_07060201_derived_by_extension_003.ttcn | 129 ++++++++++ .../Pos_07060201_derived_by_extension_003.xml | 9 + .../Pos_07060201_derived_by_extension_003.xsd | 49 ++++ ...Pos_07060201_derived_by_extension_004.ttcn | 130 ++++++++++ .../Pos_07060201_derived_by_extension_004.xml | 11 + .../Pos_07060201_derived_by_extension_004.xsd | 50 ++++ ...Pos_07060201_derived_by_extension_005.ttcn | 136 ++++++++++ .../Pos_07060201_derived_by_extension_005.xml | 12 + .../Pos_07060201_derived_by_extension_005.xsd | 49 ++++ ...Pos_07060201_derived_by_extension_006.ttcn | 111 ++++++++ .../Pos_07060201_derived_by_extension_006.xml | 6 + .../Pos_07060201_derived_by_extension_006.xsd | 26 ++ ...Pos_07060201_derived_by_extension_007.ttcn | 113 ++++++++ .../Pos_07060201_derived_by_extension_007.xml | 10 + .../Pos_07060201_derived_by_extension_007.xsd | 29 +++ ...Pos_07060201_derived_by_extension_008.ttcn | 108 ++++++++ .../Pos_07060201_derived_by_extension_008.xml | 10 + .../Pos_07060201_derived_by_extension_008.xsd | 24 ++ ...Pos_07060201_derived_by_extension_009.ttcn | 101 ++++++++ .../Pos_07060201_derived_by_extension_009.xml | 13 + .../Pos_07060201_derived_by_extension_009.xsd | 22 ++ ...Pos_07060201_derived_by_extension_010.ttcn | 92 +++++++ .../Pos_07060201_derived_by_extension_010.xml | 8 + .../Pos_07060201_derived_by_extension_010.xsd | 27 ++ ...s_07060202_derived_by_restriction_001.ttcn | 84 ++++++ ...os_07060202_derived_by_restriction_001.xml | 6 + ...os_07060202_derived_by_restriction_001.xsd | 16 ++ ...s_07060202_derived_by_restriction_002.ttcn | 87 +++++++ ...os_07060202_derived_by_restriction_002.xml | 3 + ...os_07060202_derived_by_restriction_002.xsd | 21 ++ ...0603_referencing_group_components_001.ttcn | 93 +++++++ ...70603_referencing_group_components_001.xml | 5 + ...70603_referencing_group_components_001.xsd | 16 ++ ...0603_referencing_group_components_002.ttcn | 94 +++++++ ...70603_referencing_group_components_002.xml | 6 + ...70603_referencing_group_components_002.xsd | 22 ++ ...0603_referencing_group_components_003.ttcn | 94 +++++++ ...70603_referencing_group_components_003.xml | 5 + ...70603_referencing_group_components_003.xsd | 17 ++ ...0603_referencing_group_components_004.ttcn | 93 +++++++ ...70603_referencing_group_components_004.xml | 7 + ...70603_referencing_group_components_004.xsd | 16 ++ ...0603_referencing_group_components_005.ttcn | 91 +++++++ ...70603_referencing_group_components_005.xml | 5 + ...70603_referencing_group_components_005.xsd | 17 ++ ...0603_referencing_group_components_006.ttcn | 90 +++++++ ...70603_referencing_group_components_006.xml | 2 + ...70603_referencing_group_components_006.xsd | 17 ++ ...0603_referencing_group_components_007.ttcn | 90 +++++++ ...70603_referencing_group_components_007.xml | 4 + ...70603_referencing_group_components_007.xsd | 16 ++ ...0603_referencing_group_components_008.ttcn | 94 +++++++ ...70603_referencing_group_components_008.xml | 4 + ...70603_referencing_group_components_008.xsd | 17 ++ ...0603_referencing_group_components_009.ttcn | 96 +++++++ ...70603_referencing_group_components_009.xml | 5 + ...70603_referencing_group_components_009.xsd | 16 ++ ...0603_referencing_group_components_010.ttcn | 94 +++++++ ...70603_referencing_group_components_010.xml | 4 + ...70603_referencing_group_components_010.xsd | 19 ++ .../Pos_070604_all_content_001.ttcn | 99 +++++++ .../Pos_070604_all_content_001.xml | 6 + .../Pos_070604_all_content_001.xsd | 14 + .../Pos_070604_all_content_002.ttcn | 99 +++++++ .../Pos_070604_all_content_002.xml | 6 + .../Pos_070604_all_content_002.xsd | 14 + .../Pos_070604_all_content_003.ttcn | 92 +++++++ .../Pos_070604_all_content_003.xml | 5 + .../Pos_070604_all_content_003.xsd | 14 + .../Pos_070604_all_content_004.ttcn | 95 +++++++ .../Pos_070604_all_content_004.xml | 6 + .../Pos_070604_all_content_004.xsd | 24 ++ ...60501_choice_with_nested_elements_001.ttcn | 89 +++++++ ...060501_choice_with_nested_elements_001.xml | 4 + ...060501_choice_with_nested_elements_001.xsd | 13 + ...60501_choice_with_nested_elements_001.ttcn | 89 +++++++ ...060501_choice_with_nested_elements_001.xml | 4 + ...060501_choice_with_nested_elements_001.xsd | 13 + ...07060502_choice_with_nested_group_001.ttcn | 95 +++++++ ..._07060502_choice_with_nested_group_001.xml | 5 + ..._07060502_choice_with_nested_group_001.xsd | 19 ++ ...07060502_choice_with_nested_group_001.ttcn | 95 +++++++ ..._07060502_choice_with_nested_group_001.xml | 5 + ..._07060502_choice_with_nested_group_001.xsd | 19 ++ ...7060503_choice_with_nested_choice_001.ttcn | 91 +++++++ ...07060503_choice_with_nested_choice_001.xml | 4 + ...07060503_choice_with_nested_choice_001.xsd | 16 ++ ...7060503_choice_with_nested_choice_001.ttcn | 91 +++++++ ...07060503_choice_with_nested_choice_001.xml | 4 + ...07060503_choice_with_nested_choice_001.xsd | 16 ++ ...60504_choice_with_nested_sequence_001.ttcn | 93 +++++++ ...060504_choice_with_nested_sequence_001.xml | 5 + ...060504_choice_with_nested_sequence_001.xsd | 16 ++ ...60504_choice_with_nested_sequence_002.ttcn | 96 +++++++ ...060504_choice_with_nested_sequence_002.xml | 8 + ...060504_choice_with_nested_sequence_002.xsd | 21 ++ ...60504_choice_with_nested_sequence_001.ttcn | 93 +++++++ ...060504_choice_with_nested_sequence_001.xml | 5 + ...060504_choice_with_nested_sequence_001.xsd | 16 ++ ...60504_choice_with_nested_sequence_002.ttcn | 96 +++++++ ...060504_choice_with_nested_sequence_002.xml | 8 + ...060504_choice_with_nested_sequence_002.xsd | 21 ++ ...60504_choice_with_nested_sequence_003.ttcn | 94 +++++++ ...060504_choice_with_nested_sequence_003.xml | 5 + ...060504_choice_with_nested_sequence_003.xsd | 17 ++ ...s_07060505_choice_with_nested_any_001.ttcn | 89 +++++++ ...os_07060505_choice_with_nested_any_001.xml | 2 + ...os_07060505_choice_with_nested_any_001.xsd | 15 ++ ...s_07060505_choice_with_nested_any_001.ttcn | 89 +++++++ ...os_07060505_choice_with_nested_any_001.xml | 2 + ...os_07060505_choice_with_nested_any_001.xsd | 15 ++ .../Pos_070605_top_level_001.ttcn | 99 +++++++ .../Pos_070605_top_level_001.xml | 4 + .../Pos_070605_top_level_001.xsd | 13 + .../Pos_070605_top_level_002.ttcn | 103 ++++++++ .../Pos_070605_top_level_002.xml | 5 + .../Pos_070605_top_level_002.xsd | 13 + ...0601_sequence_with_nested_element_001.ttcn | 90 +++++++ ...60601_sequence_with_nested_element_001.xml | 5 + ...60601_sequence_with_nested_element_001.xsd | 13 + ...0601_sequence_with_nested_element_001.ttcn | 90 +++++++ ...60601_sequence_with_nested_element_001.xml | 5 + ...60601_sequence_with_nested_element_001.xsd | 13 + ...060602_sequence_with_nested_group_001.ttcn | 93 +++++++ ...7060602_sequence_with_nested_group_001.xml | 5 + ...7060602_sequence_with_nested_group_001.xsd | 19 ++ ...060602_sequence_with_nested_group_001.ttcn | 93 +++++++ ...7060602_sequence_with_nested_group_001.xml | 5 + ...7060602_sequence_with_nested_group_001.xsd | 19 ++ ...60603_sequence_with_nested_choice_001.ttcn | 89 +++++++ ...060603_sequence_with_nested_choice_001.xml | 5 + ...060603_sequence_with_nested_choice_001.xsd | 16 ++ ...60603_sequence_with_nested_choice_001.ttcn | 89 +++++++ ...060603_sequence_with_nested_choice_001.xml | 5 + ...060603_sequence_with_nested_choice_001.xsd | 16 ++ ...604_sequence_with_nested_sequence_001.ttcn | 90 +++++++ ...0604_sequence_with_nested_sequence_001.xml | 6 + ...0604_sequence_with_nested_sequence_001.xsd | 16 ++ ...604_sequence_with_nested_sequence_002.ttcn | 91 +++++++ ...0604_sequence_with_nested_sequence_002.xml | 7 + ...0604_sequence_with_nested_sequence_002.xsd | 20 ++ ...604_sequence_with_nested_sequence_001.ttcn | 90 +++++++ ...0604_sequence_with_nested_sequence_001.xml | 6 + ...0604_sequence_with_nested_sequence_001.xsd | 16 ++ ...604_sequence_with_nested_sequence_002.ttcn | 91 +++++++ ...0604_sequence_with_nested_sequence_002.xml | 7 + ...0604_sequence_with_nested_sequence_002.xsd | 20 ++ ..._sequence_with_nested_any_content_001.ttcn | 88 +++++++ ...5_sequence_with_nested_any_content_001.xml | 3 + ...5_sequence_with_nested_any_content_001.xsd | 14 + ..._sequence_with_nested_any_content_001.ttcn | 88 +++++++ ...5_sequence_with_nested_any_content_001.xml | 3 + ...5_sequence_with_nested_any_content_001.xsd | 14 + ...effect_of_minoccurs_and_maxoccurs_001.ttcn | 100 ++++++++ ..._effect_of_minoccurs_and_maxoccurs_001.xml | 5 + ..._effect_of_minoccurs_and_maxoccurs_001.xsd | 13 + ...effect_of_minoccurs_and_maxoccurs_002.ttcn | 99 +++++++ ..._effect_of_minoccurs_and_maxoccurs_002.xml | 5 + ..._effect_of_minoccurs_and_maxoccurs_002.xsd | 20 ++ ...effect_of_minoccurs_and_maxoccurs_003.ttcn | 105 ++++++++ ..._effect_of_minoccurs_and_maxoccurs_003.xml | 7 + ..._effect_of_minoccurs_and_maxoccurs_003.xsd | 13 + ...effect_of_minoccurs_and_maxoccurs_004.ttcn | 106 ++++++++ ..._effect_of_minoccurs_and_maxoccurs_004.xml | 8 + ..._effect_of_minoccurs_and_maxoccurs_004.xsd | 16 ++ ...effect_of_minoccurs_and_maxoccurs_001.ttcn | 100 ++++++++ ..._effect_of_minoccurs_and_maxoccurs_001.xml | 5 + ..._effect_of_minoccurs_and_maxoccurs_001.xsd | 13 + ...effect_of_minoccurs_and_maxoccurs_002.ttcn | 99 +++++++ ..._effect_of_minoccurs_and_maxoccurs_002.xml | 5 + ..._effect_of_minoccurs_and_maxoccurs_002.xsd | 20 ++ ...effect_of_minoccurs_and_maxoccurs_003.ttcn | 105 ++++++++ ..._effect_of_minoccurs_and_maxoccurs_003.xml | 7 + ..._effect_of_minoccurs_and_maxoccurs_003.xsd | 13 + ...effect_of_minoccurs_and_maxoccurs_004.ttcn | 106 ++++++++ ..._effect_of_minoccurs_and_maxoccurs_004.xml | 8 + ..._effect_of_minoccurs_and_maxoccurs_004.xsd | 16 ++ ...effect_of_minoccurs_and_maxoccurs_005.ttcn | 107 ++++++++ ..._effect_of_minoccurs_and_maxoccurs_005.xml | 2 + ..._effect_of_minoccurs_and_maxoccurs_005.xsd | 17 ++ ...ute_and_attributegroup_references_001.ttcn | 80 ++++++ ...bute_and_attributegroup_references_001.xml | 6 + ...bute_and_attributegroup_references_001.xsd | 16 ++ ...ute_and_attributegroup_references_002.ttcn | 94 +++++++ ...bute_and_attributegroup_references_002.xml | 6 + ...bute_and_attributegroup_references_002.xsd | 25 ++ ...ute_and_attributegroup_references_003.ttcn | 91 +++++++ ...bute_and_attributegroup_references_003.xml | 6 + ...bute_and_attributegroup_references_003.xsd | 26 ++ .../Neg_070608_mixed_content_001.ttcn | 95 +++++++ .../Neg_070608_mixed_content_001.xml | 2 + .../Neg_070608_mixed_content_001.xsd | 13 + .../Pos_070608_mixed_content_001.ttcn | 96 +++++++ .../Pos_070608_mixed_content_001.xml | 2 + .../Pos_070608_mixed_content_001.xsd | 14 + .../Pos_070608_mixed_content_002.ttcn | 98 +++++++ .../Pos_070608_mixed_content_002.xml | 2 + .../Pos_070608_mixed_content_002.xsd | 13 + .../Pos_070608_mixed_content_003.ttcn | 98 +++++++ .../Pos_070608_mixed_content_003.xml | 2 + .../Pos_070608_mixed_content_003.xsd | 14 + .../Pos_070608_mixed_content_004.ttcn | 98 +++++++ .../Pos_070608_mixed_content_004.xml | 2 + .../Pos_070608_mixed_content_004.xsd | 13 + .../Pos_070608_mixed_content_005.ttcn | 95 +++++++ .../Pos_070608_mixed_content_005.xml | 2 + .../Pos_070608_mixed_content_005.xsd | 13 + .../Pos_070701_the_any_element_001.ttcn | 93 +++++++ .../Pos_070701_the_any_element_001.xml | 2 + .../Pos_070701_the_any_element_001.xsd | 13 + .../Pos_070701_the_any_element_002.ttcn | 93 +++++++ .../Pos_070701_the_any_element_002.xml | 2 + .../Pos_070701_the_any_element_002.xsd | 13 + .../Pos_070701_the_any_element_003.ttcn | 93 +++++++ .../Pos_070701_the_any_element_003.xml | 2 + .../Pos_070701_the_any_element_003.xsd | 12 + .../Pos_070701_the_any_element_003_01_xsd.xsd | 4 + .../Pos_070701_the_any_element_004.ttcn | 93 +++++++ .../Pos_070701_the_any_element_004.xml | 2 + .../Pos_070701_the_any_element_004.xsd | 12 + .../Pos_070701_the_any_element_004_1.xsd | 6 + .../Pos_070701_the_any_element_005.ttcn | 93 +++++++ .../Pos_070701_the_any_element_005.xml | 2 + .../Pos_070701_the_any_element_005.xsd | 13 + .../Pos_070701_the_any_element_006.ttcn | 97 +++++++ .../Pos_070701_the_any_element_006.xml | 6 + .../Pos_070701_the_any_element_006.xsd | 14 + .../Pos_070701_the_any_element_007.ttcn | 63 +++++ .../Pos_070701_the_any_element_007.xml | 4 + .../Pos_070701_the_any_element_007.xsd | 13 + ...s_070702_the_anyattribute_element_001.ttcn | 93 +++++++ ...os_070702_the_anyattribute_element_001.xml | 2 + ...os_070702_the_anyattribute_element_001.xsd | 16 ++ ...s_070702_the_anyattribute_element_002.ttcn | 89 +++++++ ...os_070702_the_anyattribute_element_002.xml | 2 + ...os_070702_the_anyattribute_element_002.xsd | 15 ++ ...s_070702_the_anyattribute_element_003.ttcn | 91 +++++++ ...os_070702_the_anyattribute_element_003.xml | 2 + ...os_070702_the_anyattribute_element_003.xsd | 17 ++ ...s_070702_the_anyattribute_element_004.ttcn | 96 +++++++ ...os_070702_the_anyattribute_element_004.xml | 4 + ...os_070702_the_anyattribute_element_004.xsd | 23 ++ ...s_070702_the_anyattribute_element_005.ttcn | 87 +++++++ ...os_070702_the_anyattribute_element_005.xml | 4 + ...os_070702_the_anyattribute_element_005.xsd | 15 ++ ...s_070702_the_anyattribute_element_006.ttcn | 63 +++++ ...os_070702_the_anyattribute_element_006.xml | 2 + ...os_070702_the_anyattribute_element_006.xsd | 16 ++ .../Pos_0708_annotation_001.ttcn | 85 ++++++ .../Pos_0708_annotation_001.xml | 2 + .../Pos_0708_annotation_001.xsd | 10 + .../Pos_0709_group_components_001.ttcn | 94 +++++++ .../Pos_0709_group_components_001.xml | 5 + .../Pos_0709_group_components_001.xsd | 16 ++ .../Pos_0709_group_components_002.ttcn | 91 +++++++ .../Pos_0709_group_components_002.xml | 4 + .../Pos_0709_group_components_002.xsd | 16 ++ .../Pos_0709_group_components_003.ttcn | 97 +++++++ .../Pos_0709_group_components_003.xml | 5 + .../Pos_0709_group_components_003.xsd | 16 ++ ...aint_definition_schema_components_001.ttcn | 98 +++++++ ...raint_definition_schema_components_001.xml | 15 ++ ...raint_definition_schema_components_001.xsd | 27 ++ ...aint_definition_schema_components_002.ttcn | 98 +++++++ ...raint_definition_schema_components_002.xml | 15 ++ ...raint_definition_schema_components_002.xsd | 27 ++ ...aint_definition_schema_components_003.ttcn | 107 ++++++++ ...raint_definition_schema_components_003.xml | 21 ++ ...raint_definition_schema_components_003.xsd | 39 +++ ...d_elements_of_substitution_groups_001.ttcn | 88 +++++++ ...ad_elements_of_substitution_groups_001.xml | 4 + ...ad_elements_of_substitution_groups_001.xsd | 35 +++ ...d_elements_of_substitution_groups_002.ttcn | 84 ++++++ ...ad_elements_of_substitution_groups_002.xml | 10 + ...ad_elements_of_substitution_groups_002.xsd | 35 +++ ...d_elements_of_substitution_groups_003.ttcn | 83 ++++++ ...ad_elements_of_substitution_groups_003.xml | 8 + ...ad_elements_of_substitution_groups_003.xsd | 17 ++ .../Neg_A_ttcn3_module_xsd_001.ttcn | 33 +++ .../Neg_A_ttcn3_module_xsd_002.ttcn | 33 +++ .../Neg_A_ttcn3_module_xsd_003.ttcn | 33 +++ .../Neg_A_ttcn3_module_xsd_004.ttcn | 33 +++ .../Neg_A_ttcn3_module_xsd_005.ttcn | 33 +++ .../Neg_A_ttcn3_module_xsd_006.ttcn | 33 +++ .../Neg_A_ttcn3_module_xsd_007.ttcn | 33 +++ .../Neg_A_ttcn3_module_xsd_008.ttcn | 33 +++ .../Neg_A_ttcn3_module_xsd_009.ttcn | 33 +++ .../Neg_A_ttcn3_module_xsd_010.ttcn | 33 +++ .../Neg_A_ttcn3_module_xsd_011.ttcn | 33 +++ .../Neg_A_ttcn3_module_xsd_012.ttcn | 33 +++ .../Neg_A_ttcn3_module_xsd_013.ttcn | 33 +++ .../Neg_A_ttcn3_module_xsd_014.ttcn | 33 +++ .../Neg_A_ttcn3_module_xsd_015.ttcn | 33 +++ .../Neg_A_ttcn3_module_xsd_016.ttcn | 33 +++ .../Neg_A_ttcn3_module_xsd_017.ttcn | 33 +++ .../Neg_A_ttcn3_module_xsd_018.ttcn | 33 +++ .../Neg_A_ttcn3_module_xsd_019.ttcn | 33 +++ .../Neg_A_ttcn3_module_xsd_020.ttcn | 33 +++ .../Neg_A_ttcn3_module_xsd_021.ttcn | 33 +++ .../Neg_A_ttcn3_module_xsd_022.ttcn | 33 +++ .../Neg_A_ttcn3_module_xsd_023.ttcn | 33 +++ .../Neg_A_ttcn3_module_xsd_024.ttcn | 33 +++ .../Neg_A_ttcn3_module_xsd_025.ttcn | 33 +++ .../Neg_A_ttcn3_module_xsd_026.ttcn | 33 +++ .../Neg_A_ttcn3_module_xsd_027.ttcn | 33 +++ .../Neg_A_ttcn3_module_xsd_028.ttcn | 33 +++ .../Neg_A_ttcn3_module_xsd_029.ttcn | 33 +++ .../Neg_A_ttcn3_module_xsd_030.ttcn | 33 +++ .../Neg_A_ttcn3_module_xsd_031.ttcn | 33 +++ .../Neg_A_ttcn3_module_xsd_032.ttcn | 33 +++ .../Neg_A_ttcn3_module_xsd_033.ttcn | 33 +++ .../Neg_A_ttcn3_module_xsd_034.ttcn | 33 +++ .../Neg_A_ttcn3_module_xsd_035.ttcn | 33 +++ .../Neg_A_ttcn3_module_xsd_036.ttcn | 33 +++ .../Neg_A_ttcn3_module_xsd_037.ttcn | 33 +++ .../Neg_A_ttcn3_module_xsd_038.ttcn | 33 +++ .../Neg_A_ttcn3_module_xsd_039.ttcn | 33 +++ .../Neg_A_ttcn3_module_xsd_040.ttcn | 33 +++ .../Neg_A_ttcn3_module_xsd_041.ttcn | 33 +++ .../Neg_A_ttcn3_module_xsd_042.ttcn | 33 +++ .../Neg_A_ttcn3_module_xsd_043.ttcn | 33 +++ .../Neg_A_ttcn3_module_xsd_044.ttcn | 33 +++ .../Neg_A_ttcn3_module_xsd_045.ttcn | 33 +++ .../Neg_A_ttcn3_module_xsd_046.ttcn | 33 +++ .../Neg_A_ttcn3_module_xsd_047.ttcn | 33 +++ .../Neg_A_ttcn3_module_xsd_048.ttcn | 33 +++ .../Pos_A_ttcn3_module_xsd_001.ttcn | 38 +++ .../Pos_A_ttcn3_module_xsd_002.ttcn | 37 +++ .../Pos_A_ttcn3_module_xsd_003.ttcn | 37 +++ .../Pos_A_ttcn3_module_xsd_004.ttcn | 37 +++ .../Pos_A_ttcn3_module_xsd_005.ttcn | 37 +++ .../Pos_A_ttcn3_module_xsd_006.ttcn | 37 +++ .../Pos_A_ttcn3_module_xsd_007.ttcn | 37 +++ .../Pos_A_ttcn3_module_xsd_008.ttcn | 37 +++ .../Pos_A_ttcn3_module_xsd_009.ttcn | 37 +++ .../Pos_A_ttcn3_module_xsd_010.ttcn | 37 +++ .../Pos_A_ttcn3_module_xsd_011.ttcn | 37 +++ .../Pos_A_ttcn3_module_xsd_012.ttcn | 37 +++ .../Pos_A_ttcn3_module_xsd_013.ttcn | 37 +++ .../Pos_A_ttcn3_module_xsd_014.ttcn | 37 +++ .../Pos_A_ttcn3_module_xsd_015.ttcn | 37 +++ .../Pos_A_ttcn3_module_xsd_016.ttcn | 37 +++ .../Pos_A_ttcn3_module_xsd_017.ttcn | 37 +++ .../Pos_A_ttcn3_module_xsd_018.ttcn | 37 +++ .../Pos_A_ttcn3_module_xsd_019.ttcn | 37 +++ .../Pos_A_ttcn3_module_xsd_020.ttcn | 37 +++ .../Pos_A_ttcn3_module_xsd_021.ttcn | 37 +++ .../Pos_A_ttcn3_module_xsd_022.ttcn | 37 +++ .../Pos_A_ttcn3_module_xsd_023.ttcn | 37 +++ .../Pos_A_ttcn3_module_xsd_024.ttcn | 37 +++ .../Pos_A_ttcn3_module_xsd_025.ttcn | 37 +++ .../Pos_A_ttcn3_module_xsd_026.ttcn | 37 +++ .../Pos_A_ttcn3_module_xsd_027.ttcn | 37 +++ .../Pos_A_ttcn3_module_xsd_028.ttcn | 37 +++ .../Pos_A_ttcn3_module_xsd_029.ttcn | 37 +++ .../Pos_A_ttcn3_module_xsd_030.ttcn | 37 +++ .../Pos_A_ttcn3_module_xsd_031.ttcn | 37 +++ .../Pos_A_ttcn3_module_xsd_032.ttcn | 37 +++ .../Pos_A_ttcn3_module_xsd_033.ttcn | 37 +++ .../Pos_A_ttcn3_module_xsd_034.ttcn | 37 +++ .../Pos_A_ttcn3_module_xsd_035.ttcn | 37 +++ .../Pos_A_ttcn3_module_xsd_036.ttcn | 37 +++ .../Pos_A_ttcn3_module_xsd_037.ttcn | 37 +++ .../Pos_A_ttcn3_module_xsd_038.ttcn | 37 +++ .../Pos_A_ttcn3_module_xsd_039.ttcn | 37 +++ .../Pos_A_ttcn3_module_xsd_040.ttcn | 37 +++ .../Pos_A_ttcn3_module_xsd_041.ttcn | 37 +++ .../Pos_A_ttcn3_module_xsd_042.ttcn | 37 +++ .../Pos_A_ttcn3_module_xsd_043.ttcn | 37 +++ .../Pos_A_ttcn3_module_xsd_044.ttcn | 37 +++ .../Pos_A_ttcn3_module_xsd_045.ttcn | 37 +++ .../Pos_A_ttcn3_module_xsd_046.ttcn | 37 +++ .../Pos_A_ttcn3_module_xsd_047.ttcn | 37 +++ .../Pos_A_ttcn3_module_xsd_048.ttcn | 37 +++ .../Pos_B0327_no_type_001.ttcn | 90 +++++++ .../Pos_B0327_no_type_001.xml | 2 + .../Pos_B0327_no_type_001.xsd | 9 + .../B0329_xml_header_control_001.ttcn | 26 ++ .../B0329_xml_header_control_001.xsd | 6 + .../B0329_xml_header_control_002.ttcn | 26 ++ .../B0329_xml_header_control_002.xsd | 6 + .../Neg_B_top_level_001.ttcn | 68 +++++ .../Neg_B_top_level_001.xsd | 8 + ATS/xml/README.txt | 92 +++++++ 4870 files changed, 187501 insertions(+) create mode 100644 ATS/core_language/05_basic_language_elements/0501_identifiers_and_keywords/NegSem_0501_Identifier_001.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0501_identifiers_and_keywords/NegSyn_0501_Identifier_001.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0501_identifiers_and_keywords/Syn_0501_Identifier_001.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0502_scope_rules/050201_Scope_of_parameters/Sem_050201_Scope_of_parameters_001.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0502_scope_rules/050201_Scope_of_parameters/Sem_050201_Scope_of_parameters_002.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0502_scope_rules/050202_Uniqueness_of_identifiers/NegSem_050202_Uniqueness_001.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0502_scope_rules/050202_Uniqueness_of_identifiers/NegSem_050202_Uniqueness_004.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0502_scope_rules/050202_Uniqueness_of_identifiers/NegSem_050202_Uniqueness_005.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0502_scope_rules/050202_Uniqueness_of_identifiers/NegSem_050202_Uniqueness_006.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0502_scope_rules/050202_Uniqueness_of_identifiers/NegSem_050202_Uniqueness_007.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0502_scope_rules/050202_Uniqueness_of_identifiers/NegSem_050202_Uniqueness_008.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0502_scope_rules/050202_Uniqueness_of_identifiers/NegSem_050202_Uniqueness_009.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0502_scope_rules/050202_Uniqueness_of_identifiers/NegSem_050202_Uniqueness_010.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0502_scope_rules/050202_Uniqueness_of_identifiers/NegSem_050202_Uniqueness_011.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0502_scope_rules/050202_Uniqueness_of_identifiers/NegSem_050202_Uniqueness_012.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0502_scope_rules/050202_Uniqueness_of_identifiers/Sem_050202_Uniqueness_001.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0502_scope_rules/050202_Uniqueness_of_identifiers/Sem_050202_Uniqueness_002.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0502_scope_rules/050202_Uniqueness_of_identifiers/Sem_050202_Uniqueness_003.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0502_scope_rules/050202_Uniqueness_of_identifiers/Sem_050202_Uniqueness_004.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0502_scope_rules/050202_Uniqueness_of_identifiers/Sem_050202_Uniqueness_005.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0502_scope_rules/0502_toplevel/NegSem_0502_Scope_001.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0502_scope_rules/0502_toplevel/NegSem_0502_Scope_002.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0502_scope_rules/0502_toplevel/NegSem_0502_Scope_003.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0502_scope_rules/0502_toplevel/Sem_0502_Scope_001.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0502_scope_rules/0502_toplevel/Sem_0502_Scope_002.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0502_scope_rules/0502_toplevel/Sem_0502_Scope_003.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0502_scope_rules/0502_toplevel/Sem_0502_Scope_004.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0502_scope_rules/0502_toplevel/Sem_0502_Scope_008.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0502_scope_rules/0502_toplevel/Syn_0502_Scope_001.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0503_ordering_of_declarations/NegSem_0503_Ordering_001.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0503_ordering_of_declarations/NegSem_0503_Ordering_002.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0503_ordering_of_declarations/NegSem_0503_Ordering_003.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0503_ordering_of_declarations/Sem_0503_Ordering_001.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0503_ordering_of_declarations/Sem_0503_Ordering_002.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0503_ordering_of_declarations/Sem_0503_Ordering_005.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/NegSem_05040101_parameters_of_kind_value_001.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/NegSem_05040101_parameters_of_kind_value_002.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/NegSem_05040101_parameters_of_kind_value_003.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/NegSem_05040101_parameters_of_kind_value_004.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/NegSem_05040101_parameters_of_kind_value_005.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/NegSem_05040101_parameters_of_kind_value_006.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/NegSem_05040101_parameters_of_kind_value_007.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/NegSem_05040101_parameters_of_kind_value_009.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/NegSem_05040101_parameters_of_kind_value_011.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/NegSem_05040101_parameters_of_kind_value_012.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/NegSem_05040101_parameters_of_kind_value_013.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/NegSem_05040101_parameters_of_kind_value_014.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/NegSem_05040101_parameters_of_kind_value_015.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/NegSem_05040101_parameters_of_kind_value_016.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/NegSem_05040101_parameters_of_kind_value_017.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/NegSem_05040101_parameters_of_kind_value_018.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/NegSyn_05040101_parameters_of_kind_value_001.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/NegSyn_05040101_parameters_of_kind_value_002.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/NegSyn_05040101_parameters_of_kind_value_003.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/NegSyn_05040101_parameters_of_kind_value_004.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/NegSyn_05040101_parameters_of_kind_value_005.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/NegSyn_05040101_parameters_of_kind_value_006.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/NegSyn_05040101_parameters_of_kind_value_007.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/NegSyn_05040101_parameters_of_kind_value_008.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/NegSyn_05040101_parameters_of_kind_value_009.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/NegSyn_05040101_parameters_of_kind_value_010.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/NegSyn_05040101_parameters_of_kind_value_011.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/NegSyn_05040101_parameters_of_kind_value_012.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/NegSyn_05040101_parameters_of_kind_value_013.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/Sem_05040101_parameters_of_kind_value_001.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/Sem_05040101_parameters_of_kind_value_002.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/Sem_05040101_parameters_of_kind_value_003.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/Sem_05040101_parameters_of_kind_value_004.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/Sem_05040101_parameters_of_kind_value_005.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/Sem_05040101_parameters_of_kind_value_006.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/Sem_05040101_parameters_of_kind_value_007.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/Sem_05040101_parameters_of_kind_value_008.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/Sem_05040101_parameters_of_kind_value_009.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/Sem_05040101_parameters_of_kind_value_010.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/Sem_05040101_parameters_of_kind_value_011.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/Sem_05040101_parameters_of_kind_value_012.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/Sem_05040101_parameters_of_kind_value_013.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/Sem_05040101_parameters_of_kind_value_014.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/Sem_05040101_parameters_of_kind_value_015.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/Sem_05040101_parameters_of_kind_value_016.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/Sem_05040101_parameters_of_kind_value_017.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/Sem_05040101_parameters_of_kind_value_018.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/Sem_05040101_parameters_of_kind_value_019.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/Sem_05040101_parameters_of_kind_value_020.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/Sem_05040101_parameters_of_kind_value_021.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/Sem_05040101_parameters_of_kind_value_022.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/Sem_05040101_parameters_of_kind_value_023.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/Sem_05040101_parameters_of_kind_value_024.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/Sem_05040101_parameters_of_kind_value_025.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/NegSem_05040102_parameters_of_kind_template_001.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/NegSem_05040102_parameters_of_kind_template_002.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/NegSem_05040102_parameters_of_kind_template_003.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/NegSem_05040102_parameters_of_kind_template_004.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/NegSem_05040102_parameters_of_kind_template_005.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/NegSem_05040102_parameters_of_kind_template_006.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/NegSem_05040102_parameters_of_kind_template_007.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/NegSem_05040102_parameters_of_kind_template_009.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/NegSem_05040102_parameters_of_kind_template_011.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/NegSem_05040102_parameters_of_kind_template_012.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/NegSem_05040102_parameters_of_kind_template_013.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/NegSem_05040102_parameters_of_kind_template_014.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/NegSem_05040102_parameters_of_kind_template_015.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/NegSem_05040102_parameters_of_kind_template_016.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/NegSem_05040102_parameters_of_kind_template_017.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/NegSem_05040102_parameters_of_kind_template_018.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/NegSem_05040102_parameters_of_kind_template_019.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/NegSyn_05040102_parameters_of_kind_template_001.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_001.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_002.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_003.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_004.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_005.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_006.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_007.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_008.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_009.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_010.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_011.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_012.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_013.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_014.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_015.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_016.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_017.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_018.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_019.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_020.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_021.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_022.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_023.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_024.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_025.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_026.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_027.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_028.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_029.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_030.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_031.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_032.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_033.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_034.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_035.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_036.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_037.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_038.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_039.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_040.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_041.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040103_parameters_of_kind_timer/NegSem_05040103_parameters_of_kind_timer_001.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040103_parameters_of_kind_timer/NegSem_05040103_parameters_of_kind_timer_002.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040103_parameters_of_kind_timer/NegSem_05040103_parameters_of_kind_timer_003.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040103_parameters_of_kind_timer/NegSem_05040103_parameters_of_kind_timer_004.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040103_parameters_of_kind_timer/NegSyn_05040103_parameters_of_kind_timer_001.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040103_parameters_of_kind_timer/NegSyn_05040103_parameters_of_kind_timer_002.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040103_parameters_of_kind_timer/Sem_05040103_parameters_of_kind_timer_001.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040103_parameters_of_kind_timer/Sem_05040103_parameters_of_kind_timer_002.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040103_parameters_of_kind_timer/Sem_05040103_parameters_of_kind_timer_003.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040104_parameters_of_kind_port/NegSem_05040104_parameters_of_kind_port_001.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040104_parameters_of_kind_port/NegSem_05040104_parameters_of_kind_port_002.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040104_parameters_of_kind_port/NegSem_05040104_parameters_of_kind_port_003.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040104_parameters_of_kind_port/NegSem_05040104_parameters_of_kind_port_004.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040104_parameters_of_kind_port/NegSem_05040104_parameters_of_kind_port_005.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040104_parameters_of_kind_port/NegSem_05040104_parameters_of_kind_port_006.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040104_parameters_of_kind_port/Sem_05040104_parameters_of_kind_port_001.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040104_parameters_of_kind_port/Sem_05040104_parameters_of_kind_port_002.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/050401_top_level/NOTES create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/050401_top_level/NegSem_050401_top_level_001.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/050401_top_level/NegSem_050401_top_level_002.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/050401_top_level/NegSem_050401_top_level_003.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/050401_top_level/Sem_050401_top_level_001.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/050401_top_level/Sem_050401_top_level_002.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/050401_top_level/Sem_050401_top_level_003.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/050401_top_level/Sem_050401_top_level_004.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/050401_top_level/Sem_050401_top_level_005.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/050401_top_level/Sem_050401_top_level_006.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/050401_top_level/Sem_050401_top_level_007.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/050401_top_level/Sem_050401_top_level_008.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/050401_top_level/Sem_050401_top_level_009.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/050401_top_level/Sem_050401_top_level_010.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/050401_top_level/Sem_050401_top_level_011.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/050401_top_level/Sem_050401_top_level_012.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/050401_top_level/Sem_050401_top_level_013.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/050401_top_level/Sem_050401_top_level_014.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/050401_top_level/Sem_050401_top_level_015.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/050401_top_level/Sem_050401_top_level_016.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/050401_top_level/Sem_050401_top_level_017.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/050401_top_level/Sem_050401_top_level_018.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/050401_top_level/Sem_050401_top_level_019.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/050401_top_level/Sem_050401_top_level_020.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/050401_top_level/Sem_050401_top_level_021.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/050401_top_level/Sem_050401_top_level_022.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/050401_top_level/Sem_050401_top_level_023.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/050401_top_level/Sem_050401_top_level_024.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/050401_top_level/Sem_050401_top_level_025.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/050401_top_level/Sem_050401_top_level_026.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/050401_top_level/Sem_050401_top_level_027.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/050401_top_level/Sem_050401_top_level_028.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/050401_top_level/Sem_050401_top_level_029.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_001.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_002.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_003.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_004.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_005.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_006.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_007.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_008.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_009.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_010.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_011.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_012.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_013.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_014.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_015.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_016.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_017.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_018.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_019.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_020.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_021.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_022.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_023.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_024.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_025.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_026.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_027.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_028.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_029.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_030.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_031.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_032.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_033.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_034.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_035.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_036.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_037.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_038.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_039.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_040.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_041.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_042.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_043.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_044.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_045.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_046.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_047.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_048.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_049.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_050.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_051.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_052.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_053.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_054.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_055.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_056.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_057.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_058.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_059.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_060.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_061.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_062.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_063.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_064.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_065.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_066.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_067.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_068.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_069.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_070.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_071.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_072.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_073.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_074.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_075.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_076.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_077.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_078.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_079.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_080.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_081.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_082.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_083.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_084.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_085.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_086.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_087.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_088.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_089.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_090.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_091.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_092.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_093.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_094.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_095.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_096.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_097.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_098.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_099.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_100.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_101.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_102.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_103.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_104.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_105.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_106.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_107.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_108.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_109.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_110.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_111.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_112.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_113.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_114.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_115.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_116.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_117.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_118.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_119.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_120.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_121.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_122.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_123.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_124.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_125.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_126.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_127.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_128.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_129.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_130.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_131.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_132.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_133.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_134.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_135.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_136.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_137.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_138.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_139.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_140.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_141.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_142.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_143.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_144.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_145.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_146.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_147.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_148.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_149.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_150.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_151.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_152.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_153.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_154.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_155.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_156.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_157.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_158.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_159.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_160.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_161.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_162.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_163.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_164.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_165.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_166.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_167.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_168.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_169.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_170.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_171.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_172.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_173.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_174.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_175.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_176.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_177.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_178.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_179.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_180.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_181.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_182.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_183.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSyn_050402_actual_parameters_001.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_001.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_002.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_003.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_004.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_005.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_006.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_007.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_008.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_009.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_010.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_011.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_012.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_013.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_014.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_015.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_016.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_017.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_018.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_019.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_020.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_021.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_022.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_023.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_024.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_025.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_026.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_027.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_028.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_029.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_030.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_031.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_032.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_033.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_034.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_035.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_036.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_037.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_038.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_039.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_040.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_041.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_042.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_043.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_044.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_045.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_046.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_047.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_048.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_049.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_050.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_051.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_052.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_053.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_054.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_055.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_056.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_057.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_058.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_059.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_060.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_061.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_062.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_063.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_064.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_065.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_066.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_067.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_068.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_069.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_070.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_071.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_072.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_073.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_074.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_075.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_076.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_077.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_078.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_079.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_080.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_081.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_082.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_083.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_084.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_085.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_086.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_087.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_088.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_089.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_090.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_091.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_092.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_093.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_094.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_095.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_096.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_097.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_098.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_099.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_100.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_101.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_102.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_103.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_104.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_105.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_106.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_107.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_108.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_109.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_110.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_111.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_112.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_113.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_114.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_115.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_116.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_117.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_118.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_119.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_120.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_121.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_122.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_123.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_124.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_125.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_126.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_127.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_128.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_129.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_130.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_131.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_132.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_133.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_134.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_135.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_136.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_137.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_138.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_139.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_140.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_141.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_142.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_143.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_144.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_145.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_146.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_147.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_148.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_149.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_150.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_151.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_152.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_153.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_154.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_155.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_156.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_157.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_158.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_159.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_160.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_161.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_162.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_163.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_164.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_165.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_166.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_167.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_168.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_169.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_170.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_171.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_172.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_173.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_174.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_175.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_176.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_177.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_178.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_179.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_180.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_181.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_182.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_183.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_184.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_185.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_186.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_187.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_188.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_189.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_190.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_191.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_192.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_193.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_194.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_195.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_196.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_197.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_198.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_199.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_200.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_201.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_202.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_203.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_204.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_205.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_206.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_207.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_208.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_209.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_210.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_211.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_212.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_213.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_214.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_215.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_216.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_217.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_218.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_219.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_220.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_221.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_222.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_223.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_224.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_225.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_226.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_227.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/0504_toplevel/NegSem_0504_parametrization_incompatibility_001.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/0504_toplevel/NegSyn_0504_forbidden_parametrization_001.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0504_parametrization/0504_toplevel/NegSyn_0504_forbidden_parametrization_002.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0505_cyclic_definitions/NegSem_0505_cyclic_definitions_001.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0505_cyclic_definitions/NegSem_0505_cyclic_definitions_002.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0505_cyclic_definitions/Sem_0505_cyclic_definitions_001.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0505_cyclic_definitions/Sem_0505_cyclic_definitions_002.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0505_cyclic_definitions/Sem_0505_cyclic_definitions_003.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/0505_cyclic_definitions/Sem_0505_cyclic_definitions_004.ttcn create mode 100644 ATS/core_language/05_basic_language_elements/05_toplevel/NegSyn_05_TopLevel_001.ttcn create mode 100644 ATS/core_language/06_types_and_values/0601_basic_types_and_values/060100_simple_basic_types_and_values/NegSyn_060100_SimpleBasicTypes_001.ttcn create mode 100644 ATS/core_language/06_types_and_values/0601_basic_types_and_values/060100_simple_basic_types_and_values/NegSyn_060100_SimpleBasicTypes_002.ttcn create mode 100644 ATS/core_language/06_types_and_values/0601_basic_types_and_values/060100_simple_basic_types_and_values/NegSyn_060100_SimpleBasicTypes_003.ttcn create mode 100644 ATS/core_language/06_types_and_values/0601_basic_types_and_values/060100_simple_basic_types_and_values/NegSyn_060100_SimpleBasicTypes_004.ttcn create mode 100644 ATS/core_language/06_types_and_values/0601_basic_types_and_values/060100_simple_basic_types_and_values/NegSyn_060100_SimpleBasicTypes_005.ttcn create mode 100644 ATS/core_language/06_types_and_values/0601_basic_types_and_values/060100_simple_basic_types_and_values/NegSyn_060100_SimpleBasicTypes_006.ttcn create mode 100644 ATS/core_language/06_types_and_values/0601_basic_types_and_values/060100_simple_basic_types_and_values/Sem_060100_SimpleBasicTypes_001.ttcn create mode 100644 ATS/core_language/06_types_and_values/0601_basic_types_and_values/060100_simple_basic_types_and_values/Sem_060100_SimpleBasicTypes_002.ttcn create mode 100644 ATS/core_language/06_types_and_values/0601_basic_types_and_values/060100_simple_basic_types_and_values/Sem_060100_SimpleBasicTypes_003.ttcn create mode 100644 ATS/core_language/06_types_and_values/0601_basic_types_and_values/060100_simple_basic_types_and_values/Sem_060100_SimpleBasicTypes_004.ttcn create mode 100644 ATS/core_language/06_types_and_values/0601_basic_types_and_values/060100_simple_basic_types_and_values/Sem_060100_SimpleBasicTypes_005.ttcn create mode 100644 ATS/core_language/06_types_and_values/0601_basic_types_and_values/060100_simple_basic_types_and_values/Syn_060100_SimpleBasicTypes_001.ttcn create mode 100644 ATS/core_language/06_types_and_values/0601_basic_types_and_values/060100_simple_basic_types_and_values/Syn_060100_SimpleBasicTypes_002.ttcn create mode 100644 ATS/core_language/06_types_and_values/0601_basic_types_and_values/060100_simple_basic_types_and_values/Syn_060100_SimpleBasicTypes_003.ttcn create mode 100644 ATS/core_language/06_types_and_values/0601_basic_types_and_values/060100_simple_basic_types_and_values/Syn_060100_SimpleBasicTypes_004.ttcn create mode 100644 ATS/core_language/06_types_and_values/0601_basic_types_and_values/060100_simple_basic_types_and_values/Syn_060100_SimpleBasicTypes_005.ttcn create mode 100644 ATS/core_language/06_types_and_values/0601_basic_types_and_values/060100_simple_basic_types_and_values/Syn_060100_SimpleBasicTypes_006.ttcn create mode 100644 ATS/core_language/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 create mode 100644 ATS/core_language/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/06010101_accessing_individual_string_elements/NegSem_06010101_AccessStringElements_002.ttcn create mode 100644 ATS/core_language/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/06010101_accessing_individual_string_elements/NegSyn_06010101_AccessStringElements_001.ttcn create mode 100644 ATS/core_language/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/06010101_accessing_individual_string_elements/NegSyn_06010101_AccessStringElements_002.ttcn create mode 100644 ATS/core_language/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/06010101_accessing_individual_string_elements/Sem_06010101_AccessStringElements_001.ttcn create mode 100644 ATS/core_language/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/06010101_accessing_individual_string_elements/Sem_06010101_AccessStringElements_002.ttcn create mode 100644 ATS/core_language/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/06010101_accessing_individual_string_elements/Sem_06010101_AccessStringElements_003.ttcn create mode 100644 ATS/core_language/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/06010101_accessing_individual_string_elements/Sem_06010101_AccessStringElements_004.ttcn create mode 100644 ATS/core_language/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/06010101_accessing_individual_string_elements/Sem_06010101_AccessStringElements_005.ttcn create mode 100644 ATS/core_language/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/06010101_accessing_individual_string_elements/Sem_06010101_AccessStringElements_006.ttcn create mode 100644 ATS/core_language/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/06010101_accessing_individual_string_elements/Sem_06010101_AccessStringElements_007.ttcn create mode 100644 ATS/core_language/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/06010101_accessing_individual_string_elements/Sem_06010101_AccessStringElements_008.ttcn create mode 100644 ATS/core_language/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/06010101_accessing_individual_string_elements/Sem_06010101_AccessStringElements_009.ttcn create mode 100644 ATS/core_language/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/06010101_accessing_individual_string_elements/Sem_06010101_AccessStringElements_010.ttcn create mode 100644 ATS/core_language/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/060101_toplevel/NegSyn_060101_TopLevel_001.ttcn create mode 100644 ATS/core_language/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/060101_toplevel/NegSyn_060101_TopLevel_002.ttcn create mode 100644 ATS/core_language/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/060101_toplevel/NegSyn_060101_TopLevel_003.ttcn create mode 100644 ATS/core_language/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/060101_toplevel/NegSyn_060101_TopLevel_004.ttcn create mode 100644 ATS/core_language/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/060101_toplevel/NegSyn_060101_TopLevel_005.ttcn create mode 100644 ATS/core_language/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/060101_toplevel/NegSyn_060101_TopLevel_006.ttcn create mode 100644 ATS/core_language/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/060101_toplevel/NegSyn_060101_TopLevel_007.ttcn create mode 100644 ATS/core_language/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/060101_toplevel/NegSyn_060101_TopLevel_008.ttcn create mode 100644 ATS/core_language/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/060101_toplevel/NegSyn_060101_TopLevel_009.ttcn create mode 100644 ATS/core_language/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/060101_toplevel/NegSyn_060101_TopLevel_010.ttcn create mode 100644 ATS/core_language/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/060101_toplevel/Sem_060101_TopLevel_001.ttcn create mode 100644 ATS/core_language/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/060101_toplevel/Sem_060101_TopLevel_002.ttcn create mode 100644 ATS/core_language/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/060101_toplevel/Sem_060101_TopLevel_003.ttcn create mode 100644 ATS/core_language/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/060101_toplevel/Sem_060101_TopLevel_004.ttcn create mode 100644 ATS/core_language/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/060101_toplevel/Sem_060101_TopLevel_005.ttcn create mode 100644 ATS/core_language/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/060101_toplevel/Sem_060101_TopLevel_006.ttcn create mode 100644 ATS/core_language/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/060101_toplevel/Sem_060101_TopLevel_007.ttcn create mode 100644 ATS/core_language/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/060101_toplevel/Sem_060101_TopLevel_008.ttcn create mode 100644 ATS/core_language/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/060101_toplevel/Sem_060101_TopLevel_009.ttcn create mode 100644 ATS/core_language/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/060101_toplevel/Sem_060101_TopLevel_010.ttcn create mode 100644 ATS/core_language/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/060101_toplevel/Sem_060101_TopLevel_011.ttcn create mode 100644 ATS/core_language/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/060101_toplevel/Sem_060101_TopLevel_012.ttcn create mode 100644 ATS/core_language/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/060101_toplevel/Sem_060101_TopLevel_013.ttcn create mode 100644 ATS/core_language/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/060101_toplevel/Sem_060101_TopLevel_014.ttcn create mode 100644 ATS/core_language/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/060101_toplevel/Sem_060101_TopLevel_015.ttcn create mode 100644 ATS/core_language/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/060101_toplevel/Syn_060101_TopLevel_001.ttcn create mode 100644 ATS/core_language/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/060101_toplevel/Syn_060101_TopLevel_002.ttcn create mode 100644 ATS/core_language/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/060101_toplevel/Syn_060101_TopLevel_003.ttcn create mode 100644 ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010201_lists_of_values/NOTES create mode 100644 ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010201_lists_of_values/NegSem_06010201_ListOfValues_001.ttcn create mode 100644 ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010201_lists_of_values/NegSem_06010201_ListOfValues_002.ttcn create mode 100644 ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010201_lists_of_values/NegSem_06010201_ListOfValues_003.ttcn create mode 100644 ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010201_lists_of_values/NegSem_06010201_ListOfValues_004.ttcn create mode 100644 ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010201_lists_of_values/NegSem_06010201_ListOfValues_005.ttcn create mode 100644 ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010201_lists_of_values/NegSem_06010201_ListOfValues_006.ttcn create mode 100644 ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010201_lists_of_values/Sem_06010201_ListOfValues_001.ttcn create mode 100644 ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010202_lists_of_types/NOTES create mode 100644 ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010202_lists_of_types/NegSem_06010202_ListOfTypes_001.ttcn create mode 100644 ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010202_lists_of_types/NegSem_06010202_ListOfTypes_002.ttcn create mode 100644 ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010202_lists_of_types/NegSem_06010202_ListOfTypes_003.ttcn create mode 100644 ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010202_lists_of_types/NegSem_06010202_ListOfTypes_004.ttcn create mode 100644 ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010202_lists_of_types/NegSem_06010202_ListOfTypes_005.ttcn create mode 100644 ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010202_lists_of_types/NegSem_06010202_ListOfTypes_006.ttcn create mode 100644 ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010202_lists_of_types/NegSem_06010202_ListOfTypes_007.ttcn create mode 100644 ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010202_lists_of_types/NegSem_06010202_ListOfTypes_008.ttcn create mode 100644 ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010202_lists_of_types/NegSem_06010202_ListOfTypes_009.ttcn create mode 100644 ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010202_lists_of_types/Sem_06010202_ListOfTypes_001.ttcn create mode 100644 ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010202_lists_of_types/Sem_06010202_ListOfTypes_002.ttcn create mode 100644 ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010202_lists_of_types/Sem_06010202_ListOfTypes_003.ttcn create mode 100644 ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010202_lists_of_types/Sem_06010202_ListOfTypes_004.ttcn create mode 100644 ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010202_lists_of_types/Sem_06010202_ListOfTypes_005.ttcn create mode 100644 ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010202_lists_of_types/Sem_06010202_ListOfTypes_006.ttcn create mode 100644 ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010202_lists_of_types/Sem_06010202_ListOfTypes_007.ttcn create mode 100644 ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010202_lists_of_types/Sem_06010202_ListOfTypes_008.ttcn create mode 100644 ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010202_lists_of_types/Sem_06010202_ListOfTypes_009.ttcn create mode 100644 ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010203_ranges/NegSem_06010203_Ranges_001.ttcn create mode 100644 ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010203_ranges/NegSem_06010203_Ranges_002.ttcn create mode 100644 ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010203_ranges/NegSem_06010203_Ranges_003.ttcn create mode 100644 ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010203_ranges/NegSem_06010203_Ranges_004.ttcn create mode 100644 ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010203_ranges/NegSem_06010203_Ranges_005.ttcn create mode 100644 ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010203_ranges/NegSem_06010203_Ranges_006.ttcn create mode 100644 ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010203_ranges/NegSem_06010203_Ranges_007.ttcn create mode 100644 ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010203_ranges/NegSem_06010203_Ranges_008.ttcn create mode 100644 ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010203_ranges/NegSem_06010203_Ranges_009.ttcn create mode 100644 ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010203_ranges/NegSem_06010203_Ranges_010.ttcn create mode 100644 ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010203_ranges/NegSem_06010203_Ranges_011.ttcn create mode 100644 ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010203_ranges/NegSem_06010203_Ranges_012.ttcn create mode 100644 ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010203_ranges/NegSem_06010203_Ranges_013.ttcn create mode 100644 ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010203_ranges/NegSem_06010203_Ranges_014.ttcn create mode 100644 ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010203_ranges/NegSem_06010203_Ranges_015.ttcn create mode 100644 ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010203_ranges/NegSem_06010203_Ranges_016.ttcn create mode 100644 ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010203_ranges/NegSem_06010203_Ranges_017.ttcn create mode 100644 ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010203_ranges/Sem_06010203_Ranges_001.ttcn create mode 100644 ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010203_ranges/Sem_06010203_Ranges_002.ttcn create mode 100644 ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010203_ranges/Sem_06010203_Ranges_003.ttcn create mode 100644 ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010203_ranges/Sem_06010203_Ranges_004.ttcn create mode 100644 ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010203_ranges/Sem_06010203_Ranges_005.ttcn create mode 100644 ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010203_ranges/Sem_06010203_Ranges_006.ttcn create mode 100644 ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010203_ranges/Sem_06010203_Ranges_007.ttcn create mode 100644 ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010203_ranges/Sem_06010203_Ranges_008.ttcn create mode 100644 ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010204_string_length_restrictions/NOTES create mode 100644 ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010204_string_length_restrictions/NegSem_06010204_StringLenghtRestrict_001.ttcn create mode 100644 ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010204_string_length_restrictions/NegSem_06010204_StringLenghtRestrict_002.ttcn create mode 100644 ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010204_string_length_restrictions/NegSem_06010204_StringLenghtRestrict_003.ttcn create mode 100644 ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010204_string_length_restrictions/NegSem_06010204_StringLenghtRestrict_004.ttcn create mode 100644 ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010204_string_length_restrictions/NegSem_06010204_StringLenghtRestrict_005.ttcn create mode 100644 ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010204_string_length_restrictions/NegSem_06010204_StringLenghtRestrict_006.ttcn create mode 100644 ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010204_string_length_restrictions/NegSem_06010204_StringLenghtRestrict_007.ttcn create mode 100644 ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010204_string_length_restrictions/NegSem_06010204_StringLenghtRestrict_008.ttcn create mode 100644 ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010204_string_length_restrictions/NegSyn_06010204_StringLenghtRestrict_001.ttcn create mode 100644 ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010204_string_length_restrictions/NegSyn_06010204_StringLenghtRestrict_002.ttcn create mode 100644 ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010204_string_length_restrictions/Sem_06010204_StringLenghtRestrict_001.ttcn create mode 100644 ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010204_string_length_restrictions/Sem_06010204_StringLenghtRestrict_002.ttcn create mode 100644 ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010204_string_length_restrictions/Sem_06010204_StringLenghtRestrict_003.ttcn create mode 100644 ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010204_string_length_restrictions/Sem_06010204_StringLenghtRestrict_004.ttcn create mode 100644 ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010205_pattern_subtyping_of_character_string_types/NOTES create mode 100644 ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010205_pattern_subtyping_of_character_string_types/NegSem_06010205_StringPattern_001.ttcn create mode 100644 ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010205_pattern_subtyping_of_character_string_types/NegSyn_06010205_StringPattern_001.ttcn create mode 100644 ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010205_pattern_subtyping_of_character_string_types/NegSyn_06010205_StringPattern_002.ttcn create mode 100644 ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010205_pattern_subtyping_of_character_string_types/Sem_06010205_StringPattern_001.ttcn create mode 100644 ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010205_pattern_subtyping_of_character_string_types/Sem_06010205_StringPattern_002.ttcn create mode 100644 ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010205_pattern_subtyping_of_character_string_types/Sem_06010205_StringPattern_003.ttcn create mode 100644 ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010206_mixing_subtyping_mechanisms/0601020601_mixing_patterns_lists_and_ranges/NegSem_0601020601_MixingSubtype_001.ttcn create mode 100644 ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010206_mixing_subtyping_mechanisms/0601020601_mixing_patterns_lists_and_ranges/NegSem_0601020601_MixingSubtype_002.ttcn create mode 100644 ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010206_mixing_subtyping_mechanisms/0601020601_mixing_patterns_lists_and_ranges/Sem_0601020601_MixingSubtype_001.ttcn create mode 100644 ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010206_mixing_subtyping_mechanisms/0601020601_mixing_patterns_lists_and_ranges/Sem_0601020601_MixingSubtype_002.ttcn create mode 100644 ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010206_mixing_subtyping_mechanisms/0601020602_using_length_restriction_with_other_constraints/NOTES create mode 100644 ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010206_mixing_subtyping_mechanisms/0601020602_using_length_restriction_with_other_constraints/NegSem_0601020602_StringMixing_001.ttcn create mode 100644 ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010206_mixing_subtyping_mechanisms/0601020602_using_length_restriction_with_other_constraints/NegSem_0601020602_StringMixing_002.ttcn create mode 100644 ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010206_mixing_subtyping_mechanisms/0601020602_using_length_restriction_with_other_constraints/NegSem_0601020602_StringMixing_003.ttcn create mode 100644 ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010206_mixing_subtyping_mechanisms/0601020602_using_length_restriction_with_other_constraints/NegSem_0601020602_StringMixing_004.ttcn create mode 100644 ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010206_mixing_subtyping_mechanisms/0601020602_using_length_restriction_with_other_constraints/NegSem_0601020602_StringMixing_005.ttcn create mode 100644 ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010206_mixing_subtyping_mechanisms/0601020602_using_length_restriction_with_other_constraints/NegSem_0601020602_StringMixing_006.ttcn create mode 100644 ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010206_mixing_subtyping_mechanisms/0601020602_using_length_restriction_with_other_constraints/Sem_0601020602_StringMixing_001.ttcn create mode 100644 ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010206_mixing_subtyping_mechanisms/0601020602_using_length_restriction_with_other_constraints/Sem_0601020602_StringMixing_002.ttcn create mode 100644 ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010206_mixing_subtyping_mechanisms/0601020602_using_length_restriction_with_other_constraints/Sem_0601020602_StringMixing_003.ttcn create mode 100644 ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010206_mixing_subtyping_mechanisms/0601020602_using_length_restriction_with_other_constraints/Sem_0601020602_StringMixing_004.ttcn create mode 100644 ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010206_mixing_subtyping_mechanisms/0601020602_using_length_restriction_with_other_constraints/Sem_0601020602_StringMixing_005.ttcn create mode 100644 ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010206_mixing_subtyping_mechanisms/0601020602_using_length_restriction_with_other_constraints/Sem_0601020602_StringMixing_006.ttcn create mode 100644 ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010206_mixing_subtyping_mechanisms/0601020602_using_length_restriction_with_other_constraints/Sem_0601020602_StringMixing_007.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060201_record_type_and_values/06020101_referencing_fields_of_record_type/NegSem_06020101_ReferencingRecordFields_001.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060201_record_type_and_values/06020101_referencing_fields_of_record_type/NegSem_06020101_ReferencingRecordFields_002.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060201_record_type_and_values/06020101_referencing_fields_of_record_type/NegSem_06020101_ReferencingRecordFields_003.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060201_record_type_and_values/06020101_referencing_fields_of_record_type/NegSem_06020101_ReferencingRecordFields_004.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060201_record_type_and_values/06020101_referencing_fields_of_record_type/Sem_06020101_ReferencingRecordFields_001.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060201_record_type_and_values/06020101_referencing_fields_of_record_type/Sem_06020101_ReferencingRecordFields_002.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060201_record_type_and_values/06020101_referencing_fields_of_record_type/Sem_06020101_ReferencingRecordFields_003.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060201_record_type_and_values/06020101_referencing_fields_of_record_type/Sem_06020101_ReferencingRecordFields_004.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060201_record_type_and_values/06020101_referencing_fields_of_record_type/Sem_06020101_ReferencingRecordFields_005.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060201_record_type_and_values/06020101_referencing_fields_of_record_type/Sem_06020101_ReferencingRecordFields_006.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060201_record_type_and_values/06020101_referencing_fields_of_record_type/Sem_06020101_ReferencingRecordFields_007.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060201_record_type_and_values/06020101_referencing_fields_of_record_type/Sem_06020101_ReferencingRecordFields_008.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060201_record_type_and_values/06020101_referencing_fields_of_record_type/Sem_06020101_ReferencingRecordFields_009.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060201_record_type_and_values/06020101_referencing_fields_of_record_type/Sem_06020101_ReferencingRecordFields_010.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060201_record_type_and_values/06020101_referencing_fields_of_record_type/Sem_06020101_ReferencingRecordFields_011.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060201_record_type_and_values/06020101_referencing_fields_of_record_type/Sem_06020101_ReferencingRecordFields_012.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060201_record_type_and_values/06020101_referencing_fields_of_record_type/Sem_06020101_ReferencingRecordFields_013.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060201_record_type_and_values/06020101_referencing_fields_of_record_type/Sem_06020101_ReferencingRecordFields_014.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060201_record_type_and_values/06020101_referencing_fields_of_record_type/Sem_06020101_ReferencingRecordFields_015.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060201_record_type_and_values/06020101_referencing_fields_of_record_type/Sem_06020101_ReferencingRecordFields_016.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060201_record_type_and_values/06020101_referencing_fields_of_record_type/Sem_06020101_ReferencingRecordFields_017.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060201_record_type_and_values/060201_toplevel/NegSem_060201_RecordTypeValues_001.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060201_record_type_and_values/060201_toplevel/NegSyn_060201_RecordTypeValues_001.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060201_record_type_and_values/060201_toplevel/NegSyn_060201_RecordTypeValues_002.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060201_record_type_and_values/060201_toplevel/Sem_060201_RecordTypeValues_001.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060201_record_type_and_values/060201_toplevel/Sem_060201_RecordTypeValues_002.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060201_record_type_and_values/060201_toplevel/Sem_060201_RecordTypeValues_003.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060201_record_type_and_values/060201_toplevel/Sem_060201_RecordTypeValues_004.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060201_record_type_and_values/060201_toplevel/Syn_060201_RecordTypeValues_001.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060201_record_type_and_values/060201_toplevel/Syn_060201_RecordTypeValues_002.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060202_set_type_and_values/NegSem_060202_SetTypeValues_001.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060202_set_type_and_values/NegSem_060202_SetTypeValues_002.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060202_set_type_and_values/NegSyn_060202_SetTypeValues_001.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060202_set_type_and_values/NegSyn_060202_SetTypeValues_002.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060202_set_type_and_values/Sem_060202_SetTypeValues_001.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060202_set_type_and_values/Sem_060202_SetTypeValues_002.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060202_set_type_and_values/Sem_060202_SetTypeValues_003.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060202_set_type_and_values/Sem_060202_SetTypeValues_004.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060202_set_type_and_values/Sem_060202_SetTypeValues_005.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060202_set_type_and_values/Sem_060202_SetTypeValues_006.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060202_set_type_and_values/Sem_060202_SetTypeValues_007.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060202_set_type_and_values/Sem_060202_SetTypeValues_008.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060202_set_type_and_values/Syn_060202_SetTypeValues_001.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060202_set_type_and_values/Syn_060202_SetTypeValues_002.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/NegSem_060203_records_and_sets_of_single_types_001.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/NegSem_060203_records_and_sets_of_single_types_002.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/NegSem_060203_records_and_sets_of_single_types_003.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/NegSem_060203_records_and_sets_of_single_types_004.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/NegSem_060203_records_and_sets_of_single_types_005.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/NegSem_060203_records_and_sets_of_single_types_006.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/NegSem_060203_records_and_sets_of_single_types_007.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/NegSem_060203_records_and_sets_of_single_types_008.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/NegSem_060203_records_and_sets_of_single_types_009.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/NegSem_060203_records_and_sets_of_single_types_010.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/NegSem_060203_records_and_sets_of_single_types_011.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/NegSem_060203_records_and_sets_of_single_types_012.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/NegSem_060203_records_and_sets_of_single_types_013.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/NegSem_060203_records_and_sets_of_single_types_014.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/NegSem_060203_records_and_sets_of_single_types_015.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/NegSem_060203_records_and_sets_of_single_types_016.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/NegSem_060203_records_and_sets_of_single_types_017.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/NegSem_060203_records_and_sets_of_single_types_018.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/NegSem_060203_records_and_sets_of_single_types_019.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/NegSem_060203_records_and_sets_of_single_types_020.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/NegSem_060203_records_and_sets_of_single_types_021.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/NegSem_060203_records_and_sets_of_single_types_022.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/NegSem_060203_records_and_sets_of_single_types_023.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/NegSyn_060203_records_and_sets_of_single_types_001.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/Sem_060203_records_and_sets_of_single_types_001.ttcn create mode 100644 ATS/core_language/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 create mode 100644 ATS/core_language/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 create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/Sem_060203_records_and_sets_of_single_types_004.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/Sem_060203_records_and_sets_of_single_types_005.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/Sem_060203_records_and_sets_of_single_types_006.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/Sem_060203_records_and_sets_of_single_types_007.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/Sem_060203_records_and_sets_of_single_types_008.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/Sem_060203_records_and_sets_of_single_types_009.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/Sem_060203_records_and_sets_of_single_types_010.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/Sem_060203_records_and_sets_of_single_types_011.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/Sem_060203_records_and_sets_of_single_types_012.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/Sem_060203_records_and_sets_of_single_types_013.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/Sem_060203_records_and_sets_of_single_types_014.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/Sem_060203_records_and_sets_of_single_types_015.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/Sem_060203_records_and_sets_of_single_types_016.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/Sem_060203_records_and_sets_of_single_types_017.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/Sem_060203_records_and_sets_of_single_types_019.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/Sem_060203_records_and_sets_of_single_types_020.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/Sem_060203_records_and_sets_of_single_types_021.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/Sem_060203_records_and_sets_of_single_types_022.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/Sem_060203_records_and_sets_of_single_types_023.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/Sem_060203_records_and_sets_of_single_types_024.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/Sem_060203_records_and_sets_of_single_types_025.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/Sem_060203_records_and_sets_of_single_types_026.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/Sem_060203_records_and_sets_of_single_types_027.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/Sem_060203_records_and_sets_of_single_types_028.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/Sem_060203_records_and_sets_of_single_types_029.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/Sem_060203_records_and_sets_of_single_types_030.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/Sem_060203_records_and_sets_of_single_types_031.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/Sem_060203_records_and_sets_of_single_types_032.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/Sem_060203_records_and_sets_of_single_types_033.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/Sem_060203_records_and_sets_of_single_types_034.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/Sem_060203_records_and_sets_of_single_types_035.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/Sem_060203_records_and_sets_of_single_types_036.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/Sem_060203_records_and_sets_of_single_types_037.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/Sem_060203_records_and_sets_of_single_types_038.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060204_enumerated_type_and_values/NegSem_060204_enumerated_type_and_values_001.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060204_enumerated_type_and_values/NegSem_060204_enumerated_type_and_values_002.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060204_enumerated_type_and_values/NegSem_060204_enumerated_type_and_values_003.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060204_enumerated_type_and_values/NegSem_060204_enumerated_type_and_values_004.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060204_enumerated_type_and_values/NegSem_060204_enumerated_type_and_values_005.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060204_enumerated_type_and_values/NegSem_060204_enumerated_type_and_values_006.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060204_enumerated_type_and_values/NegSem_060204_enumerated_type_and_values_007.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060204_enumerated_type_and_values/NegSem_060204_enumerated_type_and_values_008.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060204_enumerated_type_and_values/NegSem_060204_enumerated_type_and_values_009.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060204_enumerated_type_and_values/NegSem_060204_enumerated_type_and_values_010.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060204_enumerated_type_and_values/NegSem_060204_enumerated_type_and_values_011.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060204_enumerated_type_and_values/NegSem_060204_enumerated_type_and_values_013.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060204_enumerated_type_and_values/NegSyn_060204_enumerated_type_and_values_001.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060204_enumerated_type_and_values/NegSyn_060204_enumerated_type_and_values_002.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060204_enumerated_type_and_values/NegSyn_060204_enumerated_type_and_values_004.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060204_enumerated_type_and_values/Sem_060204_enumerated_type_and_values_001.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060204_enumerated_type_and_values/Sem_060204_enumerated_type_and_values_002.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060204_enumerated_type_and_values/Sem_060204_enumerated_type_and_values_003.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060204_enumerated_type_and_values/Sem_060204_enumerated_type_and_values_004.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060204_enumerated_type_and_values/Sem_060204_enumerated_type_and_values_005.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060204_enumerated_type_and_values/Sem_060204_enumerated_type_and_values_006.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060204_enumerated_type_and_values/Sem_060204_enumerated_type_and_values_007.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060204_enumerated_type_and_values/Syn_060204_enumerated_type_and_values_001.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060204_enumerated_type_and_values/Syn_060204_enumerated_type_and_values_002.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060205_unions/06020501_referencing_fields_of_union_type/NegSem_06020501_referencing_fields_of_union_type_001.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060205_unions/06020501_referencing_fields_of_union_type/NegSem_06020501_referencing_fields_of_union_type_002.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060205_unions/06020501_referencing_fields_of_union_type/NegSem_06020501_referencing_fields_of_union_type_003.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060205_unions/06020501_referencing_fields_of_union_type/NegSem_06020501_referencing_fields_of_union_type_004.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060205_unions/06020501_referencing_fields_of_union_type/NegSem_06020501_referencing_fields_of_union_type_005.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060205_unions/06020501_referencing_fields_of_union_type/NegSem_06020501_referencing_fields_of_union_type_006.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060205_unions/06020501_referencing_fields_of_union_type/NegSem_06020501_referencing_fields_of_union_type_007.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060205_unions/06020501_referencing_fields_of_union_type/NegSem_06020501_referencing_fields_of_union_type_008.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060205_unions/06020501_referencing_fields_of_union_type/Sem_06020501_referencing_fields_of_union_type_001.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060205_unions/06020501_referencing_fields_of_union_type/Sem_06020501_referencing_fields_of_union_type_002.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060205_unions/06020501_referencing_fields_of_union_type/Sem_06020501_referencing_fields_of_union_type_003.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060205_unions/06020501_referencing_fields_of_union_type/Sem_06020501_referencing_fields_of_union_type_004.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060205_unions/06020501_referencing_fields_of_union_type/Sem_06020501_referencing_fields_of_union_type_005.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060205_unions/06020501_referencing_fields_of_union_type/Sem_06020501_referencing_fields_of_union_type_006.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060205_unions/06020501_referencing_fields_of_union_type/Sem_06020501_referencing_fields_of_union_type_007.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060205_unions/06020501_referencing_fields_of_union_type/Sem_06020501_referencing_fields_of_union_type_008.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060205_unions/06020502_option_and_union/NegSyn_06020502_option_and_union_001.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060205_unions/06020503_nested_type_definition_for_field_types/Syn_06020503_nested_type_definition_for_field_types_001.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060205_unions/060205_toplevel/NegSem_060205_top_level_001.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060205_unions/060205_toplevel/NegSem_060205_top_level_002.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060205_unions/060205_toplevel/NegSem_060205_top_level_003.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060205_unions/060205_toplevel/NegSem_060205_top_level_004.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060205_unions/060205_toplevel/NegSem_060205_top_level_005.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060205_unions/060205_toplevel/NegSyn_060205_top_level_001.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060205_unions/060205_toplevel/Sem_060205_top_level_001.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060205_unions/060205_toplevel/Syn_060205_top_level_001.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060205_unions/060205_toplevel/Syn_060205_top_level_002.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060206_anytype/NegSem_060206_anytype_001.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060206_anytype/NegSem_060206_anytype_002.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060206_anytype/NegSyn_060206_anytype_001.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060206_anytype/NegSyn_060206_anytype_002.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060206_anytype/NegSyn_060206_anytype_003.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060206_anytype/Sem_060206_anytype_001.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060206_anytype/Sem_060206_anytype_002.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060206_anytype/Sem_060206_anytype_003.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060206_anytype/Sem_060206_anytype_004.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060206_anytype/Sem_060206_anytype_005.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060206_anytype/Sem_060206_anytype_006.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060206_anytype/Sem_060206_anytype_007.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060206_anytype/Sem_060206_anytype_008.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060206_anytype/Sem_060206_anytype_009.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060206_anytype/Sem_060206_anytype_010.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060206_anytype/Sem_060206_anytype_011.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060206_anytype/Sem_060206_anytype_012.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060206_anytype/Sem_060206_anytype_013.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060206_anytype/Sem_060206_anytype_014.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060206_anytype/Sem_060206_anytype_015.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060206_anytype/Sem_060206_anytype_016.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060206_anytype/Sem_060206_anytype_017.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060206_anytype/Sem_060206_anytype_018.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060206_anytype/Sem_060206_anytype_019.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/NegSem_060207_arrays_001.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/NegSem_060207_arrays_002.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/NegSem_060207_arrays_003.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/NegSem_060207_arrays_004.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/NegSem_060207_arrays_005.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/NegSem_060207_arrays_006.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/NegSem_060207_arrays_007.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/NegSem_060207_arrays_008.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/NegSem_060207_arrays_009.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/NegSem_060207_arrays_010.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/NegSem_060207_arrays_011.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/NegSem_060207_arrays_012.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/NegSem_060207_arrays_013.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/NegSem_060207_arrays_014.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/NegSem_060207_arrays_015.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/NegSem_060207_arrays_016.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/NegSem_060207_arrays_017.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/NegSem_060207_arrays_018.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/NegSem_060207_arrays_019.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/NegSem_060207_arrays_020.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/NegSem_060207_arrays_021.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/NegSem_060207_arrays_022.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/NegSem_060207_arrays_023.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/NegSem_060207_arrays_024.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/NegSem_060207_arrays_025.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/NegSem_060207_arrays_026.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/NegSem_060207_arrays_027.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/NegSem_060207_arrays_028.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/NegSyn_060207_arrays_001.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/NegSyn_060207_arrays_002.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/NegSyn_060207_arrays_003.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/NegSyn_060207_arrays_004.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/NegSyn_060207_arrays_005.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/Sem_060207_arrays_001.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/Sem_060207_arrays_002.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/Sem_060207_arrays_003.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/Sem_060207_arrays_004.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/Sem_060207_arrays_005.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/Sem_060207_arrays_006.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/Sem_060207_arrays_007.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/Sem_060207_arrays_008.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/Sem_060207_arrays_009.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/Sem_060207_arrays_010.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/Sem_060207_arrays_011.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/Sem_060207_arrays_012.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/Sem_060207_arrays_013.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/Sem_060207_arrays_014.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/Sem_060207_arrays_015.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/Sem_060207_arrays_016.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/Sem_060207_arrays_017.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/Sem_060207_arrays_018.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/Sem_060207_arrays_019.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/Sem_060207_arrays_020.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/Sem_060207_arrays_021.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/Sem_060207_arrays_022.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/Sem_060207_arrays_023.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/Syn_060207_arrays_001.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/Syn_060207_arrays_002.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/Syn_060207_arrays_003.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/Syn_060207_arrays_004.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/Syn_060207_arrays_005.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/Syn_060207_arrays_006.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/Syn_060207_arrays_007.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060208_default_type/NOTES create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060208_default_type/Sem_060208_default_type_001.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060208_default_type/Sem_060208_default_type_002.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060208_default_type/Sem_060208_default_type_003.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060209_comm_port_types/NOTES create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060209_comm_port_types/NegSem_060209_CommunicationPortTypes_001.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060209_comm_port_types/NegSem_060209_CommunicationPortTypes_002.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060209_comm_port_types/NegSem_060209_CommunicationPortTypes_003.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060209_comm_port_types/NegSem_060209_CommunicationPortTypes_004.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060209_comm_port_types/NegSem_060209_CommunicationPortTypes_005.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060209_comm_port_types/NegSem_060209_CommunicationPortTypes_006.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060209_comm_port_types/NegSem_060209_CommunicationPortTypes_007.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060209_comm_port_types/NegSem_060209_CommunicationPortTypes_008.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060209_comm_port_types/Sem_060209_CommunicationPortTypes_004.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060209_comm_port_types/Sem_060209_CommunicationPortTypes_005.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060209_comm_port_types/Syn_060209_CommunicationPortTypes_001.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060209_comm_port_types/Syn_060209_CommunicationPortTypes_002.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060209_comm_port_types/Syn_060209_CommunicationPortTypes_003.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060209_comm_port_types/Syn_060209_CommunicationPortTypes_004.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060209_comm_port_types/Syn_060209_CommunicationPortTypes_005.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060209_comm_port_types/Syn_060209_CommunicationPortTypes_006.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060209_comm_port_types/Syn_060209_CommunicationPortTypes_007.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060209_comm_port_types/Syn_060209_CommunicationPortTypes_008.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060209_comm_port_types/Syn_060209_CommunicationPortTypes_009.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060209_comm_port_types/Syn_060209_CommunicationPortTypes_010.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060210_component_types/06021002_reuse_component_type/NegSyn_060210_ReuseofComponentTypes_001.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060210_component_types/06021002_reuse_component_type/NegSyn_060210_ReuseofComponentTypes_002.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060210_component_types/06021002_reuse_component_type/NegSyn_060210_ReuseofComponentTypes_003.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060210_component_types/06021002_reuse_component_type/Sem_060210_ReuseofComponentTypes_001.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060210_component_types/06021002_reuse_component_type/Sem_060210_ReuseofComponentTypes_002.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060210_component_types/06021002_reuse_component_type/Sem_060210_ReuseofComponentTypes_003.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060212_addressing_entities_inside_sut/NegSem_060212_AddressingEntitiesInsideSut_001.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060212_addressing_entities_inside_sut/NegSem_060212_AddressingEntitiesInsideSut_002.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060212_addressing_entities_inside_sut/NegSem_060212_AddressingEntitiesInsideSut_003.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060212_addressing_entities_inside_sut/NegSem_060212_AddressingEntitiesInsideSut_004.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060212_addressing_entities_inside_sut/Sem_060212_AddressingEntitiesInsideSut_001.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060212_addressing_entities_inside_sut/Sem_060212_AddressingEntitiesInsideSut_002.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060213_subtyping_of_structured_types/06021301_length_subtyping/NegSem_06021301_LengthSubtyping_001.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060213_subtyping_of_structured_types/06021301_length_subtyping/NegSem_06021301_LengthSubtyping_002.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060213_subtyping_of_structured_types/06021301_length_subtyping/NegSem_06021301_LengthSubtyping_003.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060213_subtyping_of_structured_types/06021301_length_subtyping/NegSem_06021301_LengthSubtyping_004.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060213_subtyping_of_structured_types/06021301_length_subtyping/NegSem_06021301_LengthSubtyping_005.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060213_subtyping_of_structured_types/06021301_length_subtyping/NegSem_06021301_LengthSubtyping_006.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060213_subtyping_of_structured_types/06021301_length_subtyping/Syn_06021301_LengthSubtyping_001.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060213_subtyping_of_structured_types/06021301_length_subtyping/Syn_06021301_LengthSubtyping_002.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060213_subtyping_of_structured_types/06021302_list_subtyping/NegSem_06021302_ListSubtyping_001.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060213_subtyping_of_structured_types/06021302_list_subtyping/NegSem_06021302_ListSubtyping_002.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060213_subtyping_of_structured_types/06021302_list_subtyping/Sem_06021302_ListSubtyping_001.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060213_subtyping_of_structured_types/06021302_list_subtyping/Sem_06021302_ListSubtyping_002.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/060213_subtyping_of_structured_types/06021302_list_subtyping/Sem_06021302_ListSubtyping_003.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/0602_toplevel/NegSem_0602_TopLevel_001.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/0602_toplevel/NegSem_0602_TopLevel_002.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/0602_toplevel/NegSem_0602_TopLevel_003.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/0602_toplevel/NegSem_0602_TopLevel_004.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/0602_toplevel/NegSyn_0602_TopLevel_001.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/0602_toplevel/NegSyn_0602_TopLevel_002.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/0602_toplevel/NegSyn_0602_TopLevel_003.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/0602_toplevel/NegSyn_0602_TopLevel_004.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/0602_toplevel/NegSyn_0602_TopLevel_005.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/0602_toplevel/NegSyn_0602_TopLevel_006.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/0602_toplevel/NegSyn_0602_TopLevel_007.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/0602_toplevel/Sem_0602_TopLevel_001.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/0602_toplevel/Sem_0602_TopLevel_002.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/0602_toplevel/Sem_0602_TopLevel_003.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/0602_toplevel/Sem_0602_TopLevel_004.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/0602_toplevel/Sem_0602_TopLevel_005.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/0602_toplevel/Sem_0602_TopLevel_006.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/0602_toplevel/Sem_0602_TopLevel_007.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/0602_toplevel/Sem_0602_TopLevel_008.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/0602_toplevel/Sem_0602_TopLevel_009.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/0602_toplevel/Sem_0602_TopLevel_010.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/0602_toplevel/Sem_0602_TopLevel_011.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/0602_toplevel/Sem_0602_TopLevel_012.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/0602_toplevel/Sem_0602_TopLevel_013.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/0602_toplevel/Sem_0602_TopLevel_014.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/0602_toplevel/Syn_0602_TopLevel_001.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/0602_toplevel/Syn_0602_TopLevel_002.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/0602_toplevel/Syn_0602_TopLevel_003.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/0602_toplevel/Syn_0602_TopLevel_004.ttcn create mode 100644 ATS/core_language/06_types_and_values/0602_structured_types_and_values/0602_toplevel/Syn_0602_TopLevel_005.ttcn create mode 100644 ATS/core_language/06_types_and_values/0603_type_compatibility/060301_non-structured_types/NegSem_060301_non_structured_types_001.ttcn create mode 100644 ATS/core_language/06_types_and_values/0603_type_compatibility/060301_non-structured_types/NegSem_060301_non_structured_types_002.ttcn create mode 100644 ATS/core_language/06_types_and_values/0603_type_compatibility/060301_non-structured_types/NegSem_060301_non_structured_types_003.ttcn create mode 100644 ATS/core_language/06_types_and_values/0603_type_compatibility/060301_non-structured_types/NegSem_060301_non_structured_types_004.ttcn create mode 100644 ATS/core_language/06_types_and_values/0603_type_compatibility/060301_non-structured_types/NegSem_060301_non_structured_types_005.ttcn create mode 100644 ATS/core_language/06_types_and_values/0603_type_compatibility/060301_non-structured_types/NegSem_060301_non_structured_types_006.ttcn create mode 100644 ATS/core_language/06_types_and_values/0603_type_compatibility/060301_non-structured_types/NegSem_060301_non_structured_types_007.ttcn create mode 100644 ATS/core_language/06_types_and_values/0603_type_compatibility/060301_non-structured_types/NegSem_060301_non_structured_types_008.ttcn create mode 100644 ATS/core_language/06_types_and_values/0603_type_compatibility/060301_non-structured_types/NegSem_060301_non_structured_types_009.ttcn create mode 100644 ATS/core_language/06_types_and_values/0603_type_compatibility/060301_non-structured_types/NegSem_060301_non_structured_types_010.ttcn create mode 100644 ATS/core_language/06_types_and_values/0603_type_compatibility/060301_non-structured_types/NegSem_060301_non_structured_types_011.ttcn create mode 100644 ATS/core_language/06_types_and_values/0603_type_compatibility/060301_non-structured_types/NegSem_060301_non_structured_types_012.ttcn create mode 100644 ATS/core_language/06_types_and_values/0603_type_compatibility/060301_non-structured_types/Sem_060301_non_structured_types_001.ttcn create mode 100644 ATS/core_language/06_types_and_values/0603_type_compatibility/060301_non-structured_types/Sem_060301_non_structured_types_002.ttcn create mode 100644 ATS/core_language/06_types_and_values/0603_type_compatibility/060301_non-structured_types/Sem_060301_non_structured_types_003.ttcn create mode 100644 ATS/core_language/06_types_and_values/0603_type_compatibility/060301_non-structured_types/Sem_060301_non_structured_types_004.ttcn create mode 100644 ATS/core_language/06_types_and_values/0603_type_compatibility/060302_structured_types/NegSem_060302_structured_types_001.ttcn create mode 100644 ATS/core_language/06_types_and_values/0603_type_compatibility/060302_structured_types/NegSem_060302_structured_types_002.ttcn create mode 100644 ATS/core_language/06_types_and_values/0603_type_compatibility/060302_structured_types/NegSem_060302_structured_types_003.ttcn create mode 100644 ATS/core_language/06_types_and_values/0603_type_compatibility/060302_structured_types/NegSem_060302_structured_types_004.ttcn create mode 100644 ATS/core_language/06_types_and_values/0603_type_compatibility/060302_structured_types/NegSem_060302_structured_types_005.ttcn create mode 100644 ATS/core_language/06_types_and_values/0603_type_compatibility/060302_structured_types/NegSem_060302_structured_types_006.ttcn create mode 100644 ATS/core_language/06_types_and_values/0603_type_compatibility/060302_structured_types/NegSem_060302_structured_types_007.ttcn create mode 100644 ATS/core_language/06_types_and_values/0603_type_compatibility/060302_structured_types/NegSem_060302_structured_types_008.ttcn create mode 100644 ATS/core_language/06_types_and_values/0603_type_compatibility/060302_structured_types/NegSem_060302_structured_types_009.ttcn create mode 100644 ATS/core_language/06_types_and_values/0603_type_compatibility/060302_structured_types/NegSem_060302_structured_types_010.ttcn create mode 100644 ATS/core_language/06_types_and_values/0603_type_compatibility/060302_structured_types/NegSem_060302_structured_types_011.ttcn create mode 100644 ATS/core_language/06_types_and_values/0603_type_compatibility/060302_structured_types/NegSem_060302_structured_types_012.ttcn create mode 100644 ATS/core_language/06_types_and_values/0603_type_compatibility/060302_structured_types/NegSem_060302_structured_types_013.ttcn create mode 100644 ATS/core_language/06_types_and_values/0603_type_compatibility/060302_structured_types/NegSem_060302_structured_types_014.ttcn create mode 100644 ATS/core_language/06_types_and_values/0603_type_compatibility/060302_structured_types/NegSem_060302_structured_types_015.ttcn create mode 100644 ATS/core_language/06_types_and_values/0603_type_compatibility/060302_structured_types/NegSem_060302_structured_types_016.ttcn create mode 100644 ATS/core_language/06_types_and_values/0603_type_compatibility/060302_structured_types/NegSem_060302_structured_types_017.ttcn create mode 100644 ATS/core_language/06_types_and_values/0603_type_compatibility/060302_structured_types/NegSem_060302_structured_types_018.ttcn create mode 100644 ATS/core_language/06_types_and_values/0603_type_compatibility/060302_structured_types/NegSem_060302_structured_types_019.ttcn create mode 100644 ATS/core_language/06_types_and_values/0603_type_compatibility/060302_structured_types/Sem_060302_structured_types_001.ttcn create mode 100644 ATS/core_language/06_types_and_values/0603_type_compatibility/060302_structured_types/Sem_060302_structured_types_002.ttcn create mode 100644 ATS/core_language/06_types_and_values/0603_type_compatibility/060302_structured_types/Sem_060302_structured_types_003.ttcn create mode 100644 ATS/core_language/06_types_and_values/0603_type_compatibility/060302_structured_types/Sem_060302_structured_types_004.ttcn create mode 100644 ATS/core_language/06_types_and_values/0603_type_compatibility/060302_structured_types/Sem_060302_structured_types_005.ttcn create mode 100644 ATS/core_language/06_types_and_values/0603_type_compatibility/060302_structured_types/Sem_060302_structured_types_006.ttcn create mode 100644 ATS/core_language/06_types_and_values/0603_type_compatibility/060303_component_types/NegSem_060303_component_types_001.ttcn create mode 100644 ATS/core_language/06_types_and_values/0603_type_compatibility/060303_component_types/NegSem_060303_component_types_002.ttcn create mode 100644 ATS/core_language/06_types_and_values/0603_type_compatibility/060303_component_types/Sem_060303_component_types_001.ttcn create mode 100644 ATS/core_language/06_types_and_values/0603_type_compatibility/060303_component_types/Sem_060303_component_types_002.ttcn create mode 100644 ATS/core_language/06_types_and_values/0603_type_compatibility/060304_compatibility_of_communication_operations/NegSem_060304_compatibility_of_communication_operations_001.ttcn create mode 100644 ATS/core_language/06_types_and_values/0603_type_compatibility/060304_compatibility_of_communication_operations/NegSem_060304_compatibility_of_communication_operations_002.ttcn create mode 100644 ATS/core_language/06_types_and_values/0603_type_compatibility/060304_compatibility_of_communication_operations/NegSem_060304_compatibility_of_communication_operations_003.ttcn create mode 100644 ATS/core_language/06_types_and_values/0603_type_compatibility/060304_compatibility_of_communication_operations/NegSem_060304_compatibility_of_communication_operations_004.ttcn create mode 100644 ATS/core_language/06_types_and_values/0603_type_compatibility/060304_compatibility_of_communication_operations/NegSem_060304_compatibility_of_communication_operations_005.ttcn create mode 100644 ATS/core_language/06_types_and_values/0603_type_compatibility/060305_compatibility_of_anytype_types/NegSem_060305_compatibility_of_anytype_types_001.ttcn create mode 100644 ATS/core_language/06_types_and_values/0603_type_compatibility/060305_compatibility_of_anytype_types/Sem_060305_compatibility_of_anytype_types_001.ttcn create mode 100644 ATS/core_language/06_types_and_values/0603_type_compatibility/060305_compatibility_of_anytype_types/Sem_060305_compatibility_of_anytype_types_002.ttcn create mode 100644 ATS/core_language/06_types_and_values/0604_type_synonym/NOTES create mode 100644 ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/NOTES create mode 100644 ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/NegSem_070101_ArithmeticOperators_001.ttcn create mode 100644 ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/NegSem_070101_ArithmeticOperators_002.ttcn create mode 100644 ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/NegSem_070101_ArithmeticOperators_003.ttcn create mode 100644 ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/NegSem_070101_ArithmeticOperators_004.ttcn create mode 100644 ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/NegSem_070101_ArithmeticOperators_008.ttcn create mode 100644 ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/NegSem_070101_ArithmeticOperators_009.ttcn create mode 100644 ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/NegSem_070101_ArithmeticOperators_010.ttcn create mode 100644 ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_001.ttcn create mode 100644 ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_002.ttcn create mode 100644 ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_003.ttcn create mode 100644 ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_004.ttcn create mode 100644 ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_005.ttcn create mode 100644 ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_006.ttcn create mode 100644 ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_007.ttcn create mode 100644 ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_008.ttcn create mode 100644 ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_009.ttcn create mode 100644 ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_010.ttcn create mode 100644 ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_011.ttcn create mode 100644 ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_012.ttcn create mode 100644 ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_013.ttcn create mode 100644 ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_014.ttcn create mode 100644 ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_015.ttcn create mode 100644 ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_016.ttcn create mode 100644 ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_017.ttcn create mode 100644 ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_018.ttcn create mode 100644 ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_019.ttcn create mode 100644 ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_020.ttcn create mode 100644 ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_021.ttcn create mode 100644 ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_022.ttcn create mode 100644 ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_023.ttcn create mode 100644 ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_024.ttcn create mode 100644 ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_025.ttcn create mode 100644 ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_026.ttcn create mode 100644 ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_027.ttcn create mode 100644 ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_028.ttcn create mode 100644 ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_029.ttcn create mode 100644 ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_030.ttcn create mode 100644 ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_031.ttcn create mode 100644 ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_032.ttcn create mode 100644 ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_033.ttcn create mode 100644 ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_034.ttcn create mode 100644 ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_035.ttcn create mode 100644 ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_036.ttcn create mode 100644 ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_037.ttcn create mode 100644 ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_038.ttcn create mode 100644 ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_039.ttcn create mode 100644 ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_040.ttcn create mode 100644 ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_041.ttcn create mode 100644 ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_042.ttcn create mode 100644 ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_043.ttcn create mode 100644 ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_044.ttcn create mode 100644 ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_045.ttcn create mode 100644 ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_046.ttcn create mode 100644 ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_047.ttcn create mode 100644 ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_048.ttcn create mode 100644 ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_049.ttcn create mode 100644 ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_050.ttcn create mode 100644 ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_051.ttcn create mode 100644 ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_052.ttcn create mode 100644 ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_053.ttcn create mode 100644 ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Syn_070101_ArithmeticOperators_001.ttcn create mode 100644 ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Syn_070101_ArithmeticOperators_002.ttcn create mode 100644 ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Syn_070101_ArithmeticOperators_003.ttcn create mode 100644 ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Syn_070101_ArithmeticOperators_004.ttcn create mode 100644 ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Syn_070101_ArithmeticOperators_005.ttcn create mode 100644 ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Syn_070101_ArithmeticOperators_006.ttcn create mode 100644 ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Syn_070101_ArithmeticOperators_007.ttcn create mode 100644 ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Syn_070101_ArithmeticOperators_008.ttcn create mode 100644 ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Syn_070101_ArithmeticOperators_009.ttcn create mode 100644 ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Syn_070101_ArithmeticOperators_010.ttcn create mode 100644 ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Syn_070101_ArithmeticOperators_011.ttcn create mode 100644 ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Syn_070101_ArithmeticOperators_012.ttcn create mode 100644 ATS/core_language/07_expressions/0701_operators/070102_list_operator/Sem_070102_ListOperator_001.ttcn create mode 100644 ATS/core_language/07_expressions/0701_operators/070102_list_operator/Sem_070102_ListOperator_002.ttcn create mode 100644 ATS/core_language/07_expressions/0701_operators/070102_list_operator/Sem_070102_ListOperator_003.ttcn create mode 100644 ATS/core_language/07_expressions/0701_operators/070102_list_operator/Sem_070102_ListOperator_004.ttcn create mode 100644 ATS/core_language/07_expressions/0701_operators/070102_list_operator/Sem_070102_ListOperator_005.ttcn create mode 100644 ATS/core_language/07_expressions/0701_operators/070102_list_operator/Sem_070102_ListOperator_006.ttcn create mode 100644 ATS/core_language/07_expressions/0701_operators/070103_relational_operators/NOTES create mode 100644 ATS/core_language/07_expressions/0701_operators/070103_relational_operators/NegSem_070103_RelationalOperators_001.ttcn create mode 100644 ATS/core_language/07_expressions/0701_operators/070103_relational_operators/NegSem_070103_RelationalOperators_002.ttcn create mode 100644 ATS/core_language/07_expressions/0701_operators/070103_relational_operators/NegSem_070103_RelationalOperators_003.ttcn create mode 100644 ATS/core_language/07_expressions/0701_operators/070103_relational_operators/NegSem_070103_RelationalOperators_004.ttcn create mode 100644 ATS/core_language/07_expressions/0701_operators/070103_relational_operators/NegSem_070103_RelationalOperators_005.ttcn create mode 100644 ATS/core_language/07_expressions/0701_operators/070103_relational_operators/NegSem_070103_RelationalOperators_006.ttcn create mode 100644 ATS/core_language/07_expressions/0701_operators/070103_relational_operators/NegSem_070103_RelationalOperators_007.ttcn create mode 100644 ATS/core_language/07_expressions/0701_operators/070103_relational_operators/NegSem_070103_RelationalOperators_008.ttcn create mode 100644 ATS/core_language/07_expressions/0701_operators/070103_relational_operators/NegSyn_070103_RelationalOperators_001.ttcn create mode 100644 ATS/core_language/07_expressions/0701_operators/070103_relational_operators/NegSyn_070103_RelationalOperators_002.ttcn create mode 100644 ATS/core_language/07_expressions/0701_operators/070103_relational_operators/NegSyn_070103_RelationalOperators_003.ttcn create mode 100644 ATS/core_language/07_expressions/0701_operators/070103_relational_operators/NegSyn_070103_RelationalOperators_004.ttcn create mode 100644 ATS/core_language/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_001.ttcn create mode 100644 ATS/core_language/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_002.ttcn create mode 100644 ATS/core_language/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_003.ttcn create mode 100644 ATS/core_language/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_004.ttcn create mode 100644 ATS/core_language/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_005.ttcn create mode 100644 ATS/core_language/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_006.ttcn create mode 100644 ATS/core_language/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_007.ttcn create mode 100644 ATS/core_language/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_008.ttcn create mode 100644 ATS/core_language/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_009.ttcn create mode 100644 ATS/core_language/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_010.ttcn create mode 100644 ATS/core_language/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_011.ttcn create mode 100644 ATS/core_language/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_012.ttcn create mode 100644 ATS/core_language/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_013.ttcn create mode 100644 ATS/core_language/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_014.ttcn create mode 100644 ATS/core_language/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_015.ttcn create mode 100644 ATS/core_language/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_016.ttcn create mode 100644 ATS/core_language/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_017.ttcn create mode 100644 ATS/core_language/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_018.ttcn create mode 100644 ATS/core_language/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_019.ttcn create mode 100644 ATS/core_language/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_020.ttcn create mode 100644 ATS/core_language/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_021.ttcn create mode 100644 ATS/core_language/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_022.ttcn create mode 100644 ATS/core_language/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_023.ttcn create mode 100644 ATS/core_language/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_024.ttcn create mode 100644 ATS/core_language/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_025.ttcn create mode 100644 ATS/core_language/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_026.ttcn create mode 100644 ATS/core_language/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_030.ttcn create mode 100644 ATS/core_language/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_031.ttcn create mode 100644 ATS/core_language/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_032.ttcn create mode 100644 ATS/core_language/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_033.ttcn create mode 100644 ATS/core_language/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_034.ttcn create mode 100644 ATS/core_language/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_035.ttcn create mode 100644 ATS/core_language/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_036.ttcn create mode 100644 ATS/core_language/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_037.ttcn create mode 100644 ATS/core_language/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_038.ttcn create mode 100644 ATS/core_language/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_039.ttcn create mode 100644 ATS/core_language/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_040.ttcn create mode 100644 ATS/core_language/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_041.ttcn create mode 100644 ATS/core_language/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_042.ttcn create mode 100644 ATS/core_language/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_043.ttcn create mode 100644 ATS/core_language/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_044.ttcn create mode 100644 ATS/core_language/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_045.ttcn create mode 100644 ATS/core_language/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_046.ttcn create mode 100644 ATS/core_language/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_047.ttcn create mode 100644 ATS/core_language/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_048.ttcn create mode 100644 ATS/core_language/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_049.ttcn create mode 100644 ATS/core_language/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_050.ttcn create mode 100644 ATS/core_language/07_expressions/0701_operators/070104_logical_operators/Sem_070104_LogicalOperators_001.ttcn create mode 100644 ATS/core_language/07_expressions/0701_operators/070104_logical_operators/Sem_070104_LogicalOperators_002.ttcn create mode 100644 ATS/core_language/07_expressions/0701_operators/070105_bitwise_operators/Sem_070105_BitwiseOperators_001.ttcn create mode 100644 ATS/core_language/07_expressions/0701_operators/070105_bitwise_operators/Sem_070105_BitwiseOperators_002.ttcn create mode 100644 ATS/core_language/07_expressions/0701_operators/070106_shift_operators/Sem_070106_ShiftOperators_001.ttcn create mode 100644 ATS/core_language/07_expressions/0701_operators/070106_shift_operators/Sem_070106_ShiftOperators_002.ttcn create mode 100644 ATS/core_language/07_expressions/0701_operators/070106_shift_operators/Sem_070106_ShiftOperators_003.ttcn create mode 100644 ATS/core_language/07_expressions/0701_operators/070106_shift_operators/Sem_070106_ShiftOperators_004.ttcn create mode 100644 ATS/core_language/07_expressions/0701_operators/070107_rotate_operators/Sem_070107_RotateOperators_001.ttcn create mode 100644 ATS/core_language/07_expressions/0701_operators/070107_rotate_operators/Sem_070107_RotateOperators_002.ttcn create mode 100644 ATS/core_language/07_expressions/0701_operators/070107_rotate_operators/Sem_070107_RotateOperators_003.ttcn create mode 100644 ATS/core_language/07_expressions/0701_operators/070107_rotate_operators/Sem_070107_RotateOperators_004.ttcn create mode 100644 ATS/core_language/07_expressions/0702_field_references_and_list_elements/Sem_0702_FieldReferencesAndListElements_001.ttcn create mode 100644 ATS/core_language/07_expressions/0702_field_references_and_list_elements/Sem_0702_FieldReferencesAndListElements_002.ttcn create mode 100644 ATS/core_language/07_expressions/07_toplevel/NegSem_07_toplevel_001.ttcn create mode 100644 ATS/core_language/07_expressions/07_toplevel/NegSem_07_toplevel_002.ttcn create mode 100644 ATS/core_language/07_expressions/07_toplevel/NegSem_07_toplevel_003.ttcn create mode 100644 ATS/core_language/07_expressions/07_toplevel/NegSem_07_toplevel_004.ttcn create mode 100644 ATS/core_language/07_expressions/07_toplevel/NegSem_07_toplevel_005.ttcn create mode 100644 ATS/core_language/07_expressions/07_toplevel/Sem_07_toplevel_001.ttcn create mode 100644 ATS/core_language/07_expressions/07_toplevel/Sem_07_toplevel_002.ttcn create mode 100644 ATS/core_language/07_expressions/07_toplevel/Sem_07_toplevel_003.ttcn create mode 100644 ATS/core_language/07_expressions/07_toplevel/Sem_07_toplevel_004.ttcn create mode 100644 ATS/core_language/07_expressions/07_toplevel/Sem_07_toplevel_005.ttcn create mode 100644 ATS/core_language/07_expressions/07_toplevel/Sem_07_toplevel_006.ttcn create mode 100644 ATS/core_language/07_expressions/07_toplevel/Sem_07_toplevel_007.ttcn create mode 100644 ATS/core_language/07_expressions/07_toplevel/Sem_07_toplevel_008.ttcn create mode 100644 ATS/core_language/07_expressions/07_toplevel/Sem_07_toplevel_009.ttcn create mode 100644 ATS/core_language/07_expressions/NOTES create mode 100644 ATS/core_language/08_modules/0801_definition_of_a_module/NegSyn_0801_DefinitionOfAModule_001.ttcn create mode 100644 ATS/core_language/08_modules/0801_definition_of_a_module/Syn_0801_DefinitionOfAModule_001.ttcn create mode 100644 ATS/core_language/08_modules/0801_definition_of_a_module/Syn_0801_DefinitionOfAModule_002.ttcn create mode 100644 ATS/core_language/08_modules/0801_definition_of_a_module/Syn_0801_DefinitionOfAModule_003.ttcn create mode 100644 ATS/core_language/08_modules/0801_definition_of_a_module/Syn_0801_DefinitionOfAModule_004.ttcn create mode 100644 ATS/core_language/08_modules/0801_definition_of_a_module/Syn_0801_DefinitionOfAModule_005.ttcn create mode 100644 ATS/core_language/08_modules/0801_definition_of_a_module/Syn_0801_DefinitionOfAModule_006.ttcn create mode 100644 ATS/core_language/08_modules/0801_definition_of_a_module/Syn_0801_DefinitionOfAModule_007.ttcn create mode 100644 ATS/core_language/08_modules/0801_definition_of_a_module/Syn_0801_DefinitionOfAModule_008.ttcn create mode 100644 ATS/core_language/08_modules/0801_definition_of_a_module/Syn_0801_DefinitionOfAModule_009.ttcn create mode 100644 ATS/core_language/08_modules/0801_definition_of_a_module/Syn_0801_DefinitionOfAModule_010.ttcn create mode 100644 ATS/core_language/08_modules/0802_module_definitions_part/080201_module_parameters/NegSem_080201_ModuleParameters_001.ttcn create mode 100644 ATS/core_language/08_modules/0802_module_definitions_part/080201_module_parameters/NegSem_080201_ModuleParameters_002.ttcn create mode 100644 ATS/core_language/08_modules/0802_module_definitions_part/080201_module_parameters/NegSem_080201_ModuleParameters_003.ttcn create mode 100644 ATS/core_language/08_modules/0802_module_definitions_part/080201_module_parameters/NegSem_080201_ModuleParameters_004.ttcn create mode 100644 ATS/core_language/08_modules/0802_module_definitions_part/080201_module_parameters/NegSem_080201_ModuleParameters_005.ttcn create mode 100644 ATS/core_language/08_modules/0802_module_definitions_part/080201_module_parameters/NegSem_080201_ModuleParameters_006.ttcn create mode 100644 ATS/core_language/08_modules/0802_module_definitions_part/080201_module_parameters/NegSyn_080201_ModuleParameters_001.ttcn create mode 100644 ATS/core_language/08_modules/0802_module_definitions_part/080201_module_parameters/NegSyn_080201_ModuleParameters_002.ttcn create mode 100644 ATS/core_language/08_modules/0802_module_definitions_part/080201_module_parameters/Sem_080201_ModuleParameters_001.ttcn create mode 100644 ATS/core_language/08_modules/0802_module_definitions_part/080201_module_parameters/Sem_080201_ModuleParameters_002.ttcn create mode 100644 ATS/core_language/08_modules/0802_module_definitions_part/080201_module_parameters/Sem_080201_ModuleParameters_003.ttcn create mode 100644 ATS/core_language/08_modules/0802_module_definitions_part/080201_module_parameters/Syn_080201_ModuleParameters_001.ttcn create mode 100644 ATS/core_language/08_modules/0802_module_definitions_part/080201_module_parameters/Syn_080201_ModuleParameters_002.ttcn create mode 100644 ATS/core_language/08_modules/0802_module_definitions_part/080201_module_parameters/Syn_080201_ModuleParameters_003.ttcn create mode 100644 ATS/core_language/08_modules/0802_module_definitions_part/080202_groups_of_definitions/Syn_080202_GroupOfDefinitions_001.ttcn create mode 100644 ATS/core_language/08_modules/0802_module_definitions_part/080202_groups_of_definitions/Syn_080202_GroupOfDefinitions_002.ttcn create mode 100644 ATS/core_language/08_modules/0802_module_definitions_part/080202_groups_of_definitions/Syn_080202_GroupOfDefinitions_003.ttcn create mode 100644 ATS/core_language/08_modules/0802_module_definitions_part/080202_groups_of_definitions/Syn_080202_GroupOfDefinitions_004.ttcn create mode 100644 ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/NegSem_08020301_GeneralFormatOfImport_001.ttcn create mode 100644 ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/NegSem_08020301_GeneralFormatOfImport_002.ttcn create mode 100644 ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/NegSem_08020301_GeneralFormatOfImport_003.ttcn create mode 100644 ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/NegSem_08020301_GeneralFormatOfImport_004.ttcn create mode 100644 ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/NegSem_08020301_GeneralFormatOfImport_005.ttcn create mode 100644 ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/NegSem_08020301_GeneralFormatOfImport_006.ttcn create mode 100644 ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/NegSem_08020301_GeneralFormatOfImport_007.ttcn create mode 100644 ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/NegSem_08020301_GeneralFormatOfImport_008.ttcn create mode 100644 ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/NegSem_08020301_GeneralFormatOfImport_009.ttcn create mode 100644 ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/NegSem_08020301_GeneralFormatOfImport_010.ttcn create mode 100644 ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/NegSem_08020301_GeneralFormatOfImport_011.ttcn create mode 100644 ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/NegSem_08020301_GeneralFormatOfImport_012.ttcn create mode 100644 ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/NegSem_08020301_GeneralFormatOfImport_013.ttcn create mode 100644 ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/NegSem_08020301_GeneralFormatOfImport_014.ttcn create mode 100644 ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/NegSem_08020301_GeneralFormatOfImport_015.ttcn create mode 100644 ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/NegSem_08020301_GeneralFormatOfImport_016.ttcn create mode 100644 ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/NegSem_08020301_GeneralFormatOfImport_017.ttcn create mode 100644 ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/NegSem_08020301_GeneralFormatOfImport_018.ttcn create mode 100644 ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/NegSem_08020301_GeneralFormatOfImport_019.ttcn create mode 100644 ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/NegSem_08020301_GeneralFormatOfImport_020.ttcn create mode 100644 ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/NegSem_08020301_GeneralFormatOfImport_021.ttcn create mode 100644 ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/NegSem_08020301_GeneralFormatOfImport_022.ttcn create mode 100644 ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/NegSem_08020301_GeneralFormatOfImport_023.ttcn create mode 100644 ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/NegSem_08020301_GeneralFormatOfImport_024.ttcn create mode 100644 ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/NegSem_08020301_GeneralFormatOfImport_025.ttcn create mode 100644 ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/NegSem_08020301_GeneralFormatOfImport_026.ttcn create mode 100644 ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/NegSem_08020301_GeneralFormatOfImport_027.ttcn create mode 100644 ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/NegSem_08020301_GeneralFormatOfImport_028.ttcn create mode 100644 ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/NegSem_08020301_GeneralFormatOfImport_029.ttcn create mode 100644 ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/NegSem_08020301_GeneralFormatOfImport_030.ttcn create mode 100644 ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/NegSem_08020301_GeneralFormatOfImport_031.ttcn create mode 100644 ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/NegSem_08020301_GeneralFormatOfImport_032.ttcn create mode 100644 ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/NegSem_08020301_GeneralFormatOfImport_033.ttcn create mode 100644 ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/NegSem_08020301_GeneralFormatOfImport_034.ttcn create mode 100644 ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/NegSem_08020301_GeneralFormatOfImport_035.ttcn create mode 100644 ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/NegSem_08020301_GeneralFormatOfImport_036.ttcn create mode 100644 ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/NegSem_08020301_GeneralFormatOfImport_037.ttcn create mode 100644 ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/NegSem_08020301_GeneralFormatOfImport_038.ttcn create mode 100644 ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/NegSem_08020301_GeneralFormatOfImport_039.ttcn create mode 100644 ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/NegSem_08020301_GeneralFormatOfImport_040.ttcn create mode 100644 ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/NegSyn_08020301_GeneralFormatOfImport_001.ttcn create mode 100644 ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/NegSyn_08020301_GeneralFormatOfImport_002.ttcn create mode 100644 ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/Sem_08020301_GeneralFormatOfImport_001.ttcn create mode 100644 ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/Sem_08020301_GeneralFormatOfImport_002.ttcn create mode 100644 ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/Sem_08020301_GeneralFormatOfImport_003.ttcn create mode 100644 ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/Sem_08020301_GeneralFormatOfImport_004.ttcn create mode 100644 ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/Sem_08020301_GeneralFormatOfImport_005.ttcn create mode 100644 ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/Sem_08020301_GeneralFormatOfImport_006.ttcn create mode 100644 ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/Sem_08020301_GeneralFormatOfImport_007.ttcn create mode 100644 ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/Sem_08020301_GeneralFormatOfImport_008.ttcn create mode 100644 ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/Sem_08020301_GeneralFormatOfImport_009.ttcn create mode 100644 ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/Sem_08020301_GeneralFormatOfImport_010.ttcn create mode 100644 ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/Sem_08020301_GeneralFormatOfImport_011.ttcn create mode 100644 ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/Sem_08020301_GeneralFormatOfImport_012.ttcn create mode 100644 ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/Sem_08020301_GeneralFormatOfImport_013.ttcn create mode 100644 ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/Sem_08020301_GeneralFormatOfImport_014.ttcn create mode 100644 ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/Sem_08020301_GeneralFormatOfImport_015.ttcn create mode 100644 ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/Sem_08020301_GeneralFormatOfImport_016.ttcn create mode 100644 ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/Sem_08020301_GeneralFormatOfImport_017.ttcn create mode 100644 ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/Sem_08020301_GeneralFormatOfImport_018.ttcn create mode 100644 ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/Sem_08020301_GeneralFormatOfImport_019.ttcn create mode 100644 ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/Sem_08020301_GeneralFormatOfImport_020.ttcn create mode 100644 ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/Syn_08020301_GeneralFormatOfImport_001.ttcn create mode 100644 ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/Syn_08020301_GeneralFormatOfImport_002.ttcn create mode 100644 ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020302_importing_single_definitions/Sem_08020302_ImportingSingleDefinitions_001.ttcn create mode 100644 ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020302_importing_single_definitions/Sem_08020302_ImportingSingleDefinitions_002.ttcn create mode 100644 ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020303_importing_groups/NegSem_08020303_ImportingGroups_001.ttcn create mode 100644 ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020303_importing_groups/Sem_08020303_ImportingGroups_001.ttcn create mode 100644 ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020303_importing_groups/Sem_08020303_ImportingGroups_002.ttcn create mode 100644 ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020303_importing_groups/Sem_08020303_ImportingGroups_003.ttcn create mode 100644 ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020304_importing_definitions_of_the_same_kind/Sem_08020304_ImportingDefinitionsOfTheSameKind_001.ttcn create mode 100644 ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020304_importing_definitions_of_the_same_kind/Sem_08020304_ImportingDefinitionsOfTheSameKind_002.ttcn create mode 100644 ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020304_importing_definitions_of_the_same_kind/Sem_08020304_ImportingDefinitionsOfTheSameKind_003.ttcn create mode 100644 ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020305_importing_all_definitions_of_a_module/NegSem_08020305_ImportingAllDefinitionsOfAModule_001.ttcn create mode 100644 ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020305_importing_all_definitions_of_a_module/NegSem_08020305_ImportingAllDefinitionsOfAModule_002.ttcn create mode 100644 ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020305_importing_all_definitions_of_a_module/Sem_08020305_ImportingAllDefinitionsOfAModule_001.ttcn create mode 100644 ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020305_importing_all_definitions_of_a_module/Sem_08020305_ImportingAllDefinitionsOfAModule_002.ttcn create mode 100644 ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020306_importing_definitions_from_other_t3_editions_and_non_t3_modules/Sem_08020306_ImportingDefinitionsFromOtherT3EditionsAndFromNonT3Modules_001.ttcn create mode 100644 ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020306_importing_definitions_from_other_t3_editions_and_non_t3_modules/Syn_08020306_ImportingDefinitionsFromOtherT3EditionsAndFromNonT3Modules_001.ttcn create mode 100644 ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020306_importing_definitions_from_other_t3_editions_and_non_t3_modules/Syn_08020306_ImportingDefinitionsFromOtherT3EditionsAndFromNonT3Modules_002.ttcn create mode 100644 ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020307_importing_of_import_statements_from_t3_modules/NegSem_08020307_ImportingOfImportStatementsFromT3Modules_001.ttcn create mode 100644 ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020307_importing_of_import_statements_from_t3_modules/NegSem_08020307_ImportingOfImportStatementsFromT3Modules_002.ttcn create mode 100644 ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020307_importing_of_import_statements_from_t3_modules/Sem_08020307_ImportingOfImportStatementsFromT3Modules_001.ttcn create mode 100644 ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020308_compatibility_of_language_specifications_in_imports/NOTES create mode 100644 ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020308_compatibility_of_language_specifications_in_imports/NegSem_08020308_CompatibilityOfLanguageSpecificationsInImports_001.ttcn create mode 100644 ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020308_compatibility_of_language_specifications_in_imports/NegSem_08020308_CompatibilityOfLanguageSpecificationsInImports_002.ttcn create mode 100644 ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020308_compatibility_of_language_specifications_in_imports/NegSem_08020308_CompatibilityOfLanguageSpecificationsInImports_003.ttcn create mode 100644 ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020308_compatibility_of_language_specifications_in_imports/Sem_08020308_CompatibilityOfLanguageSpecificationsInImports_001.ttcn create mode 100644 ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020308_compatibility_of_language_specifications_in_imports/Sem_08020308_CompatibilityOfLanguageSpecificationsInImports_002.ttcn create mode 100644 ATS/core_language/08_modules/0802_module_definitions_part/080204_definition_of_friend_modules/NegSem_080204_DefinitionOfFriendModules_001.ttcn create mode 100644 ATS/core_language/08_modules/0802_module_definitions_part/080204_definition_of_friend_modules/NegSem_080204_DefinitionOfFriendModules_002.ttcn create mode 100644 ATS/core_language/08_modules/0802_module_definitions_part/080204_definition_of_friend_modules/Sem_080204_DefinitionOfFriendModules_001.ttcn create mode 100644 ATS/core_language/08_modules/0802_module_definitions_part/080205_visibility_of_definitions/NegSem_080205_VisibilityOfDefinitions_001.ttcn create mode 100644 ATS/core_language/08_modules/0802_module_definitions_part/080205_visibility_of_definitions/NegSem_080205_VisibilityOfDefinitions_002.ttcn create mode 100644 ATS/core_language/08_modules/0802_module_definitions_part/080205_visibility_of_definitions/NegSem_080205_VisibilityOfDefinitions_003.ttcn create mode 100644 ATS/core_language/08_modules/0802_module_definitions_part/080205_visibility_of_definitions/NegSem_080205_VisibilityOfDefinitions_004.ttcn create mode 100644 ATS/core_language/08_modules/0802_module_definitions_part/080205_visibility_of_definitions/NegSem_080205_VisibilityOfDefinitions_005.ttcn create mode 100644 ATS/core_language/08_modules/0802_module_definitions_part/080205_visibility_of_definitions/Sem_080205_VisibilityOfDefinitions_001.ttcn create mode 100644 ATS/core_language/08_modules/0802_module_definitions_part/080205_visibility_of_definitions/Sem_080205_VisibilityOfDefinitions_002.ttcn create mode 100644 ATS/core_language/08_modules/0802_module_definitions_part/080205_visibility_of_definitions/Sem_080205_VisibilityOfDefinitions_003.ttcn create mode 100644 ATS/core_language/08_modules/0802_module_definitions_part/080205_visibility_of_definitions/Sem_080205_VisibilityOfDefinitions_004.ttcn create mode 100644 ATS/core_language/08_modules/0802_module_definitions_part/080205_visibility_of_definitions/Sem_080205_VisibilityOfDefinitions_005.ttcn create mode 100644 ATS/core_language/08_modules/0802_module_definitions_part/0802_toplevel/Syn_0802_ModuleDefinitionsPart_001.ttcn create mode 100644 ATS/core_language/08_modules/0802_module_definitions_part/0802_toplevel/Syn_0802_ModuleDefinitionsPart_002.ttcn create mode 100644 ATS/core_language/08_modules/0803_module_control_part/NegSyn_0803_ModuleControlPart_001.ttcn create mode 100644 ATS/core_language/08_modules/0803_module_control_part/Sem_0803_ModuleControlPart_001.ttcn create mode 100644 ATS/core_language/08_modules/0803_module_control_part/Syn_0803_ModuleControlPart_001.ttcn create mode 100644 ATS/core_language/08_modules/0803_module_control_part/Syn_0803_ModuleControlPart_002.ttcn create mode 100644 ATS/core_language/08_modules/0803_module_control_part/Syn_0803_ModuleControlPart_003.ttcn create mode 100644 ATS/core_language/08_modules/NOTES create mode 100644 ATS/core_language/09_test_configurations/0901_communication_ports/NegSem_0901_Communication_ports_001.ttcn create mode 100644 ATS/core_language/09_test_configurations/0901_communication_ports/NegSem_0901_Communication_ports_002.ttcn create mode 100644 ATS/core_language/09_test_configurations/0901_communication_ports/NegSem_0901_Communication_ports_003.ttcn create mode 100644 ATS/core_language/09_test_configurations/0901_communication_ports/NegSem_0901_Communication_ports_004.ttcn create mode 100644 ATS/core_language/09_test_configurations/0901_communication_ports/NegSem_0901_Communication_ports_005.ttcn create mode 100644 ATS/core_language/09_test_configurations/0901_communication_ports/NegSem_0901_Communication_ports_006.ttcn create mode 100644 ATS/core_language/09_test_configurations/0901_communication_ports/NegSem_0901_Communication_ports_007.ttcn create mode 100644 ATS/core_language/09_test_configurations/0901_communication_ports/NegSem_0901_Communication_ports_008.ttcn create mode 100644 ATS/core_language/09_test_configurations/0901_communication_ports/NegSem_0901_Communication_ports_009.ttcn create mode 100644 ATS/core_language/09_test_configurations/0901_communication_ports/NegSem_0901_Communication_ports_010.ttcn create mode 100644 ATS/core_language/09_test_configurations/0901_communication_ports/Sem_0901_Communication_ports_001.ttcn create mode 100644 ATS/core_language/09_test_configurations/0901_communication_ports/Sem_0901_Communication_ports_002.ttcn create mode 100644 ATS/core_language/09_test_configurations/0901_communication_ports/Sem_0901_Communication_ports_003.ttcn create mode 100644 ATS/core_language/09_test_configurations/0901_communication_ports/Sem_0901_Communication_ports_004.ttcn create mode 100644 ATS/core_language/09_test_configurations/0901_communication_ports/Sem_0901_Communication_ports_005.ttcn create mode 100644 ATS/core_language/09_test_configurations/0901_communication_ports/Sem_0901_Communication_ports_006.ttcn create mode 100644 ATS/core_language/09_test_configurations/0901_communication_ports/Sem_0901_Communication_ports_007.ttcn create mode 100644 ATS/core_language/09_test_configurations/0901_communication_ports/Sem_0901_Communication_ports_008.ttcn create mode 100644 ATS/core_language/09_test_configurations/0901_communication_ports/Sem_0901_Communication_ports_009.ttcn create mode 100644 ATS/core_language/09_test_configurations/0901_communication_ports/Sem_0901_Communication_ports_010.ttcn create mode 100644 ATS/core_language/09_test_configurations/0901_communication_ports/Sem_0901_Communication_ports_011.ttcn create mode 100644 ATS/core_language/09_test_configurations/0902_test_system_interface/NegSem_0902_Communication_ports_001.ttcn create mode 100644 ATS/core_language/09_test_configurations/0902_test_system_interface/NegSem_0902_Communication_ports_002.ttcn create mode 100644 ATS/core_language/09_test_configurations/0902_test_system_interface/NegSem_0902_Communication_ports_003.ttcn create mode 100644 ATS/core_language/09_test_configurations/0902_test_system_interface/NegSem_0902_Communication_ports_004.ttcn create mode 100644 ATS/core_language/09_test_configurations/0902_test_system_interface/Sem_0902_Communication_ports_001.ttcn create mode 100644 ATS/core_language/09_test_configurations/0902_test_system_interface/Sem_0902_Communication_ports_002.ttcn create mode 100644 ATS/core_language/09_test_configurations/0902_test_system_interface/Syn_0902_Communication_ports_001.ttcn create mode 100644 ATS/core_language/10_constants/NOTES create mode 100644 ATS/core_language/10_constants/NegSem_10_Constants_001.ttcn create mode 100644 ATS/core_language/10_constants/NegSem_10_Constants_002.ttcn create mode 100644 ATS/core_language/10_constants/NegSem_10_Constants_003.ttcn create mode 100644 ATS/core_language/10_constants/NegSem_10_Constants_004.ttcn create mode 100644 ATS/core_language/10_constants/NegSem_10_Constants_005.ttcn create mode 100644 ATS/core_language/10_constants/Sem_10_Constants_001.ttcn create mode 100644 ATS/core_language/10_constants/Sem_10_Constants_002.ttcn create mode 100644 ATS/core_language/10_constants/Sem_10_Constants_003.ttcn create mode 100644 ATS/core_language/10_constants/Sem_10_Constants_004.ttcn create mode 100644 ATS/core_language/10_constants/Sem_10_Constants_005.ttcn create mode 100644 ATS/core_language/10_constants/Sem_10_Constants_006.ttcn create mode 100644 ATS/core_language/10_constants/Sem_10_Constants_007.ttcn create mode 100644 ATS/core_language/10_constants/Sem_10_Constants_008.ttcn create mode 100644 ATS/core_language/10_constants/Sem_10_Constants_009.ttcn create mode 100644 ATS/core_language/10_constants/Syn_10_Constants_001.ttcn create mode 100644 ATS/core_language/10_constants/Syn_10_Constants_002.ttcn create mode 100644 ATS/core_language/10_constants/Syn_10_Constants_003.ttcn create mode 100644 ATS/core_language/10_constants/Syn_10_Constants_004.ttcn create mode 100644 ATS/core_language/11_variables/1101_value_variables/NOTES create mode 100644 ATS/core_language/11_variables/1101_value_variables/NegSem_1101_ValueVars_001.ttcn create mode 100644 ATS/core_language/11_variables/1101_value_variables/NegSem_1101_ValueVars_002.ttcn create mode 100644 ATS/core_language/11_variables/1101_value_variables/NegSem_1101_ValueVars_003.ttcn create mode 100644 ATS/core_language/11_variables/1101_value_variables/NegSem_1101_ValueVars_004.ttcn create mode 100644 ATS/core_language/11_variables/1101_value_variables/NegSem_1101_ValueVars_005.ttcn create mode 100644 ATS/core_language/11_variables/1101_value_variables/NegSyn_1101_ValueVars_001.ttcn create mode 100644 ATS/core_language/11_variables/1101_value_variables/Sem_1101_ValueVars_001.ttcn create mode 100644 ATS/core_language/11_variables/1101_value_variables/Sem_1101_ValueVars_002.ttcn create mode 100644 ATS/core_language/11_variables/1101_value_variables/Sem_1101_ValueVars_003.ttcn create mode 100644 ATS/core_language/11_variables/1101_value_variables/Sem_1101_ValueVars_004.ttcn create mode 100644 ATS/core_language/11_variables/1101_value_variables/Sem_1101_ValueVars_005.ttcn create mode 100644 ATS/core_language/11_variables/1101_value_variables/Sem_1101_ValueVars_006.ttcn create mode 100644 ATS/core_language/11_variables/1101_value_variables/Syn_1101_ValueVars_001.ttcn create mode 100644 ATS/core_language/11_variables/1102_template_variables/NOTES create mode 100644 ATS/core_language/11_variables/1102_template_variables/NegSem_1102_TemplateVars_001.ttcn create mode 100644 ATS/core_language/11_variables/1102_template_variables/NegSem_1102_TemplateVars_002.ttcn create mode 100644 ATS/core_language/11_variables/1102_template_variables/NegSem_1102_TemplateVars_003.ttcn create mode 100644 ATS/core_language/11_variables/1102_template_variables/NegSem_1102_TemplateVars_004.ttcn create mode 100644 ATS/core_language/11_variables/1102_template_variables/NegSyn_1102_TemplateVars_001.ttcn create mode 100644 ATS/core_language/11_variables/1102_template_variables/NegSyn_1102_TemplateVars_002.ttcn create mode 100644 ATS/core_language/11_variables/1102_template_variables/Sem_1102_TemplateVars_001.ttcn create mode 100644 ATS/core_language/11_variables/1102_template_variables/Sem_1102_TemplateVars_002.ttcn create mode 100644 ATS/core_language/11_variables/1102_template_variables/Sem_1102_TemplateVars_003.ttcn create mode 100644 ATS/core_language/11_variables/1102_template_variables/Syn_1102_TemplateVars_001.ttcn create mode 100644 ATS/core_language/12_timers/12_toplevel/NegSem_12_toplevel_timer_001.ttcn create mode 100644 ATS/core_language/12_timers/12_toplevel/NegSem_12_toplevel_timer_002.ttcn create mode 100644 ATS/core_language/12_timers/12_toplevel/NegSem_12_toplevel_timer_003.ttcn create mode 100644 ATS/core_language/12_timers/12_toplevel/NegSem_12_toplevel_timer_004.ttcn create mode 100644 ATS/core_language/12_timers/12_toplevel/NegSem_12_toplevel_timer_005.ttcn create mode 100644 ATS/core_language/12_timers/12_toplevel/NegSem_12_toplevel_timer_006.ttcn create mode 100644 ATS/core_language/12_timers/12_toplevel/NegSem_12_toplevel_timer_007.ttcn create mode 100644 ATS/core_language/12_timers/12_toplevel/NegSem_12_toplevel_timer_008.ttcn create mode 100644 ATS/core_language/12_timers/12_toplevel/NegSyn_12_toplevel_timer_001.ttcn create mode 100644 ATS/core_language/12_timers/12_toplevel/NegSyn_12_toplevel_timer_002.ttcn create mode 100644 ATS/core_language/12_timers/12_toplevel/NegSyn_12_toplevel_timer_003.ttcn create mode 100644 ATS/core_language/12_timers/12_toplevel/NegSyn_12_toplevel_timer_004.ttcn create mode 100644 ATS/core_language/12_timers/12_toplevel/NegSyn_12_toplevel_timer_005.ttcn create mode 100644 ATS/core_language/12_timers/12_toplevel/NegSyn_12_toplevel_timer_006.ttcn create mode 100644 ATS/core_language/12_timers/12_toplevel/NegSyn_12_toplevel_timer_007.ttcn create mode 100644 ATS/core_language/12_timers/12_toplevel/Sem_12_toplevel_timer_001.ttcn create mode 100644 ATS/core_language/12_timers/12_toplevel/Sem_12_toplevel_timer_002.ttcn create mode 100644 ATS/core_language/12_timers/12_toplevel/Sem_12_toplevel_timer_003.ttcn create mode 100644 ATS/core_language/12_timers/12_toplevel/Sem_12_toplevel_timer_004.ttcn create mode 100644 ATS/core_language/12_timers/12_toplevel/Sem_12_toplevel_timer_005.ttcn create mode 100644 ATS/core_language/12_timers/12_toplevel/Sem_12_toplevel_timer_006.ttcn create mode 100644 ATS/core_language/12_timers/12_toplevel/Sem_12_toplevel_timer_007.ttcn create mode 100644 ATS/core_language/12_timers/12_toplevel/Sem_12_toplevel_timer_008.ttcn create mode 100644 ATS/core_language/12_timers/12_toplevel/Sem_12_toplevel_timer_009.ttcn create mode 100644 ATS/core_language/12_timers/12_toplevel/Syn_12_toplevel_timer_001.ttcn create mode 100644 ATS/core_language/12_timers/12_toplevel/Syn_12_toplevel_timer_002.ttcn create mode 100644 ATS/core_language/12_timers/12_toplevel/Syn_12_toplevel_timer_003.ttcn create mode 100644 ATS/core_language/12_timers/12_toplevel/Syn_12_toplevel_timer_004.ttcn create mode 100644 ATS/core_language/12_timers/12_toplevel/Syn_12_toplevel_timer_005.ttcn create mode 100644 ATS/core_language/12_timers/12_toplevel/Syn_12_toplevel_timer_006.ttcn create mode 100644 ATS/core_language/13_messages/13_toplevel/Sem_13_declaring_msg_001.ttcn create mode 100644 ATS/core_language/13_messages/13_toplevel/Sem_13_declaring_msg_002.ttcn create mode 100644 ATS/core_language/13_messages/13_toplevel/Sem_13_declaring_msg_003.ttcn create mode 100644 ATS/core_language/13_messages/13_toplevel/Sem_13_declaring_msg_004.ttcn create mode 100644 ATS/core_language/13_messages/13_toplevel/Sem_13_declaring_msg_005.ttcn create mode 100644 ATS/core_language/13_messages/13_toplevel/Sem_13_declaring_msg_006.ttcn create mode 100644 ATS/core_language/13_messages/13_toplevel/Sem_13_declaring_msg_007.ttcn create mode 100644 ATS/core_language/13_messages/13_toplevel/Sem_13_declaring_msg_008.ttcn create mode 100644 ATS/core_language/13_messages/13_toplevel/Sem_13_declaring_msg_009.ttcn create mode 100644 ATS/core_language/13_messages/13_toplevel/Sem_13_toplevel_declaring_msg_various_types_001.ttcn create mode 100644 ATS/core_language/13_messages/13_toplevel/Sem_13_toplevel_declaring_msg_various_types_002.ttcn create mode 100644 ATS/core_language/13_messages/13_toplevel/Sem_13_toplevel_declaring_msg_various_types_003.ttcn create mode 100644 ATS/core_language/13_messages/13_toplevel/Sem_13_toplevel_declaring_msg_various_types_004.ttcn create mode 100644 ATS/core_language/13_messages/13_toplevel/Sem_13_toplevel_declaring_msg_various_types_005.ttcn create mode 100644 ATS/core_language/13_messages/13_toplevel/Sem_13_toplevel_declaring_msg_various_types_006.ttcn create mode 100644 ATS/core_language/13_messages/13_toplevel/Sem_13_toplevel_declaring_msg_various_types_007.ttcn create mode 100644 ATS/core_language/13_messages/13_toplevel/Sem_13_toplevel_declaring_msg_various_types_008.ttcn create mode 100644 ATS/core_language/13_messages/13_toplevel/Sem_13_toplevel_declaring_msg_various_types_009.ttcn create mode 100644 ATS/core_language/13_messages/13_toplevel/Sem_13_toplevel_declaring_msg_various_types_010.ttcn create mode 100644 ATS/core_language/13_messages/13_toplevel/Sem_13_toplevel_declaring_msg_various_types_011.ttcn create mode 100644 ATS/core_language/13_messages/13_toplevel/Sem_13_toplevel_declaring_msg_various_types_012.ttcn create mode 100644 ATS/core_language/13_messages/13_toplevel/Sem_13_toplevel_declaring_msg_various_types_013.ttcn create mode 100644 ATS/core_language/13_messages/13_toplevel/Sem_13_toplevel_declaring_msg_various_types_014.ttcn create mode 100644 ATS/core_language/14_procedure_signatures/NegSem_1400_procedure_signatures_001.ttcn create mode 100644 ATS/core_language/14_procedure_signatures/NegSem_1400_procedure_signatures_002.ttcn create mode 100644 ATS/core_language/14_procedure_signatures/Sem_1400_procedure_signatures_001.ttcn create mode 100644 ATS/core_language/14_procedure_signatures/Sem_1400_procedure_signatures_002.ttcn create mode 100644 ATS/core_language/14_procedure_signatures/Sem_1400_procedure_signatures_003.ttcn create mode 100644 ATS/core_language/14_procedure_signatures/Sem_1400_procedure_signatures_004.ttcn create mode 100644 ATS/core_language/15_templates/1501_declaring_message_templates/Syn_1501_DeclaringMessageTemplates_001.ttcn create mode 100644 ATS/core_language/15_templates/1501_declaring_message_templates/Syn_1501_DeclaringMessageTemplates_002.ttcn create mode 100644 ATS/core_language/15_templates/1501_declaring_message_templates/Syn_1501_DeclaringMessageTemplates_003.ttcn create mode 100644 ATS/core_language/15_templates/1501_declaring_message_templates/Syn_1501_DeclaringMessageTemplates_004.ttcn create mode 100644 ATS/core_language/15_templates/1501_declaring_message_templates/Syn_1501_DeclaringMessageTemplates_005.ttcn create mode 100644 ATS/core_language/15_templates/1501_declaring_message_templates/Syn_1501_DeclaringMessageTemplates_006.ttcn create mode 100644 ATS/core_language/15_templates/1502_declaring_signature_templates/NOTES create mode 100644 ATS/core_language/15_templates/1502_declaring_signature_templates/Sem_1502_DeclaringSignatureTemplates_001.ttcn create mode 100644 ATS/core_language/15_templates/1502_declaring_signature_templates/Sem_1502_DeclaringSignatureTemplates_002.ttcn create mode 100644 ATS/core_language/15_templates/1502_declaring_signature_templates/Sem_1502_DeclaringSignatureTemplates_003.ttcn create mode 100644 ATS/core_language/15_templates/1502_declaring_signature_templates/Syn_1502_DeclaringSignatureTemplates_001.ttcn create mode 100644 ATS/core_language/15_templates/1502_declaring_signature_templates/Syn_1502_DeclaringSignatureTemplates_002.ttcn create mode 100644 ATS/core_language/15_templates/1502_declaring_signature_templates/Syn_1502_DeclaringSignatureTemplates_003.ttcn create mode 100644 ATS/core_language/15_templates/1502_declaring_signature_templates/Syn_1502_DeclaringSignatureTemplates_004.ttcn create mode 100644 ATS/core_language/15_templates/1503_global_and_local_templates/NegSem_1503_GlobalAndLocalTemplates_001.ttcn create mode 100644 ATS/core_language/15_templates/1503_global_and_local_templates/NegSem_1503_GlobalAndLocalTemplates_002.ttcn create mode 100644 ATS/core_language/15_templates/1503_global_and_local_templates/NegSem_1503_GlobalAndLocalTemplates_003.ttcn create mode 100644 ATS/core_language/15_templates/1503_global_and_local_templates/NegSem_1503_GlobalAndLocalTemplates_004.ttcn create mode 100644 ATS/core_language/15_templates/1503_global_and_local_templates/NegSyn_1503_GlobalAndLocalTemplates_001.ttcn create mode 100644 ATS/core_language/15_templates/1503_global_and_local_templates/NegSyn_1503_GlobalAndLocalTemplates_002.ttcn create mode 100644 ATS/core_language/15_templates/1503_global_and_local_templates/NegSyn_1503_GlobalAndLocalTemplates_003.ttcn create mode 100644 ATS/core_language/15_templates/1503_global_and_local_templates/NegSyn_1503_GlobalAndLocalTemplates_004.ttcn create mode 100644 ATS/core_language/15_templates/1503_global_and_local_templates/Sem_1503_GlobalAndLocalTemplates_001.ttcn create mode 100644 ATS/core_language/15_templates/1503_global_and_local_templates/Sem_1503_GlobalAndLocalTemplates_002.ttcn create mode 100644 ATS/core_language/15_templates/1503_global_and_local_templates/Sem_1503_GlobalAndLocalTemplates_003.ttcn create mode 100644 ATS/core_language/15_templates/1503_global_and_local_templates/Sem_1503_GlobalAndLocalTemplates_004.ttcn create mode 100644 ATS/core_language/15_templates/1503_global_and_local_templates/Sem_1503_GlobalAndLocalTemplates_005.ttcn create mode 100644 ATS/core_language/15_templates/1503_global_and_local_templates/Sem_1503_GlobalAndLocalTemplates_006.ttcn create mode 100644 ATS/core_language/15_templates/1503_global_and_local_templates/Syn_1503_GlobalAndLocalTemplates_001.ttcn create mode 100644 ATS/core_language/15_templates/1503_global_and_local_templates/Syn_1503_GlobalAndLocalTemplates_004.ttcn create mode 100644 ATS/core_language/15_templates/1503_global_and_local_templates/Syn_1503_GlobalAndLocalTemplates_005.ttcn create mode 100644 ATS/core_language/15_templates/1503_global_and_local_templates/Syn_1503_GlobalAndLocalTemplates_006.ttcn create mode 100644 ATS/core_language/15_templates/1504_inline_templates/Syn_1504_InlineTemplates_001.ttcn create mode 100644 ATS/core_language/15_templates/1504_inline_templates/Syn_1504_InlineTemplates_002.ttcn create mode 100644 ATS/core_language/15_templates/1504_inline_templates/Syn_1504_InlineTemplates_003.ttcn create mode 100644 ATS/core_language/15_templates/1505_modified_templates/NegSem_1505_ModifiedTemplates_001.ttcn create mode 100644 ATS/core_language/15_templates/1505_modified_templates/NegSem_1505_ModifiedTemplates_002.ttcn create mode 100644 ATS/core_language/15_templates/1505_modified_templates/NegSem_1505_ModifiedTemplates_003.ttcn create mode 100644 ATS/core_language/15_templates/1505_modified_templates/NegSem_1505_ModifiedTemplates_004.ttcn create mode 100644 ATS/core_language/15_templates/1505_modified_templates/NegSem_1505_ModifiedTemplates_005.ttcn create mode 100644 ATS/core_language/15_templates/1505_modified_templates/NegSem_1505_ModifiedTemplates_006.ttcn create mode 100644 ATS/core_language/15_templates/1505_modified_templates/NegSem_1505_ModifiedTemplates_007.ttcn create mode 100644 ATS/core_language/15_templates/1505_modified_templates/NegSyn_1505_ModifiedTemplates_001.ttcn create mode 100644 ATS/core_language/15_templates/1505_modified_templates/Sem_1505_ModifiedTemplates_001.ttcn create mode 100644 ATS/core_language/15_templates/1505_modified_templates/Sem_1505_ModifiedTemplates_002.ttcn create mode 100644 ATS/core_language/15_templates/1505_modified_templates/Sem_1505_ModifiedTemplates_003.ttcn create mode 100644 ATS/core_language/15_templates/1505_modified_templates/Sem_1505_ModifiedTemplates_004.ttcn create mode 100644 ATS/core_language/15_templates/1505_modified_templates/Sem_1505_ModifiedTemplates_005.ttcn create mode 100644 ATS/core_language/15_templates/1505_modified_templates/Sem_1505_ModifiedTemplates_006.ttcn create mode 100644 ATS/core_language/15_templates/1505_modified_templates/Sem_1505_ModifiedTemplates_007.ttcn create mode 100644 ATS/core_language/15_templates/1505_modified_templates/Sem_1505_ModifiedTemplates_008.ttcn create mode 100644 ATS/core_language/15_templates/1505_modified_templates/Sem_1505_ModifiedTemplates_009.ttcn create mode 100644 ATS/core_language/15_templates/1505_modified_templates/Sem_1505_ModifiedTemplates_010.ttcn create mode 100644 ATS/core_language/15_templates/1505_modified_templates/Syn_1505_ModifiedTemplates_001.ttcn create mode 100644 ATS/core_language/15_templates/1505_modified_templates/Syn_1505_ModifiedTemplates_002.ttcn create mode 100644 ATS/core_language/15_templates/1505_modified_templates/Syn_1505_ModifiedTemplates_003.ttcn create mode 100644 ATS/core_language/15_templates/1505_modified_templates/Syn_1505_ModifiedTemplates_004.ttcn create mode 100644 ATS/core_language/15_templates/1506_referencing_elements_of_templates_or_template_fields/150601_referencing_individual_string_elements/NegSem_150601_ReferencingIndividualStringElements_001.ttcn create mode 100644 ATS/core_language/15_templates/1506_referencing_elements_of_templates_or_template_fields/150602_referencing_record_and_set_fields/NegSem_150602_ReferencingRecordAndSetFields_001.ttcn create mode 100644 ATS/core_language/15_templates/1506_referencing_elements_of_templates_or_template_fields/150602_referencing_record_and_set_fields/NegSem_150602_ReferencingRecordAndSetFields_002.ttcn create mode 100644 ATS/core_language/15_templates/1506_referencing_elements_of_templates_or_template_fields/150602_referencing_record_and_set_fields/NegSem_150602_ReferencingRecordAndSetFields_003.ttcn create mode 100644 ATS/core_language/15_templates/1506_referencing_elements_of_templates_or_template_fields/150602_referencing_record_and_set_fields/NegSem_150602_ReferencingRecordAndSetFields_004.ttcn create mode 100644 ATS/core_language/15_templates/1506_referencing_elements_of_templates_or_template_fields/150602_referencing_record_and_set_fields/NegSem_150602_ReferencingRecordAndSetFields_005.ttcn create mode 100644 ATS/core_language/15_templates/1506_referencing_elements_of_templates_or_template_fields/150602_referencing_record_and_set_fields/NegSem_150602_ReferencingRecordAndSetFields_006.ttcn create mode 100644 ATS/core_language/15_templates/1506_referencing_elements_of_templates_or_template_fields/150602_referencing_record_and_set_fields/Sem_150602_ReferencingRecordAndSetFields_001.ttcn create mode 100644 ATS/core_language/15_templates/1506_referencing_elements_of_templates_or_template_fields/150602_referencing_record_and_set_fields/Sem_150602_ReferencingRecordAndSetFields_002.ttcn create mode 100644 ATS/core_language/15_templates/1506_referencing_elements_of_templates_or_template_fields/150602_referencing_record_and_set_fields/Sem_150602_ReferencingRecordAndSetFields_003.ttcn create mode 100644 ATS/core_language/15_templates/1506_referencing_elements_of_templates_or_template_fields/150602_referencing_record_and_set_fields/Sem_150602_ReferencingRecordAndSetFields_004.ttcn create mode 100644 ATS/core_language/15_templates/1506_referencing_elements_of_templates_or_template_fields/150603_referencing_record_of_and_set_elements/NegSem_150603_ReferencingRecordOfAndSetElements_001.ttcn create mode 100644 ATS/core_language/15_templates/1506_referencing_elements_of_templates_or_template_fields/150603_referencing_record_of_and_set_elements/NegSem_150603_ReferencingRecordOfAndSetElements_002.ttcn create mode 100644 ATS/core_language/15_templates/1506_referencing_elements_of_templates_or_template_fields/150603_referencing_record_of_and_set_elements/NegSem_150603_ReferencingRecordOfAndSetElements_003.ttcn create mode 100644 ATS/core_language/15_templates/1506_referencing_elements_of_templates_or_template_fields/150603_referencing_record_of_and_set_elements/NegSem_150603_ReferencingRecordOfAndSetElements_004.ttcn create mode 100644 ATS/core_language/15_templates/1506_referencing_elements_of_templates_or_template_fields/150603_referencing_record_of_and_set_elements/NegSem_150603_ReferencingRecordOfAndSetElements_005.ttcn create mode 100644 ATS/core_language/15_templates/1506_referencing_elements_of_templates_or_template_fields/150603_referencing_record_of_and_set_elements/NegSem_150603_ReferencingRecordOfAndSetElements_006.ttcn create mode 100644 ATS/core_language/15_templates/1506_referencing_elements_of_templates_or_template_fields/150603_referencing_record_of_and_set_elements/NegSem_150603_ReferencingRecordOfAndSetElements_007.ttcn create mode 100644 ATS/core_language/15_templates/1506_referencing_elements_of_templates_or_template_fields/150603_referencing_record_of_and_set_elements/NegSem_150603_ReferencingRecordOfAndSetElements_008.ttcn create mode 100644 ATS/core_language/15_templates/1506_referencing_elements_of_templates_or_template_fields/150603_referencing_record_of_and_set_elements/NegSem_150603_ReferencingRecordOfAndSetElements_009.ttcn create mode 100644 ATS/core_language/15_templates/1506_referencing_elements_of_templates_or_template_fields/150603_referencing_record_of_and_set_elements/NegSem_150603_ReferencingRecordOfAndSetElements_010.ttcn create mode 100644 ATS/core_language/15_templates/1506_referencing_elements_of_templates_or_template_fields/150603_referencing_record_of_and_set_elements/NegSem_150603_ReferencingRecordOfAndSetElements_011.ttcn create mode 100644 ATS/core_language/15_templates/1506_referencing_elements_of_templates_or_template_fields/150603_referencing_record_of_and_set_elements/NegSem_150603_ReferencingRecordOfAndSetElements_012.ttcn create mode 100644 ATS/core_language/15_templates/1506_referencing_elements_of_templates_or_template_fields/150603_referencing_record_of_and_set_elements/NegSem_150603_ReferencingRecordOfAndSetElements_013.ttcn create mode 100644 ATS/core_language/15_templates/1506_referencing_elements_of_templates_or_template_fields/150603_referencing_record_of_and_set_elements/NegSem_150603_ReferencingRecordOfAndSetElements_014.ttcn create mode 100644 ATS/core_language/15_templates/1506_referencing_elements_of_templates_or_template_fields/150603_referencing_record_of_and_set_elements/NegSem_150603_ReferencingRecordOfAndSetElements_015.ttcn create mode 100644 ATS/core_language/15_templates/1506_referencing_elements_of_templates_or_template_fields/150603_referencing_record_of_and_set_elements/Sem_150603_ReferencingRecordOfAndSetElements_001.ttcn create mode 100644 ATS/core_language/15_templates/1506_referencing_elements_of_templates_or_template_fields/150603_referencing_record_of_and_set_elements/Sem_150603_ReferencingRecordOfAndSetElements_002.ttcn create mode 100644 ATS/core_language/15_templates/1506_referencing_elements_of_templates_or_template_fields/150603_referencing_record_of_and_set_elements/Sem_150603_ReferencingRecordOfAndSetElements_003.ttcn create mode 100644 ATS/core_language/15_templates/1506_referencing_elements_of_templates_or_template_fields/150603_referencing_record_of_and_set_elements/Sem_150603_ReferencingRecordOfAndSetElements_004.ttcn create mode 100644 ATS/core_language/15_templates/1506_referencing_elements_of_templates_or_template_fields/150603_referencing_record_of_and_set_elements/Sem_150603_ReferencingRecordOfAndSetElements_005.ttcn create mode 100644 ATS/core_language/15_templates/1506_referencing_elements_of_templates_or_template_fields/150603_referencing_record_of_and_set_elements/Sem_150603_ReferencingRecordOfAndSetElements_006.ttcn create mode 100644 ATS/core_language/15_templates/1506_referencing_elements_of_templates_or_template_fields/150603_referencing_record_of_and_set_elements/Sem_150603_ReferencingRecordOfAndSetElements_007.ttcn create mode 100644 ATS/core_language/15_templates/1506_referencing_elements_of_templates_or_template_fields/150604_referencing_signature_parameters/NOTES create mode 100644 ATS/core_language/15_templates/1506_referencing_elements_of_templates_or_template_fields/150604_referencing_signature_parameters/NegSem_150604_ReferencingSignatureParameters_001.ttcn create mode 100644 ATS/core_language/15_templates/1506_referencing_elements_of_templates_or_template_fields/150604_referencing_signature_parameters/Sem_150604_ReferencingSignatureParameters_001.ttcn create mode 100644 ATS/core_language/15_templates/1506_referencing_elements_of_templates_or_template_fields/150605_Referencing_union_alternatives/NegSem_150605_Referencing_union_alternatives_001.ttcn create mode 100644 ATS/core_language/15_templates/1506_referencing_elements_of_templates_or_template_fields/150605_Referencing_union_alternatives/NegSem_150605_Referencing_union_alternatives_002.ttcn create mode 100644 ATS/core_language/15_templates/1506_referencing_elements_of_templates_or_template_fields/150605_Referencing_union_alternatives/NegSem_150605_Referencing_union_alternatives_003.ttcn create mode 100644 ATS/core_language/15_templates/1506_referencing_elements_of_templates_or_template_fields/150605_Referencing_union_alternatives/NegSem_150605_Referencing_union_alternatives_004.ttcn create mode 100644 ATS/core_language/15_templates/1506_referencing_elements_of_templates_or_template_fields/150605_Referencing_union_alternatives/NegSem_150605_Referencing_union_alternatives_005.ttcn create mode 100644 ATS/core_language/15_templates/1506_referencing_elements_of_templates_or_template_fields/150605_Referencing_union_alternatives/NegSem_150605_Referencing_union_alternatives_006.ttcn create mode 100644 ATS/core_language/15_templates/1506_referencing_elements_of_templates_or_template_fields/150605_Referencing_union_alternatives/Sem_150605_Referencing_union_alternatives_001.ttcn create mode 100644 ATS/core_language/15_templates/1506_referencing_elements_of_templates_or_template_fields/150605_Referencing_union_alternatives/Sem_150605_Referencing_union_alternatives_002.ttcn create mode 100644 ATS/core_language/15_templates/1506_referencing_elements_of_templates_or_template_fields/150605_Referencing_union_alternatives/Sem_150605_Referencing_union_alternatives_003.ttcn create mode 100644 ATS/core_language/15_templates/1506_referencing_elements_of_templates_or_template_fields/150605_Referencing_union_alternatives/Sem_150605_Referencing_union_alternatives_004.ttcn create mode 100644 ATS/core_language/15_templates/1507_template_matching_mechanisms/README create mode 100644 ATS/core_language/15_templates/1508_template_restrictions/NOTES create mode 100644 ATS/core_language/15_templates/1508_template_restrictions/NegSem_1508_TemplateRestrictions_001.ttcn create mode 100644 ATS/core_language/15_templates/1508_template_restrictions/NegSem_1508_TemplateRestrictions_002.ttcn create mode 100644 ATS/core_language/15_templates/1508_template_restrictions/NegSem_1508_TemplateRestrictions_003.ttcn create mode 100644 ATS/core_language/15_templates/1508_template_restrictions/NegSem_1508_TemplateRestrictions_004.ttcn create mode 100644 ATS/core_language/15_templates/1508_template_restrictions/NegSem_1508_TemplateRestrictions_005.ttcn create mode 100644 ATS/core_language/15_templates/1508_template_restrictions/NegSem_1508_TemplateRestrictions_006.ttcn create mode 100644 ATS/core_language/15_templates/1508_template_restrictions/NegSem_1508_TemplateRestrictions_007.ttcn create mode 100644 ATS/core_language/15_templates/1508_template_restrictions/NegSem_1508_TemplateRestrictions_008.ttcn create mode 100644 ATS/core_language/15_templates/1508_template_restrictions/NegSem_1508_TemplateRestrictions_009.ttcn create mode 100644 ATS/core_language/15_templates/1508_template_restrictions/NegSem_1508_TemplateRestrictions_010.ttcn create mode 100644 ATS/core_language/15_templates/1508_template_restrictions/NegSem_1508_TemplateRestrictions_011.ttcn create mode 100644 ATS/core_language/15_templates/1508_template_restrictions/NegSem_1508_TemplateRestrictions_012.ttcn create mode 100644 ATS/core_language/15_templates/1508_template_restrictions/NegSem_1508_TemplateRestrictions_013.ttcn create mode 100644 ATS/core_language/15_templates/1508_template_restrictions/NegSem_1508_TemplateRestrictions_014.ttcn create mode 100644 ATS/core_language/15_templates/1508_template_restrictions/NegSem_1508_TemplateRestrictions_015.ttcn create mode 100644 ATS/core_language/15_templates/1508_template_restrictions/NegSem_1508_TemplateRestrictions_016.ttcn create mode 100644 ATS/core_language/15_templates/1508_template_restrictions/NegSem_1508_TemplateRestrictions_017.ttcn create mode 100644 ATS/core_language/15_templates/1508_template_restrictions/NegSem_1508_TemplateRestrictions_018.ttcn create mode 100644 ATS/core_language/15_templates/1508_template_restrictions/NegSem_1508_TemplateRestrictions_019.ttcn create mode 100644 ATS/core_language/15_templates/1508_template_restrictions/NegSem_1508_TemplateRestrictions_020.ttcn create mode 100644 ATS/core_language/15_templates/1508_template_restrictions/NegSem_1508_TemplateRestrictions_021.ttcn create mode 100644 ATS/core_language/15_templates/1508_template_restrictions/NegSem_1508_TemplateRestrictions_022.ttcn create mode 100644 ATS/core_language/15_templates/1508_template_restrictions/NegSem_1508_TemplateRestrictions_023.ttcn create mode 100644 ATS/core_language/15_templates/1508_template_restrictions/NegSem_1508_TemplateRestrictions_024.ttcn create mode 100644 ATS/core_language/15_templates/1508_template_restrictions/NegSem_1508_TemplateRestrictions_025.ttcn create mode 100644 ATS/core_language/15_templates/1508_template_restrictions/NegSem_1508_TemplateRestrictions_026.ttcn create mode 100644 ATS/core_language/15_templates/1508_template_restrictions/NegSem_1508_TemplateRestrictions_029.ttcn create mode 100644 ATS/core_language/15_templates/1508_template_restrictions/NegSem_1508_TemplateRestrictions_030.ttcn create mode 100644 ATS/core_language/15_templates/1508_template_restrictions/NegSem_1508_TemplateRestrictions_031.ttcn create mode 100644 ATS/core_language/15_templates/1508_template_restrictions/NegSem_1508_TemplateRestrictions_032.ttcn create mode 100644 ATS/core_language/15_templates/1508_template_restrictions/NegSem_1508_TemplateRestrictions_033.ttcn create mode 100644 ATS/core_language/15_templates/1508_template_restrictions/NegSem_1508_TemplateRestrictions_034.ttcn create mode 100644 ATS/core_language/15_templates/1508_template_restrictions/NegSem_1508_TemplateRestrictions_035.ttcn create mode 100644 ATS/core_language/15_templates/1508_template_restrictions/NegSem_1508_TemplateRestrictions_036.ttcn create mode 100644 ATS/core_language/15_templates/1508_template_restrictions/NegSem_1508_TemplateRestrictions_037.ttcn create mode 100644 ATS/core_language/15_templates/1508_template_restrictions/NegSem_1508_TemplateRestrictions_038.ttcn create mode 100644 ATS/core_language/15_templates/1508_template_restrictions/NegSem_1508_TemplateRestrictions_039.ttcn create mode 100644 ATS/core_language/15_templates/1508_template_restrictions/NegSem_1508_TemplateRestrictions_040.ttcn create mode 100644 ATS/core_language/15_templates/1508_template_restrictions/NegSem_1508_TemplateRestrictions_041.ttcn create mode 100644 ATS/core_language/15_templates/1508_template_restrictions/NegSem_1508_TemplateRestrictions_042.ttcn create mode 100644 ATS/core_language/15_templates/1508_template_restrictions/NegSem_1508_TemplateRestrictions_049.ttcn create mode 100644 ATS/core_language/15_templates/1508_template_restrictions/NegSem_1508_TemplateRestrictions_050.ttcn create mode 100644 ATS/core_language/15_templates/1508_template_restrictions/NegSem_1508_TemplateRestrictions_051.ttcn create mode 100644 ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_001.ttcn create mode 100644 ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_002.ttcn create mode 100644 ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_003.ttcn create mode 100644 ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_004.ttcn create mode 100644 ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_005.ttcn create mode 100644 ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_006.ttcn create mode 100644 ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_007.ttcn create mode 100644 ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_008.ttcn create mode 100644 ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_009.ttcn create mode 100644 ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_010.ttcn create mode 100644 ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_011.ttcn create mode 100644 ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_012.ttcn create mode 100644 ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_013.ttcn create mode 100644 ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_014.ttcn create mode 100644 ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_015.ttcn create mode 100644 ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_016.ttcn create mode 100644 ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_017.ttcn create mode 100644 ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_018.ttcn create mode 100644 ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_019.ttcn create mode 100644 ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_020.ttcn create mode 100644 ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_021.ttcn create mode 100644 ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_022.ttcn create mode 100644 ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_023.ttcn create mode 100644 ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_024.ttcn create mode 100644 ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_025.ttcn create mode 100644 ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_026.ttcn create mode 100644 ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_027.ttcn create mode 100644 ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_028.ttcn create mode 100644 ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_029.ttcn create mode 100644 ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_030.ttcn create mode 100644 ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_031.ttcn create mode 100644 ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_032.ttcn create mode 100644 ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_033.ttcn create mode 100644 ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_034.ttcn create mode 100644 ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_035.ttcn create mode 100644 ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_036.ttcn create mode 100644 ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_043.ttcn create mode 100644 ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_044.ttcn create mode 100644 ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_045.ttcn create mode 100644 ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_046.ttcn create mode 100644 ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_047.ttcn create mode 100644 ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_048.ttcn create mode 100644 ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_049.ttcn create mode 100644 ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_050.ttcn create mode 100644 ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_051.ttcn create mode 100644 ATS/core_language/15_templates/1508_template_restrictions/Syn_1508_TemplateRestrictions_001.ttcn create mode 100644 ATS/core_language/15_templates/1508_template_restrictions/Syn_1508_TemplateRestrictions_002.ttcn create mode 100644 ATS/core_language/15_templates/1508_template_restrictions/Syn_1508_TemplateRestrictions_003.ttcn create mode 100644 ATS/core_language/15_templates/1508_template_restrictions/Syn_1508_TemplateRestrictions_004.ttcn create mode 100644 ATS/core_language/15_templates/1509_match_operation/NOTES create mode 100644 ATS/core_language/15_templates/1509_match_operation/NegSem_1509_MatchOperation_001.ttcn create mode 100644 ATS/core_language/15_templates/1509_match_operation/NegSem_1509_MatchOperation_002.ttcn create mode 100644 ATS/core_language/15_templates/1509_match_operation/NegSem_1509_MatchOperation_003.ttcn create mode 100644 ATS/core_language/15_templates/1509_match_operation/Sem_1509_MatchOperation_001.ttcn create mode 100644 ATS/core_language/15_templates/1509_match_operation/Sem_1509_MatchOperation_002.ttcn create mode 100644 ATS/core_language/15_templates/1509_match_operation/Sem_1509_MatchOperation_003.ttcn create mode 100644 ATS/core_language/15_templates/1509_match_operation/Sem_1509_MatchOperation_004.ttcn create mode 100644 ATS/core_language/15_templates/1509_match_operation/Sem_1509_MatchOperation_006.ttcn create mode 100644 ATS/core_language/15_templates/1509_match_operation/Sem_1509_MatchOperation_007.ttcn create mode 100644 ATS/core_language/15_templates/1509_match_operation/Sem_1509_MatchOperation_008.ttcn create mode 100644 ATS/core_language/15_templates/1509_match_operation/Sem_1509_MatchOperation_010.ttcn create mode 100644 ATS/core_language/15_templates/1509_match_operation/Sem_1509_MatchOperation_011.ttcn create mode 100644 ATS/core_language/15_templates/1509_match_operation/Sem_1509_MatchOperation_012.ttcn create mode 100644 ATS/core_language/15_templates/1509_match_operation/Sem_1509_MatchOperation_013.ttcn create mode 100644 ATS/core_language/15_templates/1509_match_operation/Sem_1509_MatchOperation_014.ttcn create mode 100644 ATS/core_language/15_templates/1509_match_operation/Sem_1509_MatchOperation_015.ttcn create mode 100644 ATS/core_language/15_templates/1509_match_operation/Sem_1509_MatchOperation_016.ttcn create mode 100644 ATS/core_language/15_templates/1510_valueof_operation/NOTES create mode 100644 ATS/core_language/15_templates/1510_valueof_operation/NegSem_1510_ValueOfOperation_001.ttcn create mode 100644 ATS/core_language/15_templates/1510_valueof_operation/NegSem_1510_ValueOfOperation_002.ttcn create mode 100644 ATS/core_language/15_templates/1510_valueof_operation/NegSem_1510_ValueOfOperation_003.ttcn create mode 100644 ATS/core_language/15_templates/1510_valueof_operation/NegSem_1510_ValueOfOperation_004.ttcn create mode 100644 ATS/core_language/15_templates/1510_valueof_operation/NegSem_1510_ValueOfOperation_005.ttcn create mode 100644 ATS/core_language/15_templates/1510_valueof_operation/NegSem_1510_ValueOfOperation_006.ttcn create mode 100644 ATS/core_language/15_templates/1510_valueof_operation/Sem_1510_ValueOfOperation_001.ttcn create mode 100644 ATS/core_language/15_templates/1511_concatenating_templates_of_string_and_list_types/NegSem_1511_ConcatenatingTemplatesOfStringAndListTypes_001.ttcn create mode 100644 ATS/core_language/15_templates/1511_concatenating_templates_of_string_and_list_types/NegSem_1511_ConcatenatingTemplatesOfStringAndListTypes_002.ttcn create mode 100644 ATS/core_language/15_templates/1511_concatenating_templates_of_string_and_list_types/NegSem_1511_ConcatenatingTemplatesOfStringAndListTypes_003.ttcn create mode 100644 ATS/core_language/15_templates/1511_concatenating_templates_of_string_and_list_types/NegSem_1511_ConcatenatingTemplatesOfStringAndListTypes_004.ttcn create mode 100644 ATS/core_language/15_templates/1511_concatenating_templates_of_string_and_list_types/NegSem_1511_ConcatenatingTemplatesOfStringAndListTypes_005.ttcn create mode 100644 ATS/core_language/15_templates/1511_concatenating_templates_of_string_and_list_types/NegSem_1511_ConcatenatingTemplatesOfStringAndListTypes_006.ttcn create mode 100644 ATS/core_language/15_templates/1511_concatenating_templates_of_string_and_list_types/Sem_1511_ConcatenatingTemplatesOfStringAndListTypes_001.ttcn create mode 100644 ATS/core_language/15_templates/1511_concatenating_templates_of_string_and_list_types/Sem_1511_ConcatenatingTemplatesOfStringAndListTypes_002.ttcn create mode 100644 ATS/core_language/15_templates/1511_concatenating_templates_of_string_and_list_types/Sem_1511_ConcatenatingTemplatesOfStringAndListTypes_003.ttcn create mode 100644 ATS/core_language/15_templates/1511_concatenating_templates_of_string_and_list_types/Sem_1511_ConcatenatingTemplatesOfStringAndListTypes_004.ttcn create mode 100644 ATS/core_language/15_templates/1511_concatenating_templates_of_string_and_list_types/Sem_1511_ConcatenatingTemplatesOfStringAndListTypes_005.ttcn create mode 100644 ATS/core_language/15_templates/1511_concatenating_templates_of_string_and_list_types/Sem_1511_ConcatenatingTemplatesOfStringAndListTypes_006.ttcn create mode 100644 ATS/core_language/15_templates/1511_concatenating_templates_of_string_and_list_types/Sem_1511_ConcatenatingTemplatesOfStringAndListTypes_007.ttcn create mode 100644 ATS/core_language/15_templates/1511_concatenating_templates_of_string_and_list_types/Sem_1511_ConcatenatingTemplatesOfStringAndListTypes_008.ttcn create mode 100644 ATS/core_language/15_templates/1511_concatenating_templates_of_string_and_list_types/Sem_1511_ConcatenatingTemplatesOfStringAndListTypes_009.ttcn create mode 100644 ATS/core_language/15_templates/1511_concatenating_templates_of_string_and_list_types/Sem_1511_ConcatenatingTemplatesOfStringAndListTypes_010.ttcn create mode 100644 ATS/core_language/15_templates/1511_concatenating_templates_of_string_and_list_types/Sem_1511_ConcatenatingTemplatesOfStringAndListTypes_011.ttcn create mode 100644 ATS/core_language/15_templates/1511_concatenating_templates_of_string_and_list_types/Sem_1511_ConcatenatingTemplatesOfStringAndListTypes_012.ttcn create mode 100644 ATS/core_language/15_templates/1511_concatenating_templates_of_string_and_list_types/Sem_1511_ConcatenatingTemplatesOfStringAndListTypes_013.ttcn create mode 100644 ATS/core_language/15_templates/1511_concatenating_templates_of_string_and_list_types/Sem_1511_ConcatenatingTemplatesOfStringAndListTypes_014.ttcn create mode 100644 ATS/core_language/15_templates/1511_concatenating_templates_of_string_and_list_types/Sem_1511_ConcatenatingTemplatesOfStringAndListTypes_015.ttcn create mode 100644 ATS/core_language/15_templates/15_toplevel/NegSem_15_TopLevel_001.ttcn create mode 100644 ATS/core_language/15_templates/15_toplevel/NegSem_15_TopLevel_002.ttcn create mode 100644 ATS/core_language/15_templates/15_toplevel/NegSem_15_TopLevel_003.ttcn create mode 100644 ATS/core_language/15_templates/15_toplevel/NegSem_15_TopLevel_004.ttcn create mode 100644 ATS/core_language/15_templates/15_toplevel/NegSyn_15_TopLevel_001.ttcn create mode 100644 ATS/core_language/15_templates/15_toplevel/Syn_15_TopLevel_001.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160101_invoking_functions/Sem_160101_invoking_functions_001.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/NOTES create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/NegSem_160102_predefined_functions_001.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/NegSem_160102_predefined_functions_002.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/NegSem_160102_predefined_functions_003.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/NegSem_160102_predefined_functions_004.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/NegSem_160102_predefined_functions_005.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/NegSem_160102_predefined_functions_006.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/NegSem_160102_predefined_functions_007.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/NegSem_160102_predefined_functions_008.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/NegSem_160102_predefined_functions_009.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/NegSem_160102_predefined_functions_010.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/NegSem_160102_predefined_functions_017.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/NegSem_160102_predefined_functions_018.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/NegSem_160102_predefined_functions_019.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/NegSem_160102_predefined_functions_021.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/NegSem_160102_predefined_functions_022.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/NegSem_160102_predefined_functions_023.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/NegSem_160102_predefined_functions_024.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/NegSem_160102_predefined_functions_025.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/NegSem_160102_predefined_functions_026.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/NegSem_160102_predefined_functions_027.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/NegSem_160102_predefined_functions_028.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/NegSem_160102_predefined_functions_029.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/NegSem_160102_predefined_functions_030.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/NegSem_160102_predefined_functions_031.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/NegSem_160102_predefined_functions_032.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/NegSem_160102_predefined_functions_033.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/NegSem_160102_predefined_functions_034.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/NegSem_160102_predefined_functions_036.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/NegSem_160102_predefined_functions_037.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/NegSem_160102_predefined_functions_038.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/NegSem_160102_predefined_functions_039.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/NegSem_160102_predefined_functions_040.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_001.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_002.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_003.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_004.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_005.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_006.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_007.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_008.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_009.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_010.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_011.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_012.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_013.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_014.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_015.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_016.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_017.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_018.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_019.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_020.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_021.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_022.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_023.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_024.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_025.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_026.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_027.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_028.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_029.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_030.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_031.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_032.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_033.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_034.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_035.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_036.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_037.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_038.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_039.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_040.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_041.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_042.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_043.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_044.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_045.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_046.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_047.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_048.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_049.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_050.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_051.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_052.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_053.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_054.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_055.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_056.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_057.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_058.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_059.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_060.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_061.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_062.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_063.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_064.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_065.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_066.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_067.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_068.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_069.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_070.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_071.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_072.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_073.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_074.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_075.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_076.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_077.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_078.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_079.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_080.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_081.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_082.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_083.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_084.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_085.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_086.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_087.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_088.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_089.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_090.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_091.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_092.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_093.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_094.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_095.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_096.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_097.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_098.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_099.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_100.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_101.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_102.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_103.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_104.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_105.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_106.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_107.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_108.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160103_external_functions/NegSem_160103_external_functions_001.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160103_external_functions/Sem_160103_external_functions_001.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160103_external_functions/Sem_160103_external_functions_002.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_001.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_002.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_003.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_004.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_005.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_006.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_007.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_008.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_009.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_010.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_011.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_012.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_013.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_014.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_015.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_016.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_017.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_018.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_019.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_020.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_021.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_022.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_023.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_024.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_025.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_026.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_027.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_028.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_029.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_030.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_031.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_032.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_033.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_034.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_035.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_036.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_037.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_038.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_039.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_040.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_041.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_042.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_043.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_044.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_045.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_046.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_047.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_048.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_049.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_050.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_051.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_052.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_053.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_054.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_055.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_056.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_057.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_058.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_059.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_060.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_061.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_062.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_063.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_064.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_065.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_066.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_067.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_068.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_069.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_070.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_071.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_072.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_073.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_074.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_075.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_076.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_077.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_078.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_079.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_080.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_081.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_082.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_083.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_084.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_085.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_086.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_087.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_088.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_089.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_090.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_091.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_092.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_093.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_094.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_095.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_096.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_097.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_098.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_099.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_100.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_101.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_102.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_103.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_104.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_105.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_106.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_107.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_108.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_109.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_110.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_111.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_112.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_113.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_114.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_115.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_116.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_117.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_118.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_119.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_120.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_121.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_122.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_123.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_124.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_125.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_126.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_127.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_128.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_129.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_130.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_131.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_132.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_133.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_134.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_135.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_136.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_137.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_138.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_139.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_140.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_141.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_142.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_143.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_144.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_145.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_146.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_147.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_148.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_149.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_150.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_151.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_152.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_153.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_154.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_155.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_156.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_157.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_158.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_159.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_160.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_161.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_162.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_163.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_164.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_165.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_166.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_167.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_168.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_169.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_170.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_171.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_172.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_173.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_174.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_175.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_176.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_177.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_178.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_179.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_180.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_181.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_182.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_183.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_184.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_185.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_186.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_187.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_188.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_189.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_190.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_191.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_192.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_193.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_194.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_195.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_196.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_197.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_198.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_199.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_200.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_201.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_202.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_203.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_204.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_205.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_206.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_207.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_208.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_209.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_210.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_211.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_212.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_213.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_214.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_215.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_216.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_217.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_218.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_219.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_220.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_221.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_222.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_223.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_224.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_225.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_226.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_227.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_228.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_229.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_230.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_231.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_232.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_233.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_234.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_235.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_236.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_237.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_238.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_239.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_240.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_241.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_242.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_243.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_244.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_245.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_246.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_247.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_248.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_249.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_250.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_251.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_252.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_253.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_254.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_255.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_256.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_257.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_258.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_259.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_260.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_261.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_262.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_263.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_264.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_265.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_266.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_267.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_268.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_269.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_270.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_271.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_272.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_273.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_274.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_275.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_276.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_277.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_278.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_279.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_280.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_281.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_282.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_283.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_284.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_285.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_286.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_287.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_288.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_289.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_290.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_291.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_292.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_293.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_294.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_295.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_296.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_297.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_298.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_299.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_300.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_301.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_302.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_303.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_304.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_305.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_306.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_307.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_308.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_309.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_310.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_311.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_312.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_313.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_314.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_315.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_316.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_317.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_318.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_319.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_320.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_321.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_322.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_323.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_324.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_325.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/1601_toplevel/NegSem_1601_toplevel_001.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/1601_toplevel/NegSem_1601_toplevel_002.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/1601_toplevel/NegSem_1601_toplevel_003.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/1601_toplevel/NegSem_1601_toplevel_004.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/1601_toplevel/NegSem_1601_toplevel_005.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/1601_toplevel/NegSem_1601_toplevel_006.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/1601_toplevel/Sem_1601_toplevel_001.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/1601_toplevel/Sem_1601_toplevel_002.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1601_functions/1601_toplevel/Sem_1601_toplevel_003.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/160201_invoking_altsteps/NegSem_160201_invoking_altsteps_001.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/160201_invoking_altsteps/Sem_160201_invoking_altsteps_001.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/160201_invoking_altsteps/Sem_160201_invoking_altsteps_002.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/160201_invoking_altsteps/Sem_160201_invoking_altsteps_003.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/160201_invoking_altsteps/Sem_160201_invoking_altsteps_004.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_001.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_002.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_003.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_004.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_005.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_006.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_007.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_008.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_009.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_010.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_011.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_012.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_013.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_014.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_015.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_016.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_017.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_018.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_019.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_020.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_021.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_022.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_023.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_024.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_025.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_026.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_027.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_028.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_029.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_030.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_031.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_032.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_033.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_034.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_035.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_036.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_037.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_038.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_039.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_040.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_041.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_042.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_043.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_044.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_045.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_046.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_047.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_048.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_049.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_050.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_051.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_052.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSyn_1602_toplevel_001.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/Sem_1602_toplevel_001.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/Sem_1602_toplevel_002.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/Sem_1602_toplevel_003.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1603_testcases/NegSem_1603_testcases_001.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1603_testcases/NegSem_1603_testcases_002.ttcn create mode 100644 ATS/core_language/16_functions_altsteps_testcases/1603_testcases/Syn_1603_testcases_001.ttcn create mode 100644 ATS/core_language/18_overview_program_statements_and_operations/NOTES create mode 100644 ATS/core_language/19_basic_program_statements/1901_assignments/NegSem_1901_assignments_001.ttcn create mode 100644 ATS/core_language/19_basic_program_statements/1901_assignments/NegSem_1901_assignments_002.ttcn create mode 100644 ATS/core_language/19_basic_program_statements/1901_assignments/NegSem_1901_assignments_003.ttcn create mode 100644 ATS/core_language/19_basic_program_statements/1901_assignments/NegSem_1901_assignments_004.ttcn create mode 100644 ATS/core_language/19_basic_program_statements/1901_assignments/NegSem_1901_assignments_005.ttcn create mode 100644 ATS/core_language/19_basic_program_statements/1901_assignments/NegSem_1901_assignments_006.ttcn create mode 100644 ATS/core_language/19_basic_program_statements/1901_assignments/NegSyn_1901_assignments_001.ttcn create mode 100644 ATS/core_language/19_basic_program_statements/1901_assignments/Sem_1901_assignments_001.ttcn create mode 100644 ATS/core_language/19_basic_program_statements/1901_assignments/Sem_1901_assignments_002.ttcn create mode 100644 ATS/core_language/19_basic_program_statements/1901_assignments/Sem_1901_assignments_003.ttcn create mode 100644 ATS/core_language/19_basic_program_statements/1901_assignments/Sem_1901_assignments_004.ttcn create mode 100644 ATS/core_language/19_basic_program_statements/1902_if_else_statement/NegSyn_1902_if_else_statement_001.ttcn create mode 100644 ATS/core_language/19_basic_program_statements/1902_if_else_statement/Sem_1902_if_else_statement_001.ttcn create mode 100644 ATS/core_language/19_basic_program_statements/1902_if_else_statement/Sem_1902_if_else_statement_002.ttcn create mode 100644 ATS/core_language/19_basic_program_statements/1903_select_statements/190301_select_case_statement/NegSem_190301_select_case_statement_001.ttcn create mode 100644 ATS/core_language/19_basic_program_statements/1903_select_statements/190301_select_case_statement/NegSem_190301_select_case_statement_002.ttcn create mode 100644 ATS/core_language/19_basic_program_statements/1903_select_statements/190301_select_case_statement/Sem_190301_select_case_statement_001.ttcn create mode 100644 ATS/core_language/19_basic_program_statements/1903_select_statements/190301_select_case_statement/Sem_190301_select_case_statement_002.ttcn create mode 100644 ATS/core_language/19_basic_program_statements/1903_select_statements/190301_select_case_statement/Sem_190301_select_case_statement_003.ttcn create mode 100644 ATS/core_language/19_basic_program_statements/1903_select_statements/190301_select_case_statement/Sem_190301_select_case_statement_004.ttcn create mode 100644 ATS/core_language/19_basic_program_statements/1903_select_statements/190301_select_case_statement/Sem_190301_select_case_statement_005.ttcn create mode 100644 ATS/core_language/19_basic_program_statements/1903_select_statements/190301_select_case_statement/Sem_190301_select_case_statement_006.ttcn create mode 100644 ATS/core_language/19_basic_program_statements/1903_select_statements/190302_select_union_statement/NegSem_190302_select_union_statement_001.ttcn create mode 100644 ATS/core_language/19_basic_program_statements/1903_select_statements/190302_select_union_statement/NegSem_190302_select_union_statement_002.ttcn create mode 100644 ATS/core_language/19_basic_program_statements/1903_select_statements/190302_select_union_statement/NegSem_190302_select_union_statement_003.ttcn create mode 100644 ATS/core_language/19_basic_program_statements/1903_select_statements/190302_select_union_statement/NegSem_190302_select_union_statement_004.ttcn create mode 100644 ATS/core_language/19_basic_program_statements/1903_select_statements/190302_select_union_statement/NegSem_190302_select_union_statement_005.ttcn create mode 100644 ATS/core_language/19_basic_program_statements/1903_select_statements/190302_select_union_statement/NegSem_190302_select_union_statement_006.ttcn create mode 100644 ATS/core_language/19_basic_program_statements/1903_select_statements/190302_select_union_statement/Sem_190302_select_union_statement_001.ttcn create mode 100644 ATS/core_language/19_basic_program_statements/1903_select_statements/190302_select_union_statement/Sem_190302_select_union_statement_002.ttcn create mode 100644 ATS/core_language/19_basic_program_statements/1903_select_statements/190302_select_union_statement/Sem_190302_select_union_statement_003.ttcn create mode 100644 ATS/core_language/19_basic_program_statements/1903_select_statements/190302_select_union_statement/Sem_190302_select_union_statement_004.ttcn create mode 100644 ATS/core_language/19_basic_program_statements/1903_select_statements/190302_select_union_statement/Sem_190302_select_union_statement_005.ttcn create mode 100644 ATS/core_language/19_basic_program_statements/1903_select_statements/190302_select_union_statement/Sem_190302_select_union_statement_006.ttcn create mode 100644 ATS/core_language/19_basic_program_statements/1904_for_statement/NegSem_1904_for_statement_001.ttcn create mode 100644 ATS/core_language/19_basic_program_statements/1904_for_statement/Sem_1904_for_statement_001.ttcn create mode 100644 ATS/core_language/19_basic_program_statements/1904_for_statement/Sem_1904_for_statement_002.ttcn create mode 100644 ATS/core_language/19_basic_program_statements/1904_for_statement/Sem_1904_for_statement_003.ttcn create mode 100644 ATS/core_language/19_basic_program_statements/1905_while_statement/NegSem_1905_while_statement_001.ttcn create mode 100644 ATS/core_language/19_basic_program_statements/1905_while_statement/Sem_1905_while_statement_001.ttcn create mode 100644 ATS/core_language/19_basic_program_statements/1905_while_statement/Sem_1905_while_statement_002.ttcn create mode 100644 ATS/core_language/19_basic_program_statements/1905_while_statement/Sem_1905_while_statement_003.ttcn create mode 100644 ATS/core_language/19_basic_program_statements/1906_do_while_statement/NegSem_1906_do_while_statement_001.ttcn create mode 100644 ATS/core_language/19_basic_program_statements/1906_do_while_statement/Sem_1906_do_while_statement_001.ttcn create mode 100644 ATS/core_language/19_basic_program_statements/1906_do_while_statement/Sem_1906_do_while_statement_002.ttcn create mode 100644 ATS/core_language/19_basic_program_statements/1906_do_while_statement/Sem_1906_do_while_statement_003.ttcn create mode 100644 ATS/core_language/19_basic_program_statements/1907_label_statement/NegSem_1907_label_statement_001.ttcn create mode 100644 ATS/core_language/19_basic_program_statements/1907_label_statement/NegSyn_1907_label_statement_001.ttcn create mode 100644 ATS/core_language/19_basic_program_statements/1907_label_statement/NegSyn_1907_label_statement_002.ttcn create mode 100644 ATS/core_language/19_basic_program_statements/1907_label_statement/Syn_1907_label_statement_001.ttcn create mode 100644 ATS/core_language/19_basic_program_statements/1908_goto_statement/NegSem_1908_goto_statement_001.ttcn create mode 100644 ATS/core_language/19_basic_program_statements/1908_goto_statement/NegSem_1908_goto_statement_002.ttcn create mode 100644 ATS/core_language/19_basic_program_statements/1908_goto_statement/NegSem_1908_goto_statement_003.ttcn create mode 100644 ATS/core_language/19_basic_program_statements/1908_goto_statement/Sem_1908_goto_statement_001.ttcn create mode 100644 ATS/core_language/19_basic_program_statements/1908_goto_statement/Sem_1908_goto_statement_002.ttcn create mode 100644 ATS/core_language/19_basic_program_statements/1908_goto_statement/Sem_1908_goto_statement_003.ttcn create mode 100644 ATS/core_language/19_basic_program_statements/1909_stop_statement/Sem_1909_stop_statement_001.ttcn create mode 100644 ATS/core_language/19_basic_program_statements/1909_stop_statement/Sem_1909_stop_statement_002.ttcn create mode 100644 ATS/core_language/19_basic_program_statements/1909_stop_statement/Sem_1909_stop_statement_003.ttcn create mode 100644 ATS/core_language/19_basic_program_statements/1909_stop_statement/Sem_1909_stop_statement_004.ttcn create mode 100644 ATS/core_language/19_basic_program_statements/1910_return_statement/NOTES create mode 100644 ATS/core_language/19_basic_program_statements/1910_return_statement/NegSem_1910_return_statement_001.ttcn create mode 100644 ATS/core_language/19_basic_program_statements/1910_return_statement/Sem_1910_return_statement_001.ttcn create mode 100644 ATS/core_language/19_basic_program_statements/1910_return_statement/Sem_1910_return_statement_002.ttcn create mode 100644 ATS/core_language/19_basic_program_statements/1911_log_statement/NegSem_1911_log_statement_001.ttcn create mode 100644 ATS/core_language/19_basic_program_statements/1911_log_statement/Sem_1911_log_statement_001.ttcn create mode 100644 ATS/core_language/19_basic_program_statements/1911_log_statement/Sem_1911_log_statement_002.ttcn create mode 100644 ATS/core_language/19_basic_program_statements/1911_log_statement/Sem_1911_log_statement_003.ttcn create mode 100644 ATS/core_language/19_basic_program_statements/1911_log_statement/Sem_1911_log_statement_004.ttcn create mode 100644 ATS/core_language/19_basic_program_statements/1911_log_statement/Sem_1911_log_statement_005.ttcn create mode 100644 ATS/core_language/19_basic_program_statements/1912_break_statement/NOTES create mode 100644 ATS/core_language/19_basic_program_statements/1913_continue_statement/Sem_1913_continue_statement_001.ttcn create mode 100644 ATS/core_language/19_basic_program_statements/1914_statement_block/NOTES create mode 100644 ATS/core_language/20_statement_and_operations_for_alt/2001_the_snapshot_mechanism/NOTES create mode 100644 ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NOTES create mode 100644 ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_001.ttcn create mode 100644 ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_002.ttcn create mode 100644 ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_003.ttcn create mode 100644 ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_004.ttcn create mode 100644 ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_005.ttcn create mode 100644 ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_006.ttcn create mode 100644 ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_007.ttcn create mode 100644 ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_008.ttcn create mode 100644 ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_009.ttcn create mode 100644 ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_010.ttcn create mode 100644 ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_011.ttcn create mode 100644 ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_012.ttcn create mode 100644 ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_013.ttcn create mode 100644 ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_014.ttcn create mode 100644 ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_015.ttcn create mode 100644 ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_016.ttcn create mode 100644 ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_017.ttcn create mode 100644 ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_018.ttcn create mode 100644 ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_019.ttcn create mode 100644 ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_020.ttcn create mode 100644 ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_021.ttcn create mode 100644 ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_022.ttcn create mode 100644 ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_023.ttcn create mode 100644 ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_024.ttcn create mode 100644 ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_025.ttcn create mode 100644 ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_026.ttcn create mode 100644 ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_027.ttcn create mode 100644 ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_028.ttcn create mode 100644 ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_029.ttcn create mode 100644 ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_030.ttcn create mode 100644 ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_031.ttcn create mode 100644 ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_032.ttcn create mode 100644 ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_033.ttcn create mode 100644 ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_034.ttcn create mode 100644 ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_035.ttcn create mode 100644 ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_036.ttcn create mode 100644 ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_037.ttcn create mode 100644 ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_038.ttcn create mode 100644 ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_039.ttcn create mode 100644 ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_040.ttcn create mode 100644 ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_041.ttcn create mode 100644 ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_042.ttcn create mode 100644 ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_043.ttcn create mode 100644 ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_044.ttcn create mode 100644 ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_045.ttcn create mode 100644 ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_046.ttcn create mode 100644 ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_047.ttcn create mode 100644 ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_048.ttcn create mode 100644 ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_049.ttcn create mode 100644 ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_050.ttcn create mode 100644 ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_051.ttcn create mode 100644 ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_052.ttcn create mode 100644 ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_053.ttcn create mode 100644 ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_054.ttcn create mode 100644 ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_055.ttcn create mode 100644 ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_056.ttcn create mode 100644 ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_057.ttcn create mode 100644 ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_058.ttcn create mode 100644 ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_059.ttcn create mode 100644 ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_060.ttcn create mode 100644 ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_061.ttcn create mode 100644 ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_062.ttcn create mode 100644 ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_063.ttcn create mode 100644 ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_064.ttcn create mode 100644 ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_065.ttcn create mode 100644 ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_066.ttcn create mode 100644 ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_067.ttcn create mode 100644 ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_068.ttcn create mode 100644 ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_069.ttcn create mode 100644 ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_070.ttcn create mode 100644 ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_071.ttcn create mode 100644 ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_072.ttcn create mode 100644 ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_073.ttcn create mode 100644 ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_074.ttcn create mode 100644 ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_075.ttcn create mode 100644 ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_076.ttcn create mode 100644 ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_077.ttcn create mode 100644 ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_078.ttcn create mode 100644 ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_079.ttcn create mode 100644 ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_080.ttcn create mode 100644 ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_081.ttcn create mode 100644 ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_082.ttcn create mode 100644 ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_083.ttcn create mode 100644 ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_084.ttcn create mode 100644 ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_085.ttcn create mode 100644 ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_086.ttcn create mode 100644 ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_087.ttcn create mode 100644 ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_088.ttcn create mode 100644 ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_089.ttcn create mode 100644 ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_090.ttcn create mode 100644 ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/Sem_2002_TheAltStatement_001.ttcn create mode 100644 ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/Sem_2002_TheAltStatement_002.ttcn create mode 100644 ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/Sem_2002_TheAltStatement_003.ttcn create mode 100644 ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/Sem_2002_TheAltStatement_004.ttcn create mode 100644 ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/Sem_2002_TheAltStatement_005.ttcn create mode 100644 ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/Sem_2002_TheAltStatement_006.ttcn create mode 100644 ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/Sem_2002_TheAltStatement_007.ttcn create mode 100644 ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/Sem_2002_TheAltStatement_008.ttcn create mode 100644 ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/Sem_2002_TheAltStatement_009.ttcn create mode 100644 ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/Sem_2002_TheAltStatement_010.ttcn create mode 100644 ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/Sem_2002_TheAltStatement_011.ttcn create mode 100644 ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/Sem_2002_TheAltStatement_012.ttcn create mode 100644 ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/Sem_2002_TheAltStatement_013.ttcn create mode 100644 ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/Sem_2002_TheAltStatement_014.ttcn create mode 100644 ATS/core_language/20_statement_and_operations_for_alt/2003_the_repeat_statement/NegSem_2003_the_repeat_statement_001.ttcn create mode 100644 ATS/core_language/20_statement_and_operations_for_alt/2003_the_repeat_statement/Sem_2003_the_repeat_statement_001.ttcn create mode 100644 ATS/core_language/20_statement_and_operations_for_alt/2003_the_repeat_statement/Sem_2003_the_repeat_statement_002.ttcn create mode 100644 ATS/core_language/20_statement_and_operations_for_alt/2003_the_repeat_statement/Sem_2003_the_repeat_statement_003.ttcn create mode 100644 ATS/core_language/20_statement_and_operations_for_alt/2003_the_repeat_statement/Sem_2003_the_repeat_statement_004.ttcn create mode 100644 ATS/core_language/20_statement_and_operations_for_alt/2004_the_interleave_statement/NegSem_2004_InterleaveStatement_001.ttcn create mode 100644 ATS/core_language/20_statement_and_operations_for_alt/2004_the_interleave_statement/NegSem_2004_InterleaveStatement_002.ttcn create mode 100644 ATS/core_language/20_statement_and_operations_for_alt/2004_the_interleave_statement/NegSem_2004_InterleaveStatement_003.ttcn create mode 100644 ATS/core_language/20_statement_and_operations_for_alt/2004_the_interleave_statement/NegSem_2004_InterleaveStatement_004.ttcn create mode 100644 ATS/core_language/20_statement_and_operations_for_alt/2004_the_interleave_statement/NegSem_2004_InterleaveStatement_005.ttcn create mode 100644 ATS/core_language/20_statement_and_operations_for_alt/2004_the_interleave_statement/NegSem_2004_InterleaveStatement_006.ttcn create mode 100644 ATS/core_language/20_statement_and_operations_for_alt/2004_the_interleave_statement/NegSem_2004_InterleaveStatement_008.ttcn create mode 100644 ATS/core_language/20_statement_and_operations_for_alt/2004_the_interleave_statement/NegSem_2004_InterleaveStatement_010.ttcn create mode 100644 ATS/core_language/20_statement_and_operations_for_alt/2004_the_interleave_statement/NegSem_2004_InterleaveStatement_011.ttcn create mode 100644 ATS/core_language/20_statement_and_operations_for_alt/2004_the_interleave_statement/NegSem_2004_InterleaveStatement_012.ttcn create mode 100644 ATS/core_language/20_statement_and_operations_for_alt/2004_the_interleave_statement/NegSem_2004_InterleaveStatement_013.ttcn create mode 100644 ATS/core_language/20_statement_and_operations_for_alt/2004_the_interleave_statement/NegSyn_2004_InterleaveStatement_001.ttcn create mode 100644 ATS/core_language/20_statement_and_operations_for_alt/2004_the_interleave_statement/NegSyn_2004_InterleaveStatement_002.ttcn create mode 100644 ATS/core_language/20_statement_and_operations_for_alt/2004_the_interleave_statement/Sem_2004_InterleaveStatement_001.ttcn create mode 100644 ATS/core_language/20_statement_and_operations_for_alt/2004_the_interleave_statement/Sem_2004_InterleaveStatement_002.ttcn create mode 100644 ATS/core_language/20_statement_and_operations_for_alt/2004_the_interleave_statement/Sem_2004_InterleaveStatement_003.ttcn create mode 100644 ATS/core_language/20_statement_and_operations_for_alt/2004_the_interleave_statement/Sem_2004_InterleaveStatement_004.ttcn create mode 100644 ATS/core_language/20_statement_and_operations_for_alt/2004_the_interleave_statement/Sem_2004_InterleaveStatement_005.ttcn create mode 100644 ATS/core_language/20_statement_and_operations_for_alt/2004_the_interleave_statement/Sem_2004_InterleaveStatement_006.ttcn create mode 100644 ATS/core_language/20_statement_and_operations_for_alt/2004_the_interleave_statement/Sem_2004_InterleaveStatement_007.ttcn create mode 100644 ATS/core_language/20_statement_and_operations_for_alt/2004_the_interleave_statement/Sem_2004_InterleaveStatement_008.ttcn create mode 100644 ATS/core_language/20_statement_and_operations_for_alt/2004_the_interleave_statement/Sem_2004_InterleaveStatement_009.ttcn create mode 100644 ATS/core_language/20_statement_and_operations_for_alt/2004_the_interleave_statement/Sem_2004_InterleaveStatement_010.ttcn create mode 100644 ATS/core_language/20_statement_and_operations_for_alt/2004_the_interleave_statement/Syn_2004_InterleaveStatement_001.ttcn create mode 100644 ATS/core_language/20_statement_and_operations_for_alt/2005_default_handling/200501_the_default_mechanism/NegSem_200501_the_default_mechanism_001.ttcn create mode 100644 ATS/core_language/20_statement_and_operations_for_alt/2005_default_handling/200501_the_default_mechanism/Sem_200501_the_default_mechanism_001.ttcn create mode 100644 ATS/core_language/20_statement_and_operations_for_alt/2005_default_handling/200501_the_default_mechanism/Sem_200501_the_default_mechanism_002.ttcn create mode 100644 ATS/core_language/20_statement_and_operations_for_alt/2005_default_handling/200501_the_default_mechanism/Sem_200501_the_default_mechanism_003.ttcn create mode 100644 ATS/core_language/20_statement_and_operations_for_alt/2005_default_handling/200501_the_default_mechanism/Sem_200501_the_default_mechanism_004.ttcn create mode 100644 ATS/core_language/20_statement_and_operations_for_alt/2005_default_handling/200501_the_default_mechanism/Sem_200501_the_default_mechanism_005.ttcn create mode 100644 ATS/core_language/20_statement_and_operations_for_alt/2005_default_handling/200501_the_default_mechanism/Sem_200501_the_default_mechanism_006.ttcn create mode 100644 ATS/core_language/20_statement_and_operations_for_alt/2005_default_handling/200501_the_default_mechanism/Sem_200501_the_default_mechanism_007.ttcn create mode 100644 ATS/core_language/20_statement_and_operations_for_alt/2005_default_handling/200501_the_default_mechanism/Sem_200501_the_default_mechanism_008.ttcn create mode 100644 ATS/core_language/20_statement_and_operations_for_alt/2005_default_handling/200502_the_activate_operation/NegSem_200502_the_activate_operation_001.ttcn create mode 100644 ATS/core_language/20_statement_and_operations_for_alt/2005_default_handling/200502_the_activate_operation/NegSem_200502_the_activate_operation_002.ttcn create mode 100644 ATS/core_language/20_statement_and_operations_for_alt/2005_default_handling/200502_the_activate_operation/NegSem_200502_the_activate_operation_003.ttcn create mode 100644 ATS/core_language/20_statement_and_operations_for_alt/2005_default_handling/200502_the_activate_operation/NegSem_200502_the_activate_operation_004.ttcn create mode 100644 ATS/core_language/20_statement_and_operations_for_alt/2005_default_handling/200502_the_activate_operation/NegSem_200502_the_activate_operation_005.ttcn create mode 100644 ATS/core_language/20_statement_and_operations_for_alt/2005_default_handling/200502_the_activate_operation/NegSem_200502_the_activate_operation_006.ttcn create mode 100644 ATS/core_language/20_statement_and_operations_for_alt/2005_default_handling/200502_the_activate_operation/NegSem_200502_the_activate_operation_007.ttcn create mode 100644 ATS/core_language/20_statement_and_operations_for_alt/2005_default_handling/200502_the_activate_operation/Sem_200502_the_activate_operation_001.ttcn create mode 100644 ATS/core_language/20_statement_and_operations_for_alt/2005_default_handling/200502_the_activate_operation/Sem_200502_the_activate_operation_002.ttcn create mode 100644 ATS/core_language/20_statement_and_operations_for_alt/2005_default_handling/200502_the_activate_operation/Sem_200502_the_activate_operation_003.ttcn create mode 100644 ATS/core_language/20_statement_and_operations_for_alt/2005_default_handling/200502_the_activate_operation/Sem_200502_the_activate_operation_004.ttcn create mode 100644 ATS/core_language/20_statement_and_operations_for_alt/2005_default_handling/200502_the_activate_operation/Sem_200502_the_activate_operation_005.ttcn create mode 100644 ATS/core_language/20_statement_and_operations_for_alt/2005_default_handling/200502_the_activate_operation/Sem_200502_the_activate_operation_006.ttcn create mode 100644 ATS/core_language/20_statement_and_operations_for_alt/2005_default_handling/200503_the_deactivate_operation/NegSem_200503_the_deactivate_operation_001.ttcn create mode 100644 ATS/core_language/20_statement_and_operations_for_alt/2005_default_handling/200503_the_deactivate_operation/NegSem_200503_the_deactivate_operation_002.ttcn create mode 100644 ATS/core_language/20_statement_and_operations_for_alt/2005_default_handling/200503_the_deactivate_operation/NegSem_200503_the_deactivate_operation_003.ttcn create mode 100644 ATS/core_language/20_statement_and_operations_for_alt/2005_default_handling/200503_the_deactivate_operation/Sem_200503_the_deactivate_operation_001.ttcn create mode 100644 ATS/core_language/20_statement_and_operations_for_alt/2005_default_handling/200503_the_deactivate_operation/Sem_200503_the_deactivate_operation_002.ttcn create mode 100644 ATS/core_language/20_statement_and_operations_for_alt/2005_default_handling/200503_the_deactivate_operation/Sem_200503_the_deactivate_operation_003.ttcn create mode 100644 ATS/core_language/20_statement_and_operations_for_alt/2005_default_handling/200503_the_deactivate_operation/Sem_200503_the_deactivate_operation_004.ttcn create mode 100644 ATS/core_language/20_statement_and_operations_for_alt/20_toplevel/Syn_20_TopLevel_001.ttcn create mode 100644 ATS/core_language/20_statement_and_operations_for_alt/20_toplevel/Syn_20_TopLevel_002.ttcn create mode 100644 ATS/core_language/20_statement_and_operations_for_alt/20_toplevel/Syn_20_TopLevel_003.ttcn create mode 100644 ATS/core_language/20_statement_and_operations_for_alt/20_toplevel/Syn_20_TopLevel_004.ttcn create mode 100644 ATS/core_language/20_statement_and_operations_for_alt/20_toplevel/Syn_20_TopLevel_005.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2101_connection_operations/210101_connect_and_map_operations/NOTES create mode 100644 ATS/core_language/21_configuration_operations/2101_connection_operations/210101_connect_and_map_operations/NegSem_210101_connect_and_map_operations_001.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2101_connection_operations/210101_connect_and_map_operations/NegSem_210101_connect_and_map_operations_002.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2101_connection_operations/210101_connect_and_map_operations/NegSem_210101_connect_and_map_operations_003.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2101_connection_operations/210101_connect_and_map_operations/NegSem_210101_connect_and_map_operations_004.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2101_connection_operations/210101_connect_and_map_operations/NegSem_210101_connect_and_map_operations_005.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2101_connection_operations/210101_connect_and_map_operations/NegSem_210101_connect_and_map_operations_006.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2101_connection_operations/210101_connect_and_map_operations/NegSem_210101_connect_and_map_operations_007.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2101_connection_operations/210101_connect_and_map_operations/NegSem_210101_connect_and_map_operations_008.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2101_connection_operations/210101_connect_and_map_operations/NegSem_210101_connect_and_map_operations_009.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2101_connection_operations/210101_connect_and_map_operations/NegSem_210101_connect_and_map_operations_010.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2101_connection_operations/210101_connect_and_map_operations/NegSem_210101_connect_and_map_operations_011.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2101_connection_operations/210101_connect_and_map_operations/NegSem_210101_connect_and_map_operations_012.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2101_connection_operations/210101_connect_and_map_operations/NegSem_210101_connect_and_map_operations_013.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2101_connection_operations/210101_connect_and_map_operations/NegSem_210101_connect_and_map_operations_014.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2101_connection_operations/210101_connect_and_map_operations/NegSem_210101_connect_operation_001.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2101_connection_operations/210101_connect_and_map_operations/NegSem_210101_map_operation_002.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2101_connection_operations/210101_connect_and_map_operations/Sem_210101_connect_and_map_operations_001.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2101_connection_operations/210101_connect_and_map_operations/Sem_210101_connect_and_map_operations_002.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2101_connection_operations/210101_connect_and_map_operations/Sem_210101_connect_and_map_operations_003.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2101_connection_operations/210101_connect_and_map_operations/Sem_210101_connect_and_map_operations_004.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2101_connection_operations/210101_connect_and_map_operations/Sem_210101_connect_and_map_operations_005.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2101_connection_operations/210101_connect_and_map_operations/Sem_210101_connect_and_map_operations_006.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2101_connection_operations/210101_connect_and_map_operations/Sem_210101_connect_and_map_operations_007.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2101_connection_operations/210101_connect_and_map_operations/Sem_210101_connect_and_map_operations_008.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2101_connection_operations/210101_connect_and_map_operations/Sem_210101_connect_and_map_operations_009.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2101_connection_operations/210101_connect_and_map_operations/Sem_210101_connect_and_map_operations_010.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2101_connection_operations/210101_connect_and_map_operations/Sem_210101_connect_and_map_operations_011.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2101_connection_operations/210101_connect_and_map_operations/Sem_210101_connect_and_map_operations_012.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2101_connection_operations/210102_disconnect_and_unmap_operations/NegSem_210102_disconnect_and_unmap_operations_001.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2101_connection_operations/210102_disconnect_and_unmap_operations/NegSem_210102_disconnect_and_unmap_operations_002.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2101_connection_operations/210102_disconnect_and_unmap_operations/NegSem_210102_disconnect_and_unmap_operations_003.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2101_connection_operations/210102_disconnect_and_unmap_operations/NegSem_210102_disconnect_and_unmap_operations_004.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2101_connection_operations/210102_disconnect_and_unmap_operations/NegSem_210102_disconnect_and_unmap_operations_005.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2101_connection_operations/210102_disconnect_and_unmap_operations/NegSem_210102_disconnect_and_unmap_operations_006.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2101_connection_operations/210102_disconnect_and_unmap_operations/NegSem_210102_disconnect_and_unmap_operations_007.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2101_connection_operations/210102_disconnect_and_unmap_operations/NegSem_210102_disconnect_and_unmap_operations_008.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2101_connection_operations/210102_disconnect_and_unmap_operations/NegSem_210102_disconnect_and_unmap_operations_009.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2101_connection_operations/210102_disconnect_and_unmap_operations/NegSem_210102_disconnect_and_unmap_operations_010.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2101_connection_operations/210102_disconnect_and_unmap_operations/NegSem_210102_disconnect_and_unmap_operations_011.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2101_connection_operations/210102_disconnect_and_unmap_operations/NegSem_210102_disconnect_and_unmap_operations_012.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2101_connection_operations/210102_disconnect_and_unmap_operations/NegSem_210102_disconnect_and_unmap_operations_013.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2101_connection_operations/210102_disconnect_and_unmap_operations/NegSem_210102_disconnect_and_unmap_operations_014.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2101_connection_operations/210102_disconnect_and_unmap_operations/Sem_210102_disconnect_and_unmap_operations_001.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2101_connection_operations/210102_disconnect_and_unmap_operations/Sem_210102_disconnect_and_unmap_operations_002.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2101_connection_operations/210102_disconnect_and_unmap_operations/Sem_210102_disconnect_and_unmap_operations_003.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2101_connection_operations/210102_disconnect_and_unmap_operations/Sem_210102_disconnect_and_unmap_operations_004.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2101_connection_operations/210102_disconnect_and_unmap_operations/Sem_210102_disconnect_and_unmap_operations_005.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2101_connection_operations/210102_disconnect_and_unmap_operations/Sem_210102_disconnect_and_unmap_operations_006.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2101_connection_operations/210102_disconnect_and_unmap_operations/Sem_210102_disconnect_and_unmap_operations_007.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2101_connection_operations/210102_disconnect_and_unmap_operations/Sem_210102_disconnect_and_unmap_operations_008.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2101_connection_operations/210102_disconnect_and_unmap_operations/Sem_210102_disconnect_and_unmap_operations_009.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2101_connection_operations/210102_disconnect_and_unmap_operations/Sem_210102_disconnect_and_unmap_operations_010.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2101_connection_operations/210102_disconnect_and_unmap_operations/Sem_210102_disconnect_and_unmap_operations_011.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2101_connection_operations/210102_disconnect_and_unmap_operations/Sem_210102_disconnect_and_unmap_operations_012.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2101_connection_operations/210102_disconnect_and_unmap_operations/Sem_210102_disconnect_and_unmap_operations_013.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2101_connection_operations/210102_disconnect_and_unmap_operations/Sem_210102_disconnect_operation_001.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2101_connection_operations/210102_disconnect_and_unmap_operations/Sem_210102_disconnect_operation_002.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2101_connection_operations/210102_disconnect_and_unmap_operations/Sem_210102_disconnect_operation_003.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2101_connection_operations/210102_disconnect_and_unmap_operations/Sem_210102_unmap_operation_001.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2101_connection_operations/210102_disconnect_and_unmap_operations/Sem_210102_unmap_operation_002.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2101_connection_operations/2101_toplevel/NegSem_2101_TopLevel_001.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2101_connection_operations/2101_toplevel/NegSem_2101_TopLevel_002.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2102_test_case_operations/NegSem_2102_testcase_stop_001.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2103_test_component_operations/210301_create_operation/NegSem_210301_CreateOperation_001.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2103_test_component_operations/210301_create_operation/NegSem_210301_CreateOperation_002.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2103_test_component_operations/210301_create_operation/NegSem_210301_CreateOperation_003.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2103_test_component_operations/210301_create_operation/Sem_210301_CreateOperation_001.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2103_test_component_operations/210301_create_operation/Sem_210301_CreateOperation_002.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2103_test_component_operations/210301_create_operation/Sem_210301_CreateOperation_003.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2103_test_component_operations/210301_create_operation/Sem_210301_CreateOperation_004.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2103_test_component_operations/210301_create_operation/Syn_210301_CreateOperation_001.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2103_test_component_operations/210302_start_test_component/NegSem_210302_Start_test_component_001.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2103_test_component_operations/210302_start_test_component/NegSem_210302_Start_test_component_002.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2103_test_component_operations/210302_start_test_component/NegSem_210302_Start_test_component_004.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2103_test_component_operations/210302_start_test_component/NegSem_210302_Start_test_component_005.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2103_test_component_operations/210302_start_test_component/NegSem_210302_Start_test_component_006.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2103_test_component_operations/210302_start_test_component/NegSem_210302_Start_test_component_007.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2103_test_component_operations/210302_start_test_component/NegSem_210302_Start_test_component_008.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2103_test_component_operations/210302_start_test_component/NegSem_210302_Start_test_component_009.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2103_test_component_operations/210302_start_test_component/NegSem_210302_Start_test_component_010.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2103_test_component_operations/210302_start_test_component/NegSem_210302_Start_test_component_011.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2103_test_component_operations/210302_start_test_component/NegSem_210302_Start_test_component_012.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2103_test_component_operations/210302_start_test_component/Sem_210302_Start_test_component_001.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2103_test_component_operations/210302_start_test_component/Sem_210302_Start_test_component_002.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2103_test_component_operations/210302_start_test_component/Sem_210302_Start_test_component_003.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2103_test_component_operations/210302_start_test_component/Sem_210302_Start_test_component_004.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2103_test_component_operations/210302_start_test_component/Sem_210302_Start_test_component_005.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2103_test_component_operations/210302_start_test_component/Sem_210302_Start_test_component_006.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2103_test_component_operations/210302_start_test_component/Sem_210302_Start_test_component_007.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2103_test_component_operations/210302_start_test_component/Sem_210302_Start_test_component_008.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2103_test_component_operations/210302_start_test_component/Sem_210302_Start_test_component_009.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2103_test_component_operations/210302_start_test_component/Sem_210302_Start_test_component_010.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2103_test_component_operations/210302_start_test_component/Sem_210302_Start_test_component_011.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2103_test_component_operations/210302_start_test_component/Sem_210302_Start_test_component_012.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2103_test_component_operations/210302_start_test_component/Sem_210302_Start_test_component_013.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2103_test_component_operations/210302_start_test_component/Sem_210302_Start_test_component_014.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2103_test_component_operations/210303_stop_test_component/NegSem_210303_Stop_test_component_001.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2103_test_component_operations/210303_stop_test_component/NegSem_210303_Stop_test_component_002.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2103_test_component_operations/210303_stop_test_component/NegSem_210303_Stop_test_component_003.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2103_test_component_operations/210303_stop_test_component/NegSem_210303_Stop_test_component_004.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2103_test_component_operations/210303_stop_test_component/Sem_210303_Stop_test_component_001.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2103_test_component_operations/210303_stop_test_component/Sem_210303_Stop_test_component_002.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2103_test_component_operations/210303_stop_test_component/Sem_210303_Stop_test_component_003.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2103_test_component_operations/210303_stop_test_component/Sem_210303_Stop_test_component_004.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2103_test_component_operations/210303_stop_test_component/Sem_210303_Stop_test_component_005.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2103_test_component_operations/210303_stop_test_component/Sem_210303_Stop_test_component_006.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2103_test_component_operations/210303_stop_test_component/Sem_210303_Stop_test_component_007.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2103_test_component_operations/210303_stop_test_component/Sem_210303_Stop_test_component_008.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2103_test_component_operations/210303_stop_test_component/Sem_210303_Stop_test_component_009.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2103_test_component_operations/210303_stop_test_component/Sem_210303_Stop_test_component_010.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2103_test_component_operations/210303_stop_test_component/Sem_210303_Stop_test_component_011.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2103_test_component_operations/210304_kill_test_component_operation/NegSem_210304_kill_test_component_001.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2103_test_component_operations/210304_kill_test_component_operation/NegSem_210304_kill_test_component_002.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2103_test_component_operations/210304_kill_test_component_operation/NegSem_210304_kill_test_component_003.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2103_test_component_operations/210304_kill_test_component_operation/NegSem_210304_kill_test_component_004.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2103_test_component_operations/210304_kill_test_component_operation/NegSem_210304_kill_test_component_005.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2103_test_component_operations/210304_kill_test_component_operation/Sem_210304_kill_test_component_001.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2103_test_component_operations/210304_kill_test_component_operation/Sem_210304_kill_test_component_002.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2103_test_component_operations/210304_kill_test_component_operation/Sem_210304_kill_test_component_003.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2103_test_component_operations/210304_kill_test_component_operation/Sem_210304_kill_test_component_004.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2103_test_component_operations/210304_kill_test_component_operation/Sem_210304_kill_test_component_005.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2103_test_component_operations/210304_kill_test_component_operation/Sem_210304_kill_test_component_006.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2103_test_component_operations/210305_alive_operation/NegSem_210305_alive_operation_001.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2103_test_component_operations/210305_alive_operation/NegSem_210305_alive_operation_002.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2103_test_component_operations/210305_alive_operation/NegSem_210305_alive_operation_003.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2103_test_component_operations/210305_alive_operation/NegSem_210305_alive_operation_004.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2103_test_component_operations/210305_alive_operation/NegSem_210305_alive_operation_005.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2103_test_component_operations/210305_alive_operation/NegSem_210305_alive_operation_006.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2103_test_component_operations/210305_alive_operation/NegSyn_210305_alive_operation_001.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2103_test_component_operations/210305_alive_operation/NegSyn_210305_alive_operation_002.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2103_test_component_operations/210305_alive_operation/NegSyn_210305_alive_operation_003.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2103_test_component_operations/210305_alive_operation/NegSyn_210305_alive_operation_004.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2103_test_component_operations/210305_alive_operation/Sem_210305_alive_operation_001.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2103_test_component_operations/210305_alive_operation/Sem_210305_alive_operation_002.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2103_test_component_operations/210305_alive_operation/Sem_210305_alive_operation_003.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2103_test_component_operations/210305_alive_operation/Sem_210305_alive_operation_004.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2103_test_component_operations/210305_alive_operation/Sem_210305_alive_operation_005.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2103_test_component_operations/210305_alive_operation/Sem_210305_alive_operation_006.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2103_test_component_operations/210305_alive_operation/Sem_210305_alive_operation_007.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2103_test_component_operations/210305_alive_operation/Sem_210305_alive_operation_008.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2103_test_component_operations/210305_alive_operation/Sem_210305_alive_operation_009.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2103_test_component_operations/210305_alive_operation/Sem_210305_alive_operation_010.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2103_test_component_operations/210305_alive_operation/Sem_210305_alive_operation_011.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2103_test_component_operations/210305_alive_operation/Sem_210305_alive_operation_012.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2103_test_component_operations/210305_alive_operation/Sem_210305_alive_operation_013.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2103_test_component_operations/210305_alive_operation/Sem_210305_alive_operation_014.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2103_test_component_operations/210305_alive_operation/Sem_210305_alive_operation_015.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2103_test_component_operations/210306_running_operation/NegSem_210306_running_operation_001.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2103_test_component_operations/210306_running_operation/NegSem_210306_running_operation_002.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2103_test_component_operations/210306_running_operation/NegSem_210306_running_operation_003.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2103_test_component_operations/210306_running_operation/NegSem_210306_running_operation_004.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2103_test_component_operations/210306_running_operation/NegSem_210306_running_operation_005.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2103_test_component_operations/210306_running_operation/NegSem_210306_running_operation_006.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2103_test_component_operations/210306_running_operation/NegSyn_210306_running_operation_001.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2103_test_component_operations/210306_running_operation/NegSyn_210306_running_operation_002.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2103_test_component_operations/210306_running_operation/NegSyn_210306_running_operation_003.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2103_test_component_operations/210306_running_operation/NegSyn_210306_running_operation_004.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2103_test_component_operations/210306_running_operation/Sem_210306_running_operation_001.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2103_test_component_operations/210306_running_operation/Sem_210306_running_operation_002.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2103_test_component_operations/210306_running_operation/Sem_210306_running_operation_003.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2103_test_component_operations/210306_running_operation/Sem_210306_running_operation_004.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2103_test_component_operations/210306_running_operation/Sem_210306_running_operation_005.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2103_test_component_operations/210306_running_operation/Sem_210306_running_operation_006.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2103_test_component_operations/210306_running_operation/Sem_210306_running_operation_007.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2103_test_component_operations/210306_running_operation/Sem_210306_running_operation_008.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2103_test_component_operations/210306_running_operation/Sem_210306_running_operation_009.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2103_test_component_operations/210306_running_operation/Sem_210306_running_operation_010.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2103_test_component_operations/210306_running_operation/Sem_210306_running_operation_011.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2103_test_component_operations/210306_running_operation/Sem_210306_running_operation_012.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2103_test_component_operations/210306_running_operation/Sem_210306_running_operation_013.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2103_test_component_operations/210307_done_operation/NegSem_210307_done_operation_001.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2103_test_component_operations/210307_done_operation/NegSem_210307_done_operation_002.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2103_test_component_operations/210307_done_operation/NegSem_210307_done_operation_003.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2103_test_component_operations/210307_done_operation/NegSem_210307_done_operation_004.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2103_test_component_operations/210307_done_operation/NegSem_210307_done_operation_005.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2103_test_component_operations/210307_done_operation/NegSem_210307_done_operation_006.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2103_test_component_operations/210307_done_operation/NegSem_210307_done_operation_007.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2103_test_component_operations/210307_done_operation/NegSem_210307_done_operation_008.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2103_test_component_operations/210307_done_operation/NegSem_210307_done_operation_009.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2103_test_component_operations/210307_done_operation/NegSem_210307_done_operation_010.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2103_test_component_operations/210307_done_operation/NegSyn_210307_done_operation_001.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2103_test_component_operations/210307_done_operation/NegSyn_210307_done_operation_002.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2103_test_component_operations/210307_done_operation/NegSyn_210307_done_operation_003.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2103_test_component_operations/210307_done_operation/NegSyn_210307_done_operation_004.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2103_test_component_operations/210307_done_operation/Sem_210307_done_operation_001.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2103_test_component_operations/210307_done_operation/Sem_210307_done_operation_002.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2103_test_component_operations/210307_done_operation/Sem_210307_done_operation_003.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2103_test_component_operations/210307_done_operation/Sem_210307_done_operation_004.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2103_test_component_operations/210307_done_operation/Sem_210307_done_operation_005.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2103_test_component_operations/210307_done_operation/Sem_210307_done_operation_006.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2103_test_component_operations/210307_done_operation/Sem_210307_done_operation_007.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2103_test_component_operations/210307_done_operation/Sem_210307_done_operation_008.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2103_test_component_operations/210307_done_operation/Sem_210307_done_operation_009.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2103_test_component_operations/210307_done_operation/Sem_210307_done_operation_010.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2103_test_component_operations/210307_done_operation/Sem_210307_done_operation_011.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2103_test_component_operations/210307_done_operation/Sem_210307_done_operation_012.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2103_test_component_operations/210308_killed_operation/NegSem_210308_killed_operation_001.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2103_test_component_operations/210308_killed_operation/NegSem_210308_killed_operation_002.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2103_test_component_operations/210308_killed_operation/NegSem_210308_killed_operation_003.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2103_test_component_operations/210308_killed_operation/NegSem_210308_killed_operation_004.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2103_test_component_operations/210308_killed_operation/NegSem_210308_killed_operation_005.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2103_test_component_operations/210308_killed_operation/NegSem_210308_killed_operation_006.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2103_test_component_operations/210308_killed_operation/NegSem_210308_killed_operation_007.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2103_test_component_operations/210308_killed_operation/NegSem_210308_killed_operation_008.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2103_test_component_operations/210308_killed_operation/NegSem_210308_killed_operation_009.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2103_test_component_operations/210308_killed_operation/NegSem_210308_killed_operation_010.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2103_test_component_operations/210308_killed_operation/NegSyn_210308_killed_operation_001.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2103_test_component_operations/210308_killed_operation/NegSyn_210308_killed_operation_002.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2103_test_component_operations/210308_killed_operation/NegSyn_210308_killed_operation_003.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2103_test_component_operations/210308_killed_operation/NegSyn_210308_killed_operation_004.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2103_test_component_operations/210308_killed_operation/Sem_210308_killed_operation_001.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2103_test_component_operations/210308_killed_operation/Sem_210308_killed_operation_002.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2103_test_component_operations/210308_killed_operation/Sem_210308_killed_operation_003.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2103_test_component_operations/210308_killed_operation/Sem_210308_killed_operation_004.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2103_test_component_operations/210308_killed_operation/Sem_210308_killed_operation_005.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2103_test_component_operations/210308_killed_operation/Sem_210308_killed_operation_006.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2103_test_component_operations/210308_killed_operation/Sem_210308_killed_operation_007.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2103_test_component_operations/210308_killed_operation/Sem_210308_killed_operation_008.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2103_test_component_operations/210308_killed_operation/Sem_210308_killed_operation_009.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2103_test_component_operations/210308_killed_operation/Sem_210308_killed_operation_010.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2103_test_component_operations/210308_killed_operation/Sem_210308_killed_operation_011.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2103_test_component_operations/210308_killed_operation/Sem_210308_killed_operation_012.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2103_test_component_operations/210308_killed_operation/Sem_210308_killed_operation_013.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2103_test_component_operations/210308_killed_operation/Sem_210308_killed_operation_014.ttcn create mode 100644 ATS/core_language/21_configuration_operations/2103_test_component_operations/210309_any_and_all_components/NOTES create mode 100644 ATS/core_language/22_communication_operations/2202_message_based_communication/220201_send_operation/NegSem_220201_SendOperation_001.ttcn create mode 100644 ATS/core_language/22_communication_operations/2202_message_based_communication/220201_send_operation/NegSem_220201_SendOperation_002.ttcn create mode 100644 ATS/core_language/22_communication_operations/2202_message_based_communication/220201_send_operation/NegSem_220201_SendOperation_003.ttcn create mode 100644 ATS/core_language/22_communication_operations/2202_message_based_communication/220201_send_operation/NegSem_220201_SendOperation_004.ttcn create mode 100644 ATS/core_language/22_communication_operations/2202_message_based_communication/220201_send_operation/NegSem_220201_SendOperation_005.ttcn create mode 100644 ATS/core_language/22_communication_operations/2202_message_based_communication/220201_send_operation/NegSem_220201_SendOperation_006.ttcn create mode 100644 ATS/core_language/22_communication_operations/2202_message_based_communication/220201_send_operation/NegSem_220201_SendOperation_007.ttcn create mode 100644 ATS/core_language/22_communication_operations/2202_message_based_communication/220201_send_operation/NegSem_220201_SendOperation_008.ttcn create mode 100644 ATS/core_language/22_communication_operations/2202_message_based_communication/220201_send_operation/NegSem_220201_SendOperation_009.ttcn create mode 100644 ATS/core_language/22_communication_operations/2202_message_based_communication/220201_send_operation/NegSem_220201_SendOperation_010.ttcn create mode 100644 ATS/core_language/22_communication_operations/2202_message_based_communication/220201_send_operation/NegSem_220201_SendOperation_011.ttcn create mode 100644 ATS/core_language/22_communication_operations/2202_message_based_communication/220201_send_operation/Sem_220201_SendOperation_001.ttcn create mode 100644 ATS/core_language/22_communication_operations/2202_message_based_communication/220201_send_operation/Sem_220201_SendOperation_002.ttcn create mode 100644 ATS/core_language/22_communication_operations/2202_message_based_communication/220201_send_operation/Sem_220201_SendOperation_003.ttcn create mode 100644 ATS/core_language/22_communication_operations/2202_message_based_communication/220201_send_operation/Sem_220201_SendOperation_004.ttcn create mode 100644 ATS/core_language/22_communication_operations/2202_message_based_communication/220201_send_operation/Sem_220201_SendOperation_005.ttcn create mode 100644 ATS/core_language/22_communication_operations/2202_message_based_communication/220201_send_operation/Sem_220201_SendOperation_006.ttcn create mode 100644 ATS/core_language/22_communication_operations/2202_message_based_communication/220201_send_operation/Sem_220201_SendOperation_007.ttcn create mode 100644 ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/NegSem_220202_ReceiveOperation_001.ttcn create mode 100644 ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/NegSem_220202_ReceiveOperation_002.ttcn create mode 100644 ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/NegSem_220202_ReceiveOperation_003.ttcn create mode 100644 ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/NegSem_220202_ReceiveOperation_004.ttcn create mode 100644 ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/NegSem_220202_ReceiveOperation_005.ttcn create mode 100644 ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/NegSem_220202_ReceiveOperation_006.ttcn create mode 100644 ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/NegSem_220202_ReceiveOperation_007.ttcn create mode 100644 ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/NegSem_220202_ReceiveOperation_008.ttcn create mode 100644 ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/NegSem_220202_ReceiveOperation_009.ttcn create mode 100644 ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/NegSem_220202_ReceiveOperation_010.ttcn create mode 100644 ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/NegSem_220202_ReceiveOperation_011.ttcn create mode 100644 ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/NegSem_220202_ReceiveOperation_012.ttcn create mode 100644 ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/NegSem_220202_ReceiveOperation_013.ttcn create mode 100644 ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/NegSem_220202_ReceiveOperation_014.ttcn create mode 100644 ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/NegSem_220202_ReceiveOperation_015.ttcn create mode 100644 ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/NegSem_220202_ReceiveOperation_016.ttcn create mode 100644 ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/NegSem_220202_ReceiveOperation_017.ttcn create mode 100644 ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/NegSem_220202_ReceiveOperation_018.ttcn create mode 100644 ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/NegSem_220202_ReceiveOperation_019.ttcn create mode 100644 ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/NegSem_220202_ReceiveOperation_020.ttcn create mode 100644 ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/NegSem_220202_ReceiveOperation_021.ttcn create mode 100644 ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/NegSem_220202_ReceiveOperation_022.ttcn create mode 100644 ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/NegSem_220202_ReceiveOperation_023.ttcn create mode 100644 ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/NegSem_220202_ReceiveOperation_024.ttcn create mode 100644 ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/Sem_220202_ReceiveOperation_001.ttcn create mode 100644 ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/Sem_220202_ReceiveOperation_002.ttcn create mode 100644 ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/Sem_220202_ReceiveOperation_003.ttcn create mode 100644 ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/Sem_220202_ReceiveOperation_004.ttcn create mode 100644 ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/Sem_220202_ReceiveOperation_005.ttcn create mode 100644 ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/Sem_220202_ReceiveOperation_006.ttcn create mode 100644 ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/Sem_220202_ReceiveOperation_007.ttcn create mode 100644 ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/Sem_220202_ReceiveOperation_008.ttcn create mode 100644 ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/Sem_220202_ReceiveOperation_009.ttcn create mode 100644 ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/Sem_220202_ReceiveOperation_010.ttcn create mode 100644 ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/Sem_220202_ReceiveOperation_011.ttcn create mode 100644 ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/Sem_220202_ReceiveOperation_012.ttcn create mode 100644 ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/Sem_220202_ReceiveOperation_013.ttcn create mode 100644 ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/Sem_220202_ReceiveOperation_014.ttcn create mode 100644 ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/Sem_220202_ReceiveOperation_015.ttcn create mode 100644 ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/Sem_220202_ReceiveOperation_016.ttcn create mode 100644 ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/Sem_220202_ReceiveOperation_017.ttcn create mode 100644 ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/Sem_220202_ReceiveOperation_018.ttcn create mode 100644 ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/Sem_220202_ReceiveOperation_019.ttcn create mode 100644 ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/Sem_220202_ReceiveOperation_020.ttcn create mode 100644 ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/Sem_220202_ReceiveOperation_021.ttcn create mode 100644 ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/Sem_220202_ReceiveOperation_022.ttcn create mode 100644 ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/Sem_220202_ReceiveOperation_023.ttcn create mode 100644 ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/Sem_220202_ReceiveOperation_024.ttcn create mode 100644 ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/Sem_220202_ReceiveOperation_025.ttcn create mode 100644 ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/Sem_220202_ReceiveOperation_026.ttcn create mode 100644 ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/Sem_220202_ReceiveOperation_027.ttcn create mode 100644 ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/Sem_220202_ReceiveOperation_028.ttcn create mode 100644 ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/Sem_220202_ReceiveOperation_029.ttcn create mode 100644 ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/Sem_220202_ReceiveOperation_030.ttcn create mode 100644 ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/NegSem_220203_TriggerOperation_001.ttcn create mode 100644 ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/NegSem_220203_TriggerOperation_002.ttcn create mode 100644 ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/NegSem_220203_TriggerOperation_003.ttcn create mode 100644 ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/NegSem_220203_TriggerOperation_004.ttcn create mode 100644 ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/NegSem_220203_TriggerOperation_005.ttcn create mode 100644 ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/NegSem_220203_TriggerOperation_006.ttcn create mode 100644 ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/NegSem_220203_TriggerOperation_007.ttcn create mode 100644 ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/NegSem_220203_TriggerOperation_008.ttcn create mode 100644 ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/NegSem_220203_TriggerOperation_009.ttcn create mode 100644 ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/NegSem_220203_TriggerOperation_010.ttcn create mode 100644 ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/NegSem_220203_TriggerOperation_011.ttcn create mode 100644 ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/NegSem_220203_TriggerOperation_012.ttcn create mode 100644 ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/NegSem_220203_TriggerOperation_013.ttcn create mode 100644 ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/NegSem_220203_TriggerOperation_014.ttcn create mode 100644 ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/NegSem_220203_TriggerOperation_015.ttcn create mode 100644 ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/NegSem_220203_TriggerOperation_016.ttcn create mode 100644 ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/NegSem_220203_TriggerOperation_017.ttcn create mode 100644 ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/NegSem_220203_TriggerOperation_018.ttcn create mode 100644 ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/NegSem_220203_TriggerOperation_019.ttcn create mode 100644 ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/NegSem_220203_TriggerOperation_020.ttcn create mode 100644 ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/NegSem_220203_TriggerOperation_021.ttcn create mode 100644 ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/NegSem_220203_TriggerOperation_022.ttcn create mode 100644 ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/NegSem_220203_TriggerOperation_023.ttcn create mode 100644 ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/NegSem_220203_TriggerOperation_024.ttcn create mode 100644 ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/Sem_220203_TriggerOperation_001.ttcn create mode 100644 ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/Sem_220203_TriggerOperation_002.ttcn create mode 100644 ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/Sem_220203_TriggerOperation_003.ttcn create mode 100644 ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/Sem_220203_TriggerOperation_004.ttcn create mode 100644 ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/Sem_220203_TriggerOperation_005.ttcn create mode 100644 ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/Sem_220203_TriggerOperation_006.ttcn create mode 100644 ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/Sem_220203_TriggerOperation_007.ttcn create mode 100644 ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/Sem_220203_TriggerOperation_008.ttcn create mode 100644 ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/Sem_220203_TriggerOperation_009.ttcn create mode 100644 ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/Sem_220203_TriggerOperation_010.ttcn create mode 100644 ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/Sem_220203_TriggerOperation_011.ttcn create mode 100644 ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/Sem_220203_TriggerOperation_012.ttcn create mode 100644 ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/Sem_220203_TriggerOperation_013.ttcn create mode 100644 ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/Sem_220203_TriggerOperation_014.ttcn create mode 100644 ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/Sem_220203_TriggerOperation_015.ttcn create mode 100644 ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/Sem_220203_TriggerOperation_016.ttcn create mode 100644 ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/Sem_220203_TriggerOperation_017.ttcn create mode 100644 ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/Sem_220203_TriggerOperation_018.ttcn create mode 100644 ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/Sem_220203_TriggerOperation_019.ttcn create mode 100644 ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/Sem_220203_TriggerOperation_020.ttcn create mode 100644 ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/Sem_220203_TriggerOperation_021.ttcn create mode 100644 ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/Sem_220203_TriggerOperation_022.ttcn create mode 100644 ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/Sem_220203_TriggerOperation_023.ttcn create mode 100644 ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/Sem_220203_TriggerOperation_024.ttcn create mode 100644 ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/Sem_220203_TriggerOperation_025.ttcn create mode 100644 ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/Sem_220203_TriggerOperation_026.ttcn create mode 100644 ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/Sem_220203_TriggerOperation_027.ttcn create mode 100644 ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/Sem_220203_TriggerOperation_028.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSem_220301_CallOperation_001.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSem_220301_CallOperation_002.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSem_220301_CallOperation_003.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSem_220301_CallOperation_004.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSem_220301_CallOperation_005.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSem_220301_CallOperation_006.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSem_220301_CallOperation_007.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSem_220301_CallOperation_008.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSem_220301_CallOperation_009.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSem_220301_CallOperation_010.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSem_220301_CallOperation_011.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSem_220301_CallOperation_012.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSem_220301_CallOperation_013.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSem_220301_CallOperation_014.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSem_220301_CallOperation_015.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSem_220301_CallOperation_016.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSem_220301_CallOperation_017.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSem_220301_CallOperation_018.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSem_220301_CallOperation_019.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSem_220301_CallOperation_020.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSyn_220301_CallOperation_001.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSyn_220301_CallOperation_002.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220301_call_operation/Sem_220301_CallOperation_001.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220301_call_operation/Sem_220301_CallOperation_002.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220301_call_operation/Sem_220301_CallOperation_003.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220301_call_operation/Sem_220301_CallOperation_004.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220301_call_operation/Sem_220301_CallOperation_005.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220301_call_operation/Sem_220301_CallOperation_006.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220301_call_operation/Sem_220301_CallOperation_007.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220301_call_operation/Sem_220301_CallOperation_008.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220301_call_operation/Sem_220301_CallOperation_009.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220301_call_operation/Sem_220301_CallOperation_010.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220301_call_operation/Sem_220301_CallOperation_011.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220301_call_operation/Sem_220301_CallOperation_012.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220301_call_operation/Sem_220301_CallOperation_013.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220301_call_operation/Sem_220301_CallOperation_014.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220301_call_operation/Sem_220301_CallOperation_015.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220301_call_operation/Sem_220301_CallOperation_016.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220301_call_operation/Sem_220301_CallOperation_017.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220301_call_operation/Sem_220301_CallOperation_018.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220301_call_operation/Sem_220301_CallOperation_019.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220301_call_operation/Sem_220301_CallOperation_020.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/NegSem_220302_GetcallOperation_001.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/NegSem_220302_GetcallOperation_002.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/NegSem_220302_GetcallOperation_003.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/NegSem_220302_getcall_operation_004.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/NegSem_220302_getcall_operation_005.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/NegSem_220302_getcall_operation_006.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/NegSem_220302_getcall_operation_007.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/NegSem_220302_getcall_operation_008.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/NegSem_220302_getcall_operation_009.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/NegSem_220302_getcall_operation_010.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/NegSem_220302_getcall_operation_011.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/NegSem_220302_getcall_operation_012.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/NegSem_220302_getcall_operation_013.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/NegSem_220302_getcall_operation_014.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/NegSem_220302_getcall_operation_015.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/NegSem_220302_getcall_operation_016.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/NegSem_220302_getcall_operation_017.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/NegSem_220302_getcall_operation_018.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/NegSem_220302_getcall_operation_019.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/NegSyn_220302_getcall_operation_001.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/NegSyn_220302_getcall_operation_002.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/Sem_220302_GetcallOperation_001.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/Sem_220302_GetcallOperation_002.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/Sem_220302_GetcallOperation_003.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/Sem_220302_GetcallOperation_004.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/Sem_220302_GetcallOperation_005.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/Sem_220302_getcall_operation_006.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/Sem_220302_getcall_operation_007.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/Sem_220302_getcall_operation_008.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/Sem_220302_getcall_operation_009.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/Sem_220302_getcall_operation_010.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/Sem_220302_getcall_operation_011.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/Sem_220302_getcall_operation_012.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/Sem_220302_getcall_operation_013.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/Sem_220302_getcall_operation_014.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/Sem_220302_getcall_operation_015.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/Sem_220302_getcall_operation_016.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/Sem_220302_getcall_operation_017.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/Sem_220302_getcall_operation_018.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/Sem_220302_getcall_operation_019.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/Sem_220302_getcall_operation_020.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/Sem_220302_getcall_operation_021.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/Sem_220302_getcall_operation_022.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220303_reply_operation/NegSem_220303_ReplyOperation_001.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220303_reply_operation/NegSem_220303_ReplyOperation_002.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220303_reply_operation/NegSem_220303_ReplyOperation_003.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220303_reply_operation/NegSem_220303_ReplyOperation_004.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220303_reply_operation/NegSem_220303_ReplyOperation_005.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220303_reply_operation/NegSem_220303_ReplyOperation_006.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220303_reply_operation/NegSem_220303_ReplyOperation_007.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220303_reply_operation/NegSem_220303_ReplyOperation_008.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220303_reply_operation/NegSem_220303_ReplyOperation_009.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220303_reply_operation/NegSem_220303_ReplyOperation_010.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220303_reply_operation/Sem_220303_ReplyOperation_001.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220303_reply_operation/Sem_220303_ReplyOperation_002.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220303_reply_operation/Sem_220303_ReplyOperation_003.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220303_reply_operation/Sem_220303_ReplyOperation_004.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220303_reply_operation/Sem_220303_ReplyOperation_005.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/NegSem_220304_getreply_operation_001.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/NegSem_220304_getreply_operation_002.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/NegSem_220304_getreply_operation_003.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/NegSem_220304_getreply_operation_004.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/NegSem_220304_getreply_operation_005.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/NegSem_220304_getreply_operation_006.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/NegSem_220304_getreply_operation_007.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/NegSem_220304_getreply_operation_008.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/NegSem_220304_getreply_operation_009.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/NegSem_220304_getreply_operation_010.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/NegSem_220304_getreply_operation_011.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/NegSem_220304_getreply_operation_012.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/NegSem_220304_getreply_operation_013.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/NegSem_220304_getreply_operation_014.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/NegSem_220304_getreply_operation_015.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/NegSem_220304_getreply_operation_016.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/NegSem_220304_getreply_operation_017.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/NegSem_220304_getreply_operation_018.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/NegSem_220304_getreply_operation_019.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/NegSem_220304_getreply_operation_020.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/NegSem_220304_getreply_operation_021.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/NegSem_220304_getreply_operation_022.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/NegSyn_220304_getreply_operation_001.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/NegSyn_220304_getreply_operation_002.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/Sem_220304_getreply_operation_001.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/Sem_220304_getreply_operation_002.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/Sem_220304_getreply_operation_003.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/Sem_220304_getreply_operation_004.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/Sem_220304_getreply_operation_005.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/Sem_220304_getreply_operation_006.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/Sem_220304_getreply_operation_007.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/Sem_220304_getreply_operation_008.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/Sem_220304_getreply_operation_009.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/Sem_220304_getreply_operation_010.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/Sem_220304_getreply_operation_011.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/Sem_220304_getreply_operation_012.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/Sem_220304_getreply_operation_013.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/Sem_220304_getreply_operation_014.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/Sem_220304_getreply_operation_015.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/Sem_220304_getreply_operation_016.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/Sem_220304_getreply_operation_017.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/Sem_220304_getreply_operation_018.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/Sem_220304_getreply_operation_019.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/Sem_220304_getreply_operation_020.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/Sem_220304_getreply_operation_021.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/Sem_220304_getreply_operation_022.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/Sem_220304_getreply_operation_023.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220305_raise_operation/NegSem_220305_raise_operation_001.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220305_raise_operation/NegSem_220305_raise_operation_002.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220305_raise_operation/NegSem_220305_raise_operation_003.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220305_raise_operation/NegSem_220305_raise_operation_004.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220305_raise_operation/NegSem_220305_raise_operation_005.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220305_raise_operation/NegSem_220305_raise_operation_006.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220305_raise_operation/NegSem_220305_raise_operation_007.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220305_raise_operation/NegSem_220305_raise_operation_008.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220305_raise_operation/NegSem_220305_raise_operation_009.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220305_raise_operation/NegSem_220305_raise_operation_010.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220305_raise_operation/Sem_220305_raise_operation_001.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220305_raise_operation/Sem_220305_raise_operation_002.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220305_raise_operation/Sem_220305_raise_operation_003.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220305_raise_operation/Sem_220305_raise_operation_004.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/NegSem_220306_catch_operation_001.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/NegSem_220306_catch_operation_002.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/NegSem_220306_catch_operation_003.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/NegSem_220306_catch_operation_004.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/NegSem_220306_catch_operation_005.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/NegSem_220306_catch_operation_006.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/NegSem_220306_catch_operation_007.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/NegSem_220306_catch_operation_008.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/NegSem_220306_catch_operation_009.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/NegSem_220306_catch_operation_010.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/NegSem_220306_catch_operation_011.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/NegSem_220306_catch_operation_012.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/NegSem_220306_catch_operation_013.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/NegSem_220306_catch_operation_014.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/NegSem_220306_catch_operation_015.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/NegSem_220306_catch_operation_016.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/NegSyn_220306_catch_operation_001.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/NegSyn_220306_catch_operation_002.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/NegSyn_220306_catch_operation_003.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/Sem_220306_catch_operation_001.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/Sem_220306_catch_operation_002.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/Sem_220306_catch_operation_003.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/Sem_220306_catch_operation_004.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/Sem_220306_catch_operation_005.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/Sem_220306_catch_operation_006.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/Sem_220306_catch_operation_007.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/Sem_220306_catch_operation_008.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/Sem_220306_catch_operation_009.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/Sem_220306_catch_operation_010.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/Sem_220306_catch_operation_011.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/Sem_220306_catch_operation_012.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/Sem_220306_catch_operation_013.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/Sem_220306_catch_operation_014.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/Sem_220306_catch_operation_015.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/Sem_220306_catch_operation_016.ttcn create mode 100644 ATS/core_language/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/Sem_220306_catch_operation_017.ttcn create mode 100644 ATS/core_language/22_communication_operations/2204_the_check_operation/NegSem_2204_the_check_operation_001.ttcn create mode 100644 ATS/core_language/22_communication_operations/2204_the_check_operation/NegSem_2204_the_check_operation_002.ttcn create mode 100644 ATS/core_language/22_communication_operations/2204_the_check_operation/NegSem_2204_the_check_operation_003.ttcn create mode 100644 ATS/core_language/22_communication_operations/2204_the_check_operation/NegSem_2204_the_check_operation_004.ttcn create mode 100644 ATS/core_language/22_communication_operations/2204_the_check_operation/NegSem_2204_the_check_operation_005.ttcn create mode 100644 ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_001.ttcn create mode 100644 ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_002.ttcn create mode 100644 ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_003.ttcn create mode 100644 ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_004.ttcn create mode 100644 ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_005.ttcn create mode 100644 ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_006.ttcn create mode 100644 ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_007.ttcn create mode 100644 ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_008.ttcn create mode 100644 ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_009.ttcn create mode 100644 ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_010.ttcn create mode 100644 ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_011.ttcn create mode 100644 ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_012.ttcn create mode 100644 ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_013.ttcn create mode 100644 ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_014.ttcn create mode 100644 ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_015.ttcn create mode 100644 ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_016.ttcn create mode 100644 ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_017.ttcn create mode 100644 ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_018.ttcn create mode 100644 ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_019.ttcn create mode 100644 ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_020.ttcn create mode 100644 ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_021.ttcn create mode 100644 ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_022.ttcn create mode 100644 ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_023.ttcn create mode 100644 ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_024.ttcn create mode 100644 ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_025.ttcn create mode 100644 ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_026.ttcn create mode 100644 ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_027.ttcn create mode 100644 ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_028.ttcn create mode 100644 ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_029.ttcn create mode 100644 ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_030.ttcn create mode 100644 ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_031.ttcn create mode 100644 ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_032.ttcn create mode 100644 ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_033.ttcn create mode 100644 ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_034.ttcn create mode 100644 ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_035.ttcn create mode 100644 ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_036.ttcn create mode 100644 ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_037.ttcn create mode 100644 ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_038.ttcn create mode 100644 ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_039.ttcn create mode 100644 ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_040.ttcn create mode 100644 ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_041.ttcn create mode 100644 ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_042.ttcn create mode 100644 ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_043.ttcn create mode 100644 ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_044.ttcn create mode 100644 ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_045.ttcn create mode 100644 ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_046.ttcn create mode 100644 ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_047.ttcn create mode 100644 ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_048.ttcn create mode 100644 ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_049.ttcn create mode 100644 ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_050.ttcn create mode 100644 ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_051.ttcn create mode 100644 ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_052.ttcn create mode 100644 ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_053.ttcn create mode 100644 ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_054.ttcn create mode 100644 ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_055.ttcn create mode 100644 ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_056.ttcn create mode 100644 ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_057.ttcn create mode 100644 ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_058.ttcn create mode 100644 ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_059.ttcn create mode 100644 ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_060.ttcn create mode 100644 ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_061.ttcn create mode 100644 ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_062.ttcn create mode 100644 ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_063.ttcn create mode 100644 ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_064.ttcn create mode 100644 ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_065.ttcn create mode 100644 ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_066.ttcn create mode 100644 ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_067.ttcn create mode 100644 ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_068.ttcn create mode 100644 ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_069.ttcn create mode 100644 ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_070.ttcn create mode 100644 ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_071.ttcn create mode 100644 ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_072.ttcn create mode 100644 ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_073.ttcn create mode 100644 ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_074.ttcn create mode 100644 ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_075.ttcn create mode 100644 ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_076.ttcn create mode 100644 ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_077.ttcn create mode 100644 ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_078.ttcn create mode 100644 ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_079.ttcn create mode 100644 ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_080.ttcn create mode 100644 ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_081.ttcn create mode 100644 ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_082.ttcn create mode 100644 ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_083.ttcn create mode 100644 ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_084.ttcn create mode 100644 ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_085.ttcn create mode 100644 ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_086.ttcn create mode 100644 ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_087.ttcn create mode 100644 ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_088.ttcn create mode 100644 ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_089.ttcn create mode 100644 ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_090.ttcn create mode 100644 ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_091.ttcn create mode 100644 ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_092.ttcn create mode 100644 ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_093.ttcn create mode 100644 ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_094.ttcn create mode 100644 ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_095.ttcn create mode 100644 ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_096.ttcn create mode 100644 ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_097.ttcn create mode 100644 ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_098.ttcn create mode 100644 ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_099.ttcn create mode 100644 ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_100.ttcn create mode 100644 ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_101.ttcn create mode 100644 ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_102.ttcn create mode 100644 ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_103.ttcn create mode 100644 ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_104.ttcn create mode 100644 ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_105.ttcn create mode 100644 ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_106.ttcn create mode 100644 ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_107.ttcn create mode 100644 ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_108.ttcn create mode 100644 ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_109.ttcn create mode 100644 ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_110.ttcn create mode 100644 ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_111.ttcn create mode 100644 ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_112.ttcn create mode 100644 ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_113.ttcn create mode 100644 ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_114.ttcn create mode 100644 ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_115.ttcn create mode 100644 ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_116.ttcn create mode 100644 ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_117.ttcn create mode 100644 ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_118.ttcn create mode 100644 ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_119.ttcn create mode 100644 ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_120.ttcn create mode 100644 ATS/core_language/22_communication_operations/NOTES create mode 100644 ATS/core_language/23_timer_operations/2302_the_start_timer_operataion/NegSem_2302_timer_start_001.ttcn create mode 100644 ATS/core_language/23_timer_operations/2302_the_start_timer_operataion/NegSem_2302_timer_start_002.ttcn create mode 100644 ATS/core_language/23_timer_operations/2302_the_start_timer_operataion/NegSem_2302_timer_start_003.ttcn create mode 100644 ATS/core_language/23_timer_operations/2302_the_start_timer_operataion/NegSem_2302_timer_start_004.ttcn create mode 100644 ATS/core_language/23_timer_operations/2302_the_start_timer_operataion/NegSyn_2302_timer_start_001.ttcn create mode 100644 ATS/core_language/23_timer_operations/2302_the_start_timer_operataion/NegSyn_2302_timer_start_002.ttcn create mode 100644 ATS/core_language/23_timer_operations/2302_the_start_timer_operataion/NegSyn_2302_timer_start_003.ttcn create mode 100644 ATS/core_language/23_timer_operations/2302_the_start_timer_operataion/NegSyn_2302_timer_start_004.ttcn create mode 100644 ATS/core_language/23_timer_operations/2302_the_start_timer_operataion/NegSyn_2302_timer_start_005.ttcn create mode 100644 ATS/core_language/23_timer_operations/2302_the_start_timer_operataion/NegSyn_2302_timer_start_006.ttcn create mode 100644 ATS/core_language/23_timer_operations/2302_the_start_timer_operataion/NegSyn_2302_timer_start_007.ttcn create mode 100644 ATS/core_language/23_timer_operations/2302_the_start_timer_operataion/NegSyn_2302_timer_start_008.ttcn create mode 100644 ATS/core_language/23_timer_operations/2302_the_start_timer_operataion/NegSyn_2302_timer_start_009.ttcn create mode 100644 ATS/core_language/23_timer_operations/2302_the_start_timer_operataion/NegSyn_2302_timer_start_010.ttcn create mode 100644 ATS/core_language/23_timer_operations/2302_the_start_timer_operataion/NegSyn_2302_timer_start_011.ttcn create mode 100644 ATS/core_language/23_timer_operations/2302_the_start_timer_operataion/NegSyn_2302_timer_start_012.ttcn create mode 100644 ATS/core_language/23_timer_operations/2302_the_start_timer_operataion/NegSyn_2302_timer_start_013.ttcn create mode 100644 ATS/core_language/23_timer_operations/2302_the_start_timer_operataion/Sem_2302_timer_start_001.ttcn create mode 100644 ATS/core_language/23_timer_operations/2302_the_start_timer_operataion/Sem_2302_timer_start_002.ttcn create mode 100644 ATS/core_language/23_timer_operations/2302_the_start_timer_operataion/Sem_2302_timer_start_003.ttcn create mode 100644 ATS/core_language/23_timer_operations/2302_the_start_timer_operataion/Sem_2302_timer_start_004.ttcn create mode 100644 ATS/core_language/23_timer_operations/2303_the_stop_timer_operation/NegSyn_2303_timer_stop_001.ttcn create mode 100644 ATS/core_language/23_timer_operations/2303_the_stop_timer_operation/NegSyn_2303_timer_stop_002.ttcn create mode 100644 ATS/core_language/23_timer_operations/2303_the_stop_timer_operation/NegSyn_2303_timer_stop_003.ttcn create mode 100644 ATS/core_language/23_timer_operations/2303_the_stop_timer_operation/NegSyn_2303_timer_stop_004.ttcn create mode 100644 ATS/core_language/23_timer_operations/2303_the_stop_timer_operation/NegSyn_2303_timer_stop_005.ttcn create mode 100644 ATS/core_language/23_timer_operations/2303_the_stop_timer_operation/NegSyn_2303_timer_stop_006.ttcn create mode 100644 ATS/core_language/23_timer_operations/2303_the_stop_timer_operation/Sem_2303_timer_stop_002.ttcn create mode 100644 ATS/core_language/23_timer_operations/2303_the_stop_timer_operation/Sem_2303_timer_stop_003.ttcn create mode 100644 ATS/core_language/23_timer_operations/2303_the_stop_timer_operation/Sem_2303_timer_stop_004.ttcn create mode 100644 ATS/core_language/23_timer_operations/2303_the_stop_timer_operation/Syn_2303_timer_stop_006.ttcn create mode 100644 ATS/core_language/23_timer_operations/2303_the_stop_timer_operation/Syn_2303_timer_stop_007.ttcn create mode 100644 ATS/core_language/23_timer_operations/2304_the_read_timer_operation/NegSyn_2304_timer_read_001.ttcn create mode 100644 ATS/core_language/23_timer_operations/2304_the_read_timer_operation/NegSyn_2304_timer_read_002.ttcn create mode 100644 ATS/core_language/23_timer_operations/2304_the_read_timer_operation/NegSyn_2304_timer_read_003.ttcn create mode 100644 ATS/core_language/23_timer_operations/2304_the_read_timer_operation/NegSyn_2304_timer_read_004.ttcn create mode 100644 ATS/core_language/23_timer_operations/2304_the_read_timer_operation/NegSyn_2304_timer_read_005.ttcn create mode 100644 ATS/core_language/23_timer_operations/2304_the_read_timer_operation/Sem_2304_timer_read_001.ttcn create mode 100644 ATS/core_language/23_timer_operations/2304_the_read_timer_operation/Sem_2304_timer_read_002.ttcn create mode 100644 ATS/core_language/23_timer_operations/2304_the_read_timer_operation/Sem_2304_timer_read_003.ttcn create mode 100644 ATS/core_language/23_timer_operations/2305_the_running_timer_operation/NegSyn_2305_timer_running_001.ttcn create mode 100644 ATS/core_language/23_timer_operations/2305_the_running_timer_operation/NegSyn_2305_timer_running_002.ttcn create mode 100644 ATS/core_language/23_timer_operations/2305_the_running_timer_operation/NegSyn_2305_timer_running_003.ttcn create mode 100644 ATS/core_language/23_timer_operations/2305_the_running_timer_operation/NegSyn_2305_timer_running_004.ttcn create mode 100644 ATS/core_language/23_timer_operations/2305_the_running_timer_operation/NegSyn_2305_timer_running_005.ttcn create mode 100644 ATS/core_language/23_timer_operations/2305_the_running_timer_operation/NegSyn_2305_timer_running_006.ttcn create mode 100644 ATS/core_language/23_timer_operations/2305_the_running_timer_operation/Sem_2305_timer_running_001.ttcn create mode 100644 ATS/core_language/23_timer_operations/2305_the_running_timer_operation/Sem_2305_timer_running_002.ttcn create mode 100644 ATS/core_language/23_timer_operations/2305_the_running_timer_operation/Sem_2305_timer_running_003.ttcn create mode 100644 ATS/core_language/23_timer_operations/2305_the_running_timer_operation/Sem_2305_timer_running_004.ttcn create mode 100644 ATS/core_language/23_timer_operations/2305_the_running_timer_operation/Sem_2305_timer_running_005.ttcn create mode 100644 ATS/core_language/23_timer_operations/2306_the_timeout_operation/NegSyn_2306_timer_timeout_001.ttcn create mode 100644 ATS/core_language/23_timer_operations/2306_the_timeout_operation/NegSyn_2306_timer_timeout_002.ttcn create mode 100644 ATS/core_language/23_timer_operations/2306_the_timeout_operation/NegSyn_2306_timer_timeout_003.ttcn create mode 100644 ATS/core_language/23_timer_operations/2306_the_timeout_operation/NegSyn_2306_timer_timeout_004.ttcn create mode 100644 ATS/core_language/23_timer_operations/2306_the_timeout_operation/NegSyn_2306_timer_timeout_005.ttcn create mode 100644 ATS/core_language/23_timer_operations/2306_the_timeout_operation/NegSyn_2306_timer_timeout_006.ttcn create mode 100644 ATS/core_language/23_timer_operations/2306_the_timeout_operation/NegSyn_2306_timer_timeout_007.ttcn create mode 100644 ATS/core_language/23_timer_operations/2306_the_timeout_operation/Sem_2306_timer_timeout_001.ttcn create mode 100644 ATS/core_language/23_timer_operations/2306_the_timeout_operation/Sem_2306_timer_timeout_002.ttcn create mode 100644 ATS/core_language/23_timer_operations/2306_the_timeout_operation/Sem_2306_timer_timeout_003.ttcn create mode 100644 ATS/core_language/23_timer_operations/2306_the_timeout_operation/Sem_2306_timer_timeout_004.ttcn create mode 100644 ATS/core_language/23_timer_operations/2306_the_timeout_operation/Sem_2306_timer_timeout_005.ttcn create mode 100644 ATS/core_language/23_timer_operations/2306_the_timeout_operation/Sem_2306_timer_timeout_006.ttcn create mode 100644 ATS/core_language/23_timer_operations/2306_the_timeout_operation/Sem_2306_timer_timeout_007.ttcn create mode 100644 ATS/core_language/23_timer_operations/2306_the_timeout_operation/Sem_2306_timer_timeout_008.ttcn create mode 100644 ATS/core_language/23_timer_operations/2306_the_timeout_operation/Sem_2306_timer_timeout_009.ttcn create mode 100644 ATS/core_language/23_timer_operations/2306_the_timeout_operation/Syn_2306_timer_timeout_001.ttcn create mode 100644 ATS/core_language/23_timer_operations/23_toplevel/NegSem_23_toplevel_001.ttcn create mode 100644 ATS/core_language/23_timer_operations/23_toplevel/NegSem_23_toplevel_002.ttcn create mode 100644 ATS/core_language/23_timer_operations/23_toplevel/NegSyn_23_toplevel_001.ttcn create mode 100644 ATS/core_language/23_timer_operations/23_toplevel/NegSyn_23_toplevel_002.ttcn create mode 100644 ATS/core_language/23_timer_operations/23_toplevel/Syn_23_toplevel_001.ttcn create mode 100644 ATS/core_language/23_timer_operations/23_toplevel/Syn_23_toplevel_002.ttcn create mode 100644 ATS/core_language/24_test_verdict_operations/2401_the_verdict_mechanism/NOTES create mode 100644 ATS/core_language/24_test_verdict_operations/2401_the_verdict_mechanism/NegSem_2401_SetverdictError.ttcn create mode 100644 ATS/core_language/24_test_verdict_operations/2401_the_verdict_mechanism/Sem_2401_GlobalVerdict_001.ttcn create mode 100644 ATS/core_language/24_test_verdict_operations/2401_the_verdict_mechanism/Sem_2401_GlobalVerdict_002.ttcn create mode 100644 ATS/core_language/24_test_verdict_operations/2401_the_verdict_mechanism/Sem_2401_GlobalVerdict_003.ttcn create mode 100644 ATS/core_language/24_test_verdict_operations/2401_the_verdict_mechanism/Sem_2401_GlobalVerdict_004.ttcn create mode 100644 ATS/core_language/24_test_verdict_operations/2401_the_verdict_mechanism/Sem_2401_GlobalVerdict_005.ttcn create mode 100644 ATS/core_language/24_test_verdict_operations/2401_the_verdict_mechanism/Sem_2401_GlobalVerdict_006.ttcn create mode 100644 ATS/core_language/24_test_verdict_operations/2401_the_verdict_mechanism/Sem_2401_GlobalVerdict_007.ttcn create mode 100644 ATS/core_language/24_test_verdict_operations/2401_the_verdict_mechanism/Sem_2401_GlobalVerdict_008.ttcn create mode 100644 ATS/core_language/24_test_verdict_operations/2401_the_verdict_mechanism/Sem_2401_GlobalVerdict_009.ttcn create mode 100644 ATS/core_language/24_test_verdict_operations/2401_the_verdict_mechanism/Sem_2401_GlobalVerdict_010.ttcn create mode 100644 ATS/core_language/24_test_verdict_operations/2401_the_verdict_mechanism/Sem_2401_GlobalVerdict_011.ttcn create mode 100644 ATS/core_language/24_test_verdict_operations/2401_the_verdict_mechanism/Sem_2401_GlobalVerdict_012.ttcn create mode 100644 ATS/core_language/24_test_verdict_operations/2401_the_verdict_mechanism/Sem_2401_InitiallyNone_001.ttcn create mode 100644 ATS/core_language/24_test_verdict_operations/2401_the_verdict_mechanism/Sem_2401_LocalVerdict_001.ttcn create mode 100644 ATS/core_language/24_test_verdict_operations/2401_the_verdict_mechanism/Sem_2401_LocalVerdict_002.ttcn create mode 100644 ATS/core_language/24_test_verdict_operations/2401_the_verdict_mechanism/Sem_2401_LocalVerdict_003.ttcn create mode 100644 ATS/core_language/24_test_verdict_operations/2401_the_verdict_mechanism/Sem_2401_LocalVerdict_004.ttcn create mode 100644 ATS/core_language/24_test_verdict_operations/2401_the_verdict_mechanism/Sem_2401_LocalVerdict_005.ttcn create mode 100644 ATS/core_language/24_test_verdict_operations/2401_the_verdict_mechanism/Sem_2401_LocalVerdict_006.ttcn create mode 100644 ATS/core_language/24_test_verdict_operations/2401_the_verdict_mechanism/Sem_2401_LocalVerdict_007.ttcn create mode 100644 ATS/core_language/24_test_verdict_operations/2401_the_verdict_mechanism/Sem_2401_LocalVerdict_008.ttcn create mode 100644 ATS/core_language/24_test_verdict_operations/2401_the_verdict_mechanism/Sem_2401_LocalVerdict_009.ttcn create mode 100644 ATS/core_language/24_test_verdict_operations/2401_the_verdict_mechanism/Sem_2401_LocalVerdict_010.ttcn create mode 100644 ATS/core_language/24_test_verdict_operations/2401_the_verdict_mechanism/Sem_2401_LocalVerdict_011.ttcn create mode 100644 ATS/core_language/24_test_verdict_operations/2401_the_verdict_mechanism/Sem_2401_LocalVerdict_012.ttcn create mode 100644 ATS/core_language/24_test_verdict_operations/2401_the_verdict_mechanism/Syn_2401_FiveValues_001.ttcn create mode 100644 ATS/core_language/24_test_verdict_operations/2402_the_setverdict_operation/NegSem_2402_setverdict_params_001.ttcn create mode 100644 ATS/core_language/24_test_verdict_operations/2402_the_setverdict_operation/NegSem_2402_setverdict_params_002.ttcn create mode 100644 ATS/core_language/24_test_verdict_operations/2402_the_setverdict_operation/NegSem_2402_setverdict_params_003.ttcn create mode 100644 ATS/core_language/24_test_verdict_operations/2402_the_setverdict_operation/NegSem_2402_setverdict_params_004.ttcn create mode 100644 ATS/core_language/24_test_verdict_operations/2402_the_setverdict_operation/NegSem_2402_setverdict_params_005.ttcn create mode 100644 ATS/core_language/24_test_verdict_operations/2402_the_setverdict_operation/Sem_2402_setverdict_logging_001.ttcn create mode 100644 ATS/core_language/24_test_verdict_operations/2402_the_setverdict_operation/Sem_2402_setverdict_params_001.ttcn create mode 100644 ATS/core_language/24_test_verdict_operations/2402_the_setverdict_operation/Sem_2402_setverdict_params_002.ttcn create mode 100644 ATS/core_language/24_test_verdict_operations/2402_the_setverdict_operation/Sem_2402_setverdict_params_003.ttcn create mode 100644 ATS/core_language/24_test_verdict_operations/2403_the_getverdict_operation/Sem_2403_getverdict_001.ttcn create mode 100644 ATS/core_language/24_test_verdict_operations/2403_the_getverdict_operation/Sem_2403_getverdict_002.ttcn create mode 100644 ATS/core_language/24_test_verdict_operations/2403_the_getverdict_operation/Sem_2403_getverdict_003.ttcn create mode 100644 ATS/core_language/24_test_verdict_operations/2403_the_getverdict_operation/Sem_2403_getverdict_004.ttcn create mode 100644 ATS/core_language/24_test_verdict_operations/2403_the_getverdict_operation/Sem_2403_getverdict_005.ttcn create mode 100644 ATS/core_language/24_test_verdict_operations/24_toplevel/NegSem_24_toplevel_001.ttcn create mode 100644 ATS/core_language/24_test_verdict_operations/24_toplevel/NegSem_24_toplevel_002.ttcn create mode 100644 ATS/core_language/24_test_verdict_operations/24_toplevel/NegSem_24_toplevel_003.ttcn create mode 100644 ATS/core_language/24_test_verdict_operations/24_toplevel/NegSem_24_toplevel_004.ttcn create mode 100644 ATS/core_language/24_test_verdict_operations/24_toplevel/NegSem_24_toplevel_005.ttcn create mode 100644 ATS/core_language/24_test_verdict_operations/24_toplevel/Syn_24_toplevel_001.ttcn create mode 100644 ATS/core_language/24_test_verdict_operations/24_toplevel/Syn_24_toplevel_002.ttcn create mode 100644 ATS/core_language/24_test_verdict_operations/24_toplevel/Syn_24_toplevel_003.ttcn create mode 100644 ATS/core_language/26_module_control/2601_execute_statement/NegSem_2601_ExecuteStatement_001.ttcn create mode 100644 ATS/core_language/26_module_control/2601_execute_statement/NegSem_2601_ExecuteStatement_002.ttcn create mode 100644 ATS/core_language/26_module_control/2601_execute_statement/NegSem_2601_ExecuteStatement_003.ttcn create mode 100644 ATS/core_language/26_module_control/2601_execute_statement/NegSem_2601_ExecuteStatement_004.ttcn create mode 100644 ATS/core_language/26_module_control/2601_execute_statement/Sem_2601_ExecuteStatement_001.ttcn create mode 100644 ATS/core_language/26_module_control/2601_execute_statement/Sem_2601_ExecuteStatement_002.ttcn create mode 100644 ATS/core_language/26_module_control/2601_execute_statement/Sem_2601_ExecuteStatement_003.ttcn create mode 100644 ATS/core_language/26_module_control/2601_execute_statement/Sem_2601_ExecuteStatement_004.ttcn create mode 100644 ATS/core_language/26_module_control/2601_execute_statement/Sem_2601_ExecuteStatement_005.ttcn create mode 100644 ATS/core_language/26_module_control/2601_execute_statement/Sem_2601_ExecuteStatement_006.ttcn create mode 100644 ATS/core_language/26_module_control/2601_execute_statement/Sem_2601_ExecuteStatement_007.ttcn create mode 100644 ATS/core_language/26_module_control/2601_execute_statement/Sem_2601_ExecuteStatement_008.ttcn create mode 100644 ATS/core_language/26_module_control/2601_execute_statement/Sem_2601_ExecuteStatement_009.ttcn create mode 100644 ATS/core_language/26_module_control/2601_execute_statement/Sem_2601_ExecuteStatement_010.ttcn create mode 100644 ATS/core_language/26_module_control/2602_the_control_part/NegSem_2602_TheControlPart_001.ttcn create mode 100644 ATS/core_language/26_module_control/2602_the_control_part/NegSem_2602_TheControlPart_002.ttcn create mode 100644 ATS/core_language/26_module_control/2602_the_control_part/NegSem_2602_TheControlPart_003.ttcn create mode 100644 ATS/core_language/26_module_control/2602_the_control_part/NegSem_2602_TheControlPart_004.ttcn create mode 100644 ATS/core_language/26_module_control/2602_the_control_part/NegSem_2602_TheControlPart_005.ttcn create mode 100644 ATS/core_language/26_module_control/2602_the_control_part/NegSem_2602_TheControlPart_006.ttcn create mode 100644 ATS/core_language/26_module_control/2602_the_control_part/NegSem_2602_TheControlPart_007.ttcn create mode 100644 ATS/core_language/26_module_control/2602_the_control_part/NegSem_2602_TheControlPart_008.ttcn create mode 100644 ATS/core_language/26_module_control/2602_the_control_part/NegSem_2602_TheControlPart_009.ttcn create mode 100644 ATS/core_language/26_module_control/2602_the_control_part/NegSem_2602_TheControlPart_010.ttcn create mode 100644 ATS/core_language/26_module_control/2602_the_control_part/NegSem_2602_TheControlPart_011.ttcn create mode 100644 ATS/core_language/26_module_control/2602_the_control_part/NegSem_2602_TheControlPart_012.ttcn create mode 100644 ATS/core_language/26_module_control/2602_the_control_part/NegSem_2602_TheControlPart_013.ttcn create mode 100644 ATS/core_language/26_module_control/2602_the_control_part/NegSem_2602_TheControlPart_014.ttcn create mode 100644 ATS/core_language/26_module_control/2602_the_control_part/NegSem_2602_TheControlPart_015.ttcn create mode 100644 ATS/core_language/26_module_control/2602_the_control_part/NegSem_2602_TheControlPart_016.ttcn create mode 100644 ATS/core_language/26_module_control/2602_the_control_part/NegSem_2602_TheControlPart_017.ttcn create mode 100644 ATS/core_language/26_module_control/2602_the_control_part/NegSem_2602_TheControlPart_018.ttcn create mode 100644 ATS/core_language/26_module_control/2602_the_control_part/NegSem_2602_TheControlPart_019.ttcn create mode 100644 ATS/core_language/26_module_control/2602_the_control_part/NegSem_2602_TheControlPart_020.ttcn create mode 100644 ATS/core_language/26_module_control/2602_the_control_part/NegSem_2602_TheControlPart_021.ttcn create mode 100644 ATS/core_language/26_module_control/2602_the_control_part/NegSem_2602_TheControlPart_022.ttcn create mode 100644 ATS/core_language/26_module_control/2602_the_control_part/NegSem_2602_TheControlPart_023.ttcn create mode 100644 ATS/core_language/26_module_control/2602_the_control_part/NegSem_2602_TheControlPart_024.ttcn create mode 100644 ATS/core_language/26_module_control/2602_the_control_part/NegSem_2602_TheControlPart_025.ttcn create mode 100644 ATS/core_language/26_module_control/2602_the_control_part/NegSem_2602_TheControlPart_026.ttcn create mode 100644 ATS/core_language/26_module_control/2602_the_control_part/NegSem_2602_TheControlPart_027.ttcn create mode 100644 ATS/core_language/26_module_control/2602_the_control_part/NegSem_2602_TheControlPart_028.ttcn create mode 100644 ATS/core_language/26_module_control/2602_the_control_part/NegSem_2602_TheControlPart_029.ttcn create mode 100644 ATS/core_language/26_module_control/2602_the_control_part/NegSem_2602_TheControlPart_030.ttcn create mode 100644 ATS/core_language/26_module_control/2602_the_control_part/NegSem_2602_TheControlPart_031.ttcn create mode 100644 ATS/core_language/26_module_control/2602_the_control_part/NegSem_2602_TheControlPart_032.ttcn create mode 100644 ATS/core_language/26_module_control/2602_the_control_part/NegSem_2602_TheControlPart_033.ttcn create mode 100644 ATS/core_language/26_module_control/2602_the_control_part/NegSem_2602_TheControlPart_034.ttcn create mode 100644 ATS/core_language/26_module_control/2602_the_control_part/NegSem_2602_TheControlPart_035.ttcn create mode 100644 ATS/core_language/26_module_control/2602_the_control_part/Sem_2602_TheControlPart_001.ttcn create mode 100644 ATS/core_language/26_module_control/2602_the_control_part/Sem_2602_TheControlPart_002.ttcn create mode 100644 ATS/core_language/26_module_control/2602_the_control_part/Sem_2602_TheControlPart_003.ttcn create mode 100644 ATS/core_language/26_module_control/26_toplevel/Syn_26_ModuleControl_001.ttcn create mode 100644 ATS/core_language/26_module_control/26_toplevel/Syn_26_ModuleControl_002.ttcn create mode 100644 ATS/core_language/26_module_control/26_toplevel/Syn_26_ModuleControl_003.ttcn create mode 100644 ATS/core_language/26_module_control/26_toplevel/Syn_26_ModuleControl_004.ttcn create mode 100644 ATS/core_language/26_module_control/26_toplevel/Syn_26_ModuleControl_005.ttcn create mode 100644 ATS/core_language/26_module_control/26_toplevel/Syn_26_ModuleControl_006.ttcn create mode 100644 ATS/core_language/26_module_control/26_toplevel/Syn_26_ModuleControl_007.ttcn create mode 100644 ATS/core_language/26_module_control/26_toplevel/Syn_26_ModuleControl_008.ttcn create mode 100644 ATS/core_language/26_module_control/26_toplevel/Syn_26_ModuleControl_009.ttcn create mode 100644 ATS/core_language/26_module_control/26_toplevel/Syn_26_ModuleControl_010.ttcn create mode 100644 ATS/core_language/26_module_control/26_toplevel/Syn_26_ModuleControl_011.ttcn create mode 100644 ATS/core_language/26_module_control/26_toplevel/Syn_26_ModuleControl_012.ttcn create mode 100644 ATS/core_language/26_module_control/26_toplevel/Syn_26_ModuleControl_013.ttcn create mode 100644 ATS/core_language/26_module_control/26_toplevel/Syn_26_ModuleControl_015.ttcn create mode 100644 ATS/core_language/26_module_control/26_toplevel/Syn_26_ModuleControl_016.ttcn create mode 100644 ATS/core_language/26_module_control/26_toplevel/Syn_26_ModuleControl_017.ttcn create mode 100644 ATS/core_language/27_specifying_attributes/2701_attribute_mechanism/270101_scope_of_attributes/Syn_270101_ScopeOfAttributes_001.ttcn create mode 100644 ATS/core_language/27_specifying_attributes/2701_attribute_mechanism/270101_scope_of_attributes/Syn_270101_ScopeOfAttributes_002.ttcn create mode 100644 ATS/core_language/27_specifying_attributes/2701_attribute_mechanism/270101_scope_of_attributes/Syn_270101_ScopeOfAttributes_003.ttcn create mode 100644 ATS/core_language/27_specifying_attributes/2701_attribute_mechanism/270101_scope_of_attributes/Syn_270101_ScopeOfAttributes_004.ttcn create mode 100644 ATS/core_language/27_specifying_attributes/2701_attribute_mechanism/270101_scope_of_attributes/Syn_270101_ScopeOfAttributes_005.ttcn create mode 100644 ATS/core_language/27_specifying_attributes/2701_attribute_mechanism/270102_overwriting_rules/27010200_general/Sem_27010200_general_001.ttcn create mode 100644 ATS/core_language/27_specifying_attributes/2701_attribute_mechanism/270102_overwriting_rules/27010200_general/Sem_27010200_general_002.ttcn create mode 100644 ATS/core_language/27_specifying_attributes/2701_attribute_mechanism/270102_overwriting_rules/27010200_general/Sem_27010200_general_003.ttcn create mode 100644 ATS/core_language/27_specifying_attributes/2701_attribute_mechanism/270102_overwriting_rules/27010200_general/Sem_27010200_general_004.ttcn create mode 100644 ATS/core_language/27_specifying_attributes/2701_attribute_mechanism/270102_overwriting_rules/27010200_general/Sem_27010200_general_005.ttcn create mode 100644 ATS/core_language/27_specifying_attributes/2701_attribute_mechanism/270102_overwriting_rules/27010200_general/Sem_27010200_general_006.ttcn create mode 100644 ATS/core_language/27_specifying_attributes/2701_attribute_mechanism/270102_overwriting_rules/27010200_general/Sem_27010200_general_007.ttcn create mode 100644 ATS/core_language/27_specifying_attributes/2701_attribute_mechanism/270102_overwriting_rules/27010200_general/Sem_27010200_general_008.ttcn create mode 100644 ATS/core_language/27_specifying_attributes/2701_attribute_mechanism/270102_overwriting_rules/27010200_general/Sem_27010200_general_009.ttcn create mode 100644 ATS/core_language/27_specifying_attributes/2701_attribute_mechanism/270102_overwriting_rules/27010200_general/Sem_27010200_general_010.ttcn create mode 100644 ATS/core_language/27_specifying_attributes/2701_attribute_mechanism/270102_overwriting_rules/27010200_general/Sem_27010200_general_011.ttcn create mode 100644 ATS/core_language/27_specifying_attributes/2701_attribute_mechanism/270102_overwriting_rules/27010200_general/Sem_27010200_general_012.ttcn create mode 100644 ATS/core_language/27_specifying_attributes/2701_attribute_mechanism/270102_overwriting_rules/27010200_general/Sem_27010200_general_013.ttcn create mode 100644 ATS/core_language/27_specifying_attributes/2701_attribute_mechanism/270102_overwriting_rules/27010200_general/Sem_27010200_general_014.ttcn create mode 100644 ATS/core_language/27_specifying_attributes/2701_attribute_mechanism/270102_overwriting_rules/27010200_general/Sem_27010200_general_015.ttcn create mode 100644 ATS/core_language/27_specifying_attributes/2701_attribute_mechanism/270102_overwriting_rules/27010200_general/Sem_27010200_general_016.ttcn create mode 100644 ATS/core_language/27_specifying_attributes/2701_attribute_mechanism/270102_overwriting_rules/27010201_rules_for_variant_attributes/Sem_27010201_rules_for_variant_attributes_001.ttcn create mode 100644 ATS/core_language/27_specifying_attributes/2701_attribute_mechanism/270102_overwriting_rules/27010201_rules_for_variant_attributes/Sem_27010201_rules_for_variant_attributes_002.ttcn create mode 100644 ATS/core_language/27_specifying_attributes/2701_attribute_mechanism/270102_overwriting_rules/27010201_rules_for_variant_attributes/Sem_27010201_rules_for_variant_attributes_003.ttcn create mode 100644 ATS/core_language/27_specifying_attributes/2701_attribute_mechanism/270102_overwriting_rules/27010202_rules_for_multiple_encodings/Sem_27010202_rules_for_multiple_encodings_001.ttcn create mode 100644 ATS/core_language/27_specifying_attributes/2701_attribute_mechanism/270102_overwriting_rules/27010202_rules_for_multiple_encodings/Sem_27010202_rules_for_multiple_encodings_002.ttcn create mode 100644 ATS/core_language/27_specifying_attributes/2701_attribute_mechanism/270103_attributes_of_imported_elements/Sem_270103_attributes_of_imported_elements_001.ttcn create mode 100644 ATS/core_language/27_specifying_attributes/2702_the_with_statement/NegSem_2702_the_with_statement_001.ttcn create mode 100644 ATS/core_language/27_specifying_attributes/2702_the_with_statement/NegSem_2702_the_with_statement_002.ttcn create mode 100644 ATS/core_language/27_specifying_attributes/2702_the_with_statement/NegSem_2702_the_with_statement_003.ttcn create mode 100644 ATS/core_language/27_specifying_attributes/2702_the_with_statement/NegSem_2702_the_with_statement_004.ttcn create mode 100644 ATS/core_language/27_specifying_attributes/2702_the_with_statement/NegSem_2702_the_with_statement_005.ttcn create mode 100644 ATS/core_language/27_specifying_attributes/2702_the_with_statement/NegSem_2702_the_with_statement_006.ttcn create mode 100644 ATS/core_language/27_specifying_attributes/2702_the_with_statement/NegSem_2702_the_with_statement_007.ttcn create mode 100644 ATS/core_language/27_specifying_attributes/2702_the_with_statement/NegSem_2702_the_with_statement_008.ttcn create mode 100644 ATS/core_language/27_specifying_attributes/2702_the_with_statement/NegSem_2702_the_with_statement_009.ttcn create mode 100644 ATS/core_language/27_specifying_attributes/2702_the_with_statement/NegSem_2702_the_with_statement_010.ttcn create mode 100644 ATS/core_language/27_specifying_attributes/2702_the_with_statement/NegSem_2702_the_with_statement_011.ttcn create mode 100644 ATS/core_language/27_specifying_attributes/2702_the_with_statement/NegSyn_2702_the_with_statement_001.ttcn create mode 100644 ATS/core_language/27_specifying_attributes/2702_the_with_statement/Sem_2702_the_with_statement_001.ttcn create mode 100644 ATS/core_language/27_specifying_attributes/2702_the_with_statement/Sem_2702_the_with_statement_002.ttcn create mode 100644 ATS/core_language/27_specifying_attributes/2702_the_with_statement/Sem_2702_the_with_statement_003.ttcn create mode 100644 ATS/core_language/27_specifying_attributes/2702_the_with_statement/Sem_2702_the_with_statement_004.ttcn create mode 100644 ATS/core_language/27_specifying_attributes/2702_the_with_statement/Sem_2702_the_with_statement_005.ttcn create mode 100644 ATS/core_language/27_specifying_attributes/2702_the_with_statement/Sem_2702_the_with_statement_006.ttcn create mode 100644 ATS/core_language/27_specifying_attributes/2702_the_with_statement/Sem_2702_the_with_statement_007.ttcn create mode 100644 ATS/core_language/27_specifying_attributes/2702_the_with_statement/Sem_2702_the_with_statement_008.ttcn create mode 100644 ATS/core_language/27_specifying_attributes/2703_display_attributes/NegSem_2703_display_attributes_001.ttcn create mode 100644 ATS/core_language/27_specifying_attributes/2703_display_attributes/NegSem_2703_display_attributes_002.ttcn create mode 100644 ATS/core_language/27_specifying_attributes/2703_display_attributes/NegSem_2703_display_attributes_003.ttcn create mode 100644 ATS/core_language/27_specifying_attributes/2703_display_attributes/Sem_2703_display_attributes_001.ttcn create mode 100644 ATS/core_language/27_specifying_attributes/2704_encoding_attributes/Sem_2704_encoding_attributes_001.ttcn create mode 100644 ATS/core_language/27_specifying_attributes/2704_encoding_attributes/Sem_2704_encoding_attributes_002.ttcn create mode 100644 ATS/core_language/27_specifying_attributes/2705_variant_attributes/NegSem_2705_variant_attributes_001.ttcn create mode 100644 ATS/core_language/27_specifying_attributes/2705_variant_attributes/NegSem_2705_variant_attributes_002.ttcn create mode 100644 ATS/core_language/27_specifying_attributes/2705_variant_attributes/NegSem_2705_variant_attributes_003.ttcn create mode 100644 ATS/core_language/27_specifying_attributes/2705_variant_attributes/Sem_2705_variant_attributes_001.ttcn create mode 100644 ATS/core_language/27_specifying_attributes/2705_variant_attributes/Sem_2705_variant_attributes_002.ttcn create mode 100644 ATS/core_language/27_specifying_attributes/2705_variant_attributes/Sem_2705_variant_attributes_003.ttcn create mode 100644 ATS/core_language/27_specifying_attributes/2705_variant_attributes/Sem_2705_variant_attributes_004.ttcn create mode 100644 ATS/core_language/27_specifying_attributes/2706_extension_attributes/Sem_2706_extension_attributes_001.ttcn create mode 100644 ATS/core_language/27_specifying_attributes/2706_extension_attributes/Sem_2706_extension_attributes_002.ttcn create mode 100644 ATS/core_language/27_specifying_attributes/2707_optional_attributes/NegSem_2707_OptionalAttributes_001.ttcn create mode 100644 ATS/core_language/27_specifying_attributes/2707_optional_attributes/NegSem_2707_OptionalAttributes_002.ttcn create mode 100644 ATS/core_language/27_specifying_attributes/2707_optional_attributes/NegSem_2707_OptionalAttributes_003.ttcn create mode 100644 ATS/core_language/27_specifying_attributes/2707_optional_attributes/Sem_2707_OptionalAttributes_001.ttcn create mode 100644 ATS/core_language/27_specifying_attributes/2707_optional_attributes/Sem_2707_OptionalAttributes_002.ttcn create mode 100644 ATS/core_language/27_specifying_attributes/2707_optional_attributes/Sem_2707_OptionalAttributes_003.ttcn create mode 100644 ATS/core_language/27_specifying_attributes/2707_optional_attributes/Sem_2707_OptionalAttributes_004.ttcn create mode 100644 ATS/core_language/27_specifying_attributes/2707_optional_attributes/Sem_2707_OptionalAttributes_005.ttcn create mode 100644 ATS/core_language/27_specifying_attributes/2707_optional_attributes/Sem_2707_OptionalAttributes_006.ttcn create mode 100644 ATS/core_language/27_specifying_attributes/2707_optional_attributes/Sem_2707_OptionalAttributes_007.ttcn create mode 100644 ATS/core_language/27_specifying_attributes/2707_optional_attributes/Syn_2707_OptionalAttributes_001.ttcn create mode 100644 ATS/core_language/27_specifying_attributes/2709_dynamic_configuration/NegSem_2709_dynamic_configuration_001.ttcn create mode 100644 ATS/core_language/27_specifying_attributes/2709_dynamic_configuration/NegSem_2709_dynamic_configuration_002.ttcn create mode 100644 ATS/core_language/27_specifying_attributes/2709_dynamic_configuration/NegSem_2709_dynamic_configuration_003.ttcn create mode 100644 ATS/core_language/27_specifying_attributes/2709_dynamic_configuration/NegSem_2709_dynamic_configuration_004.ttcn create mode 100644 ATS/core_language/27_specifying_attributes/2709_dynamic_configuration/Sem_2709_dynamic_configuration_001.ttcn create mode 100644 ATS/core_language/27_specifying_attributes/2709_dynamic_configuration/Sem_2709_dynamic_configuration_002.ttcn create mode 100644 ATS/core_language/27_specifying_attributes/2709_dynamic_configuration/Sem_2709_dynamic_configuration_003.ttcn create mode 100644 ATS/core_language/27_specifying_attributes/2709_dynamic_configuration/Sem_2709_dynamic_configuration_004.ttcn create mode 100644 ATS/core_language/27_specifying_attributes/NOTES create mode 100644 ATS/core_language/B_matching_incoming_values/B01_template_matching/B0101_matching_specific_values/B010101_omitting_values/NegSem_B010101_omitting_values_001.ttcn create mode 100644 ATS/core_language/B_matching_incoming_values/B01_template_matching/B0101_matching_specific_values/B010101_omitting_values/Sem_B010101_omitting_values_001.ttcn create mode 100644 ATS/core_language/B_matching_incoming_values/B01_template_matching/B0101_matching_specific_values/B010101_omitting_values/Sem_B010101_omitting_values_002.ttcn create mode 100644 ATS/core_language/B_matching_incoming_values/B01_template_matching/B0101_matching_specific_values/B0101_toplevel/Sem_B0101_matching_specific_value_001.ttcn create mode 100644 ATS/core_language/B_matching_incoming_values/B01_template_matching/B0101_matching_specific_values/B0101_toplevel/Sem_B0101_matching_specific_value_002.ttcn create mode 100644 ATS/core_language/B_matching_incoming_values/B01_template_matching/B0101_matching_specific_values/B0101_toplevel/Sem_B0101_matching_specific_value_003.ttcn create mode 100644 ATS/core_language/B_matching_incoming_values/B01_template_matching/B0101_matching_specific_values/B0101_toplevel/Sem_B0101_matching_specific_value_004.ttcn create mode 100644 ATS/core_language/B_matching_incoming_values/B01_template_matching/B0101_matching_specific_values/B0101_toplevel/Sem_B0101_matching_specific_value_005.ttcn create mode 100644 ATS/core_language/B_matching_incoming_values/B01_template_matching/B0101_matching_specific_values/B0101_toplevel/Sem_B0101_matching_specific_value_006.ttcn create mode 100644 ATS/core_language/B_matching_incoming_values/B01_template_matching/B0101_matching_specific_values/B0101_toplevel/Sem_B0101_matching_specific_value_007.ttcn create mode 100644 ATS/core_language/B_matching_incoming_values/B01_template_matching/B0101_matching_specific_values/B0101_toplevel/Sem_B0101_matching_specific_value_008.ttcn create mode 100644 ATS/core_language/B_matching_incoming_values/B01_template_matching/B0101_matching_specific_values/B0101_toplevel/Sem_B0101_matching_specific_value_009.ttcn create mode 100644 ATS/core_language/B_matching_incoming_values/B01_template_matching/B0101_matching_specific_values/B0101_toplevel/Sem_B0101_matching_specific_value_010.ttcn create mode 100644 ATS/core_language/B_matching_incoming_values/B01_template_matching/B0101_matching_specific_values/B0101_toplevel/Sem_B0101_matching_specific_value_011.ttcn create mode 100644 ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010201_value_list/NegSem_B010201_value_list_001.ttcn create mode 100644 ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010201_value_list/NegSem_B010201_value_list_002.ttcn create mode 100644 ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010201_value_list/NegSem_B010201_value_list_003.ttcn create mode 100644 ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010201_value_list/NegSem_B010201_value_list_004.ttcn create mode 100644 ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010201_value_list/Sem_B010201_value_list_001.ttcn create mode 100644 ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010201_value_list/Sem_B010201_value_list_002.ttcn create mode 100644 ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010201_value_list/Sem_B010201_value_list_003.ttcn create mode 100644 ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010201_value_list/Sem_B010201_value_list_004.ttcn create mode 100644 ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010202_complemented_value_list/NegSem_B010202_complemented_value_list_001.ttcn create mode 100644 ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010202_complemented_value_list/NegSem_B010202_complemented_value_list_002.ttcn create mode 100644 ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010202_complemented_value_list/NegSem_B010202_complemented_value_list_003.ttcn create mode 100644 ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010202_complemented_value_list/NegSem_B010202_complemented_value_list_004.ttcn create mode 100644 ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010202_complemented_value_list/Sem_B010202_complemented_value_list_001.ttcn create mode 100644 ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010202_complemented_value_list/Sem_B010202_complemented_value_list_002.ttcn create mode 100644 ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010202_complemented_value_list/Sem_B010202_complemented_value_list_003.ttcn create mode 100644 ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010202_complemented_value_list/Sem_B010202_complemented_value_list_004.ttcn create mode 100644 ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010202_complemented_value_list/Sem_B010202_complemented_value_list_005.ttcn create mode 100644 ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010202_complemented_value_list/Sem_B010202_complemented_value_list_006.ttcn create mode 100644 ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010202_complemented_value_list/Sem_B010202_complemented_value_list_007.ttcn create mode 100644 ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010202_complemented_value_list/Sem_B010202_complemented_value_list_008.ttcn create mode 100644 ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010203_any_value/Sem_B010203_any_value_001.ttcn create mode 100644 ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010203_any_value/Sem_B010203_any_value_002.ttcn create mode 100644 ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010204_any_value_or_none/NegSem_B010204_any_value_or_none_001.ttcn create mode 100644 ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010204_any_value_or_none/NegSem_B010204_any_value_or_none_002.ttcn create mode 100644 ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010204_any_value_or_none/Sem_B010204_any_value_or_none_001.ttcn create mode 100644 ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010204_any_value_or_none/Sem_B010204_any_value_or_none_002.ttcn create mode 100644 ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010204_any_value_or_none/Sem_B010204_any_value_or_none_003.ttcn create mode 100644 ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010204_any_value_or_none/Sem_B010204_any_value_or_none_004.ttcn create mode 100644 ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010204_any_value_or_none/Sem_B010204_any_value_or_none_005.ttcn create mode 100644 ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010205_value_range/NegSem_B010205_value_range_001.ttcn create mode 100644 ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010205_value_range/NegSem_B010205_value_range_002.ttcn create mode 100644 ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010205_value_range/NegSem_B010205_value_range_003.ttcn create mode 100644 ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010205_value_range/Sem_B010205_value_range_001.ttcn create mode 100644 ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010205_value_range/Sem_B010205_value_range_002.ttcn create mode 100644 ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010205_value_range/Sem_B010205_value_range_003.ttcn create mode 100644 ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010205_value_range/Sem_B010205_value_range_004.ttcn create mode 100644 ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010205_value_range/Sem_B010205_value_range_005.ttcn create mode 100644 ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010205_value_range/Sem_B010205_value_range_006.ttcn create mode 100644 ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010205_value_range/Sem_B010205_value_range_007.ttcn create mode 100644 ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010205_value_range/Sem_B010205_value_range_008.ttcn create mode 100644 ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010206_superset/NegSem_B010206_superset_001.ttcn create mode 100644 ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010206_superset/NegSem_B010206_superset_002.ttcn create mode 100644 ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010206_superset/NegSem_B010206_superset_003.ttcn create mode 100644 ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010206_superset/NegSem_B010206_superset_004.ttcn create mode 100644 ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010206_superset/NegSem_B010206_superset_005.ttcn create mode 100644 ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010206_superset/NegSem_B010206_superset_006.ttcn create mode 100644 ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010206_superset/NegSem_B010206_superset_007.ttcn create mode 100644 ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010206_superset/NegSem_B010206_superset_008.ttcn create mode 100644 ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010206_superset/NegSem_B010206_superset_009.ttcn create mode 100644 ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010206_superset/Sem_B010206_superset_001.ttcn create mode 100644 ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010206_superset/Sem_B010206_superset_002.ttcn create mode 100644 ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010206_superset/Sem_B010206_superset_003.ttcn create mode 100644 ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010206_superset/Sem_B010206_superset_004.ttcn create mode 100644 ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010206_superset/Sem_B010206_superset_005.ttcn create mode 100644 ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010206_superset/Sem_B010206_superset_006.ttcn create mode 100644 ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010206_superset/Sem_B010206_superset_007.ttcn create mode 100644 ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010206_superset/Sem_B010206_superset_008.ttcn create mode 100644 ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010207_subset/NegSem_B010207_subset_001.ttcn create mode 100644 ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010207_subset/NegSem_B010207_subset_002.ttcn create mode 100644 ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010207_subset/NegSem_B010207_subset_003.ttcn create mode 100644 ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010207_subset/NegSem_B010207_subset_004.ttcn create mode 100644 ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010207_subset/NegSem_B010207_subset_005.ttcn create mode 100644 ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010207_subset/NegSem_B010207_subset_006.ttcn create mode 100644 ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010207_subset/NegSem_B010207_subset_007.ttcn create mode 100644 ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010207_subset/NegSem_B010207_subset_008.ttcn create mode 100644 ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010207_subset/Sem_B010207_subset_001.ttcn create mode 100644 ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010207_subset/Sem_B010207_subset_002.ttcn create mode 100644 ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010207_subset/Sem_B010207_subset_003.ttcn create mode 100644 ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010207_subset/Sem_B010207_subset_004.ttcn create mode 100644 ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010207_subset/Sem_B010207_subset_005.ttcn create mode 100644 ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010207_subset/Sem_B010207_subset_006.ttcn create mode 100644 ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010207_subset/Sem_B010207_subset_007.ttcn create mode 100644 ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010207_subset/Sem_B010207_subset_008.ttcn create mode 100644 ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010208_omit_value/NegSem_B010208_omit_value_001.ttcn create mode 100644 ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010208_omit_value/NegSem_B010208_omit_value_002.ttcn create mode 100644 ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010208_omit_value/NegSyn_B010208_omit_value_001.ttcn create mode 100644 ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010208_omit_value/Sem_B010208_omit_value_001.ttcn create mode 100644 ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010208_omit_value/Sem_B010208_omit_value_002.ttcn create mode 100644 ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010208_omit_value/Sem_B010208_omit_value_003.ttcn create mode 100644 ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010208_omit_value/Sem_B010208_omit_value_004.ttcn create mode 100644 ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010208_omit_value/Sem_B010208_omit_value_005.ttcn create mode 100644 ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010209_decoded_content/Sem_B010209_decoded_content_001.ttcn create mode 100644 ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010209_decoded_content/Sem_B010209_decoded_content_002.ttcn create mode 100644 ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010209_decoded_content/Sem_B010209_decoded_content_003.ttcn create mode 100644 ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010209_decoded_content/Sem_B010209_decoded_content_004.ttcn create mode 100644 ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010209_decoded_content/Sem_B010209_decoded_content_005.ttcn create mode 100644 ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010210_enumerated_value_list/Sem_B010210_enumerated_value_list_001.ttcn create mode 100644 ATS/core_language/B_matching_incoming_values/B01_template_matching/B0103_matching_inside_values/B010301_any_element/Sem_B010301_any_element_001.ttcn create mode 100644 ATS/core_language/B_matching_incoming_values/B01_template_matching/B0103_matching_inside_values/B010301_any_element/Sem_B010301_any_element_002.ttcn create mode 100644 ATS/core_language/B_matching_incoming_values/B01_template_matching/B0103_matching_inside_values/B010301_any_element/Sem_B010301_any_element_003.ttcn create mode 100644 ATS/core_language/B_matching_incoming_values/B01_template_matching/B0103_matching_inside_values/B010301_any_element/Sem_B010301_any_element_004.ttcn create mode 100644 ATS/core_language/B_matching_incoming_values/B01_template_matching/B0103_matching_inside_values/B010301_any_element/Sem_B010301_any_element_005.ttcn create mode 100644 ATS/core_language/B_matching_incoming_values/B01_template_matching/B0103_matching_inside_values/B010301_any_element/Sem_B010301_any_element_006.ttcn create mode 100644 ATS/core_language/B_matching_incoming_values/B01_template_matching/B0103_matching_inside_values/B010301_any_element/Sem_B010301_any_element_007.ttcn create mode 100644 ATS/core_language/B_matching_incoming_values/B01_template_matching/B0103_matching_inside_values/B010301_any_element/Sem_B010301_any_element_008.ttcn create mode 100644 ATS/core_language/B_matching_incoming_values/B01_template_matching/B0103_matching_inside_values/B010302_any_number_of_elements_or_none/Sem_B010302_any_number_of_elements_or_none_001.ttcn create mode 100644 ATS/core_language/B_matching_incoming_values/B01_template_matching/B0103_matching_inside_values/B010302_any_number_of_elements_or_none/Sem_B010302_any_number_of_elements_or_none_002.ttcn create mode 100644 ATS/core_language/B_matching_incoming_values/B01_template_matching/B0103_matching_inside_values/B010302_any_number_of_elements_or_none/Sem_B010302_any_number_of_elements_or_none_003.ttcn create mode 100644 ATS/core_language/B_matching_incoming_values/B01_template_matching/B0103_matching_inside_values/B010303_permutation/NegSem_B010303_permutation_001.ttcn create mode 100644 ATS/core_language/B_matching_incoming_values/B01_template_matching/B0103_matching_inside_values/B010303_permutation/NegSem_B010303_permutation_002.ttcn create mode 100644 ATS/core_language/B_matching_incoming_values/B01_template_matching/B0103_matching_inside_values/B010303_permutation/NegSem_B010303_permutation_003.ttcn create mode 100644 ATS/core_language/B_matching_incoming_values/B01_template_matching/B0103_matching_inside_values/B010303_permutation/NegSem_B010303_permutation_004.ttcn create mode 100644 ATS/core_language/B_matching_incoming_values/B01_template_matching/B0103_matching_inside_values/B010303_permutation/NegSem_B010303_permutation_005.ttcn create mode 100644 ATS/core_language/B_matching_incoming_values/B01_template_matching/B0103_matching_inside_values/B010303_permutation/NegSem_B010303_permutation_006.ttcn create mode 100644 ATS/core_language/B_matching_incoming_values/B01_template_matching/B0103_matching_inside_values/B010303_permutation/Sem_B010303_permutation_001.ttcn create mode 100644 ATS/core_language/B_matching_incoming_values/B01_template_matching/B0103_matching_inside_values/B010303_permutation/Sem_B010303_permutation_002.ttcn create mode 100644 ATS/core_language/B_matching_incoming_values/B01_template_matching/B0103_matching_inside_values/B010303_permutation/Sem_B010303_permutation_003.ttcn create mode 100644 ATS/core_language/B_matching_incoming_values/B01_template_matching/B0103_matching_inside_values/B010303_permutation/Sem_B010303_permutation_004.ttcn create mode 100644 ATS/core_language/B_matching_incoming_values/B01_template_matching/B0103_matching_inside_values/B010303_permutation/Sem_B010303_permutation_005.ttcn create mode 100644 ATS/core_language/B_matching_incoming_values/B01_template_matching/B0103_matching_inside_values/B010303_permutation/Sem_B010303_permutation_006.ttcn create mode 100644 ATS/core_language/B_matching_incoming_values/B01_template_matching/B0103_matching_inside_values/B010303_permutation/Sem_B010303_permutation_007.ttcn create mode 100644 ATS/core_language/B_matching_incoming_values/B01_template_matching/B0103_matching_inside_values/B010303_permutation/Sem_B010303_permutation_008.ttcn create mode 100644 ATS/core_language/B_matching_incoming_values/B01_template_matching/B0103_matching_inside_values/B010303_permutation/Sem_B010303_permutation_009.ttcn create mode 100644 ATS/core_language/B_matching_incoming_values/B01_template_matching/B0104_matching_attributes_of_values/B010401_length_restrictions/NegSem_B010401_length_restrictions_003.ttcn create mode 100644 ATS/core_language/B_matching_incoming_values/B01_template_matching/B0104_matching_attributes_of_values/B010401_length_restrictions/NegSem_B010401_length_restrictions_004.ttcn create mode 100644 ATS/core_language/B_matching_incoming_values/B01_template_matching/B0104_matching_attributes_of_values/B010401_length_restrictions/Sem_B010401_length_restrictions_001.ttcn create mode 100644 ATS/core_language/B_matching_incoming_values/B01_template_matching/B0104_matching_attributes_of_values/B010401_length_restrictions/Sem_B010401_length_restrictions_002.ttcn create mode 100644 ATS/core_language/B_matching_incoming_values/B01_template_matching/B0104_matching_attributes_of_values/B010401_length_restrictions/Sem_B010401_length_restrictions_003.ttcn create mode 100644 ATS/core_language/B_matching_incoming_values/B01_template_matching/B0104_matching_attributes_of_values/B010401_length_restrictions/Sem_B010401_length_restrictions_004.ttcn create mode 100644 ATS/core_language/B_matching_incoming_values/B01_template_matching/B0104_matching_attributes_of_values/B010402_ifPresent_indicator/NegSem_B010402_ifPresent_indicator_001.ttcn create mode 100644 ATS/core_language/B_matching_incoming_values/B01_template_matching/B0104_matching_attributes_of_values/B010402_ifPresent_indicator/Sem_B010402_ifPresent_indicator_001.ttcn create mode 100644 ATS/core_language/B_matching_incoming_values/B01_template_matching/B0104_matching_attributes_of_values/B010402_ifPresent_indicator/Sem_B010402_ifPresent_indicator_002.ttcn create mode 100644 ATS/core_language/B_matching_incoming_values/B01_template_matching/B0105_matching_character_pattern/B010501_set_expression/Sem_B010501_set_expression_001.ttcn create mode 100644 ATS/core_language/B_matching_incoming_values/B01_template_matching/B0105_matching_character_pattern/B010501_set_expression/Sem_B010501_set_expression_002.ttcn create mode 100644 ATS/core_language/B_matching_incoming_values/B01_template_matching/B0105_matching_character_pattern/B010501_set_expression/Sem_B010501_set_expression_003.ttcn create mode 100644 ATS/core_language/B_matching_incoming_values/B01_template_matching/B0105_matching_character_pattern/B010501_set_expression/Sem_B010501_set_expression_004.ttcn create mode 100644 ATS/core_language/B_matching_incoming_values/B01_template_matching/B0105_matching_character_pattern/B010501_set_expression/Sem_B010501_set_expression_005.ttcn create mode 100644 ATS/core_language/B_matching_incoming_values/B01_template_matching/B0105_matching_character_pattern/B010501_set_expression/Sem_B010501_set_expression_006.ttcn create mode 100644 ATS/core_language/B_matching_incoming_values/B01_template_matching/B0105_matching_character_pattern/B010502_reference_expression/Sem_B010502_reference_expression_001.ttcn create mode 100644 ATS/core_language/B_matching_incoming_values/B01_template_matching/B0105_matching_character_pattern/B010502_reference_expression/Sem_B010502_reference_expression_002.ttcn create mode 100644 ATS/core_language/B_matching_incoming_values/B01_template_matching/B0105_matching_character_pattern/B010502_reference_expression/Sem_B010502_reference_expression_003.ttcn create mode 100644 ATS/core_language/B_matching_incoming_values/B01_template_matching/B0105_matching_character_pattern/B010502_reference_expression/Sem_B010502_reference_expression_004.ttcn create mode 100644 ATS/core_language/B_matching_incoming_values/B01_template_matching/B0105_matching_character_pattern/B010502_reference_expression/Sem_B010502_reference_expression_005.ttcn create mode 100644 ATS/core_language/B_matching_incoming_values/B01_template_matching/B0105_matching_character_pattern/B010502_reference_expression/Sem_B010502_reference_expression_006.ttcn create mode 100644 ATS/core_language/B_matching_incoming_values/B01_template_matching/B0105_matching_character_pattern/B010502_reference_expression/Sem_B010502_reference_expression_007.ttcn create mode 100644 ATS/core_language/B_matching_incoming_values/B01_template_matching/B0105_matching_character_pattern/B010502_reference_expression/Sem_B010502_reference_expression_008.ttcn create mode 100644 ATS/core_language/B_matching_incoming_values/B01_template_matching/B0105_matching_character_pattern/B010502_reference_expression/Sem_B010502_reference_expression_009.ttcn create mode 100644 ATS/core_language/B_matching_incoming_values/B01_template_matching/B0105_matching_character_pattern/B010502_reference_expression/Sem_B010502_reference_expression_010.ttcn create mode 100644 ATS/core_language/B_matching_incoming_values/B01_template_matching/B0105_matching_character_pattern/B010502_reference_expression/Sem_B010502_reference_expression_011.ttcn create mode 100644 ATS/core_language/B_matching_incoming_values/B01_template_matching/B0105_matching_character_pattern/B010503_match_n_times/Sem_B010503_match_n_times_001.ttcn create mode 100644 ATS/core_language/B_matching_incoming_values/B01_template_matching/B0105_matching_character_pattern/B010503_match_n_times/Sem_B010503_match_n_times_002.ttcn create mode 100644 ATS/core_language/B_matching_incoming_values/B01_template_matching/B0105_matching_character_pattern/B010503_match_n_times/Sem_B010503_match_n_times_003.ttcn create mode 100644 ATS/core_language/B_matching_incoming_values/B01_template_matching/B0105_matching_character_pattern/B010503_match_n_times/Sem_B010503_match_n_times_004.ttcn create mode 100644 ATS/core_language/B_matching_incoming_values/B01_template_matching/B0105_matching_character_pattern/B010503_match_n_times/Sem_B010503_match_n_times_005.ttcn create mode 100644 ATS/core_language/B_matching_incoming_values/B01_template_matching/B0105_matching_character_pattern/B010504_match_referenced_characters/NegSem_B010504_match_referenced_characters_001.ttcn create mode 100644 ATS/core_language/B_matching_incoming_values/B01_template_matching/B0105_matching_character_pattern/B010504_match_referenced_characters/Sem_B010504_match_referenced_characters_001.ttcn create mode 100644 ATS/core_language/B_matching_incoming_values/B01_template_matching/B0105_matching_character_pattern/B010504_match_referenced_characters/Sem_B010504_match_referenced_characters_002.ttcn create mode 100644 ATS/core_language/B_matching_incoming_values/B01_template_matching/B0105_matching_character_pattern/B010504_match_referenced_characters/Sem_B010504_match_referenced_characters_003.ttcn create mode 100644 ATS/core_language/B_matching_incoming_values/B01_template_matching/B0105_matching_character_pattern/B010504_match_referenced_characters/Sem_B010504_match_referenced_characters_004.ttcn create mode 100644 ATS/core_language/B_matching_incoming_values/B01_template_matching/B0105_matching_character_pattern/B010504_match_referenced_characters/Sem_B010504_match_referenced_characters_005.ttcn create mode 100644 ATS/core_language/B_matching_incoming_values/B01_template_matching/B0105_matching_character_pattern/B010504_match_referenced_characters/Sem_B010504_match_referenced_characters_006.ttcn create mode 100644 ATS/core_language/B_matching_incoming_values/B01_template_matching/B0105_matching_character_pattern/B010504_match_referenced_characters/Sem_B010504_match_referenced_characters_007.ttcn create mode 100644 ATS/core_language/B_matching_incoming_values/B01_template_matching/B0105_matching_character_pattern/B010505_pattern_compatibility/NegSyn_B010505_pattern_compatibility_001.ttcn create mode 100644 ATS/core_language/B_matching_incoming_values/B01_template_matching/B0105_matching_character_pattern/B010505_pattern_compatibility/Sem_B010505_pattern_compatibility_001.ttcn create mode 100644 ATS/core_language/B_matching_incoming_values/B01_template_matching/B0105_matching_character_pattern/B010505_pattern_compatibility/Sem_B010505_pattern_compatibility_002.ttcn create mode 100644 ATS/core_language/B_matching_incoming_values/B01_template_matching/B0105_matching_character_pattern/B010506_case_sensitive_pattern_matching/Sem_B010506_case_sensitive_pattern_matching_001.ttcn create mode 100644 ATS/core_language/B_matching_incoming_values/B01_template_matching/B0105_matching_character_pattern/B010506_case_sensitive_pattern_matching/Sem_B010506_case_sensitive_pattern_matching_002.ttcn create mode 100644 ATS/core_language/B_matching_incoming_values/B01_template_matching/B0105_matching_character_pattern/B0105_toplevel/Sem_B0105_toplevel_001.ttcn create mode 100644 ATS/core_language/B_matching_incoming_values/B01_template_matching/B0105_matching_character_pattern/B0105_toplevel/Sem_B0105_toplevel_002.ttcn create mode 100644 ATS/core_language/C_predefined_functions/C06_Other_functions/C0602_The_testcasename_function/Sem_C0602_The_hostid_function_001.ttcn create mode 100644 ATS/core_language/C_predefined_functions/C06_Other_functions/C0602_The_testcasename_function/Sem_C0602_The_testcasename_function_001.ttcn create mode 100644 ATS/core_language/C_predefined_functions/NOTES create mode 100644 ATS/core_language/D_preprocessing_macros/D01_macro_module/Sem_D01_macro_module_001.ttcn create mode 100644 ATS/core_language/D_preprocessing_macros/D02_macro_file/Sem_D02_macro_file_001.ttcn create mode 100644 ATS/core_language/D_preprocessing_macros/D03_macro_bfile/Sem_D03_macro_bfile_001.ttcn create mode 100644 ATS/core_language/D_preprocessing_macros/D04_macro_line/Sem_D04_macro_line_001.ttcn create mode 100644 ATS/core_language/D_preprocessing_macros/D05_macro_scope/NegSem_D05_macro_scope_001.ttcn create mode 100644 ATS/core_language/D_preprocessing_macros/D05_macro_scope/Sem_D05_macro_scope_001.ttcn create mode 100644 ATS/core_language/D_preprocessing_macros/D05_macro_scope/Sem_D05_macro_scope_002.ttcn create mode 100644 ATS/core_language/NOTES create mode 100644 ATS/core_language/PROGRESS_FILE.txt create mode 100644 ATS/xml/05_mapping_xml_schemas/0501_namespaces/050101_namespaces/Pos_050101_namespaces_001/Pos_050101_namespaces_001.ttcn create mode 100644 ATS/xml/05_mapping_xml_schemas/0501_namespaces/050101_namespaces/Pos_050101_namespaces_001/Pos_050101_namespaces_001.xml create mode 100644 ATS/xml/05_mapping_xml_schemas/0501_namespaces/050101_namespaces/Pos_050101_namespaces_001/Pos_050101_namespaces_001.xsd create mode 100644 ATS/xml/05_mapping_xml_schemas/0501_namespaces/050101_namespaces/Pos_050101_namespaces_002/Pos_050101_namespaces_002.ttcn create mode 100644 ATS/xml/05_mapping_xml_schemas/0501_namespaces/050101_namespaces/Pos_050101_namespaces_002/Pos_050101_namespaces_002.xml create mode 100644 ATS/xml/05_mapping_xml_schemas/0501_namespaces/050101_namespaces/Pos_050101_namespaces_002/Pos_050101_namespaces_002.xsd create mode 100644 ATS/xml/05_mapping_xml_schemas/0501_namespaces/050101_namespaces/Pos_050101_namespaces_003/Pos_050101_namespaces_003.ttcn create mode 100644 ATS/xml/05_mapping_xml_schemas/0501_namespaces/050101_namespaces/Pos_050101_namespaces_003/Pos_050101_namespaces_003.xml create mode 100644 ATS/xml/05_mapping_xml_schemas/0501_namespaces/050101_namespaces/Pos_050101_namespaces_003/Pos_050101_namespaces_003.xsd create mode 100644 ATS/xml/05_mapping_xml_schemas/0501_namespaces/050101_namespaces/Pos_050101_namespaces_003/Pos_050101_namespaces_003_1.xsd create mode 100644 ATS/xml/05_mapping_xml_schemas/0501_namespaces/050101_namespaces/Pos_050101_namespaces_003/XmlDiff.log create mode 100644 ATS/xml/05_mapping_xml_schemas/0501_namespaces/050101_namespaces/Pos_050101_namespaces_003/test_data/Pos_050101_namespaces_003_merged.xsd create mode 100644 ATS/xml/05_mapping_xml_schemas/0501_namespaces/050101_namespaces/Pos_050101_namespaces_004/Pos_050101_namespaces_004.ttcn create mode 100644 ATS/xml/05_mapping_xml_schemas/0501_namespaces/050101_namespaces/Pos_050101_namespaces_004/Pos_050101_namespaces_004.xml create mode 100644 ATS/xml/05_mapping_xml_schemas/0501_namespaces/050101_namespaces/Pos_050101_namespaces_004/Pos_050101_namespaces_004.xsd create mode 100644 ATS/xml/05_mapping_xml_schemas/0501_namespaces/050101_namespaces/Pos_050101_namespaces_004/Pos_050101_namespaces_004_1.xsd create mode 100644 ATS/xml/05_mapping_xml_schemas/0501_namespaces/050101_namespaces/Pos_050101_namespaces_004/test_data/Pos_050101_namespaces_004_merged.xsd create mode 100644 ATS/xml/05_mapping_xml_schemas/0501_namespaces/050102_includes/Pos_050102_includes_001/Pos_050102_includes_001.ttcn create mode 100644 ATS/xml/05_mapping_xml_schemas/0501_namespaces/050102_includes/Pos_050102_includes_001/Pos_050102_includes_001.xml create mode 100644 ATS/xml/05_mapping_xml_schemas/0501_namespaces/050102_includes/Pos_050102_includes_001/Pos_050102_includes_001.xsd create mode 100644 ATS/xml/05_mapping_xml_schemas/0501_namespaces/050102_includes/Pos_050102_includes_001/Pos_050102_includes_001_1.xsd create mode 100644 ATS/xml/05_mapping_xml_schemas/0501_namespaces/050102_includes/Pos_050102_includes_002/Pos_050102_includes_002.ttcn create mode 100644 ATS/xml/05_mapping_xml_schemas/0501_namespaces/050102_includes/Pos_050102_includes_002/Pos_050102_includes_002.xml create mode 100644 ATS/xml/05_mapping_xml_schemas/0501_namespaces/050102_includes/Pos_050102_includes_002/Pos_050102_includes_002.xsd create mode 100644 ATS/xml/05_mapping_xml_schemas/0501_namespaces/050102_includes/Pos_050102_includes_002/Pos_050102_includes_002_1.xsd create mode 100644 ATS/xml/05_mapping_xml_schemas/0501_namespaces/050102_includes/Pos_050102_includes_003/Pos_050102_includes_003.ttcn create mode 100644 ATS/xml/05_mapping_xml_schemas/0501_namespaces/050102_includes/Pos_050102_includes_003/Pos_050102_includes_003.xml create mode 100644 ATS/xml/05_mapping_xml_schemas/0501_namespaces/050102_includes/Pos_050102_includes_003/Pos_050102_includes_003.xsd create mode 100644 ATS/xml/05_mapping_xml_schemas/0501_namespaces/050102_includes/Pos_050102_includes_003/Pos_050102_includes_003_1.xsd create mode 100644 ATS/xml/05_mapping_xml_schemas/0501_namespaces/050103_imports/Neg_050103_imports_001/Neg_050103_imports_001.ttcn create mode 100644 ATS/xml/05_mapping_xml_schemas/0501_namespaces/050103_imports/Neg_050103_imports_001/Neg_050103_imports_001.xsd create mode 100644 ATS/xml/05_mapping_xml_schemas/0501_namespaces/050103_imports/Neg_050103_imports_001/Neg_050103_imports_001_1.xsd create mode 100644 ATS/xml/05_mapping_xml_schemas/0501_namespaces/050103_imports/Pos_050103_imports_001/Pos_050103_imports_001.ttcn create mode 100644 ATS/xml/05_mapping_xml_schemas/0501_namespaces/050103_imports/Pos_050103_imports_001/Pos_050103_imports_001.xml create mode 100644 ATS/xml/05_mapping_xml_schemas/0501_namespaces/050103_imports/Pos_050103_imports_001/Pos_050103_imports_001.xsd create mode 100644 ATS/xml/05_mapping_xml_schemas/0501_namespaces/050103_imports/Pos_050103_imports_001/Pos_050103_imports_001_1.xsd create mode 100644 ATS/xml/05_mapping_xml_schemas/0501_namespaces/050104_attributes/Pos_050104_attributes_of_the_xsd_schema_element_001/Pos_050104_attributes_of_the_xsd_schema_element_001.ttcn create mode 100644 ATS/xml/05_mapping_xml_schemas/0501_namespaces/050104_attributes/Pos_050104_attributes_of_the_xsd_schema_element_001/Pos_050104_attributes_of_the_xsd_schema_element_001.xml create mode 100644 ATS/xml/05_mapping_xml_schemas/0501_namespaces/050104_attributes/Pos_050104_attributes_of_the_xsd_schema_element_001/Pos_050104_attributes_of_the_xsd_schema_element_001.xsd create mode 100644 ATS/xml/05_mapping_xml_schemas/0501_namespaces/050104_attributes/Pos_050104_attributes_of_the_xsd_schema_element_002/Pos_050104_attributes_of_the_xsd_schema_element_002.ttcn create mode 100644 ATS/xml/05_mapping_xml_schemas/0501_namespaces/050104_attributes/Pos_050104_attributes_of_the_xsd_schema_element_002/Pos_050104_attributes_of_the_xsd_schema_element_002.xml create mode 100644 ATS/xml/05_mapping_xml_schemas/0501_namespaces/050104_attributes/Pos_050104_attributes_of_the_xsd_schema_element_002/Pos_050104_attributes_of_the_xsd_schema_element_002.xsd create mode 100644 ATS/xml/05_mapping_xml_schemas/0501_namespaces/050104_attributes/Pos_050104_attributes_of_the_xsd_schema_element_003/Pos_050104_attributes_of_the_xsd_schema_element_003.ttcn create mode 100644 ATS/xml/05_mapping_xml_schemas/0501_namespaces/050104_attributes/Pos_050104_attributes_of_the_xsd_schema_element_003/Pos_050104_attributes_of_the_xsd_schema_element_003.xml create mode 100644 ATS/xml/05_mapping_xml_schemas/0501_namespaces/050104_attributes/Pos_050104_attributes_of_the_xsd_schema_element_003/Pos_050104_attributes_of_the_xsd_schema_element_003.xsd create mode 100644 ATS/xml/05_mapping_xml_schemas/0501_namespaces/050104_attributes/Pos_050104_attributes_of_the_xsd_schema_element_004/Pos_050104_attributes_of_the_xsd_schema_element_004.ttcn create mode 100644 ATS/xml/05_mapping_xml_schemas/0501_namespaces/050104_attributes/Pos_050104_attributes_of_the_xsd_schema_element_004/Pos_050104_attributes_of_the_xsd_schema_element_004.xml create mode 100644 ATS/xml/05_mapping_xml_schemas/0501_namespaces/050104_attributes/Pos_050104_attributes_of_the_xsd_schema_element_004/Pos_050104_attributes_of_the_xsd_schema_element_004.xsd create mode 100644 ATS/xml/05_mapping_xml_schemas/0501_namespaces/050104_attributes/Pos_050104_attributes_of_the_xsd_schema_element_005/Pos_050104_attributes_of_the_xsd_schema_element_005.ttcn create mode 100644 ATS/xml/05_mapping_xml_schemas/0501_namespaces/050104_attributes/Pos_050104_attributes_of_the_xsd_schema_element_005/Pos_050104_attributes_of_the_xsd_schema_element_005.xml create mode 100644 ATS/xml/05_mapping_xml_schemas/0501_namespaces/050104_attributes/Pos_050104_attributes_of_the_xsd_schema_element_005/Pos_050104_attributes_of_the_xsd_schema_element_005.xsd create mode 100644 ATS/xml/05_mapping_xml_schemas/0501_namespaces/050104_attributes/Pos_050104_attributes_of_the_xsd_schema_element_006/Pos_050104_attributes_of_the_xsd_schema_element_006.ttcn create mode 100644 ATS/xml/05_mapping_xml_schemas/0501_namespaces/050104_attributes/Pos_050104_attributes_of_the_xsd_schema_element_006/Pos_050104_attributes_of_the_xsd_schema_element_006.xml create mode 100644 ATS/xml/05_mapping_xml_schemas/0501_namespaces/050104_attributes/Pos_050104_attributes_of_the_xsd_schema_element_006/Pos_050104_attributes_of_the_xsd_schema_element_006.xsd create mode 100644 ATS/xml/05_mapping_xml_schemas/0501_namespaces_and_document_references/050101_namespaces/Pos_050101_namespaces_004/Pos_050101_namespaces_004.xml create mode 100644 ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_001/Pos_050202_name_conversion_rules_001.ttcn create mode 100644 ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_001/Pos_050202_name_conversion_rules_001.xml create mode 100644 ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_001/Pos_050202_name_conversion_rules_001.xsd create mode 100644 ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_002/Pos_050202_name_conversion_rules_002.ttcn create mode 100644 ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_002/Pos_050202_name_conversion_rules_002.xml create mode 100644 ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_002/Pos_050202_name_conversion_rules_002.xsd create mode 100644 ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_003/Pos_050202_name_conversion_rules_003.ttcn create mode 100644 ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_003/Pos_050202_name_conversion_rules_003.xml create mode 100644 ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_003/Pos_050202_name_conversion_rules_003.xsd create mode 100644 ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_004/Pos_050202_name_conversion_rules_004.ttcn create mode 100644 ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_004/Pos_050202_name_conversion_rules_004.xml create mode 100644 ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_004/Pos_050202_name_conversion_rules_004.xsd create mode 100644 ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_005/Pos_050202_name_conversion_rules_005.ttcn create mode 100644 ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_005/Pos_050202_name_conversion_rules_005.xml create mode 100644 ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_005/Pos_050202_name_conversion_rules_005.xsd create mode 100644 ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_006/Pos_050202_name_conversion_rules_006.ttcn create mode 100644 ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_006/Pos_050202_name_conversion_rules_006.xml create mode 100644 ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_006/Pos_050202_name_conversion_rules_006.xsd create mode 100644 ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_007/Pos_050202_name_conversion_rules_007.ttcn create mode 100644 ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_007/Pos_050202_name_conversion_rules_007.xml create mode 100644 ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_007/Pos_050202_name_conversion_rules_007.xsd create mode 100644 ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_008/Pos_050202_name_conversion_rules_008.ttcn create mode 100644 ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_008/Pos_050202_name_conversion_rules_008.xml create mode 100644 ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_008/Pos_050202_name_conversion_rules_008.xsd create mode 100644 ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_009/Pos_050202_name_conversion_rules_009.ttcn create mode 100644 ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_009/Pos_050202_name_conversion_rules_009.xml create mode 100644 ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_009/Pos_050202_name_conversion_rules_009.xsd create mode 100644 ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_010/Pos_050202_name_conversion_rules_010.ttcn create mode 100644 ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_010/Pos_050202_name_conversion_rules_010.xml create mode 100644 ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_010/Pos_050202_name_conversion_rules_010.xsd create mode 100644 ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_011/Pos_050202_name_conversion_rules_011.ttcn create mode 100644 ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_011/Pos_050202_name_conversion_rules_011.xml create mode 100644 ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_011/Pos_050202_name_conversion_rules_011.xsd create mode 100644 ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_012/Pos_050202_name_conversion_rules_012.ttcn create mode 100644 ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_012/Pos_050202_name_conversion_rules_012.xml create mode 100644 ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_012/Pos_050202_name_conversion_rules_012.xsd create mode 100644 ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_013/Pos_050202_name_conversion_rules_013.ttcn create mode 100644 ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_013/Pos_050202_name_conversion_rules_013.xml create mode 100644 ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_013/Pos_050202_name_conversion_rules_013.xsd create mode 100644 ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_014/Pos_050202_name_conversion_rules_014.ttcn create mode 100644 ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_014/Pos_050202_name_conversion_rules_014.xml create mode 100644 ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_014/Pos_050202_name_conversion_rules_014.xsd create mode 100644 ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_015/Pos_050202_name_conversion_rules_015.ttcn create mode 100644 ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_015/Pos_050202_name_conversion_rules_015.xml create mode 100644 ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_015/Pos_050202_name_conversion_rules_015.xsd create mode 100644 ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_016/Pos_050202_name_conversion_rules_016.ttcn create mode 100644 ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_016/Pos_050202_name_conversion_rules_016.xml create mode 100644 ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_016/Pos_050202_name_conversion_rules_016.xsd create mode 100644 ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_016/Pos_050202_name_conversion_rules_016_1.xsd create mode 100644 ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_017/Pos_050202_name_conversion_rules_017.ttcn create mode 100644 ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_017/Pos_050202_name_conversion_rules_017.xml create mode 100644 ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_017/Pos_050202_name_conversion_rules_017.xsd create mode 100644 ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_018/Pos_050202_name_conversion_rules_018.ttcn create mode 100644 ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_018/Pos_050202_name_conversion_rules_018.xml create mode 100644 ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_018/Pos_050202_name_conversion_rules_018.xsd create mode 100644 ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_019/Pos_050202_name_conversion_rules_019.ttcn create mode 100644 ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_019/Pos_050202_name_conversion_rules_019.xml create mode 100644 ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_019/Pos_050202_name_conversion_rules_019.xsd create mode 100644 ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_020/Pos_050202_name_conversion_rules_020.ttcn create mode 100644 ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_020/Pos_050202_name_conversion_rules_020.xml create mode 100644 ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_020/Pos_050202_name_conversion_rules_020.xsd create mode 100644 ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_021/Pos_050202_name_conversion_rules_021.ttcn create mode 100644 ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_021/Pos_050202_name_conversion_rules_021.xml create mode 100644 ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_021/Pos_050202_name_conversion_rules_021.xsd create mode 100644 ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_022/Pos_050202_name_conversion_rules_022.ttcn create mode 100644 ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_022/Pos_050202_name_conversion_rules_022.xml create mode 100644 ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_022/Pos_050202_name_conversion_rules_022.xsd create mode 100644 ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_023/Pos_050202_name_conversion_rules_023.ttcn create mode 100644 ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_023/Pos_050202_name_conversion_rules_023.xml create mode 100644 ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_023/Pos_050202_name_conversion_rules_023.xsd create mode 100644 ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_023/Pos_050202_name_conversion_rules_023_1.xsd create mode 100644 ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_024/Pos_050202_name_conversion_rules_024.ttcn create mode 100644 ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_024/Pos_050202_name_conversion_rules_024.xml create mode 100644 ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_024/Pos_050202_name_conversion_rules_024.xsd create mode 100644 ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_024/Pos_050202_name_conversion_rules_024_1.xsd create mode 100644 ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_025/Pos_050202_name_conversion_rules_025.ttcn create mode 100644 ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_025/Pos_050202_name_conversion_rules_025.xml create mode 100644 ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_025/Pos_050202_name_conversion_rules_025.xsd create mode 100644 ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_025/Pos_050202_name_conversion_rules_025_1.xsd create mode 100644 ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050203_order_of_the_mapping/Pos_050203_order_of_the_mapping_001/Pos_050203_order_of_the_mapping_001.ttcn create mode 100644 ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050203_order_of_the_mapping/Pos_050203_order_of_the_mapping_001/Pos_050203_order_of_the_mapping_001.xml create mode 100644 ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050203_order_of_the_mapping/Pos_050203_order_of_the_mapping_001/Pos_050203_order_of_the_mapping_001.xsd create mode 100644 ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050203_order_of_the_mapping/Pos_050203_order_of_the_mapping_002/Pos_050203_order_of_the_mapping_002.ttcn create mode 100644 ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050203_order_of_the_mapping/Pos_050203_order_of_the_mapping_002/Pos_050203_order_of_the_mapping_002.xml create mode 100644 ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050203_order_of_the_mapping/Pos_050203_order_of_the_mapping_002/Pos_050203_order_of_the_mapping_002.xsd create mode 100644 ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050203_order_of_the_mapping/Pos_050203_order_of_the_mapping_003/Pos_050203_order_of_the_mapping_003.ttcn create mode 100644 ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050203_order_of_the_mapping/Pos_050203_order_of_the_mapping_003/Pos_050203_order_of_the_mapping_003.xml create mode 100644 ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050203_order_of_the_mapping/Pos_050203_order_of_the_mapping_003/Pos_050203_order_of_the_mapping_003.xsd create mode 100644 ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050203_order_of_the_mapping/Pos_050203_order_of_the_mapping_004/Pos_050203_order_of_the_mapping_004.ttcn create mode 100644 ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050203_order_of_the_mapping/Pos_050203_order_of_the_mapping_004/Pos_050203_order_of_the_mapping_004.xml create mode 100644 ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050203_order_of_the_mapping/Pos_050203_order_of_the_mapping_004/Pos_050203_order_of_the_mapping_004.xsd create mode 100644 ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050203_order_of_the_mapping/Pos_050203_order_of_the_mapping_004/Pos_050203_order_of_the_mapping_004_1.xsd create mode 100644 ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050203_order_of_the_mapping/Pos_050203_order_of_the_mapping_004/Pos_050203_order_of_the_mapping_004_2.xsd create mode 100644 ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050203_order_of_the_mapping/Pos_050203_order_of_the_mapping_005/Pos_050203_order_of_the_mapping_005.ttcn create mode 100644 ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050203_order_of_the_mapping/Pos_050203_order_of_the_mapping_005/Pos_050203_order_of_the_mapping_005.xml create mode 100644 ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050203_order_of_the_mapping/Pos_050203_order_of_the_mapping_005/Pos_050203_order_of_the_mapping_005.xsd create mode 100644 ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050203_order_of_the_mapping/Pos_050203_order_of_the_mapping_005/Pos_050203_order_of_the_mapping_005_1.xsd create mode 100644 ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050203_order_of_the_mapping/Pos_050203_order_of_the_mapping_005/Pos_050203_order_of_the_mapping_005_2.xsd create mode 100644 ATS/xml/05_mapping_xml_schemas/05_top_level/Neg_05_top_level_001/Neg_05_top_level_001.ttcn create mode 100644 ATS/xml/05_mapping_xml_schemas/05_top_level/Neg_05_top_level_001/Neg_05_top_level_001.xsd create mode 100644 ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060101_length/Neg_060101_length_001/Neg_060101_length_001.ttcn create mode 100644 ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060101_length/Neg_060101_length_001/Neg_060101_length_001.xsd create mode 100644 ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060101_length/Pos_060101_length_001/Pos_060101_length_001.ttcn create mode 100644 ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060101_length/Pos_060101_length_001/Pos_060101_length_001.xml create mode 100644 ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060101_length/Pos_060101_length_001/Pos_060101_length_001.xsd create mode 100644 ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060101_length/Pos_060101_length_002/Pos_060101_length_002.ttcn create mode 100644 ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060101_length/Pos_060101_length_002/Pos_060101_length_002.xml create mode 100644 ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060101_length/Pos_060101_length_002/Pos_060101_length_002.xsd create mode 100644 ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060102_minlength/Neg_060102_minlength_001/Neg_060102_minlength_001.ttcn create mode 100644 ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060102_minlength/Neg_060102_minlength_001/Neg_060102_minlength_001.xsd create mode 100644 ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060102_minlength/Pos_060102_minlength_001/Pos_060102_minlength_001.ttcn create mode 100644 ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060102_minlength/Pos_060102_minlength_001/Pos_060102_minlength_001.xml create mode 100644 ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060102_minlength/Pos_060102_minlength_001/Pos_060102_minlength_001.xsd create mode 100644 ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060103_maxlength/Neg_060103_maxlength_001/Neg_060103_maxlength_001.ttcn create mode 100644 ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060103_maxlength/Neg_060103_maxlength_001/Neg_060103_maxlength_001.xsd create mode 100644 ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060103_maxlength/Pos_060103_maxlength_001/Pos_060103_maxlength_001.ttcn create mode 100644 ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060103_maxlength/Pos_060103_maxlength_001/Pos_060103_maxlength_001.xml create mode 100644 ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060103_maxlength/Pos_060103_maxlength_001/Pos_060103_maxlength_001.xsd create mode 100644 ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060104_pattern/Neg_060104_pattern_001/Neg_060104_pattern_001.ttcn create mode 100644 ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060104_pattern/Neg_060104_pattern_001/Neg_060104_pattern_001.xsd create mode 100644 ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060104_pattern/Pos_060104_pattern_001/Pos_060104_pattern_001.ttcn create mode 100644 ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060104_pattern/Pos_060104_pattern_001/Pos_060104_pattern_001.xml create mode 100644 ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060104_pattern/Pos_060104_pattern_001/Pos_060104_pattern_001.xsd create mode 100644 ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060105_enumeration/Neg_060105_enumeration_001/Neg_060105_enumeration_001.ttcn create mode 100644 ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060105_enumeration/Neg_060105_enumeration_001/Neg_060105_enumeration_001.xsd create mode 100644 ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060105_enumeration/Neg_060105_enumeration_002/Neg_060105_enumeration_002.ttcn create mode 100644 ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060105_enumeration/Neg_060105_enumeration_002/Neg_060105_enumeration_002.xsd create mode 100644 ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060105_enumeration/Neg_060105_enumeration_003/Neg_060105_enumeration_003.ttcn create mode 100644 ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060105_enumeration/Neg_060105_enumeration_003/Neg_060105_enumeration_003.xsd create mode 100644 ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060105_enumeration/Neg_060105_enumeration_004/Neg_060105_enumeration_004.ttcn create mode 100644 ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060105_enumeration/Neg_060105_enumeration_004/Neg_060105_enumeration_004.xml create mode 100644 ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060105_enumeration/Neg_060105_enumeration_004/Neg_060105_enumeration_004.xsd create mode 100644 ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060105_enumeration/Pos_060105_enumeration_001/Pos_060105_enumeration_001.ttcn create mode 100644 ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060105_enumeration/Pos_060105_enumeration_001/Pos_060105_enumeration_001.xml create mode 100644 ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060105_enumeration/Pos_060105_enumeration_001/Pos_060105_enumeration_001.xsd create mode 100644 ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060105_enumeration/Pos_060105_enumeration_002/Pos_060105_enumeration_002.ttcn create mode 100644 ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060105_enumeration/Pos_060105_enumeration_002/Pos_060105_enumeration_002.xml create mode 100644 ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060105_enumeration/Pos_060105_enumeration_002/Pos_060105_enumeration_002.xsd create mode 100644 ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060105_enumeration/Pos_060105_enumeration_003/Pos_060105_enumeration_003.ttcn create mode 100644 ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060105_enumeration/Pos_060105_enumeration_003/Pos_060105_enumeration_003.xml create mode 100644 ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060105_enumeration/Pos_060105_enumeration_003/Pos_060105_enumeration_003.xsd create mode 100644 ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060105_enumeration/Pos_060105_enumeration_004/Pos_060105_enumeration_004.ttcn create mode 100644 ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060105_enumeration/Pos_060105_enumeration_004/Pos_060105_enumeration_004.xml create mode 100644 ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060105_enumeration/Pos_060105_enumeration_004/Pos_060105_enumeration_004.xsd create mode 100644 ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060105_enumeration/Pos_060105_enumeration_005/Pos_060105_enumeration_005.ttcn create mode 100644 ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060105_enumeration/Pos_060105_enumeration_005/Pos_060105_enumeration_005.xml create mode 100644 ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060105_enumeration/Pos_060105_enumeration_005/Pos_060105_enumeration_005.xsd create mode 100644 ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060105_enumeration/Pos_060105_enumeration_006/Pos_060105_enumeration_006.ttcn create mode 100644 ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060105_enumeration/Pos_060105_enumeration_006/Pos_060105_enumeration_006.xml create mode 100644 ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060105_enumeration/Pos_060105_enumeration_006/Pos_060105_enumeration_006.xsd create mode 100644 ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060106_whitespace/Pos_060106_whitespace_001/Pos_060106_whitespace_001.ttcn create mode 100644 ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060106_whitespace/Pos_060106_whitespace_001/Pos_060106_whitespace_001.xml create mode 100644 ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060106_whitespace/Pos_060106_whitespace_001/Pos_060106_whitespace_001.xsd create mode 100644 ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060106_whitespace/Pos_060106_whitespace_002/Pos_060106_whitespace_002.ttcn create mode 100644 ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060106_whitespace/Pos_060106_whitespace_002/Pos_060106_whitespace_002.xml create mode 100644 ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060106_whitespace/Pos_060106_whitespace_002/Pos_060106_whitespace_002.xsd create mode 100644 ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060106_whitespace/Pos_060106_whitespace_003/Pos_060106_whitespace_003.ttcn create mode 100644 ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060106_whitespace/Pos_060106_whitespace_003/Pos_060106_whitespace_003.xml create mode 100644 ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060106_whitespace/Pos_060106_whitespace_003/Pos_060106_whitespace_003.xsd create mode 100644 ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060107_mininclusive/Pos_060107_mininclusive_001/Pos_060107_mininclusive_001.ttcn create mode 100644 ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060107_mininclusive/Pos_060107_mininclusive_001/Pos_060107_mininclusive_001.xml create mode 100644 ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060107_mininclusive/Pos_060107_mininclusive_001/Pos_060107_mininclusive_001.xsd create mode 100644 ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060107_mininclusive/Pos_060107_mininclusive_002/Pos_060107_mininclusive_002.ttcn create mode 100644 ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060107_mininclusive/Pos_060107_mininclusive_002/Pos_060107_mininclusive_002.xml create mode 100644 ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060107_mininclusive/Pos_060107_mininclusive_002/Pos_060107_mininclusive_002.xsd create mode 100644 ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060107_mininclusive/Pos_060107_mininclusive_003/Pos_060107_mininclusive_003.ttcn create mode 100644 ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060107_mininclusive/Pos_060107_mininclusive_003/Pos_060107_mininclusive_003.xml create mode 100644 ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060107_mininclusive/Pos_060107_mininclusive_003/Pos_060107_mininclusive_003.xsd create mode 100644 ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060107_mininclusive/Pos_060107_mininclusive_004/Pos_060107_mininclusive_004.ttcn create mode 100644 ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060107_mininclusive/Pos_060107_mininclusive_004/Pos_060107_mininclusive_004.xml create mode 100644 ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060107_mininclusive/Pos_060107_mininclusive_004/Pos_060107_mininclusive_004.xsd create mode 100644 ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060107_mininclusive/Pos_060107_mininclusive_005/Pos_060107_mininclusive_005.ttcn create mode 100644 ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060107_mininclusive/Pos_060107_mininclusive_005/Pos_060107_mininclusive_005.xml create mode 100644 ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060107_mininclusive/Pos_060107_mininclusive_005/Pos_060107_mininclusive_005.xsd create mode 100644 ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060108_maxinclusive/Pos_060108_maxinclusive_001/Pos_060108_maxinclusive_001.ttcn create mode 100644 ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060108_maxinclusive/Pos_060108_maxinclusive_001/Pos_060108_maxinclusive_001.xml create mode 100644 ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060108_maxinclusive/Pos_060108_maxinclusive_001/Pos_060108_maxinclusive_001.xsd create mode 100644 ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060108_maxinclusive/Pos_060108_maxinclusive_002/Pos_060108_maxinclusive_002.ttcn create mode 100644 ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060108_maxinclusive/Pos_060108_maxinclusive_002/Pos_060108_maxinclusive_002.xml create mode 100644 ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060108_maxinclusive/Pos_060108_maxinclusive_002/Pos_060108_maxinclusive_002.xsd create mode 100644 ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060108_maxinclusive/Pos_060108_maxinclusive_003/Pos_060108_maxinclusive_003.ttcn create mode 100644 ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060108_maxinclusive/Pos_060108_maxinclusive_003/Pos_060108_maxinclusive_003.xml create mode 100644 ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060108_maxinclusive/Pos_060108_maxinclusive_003/Pos_060108_maxinclusive_003.xsd create mode 100644 ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060108_maxinclusive/Pos_060108_maxinclusive_004/Pos_060108_maxinclusive_004.ttcn create mode 100644 ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060108_maxinclusive/Pos_060108_maxinclusive_004/Pos_060108_maxinclusive_004.xml create mode 100644 ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060108_maxinclusive/Pos_060108_maxinclusive_004/Pos_060108_maxinclusive_004.xsd create mode 100644 ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060109_minexclusive/Neg_060109_minexclusive_001/Neg_060109_minexclusive_001.ttcn create mode 100644 ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060109_minexclusive/Neg_060109_minexclusive_001/Neg_060109_minexclusive_001.xsd create mode 100644 ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060109_minexclusive/Neg_060109_minexclusive_002/Neg_060109_minexclusive_002.ttcn create mode 100644 ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060109_minexclusive/Neg_060109_minexclusive_002/Neg_060109_minexclusive_002.xsd create mode 100644 ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060109_minexclusive/Pos_060109_minexclusive_001/Pos_060109_minexclusive_001.ttcn create mode 100644 ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060109_minexclusive/Pos_060109_minexclusive_001/Pos_060109_minexclusive_001.xml create mode 100644 ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060109_minexclusive/Pos_060109_minexclusive_001/Pos_060109_minexclusive_001.xsd create mode 100644 ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060109_minexclusive/Pos_060109_minexclusive_002/Pos_060109_minexclusive_002.ttcn create mode 100644 ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060109_minexclusive/Pos_060109_minexclusive_002/Pos_060109_minexclusive_002.xml create mode 100644 ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060109_minexclusive/Pos_060109_minexclusive_002/Pos_060109_minexclusive_002.xsd create mode 100644 ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060110_maxexclusive/Neg_060110_maxexclusive_001/Neg_060110_maxexclusive_001.ttcn create mode 100644 ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060110_maxexclusive/Neg_060110_maxexclusive_001/Neg_060110_maxexclusive_001.xsd create mode 100644 ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060110_maxexclusive/Pos_060110_maxexclusive_001/Pos_060110_maxexclusive_001.ttcn create mode 100644 ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060110_maxexclusive/Pos_060110_maxexclusive_001/Pos_060110_maxexclusive_001.xml create mode 100644 ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060110_maxexclusive/Pos_060110_maxexclusive_001/Pos_060110_maxexclusive_001.xsd create mode 100644 ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060110_maxexclusive/Pos_060110_maxexclusive_002/Pos_060110_maxexclusive_002.ttcn create mode 100644 ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060110_maxexclusive/Pos_060110_maxexclusive_002/Pos_060110_maxexclusive_002.xml create mode 100644 ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060110_maxexclusive/Pos_060110_maxexclusive_002/Pos_060110_maxexclusive_002.xsd create mode 100644 ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060110_maxexclusive/Pos_060110_maxexclusive_003/Pos_060110_maxexclusive_003.ttcn create mode 100644 ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060110_maxexclusive/Pos_060110_maxexclusive_003/Pos_060110_maxexclusive_003.xml create mode 100644 ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060110_maxexclusive/Pos_060110_maxexclusive_003/Pos_060110_maxexclusive_003.xsd create mode 100644 ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060110_maxexclusive/Pos_060110_maxexclusive_003/Pos_060110_maxexclusive_003_1.xsd create mode 100644 ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060111_total_digits/Neg_060111_total_digits_001/Neg_060111_total_digits_001.ttcn create mode 100644 ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060111_total_digits/Neg_060111_total_digits_001/Neg_060111_total_digits_001.xsd create mode 100644 ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060111_total_digits/Neg_060111_total_digits_002/Neg_060111_total_digits_002.ttcn create mode 100644 ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060111_total_digits/Neg_060111_total_digits_002/Neg_060111_total_digits_002.xsd create mode 100644 ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060111_total_digits/Neg_060111_total_digits_003/Neg_060111_total_digits_003.ttcn create mode 100644 ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060111_total_digits/Neg_060111_total_digits_003/Neg_060111_total_digits_003.xsd create mode 100644 ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060111_total_digits/Neg_060111_total_digits_004/Neg_060111_total_digits_004.ttcn create mode 100644 ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060111_total_digits/Neg_060111_total_digits_004/Neg_060111_total_digits_004.xsd create mode 100644 ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060111_total_digits/Pos_060111_total_digits_001/Pos_060111_total_digits_001.ttcn create mode 100644 ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060111_total_digits/Pos_060111_total_digits_001/Pos_060111_total_digits_001.xml create mode 100644 ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060111_total_digits/Pos_060111_total_digits_001/Pos_060111_total_digits_001.xsd create mode 100644 ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060111_total_digits/Pos_060111_total_digits_002/Pos_060111_total_digits_002.ttcn create mode 100644 ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060111_total_digits/Pos_060111_total_digits_002/Pos_060111_total_digits_002.xml create mode 100644 ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060111_total_digits/Pos_060111_total_digits_002/Pos_060111_total_digits_002.xsd create mode 100644 ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060111_total_digits/Pos_060111_total_digits_003/Pos_060111_total_digits_003.ttcn create mode 100644 ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060111_total_digits/Pos_060111_total_digits_003/Pos_060111_total_digits_003.xml create mode 100644 ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060111_total_digits/Pos_060111_total_digits_003/Pos_060111_total_digits_003.xsd create mode 100644 ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060111_total_digits/Pos_060111_total_digits_004/Pos_060111_total_digits_004.ttcn create mode 100644 ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060111_total_digits/Pos_060111_total_digits_004/Pos_060111_total_digits_004.xml create mode 100644 ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060111_total_digits/Pos_060111_total_digits_004/Pos_060111_total_digits_004.xsd create mode 100644 ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060111_total_digits/Pos_060111_total_digits_005/Pos_060111_total_digits_005.ttcn create mode 100644 ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060111_total_digits/Pos_060111_total_digits_005/Pos_060111_total_digits_005.xml create mode 100644 ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060111_total_digits/Pos_060111_total_digits_005/Pos_060111_total_digits_005.xsd create mode 100644 ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060112_fraction_digits/Pos_060112_fraction_digits_001/Pos_060112_fraction_digits_001.ttcn create mode 100644 ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060112_fraction_digits/Pos_060112_fraction_digits_001/Pos_060112_fraction_digits_001.xml create mode 100644 ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060112_fraction_digits/Pos_060112_fraction_digits_001/Pos_060112_fraction_digits_001.xsd create mode 100644 ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060112_fraction_digits/Pos_060112_fraction_digits_002/Pos_060112_fraction_digits_002.ttcn create mode 100644 ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060112_fraction_digits/Pos_060112_fraction_digits_002/Pos_060112_fraction_digits_002.xml create mode 100644 ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060112_fraction_digits/Pos_060112_fraction_digits_002/Pos_060112_fraction_digits_002.xsd create mode 100644 ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060113_not_mapped/Pos_060113_not_mapped_001/Pos_060113_not_mapped_001.ttcn create mode 100644 ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060113_not_mapped/Pos_060113_not_mapped_001/Pos_060113_not_mapped_001.xml create mode 100644 ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060113_not_mapped/Pos_060113_not_mapped_001/Pos_060113_not_mapped_001.xsd create mode 100644 ATS/xml/06_built_in_data_types/0602_string_types/060201_string/Pos_060201_string_001/Pos_060201_string_001.ttcn create mode 100644 ATS/xml/06_built_in_data_types/0602_string_types/060201_string/Pos_060201_string_001/Pos_060201_string_001.xml create mode 100644 ATS/xml/06_built_in_data_types/0602_string_types/060201_string/Pos_060201_string_001/Pos_060201_string_001.xsd create mode 100644 ATS/xml/06_built_in_data_types/0602_string_types/060202_normalized_string/Pos_060202_normalized_string_001/Pos_060202_normalized_string_001.ttcn create mode 100644 ATS/xml/06_built_in_data_types/0602_string_types/060202_normalized_string/Pos_060202_normalized_string_001/Pos_060202_normalized_string_001.xml create mode 100644 ATS/xml/06_built_in_data_types/0602_string_types/060202_normalized_string/Pos_060202_normalized_string_001/Pos_060202_normalized_string_001.xsd create mode 100644 ATS/xml/06_built_in_data_types/0602_string_types/060203_token/Pos_060203_token_001/Pos_060203_token_001.ttcn create mode 100644 ATS/xml/06_built_in_data_types/0602_string_types/060203_token/Pos_060203_token_001/Pos_060203_token_001.xml create mode 100644 ATS/xml/06_built_in_data_types/0602_string_types/060203_token/Pos_060203_token_001/Pos_060203_token_001.xsd create mode 100644 ATS/xml/06_built_in_data_types/0602_string_types/060204_name/Pos_060204_name_001/Pos_060204_name_001.ttcn create mode 100644 ATS/xml/06_built_in_data_types/0602_string_types/060204_name/Pos_060204_name_001/Pos_060204_name_001.xml create mode 100644 ATS/xml/06_built_in_data_types/0602_string_types/060204_name/Pos_060204_name_001/Pos_060204_name_001.xsd create mode 100644 ATS/xml/06_built_in_data_types/0602_string_types/060205_nmtoken/Pos_060205_nmtoken_001/Pos_060205_nmtoken_001.ttcn create mode 100644 ATS/xml/06_built_in_data_types/0602_string_types/060205_nmtoken/Pos_060205_nmtoken_001/Pos_060205_nmtoken_001.xml create mode 100644 ATS/xml/06_built_in_data_types/0602_string_types/060205_nmtoken/Pos_060205_nmtoken_001/Pos_060205_nmtoken_001.xsd create mode 100644 ATS/xml/06_built_in_data_types/0602_string_types/060206_ncname/Pos_060206_ncname_001/Pos_060206_ncname_001.ttcn create mode 100644 ATS/xml/06_built_in_data_types/0602_string_types/060206_ncname/Pos_060206_ncname_001/Pos_060206_ncname_001.xml create mode 100644 ATS/xml/06_built_in_data_types/0602_string_types/060206_ncname/Pos_060206_ncname_001/Pos_060206_ncname_001.xsd create mode 100644 ATS/xml/06_built_in_data_types/0602_string_types/060207_id/Pos_060207_id_001/Pos_060207_id_001.ttcn create mode 100644 ATS/xml/06_built_in_data_types/0602_string_types/060207_id/Pos_060207_id_001/Pos_060207_id_001.xml create mode 100644 ATS/xml/06_built_in_data_types/0602_string_types/060207_id/Pos_060207_id_001/Pos_060207_id_001.xsd create mode 100644 ATS/xml/06_built_in_data_types/0602_string_types/060208_idref/Pos_060207_idref_001/Pos_060208_idref_001.ttcn create mode 100644 ATS/xml/06_built_in_data_types/0602_string_types/060208_idref/Pos_060207_idref_001/Pos_060208_idref_001.xml create mode 100644 ATS/xml/06_built_in_data_types/0602_string_types/060208_idref/Pos_060207_idref_001/Pos_060208_idref_001.xsd create mode 100644 ATS/xml/06_built_in_data_types/0602_string_types/060210_hexadecimal_binary/Pos_060210_hexadecimal_binary_001/Pos_060210_hexadecimal_binary_001.ttcn create mode 100644 ATS/xml/06_built_in_data_types/0602_string_types/060210_hexadecimal_binary/Pos_060210_hexadecimal_binary_001/Pos_060210_hexadecimal_binary_001.xml create mode 100644 ATS/xml/06_built_in_data_types/0602_string_types/060210_hexadecimal_binary/Pos_060210_hexadecimal_binary_001/Pos_060210_hexadecimal_binary_001.xsd create mode 100644 ATS/xml/06_built_in_data_types/0602_string_types/060211_base_64_binary/Pos_060211_base_64_binary_001/Pos_060211_base_64_binary_001.ttcn create mode 100644 ATS/xml/06_built_in_data_types/0602_string_types/060211_base_64_binary/Pos_060211_base_64_binary_001/Pos_060211_base_64_binary_001.xml create mode 100644 ATS/xml/06_built_in_data_types/0602_string_types/060211_base_64_binary/Pos_060211_base_64_binary_001/Pos_060211_base_64_binary_001.xsd create mode 100644 ATS/xml/06_built_in_data_types/0602_string_types/060212_any_uri/Neg_060212_any_uri_001/Neg_060212_any_uri_001.ttcn create mode 100644 ATS/xml/06_built_in_data_types/0602_string_types/060212_any_uri/Neg_060212_any_uri_001/Neg_060212_any_uri_001.xsd create mode 100644 ATS/xml/06_built_in_data_types/0602_string_types/060212_any_uri/Neg_060212_any_uri_002/Neg_060212_any_uri_002.ttcn create mode 100644 ATS/xml/06_built_in_data_types/0602_string_types/060212_any_uri/Neg_060212_any_uri_002/Neg_060212_any_uri_002.xsd create mode 100644 ATS/xml/06_built_in_data_types/0602_string_types/060212_any_uri/Pos_060212_any_uri_001/Pos_060212_any_uri_001.ttcn create mode 100644 ATS/xml/06_built_in_data_types/0602_string_types/060212_any_uri/Pos_060212_any_uri_001/Pos_060212_any_uri_001.xml create mode 100644 ATS/xml/06_built_in_data_types/0602_string_types/060212_any_uri/Pos_060212_any_uri_001/Pos_060212_any_uri_001.xsd create mode 100644 ATS/xml/06_built_in_data_types/0602_string_types/060213_language/Pos_060213_language_001/Pos_060213_language_001.ttcn create mode 100644 ATS/xml/06_built_in_data_types/0602_string_types/060213_language/Pos_060213_language_001/Pos_060213_language_001.xml create mode 100644 ATS/xml/06_built_in_data_types/0602_string_types/060213_language/Pos_060213_language_001/Pos_060213_language_001.xsd create mode 100644 ATS/xml/06_built_in_data_types/0603_integer_types/060301_integer/Pos_060301_integer_001/Pos_060301_integer_001.ttcn create mode 100644 ATS/xml/06_built_in_data_types/0603_integer_types/060301_integer/Pos_060301_integer_001/Pos_060301_integer_001.xml create mode 100644 ATS/xml/06_built_in_data_types/0603_integer_types/060301_integer/Pos_060301_integer_001/Pos_060301_integer_001.xsd create mode 100644 ATS/xml/06_built_in_data_types/0603_integer_types/060302_positive_integer/Pos_060302_positive_integer_001/Pos_060302_positive_integer_001.ttcn create mode 100644 ATS/xml/06_built_in_data_types/0603_integer_types/060302_positive_integer/Pos_060302_positive_integer_001/Pos_060302_positive_integer_001.xml create mode 100644 ATS/xml/06_built_in_data_types/0603_integer_types/060302_positive_integer/Pos_060302_positive_integer_001/Pos_060302_positive_integer_001.xsd create mode 100644 ATS/xml/06_built_in_data_types/0603_integer_types/060303_non_positive_integer/Pos_060303_non_positive_integer_001/Pos_060303_non_positive_integer_001.ttcn create mode 100644 ATS/xml/06_built_in_data_types/0603_integer_types/060303_non_positive_integer/Pos_060303_non_positive_integer_001/Pos_060303_non_positive_integer_001.xml create mode 100644 ATS/xml/06_built_in_data_types/0603_integer_types/060303_non_positive_integer/Pos_060303_non_positive_integer_001/Pos_060303_non_positive_integer_001.xsd create mode 100644 ATS/xml/06_built_in_data_types/0603_integer_types/060304_negative_integer/Pos_060304_negative_integer_001/Pos_060304_negative_integer_001.ttcn create mode 100644 ATS/xml/06_built_in_data_types/0603_integer_types/060304_negative_integer/Pos_060304_negative_integer_001/Pos_060304_negative_integer_001.xml create mode 100644 ATS/xml/06_built_in_data_types/0603_integer_types/060304_negative_integer/Pos_060304_negative_integer_001/Pos_060304_negative_integer_001.xsd create mode 100644 ATS/xml/06_built_in_data_types/0603_integer_types/060305_non_negative_integer/Pos_060305_non_negative_integer_001/Pos_060305_non_negative_integer_001.ttcn create mode 100644 ATS/xml/06_built_in_data_types/0603_integer_types/060305_non_negative_integer/Pos_060305_non_negative_integer_001/Pos_060305_non_negative_integer_001.xml create mode 100644 ATS/xml/06_built_in_data_types/0603_integer_types/060305_non_negative_integer/Pos_060305_non_negative_integer_001/Pos_060305_non_negative_integer_001.xsd create mode 100644 ATS/xml/06_built_in_data_types/0603_integer_types/060306_long/Pos_060306_long_001/Pos_060306_long_001.ttcn create mode 100644 ATS/xml/06_built_in_data_types/0603_integer_types/060306_long/Pos_060306_long_001/Pos_060306_long_001.xml create mode 100644 ATS/xml/06_built_in_data_types/0603_integer_types/060306_long/Pos_060306_long_001/Pos_060306_long_001.xsd create mode 100644 ATS/xml/06_built_in_data_types/0603_integer_types/060307_unsigned_long/Pos_060307_unsigned_long_001/Pos_060307_unsigned_long_001.ttcn create mode 100644 ATS/xml/06_built_in_data_types/0603_integer_types/060307_unsigned_long/Pos_060307_unsigned_long_001/Pos_060307_unsigned_long_001.xml create mode 100644 ATS/xml/06_built_in_data_types/0603_integer_types/060307_unsigned_long/Pos_060307_unsigned_long_001/Pos_060307_unsigned_long_001.xsd create mode 100644 ATS/xml/06_built_in_data_types/0603_integer_types/060308_int/Pos_060308_int_001/Pos_060308_int_001.ttcn create mode 100644 ATS/xml/06_built_in_data_types/0603_integer_types/060308_int/Pos_060308_int_001/Pos_060308_int_001.xml create mode 100644 ATS/xml/06_built_in_data_types/0603_integer_types/060308_int/Pos_060308_int_001/Pos_060308_int_001.xsd create mode 100644 ATS/xml/06_built_in_data_types/0603_integer_types/060309_unsigned_int/Pos_060309_unsigned_int_001/Pos_060309_unsigned_int_001.ttcn create mode 100644 ATS/xml/06_built_in_data_types/0603_integer_types/060309_unsigned_int/Pos_060309_unsigned_int_001/Pos_060309_unsigned_int_001.xml create mode 100644 ATS/xml/06_built_in_data_types/0603_integer_types/060309_unsigned_int/Pos_060309_unsigned_int_001/Pos_060309_unsigned_int_001.xsd create mode 100644 ATS/xml/06_built_in_data_types/0603_integer_types/060310_short/Pos_060310_short_001/Pos_060310_short_001.ttcn create mode 100644 ATS/xml/06_built_in_data_types/0603_integer_types/060310_short/Pos_060310_short_001/Pos_060310_short_001.xml create mode 100644 ATS/xml/06_built_in_data_types/0603_integer_types/060310_short/Pos_060310_short_001/Pos_060310_short_001.xsd create mode 100644 ATS/xml/06_built_in_data_types/0603_integer_types/060311_unsigned_short/Pos_060311_unsigned_short_001/Pos_060311_unsigned_short_001.ttcn create mode 100644 ATS/xml/06_built_in_data_types/0603_integer_types/060311_unsigned_short/Pos_060311_unsigned_short_001/Pos_060311_unsigned_short_001.xml create mode 100644 ATS/xml/06_built_in_data_types/0603_integer_types/060311_unsigned_short/Pos_060311_unsigned_short_001/Pos_060311_unsigned_short_001.xsd create mode 100644 ATS/xml/06_built_in_data_types/0603_integer_types/060312_byte/Pos_060312_byte_001/Pos_060312_byte_001.ttcn create mode 100644 ATS/xml/06_built_in_data_types/0603_integer_types/060312_byte/Pos_060312_byte_001/Pos_060312_byte_001.xml create mode 100644 ATS/xml/06_built_in_data_types/0603_integer_types/060312_byte/Pos_060312_byte_001/Pos_060312_byte_001.xsd create mode 100644 ATS/xml/06_built_in_data_types/0603_integer_types/060313_unsigned_byte/Pos_060313_unsigned_byte_001/Pos_060313_unsigned_byte_001.ttcn create mode 100644 ATS/xml/06_built_in_data_types/0603_integer_types/060313_unsigned_byte/Pos_060313_unsigned_byte_001/Pos_060313_unsigned_byte_001.xml create mode 100644 ATS/xml/06_built_in_data_types/0603_integer_types/060313_unsigned_byte/Pos_060313_unsigned_byte_001/Pos_060313_unsigned_byte_001.xsd create mode 100644 ATS/xml/06_built_in_data_types/0604_float_types/060401_decimal/Pos_060401_decimal_001/Pos_060401_decimal_001.ttcn create mode 100644 ATS/xml/06_built_in_data_types/0604_float_types/060401_decimal/Pos_060401_decimal_001/Pos_060401_decimal_001.xml create mode 100644 ATS/xml/06_built_in_data_types/0604_float_types/060401_decimal/Pos_060401_decimal_001/Pos_060401_decimal_001.xsd create mode 100644 ATS/xml/06_built_in_data_types/0604_float_types/060402_float/Pos_060402_float_001/Pos_060402_float_001.ttcn create mode 100644 ATS/xml/06_built_in_data_types/0604_float_types/060402_float/Pos_060402_float_001/Pos_060402_float_001.xml create mode 100644 ATS/xml/06_built_in_data_types/0604_float_types/060402_float/Pos_060402_float_001/Pos_060402_float_001.xsd create mode 100644 ATS/xml/06_built_in_data_types/0604_float_types/060403_double/Pos_060403_double_001/Pos_060403_double_001.ttcn create mode 100644 ATS/xml/06_built_in_data_types/0604_float_types/060403_double/Pos_060403_double_001/Pos_060403_double_001.xml create mode 100644 ATS/xml/06_built_in_data_types/0604_float_types/060403_double/Pos_060403_double_001/Pos_060403_double_001.xsd create mode 100644 ATS/xml/06_built_in_data_types/0605_time_types/060501_duration/Pos_060501_duration_001/Pos_060501_duration_001.ttcn create mode 100644 ATS/xml/06_built_in_data_types/0605_time_types/060501_duration/Pos_060501_duration_001/Pos_060501_duration_001.xml create mode 100644 ATS/xml/06_built_in_data_types/0605_time_types/060501_duration/Pos_060501_duration_001/Pos_060501_duration_001.xsd create mode 100644 ATS/xml/06_built_in_data_types/0605_time_types/060502_date_and_time/Neg_060502_date_and_time_001/Neg_060502_date_and_time_001.ttcn create mode 100644 ATS/xml/06_built_in_data_types/0605_time_types/060502_date_and_time/Neg_060502_date_and_time_001/Neg_060502_date_and_time_001.xsd create mode 100644 ATS/xml/06_built_in_data_types/0605_time_types/060502_date_and_time/Neg_060502_date_and_time_002/Neg_060502_date_and_time_002.ttcn create mode 100644 ATS/xml/06_built_in_data_types/0605_time_types/060502_date_and_time/Neg_060502_date_and_time_002/Neg_060502_date_and_time_002.xsd create mode 100644 ATS/xml/06_built_in_data_types/0605_time_types/060502_date_and_time/Neg_060502_date_and_time_003/Neg_060502_date_and_time_003.ttcn create mode 100644 ATS/xml/06_built_in_data_types/0605_time_types/060502_date_and_time/Neg_060502_date_and_time_003/Neg_060502_date_and_time_003.xsd create mode 100644 ATS/xml/06_built_in_data_types/0605_time_types/060502_date_and_time/Neg_060502_date_and_time_004/Neg_060502_date_and_time_004.ttcn create mode 100644 ATS/xml/06_built_in_data_types/0605_time_types/060502_date_and_time/Neg_060502_date_and_time_004/Neg_060502_date_and_time_004.xsd create mode 100644 ATS/xml/06_built_in_data_types/0605_time_types/060502_date_and_time/Pos_060502_date_and_time_001/Pos_060502_date_and_time_001.ttcn create mode 100644 ATS/xml/06_built_in_data_types/0605_time_types/060502_date_and_time/Pos_060502_date_and_time_001/Pos_060502_date_and_time_001.xml create mode 100644 ATS/xml/06_built_in_data_types/0605_time_types/060502_date_and_time/Pos_060502_date_and_time_001/Pos_060502_date_and_time_001.xsd create mode 100644 ATS/xml/06_built_in_data_types/0605_time_types/060502_date_and_time/Pos_060502_date_and_time_002/Pos_060502_date_and_time_002.ttcn create mode 100644 ATS/xml/06_built_in_data_types/0605_time_types/060502_date_and_time/Pos_060502_date_and_time_002/Pos_060502_date_and_time_002.xml create mode 100644 ATS/xml/06_built_in_data_types/0605_time_types/060502_date_and_time/Pos_060502_date_and_time_002/Pos_060502_date_and_time_002.xsd create mode 100644 ATS/xml/06_built_in_data_types/0605_time_types/060502_date_and_time/Pos_060502_date_and_time_003/Pos_060502_date_and_time_003.ttcn create mode 100644 ATS/xml/06_built_in_data_types/0605_time_types/060502_date_and_time/Pos_060502_date_and_time_003/Pos_060502_date_and_time_003.xml create mode 100644 ATS/xml/06_built_in_data_types/0605_time_types/060502_date_and_time/Pos_060502_date_and_time_003/Pos_060502_date_and_time_003.xsd create mode 100644 ATS/xml/06_built_in_data_types/0605_time_types/060502_date_and_time/Pos_060502_date_and_time_004/Pos_060502_date_and_time_004.ttcn create mode 100644 ATS/xml/06_built_in_data_types/0605_time_types/060502_date_and_time/Pos_060502_date_and_time_004/Pos_060502_date_and_time_004.xml create mode 100644 ATS/xml/06_built_in_data_types/0605_time_types/060502_date_and_time/Pos_060502_date_and_time_004/Pos_060502_date_and_time_004.xsd create mode 100644 ATS/xml/06_built_in_data_types/0605_time_types/060503_time/Pos_060503_time/Pos_060503_time_001.ttcn create mode 100644 ATS/xml/06_built_in_data_types/0605_time_types/060503_time/Pos_060503_time/Pos_060503_time_001.xml create mode 100644 ATS/xml/06_built_in_data_types/0605_time_types/060503_time/Pos_060503_time/Pos_060503_time_001.xsd create mode 100644 ATS/xml/06_built_in_data_types/0605_time_types/060504_date/Neg_060504_date_001/Neg_060504_date_001.ttcn create mode 100644 ATS/xml/06_built_in_data_types/0605_time_types/060504_date/Neg_060504_date_001/Neg_060504_date_001.xsd create mode 100644 ATS/xml/06_built_in_data_types/0605_time_types/060504_date/Neg_060504_date_002/Neg_060504_date_002.ttcn create mode 100644 ATS/xml/06_built_in_data_types/0605_time_types/060504_date/Neg_060504_date_002/Neg_060504_date_002.xsd create mode 100644 ATS/xml/06_built_in_data_types/0605_time_types/060504_date/Neg_060504_date_003/Neg_060504_date_003.ttcn create mode 100644 ATS/xml/06_built_in_data_types/0605_time_types/060504_date/Neg_060504_date_003/Neg_060504_date_003.xsd create mode 100644 ATS/xml/06_built_in_data_types/0605_time_types/060504_date/Neg_060504_date_004/Neg_060504_date_004.ttcn create mode 100644 ATS/xml/06_built_in_data_types/0605_time_types/060504_date/Neg_060504_date_004/Neg_060504_date_004.xsd create mode 100644 ATS/xml/06_built_in_data_types/0605_time_types/060504_date/Pos_060504_date_001/Pos_060504_date_001.ttcn create mode 100644 ATS/xml/06_built_in_data_types/0605_time_types/060504_date/Pos_060504_date_001/Pos_060504_date_001.xml create mode 100644 ATS/xml/06_built_in_data_types/0605_time_types/060504_date/Pos_060504_date_001/Pos_060504_date_001.xsd create mode 100644 ATS/xml/06_built_in_data_types/0605_time_types/060504_date/Pos_060504_date_002/Pos_060504_date_002.ttcn create mode 100644 ATS/xml/06_built_in_data_types/0605_time_types/060504_date/Pos_060504_date_002/Pos_060504_date_002.xml create mode 100644 ATS/xml/06_built_in_data_types/0605_time_types/060504_date/Pos_060504_date_002/Pos_060504_date_002.xsd create mode 100644 ATS/xml/06_built_in_data_types/0605_time_types/060504_date/Pos_060504_date_003/Pos_060504_date_003.ttcn create mode 100644 ATS/xml/06_built_in_data_types/0605_time_types/060504_date/Pos_060504_date_003/Pos_060504_date_003.xml create mode 100644 ATS/xml/06_built_in_data_types/0605_time_types/060504_date/Pos_060504_date_003/Pos_060504_date_003.xsd create mode 100644 ATS/xml/06_built_in_data_types/0605_time_types/060504_date/Pos_060504_date_004/Pos_060504_date_004.ttcn create mode 100644 ATS/xml/06_built_in_data_types/0605_time_types/060504_date/Pos_060504_date_004/Pos_060504_date_004.xml create mode 100644 ATS/xml/06_built_in_data_types/0605_time_types/060504_date/Pos_060504_date_004/Pos_060504_date_004.xsd create mode 100644 ATS/xml/06_built_in_data_types/0605_time_types/060505_gregorian_year_and_month/Neg_060505_gregorian_year_and_month_001/Neg_060505_gregorian_year_and_month_001.ttcn create mode 100644 ATS/xml/06_built_in_data_types/0605_time_types/060505_gregorian_year_and_month/Neg_060505_gregorian_year_and_month_001/Neg_060505_gregorian_year_and_month_001.xsd create mode 100644 ATS/xml/06_built_in_data_types/0605_time_types/060505_gregorian_year_and_month/Neg_060505_gregorian_year_and_month_002/Neg_060505_gregorian_year_and_month_002.ttcn create mode 100644 ATS/xml/06_built_in_data_types/0605_time_types/060505_gregorian_year_and_month/Neg_060505_gregorian_year_and_month_002/Neg_060505_gregorian_year_and_month_002.xsd create mode 100644 ATS/xml/06_built_in_data_types/0605_time_types/060505_gregorian_year_and_month/Neg_060505_gregorian_year_and_month_003/Neg_060505_gregorian_year_and_month_003.ttcn create mode 100644 ATS/xml/06_built_in_data_types/0605_time_types/060505_gregorian_year_and_month/Neg_060505_gregorian_year_and_month_003/Neg_060505_gregorian_year_and_month_003.xsd create mode 100644 ATS/xml/06_built_in_data_types/0605_time_types/060505_gregorian_year_and_month/Neg_060505_gregorian_year_and_month_004/Neg_060505_gregorian_year_and_month_004.ttcn create mode 100644 ATS/xml/06_built_in_data_types/0605_time_types/060505_gregorian_year_and_month/Neg_060505_gregorian_year_and_month_004/Neg_060505_gregorian_year_and_month_004.xsd create mode 100644 ATS/xml/06_built_in_data_types/0605_time_types/060505_gregorian_year_and_month/Pos_060505_gregorian_year_and_month_001/Pos_060505_gregorian_year_and_month_001.ttcn create mode 100644 ATS/xml/06_built_in_data_types/0605_time_types/060505_gregorian_year_and_month/Pos_060505_gregorian_year_and_month_001/Pos_060505_gregorian_year_and_month_001.xml create mode 100644 ATS/xml/06_built_in_data_types/0605_time_types/060505_gregorian_year_and_month/Pos_060505_gregorian_year_and_month_001/Pos_060505_gregorian_year_and_month_001.xsd create mode 100644 ATS/xml/06_built_in_data_types/0605_time_types/060505_gregorian_year_and_month/Pos_060505_gregorian_year_and_month_002/Pos_060505_gregorian_year_and_month_002.ttcn create mode 100644 ATS/xml/06_built_in_data_types/0605_time_types/060505_gregorian_year_and_month/Pos_060505_gregorian_year_and_month_002/Pos_060505_gregorian_year_and_month_002.xml create mode 100644 ATS/xml/06_built_in_data_types/0605_time_types/060505_gregorian_year_and_month/Pos_060505_gregorian_year_and_month_002/Pos_060505_gregorian_year_and_month_002.xsd create mode 100644 ATS/xml/06_built_in_data_types/0605_time_types/060506_gregorian_year/Neg_060506_gregorian_year_001/Neg_060506_gregorian_year_001.ttcn create mode 100644 ATS/xml/06_built_in_data_types/0605_time_types/060506_gregorian_year/Neg_060506_gregorian_year_001/Neg_060506_gregorian_year_001.xsd create mode 100644 ATS/xml/06_built_in_data_types/0605_time_types/060506_gregorian_year/Pos_060506_gregorian_year_001/Pos_060506_gregorian_year_001.ttcn create mode 100644 ATS/xml/06_built_in_data_types/0605_time_types/060506_gregorian_year/Pos_060506_gregorian_year_001/Pos_060506_gregorian_year_001.xml create mode 100644 ATS/xml/06_built_in_data_types/0605_time_types/060506_gregorian_year/Pos_060506_gregorian_year_001/Pos_060506_gregorian_year_001.xsd create mode 100644 ATS/xml/06_built_in_data_types/0605_time_types/060506_gregorian_year/Pos_060506_gregorian_year_002/Pos_060506_gregorian_year_002.ttcn create mode 100644 ATS/xml/06_built_in_data_types/0605_time_types/060506_gregorian_year/Pos_060506_gregorian_year_002/Pos_060506_gregorian_year_002.xml create mode 100644 ATS/xml/06_built_in_data_types/0605_time_types/060506_gregorian_year/Pos_060506_gregorian_year_002/Pos_060506_gregorian_year_002.xsd create mode 100644 ATS/xml/06_built_in_data_types/0605_time_types/060506_gregorian_year/Pos_060506_gregorian_year_003/Pos_060506_gregorian_year_003.ttcn create mode 100644 ATS/xml/06_built_in_data_types/0605_time_types/060506_gregorian_year/Pos_060506_gregorian_year_003/Pos_060506_gregorian_year_003.xml create mode 100644 ATS/xml/06_built_in_data_types/0605_time_types/060506_gregorian_year/Pos_060506_gregorian_year_003/Pos_060506_gregorian_year_003.xsd create mode 100644 ATS/xml/06_built_in_data_types/0605_time_types/060506_gregorian_year/Pos_060506_gregorian_year_004/Pos_060506_gregorian_year_004.ttcn create mode 100644 ATS/xml/06_built_in_data_types/0605_time_types/060506_gregorian_year/Pos_060506_gregorian_year_004/Pos_060506_gregorian_year_004.xml create mode 100644 ATS/xml/06_built_in_data_types/0605_time_types/060506_gregorian_year/Pos_060506_gregorian_year_004/Pos_060506_gregorian_year_004.xsd create mode 100644 ATS/xml/06_built_in_data_types/0605_time_types/060506_gregorian_year/Pos_060506_gregorian_year_005/Pos_060506_gregorian_year_005.ttcn create mode 100644 ATS/xml/06_built_in_data_types/0605_time_types/060506_gregorian_year/Pos_060506_gregorian_year_005/Pos_060506_gregorian_year_005.xml create mode 100644 ATS/xml/06_built_in_data_types/0605_time_types/060506_gregorian_year/Pos_060506_gregorian_year_005/Pos_060506_gregorian_year_005.xsd create mode 100644 ATS/xml/06_built_in_data_types/0605_time_types/060506_gregorian_year/Pos_060506_gregorian_year_006/Pos_060506_gregorian_year_006.ttcn create mode 100644 ATS/xml/06_built_in_data_types/0605_time_types/060506_gregorian_year/Pos_060506_gregorian_year_006/Pos_060506_gregorian_year_006.xml create mode 100644 ATS/xml/06_built_in_data_types/0605_time_types/060506_gregorian_year/Pos_060506_gregorian_year_006/Pos_060506_gregorian_year_006.xsd create mode 100644 ATS/xml/06_built_in_data_types/0605_time_types/060507_gregorian_month_and_day/Pos_060507_gregorian_month_and_day_001/Pos_060507_gregorian_month_and_day_001.ttcn create mode 100644 ATS/xml/06_built_in_data_types/0605_time_types/060507_gregorian_month_and_day/Pos_060507_gregorian_month_and_day_001/Pos_060507_gregorian_month_and_day_001.xml create mode 100644 ATS/xml/06_built_in_data_types/0605_time_types/060507_gregorian_month_and_day/Pos_060507_gregorian_month_and_day_001/Pos_060507_gregorian_month_and_day_001.xsd create mode 100644 ATS/xml/06_built_in_data_types/0605_time_types/060508_gregorian_day/Pos_060508_gregorian_day_001/Pos_060508_gregorian_day_001.ttcn create mode 100644 ATS/xml/06_built_in_data_types/0605_time_types/060508_gregorian_day/Pos_060508_gregorian_day_001/Pos_060508_gregorian_day_001.xml create mode 100644 ATS/xml/06_built_in_data_types/0605_time_types/060508_gregorian_day/Pos_060508_gregorian_day_001/Pos_060508_gregorian_day_001.xsd create mode 100644 ATS/xml/06_built_in_data_types/0605_time_types/060509_gregorian_month/Pos_060509_gregorian_month_001/Pos_060509_gregorian_month_001.ttcn create mode 100644 ATS/xml/06_built_in_data_types/0605_time_types/060509_gregorian_month/Pos_060509_gregorian_month_001/Pos_060509_gregorian_month_001.xml create mode 100644 ATS/xml/06_built_in_data_types/0605_time_types/060509_gregorian_month/Pos_060509_gregorian_month_001/Pos_060509_gregorian_month_001.xsd create mode 100644 ATS/xml/06_built_in_data_types/0606_sequence_types/060601_nmtokens/Pos_060601_nmtokens_001/Pos_060601_nmtokens_001.ttcn create mode 100644 ATS/xml/06_built_in_data_types/0606_sequence_types/060601_nmtokens/Pos_060601_nmtokens_001/Pos_060601_nmtokens_001.xml create mode 100644 ATS/xml/06_built_in_data_types/0606_sequence_types/060601_nmtokens/Pos_060601_nmtokens_001/Pos_060601_nmtokens_001.xsd create mode 100644 ATS/xml/06_built_in_data_types/0606_sequence_types/060602_idrefs/Pos_060602_idrefs_001/Pos_060602_idrefs_001.ttcn create mode 100644 ATS/xml/06_built_in_data_types/0606_sequence_types/060602_idrefs/Pos_060602_idrefs_001/Pos_060602_idrefs_001.xml create mode 100644 ATS/xml/06_built_in_data_types/0606_sequence_types/060602_idrefs/Pos_060602_idrefs_001/Pos_060602_idrefs_001.xsd create mode 100644 ATS/xml/06_built_in_data_types/0606_sequence_types/060604_qname/Pos_060604_qname_001/Pos_060604_qname_001.ttcn create mode 100644 ATS/xml/06_built_in_data_types/0606_sequence_types/060604_qname/Pos_060604_qname_001/Pos_060604_qname_001.xml create mode 100644 ATS/xml/06_built_in_data_types/0606_sequence_types/060604_qname/Pos_060604_qname_001/Pos_060604_qname_001.xsd create mode 100644 ATS/xml/06_built_in_data_types/0607_boolean_type/Pos_0607_boolean_type_001/Pos_0607_boolean_type_001.ttcn create mode 100644 ATS/xml/06_built_in_data_types/0607_boolean_type/Pos_0607_boolean_type_001/Pos_0607_boolean_type_001.xml create mode 100644 ATS/xml/06_built_in_data_types/0607_boolean_type/Pos_0607_boolean_type_001/Pos_0607_boolean_type_001.xsd create mode 100644 ATS/xml/06_built_in_data_types/0607_boolean_type/Pos_0607_boolean_type_002/Pos_0607_boolean_type_002.ttcn create mode 100644 ATS/xml/06_built_in_data_types/0607_boolean_type/Pos_0607_boolean_type_002/Pos_0607_boolean_type_002.xml create mode 100644 ATS/xml/06_built_in_data_types/0607_boolean_type/Pos_0607_boolean_type_002/Pos_0607_boolean_type_002.xsd create mode 100644 ATS/xml/06_built_in_data_types/0608_anytype_and_anysimpletype_types/Pos_0608_anytype_and_anysimpletype_types_001/Pos_0608_anytype_and_anysimpletype_types_001.ttcn create mode 100644 ATS/xml/06_built_in_data_types/0608_anytype_and_anysimpletype_types/Pos_0608_anytype_and_anysimpletype_types_001/Pos_0608_anytype_and_anysimpletype_types_001.xml create mode 100644 ATS/xml/06_built_in_data_types/0608_anytype_and_anysimpletype_types/Pos_0608_anytype_and_anysimpletype_types_001/Pos_0608_anytype_and_anysimpletype_types_001.xsd create mode 100644 ATS/xml/06_built_in_data_types/0608_anytype_and_anysimpletype_types/Pos_0608_anytype_and_anysimpletype_types_002/Pos_0608_anytype_and_anysimpletype_types_002.ttcn create mode 100644 ATS/xml/06_built_in_data_types/0608_anytype_and_anysimpletype_types/Pos_0608_anytype_and_anysimpletype_types_002/Pos_0608_anytype_and_anysimpletype_types_002.xml create mode 100644 ATS/xml/06_built_in_data_types/0608_anytype_and_anysimpletype_types/Pos_0608_anytype_and_anysimpletype_types_002/Pos_0608_anytype_and_anysimpletype_types_002.xsd create mode 100644 ATS/xml/06_built_in_data_types/0608_anytype_and_anysimpletype_types/Pos_0608_anytype_and_anysimpletype_types_003/Pos_0608_anytype_and_anysimpletype_types_003.ttcn create mode 100644 ATS/xml/06_built_in_data_types/0608_anytype_and_anysimpletype_types/Pos_0608_anytype_and_anysimpletype_types_003/Pos_0608_anytype_and_anysimpletype_types_003.xml create mode 100644 ATS/xml/06_built_in_data_types/0608_anytype_and_anysimpletype_types/Pos_0608_anytype_and_anysimpletype_types_003/Pos_0608_anytype_and_anysimpletype_types_003.xsd create mode 100644 ATS/xml/06_built_in_data_types/0608_anytype_and_anysimpletype_types/Pos_0608_anytype_and_anysimpletype_types_004/Pos_0608_anytype_and_anysimpletype_types_004.ttcn create mode 100644 ATS/xml/06_built_in_data_types/0608_anytype_and_anysimpletype_types/Pos_0608_anytype_and_anysimpletype_types_004/Pos_0608_anytype_and_anysimpletype_types_004.xml create mode 100644 ATS/xml/06_built_in_data_types/0608_anytype_and_anysimpletype_types/Pos_0608_anytype_and_anysimpletype_types_004/Pos_0608_anytype_and_anysimpletype_types_004.xsd create mode 100644 ATS/xml/06_built_in_data_types/0608_anytype_and_anysimpletype_types/Pos_0608_anytype_and_anysimpletype_types_005/Pos_0608_anytype_and_anysimpletype_types_005.ttcn create mode 100644 ATS/xml/06_built_in_data_types/0608_anytype_and_anysimpletype_types/Pos_0608_anytype_and_anysimpletype_types_005/Pos_0608_anytype_and_anysimpletype_types_005.xml create mode 100644 ATS/xml/06_built_in_data_types/0608_anytype_and_anysimpletype_types/Pos_0608_anytype_and_anysimpletype_types_005/Pos_0608_anytype_and_anysimpletype_types_005.xsd create mode 100644 ATS/xml/06_built_in_data_types/0608_anytype_and_anysimpletype_types/Pos_0608_anytype_and_anysimpletype_types_006/Pos_0608_anytype_and_anysimpletype_types_006.ttcn create mode 100644 ATS/xml/06_built_in_data_types/0608_anytype_and_anysimpletype_types/Pos_0608_anytype_and_anysimpletype_types_006/Pos_0608_anytype_and_anysimpletype_types_006.xml create mode 100644 ATS/xml/06_built_in_data_types/0608_anytype_and_anysimpletype_types/Pos_0608_anytype_and_anysimpletype_types_006/Pos_0608_anytype_and_anysimpletype_types_006.xsd create mode 100644 ATS/xml/06_built_in_data_types/0608_anytype_and_anysimpletype_types/Pos_0608_anytype_and_anysimpletype_types_007/Pos_0608_anytype_and_anysimpletype_types_007.ttcn create mode 100644 ATS/xml/06_built_in_data_types/0608_anytype_and_anysimpletype_types/Pos_0608_anytype_and_anysimpletype_types_007/Pos_0608_anytype_and_anysimpletype_types_007.xml create mode 100644 ATS/xml/06_built_in_data_types/0608_anytype_and_anysimpletype_types/Pos_0608_anytype_and_anysimpletype_types_007/Pos_0608_anytype_and_anysimpletype_types_007.xsd create mode 100644 ATS/xml/06_built_in_data_types/06_top_level/Pos_06_top_level_001/Pos_06_top_level_001.ttcn create mode 100644 ATS/xml/06_built_in_data_types/06_top_level/Pos_06_top_level_001/Pos_06_top_level_001.xml create mode 100644 ATS/xml/06_built_in_data_types/06_top_level/Pos_06_top_level_001/Pos_06_top_level_001.xsd create mode 100644 ATS/xml/07_mapping_xsd_components/0701_component_attributes/070101_id/Pos_070101_id_001/Pos_070101_id_001.ttcn create mode 100644 ATS/xml/07_mapping_xsd_components/0701_component_attributes/070101_id/Pos_070101_id_001/Pos_070101_id_001.xml create mode 100644 ATS/xml/07_mapping_xsd_components/0701_component_attributes/070101_id/Pos_070101_id_001/Pos_070101_id_001.xsd create mode 100644 ATS/xml/07_mapping_xsd_components/0701_component_attributes/070101_id/Pos_070101_id_002/Pos_070101_id_002.ttcn create mode 100644 ATS/xml/07_mapping_xsd_components/0701_component_attributes/070101_id/Pos_070101_id_002/Pos_070101_id_002.xml create mode 100644 ATS/xml/07_mapping_xsd_components/0701_component_attributes/070101_id/Pos_070101_id_002/Pos_070101_id_002.xsd create mode 100644 ATS/xml/07_mapping_xsd_components/0701_component_attributes/070104_minoccurs_and_maxoccurs/Neg_070104_minoccurs_and_maxoccurs_001/Neg_070104_minoccurs_and_maxoccurs_001.ttcn create mode 100644 ATS/xml/07_mapping_xsd_components/0701_component_attributes/070104_minoccurs_and_maxoccurs/Neg_070104_minoccurs_and_maxoccurs_001/Neg_070104_minoccurs_and_maxoccurs_001.xsd create mode 100644 ATS/xml/07_mapping_xsd_components/0701_component_attributes/070104_minoccurs_and_maxoccurs/Neg_070104_minoccurs_and_maxoccurs_002/Neg_070104_minoccurs_and_maxoccurs_002.ttcn create mode 100644 ATS/xml/07_mapping_xsd_components/0701_component_attributes/070104_minoccurs_and_maxoccurs/Neg_070104_minoccurs_and_maxoccurs_002/Neg_070104_minoccurs_and_maxoccurs_002.xsd create mode 100644 ATS/xml/07_mapping_xsd_components/0701_component_attributes/070104_minoccurs_and_maxoccurs/Neg_070104_minoccurs_and_maxoccurs_003/Neg_070104_minoccurs_and_maxoccurs_003.ttcn create mode 100644 ATS/xml/07_mapping_xsd_components/0701_component_attributes/070104_minoccurs_and_maxoccurs/Neg_070104_minoccurs_and_maxoccurs_003/Neg_070104_minoccurs_and_maxoccurs_003.xsd create mode 100644 ATS/xml/07_mapping_xsd_components/0701_component_attributes/070104_minoccurs_and_maxoccurs/Pos_070104_minoccurs_and_maxoccurs_001/Pos_070104_minoccurs_and_maxoccurs_001.ttcn create mode 100644 ATS/xml/07_mapping_xsd_components/0701_component_attributes/070104_minoccurs_and_maxoccurs/Pos_070104_minoccurs_and_maxoccurs_001/Pos_070104_minoccurs_and_maxoccurs_001.xml create mode 100644 ATS/xml/07_mapping_xsd_components/0701_component_attributes/070104_minoccurs_and_maxoccurs/Pos_070104_minoccurs_and_maxoccurs_001/Pos_070104_minoccurs_and_maxoccurs_001.xsd create mode 100644 ATS/xml/07_mapping_xsd_components/0701_component_attributes/070104_minoccurs_and_maxoccurs/Pos_070104_minoccurs_and_maxoccurs_002/Pos_070104_minoccurs_and_maxoccurs_002.ttcn create mode 100644 ATS/xml/07_mapping_xsd_components/0701_component_attributes/070104_minoccurs_and_maxoccurs/Pos_070104_minoccurs_and_maxoccurs_002/Pos_070104_minoccurs_and_maxoccurs_002.xml create mode 100644 ATS/xml/07_mapping_xsd_components/0701_component_attributes/070104_minoccurs_and_maxoccurs/Pos_070104_minoccurs_and_maxoccurs_002/Pos_070104_minoccurs_and_maxoccurs_002.xsd create mode 100644 ATS/xml/07_mapping_xsd_components/0701_component_attributes/070104_minoccurs_and_maxoccurs/Pos_070104_minoccurs_and_maxoccurs_003/Pos_070104_minoccurs_and_maxoccurs_003.ttcn create mode 100644 ATS/xml/07_mapping_xsd_components/0701_component_attributes/070104_minoccurs_and_maxoccurs/Pos_070104_minoccurs_and_maxoccurs_003/Pos_070104_minoccurs_and_maxoccurs_003.xml create mode 100644 ATS/xml/07_mapping_xsd_components/0701_component_attributes/070104_minoccurs_and_maxoccurs/Pos_070104_minoccurs_and_maxoccurs_003/Pos_070104_minoccurs_and_maxoccurs_003.xsd create mode 100644 ATS/xml/07_mapping_xsd_components/0701_component_attributes/070104_minoccurs_and_maxoccurs/Pos_070104_minoccurs_and_maxoccurs_004/Pos_070104_minoccurs_and_maxoccurs_004.ttcn create mode 100644 ATS/xml/07_mapping_xsd_components/0701_component_attributes/070104_minoccurs_and_maxoccurs/Pos_070104_minoccurs_and_maxoccurs_004/Pos_070104_minoccurs_and_maxoccurs_004.xml create mode 100644 ATS/xml/07_mapping_xsd_components/0701_component_attributes/070104_minoccurs_and_maxoccurs/Pos_070104_minoccurs_and_maxoccurs_004/Pos_070104_minoccurs_and_maxoccurs_004.xsd create mode 100644 ATS/xml/07_mapping_xsd_components/0701_component_attributes/070104_minoccurs_and_maxoccurs/Pos_070104_minoccurs_and_maxoccurs_005/Pos_070104_minoccurs_and_maxoccurs_005.ttcn create mode 100644 ATS/xml/07_mapping_xsd_components/0701_component_attributes/070104_minoccurs_and_maxoccurs/Pos_070104_minoccurs_and_maxoccurs_005/Pos_070104_minoccurs_and_maxoccurs_005.xml create mode 100644 ATS/xml/07_mapping_xsd_components/0701_component_attributes/070104_minoccurs_and_maxoccurs/Pos_070104_minoccurs_and_maxoccurs_005/Pos_070104_minoccurs_and_maxoccurs_005.xsd create mode 100644 ATS/xml/07_mapping_xsd_components/0701_component_attributes/070104_minoccurs_and_maxoccurs/Pos_070104_minoccurs_and_maxoccurs_006/Pos_070104_minoccurs_and_maxoccurs_006.ttcn create mode 100644 ATS/xml/07_mapping_xsd_components/0701_component_attributes/070104_minoccurs_and_maxoccurs/Pos_070104_minoccurs_and_maxoccurs_006/Pos_070104_minoccurs_and_maxoccurs_006.xml create mode 100644 ATS/xml/07_mapping_xsd_components/0701_component_attributes/070104_minoccurs_and_maxoccurs/Pos_070104_minoccurs_and_maxoccurs_006/Pos_070104_minoccurs_and_maxoccurs_006.xsd create mode 100644 ATS/xml/07_mapping_xsd_components/0701_component_attributes/070104_minoccurs_and_maxoccurs/Pos_070104_minoccurs_and_maxoccurs_007/Pos_070104_minoccurs_and_maxoccurs_007.ttcn create mode 100644 ATS/xml/07_mapping_xsd_components/0701_component_attributes/070104_minoccurs_and_maxoccurs/Pos_070104_minoccurs_and_maxoccurs_007/Pos_070104_minoccurs_and_maxoccurs_007.xml create mode 100644 ATS/xml/07_mapping_xsd_components/0701_component_attributes/070104_minoccurs_and_maxoccurs/Pos_070104_minoccurs_and_maxoccurs_007/Pos_070104_minoccurs_and_maxoccurs_007.xsd create mode 100644 ATS/xml/07_mapping_xsd_components/0701_component_attributes/070105_default_and_fixed/Neg_070105_default_and_fixed_001/Neg_070105_default_and_fixed_001.ttcn create mode 100644 ATS/xml/07_mapping_xsd_components/0701_component_attributes/070105_default_and_fixed/Neg_070105_default_and_fixed_001/Neg_070105_default_and_fixed_001.xsd create mode 100644 ATS/xml/07_mapping_xsd_components/0701_component_attributes/070105_default_and_fixed/Pos_070105_default_and_fixed_001/Pos_070105_default_and_fixed_001.ttcn create mode 100644 ATS/xml/07_mapping_xsd_components/0701_component_attributes/070105_default_and_fixed/Pos_070105_default_and_fixed_001/Pos_070105_default_and_fixed_001.xml create mode 100644 ATS/xml/07_mapping_xsd_components/0701_component_attributes/070105_default_and_fixed/Pos_070105_default_and_fixed_001/Pos_070105_default_and_fixed_001.xsd create mode 100644 ATS/xml/07_mapping_xsd_components/0701_component_attributes/070105_default_and_fixed/Pos_070105_default_and_fixed_002/Pos_070105_default_and_fixed_002.ttcn create mode 100644 ATS/xml/07_mapping_xsd_components/0701_component_attributes/070105_default_and_fixed/Pos_070105_default_and_fixed_002/Pos_070105_default_and_fixed_002.xml create mode 100644 ATS/xml/07_mapping_xsd_components/0701_component_attributes/070105_default_and_fixed/Pos_070105_default_and_fixed_002/Pos_070105_default_and_fixed_002.xsd create mode 100644 ATS/xml/07_mapping_xsd_components/0701_component_attributes/070105_default_and_fixed/Pos_070105_default_and_fixed_003/Pos_070105_default_and_fixed_003.ttcn create mode 100644 ATS/xml/07_mapping_xsd_components/0701_component_attributes/070105_default_and_fixed/Pos_070105_default_and_fixed_003/Pos_070105_default_and_fixed_003.xml create mode 100644 ATS/xml/07_mapping_xsd_components/0701_component_attributes/070105_default_and_fixed/Pos_070105_default_and_fixed_003/Pos_070105_default_and_fixed_003.xsd create mode 100644 ATS/xml/07_mapping_xsd_components/0701_component_attributes/070105_default_and_fixed/Pos_070105_default_and_fixed_004/Pos_070105_default_and_fixed_004.ttcn create mode 100644 ATS/xml/07_mapping_xsd_components/0701_component_attributes/070105_default_and_fixed/Pos_070105_default_and_fixed_004/Pos_070105_default_and_fixed_004.xml create mode 100644 ATS/xml/07_mapping_xsd_components/0701_component_attributes/070105_default_and_fixed/Pos_070105_default_and_fixed_004/Pos_070105_default_and_fixed_004.xsd create mode 100644 ATS/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_001/Pos_070106_form_001.ttcn create mode 100644 ATS/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_001/Pos_070106_form_001.xml create mode 100644 ATS/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_001/Pos_070106_form_001.xsd create mode 100644 ATS/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_002/Pos_070106_form_002.ttcn create mode 100644 ATS/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_002/Pos_070106_form_002.xml create mode 100644 ATS/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_002/Pos_070106_form_002.xsd create mode 100644 ATS/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_003/Pos_070106_form_003.ttcn create mode 100644 ATS/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_003/Pos_070106_form_003.xml create mode 100644 ATS/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_003/Pos_070106_form_003.xsd create mode 100644 ATS/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_004/Pos_070106_form_004.ttcn create mode 100644 ATS/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_004/Pos_070106_form_004.xml create mode 100644 ATS/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_004/Pos_070106_form_004.xsd create mode 100644 ATS/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_005/Pos_070106_form_005.ttcn create mode 100644 ATS/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_005/Pos_070106_form_005.xml create mode 100644 ATS/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_005/Pos_070106_form_005.xsd create mode 100644 ATS/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_006/Pos_070106_form_006.ttcn create mode 100644 ATS/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_006/Pos_070106_form_006.xml create mode 100644 ATS/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_006/Pos_070106_form_006.xsd create mode 100644 ATS/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_007/Pos_070106_form_007.ttcn create mode 100644 ATS/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_007/Pos_070106_form_007.xml create mode 100644 ATS/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_007/Pos_070106_form_007.xsd create mode 100644 ATS/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_008/Pos_070106_form_008.ttcn create mode 100644 ATS/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_008/Pos_070106_form_008.xml create mode 100644 ATS/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_008/Pos_070106_form_008.xsd create mode 100644 ATS/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_009/Pos_070106_form_009.ttcn create mode 100644 ATS/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_009/Pos_070106_form_009.xml create mode 100644 ATS/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_009/Pos_070106_form_009.xsd create mode 100644 ATS/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_009/Pos_070106_form_009_2.xsd create mode 100644 ATS/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_010/Pos_070106_form_010.ttcn create mode 100644 ATS/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_010/Pos_070106_form_010.xml create mode 100644 ATS/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_010/Pos_070106_form_010.xsd create mode 100644 ATS/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_010/Pos_070106_form_010_2.xsd create mode 100644 ATS/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_011/Pos_070106_form_011.ttcn create mode 100644 ATS/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_011/Pos_070106_form_011.xml create mode 100644 ATS/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_011/Pos_070106_form_011.xsd create mode 100644 ATS/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_011/Pos_070106_form_011_2.xsd create mode 100644 ATS/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_012/Pos_070106_form_012.ttcn create mode 100644 ATS/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_012/Pos_070106_form_012.xml create mode 100644 ATS/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_012/Pos_070106_form_012.xsd create mode 100644 ATS/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_012/Pos_070106_form_012_2.xsd create mode 100644 ATS/xml/07_mapping_xsd_components/0701_component_attributes/070107_type/Pos_070107_type_001/Pos_070107_type_001.ttcn create mode 100644 ATS/xml/07_mapping_xsd_components/0701_component_attributes/070107_type/Pos_070107_type_001/Pos_070107_type_001.xml create mode 100644 ATS/xml/07_mapping_xsd_components/0701_component_attributes/070107_type/Pos_070107_type_001/Pos_070107_type_001.xsd create mode 100644 ATS/xml/07_mapping_xsd_components/0701_component_attributes/070107_type/Pos_070107_type_002/Pos_070107_type_002.ttcn create mode 100644 ATS/xml/07_mapping_xsd_components/0701_component_attributes/070107_type/Pos_070107_type_002/Pos_070107_type_002.xml create mode 100644 ATS/xml/07_mapping_xsd_components/0701_component_attributes/070107_type/Pos_070107_type_002/Pos_070107_type_002.xsd create mode 100644 ATS/xml/07_mapping_xsd_components/0701_component_attributes/070107_type/Pos_070107_type_003/Pos_070107_type_003.ttcn create mode 100644 ATS/xml/07_mapping_xsd_components/0701_component_attributes/070107_type/Pos_070107_type_003/Pos_070107_type_003.xml create mode 100644 ATS/xml/07_mapping_xsd_components/0701_component_attributes/070107_type/Pos_070107_type_003/Pos_070107_type_003.xsd create mode 100644 ATS/xml/07_mapping_xsd_components/0701_component_attributes/070111_nillable/Pos_070111_nillable_001/Pos_070111_nillable_001.ttcn create mode 100644 ATS/xml/07_mapping_xsd_components/0701_component_attributes/070111_nillable/Pos_070111_nillable_001/Pos_070111_nillable_001.xml create mode 100644 ATS/xml/07_mapping_xsd_components/0701_component_attributes/070111_nillable/Pos_070111_nillable_001/Pos_070111_nillable_001.xsd create mode 100644 ATS/xml/07_mapping_xsd_components/0701_component_attributes/070111_nillable/Pos_070111_nillable_002/Pos_070111_nillable_002.ttcn create mode 100644 ATS/xml/07_mapping_xsd_components/0701_component_attributes/070111_nillable/Pos_070111_nillable_002/Pos_070111_nillable_002.xml create mode 100644 ATS/xml/07_mapping_xsd_components/0701_component_attributes/070111_nillable/Pos_070111_nillable_002/Pos_070111_nillable_002.xsd create mode 100644 ATS/xml/07_mapping_xsd_components/0701_component_attributes/070111_nillable/Pos_070111_nillable_003/Pos_070111_nillable_003.ttcn create mode 100644 ATS/xml/07_mapping_xsd_components/0701_component_attributes/070111_nillable/Pos_070111_nillable_003/Pos_070111_nillable_003.xml create mode 100644 ATS/xml/07_mapping_xsd_components/0701_component_attributes/070111_nillable/Pos_070111_nillable_003/Pos_070111_nillable_003.xsd create mode 100644 ATS/xml/07_mapping_xsd_components/0701_component_attributes/070111_nillable/Pos_070111_nillable_004/Pos_070111_nillable_004.ttcn create mode 100644 ATS/xml/07_mapping_xsd_components/0701_component_attributes/070111_nillable/Pos_070111_nillable_004/Pos_070111_nillable_004.xml create mode 100644 ATS/xml/07_mapping_xsd_components/0701_component_attributes/070111_nillable/Pos_070111_nillable_004/Pos_070111_nillable_004.xsd create mode 100644 ATS/xml/07_mapping_xsd_components/0701_component_attributes/070111_nillable/Pos_070111_nillable_005/Pos_070111_nillable_005.ttcn create mode 100644 ATS/xml/07_mapping_xsd_components/0701_component_attributes/070111_nillable/Pos_070111_nillable_005/Pos_070111_nillable_005.xml create mode 100644 ATS/xml/07_mapping_xsd_components/0701_component_attributes/070111_nillable/Pos_070111_nillable_005/Pos_070111_nillable_005.xsd create mode 100644 ATS/xml/07_mapping_xsd_components/0701_component_attributes/070111_nillable/Pos_070111_nillable_006/Pos_070111_nillable_006.ttcn create mode 100644 ATS/xml/07_mapping_xsd_components/0701_component_attributes/070111_nillable/Pos_070111_nillable_006/Pos_070111_nillable_006.xml create mode 100644 ATS/xml/07_mapping_xsd_components/0701_component_attributes/070111_nillable/Pos_070111_nillable_006/Pos_070111_nillable_006.xsd create mode 100644 ATS/xml/07_mapping_xsd_components/0701_component_attributes/070112_use/Neg_070112_use_001/Neg_070112_use_001.ttcn create mode 100644 ATS/xml/07_mapping_xsd_components/0701_component_attributes/070112_use/Neg_070112_use_001/Neq_070112_use_001.xsd create mode 100644 ATS/xml/07_mapping_xsd_components/0701_component_attributes/070112_use/Pos_070112_use_001/Pos_070112_use_001.ttcn create mode 100644 ATS/xml/07_mapping_xsd_components/0701_component_attributes/070112_use/Pos_070112_use_001/Pos_070112_use_001.xml create mode 100644 ATS/xml/07_mapping_xsd_components/0701_component_attributes/070112_use/Pos_070112_use_001/Pos_070112_use_001.xsd create mode 100644 ATS/xml/07_mapping_xsd_components/0701_component_attributes/070112_use/Pos_070112_use_002/Pos_070112_use_002.ttcn create mode 100644 ATS/xml/07_mapping_xsd_components/0701_component_attributes/070112_use/Pos_070112_use_002/Pos_070112_use_002.xml create mode 100644 ATS/xml/07_mapping_xsd_components/0701_component_attributes/070112_use/Pos_070112_use_002/Pos_070112_use_002.xsd create mode 100644 ATS/xml/07_mapping_xsd_components/0701_component_attributes/070112_use/Pos_070112_use_003/Pos_070112_use_003.ttcn create mode 100644 ATS/xml/07_mapping_xsd_components/0701_component_attributes/070112_use/Pos_070112_use_003/Pos_070112_use_003.xml create mode 100644 ATS/xml/07_mapping_xsd_components/0701_component_attributes/070112_use/Pos_070112_use_003/Pos_070112_use_003.xsd create mode 100644 ATS/xml/07_mapping_xsd_components/0701_component_attributes/070114_final/Pos_070114_final_001/Pos_070114_final_001.ttcn create mode 100644 ATS/xml/07_mapping_xsd_components/0701_component_attributes/070114_final/Pos_070114_final_001/Pos_070114_final_001.xml create mode 100644 ATS/xml/07_mapping_xsd_components/0701_component_attributes/070114_final/Pos_070114_final_001/Pos_070114_final_001.xsd create mode 100644 ATS/xml/07_mapping_xsd_components/0703_element_component/Pos_0703_element_component_001/Pos_0703_element_component_001.ttcn create mode 100644 ATS/xml/07_mapping_xsd_components/0703_element_component/Pos_0703_element_component_001/Pos_0703_element_component_001.xml create mode 100644 ATS/xml/07_mapping_xsd_components/0703_element_component/Pos_0703_element_component_001/Pos_0703_element_component_001.xsd create mode 100644 ATS/xml/07_mapping_xsd_components/0703_element_component/Pos_0703_element_component_002/Pos_0703_element_component_002.ttcn create mode 100644 ATS/xml/07_mapping_xsd_components/0703_element_component/Pos_0703_element_component_002/Pos_0703_element_component_002.xml create mode 100644 ATS/xml/07_mapping_xsd_components/0703_element_component/Pos_0703_element_component_002/Pos_0703_element_component_002.xsd create mode 100644 ATS/xml/07_mapping_xsd_components/0703_element_component/Pos_0703_element_component_003/Pos_0703_element_component_003.ttcn create mode 100644 ATS/xml/07_mapping_xsd_components/0703_element_component/Pos_0703_element_component_003/Pos_0703_element_component_003.xml create mode 100644 ATS/xml/07_mapping_xsd_components/0703_element_component/Pos_0703_element_component_003/Pos_0703_element_component_003.xsd create mode 100644 ATS/xml/07_mapping_xsd_components/0703_element_component/Pos_0703_element_component_004/Pos_0703_element_component_004.ttcn create mode 100644 ATS/xml/07_mapping_xsd_components/0703_element_component/Pos_0703_element_component_004/Pos_0703_element_component_004.xml create mode 100644 ATS/xml/07_mapping_xsd_components/0703_element_component/Pos_0703_element_component_004/Pos_0703_element_component_004.xsd create mode 100644 ATS/xml/07_mapping_xsd_components/0703_element_component/Pos_0703_element_component_004/Pos_0703_element_component_004_1.xsd create mode 100644 ATS/xml/07_mapping_xsd_components/0704_attribute_and_attribute_group_definitions/070401_attribute_element_definitions/Pos_070401_attribute_element_definitions_001/Pos_070401_attribute_element_definitions_001.ttcn create mode 100644 ATS/xml/07_mapping_xsd_components/0704_attribute_and_attribute_group_definitions/070401_attribute_element_definitions/Pos_070401_attribute_element_definitions_001/Pos_070401_attribute_element_definitions_001.xml create mode 100644 ATS/xml/07_mapping_xsd_components/0704_attribute_and_attribute_group_definitions/070401_attribute_element_definitions/Pos_070401_attribute_element_definitions_001/Pos_070401_attribute_element_definitions_001.xsd create mode 100644 ATS/xml/07_mapping_xsd_components/0704_attribute_and_attribute_group_definitions/070402_attribute_group_definitions/Pos_070402_attribute_group_definitions_001/Pos_070402_attribute_group_definitions_001.ttcn create mode 100644 ATS/xml/07_mapping_xsd_components/0704_attribute_and_attribute_group_definitions/070402_attribute_group_definitions/Pos_070402_attribute_group_definitions_001/Pos_070402_attribute_group_definitions_001.xml create mode 100644 ATS/xml/07_mapping_xsd_components/0704_attribute_and_attribute_group_definitions/070402_attribute_group_definitions/Pos_070402_attribute_group_definitions_001/Pos_070402_attribute_group_definitions_001.xsd create mode 100644 ATS/xml/07_mapping_xsd_components/0704_attribute_defs/070401_attribute_element_definitions/Pos_070401_attribute_element_definitions_001/Pos_070401_attribute_element_definitions_001.ttcn create mode 100644 ATS/xml/07_mapping_xsd_components/0704_attribute_defs/070401_attribute_element_definitions/Pos_070401_attribute_element_definitions_001/Pos_070401_attribute_element_definitions_001.xml create mode 100644 ATS/xml/07_mapping_xsd_components/0704_attribute_defs/070401_attribute_element_definitions/Pos_070401_attribute_element_definitions_001/Pos_070401_attribute_element_definitions_001.xsd create mode 100644 ATS/xml/07_mapping_xsd_components/0704_attribute_defs/070402_attribute_group_definitions/Pos_070402_attribute_group_definitions_001/Pos_070402_attribute_group_definitions_001.ttcn create mode 100644 ATS/xml/07_mapping_xsd_components/0704_attribute_defs/070402_attribute_group_definitions/Pos_070402_attribute_group_definitions_001/Pos_070402_attribute_group_definitions_001.xml create mode 100644 ATS/xml/07_mapping_xsd_components/0704_attribute_defs/070402_attribute_group_definitions/Pos_070402_attribute_group_definitions_001/Pos_070402_attribute_group_definitions_001.xsd create mode 100644 ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070501_derivation_by_restriction/Pos_070501_derivation_by_restriction_001/Pos_070501_derivation_by_restriction_001.ttcn create mode 100644 ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070501_derivation_by_restriction/Pos_070501_derivation_by_restriction_001/Pos_070501_derivation_by_restriction_001.xml create mode 100644 ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070501_derivation_by_restriction/Pos_070501_derivation_by_restriction_001/Pos_070501_derivation_by_restriction_001.xsd create mode 100644 ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070501_derivation_by_restriction/Pos_070501_derivation_by_restriction_002/Pos_070501_derivation_by_restriction_002.ttcn create mode 100644 ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070501_derivation_by_restriction/Pos_070501_derivation_by_restriction_002/Pos_070501_derivation_by_restriction_002.xml create mode 100644 ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070501_derivation_by_restriction/Pos_070501_derivation_by_restriction_002/Pos_070501_derivation_by_restriction_002.xsd create mode 100644 ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070502_derivation_by_list/Neg_070502_derivation_by_list_001/Neg_070502_derivation_by_list_001.ttcn create mode 100644 ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070502_derivation_by_list/Neg_070502_derivation_by_list_001/Neg_070502_derivation_by_list_001.xsd create mode 100644 ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070502_derivation_by_list/Neg_070502_derivation_by_list_002/Neg_070502_derivation_by_list_002.ttcn create mode 100644 ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070502_derivation_by_list/Neg_070502_derivation_by_list_002/Neg_070502_derivation_by_list_002.xsd create mode 100644 ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070502_derivation_by_list/Pos_070502_derivation_by_list_001/Pos_070502_derivation_by_list_001.ttcn create mode 100644 ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070502_derivation_by_list/Pos_070502_derivation_by_list_001/Pos_070502_derivation_by_list_001.xml create mode 100644 ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070502_derivation_by_list/Pos_070502_derivation_by_list_001/Pos_070502_derivation_by_list_001.xsd create mode 100644 ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070502_derivation_by_list/Pos_070502_derivation_by_list_002/Pos_070502_derivation_by_list_002.ttcn create mode 100644 ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070502_derivation_by_list/Pos_070502_derivation_by_list_002/Pos_070502_derivation_by_list_002.xml create mode 100644 ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070502_derivation_by_list/Pos_070502_derivation_by_list_002/Pos_070502_derivation_by_list_002.xsd create mode 100644 ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070502_derivation_by_list/Pos_070502_derivation_by_list_003/Pos_070502_derivation_by_list_003.ttcn create mode 100644 ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070502_derivation_by_list/Pos_070502_derivation_by_list_003/Pos_070502_derivation_by_list_003.xml create mode 100644 ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070502_derivation_by_list/Pos_070502_derivation_by_list_003/Pos_070502_derivation_by_list_003.xsd create mode 100644 ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070502_derivation_by_list/Pos_070502_derivation_by_list_004/Pos_070502_derivation_by_list_004.ttcn create mode 100644 ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070502_derivation_by_list/Pos_070502_derivation_by_list_004/Pos_070502_derivation_by_list_004.xml create mode 100644 ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070502_derivation_by_list/Pos_070502_derivation_by_list_004/Pos_070502_derivation_by_list_004.xsd create mode 100644 ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070502_derivation_by_list/Pos_070502_derivation_by_list_005/Pos_070502_derivation_by_list_005.ttcn create mode 100644 ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070502_derivation_by_list/Pos_070502_derivation_by_list_005/Pos_070502_derivation_by_list_005.xml create mode 100644 ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070502_derivation_by_list/Pos_070502_derivation_by_list_005/Pos_070502_derivation_by_list_005.xsd create mode 100644 ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070503_derivation_by_union/Pos_070503_derivation_by_union_001/Pos_070503_derivation_by_union_001.ttcn create mode 100644 ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070503_derivation_by_union/Pos_070503_derivation_by_union_001/Pos_070503_derivation_by_union_001.xml create mode 100644 ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070503_derivation_by_union/Pos_070503_derivation_by_union_001/Pos_070503_derivation_by_union_001.xsd create mode 100644 ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070503_derivation_by_union/Pos_070503_derivation_by_union_002/Pos_070503_derivation_by_union_002.ttcn create mode 100644 ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070503_derivation_by_union/Pos_070503_derivation_by_union_002/Pos_070503_derivation_by_union_002.xml create mode 100644 ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070503_derivation_by_union/Pos_070503_derivation_by_union_002/Pos_070503_derivation_by_union_002.xsd create mode 100644 ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070503_derivation_by_union/Pos_070503_derivation_by_union_003/Pos_070503_derivation_by_union_003.ttcn create mode 100644 ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070503_derivation_by_union/Pos_070503_derivation_by_union_003/Pos_070503_derivation_by_union_003.xml create mode 100644 ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070503_derivation_by_union/Pos_070503_derivation_by_union_003/Pos_070503_derivation_by_union_003.xsd create mode 100644 ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070503_derivation_by_union/Pos_070503_derivation_by_union_004/Pos_070503_derivation_by_union_004.ttcn create mode 100644 ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070503_derivation_by_union/Pos_070503_derivation_by_union_004/Pos_070503_derivation_by_union_004.xml create mode 100644 ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070503_derivation_by_union/Pos_070503_derivation_by_union_004/Pos_070503_derivation_by_union_004.xsd create mode 100644 ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070503_derivation_by_union/Pos_070503_derivation_by_union_005/Pos_070503_derivation_by_union_005.ttcn create mode 100644 ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070503_derivation_by_union/Pos_070503_derivation_by_union_005/Pos_070503_derivation_by_union_005.xml create mode 100644 ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070503_derivation_by_union/Pos_070503_derivation_by_union_005/Pos_070503_derivation_by_union_005.xsd create mode 100644 ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070503_derivation_by_union/Pos_070503_derivation_by_union_006/Pos_070503_derivation_by_union_006.ttcn create mode 100644 ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070503_derivation_by_union/Pos_070503_derivation_by_union_006/Pos_070503_derivation_by_union_006.xml create mode 100644 ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070503_derivation_by_union/Pos_070503_derivation_by_union_006/Pos_070503_derivation_by_union_006.xsd create mode 100644 ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070503_derivation_by_union/Pos_070503_derivation_by_union_007/Pos_070503_derivation_by_union_007.ttcn create mode 100644 ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070503_derivation_by_union/Pos_070503_derivation_by_union_007/Pos_070503_derivation_by_union_007.xml create mode 100644 ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070503_derivation_by_union/Pos_070503_derivation_by_union_007/Pos_070503_derivation_by_union_007.xsd create mode 100644 ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070503_derivation_by_union/Pos_070503_derivation_by_union_008/Pos_070503_derivation_by_union_008.ttcn create mode 100644 ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070503_derivation_by_union/Pos_070503_derivation_by_union_008/Pos_070503_derivation_by_union_008.xml create mode 100644 ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070503_derivation_by_union/Pos_070503_derivation_by_union_008/Pos_070503_derivation_by_union_008.xsd create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070601_simple_content/07060101_extending_simple_content/Pos_07060101_extending_simple_content_001/Pos_07060101_extending_simple_content_001.ttcn create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070601_simple_content/07060101_extending_simple_content/Pos_07060101_extending_simple_content_001/Pos_07060101_extending_simple_content_001.xml create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070601_simple_content/07060101_extending_simple_content/Pos_07060101_extending_simple_content_001/Pos_07060101_extending_simple_content_001.xsd create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070601_simple_content/07060101_extending_simple_content/Pos_07060101_extending_simple_content_002/Pos_07060101_extending_simple_content_002.ttcn create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070601_simple_content/07060101_extending_simple_content/Pos_07060101_extending_simple_content_002/Pos_07060101_extending_simple_content_002.xml create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070601_simple_content/07060101_extending_simple_content/Pos_07060101_extending_simple_content_002/Pos_07060101_extending_simple_content_002.xsd create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070601_simple_content/07060102_restricting_simple_content/Neg_07060102_restricting_simple_content_001/Neg_07060102_restricting_simple_content_001.ttcn create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070601_simple_content/07060102_restricting_simple_content/Neg_07060102_restricting_simple_content_001/Neg_07060102_restricting_simple_content_001.xsd create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070601_simple_content/07060102_restricting_simple_content/Pos_07060102_restricting_simple_content_001/Pos_07060102_restricting_simple_content_001.ttcn create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070601_simple_content/07060102_restricting_simple_content/Pos_07060102_restricting_simple_content_001/Pos_07060102_restricting_simple_content_001.xml create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070601_simple_content/07060102_restricting_simple_content/Pos_07060102_restricting_simple_content_001/Pos_07060102_restricting_simple_content_001.xsd create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070601_simple_content/07060102_restricting_simple_content/Pos_07060102_restricting_simple_content_002/Pos_07060102_restricting_simple_content_002.ttcn create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070601_simple_content/07060102_restricting_simple_content/Pos_07060102_restricting_simple_content_002/Pos_07060102_restricting_simple_content_002.xml create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070601_simple_content/07060102_restricting_simple_content/Pos_07060102_restricting_simple_content_002/Pos_07060102_restricting_simple_content_002.xsd create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_001/Pos_07060201_derived_by_extension_001.ttcn create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_001/Pos_07060201_derived_by_extension_001.xml create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_001/Pos_07060201_derived_by_extension_001.xsd create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_002/Pos_07060201_derived_by_extension_002.ttcn create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_002/Pos_07060201_derived_by_extension_002.xml create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_002/Pos_07060201_derived_by_extension_002.xsd create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_003/Pos_07060201_derived_by_extension_003.ttcn create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_003/Pos_07060201_derived_by_extension_003.xml create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_003/Pos_07060201_derived_by_extension_003.xsd create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_004/Pos_07060201_derived_by_extension_004.ttcn create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_004/Pos_07060201_derived_by_extension_004.xml create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_004/Pos_07060201_derived_by_extension_004.xsd create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_005/Pos_07060201_derived_by_extension_005.ttcn create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_005/Pos_07060201_derived_by_extension_005.xml create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_005/Pos_07060201_derived_by_extension_005.xsd create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_006/Pos_07060201_derived_by_extension_006.ttcn create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_006/Pos_07060201_derived_by_extension_006.xml create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_006/Pos_07060201_derived_by_extension_006.xsd create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_007/Pos_07060201_derived_by_extension_007.ttcn create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_007/Pos_07060201_derived_by_extension_007.xml create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_007/Pos_07060201_derived_by_extension_007.xsd create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_008/Pos_07060201_derived_by_extension_008.ttcn create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_008/Pos_07060201_derived_by_extension_008.xml create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_008/Pos_07060201_derived_by_extension_008.xsd create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_009/Pos_07060201_derived_by_extension_009.ttcn create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_009/Pos_07060201_derived_by_extension_009.xml create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_009/Pos_07060201_derived_by_extension_009.xsd create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_010/Pos_07060201_derived_by_extension_010.ttcn create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_010/Pos_07060201_derived_by_extension_010.xml create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_010/Pos_07060201_derived_by_extension_010.xsd create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060202_derived_by_restriction/Pos_07060202_derived_by_restriction_001/Pos_07060202_derived_by_restriction_001.ttcn create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060202_derived_by_restriction/Pos_07060202_derived_by_restriction_001/Pos_07060202_derived_by_restriction_001.xml create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060202_derived_by_restriction/Pos_07060202_derived_by_restriction_001/Pos_07060202_derived_by_restriction_001.xsd create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060202_derived_by_restriction/Pos_07060202_derived_by_restriction_002/Pos_07060202_derived_by_restriction_002.ttcn create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060202_derived_by_restriction/Pos_07060202_derived_by_restriction_002/Pos_07060202_derived_by_restriction_002.xml create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060202_derived_by_restriction/Pos_07060202_derived_by_restriction_002/Pos_07060202_derived_by_restriction_002.xsd create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_001/Pos_070603_referencing_group_components_001.ttcn create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_001/Pos_070603_referencing_group_components_001.xml create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_001/Pos_070603_referencing_group_components_001.xsd create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_002/Pos_070603_referencing_group_components_002.ttcn create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_002/Pos_070603_referencing_group_components_002.xml create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_002/Pos_070603_referencing_group_components_002.xsd create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_003/Pos_070603_referencing_group_components_003.ttcn create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_003/Pos_070603_referencing_group_components_003.xml create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_003/Pos_070603_referencing_group_components_003.xsd create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_004/Pos_070603_referencing_group_components_004.ttcn create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_004/Pos_070603_referencing_group_components_004.xml create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_004/Pos_070603_referencing_group_components_004.xsd create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_005/Pos_070603_referencing_group_components_005.ttcn create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_005/Pos_070603_referencing_group_components_005.xml create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_005/Pos_070603_referencing_group_components_005.xsd create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_006/Pos_070603_referencing_group_components_006.ttcn create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_006/Pos_070603_referencing_group_components_006.xml create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_006/Pos_070603_referencing_group_components_006.xsd create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_007/Pos_070603_referencing_group_components_007.ttcn create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_007/Pos_070603_referencing_group_components_007.xml create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_007/Pos_070603_referencing_group_components_007.xsd create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_008/Pos_070603_referencing_group_components_008.ttcn create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_008/Pos_070603_referencing_group_components_008.xml create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_008/Pos_070603_referencing_group_components_008.xsd create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_009/Pos_070603_referencing_group_components_009.ttcn create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_009/Pos_070603_referencing_group_components_009.xml create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_009/Pos_070603_referencing_group_components_009.xsd create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_010/Pos_070603_referencing_group_components_010.ttcn create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_010/Pos_070603_referencing_group_components_010.xml create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_010/Pos_070603_referencing_group_components_010.xsd create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070604_all_content/Pos_070604_all_content_001/Pos_070604_all_content_001.ttcn create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070604_all_content/Pos_070604_all_content_001/Pos_070604_all_content_001.xml create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070604_all_content/Pos_070604_all_content_001/Pos_070604_all_content_001.xsd create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070604_all_content/Pos_070604_all_content_002/Pos_070604_all_content_002.ttcn create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070604_all_content/Pos_070604_all_content_002/Pos_070604_all_content_002.xml create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070604_all_content/Pos_070604_all_content_002/Pos_070604_all_content_002.xsd create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070604_all_content/Pos_070604_all_content_003/Pos_070604_all_content_003.ttcn create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070604_all_content/Pos_070604_all_content_003/Pos_070604_all_content_003.xml create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070604_all_content/Pos_070604_all_content_003/Pos_070604_all_content_003.xsd create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070604_all_content/Pos_070604_all_content_004/Pos_070604_all_content_004.ttcn create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070604_all_content/Pos_070604_all_content_004/Pos_070604_all_content_004.xml create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070604_all_content/Pos_070604_all_content_004/Pos_070604_all_content_004.xsd create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060501_choice_with_nested_elements/Pos_07060501_choice_with_nested_elements_001/Pos_07060501_choice_with_nested_elements_001.ttcn create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060501_choice_with_nested_elements/Pos_07060501_choice_with_nested_elements_001/Pos_07060501_choice_with_nested_elements_001.xml create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060501_choice_with_nested_elements/Pos_07060501_choice_with_nested_elements_001/Pos_07060501_choice_with_nested_elements_001.xsd create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060501_elements/Pos_07060501_choice_with_nested_elements_001/Pos_07060501_choice_with_nested_elements_001.ttcn create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060501_elements/Pos_07060501_choice_with_nested_elements_001/Pos_07060501_choice_with_nested_elements_001.xml create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060501_elements/Pos_07060501_choice_with_nested_elements_001/Pos_07060501_choice_with_nested_elements_001.xsd create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060502_choice_with_nested_group/Pos_07060502_choice_with_nested_group_001/Pos_07060502_choice_with_nested_group_001.ttcn create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060502_choice_with_nested_group/Pos_07060502_choice_with_nested_group_001/Pos_07060502_choice_with_nested_group_001.xml create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060502_choice_with_nested_group/Pos_07060502_choice_with_nested_group_001/Pos_07060502_choice_with_nested_group_001.xsd create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060502_group/Pos_07060502_choice_with_nested_group_001/Pos_07060502_choice_with_nested_group_001.ttcn create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060502_group/Pos_07060502_choice_with_nested_group_001/Pos_07060502_choice_with_nested_group_001.xml create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060502_group/Pos_07060502_choice_with_nested_group_001/Pos_07060502_choice_with_nested_group_001.xsd create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060503_choice/Pos_07060503_choice_with_nested_choice_001/Pos_07060503_choice_with_nested_choice_001.ttcn create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060503_choice/Pos_07060503_choice_with_nested_choice_001/Pos_07060503_choice_with_nested_choice_001.xml create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060503_choice/Pos_07060503_choice_with_nested_choice_001/Pos_07060503_choice_with_nested_choice_001.xsd create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060503_choice_with_nested_choice/Pos_07060503_choice_with_nested_choice_001/Pos_07060503_choice_with_nested_choice_001.ttcn create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060503_choice_with_nested_choice/Pos_07060503_choice_with_nested_choice_001/Pos_07060503_choice_with_nested_choice_001.xml create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060503_choice_with_nested_choice/Pos_07060503_choice_with_nested_choice_001/Pos_07060503_choice_with_nested_choice_001.xsd create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060504_choice_with_nested_sequence/Pos_07060504_choice_with_nested_sequence_001/Pos_07060504_choice_with_nested_sequence_001.ttcn create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060504_choice_with_nested_sequence/Pos_07060504_choice_with_nested_sequence_001/Pos_07060504_choice_with_nested_sequence_001.xml create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060504_choice_with_nested_sequence/Pos_07060504_choice_with_nested_sequence_001/Pos_07060504_choice_with_nested_sequence_001.xsd create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060504_choice_with_nested_sequence/Pos_07060504_choice_with_nested_sequence_002/Pos_07060504_choice_with_nested_sequence_002.ttcn create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060504_choice_with_nested_sequence/Pos_07060504_choice_with_nested_sequence_002/Pos_07060504_choice_with_nested_sequence_002.xml create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060504_choice_with_nested_sequence/Pos_07060504_choice_with_nested_sequence_002/Pos_07060504_choice_with_nested_sequence_002.xsd create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060504_sequence/Pos_07060504_choice_with_nested_sequence_001/Pos_07060504_choice_with_nested_sequence_001.ttcn create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060504_sequence/Pos_07060504_choice_with_nested_sequence_001/Pos_07060504_choice_with_nested_sequence_001.xml create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060504_sequence/Pos_07060504_choice_with_nested_sequence_001/Pos_07060504_choice_with_nested_sequence_001.xsd create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060504_sequence/Pos_07060504_choice_with_nested_sequence_002/Pos_07060504_choice_with_nested_sequence_002.ttcn create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060504_sequence/Pos_07060504_choice_with_nested_sequence_002/Pos_07060504_choice_with_nested_sequence_002.xml create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060504_sequence/Pos_07060504_choice_with_nested_sequence_002/Pos_07060504_choice_with_nested_sequence_002.xsd create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060504_sequence/Pos_07060504_choice_with_nested_sequence_003/Pos_07060504_choice_with_nested_sequence_003.ttcn create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060504_sequence/Pos_07060504_choice_with_nested_sequence_003/Pos_07060504_choice_with_nested_sequence_003.xml create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060504_sequence/Pos_07060504_choice_with_nested_sequence_003/Pos_07060504_choice_with_nested_sequence_003.xsd create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060505_any/Pos_07060505_choice_with_nested_any_001/Pos_07060505_choice_with_nested_any_001.ttcn create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060505_any/Pos_07060505_choice_with_nested_any_001/Pos_07060505_choice_with_nested_any_001.xml create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060505_any/Pos_07060505_choice_with_nested_any_001/Pos_07060505_choice_with_nested_any_001.xsd create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060505_choice_with_nested_any/Pos_07060505_choice_with_nested_any_001/Pos_07060505_choice_with_nested_any_001.ttcn create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060505_choice_with_nested_any/Pos_07060505_choice_with_nested_any_001/Pos_07060505_choice_with_nested_any_001.xml create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060505_choice_with_nested_any/Pos_07060505_choice_with_nested_any_001/Pos_07060505_choice_with_nested_any_001.xsd create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/070605_top_level/Pos_070605_top_level_001/Pos_070605_top_level_001.ttcn create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/070605_top_level/Pos_070605_top_level_001/Pos_070605_top_level_001.xml create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/070605_top_level/Pos_070605_top_level_001/Pos_070605_top_level_001.xsd create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/070605_top_level/Pos_070605_top_level_002/Pos_070605_top_level_002.ttcn create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/070605_top_level/Pos_070605_top_level_002/Pos_070605_top_level_002.xml create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/070605_top_level/Pos_070605_top_level_002/Pos_070605_top_level_002.xsd create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060601_element/Pos_07060601_sequence_with_nested_element_001/Pos_07060601_sequence_with_nested_element_001.ttcn create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060601_element/Pos_07060601_sequence_with_nested_element_001/Pos_07060601_sequence_with_nested_element_001.xml create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060601_element/Pos_07060601_sequence_with_nested_element_001/Pos_07060601_sequence_with_nested_element_001.xsd create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060601_sequence_with_nested_element/Pos_07060601_sequence_with_nested_element_001/Pos_07060601_sequence_with_nested_element_001.ttcn create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060601_sequence_with_nested_element/Pos_07060601_sequence_with_nested_element_001/Pos_07060601_sequence_with_nested_element_001.xml create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060601_sequence_with_nested_element/Pos_07060601_sequence_with_nested_element_001/Pos_07060601_sequence_with_nested_element_001.xsd create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060602_group/Pos_07060602_sequence_with_nested_group_001/Pos_07060602_sequence_with_nested_group_001.ttcn create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060602_group/Pos_07060602_sequence_with_nested_group_001/Pos_07060602_sequence_with_nested_group_001.xml create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060602_group/Pos_07060602_sequence_with_nested_group_001/Pos_07060602_sequence_with_nested_group_001.xsd create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060602_sequence_with_nested_group/Pos_07060602_sequence_with_nested_group_001/Pos_07060602_sequence_with_nested_group_001.ttcn create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060602_sequence_with_nested_group/Pos_07060602_sequence_with_nested_group_001/Pos_07060602_sequence_with_nested_group_001.xml create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060602_sequence_with_nested_group/Pos_07060602_sequence_with_nested_group_001/Pos_07060602_sequence_with_nested_group_001.xsd create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060603_choice/Pos_07060603_sequence_with_nested_choice_001/Pos_07060603_sequence_with_nested_choice_001.ttcn create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060603_choice/Pos_07060603_sequence_with_nested_choice_001/Pos_07060603_sequence_with_nested_choice_001.xml create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060603_choice/Pos_07060603_sequence_with_nested_choice_001/Pos_07060603_sequence_with_nested_choice_001.xsd create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060603_sequence_with_nested_choice/Pos_07060603_sequence_with_nested_choice_001/Pos_07060603_sequence_with_nested_choice_001.ttcn create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060603_sequence_with_nested_choice/Pos_07060603_sequence_with_nested_choice_001/Pos_07060603_sequence_with_nested_choice_001.xml create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060603_sequence_with_nested_choice/Pos_07060603_sequence_with_nested_choice_001/Pos_07060603_sequence_with_nested_choice_001.xsd create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060604_sequence/Pos_07060604_sequence_with_nested_sequence_001/Pos_07060604_sequence_with_nested_sequence_001.ttcn create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060604_sequence/Pos_07060604_sequence_with_nested_sequence_001/Pos_07060604_sequence_with_nested_sequence_001.xml create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060604_sequence/Pos_07060604_sequence_with_nested_sequence_001/Pos_07060604_sequence_with_nested_sequence_001.xsd create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060604_sequence/Pos_07060604_sequence_with_nested_sequence_002/Pos_07060604_sequence_with_nested_sequence_002.ttcn create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060604_sequence/Pos_07060604_sequence_with_nested_sequence_002/Pos_07060604_sequence_with_nested_sequence_002.xml create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060604_sequence/Pos_07060604_sequence_with_nested_sequence_002/Pos_07060604_sequence_with_nested_sequence_002.xsd create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060604_sequence_with_nested_sequence/Pos_07060604_sequence_with_nested_sequence_001/Pos_07060604_sequence_with_nested_sequence_001.ttcn create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060604_sequence_with_nested_sequence/Pos_07060604_sequence_with_nested_sequence_001/Pos_07060604_sequence_with_nested_sequence_001.xml create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060604_sequence_with_nested_sequence/Pos_07060604_sequence_with_nested_sequence_001/Pos_07060604_sequence_with_nested_sequence_001.xsd create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060604_sequence_with_nested_sequence/Pos_07060604_sequence_with_nested_sequence_002/Pos_07060604_sequence_with_nested_sequence_002.ttcn create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060604_sequence_with_nested_sequence/Pos_07060604_sequence_with_nested_sequence_002/Pos_07060604_sequence_with_nested_sequence_002.xml create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060604_sequence_with_nested_sequence/Pos_07060604_sequence_with_nested_sequence_002/Pos_07060604_sequence_with_nested_sequence_002.xsd create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060605_any/Pos_07060605_sequence_with_nested_any_content_001/Pos_07060605_sequence_with_nested_any_content_001.ttcn create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060605_any/Pos_07060605_sequence_with_nested_any_content_001/Pos_07060605_sequence_with_nested_any_content_001.xml create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060605_any/Pos_07060605_sequence_with_nested_any_content_001/Pos_07060605_sequence_with_nested_any_content_001.xsd create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060605_sequence_with_nested_any_content/Pos_07060605_sequence_with_nested_any_content_001/Pos_07060605_sequence_with_nested_any_content_001.ttcn create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060605_sequence_with_nested_any_content/Pos_07060605_sequence_with_nested_any_content_001/Pos_07060605_sequence_with_nested_any_content_001.xml create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060605_sequence_with_nested_any_content/Pos_07060605_sequence_with_nested_any_content_001/Pos_07060605_sequence_with_nested_any_content_001.xsd create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060606_effect_of_minoccurs_and_maxoccurs/Pos_07060606_effect_of_minoccurs_and_maxoccurs_001/Pos_07060606_effect_of_minoccurs_and_maxoccurs_001.ttcn create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060606_effect_of_minoccurs_and_maxoccurs/Pos_07060606_effect_of_minoccurs_and_maxoccurs_001/Pos_07060606_effect_of_minoccurs_and_maxoccurs_001.xml create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060606_effect_of_minoccurs_and_maxoccurs/Pos_07060606_effect_of_minoccurs_and_maxoccurs_001/Pos_07060606_effect_of_minoccurs_and_maxoccurs_001.xsd create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060606_effect_of_minoccurs_and_maxoccurs/Pos_07060606_effect_of_minoccurs_and_maxoccurs_002/Pos_07060606_effect_of_minoccurs_and_maxoccurs_002.ttcn create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060606_effect_of_minoccurs_and_maxoccurs/Pos_07060606_effect_of_minoccurs_and_maxoccurs_002/Pos_07060606_effect_of_minoccurs_and_maxoccurs_002.xml create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060606_effect_of_minoccurs_and_maxoccurs/Pos_07060606_effect_of_minoccurs_and_maxoccurs_002/Pos_07060606_effect_of_minoccurs_and_maxoccurs_002.xsd create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060606_effect_of_minoccurs_and_maxoccurs/Pos_07060606_effect_of_minoccurs_and_maxoccurs_003/Pos_07060606_effect_of_minoccurs_and_maxoccurs_003.ttcn create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060606_effect_of_minoccurs_and_maxoccurs/Pos_07060606_effect_of_minoccurs_and_maxoccurs_003/Pos_07060606_effect_of_minoccurs_and_maxoccurs_003.xml create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060606_effect_of_minoccurs_and_maxoccurs/Pos_07060606_effect_of_minoccurs_and_maxoccurs_003/Pos_07060606_effect_of_minoccurs_and_maxoccurs_003.xsd create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060606_effect_of_minoccurs_and_maxoccurs/Pos_07060606_effect_of_minoccurs_and_maxoccurs_004/Pos_07060606_effect_of_minoccurs_and_maxoccurs_004.ttcn create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060606_effect_of_minoccurs_and_maxoccurs/Pos_07060606_effect_of_minoccurs_and_maxoccurs_004/Pos_07060606_effect_of_minoccurs_and_maxoccurs_004.xml create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060606_effect_of_minoccurs_and_maxoccurs/Pos_07060606_effect_of_minoccurs_and_maxoccurs_004/Pos_07060606_effect_of_minoccurs_and_maxoccurs_004.xsd create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060606_minmaxoccurs/Pos_07060606_effect_of_minoccurs_and_maxoccurs_001/Pos_07060606_effect_of_minoccurs_and_maxoccurs_001.ttcn create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060606_minmaxoccurs/Pos_07060606_effect_of_minoccurs_and_maxoccurs_001/Pos_07060606_effect_of_minoccurs_and_maxoccurs_001.xml create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060606_minmaxoccurs/Pos_07060606_effect_of_minoccurs_and_maxoccurs_001/Pos_07060606_effect_of_minoccurs_and_maxoccurs_001.xsd create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060606_minmaxoccurs/Pos_07060606_effect_of_minoccurs_and_maxoccurs_002/Pos_07060606_effect_of_minoccurs_and_maxoccurs_002.ttcn create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060606_minmaxoccurs/Pos_07060606_effect_of_minoccurs_and_maxoccurs_002/Pos_07060606_effect_of_minoccurs_and_maxoccurs_002.xml create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060606_minmaxoccurs/Pos_07060606_effect_of_minoccurs_and_maxoccurs_002/Pos_07060606_effect_of_minoccurs_and_maxoccurs_002.xsd create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060606_minmaxoccurs/Pos_07060606_effect_of_minoccurs_and_maxoccurs_003/Pos_07060606_effect_of_minoccurs_and_maxoccurs_003.ttcn create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060606_minmaxoccurs/Pos_07060606_effect_of_minoccurs_and_maxoccurs_003/Pos_07060606_effect_of_minoccurs_and_maxoccurs_003.xml create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060606_minmaxoccurs/Pos_07060606_effect_of_minoccurs_and_maxoccurs_003/Pos_07060606_effect_of_minoccurs_and_maxoccurs_003.xsd create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060606_minmaxoccurs/Pos_07060606_effect_of_minoccurs_and_maxoccurs_004/Pos_07060606_effect_of_minoccurs_and_maxoccurs_004.ttcn create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060606_minmaxoccurs/Pos_07060606_effect_of_minoccurs_and_maxoccurs_004/Pos_07060606_effect_of_minoccurs_and_maxoccurs_004.xml create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060606_minmaxoccurs/Pos_07060606_effect_of_minoccurs_and_maxoccurs_004/Pos_07060606_effect_of_minoccurs_and_maxoccurs_004.xsd create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060606_minmaxoccurs/Pos_07060606_effect_of_minoccurs_and_maxoccurs_005/Pos_07060606_effect_of_minoccurs_and_maxoccurs_005.ttcn create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060606_minmaxoccurs/Pos_07060606_effect_of_minoccurs_and_maxoccurs_005/Pos_07060606_effect_of_minoccurs_and_maxoccurs_005.xml create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060606_minmaxoccurs/Pos_07060606_effect_of_minoccurs_and_maxoccurs_005/Pos_07060606_effect_of_minoccurs_and_maxoccurs_005.xsd create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070607_attribute/Pos_070607_attribute__001/Pos_070607_attribute_definitions_attribute_and_attributegroup_references_001.ttcn create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070607_attribute/Pos_070607_attribute__001/Pos_070607_attribute_definitions_attribute_and_attributegroup_references_001.xml create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070607_attribute/Pos_070607_attribute__001/Pos_070607_attribute_definitions_attribute_and_attributegroup_references_001.xsd create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070607_attribute/Pos_070607_attribute__002/Pos_070607_attribute_definitions_attribute_and_attributegroup_references_002.ttcn create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070607_attribute/Pos_070607_attribute__002/Pos_070607_attribute_definitions_attribute_and_attributegroup_references_002.xml create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070607_attribute/Pos_070607_attribute__002/Pos_070607_attribute_definitions_attribute_and_attributegroup_references_002.xsd create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070607_attribute/Pos_070607_attribute__003/Pos_070607_attribute_definitions_attribute_and_attributegroup_references_003.ttcn create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070607_attribute/Pos_070607_attribute__003/Pos_070607_attribute_definitions_attribute_and_attributegroup_references_003.xml create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070607_attribute/Pos_070607_attribute__003/Pos_070607_attribute_definitions_attribute_and_attributegroup_references_003.xsd create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070608_mixed_content/Neg_070608_mixed_content_005/Neg_070608_mixed_content_001.ttcn create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070608_mixed_content/Neg_070608_mixed_content_005/Neg_070608_mixed_content_001.xml create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070608_mixed_content/Neg_070608_mixed_content_005/Neg_070608_mixed_content_001.xsd create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070608_mixed_content/Pos_070608_mixed_content_001/Pos_070608_mixed_content_001.ttcn create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070608_mixed_content/Pos_070608_mixed_content_001/Pos_070608_mixed_content_001.xml create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070608_mixed_content/Pos_070608_mixed_content_001/Pos_070608_mixed_content_001.xsd create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070608_mixed_content/Pos_070608_mixed_content_002/Pos_070608_mixed_content_002.ttcn create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070608_mixed_content/Pos_070608_mixed_content_002/Pos_070608_mixed_content_002.xml create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070608_mixed_content/Pos_070608_mixed_content_002/Pos_070608_mixed_content_002.xsd create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070608_mixed_content/Pos_070608_mixed_content_003/Pos_070608_mixed_content_003.ttcn create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070608_mixed_content/Pos_070608_mixed_content_003/Pos_070608_mixed_content_003.xml create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070608_mixed_content/Pos_070608_mixed_content_003/Pos_070608_mixed_content_003.xsd create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070608_mixed_content/Pos_070608_mixed_content_004/Pos_070608_mixed_content_004.ttcn create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070608_mixed_content/Pos_070608_mixed_content_004/Pos_070608_mixed_content_004.xml create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070608_mixed_content/Pos_070608_mixed_content_004/Pos_070608_mixed_content_004.xsd create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070608_mixed_content/Pos_070608_mixed_content_005/Pos_070608_mixed_content_005.ttcn create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070608_mixed_content/Pos_070608_mixed_content_005/Pos_070608_mixed_content_005.xml create mode 100644 ATS/xml/07_mapping_xsd_components/0706_complextype_components/070608_mixed_content/Pos_070608_mixed_content_005/Pos_070608_mixed_content_005.xsd create mode 100644 ATS/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070701_the_any_element/Pos_070701_the_any_element_001/Pos_070701_the_any_element_001.ttcn create mode 100644 ATS/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070701_the_any_element/Pos_070701_the_any_element_001/Pos_070701_the_any_element_001.xml create mode 100644 ATS/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070701_the_any_element/Pos_070701_the_any_element_001/Pos_070701_the_any_element_001.xsd create mode 100644 ATS/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070701_the_any_element/Pos_070701_the_any_element_002/Pos_070701_the_any_element_002.ttcn create mode 100644 ATS/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070701_the_any_element/Pos_070701_the_any_element_002/Pos_070701_the_any_element_002.xml create mode 100644 ATS/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070701_the_any_element/Pos_070701_the_any_element_002/Pos_070701_the_any_element_002.xsd create mode 100644 ATS/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070701_the_any_element/Pos_070701_the_any_element_003/Pos_070701_the_any_element_003.ttcn create mode 100644 ATS/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070701_the_any_element/Pos_070701_the_any_element_003/Pos_070701_the_any_element_003.xml create mode 100644 ATS/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070701_the_any_element/Pos_070701_the_any_element_003/Pos_070701_the_any_element_003.xsd create mode 100644 ATS/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070701_the_any_element/Pos_070701_the_any_element_003/Pos_070701_the_any_element_003_01_xsd.xsd create mode 100644 ATS/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070701_the_any_element/Pos_070701_the_any_element_004/Pos_070701_the_any_element_004.ttcn create mode 100644 ATS/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070701_the_any_element/Pos_070701_the_any_element_004/Pos_070701_the_any_element_004.xml create mode 100644 ATS/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070701_the_any_element/Pos_070701_the_any_element_004/Pos_070701_the_any_element_004.xsd create mode 100644 ATS/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070701_the_any_element/Pos_070701_the_any_element_004/Pos_070701_the_any_element_004_1.xsd create mode 100644 ATS/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070701_the_any_element/Pos_070701_the_any_element_005/Pos_070701_the_any_element_005.ttcn create mode 100644 ATS/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070701_the_any_element/Pos_070701_the_any_element_005/Pos_070701_the_any_element_005.xml create mode 100644 ATS/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070701_the_any_element/Pos_070701_the_any_element_005/Pos_070701_the_any_element_005.xsd create mode 100644 ATS/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070701_the_any_element/Pos_070701_the_any_element_006/Pos_070701_the_any_element_006.ttcn create mode 100644 ATS/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070701_the_any_element/Pos_070701_the_any_element_006/Pos_070701_the_any_element_006.xml create mode 100644 ATS/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070701_the_any_element/Pos_070701_the_any_element_006/Pos_070701_the_any_element_006.xsd create mode 100644 ATS/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070701_the_any_element/Pos_070701_the_any_element_007/Pos_070701_the_any_element_007.ttcn create mode 100644 ATS/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070701_the_any_element/Pos_070701_the_any_element_007/Pos_070701_the_any_element_007.xml create mode 100644 ATS/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070701_the_any_element/Pos_070701_the_any_element_007/Pos_070701_the_any_element_007.xsd create mode 100644 ATS/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070702_the_anyattribute_element/Pos_070702_the_anyattribute_element_001/Pos_070702_the_anyattribute_element_001.ttcn create mode 100644 ATS/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070702_the_anyattribute_element/Pos_070702_the_anyattribute_element_001/Pos_070702_the_anyattribute_element_001.xml create mode 100644 ATS/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070702_the_anyattribute_element/Pos_070702_the_anyattribute_element_001/Pos_070702_the_anyattribute_element_001.xsd create mode 100644 ATS/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070702_the_anyattribute_element/Pos_070702_the_anyattribute_element_002/Pos_070702_the_anyattribute_element_002.ttcn create mode 100644 ATS/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070702_the_anyattribute_element/Pos_070702_the_anyattribute_element_002/Pos_070702_the_anyattribute_element_002.xml create mode 100644 ATS/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070702_the_anyattribute_element/Pos_070702_the_anyattribute_element_002/Pos_070702_the_anyattribute_element_002.xsd create mode 100644 ATS/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070702_the_anyattribute_element/Pos_070702_the_anyattribute_element_003/Pos_070702_the_anyattribute_element_003.ttcn create mode 100644 ATS/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070702_the_anyattribute_element/Pos_070702_the_anyattribute_element_003/Pos_070702_the_anyattribute_element_003.xml create mode 100644 ATS/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070702_the_anyattribute_element/Pos_070702_the_anyattribute_element_003/Pos_070702_the_anyattribute_element_003.xsd create mode 100644 ATS/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070702_the_anyattribute_element/Pos_070702_the_anyattribute_element_004/Pos_070702_the_anyattribute_element_004.ttcn create mode 100644 ATS/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070702_the_anyattribute_element/Pos_070702_the_anyattribute_element_004/Pos_070702_the_anyattribute_element_004.xml create mode 100644 ATS/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070702_the_anyattribute_element/Pos_070702_the_anyattribute_element_004/Pos_070702_the_anyattribute_element_004.xsd create mode 100644 ATS/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070702_the_anyattribute_element/Pos_070702_the_anyattribute_element_005/Pos_070702_the_anyattribute_element_005.ttcn create mode 100644 ATS/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070702_the_anyattribute_element/Pos_070702_the_anyattribute_element_005/Pos_070702_the_anyattribute_element_005.xml create mode 100644 ATS/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070702_the_anyattribute_element/Pos_070702_the_anyattribute_element_005/Pos_070702_the_anyattribute_element_005.xsd create mode 100644 ATS/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070702_the_anyattribute_element/Pos_070702_the_anyattribute_element_006/Pos_070702_the_anyattribute_element_006.ttcn create mode 100644 ATS/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070702_the_anyattribute_element/Pos_070702_the_anyattribute_element_006/Pos_070702_the_anyattribute_element_006.xml create mode 100644 ATS/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070702_the_anyattribute_element/Pos_070702_the_anyattribute_element_006/Pos_070702_the_anyattribute_element_006.xsd create mode 100644 ATS/xml/07_mapping_xsd_components/0708_annotation/Pos_0708_annotation_001/Pos_0708_annotation_001.ttcn create mode 100644 ATS/xml/07_mapping_xsd_components/0708_annotation/Pos_0708_annotation_001/Pos_0708_annotation_001.xml create mode 100644 ATS/xml/07_mapping_xsd_components/0708_annotation/Pos_0708_annotation_001/Pos_0708_annotation_001.xsd create mode 100644 ATS/xml/07_mapping_xsd_components/0709_group_components/Pos_0709_group_components_001/Pos_0709_group_components_001.ttcn create mode 100644 ATS/xml/07_mapping_xsd_components/0709_group_components/Pos_0709_group_components_001/Pos_0709_group_components_001.xml create mode 100644 ATS/xml/07_mapping_xsd_components/0709_group_components/Pos_0709_group_components_001/Pos_0709_group_components_001.xsd create mode 100644 ATS/xml/07_mapping_xsd_components/0709_group_components/Pos_0709_group_components_002/Pos_0709_group_components_002.ttcn create mode 100644 ATS/xml/07_mapping_xsd_components/0709_group_components/Pos_0709_group_components_002/Pos_0709_group_components_002.xml create mode 100644 ATS/xml/07_mapping_xsd_components/0709_group_components/Pos_0709_group_components_002/Pos_0709_group_components_002.xsd create mode 100644 ATS/xml/07_mapping_xsd_components/0709_group_components/Pos_0709_group_components_003/Pos_0709_group_components_003.ttcn create mode 100644 ATS/xml/07_mapping_xsd_components/0709_group_components/Pos_0709_group_components_003/Pos_0709_group_components_003.xml create mode 100644 ATS/xml/07_mapping_xsd_components/0709_group_components/Pos_0709_group_components_003/Pos_0709_group_components_003.xsd create mode 100644 ATS/xml/07_mapping_xsd_components/0710_identity/Pos_0710_identity_constraint_definition_schema_components_001/Pos_0710_identity_constraint_definition_schema_components_001.ttcn create mode 100644 ATS/xml/07_mapping_xsd_components/0710_identity/Pos_0710_identity_constraint_definition_schema_components_001/Pos_0710_identity_constraint_definition_schema_components_001.xml create mode 100644 ATS/xml/07_mapping_xsd_components/0710_identity/Pos_0710_identity_constraint_definition_schema_components_001/Pos_0710_identity_constraint_definition_schema_components_001.xsd create mode 100644 ATS/xml/07_mapping_xsd_components/0710_identity/Pos_0710_identity_constraint_definition_schema_components_002/Pos_0710_identity_constraint_definition_schema_components_002.ttcn create mode 100644 ATS/xml/07_mapping_xsd_components/0710_identity/Pos_0710_identity_constraint_definition_schema_components_002/Pos_0710_identity_constraint_definition_schema_components_002.xml create mode 100644 ATS/xml/07_mapping_xsd_components/0710_identity/Pos_0710_identity_constraint_definition_schema_components_002/Pos_0710_identity_constraint_definition_schema_components_002.xsd create mode 100644 ATS/xml/07_mapping_xsd_components/0710_identity/Pos_0710_identity_constraint_definition_schema_components_003/Pos_0710_identity_constraint_definition_schema_components_003.ttcn create mode 100644 ATS/xml/07_mapping_xsd_components/0710_identity/Pos_0710_identity_constraint_definition_schema_components_003/Pos_0710_identity_constraint_definition_schema_components_003.xml create mode 100644 ATS/xml/07_mapping_xsd_components/0710_identity/Pos_0710_identity_constraint_definition_schema_components_003/Pos_0710_identity_constraint_definition_schema_components_003.xsd create mode 100644 ATS/xml/08_substitutions/0801_element_substitution/080101_head_elements_of_substitution_groups/Pos_080101_head_elements_of_substitution_groups_001/Pos_080101_head_elements_of_substitution_groups_001.ttcn create mode 100644 ATS/xml/08_substitutions/0801_element_substitution/080101_head_elements_of_substitution_groups/Pos_080101_head_elements_of_substitution_groups_001/Pos_080101_head_elements_of_substitution_groups_001.xml create mode 100644 ATS/xml/08_substitutions/0801_element_substitution/080101_head_elements_of_substitution_groups/Pos_080101_head_elements_of_substitution_groups_001/Pos_080101_head_elements_of_substitution_groups_001.xsd create mode 100644 ATS/xml/08_substitutions/0801_element_substitution/080101_head_elements_of_substitution_groups/Pos_080101_head_elements_of_substitution_groups_002/Pos_080101_head_elements_of_substitution_groups_002.ttcn create mode 100644 ATS/xml/08_substitutions/0801_element_substitution/080101_head_elements_of_substitution_groups/Pos_080101_head_elements_of_substitution_groups_002/Pos_080101_head_elements_of_substitution_groups_002.xml create mode 100644 ATS/xml/08_substitutions/0801_element_substitution/080101_head_elements_of_substitution_groups/Pos_080101_head_elements_of_substitution_groups_002/Pos_080101_head_elements_of_substitution_groups_002.xsd create mode 100644 ATS/xml/08_substitutions/0801_element_substitution/080101_head_elements_of_substitution_groups/Pos_080101_head_elements_of_substitution_groups_003/Pos_080101_head_elements_of_substitution_groups_003.ttcn create mode 100644 ATS/xml/08_substitutions/0801_element_substitution/080101_head_elements_of_substitution_groups/Pos_080101_head_elements_of_substitution_groups_003/Pos_080101_head_elements_of_substitution_groups_003.xml create mode 100644 ATS/xml/08_substitutions/0801_element_substitution/080101_head_elements_of_substitution_groups/Pos_080101_head_elements_of_substitution_groups_003/Pos_080101_head_elements_of_substitution_groups_003.xsd create mode 100644 ATS/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_001/Neg_A_ttcn3_module_xsd_001.ttcn create mode 100644 ATS/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_002/Neg_A_ttcn3_module_xsd_002.ttcn create mode 100644 ATS/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_003/Neg_A_ttcn3_module_xsd_003.ttcn create mode 100644 ATS/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_004/Neg_A_ttcn3_module_xsd_004.ttcn create mode 100644 ATS/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_005/Neg_A_ttcn3_module_xsd_005.ttcn create mode 100644 ATS/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_006/Neg_A_ttcn3_module_xsd_006.ttcn create mode 100644 ATS/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_007/Neg_A_ttcn3_module_xsd_007.ttcn create mode 100644 ATS/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_008/Neg_A_ttcn3_module_xsd_008.ttcn create mode 100644 ATS/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_009/Neg_A_ttcn3_module_xsd_009.ttcn create mode 100644 ATS/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_010/Neg_A_ttcn3_module_xsd_010.ttcn create mode 100644 ATS/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_011/Neg_A_ttcn3_module_xsd_011.ttcn create mode 100644 ATS/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_012/Neg_A_ttcn3_module_xsd_012.ttcn create mode 100644 ATS/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_013/Neg_A_ttcn3_module_xsd_013.ttcn create mode 100644 ATS/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_014/Neg_A_ttcn3_module_xsd_014.ttcn create mode 100644 ATS/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_015/Neg_A_ttcn3_module_xsd_015.ttcn create mode 100644 ATS/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_016/Neg_A_ttcn3_module_xsd_016.ttcn create mode 100644 ATS/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_017/Neg_A_ttcn3_module_xsd_017.ttcn create mode 100644 ATS/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_018/Neg_A_ttcn3_module_xsd_018.ttcn create mode 100644 ATS/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_019/Neg_A_ttcn3_module_xsd_019.ttcn create mode 100644 ATS/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_020/Neg_A_ttcn3_module_xsd_020.ttcn create mode 100644 ATS/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_021/Neg_A_ttcn3_module_xsd_021.ttcn create mode 100644 ATS/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_022/Neg_A_ttcn3_module_xsd_022.ttcn create mode 100644 ATS/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_023/Neg_A_ttcn3_module_xsd_023.ttcn create mode 100644 ATS/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_024/Neg_A_ttcn3_module_xsd_024.ttcn create mode 100644 ATS/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_025/Neg_A_ttcn3_module_xsd_025.ttcn create mode 100644 ATS/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_026/Neg_A_ttcn3_module_xsd_026.ttcn create mode 100644 ATS/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_027/Neg_A_ttcn3_module_xsd_027.ttcn create mode 100644 ATS/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_028/Neg_A_ttcn3_module_xsd_028.ttcn create mode 100644 ATS/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_029/Neg_A_ttcn3_module_xsd_029.ttcn create mode 100644 ATS/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_030/Neg_A_ttcn3_module_xsd_030.ttcn create mode 100644 ATS/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_031/Neg_A_ttcn3_module_xsd_031.ttcn create mode 100644 ATS/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_032/Neg_A_ttcn3_module_xsd_032.ttcn create mode 100644 ATS/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_033/Neg_A_ttcn3_module_xsd_033.ttcn create mode 100644 ATS/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_034/Neg_A_ttcn3_module_xsd_034.ttcn create mode 100644 ATS/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_035/Neg_A_ttcn3_module_xsd_035.ttcn create mode 100644 ATS/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_036/Neg_A_ttcn3_module_xsd_036.ttcn create mode 100644 ATS/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_037/Neg_A_ttcn3_module_xsd_037.ttcn create mode 100644 ATS/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_038/Neg_A_ttcn3_module_xsd_038.ttcn create mode 100644 ATS/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_039/Neg_A_ttcn3_module_xsd_039.ttcn create mode 100644 ATS/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_040/Neg_A_ttcn3_module_xsd_040.ttcn create mode 100644 ATS/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_041/Neg_A_ttcn3_module_xsd_041.ttcn create mode 100644 ATS/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_042/Neg_A_ttcn3_module_xsd_042.ttcn create mode 100644 ATS/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_043/Neg_A_ttcn3_module_xsd_043.ttcn create mode 100644 ATS/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_044/Neg_A_ttcn3_module_xsd_044.ttcn create mode 100644 ATS/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_045/Neg_A_ttcn3_module_xsd_045.ttcn create mode 100644 ATS/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_046/Neg_A_ttcn3_module_xsd_046.ttcn create mode 100644 ATS/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_047/Neg_A_ttcn3_module_xsd_047.ttcn create mode 100644 ATS/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_048/Neg_A_ttcn3_module_xsd_048.ttcn create mode 100644 ATS/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_001/Pos_A_ttcn3_module_xsd_001.ttcn create mode 100644 ATS/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_002/Pos_A_ttcn3_module_xsd_002.ttcn create mode 100644 ATS/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_003/Pos_A_ttcn3_module_xsd_003.ttcn create mode 100644 ATS/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_004/Pos_A_ttcn3_module_xsd_004.ttcn create mode 100644 ATS/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_005/Pos_A_ttcn3_module_xsd_005.ttcn create mode 100644 ATS/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_006/Pos_A_ttcn3_module_xsd_006.ttcn create mode 100644 ATS/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_007/Pos_A_ttcn3_module_xsd_007.ttcn create mode 100644 ATS/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_008/Pos_A_ttcn3_module_xsd_008.ttcn create mode 100644 ATS/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_009/Pos_A_ttcn3_module_xsd_009.ttcn create mode 100644 ATS/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_010/Pos_A_ttcn3_module_xsd_010.ttcn create mode 100644 ATS/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_011/Pos_A_ttcn3_module_xsd_011.ttcn create mode 100644 ATS/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_012/Pos_A_ttcn3_module_xsd_012.ttcn create mode 100644 ATS/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_013/Pos_A_ttcn3_module_xsd_013.ttcn create mode 100644 ATS/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_014/Pos_A_ttcn3_module_xsd_014.ttcn create mode 100644 ATS/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_015/Pos_A_ttcn3_module_xsd_015.ttcn create mode 100644 ATS/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_016/Pos_A_ttcn3_module_xsd_016.ttcn create mode 100644 ATS/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_017/Pos_A_ttcn3_module_xsd_017.ttcn create mode 100644 ATS/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_018/Pos_A_ttcn3_module_xsd_018.ttcn create mode 100644 ATS/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_019/Pos_A_ttcn3_module_xsd_019.ttcn create mode 100644 ATS/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_020/Pos_A_ttcn3_module_xsd_020.ttcn create mode 100644 ATS/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_021/Pos_A_ttcn3_module_xsd_021.ttcn create mode 100644 ATS/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_022/Pos_A_ttcn3_module_xsd_022.ttcn create mode 100644 ATS/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_023/Pos_A_ttcn3_module_xsd_023.ttcn create mode 100644 ATS/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_024/Pos_A_ttcn3_module_xsd_024.ttcn create mode 100644 ATS/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_025/Pos_A_ttcn3_module_xsd_025.ttcn create mode 100644 ATS/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_026/Pos_A_ttcn3_module_xsd_026.ttcn create mode 100644 ATS/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_027/Pos_A_ttcn3_module_xsd_027.ttcn create mode 100644 ATS/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_028/Pos_A_ttcn3_module_xsd_028.ttcn create mode 100644 ATS/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_029/Pos_A_ttcn3_module_xsd_029.ttcn create mode 100644 ATS/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_030/Pos_A_ttcn3_module_xsd_030.ttcn create mode 100644 ATS/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_031/Pos_A_ttcn3_module_xsd_031.ttcn create mode 100644 ATS/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_032/Pos_A_ttcn3_module_xsd_032.ttcn create mode 100644 ATS/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_033/Pos_A_ttcn3_module_xsd_033.ttcn create mode 100644 ATS/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_034/Pos_A_ttcn3_module_xsd_034.ttcn create mode 100644 ATS/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_035/Pos_A_ttcn3_module_xsd_035.ttcn create mode 100644 ATS/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_036/Pos_A_ttcn3_module_xsd_036.ttcn create mode 100644 ATS/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_037/Pos_A_ttcn3_module_xsd_037.ttcn create mode 100644 ATS/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_038/Pos_A_ttcn3_module_xsd_038.ttcn create mode 100644 ATS/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_039/Pos_A_ttcn3_module_xsd_039.ttcn create mode 100644 ATS/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_040/Pos_A_ttcn3_module_xsd_040.ttcn create mode 100644 ATS/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_041/Pos_A_ttcn3_module_xsd_041.ttcn create mode 100644 ATS/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_042/Pos_A_ttcn3_module_xsd_042.ttcn create mode 100644 ATS/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_043/Pos_A_ttcn3_module_xsd_043.ttcn create mode 100644 ATS/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_044/Pos_A_ttcn3_module_xsd_044.ttcn create mode 100644 ATS/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_045/Pos_A_ttcn3_module_xsd_045.ttcn create mode 100644 ATS/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_046/Pos_A_ttcn3_module_xsd_046.ttcn create mode 100644 ATS/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_047/Pos_A_ttcn3_module_xsd_047.ttcn create mode 100644 ATS/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_048/Pos_A_ttcn3_module_xsd_048.ttcn create mode 100644 ATS/xml/B_encoding_instructions/B03_encoding_instructions/B0327_no_type/Pos_B0327_no_type_001/Pos_B0327_no_type_001.ttcn create mode 100644 ATS/xml/B_encoding_instructions/B03_encoding_instructions/B0327_no_type/Pos_B0327_no_type_001/Pos_B0327_no_type_001.xml create mode 100644 ATS/xml/B_encoding_instructions/B03_encoding_instructions/B0327_no_type/Pos_B0327_no_type_001/Pos_B0327_no_type_001.xsd create mode 100644 ATS/xml/B_encoding_instructions/B03_encoding_instructions/B0329_xml_header_control/B0329_xml_header_control_001/B0329_xml_header_control_001.ttcn create mode 100644 ATS/xml/B_encoding_instructions/B03_encoding_instructions/B0329_xml_header_control/B0329_xml_header_control_001/B0329_xml_header_control_001.xsd create mode 100644 ATS/xml/B_encoding_instructions/B03_encoding_instructions/B0329_xml_header_control/B0329_xml_header_control_002/B0329_xml_header_control_002.ttcn create mode 100644 ATS/xml/B_encoding_instructions/B03_encoding_instructions/B0329_xml_header_control/B0329_xml_header_control_002/B0329_xml_header_control_002.xsd create mode 100644 ATS/xml/B_encoding_instructions/B_top_level/Neg_B_top_level_001/Neg_B_top_level_001.ttcn create mode 100644 ATS/xml/B_encoding_instructions/B_top_level/Neg_B_top_level_001/Neg_B_top_level_001.xsd create mode 100644 ATS/xml/README.txt diff --git a/ATS/core_language/05_basic_language_elements/0501_identifiers_and_keywords/NegSem_0501_Identifier_001.ttcn b/ATS/core_language/05_basic_language_elements/0501_identifiers_and_keywords/NegSem_0501_Identifier_001.ttcn new file mode 100644 index 00000000..9a4ba838 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0501_identifiers_and_keywords/NegSem_0501_Identifier_001.ttcn @@ -0,0 +1,20 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:5.1, Ensure that cannot pass a charstring value to an integer variable. + ** @verdict pass reject + *****************************************************************/ +module NegSem_0501_Identifier_001 { + +type component GeneralComp { +} + +testcase TC_NegSem_0501_Identifier_001() runs on GeneralComp { + var integer v_i := "wrong_type"; +} + +control{ + execute(TC_NegSem_0501_Identifier_001(), 1.0); +} + +} diff --git a/ATS/core_language/05_basic_language_elements/0501_identifiers_and_keywords/NegSyn_0501_Identifier_001.ttcn b/ATS/core_language/05_basic_language_elements/0501_identifiers_and_keywords/NegSyn_0501_Identifier_001.ttcn new file mode 100644 index 00000000..1d95aa12 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0501_identifiers_and_keywords/NegSyn_0501_Identifier_001.ttcn @@ -0,0 +1,20 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:5.1, Ensure that when the IUT loads a module containing an identifier named with a keyword then the module is rejected. + ** @verdict pass reject + *****************************************************************/ +module NegSyn_0501_Identifier_001 { + +type component GeneralComp { +} + +testcase TC_NegSyn_0501_Identifier_001() runs on GeneralComp { + var integer component := 1; +} + +control{ + execute(TC_NegSyn_0501_Identifier_001(), 1.0); +} + +} diff --git a/ATS/core_language/05_basic_language_elements/0501_identifiers_and_keywords/Syn_0501_Identifier_001.ttcn b/ATS/core_language/05_basic_language_elements/0501_identifiers_and_keywords/Syn_0501_Identifier_001.ttcn new file mode 100644 index 00000000..9ca8424c --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0501_identifiers_and_keywords/Syn_0501_Identifier_001.ttcn @@ -0,0 +1,28 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:5.1, Ensure that the IUT handle the identifiers case sensitively. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Syn_0501_Identifier_001 { + +type component IdComp { + const integer cl_int := 0; +} + +testcase TC_Syn_0501_Identifier_001() runs on IdComp { + const integer cl_iNT := 1; + if ( match(cl_int, 0) ){ + setverdict(pass); + } + else { + setverdict(fail); + } +} + +control{ + execute(TC_Syn_0501_Identifier_001(), 1.0); +} + +} diff --git a/ATS/core_language/05_basic_language_elements/0502_scope_rules/050201_Scope_of_parameters/Sem_050201_Scope_of_parameters_001.ttcn b/ATS/core_language/05_basic_language_elements/0502_scope_rules/050201_Scope_of_parameters/Sem_050201_Scope_of_parameters_001.ttcn new file mode 100644 index 00000000..8845fabe --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0502_scope_rules/050201_Scope_of_parameters/Sem_050201_Scope_of_parameters_001.ttcn @@ -0,0 +1,43 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.2 + ** @desc Test cases for clause 5.2 Scope rules + ** @purpose 1:5.2.1, Ensure that the IUT correctly handles scope of formal function parameters + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Sem_050201_Scope_of_parameters_001 { + +type component GeneralComp { +} + +function f_formalParameterScope_in(in integer p_myParameter) { + p_myParameter := 1; + if (p_myParameter == 1){ + setverdict(pass); + } + else { + setverdict(fail); + } +} + + +testcase TC_Sem_050201_Scope_of_parameters_001() runs on GeneralComp { + + var integer v_int := 0; + f_formalParameterScope_in(v_int); + + if (v_int == 0) { + setverdict(pass); + } + else { + setverdict(fail); + } +} + + +control{ + execute(TC_Sem_050201_Scope_of_parameters_001()); + +} + +} diff --git a/ATS/core_language/05_basic_language_elements/0502_scope_rules/050201_Scope_of_parameters/Sem_050201_Scope_of_parameters_002.ttcn b/ATS/core_language/05_basic_language_elements/0502_scope_rules/050201_Scope_of_parameters/Sem_050201_Scope_of_parameters_002.ttcn new file mode 100644 index 00000000..9936d1a5 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0502_scope_rules/050201_Scope_of_parameters/Sem_050201_Scope_of_parameters_002.ttcn @@ -0,0 +1,38 @@ +/*************************************************** + ** @author STF 451 + ** @version 0.0.1 + ** @desc Test cases for clause 5.2 Scope rules + ** @purpose 1:5.2.1, Ensure that the IUT correctly handles scope of formal function parameters + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Sem_050201_Scope_of_parameters_002 { + +type component GeneralComp { +} + + +function f_formalParameterScope_inout(inout integer p_myParameter) { + p_myParameter := 1; +} + + + +testcase TC_Sem_050201_Scope_of_parameters_002() runs on GeneralComp { + + var integer v_int := 0; + f_formalParameterScope_inout(v_int); + + if (v_int == 1) { + setverdict(pass); + } + else { + setverdict(fail); + } +} + + +control{ + execute(TC_Sem_050201_Scope_of_parameters_002()); +} + +} diff --git a/ATS/core_language/05_basic_language_elements/0502_scope_rules/050202_Uniqueness_of_identifiers/NegSem_050202_Uniqueness_001.ttcn b/ATS/core_language/05_basic_language_elements/0502_scope_rules/050202_Uniqueness_of_identifiers/NegSem_050202_Uniqueness_001.ttcn new file mode 100644 index 00000000..146fc16b --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0502_scope_rules/050202_Uniqueness_of_identifiers/NegSem_050202_Uniqueness_001.ttcn @@ -0,0 +1,18 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:5.2.2, Ensure that the IUT correctly handles the uniqueness of variable names in its scope + ** @verdict pass reject + ***************************************************/ +module NegSem_050202_Uniqueness_001 { + type component GeneralComp { + const integer cl_int := 0; + } + + testcase TC_NegSem_050202_Uniqueness_001() runs on GeneralComp { + const integer cl_int := 0; + } + control { + execute(TC_NegSem_050202_Uniqueness_001()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0502_scope_rules/050202_Uniqueness_of_identifiers/NegSem_050202_Uniqueness_004.ttcn b/ATS/core_language/05_basic_language_elements/0502_scope_rules/050202_Uniqueness_of_identifiers/NegSem_050202_Uniqueness_004.ttcn new file mode 100644 index 00000000..ab53f58a --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0502_scope_rules/050202_Uniqueness_of_identifiers/NegSem_050202_Uniqueness_004.ttcn @@ -0,0 +1,22 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:5.2.2, Ensure that the IUT correctly handles the uniqueness of variable names in its scope + ** @verdict pass reject + ***************************************************/ +module NegSem_050202_Uniqueness_004 { + const integer c_int := 0; + + type component GeneralComp { + } + + function f_funcScope() {} + + testcase TC_NegSem_050202_Uniqueness_004() runs on GeneralComp { + const integer c_int := 0; + f_funcScope(); + } + control { + execute(TC_NegSem_050202_Uniqueness_004()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0502_scope_rules/050202_Uniqueness_of_identifiers/NegSem_050202_Uniqueness_005.ttcn b/ATS/core_language/05_basic_language_elements/0502_scope_rules/050202_Uniqueness_of_identifiers/NegSem_050202_Uniqueness_005.ttcn new file mode 100644 index 00000000..a867fe6e --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0502_scope_rules/050202_Uniqueness_of_identifiers/NegSem_050202_Uniqueness_005.ttcn @@ -0,0 +1,23 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:5.2.2, Ensure that the IUT correctly handles the uniqueness of variable names in its scope + ** @verdict pass reject + ***************************************************/ +module NegSem_050202_Uniqueness_005 { + const integer c_int := 0; + + type component GeneralComp { + } + + function f_funcScope() { + const integer c_int := 0; + } + + testcase TC_NegSem_050202_Uniqueness_005() runs on GeneralComp { + f_funcScope(); + } + control { + execute(TC_NegSem_050202_Uniqueness_005()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0502_scope_rules/050202_Uniqueness_of_identifiers/NegSem_050202_Uniqueness_006.ttcn b/ATS/core_language/05_basic_language_elements/0502_scope_rules/050202_Uniqueness_of_identifiers/NegSem_050202_Uniqueness_006.ttcn new file mode 100644 index 00000000..f7015a6f --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0502_scope_rules/050202_Uniqueness_of_identifiers/NegSem_050202_Uniqueness_006.ttcn @@ -0,0 +1,18 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:5.2.2, Ensure that the IUT correctly handles the uniqueness of variable names in its scope + ** @verdict pass reject + ***************************************************/ +module NegSem_050202_Uniqueness_006 { + type component GeneralComp { + const integer repeatedIdentifier := 0; + } + + testcase TC_NegSem_050202_Uniqueness_006() runs on GeneralComp { + var boolean repeatedIdentifier := true; + } + control { + execute(TC_NegSem_050202_Uniqueness_006()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0502_scope_rules/050202_Uniqueness_of_identifiers/NegSem_050202_Uniqueness_007.ttcn b/ATS/core_language/05_basic_language_elements/0502_scope_rules/050202_Uniqueness_of_identifiers/NegSem_050202_Uniqueness_007.ttcn new file mode 100644 index 00000000..4561c3c0 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0502_scope_rules/050202_Uniqueness_of_identifiers/NegSem_050202_Uniqueness_007.ttcn @@ -0,0 +1,22 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:5.2.2, Ensure that the IUT correctly handles the uniqueness of variable names in its scope + ** @verdict pass reject + ***************************************************/ +module NegSem_050202_Uniqueness_007 { + type component GeneralComp { + const integer repeatedIdentifier := 0; + } + + function f_funcScope() runs on GeneralComp { + var boolean repeatedIdentifier := true; + } + + testcase TC_NegSem_050202_Uniqueness_007() runs on GeneralComp { + f_funcScope(); + } + control { + execute(TC_NegSem_050202_Uniqueness_007()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0502_scope_rules/050202_Uniqueness_of_identifiers/NegSem_050202_Uniqueness_008.ttcn b/ATS/core_language/05_basic_language_elements/0502_scope_rules/050202_Uniqueness_of_identifiers/NegSem_050202_Uniqueness_008.ttcn new file mode 100644 index 00000000..02717b4b --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0502_scope_rules/050202_Uniqueness_of_identifiers/NegSem_050202_Uniqueness_008.ttcn @@ -0,0 +1,22 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:5.2.2, Ensure that the IUT correctly handles the uniqueness of variable names in its scope + ** @verdict pass reject + ***************************************************/ +module NegSem_050202_Uniqueness_008 { + type component GeneralComp { + } + + function f_funcScope(boolean repeatedIdentifier) { + const integer repeatedIdentifier := 0; + } + + testcase TC_NegSem_050202_Uniqueness_008() runs on GeneralComp { + var boolean v_boolean := true; + f_funcScope(v_boolean); + } + control { + execute(TC_NegSem_050202_Uniqueness_008()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0502_scope_rules/050202_Uniqueness_of_identifiers/NegSem_050202_Uniqueness_009.ttcn b/ATS/core_language/05_basic_language_elements/0502_scope_rules/050202_Uniqueness_of_identifiers/NegSem_050202_Uniqueness_009.ttcn new file mode 100644 index 00000000..c7ab510e --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0502_scope_rules/050202_Uniqueness_of_identifiers/NegSem_050202_Uniqueness_009.ttcn @@ -0,0 +1,22 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:5.2.2, Ensure that the IUT correctly handles the uniqueness of variable names in its scope + ** @verdict pass reject + ***************************************************/ +module NegSem_050202_Uniqueness_009 { + const integer repeatedIdentifier := 0; + + type component GeneralComp { + } + + function f_funcScope() {} + + testcase TC_NegSem_050202_Uniqueness_009() runs on GeneralComp { + var boolean repeatedIdentifier := true; + f_funcScope(); + } + control { + execute(TC_NegSem_050202_Uniqueness_009()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0502_scope_rules/050202_Uniqueness_of_identifiers/NegSem_050202_Uniqueness_010.ttcn b/ATS/core_language/05_basic_language_elements/0502_scope_rules/050202_Uniqueness_of_identifiers/NegSem_050202_Uniqueness_010.ttcn new file mode 100644 index 00000000..8e758948 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0502_scope_rules/050202_Uniqueness_of_identifiers/NegSem_050202_Uniqueness_010.ttcn @@ -0,0 +1,23 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:5.2.2, Ensure that the IUT correctly handles the uniqueness of variable names in its scope + ** @verdict pass reject + ***************************************************/ +module NegSem_050202_Uniqueness_010 { + const integer repeatedIdentifier := 0; + + type component GeneralComp { + } + + function f_funcScope() { + var boolean repeatedIdentifier := true; + } + + testcase TC_NegSem_050202_Uniqueness_010() runs on GeneralComp { + f_funcScope(); + } + control { + execute(TC_NegSem_050202_Uniqueness_010()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0502_scope_rules/050202_Uniqueness_of_identifiers/NegSem_050202_Uniqueness_011.ttcn b/ATS/core_language/05_basic_language_elements/0502_scope_rules/050202_Uniqueness_of_identifiers/NegSem_050202_Uniqueness_011.ttcn new file mode 100644 index 00000000..feaee1cb --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0502_scope_rules/050202_Uniqueness_of_identifiers/NegSem_050202_Uniqueness_011.ttcn @@ -0,0 +1,21 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:5.2.2, Ensure that the IUT correctly handles the uniqueness of variable names in its scope + ** @verdict pass reject + ***************************************************/ +module NegSem_050202_Uniqueness_011 { + type component GeneralComp { + } + + function f_funcScope() { + var boolean NegSem_050202_Uniqueness_011 := true; + } + + testcase TC_NegSem_050202_Uniqueness_011() runs on GeneralComp { + f_funcScope(); + } + control { + execute(TC_NegSem_050202_Uniqueness_011()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0502_scope_rules/050202_Uniqueness_of_identifiers/NegSem_050202_Uniqueness_012.ttcn b/ATS/core_language/05_basic_language_elements/0502_scope_rules/050202_Uniqueness_of_identifiers/NegSem_050202_Uniqueness_012.ttcn new file mode 100644 index 00000000..9d8bf03d --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0502_scope_rules/050202_Uniqueness_of_identifiers/NegSem_050202_Uniqueness_012.ttcn @@ -0,0 +1,28 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:5.2.2, Ensure that the IUT correctly handles the uniqueness of variable names in its scope + ** @verdict pass reject + ***************************************************/ + +module NegSem_050202_Uniqueness_012 { + import from NegSem_050202_Uniqueness_012_import { const all; } + + type component GeneralComp { + } + + function f_funcScope() { + var boolean NegSem_050202_Uniqueness_012_import := true; + } + + testcase TC_NegSem_050202_Uniqueness_012() runs on GeneralComp { + f_funcScope(); + } + control { + execute(TC_NegSem_050202_Uniqueness_012()); + } +} + +module NegSem_050202_Uniqueness_012_import { + const integer c_integer := 0; +} diff --git a/ATS/core_language/05_basic_language_elements/0502_scope_rules/050202_Uniqueness_of_identifiers/Sem_050202_Uniqueness_001.ttcn b/ATS/core_language/05_basic_language_elements/0502_scope_rules/050202_Uniqueness_of_identifiers/Sem_050202_Uniqueness_001.ttcn new file mode 100644 index 00000000..a365a496 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0502_scope_rules/050202_Uniqueness_of_identifiers/Sem_050202_Uniqueness_001.ttcn @@ -0,0 +1,32 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:5.2.2, Ensure that the IUT correctly handles the uniqueness of variable names in its scope + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +module Sem_050202_Uniqueness_001 { + import from Sem_050202_Uniqueness_001_import { + const all; + } + + type component GeneralComp { + } + + function f_funcScope() { + var boolean repeatedIdentifier := true; + + if(repeatedIdentifier==true) { setverdict(pass); } + } + + testcase TC_Sem_050202_Uniqueness_001() runs on GeneralComp { + f_funcScope(); + } + control { + execute(TC_Sem_050202_Uniqueness_001()); + } +} + +module Sem_050202_Uniqueness_001_import { + const integer repeatedIdentifier := 0; // repeated indentifier from imported module is allowed +} diff --git a/ATS/core_language/05_basic_language_elements/0502_scope_rules/050202_Uniqueness_of_identifiers/Sem_050202_Uniqueness_002.ttcn b/ATS/core_language/05_basic_language_elements/0502_scope_rules/050202_Uniqueness_of_identifiers/Sem_050202_Uniqueness_002.ttcn new file mode 100644 index 00000000..aa6ce510 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0502_scope_rules/050202_Uniqueness_of_identifiers/Sem_050202_Uniqueness_002.ttcn @@ -0,0 +1,27 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:5.2.2, Ensure that the IUT correctly handles the uniqueness of variable names in its scope + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Sem_050202_Uniqueness_002 { + type component GeneralComp { + const integer cl_int := 0; + } + + function f_funcScope() { + const integer cl_int := 1; + } + + testcase TC_Sem_050202_Uniqueness_002() runs on GeneralComp { + f_funcScope(); + if (cl_int == 0) { // component value + setverdict(pass); + } else { + setverdict(fail); + } + } + control { + execute(TC_Sem_050202_Uniqueness_002()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0502_scope_rules/050202_Uniqueness_of_identifiers/Sem_050202_Uniqueness_003.ttcn b/ATS/core_language/05_basic_language_elements/0502_scope_rules/050202_Uniqueness_of_identifiers/Sem_050202_Uniqueness_003.ttcn new file mode 100644 index 00000000..60f4fa59 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0502_scope_rules/050202_Uniqueness_of_identifiers/Sem_050202_Uniqueness_003.ttcn @@ -0,0 +1,27 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:5.2.2, Ensure that the IUT correctly handles the uniqueness of variable names in its scope + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Sem_050202_Uniqueness_003 { + type component GeneralComp { + } + + function f_funcScope() { + const integer cl_int := 0; + } + + testcase TC_Sem_050202_Uniqueness_003() runs on GeneralComp { + const integer cl_int := 1; + f_funcScope(); + if (cl_int == 1) { // local value + setverdict(pass); + } else { + setverdict(fail); + } + } + control { + execute(TC_Sem_050202_Uniqueness_003()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0502_scope_rules/050202_Uniqueness_of_identifiers/Sem_050202_Uniqueness_004.ttcn b/ATS/core_language/05_basic_language_elements/0502_scope_rules/050202_Uniqueness_of_identifiers/Sem_050202_Uniqueness_004.ttcn new file mode 100644 index 00000000..94db5151 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0502_scope_rules/050202_Uniqueness_of_identifiers/Sem_050202_Uniqueness_004.ttcn @@ -0,0 +1,32 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:5.2.2, Ensure that identifiers for fields of structured types, enumerated values and groups do not have to be globally unique. + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +/* The following requirements are tested: + * Within the same module,they shall only be reused for enumerated values within other enumerated types or as identifiers for fields of structured types. In addition, enumeration values shall not be used as names of value or + * template definitions of imported enumeration types, defining the given enumeration value + */ + +module Sem_050202_Uniqueness_004 { + type component GeneralComp { + } + type enumerated MyFirstEnumType {MyFirstEnumValue,MySecondEnumValue}; + type enumerated MySecondEnumType{MyFirstEnumValue,MySecondEnumValue}; //enumerated values within other enumerated types or as identifiers for fields of structured types + + testcase TC_Sem_050202_Uniqueness_004() runs on GeneralComp { + + var MyFirstEnumType v_enum := MySecondEnumValue; + var MySecondEnumType v_enum_2 := MySecondEnumValue; + + if (match(v_enum,MySecondEnumValue) and match(v_enum_2,MySecondEnumValue)) { // local value + setverdict(pass); + } else { + setverdict(fail); + } + } + control { + execute(TC_Sem_050202_Uniqueness_004()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0502_scope_rules/050202_Uniqueness_of_identifiers/Sem_050202_Uniqueness_005.ttcn b/ATS/core_language/05_basic_language_elements/0502_scope_rules/050202_Uniqueness_of_identifiers/Sem_050202_Uniqueness_005.ttcn new file mode 100644 index 00000000..be216204 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0502_scope_rules/050202_Uniqueness_of_identifiers/Sem_050202_Uniqueness_005.ttcn @@ -0,0 +1,39 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:5.2.2, Ensure that identifiers for fields of structured types, enumerated values and groups do not have to be globally unique. + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +/* The following requirements are tested: + * Within the same module,they shall only be reused for enumerated values within other enumerated types or as identifiers for fields of structured types. In addition, enumeration values shall not be used as names of value or + * template definitions of imported enumeration types, defining the given enumeration value + */ + +module Sem_050202_Uniqueness_005 { + type component GeneralComp { + } + + type enumerated MyFirstEnumType {MyInt,MySecondEnumValue}; + + type record MyRec { + integer Myint + } + + testcase TC_Sem_050202_Uniqueness_005() runs on GeneralComp { + + var MyFirstEnumType v_enum := MySecondEnumValue; + var MyRec v_rec; + + v_rec.Myint := 1; + + if (match(v_enum,MySecondEnumValue) and match(v_rec.Myint,1)) { + setverdict(pass); + } else { + setverdict(fail); + } + } + control { + execute(TC_Sem_050202_Uniqueness_005()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0502_scope_rules/0502_toplevel/NegSem_0502_Scope_001.ttcn b/ATS/core_language/05_basic_language_elements/0502_scope_rules/0502_toplevel/NegSem_0502_Scope_001.ttcn new file mode 100644 index 00000000..121454fd --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0502_scope_rules/0502_toplevel/NegSem_0502_Scope_001.ttcn @@ -0,0 +1,29 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @desc Test cases for clause 5.2 Scope rules + ** @purpose 1:5.2, Ensure that the IUT correctly handles definitions of local scope + ** @verdict pass reject + ***************************************************/ +module NegSem_0502_Scope_001 { + +type component GeneralComp { + var integer vc_component := 0; +} + +function f_funcScope() runs on GeneralComp { + var integer v_function := 0; +} + +testcase TC_NegSem_0502_Scope_001() runs on GeneralComp { + f_funcScope(); + if ( match(v_function, 0) ){ + } +} + +control{ + var integer v_control := 0; + execute(TC_NegSem_0502_Scope_001()); +} + +} diff --git a/ATS/core_language/05_basic_language_elements/0502_scope_rules/0502_toplevel/NegSem_0502_Scope_002.ttcn b/ATS/core_language/05_basic_language_elements/0502_scope_rules/0502_toplevel/NegSem_0502_Scope_002.ttcn new file mode 100644 index 00000000..40c3e947 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0502_scope_rules/0502_toplevel/NegSem_0502_Scope_002.ttcn @@ -0,0 +1,28 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @desc Test cases for clause 5.2 Scope rules + ** @purpose 1:5.2, Ensure that the IUT correctly handles definitions of local scope + ** @verdict pass reject + ***************************************************/ +module NegSem_0502_Scope_002 { + +type component GeneralComp { + var integer vc_component := 0; +} + +function f_funcScope() runs on GeneralComp { + var integer v_function := 1; +} + +testcase TC_NegSem_0502_Scope_002() runs on GeneralComp { + if ( match(v_control, 0) ){ + } +} + +control{ + var integer v_control := 0; + execute(TC_NegSem_0502_Scope_002()); +} + +} diff --git a/ATS/core_language/05_basic_language_elements/0502_scope_rules/0502_toplevel/NegSem_0502_Scope_003.ttcn b/ATS/core_language/05_basic_language_elements/0502_scope_rules/0502_toplevel/NegSem_0502_Scope_003.ttcn new file mode 100644 index 00000000..12efe1b6 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0502_scope_rules/0502_toplevel/NegSem_0502_Scope_003.ttcn @@ -0,0 +1,31 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @desc Test cases for clause 5.2 Scope rules + ** @purpose 1:5.2, Ensure that the IUT correctly handles definitions of local scope + ** @verdict pass reject + ***************************************************/ +module NegSem_0502_Scope_003 { + +type component GeneralComp { + var integer vc_component := 0; +} + +function f_funcScope() runs on GeneralComp { + var integer v_function := 0; +} + +testcase TC_NegSem_0502_Scope_003() runs on GeneralComp { + if(true) { + var integer v_statement := 0; + } + if ( match(v_statement, 0) ) { + } +} + +control{ + var integer v_control := 0; + execute(TC_NegSem_0502_Scope_003()); +} + +} diff --git a/ATS/core_language/05_basic_language_elements/0502_scope_rules/0502_toplevel/Sem_0502_Scope_001.ttcn b/ATS/core_language/05_basic_language_elements/0502_scope_rules/0502_toplevel/Sem_0502_Scope_001.ttcn new file mode 100644 index 00000000..198e39ee --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0502_scope_rules/0502_toplevel/Sem_0502_Scope_001.ttcn @@ -0,0 +1,25 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:5.2, Ensure that the IUT handle scope hieararchy of component constants. + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Sem_0502_Scope_001 { + +type component GeneralComp { + const integer cl_int := 0; +} + +testcase TC_Sem_0502_Scope_001() runs on GeneralComp { + if ( match(cl_int, 0) ){ + setverdict(pass); + } + else { + setverdict(fail); + } +} + +control{ + execute(TC_Sem_0502_Scope_001()); +} +} diff --git a/ATS/core_language/05_basic_language_elements/0502_scope_rules/0502_toplevel/Sem_0502_Scope_002.ttcn b/ATS/core_language/05_basic_language_elements/0502_scope_rules/0502_toplevel/Sem_0502_Scope_002.ttcn new file mode 100644 index 00000000..2605f586 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0502_scope_rules/0502_toplevel/Sem_0502_Scope_002.ttcn @@ -0,0 +1,39 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:5.2, Ensure that the IUT handle scope hieararchy with component booleans. + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Sem_0502_Scope_002 { + +type component GeneralComp { + var boolean vc_bool := false; +} + +testcase TC_Sem_0502_Scope_002_a() runs on GeneralComp { + if (vc_bool == false){ + vc_bool := true; + setverdict(pass); + } + else { + setverdict(fail); + } +} +/********************************************************************************************* + ** @desc Test case TC_Sem_0502_Scope_002_a shall not effect of the value of boolean vc_bool + ********************************************************************************************/ +testcase TC_Sem_0502_Scope_002_b() runs on GeneralComp { + if (vc_bool == false){ + setverdict(pass); + } + else { + setverdict(fail); + } +} + +control{ + execute(TC_Sem_0502_Scope_002_a()); + execute(TC_Sem_0502_Scope_002_b()); +} + +} diff --git a/ATS/core_language/05_basic_language_elements/0502_scope_rules/0502_toplevel/Sem_0502_Scope_003.ttcn b/ATS/core_language/05_basic_language_elements/0502_scope_rules/0502_toplevel/Sem_0502_Scope_003.ttcn new file mode 100644 index 00000000..5d8a8269 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0502_scope_rules/0502_toplevel/Sem_0502_Scope_003.ttcn @@ -0,0 +1,42 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:5.2, Ensure that the IUT handles scope hierarchy via functions. + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Sem_0502_Scope_003 { + +type component GeneralComp { + var integer vc_int := 0; +} + +function f_funcScope() runs on GeneralComp { + vc_int := 1; + if (vc_int == 1){ + setverdict(pass); + } + else { + setverdict(fail); + } +} + +testcase TC_Sem_0502_Scope_003_a() runs on GeneralComp { + f_funcScope(); +} + +testcase TC_Sem_0502_Scope_003_b() runs on GeneralComp { + f_funcScope(); + if (vc_int == 1){ + setverdict(pass); + } + else { + setverdict(fail); + } +} + +control{ + execute(TC_Sem_0502_Scope_003_a()); + execute(TC_Sem_0502_Scope_003_b()); +} + +} diff --git a/ATS/core_language/05_basic_language_elements/0502_scope_rules/0502_toplevel/Sem_0502_Scope_004.ttcn b/ATS/core_language/05_basic_language_elements/0502_scope_rules/0502_toplevel/Sem_0502_Scope_004.ttcn new file mode 100644 index 00000000..8aa9fe12 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0502_scope_rules/0502_toplevel/Sem_0502_Scope_004.ttcn @@ -0,0 +1,52 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:5.2, Ensure that the IUT correctly handles the scope of definitions made in the module part. + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Sem_0502_Scope_004 { + + const integer c_int := 0; + +type component GeneralComp { +} + +testcase TC_Sem_0502_Scope_004() runs on GeneralComp { + if (c_int == 0){ + setverdict(pass); + } + else { + setverdict(fail); + } +} + +control{ + execute(TC_Sem_0502_Scope_004()); +} +} + + +module Sem_0502_Scope_004_import { + +import from Sem_0502_Scope_004 { + const all +} + +type component GeneralComp { +} + +testcase TC_Sem_0502_Scope_004_import() runs on GeneralComp { + if (c_int == 0){ + setverdict(pass); + } + else { + setverdict(fail); + } +} + +control{ + execute(TC_Sem_0502_Scope_004_import()); +} +} + + diff --git a/ATS/core_language/05_basic_language_elements/0502_scope_rules/0502_toplevel/Sem_0502_Scope_008.ttcn b/ATS/core_language/05_basic_language_elements/0502_scope_rules/0502_toplevel/Sem_0502_Scope_008.ttcn new file mode 100644 index 00000000..624ca8d9 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0502_scope_rules/0502_toplevel/Sem_0502_Scope_008.ttcn @@ -0,0 +1,31 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @desc Test cases for clause 5.2 Scope rules + ** @purpose 1:5.2, Ensure that the IUT correctly handles definitions of extended component scope + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Sem_0502_Scope_008 { + +type component GeneralComp { + var integer vc_component := 1; +} + +type component ExtendedComp extends GeneralComp { +} + + +testcase TC_Sem_0502_Scope_008() runs on ExtendedComp { + if (vc_component == 1) { + setverdict(pass); + } + else { + setverdict(fail); + } +} + +control{ + execute(TC_Sem_0502_Scope_008()); +} + +} diff --git a/ATS/core_language/05_basic_language_elements/0502_scope_rules/0502_toplevel/Syn_0502_Scope_001.ttcn b/ATS/core_language/05_basic_language_elements/0502_scope_rules/0502_toplevel/Syn_0502_Scope_001.ttcn new file mode 100644 index 00000000..8b895d8e --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0502_scope_rules/0502_toplevel/Syn_0502_Scope_001.ttcn @@ -0,0 +1,79 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:5.2, Ensure that the IUT supports all the nine scope units. + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Syn_0502_Scope_001 { + +const integer c_intModule := 0; // scope a) module definitions part +type integer IntegerMod; + +type component GeneralComp { + const integer cl_int := 0; + var integer vc_int := 0; + var boolean vc_bool := false; + timer tc_timer := 0.1; // scope c) component types +} + +testcase TC_Syn_0502_Scope_001() runs on GeneralComp { // scope f) test cases + f_funcScope(); + tc_timer.start; + a_altstepScope(); + if (c_intModule == 0){ + setverdict(pass); + } + else { + setverdict(fail); + } + if (cl_int == 0){ + setverdict(pass); + } + else { + setverdict(fail); + } +} + +group recordGroup { // scope g) statement block + type record RecScope { // scope i) user defined named types + IntegerMod field1, + boolean field2 + } +} + +group templateGroup { + template RecScope m_scope := { // scope h) templates + field1 := 0, + field2 := true + } +} + +function f_funcScope() runs on GeneralComp { + vc_int := 1; // scope d) functions + if (vc_int == 1){ + setverdict(pass); + } + else { + setverdict(fail); + } +} + +altstep a_altstepScope() runs on GeneralComp { + var integer v_intAltStep := 2; // scope e) altsteps + []tc_timer.timeout{ + if (v_intAltStep == 2) { + setverdict(pass); + } else { + setverdict(fail) + } + } +} + + +control{ + var integer v_intControl := 0; // scope b) control part of a module + + execute(TC_Syn_0502_Scope_001()); +} + +} diff --git a/ATS/core_language/05_basic_language_elements/0503_ordering_of_declarations/NegSem_0503_Ordering_001.ttcn b/ATS/core_language/05_basic_language_elements/0503_ordering_of_declarations/NegSem_0503_Ordering_001.ttcn new file mode 100644 index 00000000..14b13b73 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0503_ordering_of_declarations/NegSem_0503_Ordering_001.ttcn @@ -0,0 +1,33 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @desc Test cases for clause 5.2 Scope rules + ** @purpose 1:5.3, Ensure that declarations are in the allowed ordering + ** @verdict pass reject + ***************************************************/ +module NegSem_0503_Ordering_001 { + + type component GeneralComp { + var integer vc_component := 0; + } + + function f_function() runs on GeneralComp { + var integer v_function := 0; + } + + testcase TC_NegSem_0503_Ordering_001() runs on GeneralComp { + if(true) { + var integer v_statement := 0; + if (v_nested_statement == 0) { // attempt to access a variable defined in the next scope + var integer v_nested_statement := 0; + } + + } + } + + control { + var integer v_control := 0; + execute(TC_NegSem_0503_Ordering_001()); + } + +} diff --git a/ATS/core_language/05_basic_language_elements/0503_ordering_of_declarations/NegSem_0503_Ordering_002.ttcn b/ATS/core_language/05_basic_language_elements/0503_ordering_of_declarations/NegSem_0503_Ordering_002.ttcn new file mode 100644 index 00000000..2ae3d844 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0503_ordering_of_declarations/NegSem_0503_Ordering_002.ttcn @@ -0,0 +1,36 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @desc Test cases for clause 5.2 Scope rules + ** @purpose 1:5.3, Ensure that declarations are in the allowed ordering + ** @verdict pass reject + ***************************************************/ +module NegSem_0503_Ordering_002 { + + type component GeneralComp { + var integer vc_component := 0; + } + + function f_function() runs on GeneralComp { + var integer v_function := 0; + } + + testcase TC_NegSem_0503_Ordering_002() runs on GeneralComp { + if(true) { + var integer v_int := 0; + if (v_int == 0) { + var integer v_statement_block_1 := 0; + v_statement_block_1 := v_statement_block_1 + 1; + var integer v_statement_block_2 := 0; // declaration has to go before other statements + } + + } + setverdict(pass); + } + + control { + var integer v_control := 0; + execute(TC_NegSem_0503_Ordering_002()); + } + +} diff --git a/ATS/core_language/05_basic_language_elements/0503_ordering_of_declarations/NegSem_0503_Ordering_003.ttcn b/ATS/core_language/05_basic_language_elements/0503_ordering_of_declarations/NegSem_0503_Ordering_003.ttcn new file mode 100644 index 00000000..72876431 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0503_ordering_of_declarations/NegSem_0503_Ordering_003.ttcn @@ -0,0 +1,36 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @desc Test cases for clause 5.2 Scope rules + ** @purpose 1:5.3, Ensure that declarations are in the allowed ordering + ** @verdict pass reject + ***************************************************/ +module NegSem_0503_Ordering_003 { + + type component GeneralComp { + var integer vc_component := 0; + } + + function f_function() runs on GeneralComp { + var integer v_function; + v_function := 0; + var integer v_function_2 := 0; // declaration has to go before other statements + } + + testcase TC_NegSem_0503_Ordering_003() runs on GeneralComp { + if(true) { + var integer v_statement := 0; + if (v_statement == 0) { + var integer v_nested_statement := 0; + } + + } + setverdict(pass); + } + + control { + var integer v_control := 0; + execute(TC_NegSem_0503_Ordering_003()); + } + +} diff --git a/ATS/core_language/05_basic_language_elements/0503_ordering_of_declarations/Sem_0503_Ordering_001.ttcn b/ATS/core_language/05_basic_language_elements/0503_ordering_of_declarations/Sem_0503_Ordering_001.ttcn new file mode 100644 index 00000000..00276814 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0503_ordering_of_declarations/Sem_0503_Ordering_001.ttcn @@ -0,0 +1,37 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @desc Test cases for clause 5.2 Scope rules + ** @purpose 1:5.3, Ensure that allowed orderings of declarations are supported + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Sem_0503_Ordering_001 { + +type component GeneralComp { + var integer vc_component := 0; +} + +testcase TC_Sem_0503_Ordering_001() runs on GeneralComp { + var integer v_testcase := 0; + + f_function(); + if(true) { + var integer v_statement := 0; + if (v_statement == 0) { + var integer v_nested_statement := 0; + setverdict(pass); + } + + } +} + +function f_function() runs on GeneralComp { + var integer v_function := 0; +} + +control { + var integer v_control := 0; + execute(TC_Sem_0503_Ordering_001()); +} + +} diff --git a/ATS/core_language/05_basic_language_elements/0503_ordering_of_declarations/Sem_0503_Ordering_002.ttcn b/ATS/core_language/05_basic_language_elements/0503_ordering_of_declarations/Sem_0503_Ordering_002.ttcn new file mode 100644 index 00000000..58769e8f --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0503_ordering_of_declarations/Sem_0503_Ordering_002.ttcn @@ -0,0 +1,37 @@ +/*************************************************** + ** @author STF 451 + ** @version 0.0.1 + ** @desc Test cases for clause 5.3 ordering rules + ** @purpose 1:5.3, Ensure that allowed any ordering with component definitions are supported + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Sem_0503_Ordering_002 { + + + type port loopbackPort message { + inout integer + } + +type component GeneralComp //declarations inside a component can be in any order +{ + timer t_rec,t_rec2; + var integer v_comp1:=0; + port loopbackPort messagePortA; + var integer v_comp2:=0; +} + +testcase TC_Sem_0503_Ordering_002() runs on GeneralComp { + + v_comp1 := 1; + v_comp2 := v_comp1; + if (v_comp2 == 1) { + setverdict(pass); + } + +} + +control { + execute(TC_Sem_0503_Ordering_002()); +} + +} diff --git a/ATS/core_language/05_basic_language_elements/0503_ordering_of_declarations/Sem_0503_Ordering_005.ttcn b/ATS/core_language/05_basic_language_elements/0503_ordering_of_declarations/Sem_0503_Ordering_005.ttcn new file mode 100644 index 00000000..e0c2ed5e --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0503_ordering_of_declarations/Sem_0503_Ordering_005.ttcn @@ -0,0 +1,39 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @desc Test cases for clause 5.2 Scope rules + ** @purpose 1:5.3, Ensure that allowed orderings of declarations are supported + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Sem_0503_Ordering_005 { + +type component GeneralComp { + var integer vc_component := 0; +} + +testcase TC_Sem_0503_Ordering_005() runs on GeneralComp { + var integer v_testcase := 0; + + f_function(); + if(true) { + var integer v_statement := 0; + if (c_module == 0) { // c_module is known as it is declared on the module level + var integer v_nested_statement := 0; + setverdict(pass); + } + + } +} + +function f_function() runs on GeneralComp { + var integer v_function := 0; +} + + const integer c_module := 0; + +control { + var integer v_control := 0; + execute(TC_Sem_0503_Ordering_005()); +} + +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/NegSem_05040101_parameters_of_kind_value_001.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/NegSem_05040101_parameters_of_kind_value_001.ttcn new file mode 100644 index 00000000..2623779c --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/NegSem_05040101_parameters_of_kind_value_001.ttcn @@ -0,0 +1,28 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.1.1, verify that in value formal parameters of template cannot used dash as default value + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Formal parameters of modified templates may inherit the default values from the corresponding +// parameters of their parent templates; this shall explicitly be denoted by using a dash (don't +// change) symbol at the place of the modified template parameters' default value. + +module NegSem_05040101_parameters_of_kind_value_001 { + + type component GeneralComp { + } + + type record R + { + integer field1, + integer field2 + } + + template R m_t(integer p_int1 := 3, in integer p_int2 := -) := { + field1 := p_int1, + field2 := p_int2 + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/NegSem_05040101_parameters_of_kind_value_002.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/NegSem_05040101_parameters_of_kind_value_002.ttcn new file mode 100644 index 00000000..063946f1 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/NegSem_05040101_parameters_of_kind_value_002.ttcn @@ -0,0 +1,33 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.1.1, verify that modified template cannot used dash as default value when original value parameter had no default value + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Formal parameters of modified templates may inherit the default values from the corresponding +// parameters of their parent templates; this shall explicitly be denoted by using a dash (don't +// change) symbol at the place of the modified template parameters' default value. + +module NegSem_05040101_parameters_of_kind_value_002 { + + type component GeneralComp { + } + + type record R + { + integer field1, + integer field2 + } + + template R m_t(integer p_int1, in integer p_int2 := 4) := { + field1 := p_int1, + field2 := p_int2 + } + + template R m_tmod(integer p_int1 := -, in integer p_int2 := 6) modifies m_t := { + field1 := p_int1, + field2 := p_int2 + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/NegSem_05040101_parameters_of_kind_value_003.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/NegSem_05040101_parameters_of_kind_value_003.ttcn new file mode 100644 index 00000000..2254a690 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/NegSem_05040101_parameters_of_kind_value_003.ttcn @@ -0,0 +1,41 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.1.1, verify that template definitions cannot contain out value formal parameters + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Restriction b) +// Formal value parameters of templates ... shall always be in parameters. + +module NegSem_05040101_parameters_of_kind_value_003 { + type component GeneralComp { + } + + type record R + { + integer field1, + integer field2 + } + + function f(out integer p_int) return integer { + p_int := 2; + return p_int; + } + + template R m_t(out integer p_int) := { + field1 := 0, + field2 := f(p_int) + } + + testcase TC_NegSem_05040101_parameters_of_kind_value_003() runs on GeneralComp { + var integer v_int; + log(m_t(v_int)); + setverdict(pass); + } + + control{ + execute(TC_NegSem_05040101_parameters_of_kind_value_003()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/NegSem_05040101_parameters_of_kind_value_004.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/NegSem_05040101_parameters_of_kind_value_004.ttcn new file mode 100644 index 00000000..d79604a5 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/NegSem_05040101_parameters_of_kind_value_004.ttcn @@ -0,0 +1,41 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.1.1, verify that template definitions cannot contain inout value formal parameters + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Restriction b) +// Formal value parameters of templates ... shall always be in parameters. + +module NegSem_05040101_parameters_of_kind_value_004 { + type component GeneralComp { + } + + type record R + { + integer field1, + integer field2 + } + + function f(inout integer p_int) return integer { + p_int := p_int * 2; + return p_int; + } + + template R m_t(inout integer p_int) := { + field1 := 0, + field2 := f(p_int) + } + + testcase TC_NegSem_05040101_parameters_of_kind_value_004() runs on GeneralComp { + var integer v_int := 1; + log(m_t(v_int)); + setverdict(pass); + } + + control{ + execute(TC_NegSem_05040101_parameters_of_kind_value_004()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/NegSem_05040101_parameters_of_kind_value_005.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/NegSem_05040101_parameters_of_kind_value_005.ttcn new file mode 100644 index 00000000..7d3ec00d --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/NegSem_05040101_parameters_of_kind_value_005.ttcn @@ -0,0 +1,29 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.1.1, verify that out value formal parameters cannot have default values + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Restriction d) +// Default values can be provided for in parameters only. + +module NegSem_05040101_parameters_of_kind_value_005 { + type component GeneralComp { + } + + function f(out integer p_int := 5) { + } + + testcase TC_NegSem_05040101_parameters_of_kind_value_005() runs on GeneralComp { + var integer v_int; + f(v_int); + log(v_int); + setverdict(pass); + } + + control{ + execute(TC_NegSem_05040101_parameters_of_kind_value_005()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/NegSem_05040101_parameters_of_kind_value_006.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/NegSem_05040101_parameters_of_kind_value_006.ttcn new file mode 100644 index 00000000..00c5ea72 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/NegSem_05040101_parameters_of_kind_value_006.ttcn @@ -0,0 +1,29 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.1.1, verify that inout value formal parameters cannot have default values + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Restriction d) +// Default values can be provided for in parameters only. + +module NegSem_05040101_parameters_of_kind_value_006 { + type component GeneralComp { + } + + function f(inout integer p_int := 5) { + } + + testcase TC_NegSem_05040101_parameters_of_kind_value_006() runs on GeneralComp { + var integer v_int := 0; + f(v_int); + log(v_int); + setverdict(pass); + } + + control{ + execute(TC_NegSem_05040101_parameters_of_kind_value_006()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/NegSem_05040101_parameters_of_kind_value_007.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/NegSem_05040101_parameters_of_kind_value_007.ttcn new file mode 100644 index 00000000..0b9e8086 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/NegSem_05040101_parameters_of_kind_value_007.ttcn @@ -0,0 +1,27 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.1.1, verify that incompatible value in default value assignment of value formal parameters causes error + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Restriction e) +// The expression of the formal parameters' default value has to be compatible with the type of the parameter. + +module NegSem_05040101_parameters_of_kind_value_007 { + type component GeneralComp { + } + + function f(in integer p_int := 5.0) { + } + + testcase TC_NegSem_05040101_parameters_of_kind_value_007() runs on GeneralComp { + f(); + setverdict(pass); + } + + control{ + execute(TC_NegSem_05040101_parameters_of_kind_value_007()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/NegSem_05040101_parameters_of_kind_value_009.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/NegSem_05040101_parameters_of_kind_value_009.ttcn new file mode 100644 index 00000000..6125916a --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/NegSem_05040101_parameters_of_kind_value_009.ttcn @@ -0,0 +1,27 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.1.1, verify that default value of value formal parameters cannot reference other parameters + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Restriction e) +// The expression shall not refer to other parameters of the same parameter list. + +module NegSem_05040101_parameters_of_kind_value_009 { + type component GeneralComp { + } + + function f(in integer p_int, in integer p_int2 := p_int) runs on GeneralComp { + } + + testcase TC_NegSem_05040101_parameters_of_kind_value_009() runs on GeneralComp { + f(2); + setverdict(pass); + } + + control{ + execute(TC_NegSem_05040101_parameters_of_kind_value_009()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/NegSem_05040101_parameters_of_kind_value_011.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/NegSem_05040101_parameters_of_kind_value_011.ttcn new file mode 100644 index 00000000..d4e780e7 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/NegSem_05040101_parameters_of_kind_value_011.ttcn @@ -0,0 +1,29 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.1.1, verify that error is generated if formal value parameter of function contains dash + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Restriction h) +// The dash (don't change) symbol shall be used with formal parameters of modified templates only + +module NegSem_05040101_parameters_of_kind_value_011 { + + type component GeneralComp { + } + + function f (integer p_int := -) { + log(p_int); + } + + testcase TC_NegSem_05040102_parameters_of_kind_value_011() runs on GeneralComp { + f(1); + setverdict(pass); + } + + control{ + execute(TC_NegSem_05040102_parameters_of_kind_value_011()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/NegSem_05040101_parameters_of_kind_value_012.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/NegSem_05040101_parameters_of_kind_value_012.ttcn new file mode 100644 index 00000000..b364406a --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/NegSem_05040101_parameters_of_kind_value_012.ttcn @@ -0,0 +1,30 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.1.1, verify that error is generated if formal value parameter of altstep contains dash + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Restriction h) +// The dash (don't change) symbol shall be used with formal parameters of modified templates only + +module NegSem_05040101_parameters_of_kind_value_012 { + + type component GeneralComp { + } + + altstep a(integer p_int := -) { + []any timer.timeout {} + [else] {} + } + + testcase TC_NegSem_05040101_parameters_of_kind_value_012() runs on GeneralComp { + a(1); + setverdict(pass); + } + + control{ + execute(TC_NegSem_05040101_parameters_of_kind_value_012()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/NegSem_05040101_parameters_of_kind_value_013.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/NegSem_05040101_parameters_of_kind_value_013.ttcn new file mode 100644 index 00000000..804ae68f --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/NegSem_05040101_parameters_of_kind_value_013.ttcn @@ -0,0 +1,25 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.1.1, verify that error is generated if formal value parameter of test case contains dash + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Restriction h) +// The dash (don't change) symbol shall be used with formal parameters of modified templates only + +module NegSem_05040101_parameters_of_kind_value_013 { + + type component GeneralComp { + } + + testcase TC_NegSem_05040101_parameters_of_kind_value_013(integer p_int := -) runs on GeneralComp { + log(p_int); + setverdict(pass); + } + + control{ + execute(TC_NegSem_05040101_parameters_of_kind_value_013(1)); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/NegSem_05040101_parameters_of_kind_value_014.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/NegSem_05040101_parameters_of_kind_value_014.ttcn new file mode 100644 index 00000000..8a510628 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/NegSem_05040101_parameters_of_kind_value_014.ttcn @@ -0,0 +1,30 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.1.1, verify that out formal value parameters cannot have lazy modifier + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Restriction j) +// Only in parameters can be declared lazy or fuzzy. + +module NegSem_05040101_parameters_of_kind_value_014 { + + type component GeneralComp { + } + + function f(out @lazy integer p_int) { + p_int := 6; + } + testcase TC_NegSem_05040101_parameters_of_kind_value_014() runs on GeneralComp { + var integer v_int; + f(v_int); + log(v_int); + setverdict(pass); + } + + control{ + execute(TC_NegSem_05040101_parameters_of_kind_value_014()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/NegSem_05040101_parameters_of_kind_value_015.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/NegSem_05040101_parameters_of_kind_value_015.ttcn new file mode 100644 index 00000000..5e9eee4e --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/NegSem_05040101_parameters_of_kind_value_015.ttcn @@ -0,0 +1,30 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.1.1, verify that out formal value parameters cannot have fuzzy modifier + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Restriction j) +// Only in parameters can be declared lazy or fuzzy. + +module NegSem_05040101_parameters_of_kind_value_015 { + + type component GeneralComp { + } + + function f(out @fuzzy integer p_int) { + p_int := 6; + } + testcase TC_NegSem_05040101_parameters_of_kind_value_015() runs on GeneralComp { + var integer v_int; + f(v_int); + log(v_int); + setverdict(pass); + } + + control{ + execute(TC_NegSem_05040101_parameters_of_kind_value_015()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/NegSem_05040101_parameters_of_kind_value_016.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/NegSem_05040101_parameters_of_kind_value_016.ttcn new file mode 100644 index 00000000..559f11d5 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/NegSem_05040101_parameters_of_kind_value_016.ttcn @@ -0,0 +1,30 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.1.1, verify that inout formal value parameters cannot have lazy modifier + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Restriction j) +// Only in parameters can be declared lazy or fuzzy. + +module NegSem_05040101_parameters_of_kind_value_016 { + + type component GeneralComp { + } + + function f(inout @lazy integer p_int) { + p_int := 6; + } + testcase TC_NegSem_05040101_parameters_of_kind_value_016() runs on GeneralComp { + var integer v_int := 0; + f(v_int); + log(v_int); + setverdict(pass); + } + + control{ + execute(TC_NegSem_05040101_parameters_of_kind_value_016()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/NegSem_05040101_parameters_of_kind_value_017.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/NegSem_05040101_parameters_of_kind_value_017.ttcn new file mode 100644 index 00000000..4b2b94cd --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/NegSem_05040101_parameters_of_kind_value_017.ttcn @@ -0,0 +1,30 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.1.1, verify that inout formal value parameters cannot have fuzzy modifier + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Restriction j) +// Only in parameters can be declared lazy or fuzzy. + +module NegSem_05040101_parameters_of_kind_value_017 { + + type component GeneralComp { + } + + function f(inout @fuzzy integer p_int) { + p_int := 6; + } + testcase TC_NegSem_05040101_parameters_of_kind_value_017() runs on GeneralComp { + var integer v_int := 0; + f(v_int); + log(v_int); + setverdict(pass); + } + + control{ + execute(TC_NegSem_05040101_parameters_of_kind_value_017()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/NegSem_05040101_parameters_of_kind_value_018.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/NegSem_05040101_parameters_of_kind_value_018.ttcn new file mode 100644 index 00000000..a39234b3 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/NegSem_05040101_parameters_of_kind_value_018.ttcn @@ -0,0 +1,27 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.1.1, verify that incompatible value in default value assignment of value formal parameters causes error + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Restriction e) +// The expression of the formal parameters' default value had to be compatible with the type of the parameter. + +module NegSem_05040101_parameters_of_kind_value_007 { + type component GeneralComp { + } + + function f(in integer p_int := 5.0) { + } + + testcase TC_NegSem_05040101_parameters_of_kind_value_007() runs on GeneralComp { + f(); + setverdict(pass); + } + + control{ + execute(TC_NegSem_05040101_parameters_of_kind_value_007()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/NegSyn_05040101_parameters_of_kind_value_001.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/NegSyn_05040101_parameters_of_kind_value_001.ttcn new file mode 100644 index 00000000..0f98d073 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/NegSyn_05040101_parameters_of_kind_value_001.ttcn @@ -0,0 +1,16 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.1.1, verify that const definition cannot be parameterized + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Restriction a) +// Language elements which cannot be parameterized are: const, var, timer, control, record of, +// set of, enumerated, port, component and subtype definitions, group and import. + +module NegSyn_05040101_parameters_of_kind_value_001 { + + const integer c_int(integer p_int) := p_int + 2; +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/NegSyn_05040101_parameters_of_kind_value_002.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/NegSyn_05040101_parameters_of_kind_value_002.ttcn new file mode 100644 index 00000000..cd44bda4 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/NegSyn_05040101_parameters_of_kind_value_002.ttcn @@ -0,0 +1,18 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.1.1, verify that var definition cannot be parameterized + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Restriction a) +// Language elements which cannot be parameterized are: const, var, timer, control, record of, +// set of, enumerated, port, component and subtype definitions, group and import. + +module NegSyn_05040101_parameters_of_kind_value_002 { + + function f() { + var integer c_int(integer p_int) := p_int + 2; + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/NegSyn_05040101_parameters_of_kind_value_003.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/NegSyn_05040101_parameters_of_kind_value_003.ttcn new file mode 100644 index 00000000..c53fd186 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/NegSyn_05040101_parameters_of_kind_value_003.ttcn @@ -0,0 +1,18 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.1.1, verify that template variable definition cannot be parameterized + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Restriction a) +// Language elements which cannot be parameterized are: const, var, timer, control, record of, +// set of, enumerated, port, component and subtype definitions, group and import. + +module NegSyn_05040101_parameters_of_kind_value_003 { + + function f() { + var template integer c_int(integer p_int) := p_int + 2; + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/NegSyn_05040101_parameters_of_kind_value_004.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/NegSyn_05040101_parameters_of_kind_value_004.ttcn new file mode 100644 index 00000000..8f4044c2 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/NegSyn_05040101_parameters_of_kind_value_004.ttcn @@ -0,0 +1,18 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.1.1, verify that timer definition cannot be parameterized + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Restriction a) +// Language elements which cannot be parameterized are: const, var, timer, control, record of, +// set of, enumerated, port, component and subtype definitions, group and import. + +module NegSyn_05040101_parameters_of_kind_value_004 { + + function f() { + timer t_timer(float p_float) := p_float * 2; + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/NegSyn_05040101_parameters_of_kind_value_005.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/NegSyn_05040101_parameters_of_kind_value_005.ttcn new file mode 100644 index 00000000..ce023afa --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/NegSyn_05040101_parameters_of_kind_value_005.ttcn @@ -0,0 +1,18 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.1.1, verify that control definition cannot be parameterized + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Restriction a) +// Language elements which cannot be parameterized are: const, var, timer, control, record of, +// set of, enumerated, port, component and subtype definitions, group and import. + +module NegSyn_05040101_parameters_of_kind_value_005 { + + control(integer p_int) { + log(p_int); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/NegSyn_05040101_parameters_of_kind_value_006.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/NegSyn_05040101_parameters_of_kind_value_006.ttcn new file mode 100644 index 00000000..5b9eff59 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/NegSyn_05040101_parameters_of_kind_value_006.ttcn @@ -0,0 +1,16 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.1.1, verify that record of definition cannot be parameterized + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Restriction a) +// Language elements which cannot be parameterized are: const, var, timer, control, record of, +// set of, enumerated, port, component and subtype definitions, group and import. + +module NegSyn_05040101_parameters_of_kind_value_006 { + + type record of integer RoI (integer p_int); +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/NegSyn_05040101_parameters_of_kind_value_007.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/NegSyn_05040101_parameters_of_kind_value_007.ttcn new file mode 100644 index 00000000..a8e15e6c --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/NegSyn_05040101_parameters_of_kind_value_007.ttcn @@ -0,0 +1,16 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.1.1, verify that set of definition cannot be parameterized + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Restriction a) +// Language elements which cannot be parameterized are: const, var, timer, control, record of, +// set of, enumerated, port, component and subtype definitions, group and import. + +module NegSyn_05040101_parameters_of_kind_value_007 { + + type set of integer SoI (integer p_int); +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/NegSyn_05040101_parameters_of_kind_value_008.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/NegSyn_05040101_parameters_of_kind_value_008.ttcn new file mode 100644 index 00000000..2b2efb9d --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/NegSyn_05040101_parameters_of_kind_value_008.ttcn @@ -0,0 +1,16 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.1.1, verify that enumerated definition cannot be parameterized + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Restriction a) +// Language elements which cannot be parameterized are: const, var, timer, control, record of, +// set of, enumerated, port, component and subtype definitions, group and import. + +module NegSyn_05040101_parameters_of_kind_value_008 { + + type enumerated EColour(integer p_int) { red, blue, green } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/NegSyn_05040101_parameters_of_kind_value_009.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/NegSyn_05040101_parameters_of_kind_value_009.ttcn new file mode 100644 index 00000000..4c3e0b61 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/NegSyn_05040101_parameters_of_kind_value_009.ttcn @@ -0,0 +1,19 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.1.1, verify that port definition cannot be parameterized + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Restriction a) +// Language elements which cannot be parameterized are: const, var, timer, control, record of, +// set of, enumerated, port, component and subtype definitions, group and import. + +module NegSyn_05040101_parameters_of_kind_value_009 { + + type port P(integer p_int) message { + inout integer; + map param(integer p_par := p_int); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/NegSyn_05040101_parameters_of_kind_value_010.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/NegSyn_05040101_parameters_of_kind_value_010.ttcn new file mode 100644 index 00000000..03e6b5aa --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/NegSyn_05040101_parameters_of_kind_value_010.ttcn @@ -0,0 +1,18 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.1.1, verify that component definition cannot be parameterized + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Restriction a) +// Language elements which cannot be parameterized are: const, var, timer, control, record of, +// set of, enumerated, port, component and subtype definitions, group and import. + +module NegSyn_05040101_parameters_of_kind_value_010 { + + type component C (integer p_int) { + var integer v_int := p_int; + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/NegSyn_05040101_parameters_of_kind_value_011.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/NegSyn_05040101_parameters_of_kind_value_011.ttcn new file mode 100644 index 00000000..c028119b --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/NegSyn_05040101_parameters_of_kind_value_011.ttcn @@ -0,0 +1,16 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.1.1, verify that subtype definition cannot be parameterized + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Restriction a) +// Language elements which cannot be parameterized are: const, var, timer, control, record of, +// set of, enumerated, port, component and subtype definitions, group and import. + +module NegSyn_05040101_parameters_of_kind_value_010 { + + type integer MyInt(integer p_int); +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/NegSyn_05040101_parameters_of_kind_value_012.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/NegSyn_05040101_parameters_of_kind_value_012.ttcn new file mode 100644 index 00000000..2c476ae1 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/NegSyn_05040101_parameters_of_kind_value_012.ttcn @@ -0,0 +1,18 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.1.1, verify that group definition cannot be parameterized + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Restriction a) +// Language elements which cannot be parameterized are: const, var, timer, control, record of, +// set of, enumerated, port, component and subtype definitions, group and import. + +module NegSyn_05040101_parameters_of_kind_value_011 { + + group Group1 (integer p_int) { + const integer c_int := 2 * p_int; + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/NegSyn_05040101_parameters_of_kind_value_013.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/NegSyn_05040101_parameters_of_kind_value_013.ttcn new file mode 100644 index 00000000..cd44d170 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/NegSyn_05040101_parameters_of_kind_value_013.ttcn @@ -0,0 +1,16 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.1.1, verify that import definition cannot be parameterized + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Restriction a) +// Language elements which cannot be parameterized are: const, var, timer, control, record of, +// set of, enumerated, port, component and subtype definitions, group and import. + +module NegSyn_05040101_parameters_of_kind_value_013 { + + import from Sem_05040101_parameters_of_kind_value_001 (integer INTEGER_MODULE_PARAMETER) all; +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/Sem_05040101_parameters_of_kind_value_001.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/Sem_05040101_parameters_of_kind_value_001.ttcn new file mode 100644 index 00000000..40a8a0a4 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/Sem_05040101_parameters_of_kind_value_001.ttcn @@ -0,0 +1,32 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.2 + ** @purpose 1:5.4.1.1, Ensure that the IUT correctly handles parametrization through the use of module parameters. + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Sem_05040101_parameters_of_kind_value_001 { + + // the following module parameters must not be set externally, as their default values are being checked + modulepar integer INTEGER_MODULE_PARAMETER := 1; + + + type component GeneralComp { + } + + + testcase TC_Sem_05040101_parameters_of_kind_value_001() runs on GeneralComp { + if ( (INTEGER_MODULE_PARAMETER == 1)) { + setverdict(pass); + } + else { + setverdict(fail); + } + + } + + + control{ + execute(TC_Sem_05040101_parameters_of_kind_value_001()); + } + +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/Sem_05040101_parameters_of_kind_value_002.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/Sem_05040101_parameters_of_kind_value_002.ttcn new file mode 100644 index 00000000..c24f6c22 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/Sem_05040101_parameters_of_kind_value_002.ttcn @@ -0,0 +1,32 @@ +/*************************************************** + ** @author STF 451 + ** @version 0.0.1 + ** @purpose 1:5.4.1.1, Ensure that the IUT correctly handles parametrization through the use of module parameters. + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Sem_05040101_parameters_of_kind_value_002 { + + // the following module parameters must not be set externally, as their default values are being checked + modulepar boolean BOOLEAN_MODULE_PARAMETER := true; + + + type component GeneralComp { + } + + + testcase TC_Sem_05040101_parameters_of_kind_value_002() runs on GeneralComp { + if ( BOOLEAN_MODULE_PARAMETER == true){ + setverdict(pass); + } + else { + setverdict(fail); + } + + } + + + control{ + execute(TC_Sem_05040101_parameters_of_kind_value_002()); + } + +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/Sem_05040101_parameters_of_kind_value_003.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/Sem_05040101_parameters_of_kind_value_003.ttcn new file mode 100644 index 00000000..8a49184c --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/Sem_05040101_parameters_of_kind_value_003.ttcn @@ -0,0 +1,33 @@ +/*************************************************** + ** @author STF 451 + ** @version 0.0.1 + ** @purpose 1:5.4.1.1, Ensure that the IUT correctly handles parametrization through the use of module parameters. + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Sem_05040101_parameters_of_kind_value_003 { + + // the following module parameters must not be set externally, as their default values are being checked + modulepar address ADDRESS_MODULE_PARAMETER := 5; + + type integer address; + + type component GeneralComp { + } + + + testcase TC_Sem_05040101_parameters_of_kind_value_003() runs on GeneralComp { + if ( ADDRESS_MODULE_PARAMETER == 5) { + setverdict(pass); + } + else { + setverdict(fail); + } + + } + + + control{ + execute(TC_Sem_05040101_parameters_of_kind_value_003()); + } + +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/Sem_05040101_parameters_of_kind_value_004.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/Sem_05040101_parameters_of_kind_value_004.ttcn new file mode 100644 index 00000000..0392ea8b --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/Sem_05040101_parameters_of_kind_value_004.ttcn @@ -0,0 +1,34 @@ +/*************************************************** + ** @author STF 451 + ** @version 0.0.1 + ** @purpose 1:5.4.1.1, Ensure that the IUT correctly handles parametrization through the use of module parameters. + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Sem_05040101_parameters_of_kind_value_004 { + + // the following module parameter must not be set externally, as their default values are being checked + + modulepar MyEnumeratedType ENUMERATED_MODULE_PARAMETER := e_black; + + type enumerated MyEnumeratedType {e_black, e_white} + + type component GeneralComp { + } + + + testcase TC_Sem_05040101_parameters_of_kind_value_004() runs on GeneralComp { + if (ENUMERATED_MODULE_PARAMETER == e_black ) { + setverdict(pass); + } + else { + setverdict(fail); + } + + } + + + control{ + execute(TC_Sem_05040101_parameters_of_kind_value_004()); + } + +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/Sem_05040101_parameters_of_kind_value_005.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/Sem_05040101_parameters_of_kind_value_005.ttcn new file mode 100644 index 00000000..ca89cc98 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/Sem_05040101_parameters_of_kind_value_005.ttcn @@ -0,0 +1,40 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.1.1, verify that template definition can contain in value formal parameters + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// TTCN 3 supports value parameterization according to the following rules: +// - the language elements template, testcase, altstep and function support dynamic value +// parameterization (i.e. this parameterization shall be resolved at runtime). Value formal +// parameters may be in, inout or out parameters. The default for value formal parameters is +// in parameterization which may optionally be denoted by the keyword in. Using of inout or out +// kind of parameterization shall be specified by the keywords inout or out respectively. + +module Sem_05040101_parameters_of_kind_value_005 { + + type component GeneralComp { + } + + type record R + { + integer field1, + integer field2 + } + + template R m_t(integer p_int1, in integer p_int2) := { + field1 := p_int1, + field2 := p_int2 + } + + testcase TC_Sem_05040101_parameters_of_kind_value_005() runs on GeneralComp { + log(m_t(3,4)); + setverdict(pass); + } + + control{ + execute(TC_Sem_05040101_parameters_of_kind_value_005()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/Sem_05040101_parameters_of_kind_value_006.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/Sem_05040101_parameters_of_kind_value_006.ttcn new file mode 100644 index 00000000..7db29048 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/Sem_05040101_parameters_of_kind_value_006.ttcn @@ -0,0 +1,39 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.1.1, verify that local template definition can contain in value formal parameters + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// TTCN 3 supports value parameterization according to the following rules: +// - the language elements template, testcase, altstep and function support dynamic value +// parameterization (i.e. this parameterization shall be resolved at runtime). Value formal +// parameters may be in, inout or out parameters. The default for value formal parameters is +// in parameterization which may optionally be denoted by the keyword in. Using of inout or out +// kind of parameterization shall be specified by the keywords inout or out respectively. + +module Sem_05040101_parameters_of_kind_value_006 { + + type component GeneralComp { + } + + type record R + { + integer field1, + integer field2 + } + + testcase TC_Sem_05040101_parameters_of_kind_value_006() runs on GeneralComp { + template R m_t(integer p_int1, in integer p_int2) := { + field1 := p_int1, + field2 := p_int2 + } + log(m_t(3,4)); + setverdict(pass); + } + + control{ + execute(TC_Sem_05040101_parameters_of_kind_value_006()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/Sem_05040101_parameters_of_kind_value_007.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/Sem_05040101_parameters_of_kind_value_007.ttcn new file mode 100644 index 00000000..ab9e386f --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/Sem_05040101_parameters_of_kind_value_007.ttcn @@ -0,0 +1,33 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.1.1, verify that function definition can contain in, out and inout value formal parameters + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// TTCN 3 supports value parameterization according to the following rules: +// - the language elements template, testcase, altstep and function support dynamic value +// parameterization (i.e. this parameterization shall be resolved at runtime). Value formal +// parameters may be in, inout or out parameters. The default for value formal parameters is +// in parameterization which may optionally be denoted by the keyword in. Using of inout or out +// kind of parameterization shall be specified by the keywords inout or out respectively. + +module Sem_05040101_parameters_of_kind_value_007 { + + type component GeneralComp { + } + + function f(integer p_int1, in integer p_int2, out integer p_int3, inout integer p_int4){ + setverdict(pass); + } + + testcase TC_Sem_05040101_parameters_of_kind_value_007() runs on GeneralComp { + var integer v_int1, v_int2 := 0; + f(1, 2, v_int1, v_int2); + } + + control{ + execute(TC_Sem_05040101_parameters_of_kind_value_007()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/Sem_05040101_parameters_of_kind_value_008.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/Sem_05040101_parameters_of_kind_value_008.ttcn new file mode 100644 index 00000000..5bf7ddeb --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/Sem_05040101_parameters_of_kind_value_008.ttcn @@ -0,0 +1,34 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.1.1, verify that altstep definition can contain in, out and inout value formal parameters + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// TTCN 3 supports value parameterization according to the following rules: +// - the language elements template, testcase, altstep and function support dynamic value +// parameterization (i.e. this parameterization shall be resolved at runtime). Value formal +// parameters may be in, inout or out parameters. The default for value formal parameters is +// in parameterization which may optionally be denoted by the keyword in. Using of inout or out +// kind of parameterization shall be specified by the keywords inout or out respectively. + +module Sem_05040101_parameters_of_kind_value_008 { + + type component GeneralComp { + } + + altstep a(integer p_int1, in integer p_int2, out integer p_int3, inout integer p_int4) { + [] any timer.timeout { setverdict(fail); } + [else] { setverdict(pass); } + } + + testcase TC_Sem_05040101_parameters_of_kind_value_008() runs on GeneralComp { + var integer v_int1, v_int2 := 0; + a(1, 2, v_int1, v_int2); + } + + control{ + execute(TC_Sem_05040101_parameters_of_kind_value_008()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/Sem_05040101_parameters_of_kind_value_009.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/Sem_05040101_parameters_of_kind_value_009.ttcn new file mode 100644 index 00000000..37d854ee --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/Sem_05040101_parameters_of_kind_value_009.ttcn @@ -0,0 +1,29 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.1.1, verify that test case definition can contain in, out and inout value formal parameters + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// TTCN 3 supports value parameterization according to the following rules: +// - the language elements template, testcase, altstep and function support dynamic value +// parameterization (i.e. this parameterization shall be resolved at runtime). Value formal +// parameters may be in, inout or out parameters. The default for value formal parameters is +// in parameterization which may optionally be denoted by the keyword in. Using of inout or out +// kind of parameterization shall be specified by the keywords inout or out respectively. + +module Sem_05040101_parameters_of_kind_value_009 { + + type component GeneralComp { + } + + testcase TC_Sem_05040101_parameters_of_kind_value_009(integer p_int1, in integer p_int2, out integer p_int3, inout integer p_int4) runs on GeneralComp { + setverdict(pass); + } + + control { + var integer v_int1, v_int2 := 0; + execute(TC_Sem_05040101_parameters_of_kind_value_009(1, 2, v_int1, v_int2)); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/Sem_05040101_parameters_of_kind_value_010.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/Sem_05040101_parameters_of_kind_value_010.ttcn new file mode 100644 index 00000000..2f68e184 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/Sem_05040101_parameters_of_kind_value_010.ttcn @@ -0,0 +1,32 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.1.1, verify that value formal parameters can be used in expressions + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Value formal parameters can be used within the parameterized object the same way as values, +// for example in expressions. + +module Sem_05040101_parameters_of_kind_value_010 { + + type component GeneralComp { + } + + function f(integer p_int1, in integer p_int2){ + if (p_int1 + p_int2 == 5) { + setverdict(pass); + } else { + setverdict(fail); + } + } + + testcase TC_Sem_05040101_parameters_of_kind_value_010() runs on GeneralComp { + f(2, 3); + } + + control{ + execute(TC_Sem_05040101_parameters_of_kind_value_010()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/Sem_05040101_parameters_of_kind_value_011.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/Sem_05040101_parameters_of_kind_value_011.ttcn new file mode 100644 index 00000000..5cce3e2b --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/Sem_05040101_parameters_of_kind_value_011.ttcn @@ -0,0 +1,27 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.1.1, verify that in value formal parameters of template can have default values + ** @verdict pass accept, noexecution + ***************************************************/ + +// The following requirement is tested: +// In parameters may have a default value, which is given by an expression assigned to +// the parameter. + +module Sem_05040101_parameters_of_kind_value_011 { + + type component GeneralComp { + } + + type record R + { + integer field1, + integer field2 + } + + template R m_t(integer p_int1 := 3, in integer p_int2 := 4) := { + field1 := p_int1, + field2 := p_int2 + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/Sem_05040101_parameters_of_kind_value_012.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/Sem_05040101_parameters_of_kind_value_012.ttcn new file mode 100644 index 00000000..9041a39c --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/Sem_05040101_parameters_of_kind_value_012.ttcn @@ -0,0 +1,29 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.1.1, verify that in value formal parameters of local template can have default values + ** @verdict pass accept, noexecution + ***************************************************/ + +// The following requirement is tested: +// In parameters may have a default value, which is given by an expression assigned to +// the parameter. + +module Sem_05040101_parameters_of_kind_value_012 { + + type component GeneralComp { + } + + type record R + { + integer field1, + integer field2 + } + + function f() { + template R m_t(integer p_int1 := 3, in integer p_int2 := 4) := { + field1 := p_int1, + field2 := p_int2 + } + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/Sem_05040101_parameters_of_kind_value_013.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/Sem_05040101_parameters_of_kind_value_013.ttcn new file mode 100644 index 00000000..7ee5a534 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/Sem_05040101_parameters_of_kind_value_013.ttcn @@ -0,0 +1,25 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.1.1, verify that in value formal parameters of function can have default values + ** @verdict pass accept, noexecution + ***************************************************/ + +// The following requirement is tested: +// In parameters may have a default value, which is given by an expression assigned to +// the parameter. + +module Sem_05040101_parameters_of_kind_value_013 { + + type component GeneralComp { + } + + type record R + { + integer field1, + integer field2 + } + + function f(integer p_int1 := 3, in integer p_int2 := 4) { + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/Sem_05040101_parameters_of_kind_value_014.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/Sem_05040101_parameters_of_kind_value_014.ttcn new file mode 100644 index 00000000..cbf60dfb --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/Sem_05040101_parameters_of_kind_value_014.ttcn @@ -0,0 +1,26 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.1.1, verify that in value formal parameters of altstep can have default values + ** @verdict pass accept, noexecution + ***************************************************/ + +// The following requirement is tested: +// In parameters may have a default value, which is given by an expression assigned to +// the parameter. + +module Sem_05040101_parameters_of_kind_value_014 { + + type component GeneralComp { + } + + type record R + { + integer field1, + integer field2 + } + + altstep a(integer p_int1 := 3, in integer p_int2 := 4) { + [] any timer.timeout {} + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/Sem_05040101_parameters_of_kind_value_015.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/Sem_05040101_parameters_of_kind_value_015.ttcn new file mode 100644 index 00000000..9eb46298 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/Sem_05040101_parameters_of_kind_value_015.ttcn @@ -0,0 +1,25 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.1.1, verify that in value formal parameters of test case can have default values + ** @verdict pass accept, noexecution + ***************************************************/ + +// The following requirement is tested: +// In parameters may have a default value, which is given by an expression assigned to +// the parameter. + +module Sem_05040101_parameters_of_kind_value_015 { + + type component GeneralComp { + } + + type record R + { + integer field1, + integer field2 + } + + testcase TC(integer p_int1 := 3, in integer p_int2 := 4) runs on GeneralComp { + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/Sem_05040101_parameters_of_kind_value_016.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/Sem_05040101_parameters_of_kind_value_016.ttcn new file mode 100644 index 00000000..b8f4e049 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/Sem_05040101_parameters_of_kind_value_016.ttcn @@ -0,0 +1,33 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.1.1, verify that in value formal parameters of modified template can used dash as default value + ** @verdict pass accept, noexecution + ***************************************************/ + +// The following requirement is tested: +// Formal parameters of modified templates may inherit the default values from the corresponding +// parameters of their parent templates; this shall explicitly be denoted by using a dash (don't +// change) symbol at the place of the modified template parameters' default value. + +module Sem_05040101_parameters_of_kind_value_016 { + + type component GeneralComp { + } + + type record R + { + integer field1, + integer field2 + } + + template R m_t(integer p_int1 := 3, in integer p_int2 := 4) := { + field1 := p_int1, + field2 := p_int2 + } + + template R m_tmod(integer p_int1 := 10, in integer p_int2 := -) modifies m_t := { + field1 := p_int1, + field2 := p_int2 + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/Sem_05040101_parameters_of_kind_value_017.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/Sem_05040101_parameters_of_kind_value_017.ttcn new file mode 100644 index 00000000..2bfb0604 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/Sem_05040101_parameters_of_kind_value_017.ttcn @@ -0,0 +1,30 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.1.1, verify that null is suitable default value of formal value parameters of component type + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Restriction f) +// Default values of component type formal parameters shall be one of the special values null, +// mtc, self, or system. + +module Sem_05040101_parameters_of_kind_value_017 { + + type component GeneralComp { + } + + function f(GeneralComp p_comp := null) { + log(p_comp); + } + + testcase TC_Sem_05040101_parameters_of_kind_value_017() runs on GeneralComp { + f(); + setverdict(pass); + } + + control{ + execute(TC_Sem_05040101_parameters_of_kind_value_017()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/Sem_05040101_parameters_of_kind_value_018.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/Sem_05040101_parameters_of_kind_value_018.ttcn new file mode 100644 index 00000000..224bf3d6 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/Sem_05040101_parameters_of_kind_value_018.ttcn @@ -0,0 +1,30 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.1.1, verify that self is suitable default value of formal value parameters of component type + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Restriction f) +// Default values of component type formal parameters shall be one of the special values null, +// mtc, self, or system. + +module Sem_05040101_parameters_of_kind_value_018 { + + type component GeneralComp { + } + + function f(GeneralComp p_comp := self) { + log(p_comp); + } + + testcase TC_Sem_05040101_parameters_of_kind_value_018() runs on GeneralComp { + f(); + setverdict(pass); + } + + control{ + execute(TC_Sem_05040101_parameters_of_kind_value_018()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/Sem_05040101_parameters_of_kind_value_019.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/Sem_05040101_parameters_of_kind_value_019.ttcn new file mode 100644 index 00000000..b3ea319d --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/Sem_05040101_parameters_of_kind_value_019.ttcn @@ -0,0 +1,30 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.1.1, verify that mtc is suitable default value of formal value parameters of component type + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Restriction f) +// Default values of component type formal parameters shall be one of the special values null, +// mtc, self, or system. + +module Sem_05040101_parameters_of_kind_value_019 { + + type component GeneralComp { + } + + function f(GeneralComp p_comp := mtc) { + log(p_comp); + } + + testcase TC_Sem_05040101_parameters_of_kind_value_019() runs on GeneralComp { + f(); + setverdict(pass); + } + + control{ + execute(TC_Sem_05040101_parameters_of_kind_value_019()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/Sem_05040101_parameters_of_kind_value_020.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/Sem_05040101_parameters_of_kind_value_020.ttcn new file mode 100644 index 00000000..20b822e0 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/Sem_05040101_parameters_of_kind_value_020.ttcn @@ -0,0 +1,30 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.1.1, verify that system is suitable default value of formal value parameters of component type + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Restriction f) +// Default values of component type formal parameters shall be one of the special values null, +// mtc, self, or system. + +module Sem_05040101_parameters_of_kind_value_020 { + + type component GeneralComp { + } + + function f(GeneralComp p_comp := system) { + log(p_comp); + } + + testcase TC_Sem_05040101_parameters_of_kind_value_020() runs on GeneralComp { + f(); + setverdict(pass); + } + + control{ + execute(TC_Sem_05040101_parameters_of_kind_value_020()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/Sem_05040101_parameters_of_kind_value_021.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/Sem_05040101_parameters_of_kind_value_021.ttcn new file mode 100644 index 00000000..686ce1c2 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/Sem_05040101_parameters_of_kind_value_021.ttcn @@ -0,0 +1,29 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.1.1, verify that null can be used as default value of formal value parameters of default type + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Restriction g) +// Default values of default type formal parameters shall be the special value null. + +module Sem_05040101_parameters_of_kind_value_021 { + + type component GeneralComp { + } + + function f(default p_def := null) { + log(p_def); + } + + testcase TC_Sem_05040101_parameters_of_kind_value_021() runs on GeneralComp { + f(); + setverdict(pass); + } + + control{ + execute(TC_Sem_05040101_parameters_of_kind_value_021()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/Sem_05040101_parameters_of_kind_value_022.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/Sem_05040101_parameters_of_kind_value_022.ttcn new file mode 100644 index 00000000..25044a5b --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/Sem_05040101_parameters_of_kind_value_022.ttcn @@ -0,0 +1,43 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.1.1, verify that passing by value and by reference works correctly + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// No specific requirement, just (slightly modified) example 6 + +module Sem_05040101_parameters_of_kind_value_022 { + + type component GeneralComp { + } + + function f_byValue (in integer p_int1, in integer p_int2) { + p_int2 := p_int2 + 1; + log(p_int1); + log(p_int2); + } + + function f_byReference (inout integer p_int1, inout integer p_int2) { + p_int2 := p_int2 + 1; + log(p_int1); + log(p_int2); + } + + testcase TC_Sem_05040101_parameters_of_kind_value_022() runs on GeneralComp { + var integer v_int := 1; + f_byValue(v_int, v_int); // prints 1 and 2 + log(v_int); // prints 1 + if (v_int == 1) { setverdict(pass); } + else { setverdict(fail); } + f_byReference(v_int, v_int); // prints 2 and 2 + log(v_int); // prints 2 + if (v_int == 2) { setverdict(pass); } + else { setverdict(fail); } + } + + control{ + execute(TC_Sem_05040101_parameters_of_kind_value_022()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/Sem_05040101_parameters_of_kind_value_023.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/Sem_05040101_parameters_of_kind_value_023.ttcn new file mode 100644 index 00000000..04e5a4e2 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/Sem_05040101_parameters_of_kind_value_023.ttcn @@ -0,0 +1,28 @@ +/*************************************************** + ** @author STF 548 + ** @version 0.0.2 + ** @purpose 1:5.4.1.1, verify that the default value of value formal parameters can reference component variables + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// Background: +// Prior to the version TTCN-3:2017, the restriction 5.4.1.1.e didn't allow to refer to elements of the component type +// of the optional runs on clause in the default value expression. + +module Sem_05040101_parameters_of_kind_value_023 { + type component GeneralComp { + var integer vc_int := 0; + } + + function f(in integer p_int := vc_int) runs on GeneralComp { + } + + testcase TC_Sem_05040101_parameters_of_kind_value_023() runs on GeneralComp { + f(); + setverdict(pass); + } + + control{ + execute(TC_Sem_05040101_parameters_of_kind_value_023()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/Sem_05040101_parameters_of_kind_value_024.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/Sem_05040101_parameters_of_kind_value_024.ttcn new file mode 100644 index 00000000..8db1d35d --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/Sem_05040101_parameters_of_kind_value_024.ttcn @@ -0,0 +1,32 @@ +/*************************************************** + ** @author STF 548 + ** @version 0.0.2 + ** @purpose 1:5.4.1.1, verify that default value of value formal parameters can invoke functions with runs on clause + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// Background: +// Prior to the version TTCN-3:2017, the expression could not contain the invocation of functions with a runs on clause. + +module Sem_05040101_parameters_of_kind_value_024 { + type component GeneralComp { + var integer vc_int := 1; + } + + function fx() runs on GeneralComp return integer { + return vc_int + 1; + } + + function f(in integer p_int := fx()) runs on GeneralComp { + log(p_int); + } + + testcase TC_Sem_05040101_parameters_of_kind_value_024() runs on GeneralComp { + f(); + setverdict(pass); + } + + control{ + execute(TC_Sem_05040101_parameters_of_kind_value_024()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/Sem_05040101_parameters_of_kind_value_025.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/Sem_05040101_parameters_of_kind_value_025.ttcn new file mode 100644 index 00000000..33268cdb --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/Sem_05040101_parameters_of_kind_value_025.ttcn @@ -0,0 +1,37 @@ +/*************************************************** + ** @author STF 548 + ** @version 0.0.1 + ** @purpose 1:5.4.1.1, verify that default values are evaluated in the scope of the parameterized entity + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Restriction e +// The [default value] expression may be any expression that is well-defined at the beginning of the scope +// of the parameterized entity + +module Sem_05040101_parameters_of_kind_value_025 { + type component GeneralComp { + var integer vc_int := 1; + } + + function f(in integer p_int := vc_int) runs on GeneralComp { + log(p_int); + if (p_int == vc_int) { + setverdict(pass); + } else { + setverdict(fail); + } + } + + testcase TC_Sem_05040101_parameters_of_kind_value_025() runs on GeneralComp system GeneralComp{ + var GeneralComp v_ptc := GeneralComp.create; + vc_int := 100; + v_ptc.start(f()); // p_int defaults to 1 (vc_int of v_ptc) and not to 100 (vc_int of self) + v_ptc.done; + } + + control{ + execute(TC_Sem_05040101_parameters_of_kind_value_025()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/NegSem_05040102_parameters_of_kind_template_001.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/NegSem_05040102_parameters_of_kind_template_001.ttcn new file mode 100644 index 00000000..a2fee89b --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/NegSem_05040102_parameters_of_kind_template_001.ttcn @@ -0,0 +1,28 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.1.2, verify that in template formal parameters of template cannot used dash as default value + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Formal template parameters of modified templates may inherit their default templates from the +// corresponding parameters of their parent templates; this shall explicitly be denoted by using +// a dash (don't change) symbol at the place of the modified template parameter's default template. + +module NegSem_05040102_parameters_of_kind_template_001 { + + type component GeneralComp { + } + + type record R + { + integer field1, + integer field2 + } + + template R mw_t(template integer p_int1 := ?, in template integer p_int2 := -) := { + field1 := p_int1, + field2 := p_int2 + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/NegSem_05040102_parameters_of_kind_template_002.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/NegSem_05040102_parameters_of_kind_template_002.ttcn new file mode 100644 index 00000000..d0cdd132 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/NegSem_05040102_parameters_of_kind_template_002.ttcn @@ -0,0 +1,33 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.1.2, verify that modified template cannot used dash as default value when original template parameter had no default value + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Formal template parameters of modified templates may inherit their default templates from the +// corresponding parameters of their parent templates; this shall explicitly be denoted by using +// a dash (don't change) symbol at the place of the modified template parameter's default template. + +module NegSem_05040102_parameters_of_kind_template_002 { + + type component GeneralComp { + } + + type record R + { + integer field1, + integer field2 + } + + template R m_t(template integer p_int1, in template integer p_int2 := 4) := { + field1 := p_int1, + field2 := p_int2 + } + + template R m_tmod(template integer p_int1 := -, in template integer p_int2 := ?) modifies m_t := { + field1 := p_int1, + field2 := p_int2 + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/NegSem_05040102_parameters_of_kind_template_003.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/NegSem_05040102_parameters_of_kind_template_003.ttcn new file mode 100644 index 00000000..6ba85111 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/NegSem_05040102_parameters_of_kind_template_003.ttcn @@ -0,0 +1,41 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.1.2, verify that template definitions cannot contain out template formal parameters + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Restriction b) +// Formal template parameters of templates ... shall always be in parameters. + +module NegSem_05040101_parameters_of_kind_template_003 { + type component GeneralComp { + } + + type record R + { + integer field1, + integer field2 + } + + function f(out template integer p_int) return template integer { + p_int := ?; + return p_int; + } + + template R m_t(out template integer p_int) := { + field1 := 0, + field2 := f(p_int) + } + + testcase TC_NegSem_05040101_parameters_of_kind_template_003() runs on GeneralComp { + var template integer v_int; + log(m_t(v_int)); + setverdict(pass); + } + + control{ + execute(TC_NegSem_05040101_parameters_of_kind_template_003()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/NegSem_05040102_parameters_of_kind_template_004.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/NegSem_05040102_parameters_of_kind_template_004.ttcn new file mode 100644 index 00000000..8d55bf33 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/NegSem_05040102_parameters_of_kind_template_004.ttcn @@ -0,0 +1,41 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.1.2, verify that template definitions cannot contain inout template formal parameters + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Restriction b) +// Formal value parameters of templates ... shall always be in parameters. + +module NegSem_05040102_parameters_of_kind_template_004 { + type component GeneralComp { + } + + type record R + { + integer field1, + integer field2 + } + + function f(inout template integer p_int) return template integer { + p_int := ?; + return p_int; + } + + template R m_t(inout template integer p_int) := { + field1 := 0, + field2 := f(p_int) + } + + testcase TC_NegSem_05040102_parameters_of_kind_template_004() runs on GeneralComp { + var template integer v_int := 1; + log(m_t(v_int)); + setverdict(pass); + } + + control{ + execute(TC_NegSem_05040102_parameters_of_kind_template_004()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/NegSem_05040102_parameters_of_kind_template_005.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/NegSem_05040102_parameters_of_kind_template_005.ttcn new file mode 100644 index 00000000..934a2c70 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/NegSem_05040102_parameters_of_kind_template_005.ttcn @@ -0,0 +1,29 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.1.2, verify that out template formal parameters cannot have default values + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Restriction c) +// Default templates can be provided for in parameters only. + +module NegSem_05040102_parameters_of_kind_template_005 { + type component GeneralComp { + } + + function f(out template integer p_int := ?) { + } + + testcase TC_NegSem_05040102_parameters_of_kind_template_005() runs on GeneralComp { + var template integer v_int; + f(v_int); + log(v_int); + setverdict(pass); + } + + control{ + execute(TC_NegSem_05040102_parameters_of_kind_template_005()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/NegSem_05040102_parameters_of_kind_template_006.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/NegSem_05040102_parameters_of_kind_template_006.ttcn new file mode 100644 index 00000000..2a448c69 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/NegSem_05040102_parameters_of_kind_template_006.ttcn @@ -0,0 +1,29 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.1.2, verify that inout template formal parameters cannot have default values + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Restriction c) +// Default templates can be provided for in parameters only. + +module NegSem_05040102_parameters_of_kind_template_006 { + type component GeneralComp { + } + + function f(inout template integer p_int := ?) { + } + + testcase TC_NegSem_05040102_parameters_of_kind_template_006() runs on GeneralComp { + var template integer v_int := 0; + f(v_int); + log(v_int); + setverdict(pass); + } + + control{ + execute(TC_NegSem_05040102_parameters_of_kind_template_006()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/NegSem_05040102_parameters_of_kind_template_007.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/NegSem_05040102_parameters_of_kind_template_007.ttcn new file mode 100644 index 00000000..943edb6c --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/NegSem_05040102_parameters_of_kind_template_007.ttcn @@ -0,0 +1,27 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.1.2, verify that incompatible template instance in default template assignment of template formal parameters causes error + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Restriction d) +// The default template instance has to be compatible with the type of the parameter. + +module NegSem_05040102_parameters_of_kind_template_007 { + type component GeneralComp { + } + + function f(in template integer p_int := (-infinity..5.0)) { + } + + testcase TC_NegSem_05040102_parameters_of_kind_template_007() runs on GeneralComp { + f(); + setverdict(pass); + } + + control{ + execute(TC_NegSem_05040102_parameters_of_kind_template_007()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/NegSem_05040102_parameters_of_kind_template_009.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/NegSem_05040102_parameters_of_kind_template_009.ttcn new file mode 100644 index 00000000..5fcf2aa7 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/NegSem_05040102_parameters_of_kind_template_009.ttcn @@ -0,0 +1,27 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.1.2, verify that default template instance of template formal parameters cannot reference other parameters + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Restriction e) +// The template instance shall not refer to other parameters in the same parameter list. + +module NegSem_05040102_parameters_of_kind_template_009 { + type component GeneralComp { + } + + function f(in template integer p_int, in template integer p_int2 := p_int) runs on GeneralComp { + } + + testcase TC_NegSem_05040102_parameters_of_kind_template_009() runs on GeneralComp { + f(?); + setverdict(pass); + } + + control{ + execute(TC_NegSem_05040102_parameters_of_kind_template_009()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/NegSem_05040102_parameters_of_kind_template_011.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/NegSem_05040102_parameters_of_kind_template_011.ttcn new file mode 100644 index 00000000..2862771d --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/NegSem_05040102_parameters_of_kind_template_011.ttcn @@ -0,0 +1,29 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.1.2, verify that error is generated if formal template parameter of function contains dash + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Restriction g) +// The dash (don't change) symbol shall be used with formal parameters of modified templates only + +module NegSem_05040102_parameters_of_kind_template_011 { + + type component GeneralComp { + } + + function f (template integer p_int := -) { + log(p_int); + } + + testcase TC_NegSem_05040102_parameters_of_kind_template_011() runs on GeneralComp { + f(1); + setverdict(pass); + } + + control{ + execute(TC_NegSem_05040102_parameters_of_kind_template_011()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/NegSem_05040102_parameters_of_kind_template_012.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/NegSem_05040102_parameters_of_kind_template_012.ttcn new file mode 100644 index 00000000..032fd90f --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/NegSem_05040102_parameters_of_kind_template_012.ttcn @@ -0,0 +1,30 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.1.2, verify that error is generated if formal template parameter of altstep contains dash + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Restriction g) +// The dash (don't change) symbol shall be used with formal parameters of modified templates only + +module NegSem_05040102_parameters_of_kind_template_012 { + + type component GeneralComp { + } + + altstep a(template integer p_int := -) { + []any timer.timeout {} + [else] {} + } + + testcase TC_NegSem_05040102_parameters_of_kind_template_012() runs on GeneralComp { + a(1); + setverdict(pass); + } + + control{ + execute(TC_NegSem_05040102_parameters_of_kind_template_012()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/NegSem_05040102_parameters_of_kind_template_013.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/NegSem_05040102_parameters_of_kind_template_013.ttcn new file mode 100644 index 00000000..5f1484fd --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/NegSem_05040102_parameters_of_kind_template_013.ttcn @@ -0,0 +1,25 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.1.2, verify that error is generated if formal template parameter of test case contains dash + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Restriction g) +// The dash (don't change) symbol shall be used with formal parameters of modified templates only + +module NegSem_05040102_parameters_of_kind_template_013 { + + type component GeneralComp { + } + + testcase TC_NegSem_05040102_parameters_of_kind_template_013(omit integer p_int := -) runs on GeneralComp { + log(p_int); + setverdict(pass); + } + + control{ + execute(TC_NegSem_05040102_parameters_of_kind_template_013(1)); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/NegSem_05040102_parameters_of_kind_template_014.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/NegSem_05040102_parameters_of_kind_template_014.ttcn new file mode 100644 index 00000000..6fc64136 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/NegSem_05040102_parameters_of_kind_template_014.ttcn @@ -0,0 +1,30 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.1.2, verify that out formal template parameters cannot have lazy modifier + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Restriction h) +// Only in template parameters can be declared lazy or fuzzy. + +module NegSem_05040102_parameters_of_kind_template_014 { + + type component GeneralComp { + } + + function f(out template @lazy integer p_int) { + p_int := ?; + } + testcase TC_NegSem_05040102_parameters_of_kind_template_014() runs on GeneralComp { + var template integer v_int; + f(v_int); + log(v_int); + setverdict(pass); + } + + control{ + execute(TC_NegSem_05040102_parameters_of_kind_template_014()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/NegSem_05040102_parameters_of_kind_template_015.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/NegSem_05040102_parameters_of_kind_template_015.ttcn new file mode 100644 index 00000000..9bb1b2b6 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/NegSem_05040102_parameters_of_kind_template_015.ttcn @@ -0,0 +1,30 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.1.2, verify that out formal template parameters cannot have fuzzy modifier + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Restriction h) +// Only in template parameters can be declared lazy or fuzzy. + +module NegSem_05040102_parameters_of_kind_template_015 { + + type component GeneralComp { + } + + function f(out template @fuzzy integer p_int) { + p_int := ?; + } + testcase TC_NegSem_05040102_parameters_of_kind_template_015() runs on GeneralComp { + var template integer v_int; + f(v_int); + log(v_int); + setverdict(pass); + } + + control{ + execute(TC_NegSem_05040102_parameters_of_kind_template_015()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/NegSem_05040102_parameters_of_kind_template_016.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/NegSem_05040102_parameters_of_kind_template_016.ttcn new file mode 100644 index 00000000..3a215bfe --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/NegSem_05040102_parameters_of_kind_template_016.ttcn @@ -0,0 +1,30 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.1.2, verify that inout formal template parameters cannot have lazy modifier + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Restriction h) +// Only in template parameters can be declared lazy or fuzzy. + +module NegSem_05040102_parameters_of_kind_template_016 { + + type component GeneralComp { + } + + function f(inout template @lazy integer p_int) { + p_int := ?; + } + testcase TC_NegSem_05040102_parameters_of_kind_template_016() runs on GeneralComp { + var template integer v_int := 0; + f(v_int); + log(v_int); + setverdict(pass); + } + + control{ + execute(TC_NegSem_05040102_parameters_of_kind_template_016()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/NegSem_05040102_parameters_of_kind_template_017.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/NegSem_05040102_parameters_of_kind_template_017.ttcn new file mode 100644 index 00000000..c1d238c4 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/NegSem_05040102_parameters_of_kind_template_017.ttcn @@ -0,0 +1,30 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.1.2, verify that inout formal template parameters cannot have fuzzy modifier + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Restriction h) +// Only in template parameters can be declared lazy or fuzzy. + +module NegSem_05040102_parameters_of_kind_template_017 { + + type component GeneralComp { + } + + function f(inout template @fuzzy integer p_int) { + p_int := ?; + } + testcase TC_NegSem_05040102_parameters_of_kind_template_017() runs on GeneralComp { + var template integer v_int := 0; + f(v_int); + log(v_int); + setverdict(pass); + } + + control{ + execute(TC_NegSem_05040102_parameters_of_kind_template_017()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/NegSem_05040102_parameters_of_kind_template_018.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/NegSem_05040102_parameters_of_kind_template_018.ttcn new file mode 100644 index 00000000..292d03e4 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/NegSem_05040102_parameters_of_kind_template_018.ttcn @@ -0,0 +1,28 @@ +/***************************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:5.4.1.2, Verify that template parameter of an activated altstep cannot be an out parameter + ** @verdict pass reject + *****************************************************************/ + +module NegSem_05040102_parameters_of_kind_template_018 { + + altstep a_test(out template integer p_par) runs on C { + [] any timer.timeout { + p_par := ?; + } + } + + type component C { + } + + testcase TC_NegSem_05040102_parameters_of_kind_template_018() { + var integer v_int := ?; + activate(a_test(v_int)); + setverdict(pass); + } + + control { + execute(TC_NegSem_05040102_parameters_of_kind_template_018()); + } +} \ No newline at end of file diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/NegSem_05040102_parameters_of_kind_template_019.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/NegSem_05040102_parameters_of_kind_template_019.ttcn new file mode 100644 index 00000000..f95fb920 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/NegSem_05040102_parameters_of_kind_template_019.ttcn @@ -0,0 +1,28 @@ +/***************************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:5.4.1.2, Verify that template parameter of an activated altstep cannot be an inout parameter + ** @verdict pass reject + *****************************************************************/ + +module NegSem_05040102_parameters_of_kind_template_018 { + + altstep a_test(inout template integer p_par) runs on C { + [] any timer.timeout { + p_par := ?; + } + } + + type component C { + } + + testcase TC_NegSem_05040102_parameters_of_kind_template_018() { + var integer v_int := ?; + activate(a_test(v_int)); + setverdict(pass); + } + + control { + execute(TC_NegSem_05040102_parameters_of_kind_template_018()); + } +} \ No newline at end of file diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/NegSyn_05040102_parameters_of_kind_template_001.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/NegSyn_05040102_parameters_of_kind_template_001.ttcn new file mode 100644 index 00000000..14c646d0 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/NegSyn_05040102_parameters_of_kind_template_001.ttcn @@ -0,0 +1,14 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.1.2, verify that module parameter of template kind is not allowed + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Restriction a) +// Only function, testcase, altstep and template definitions may have formal template parameters. + +module NegSyn_05040102_parameters_of_kind_template_001 { + modulepar template integer PX_TEMPLATE_PAR; +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_001.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_001.ttcn new file mode 100644 index 00000000..900c429d --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_001.ttcn @@ -0,0 +1,86 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:5.4.1.2, Ensure that the IUT correctly handles parametrization through the use of parameterized templates. + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Sem_05040102_parameters_of_kind_template_001 { + +type enumerated MyEnumeratedType {e_black, e_white} +type integer address; + +type record MyRecord { + integer field1, + boolean field2, + address field3, + MyEnumeratedType field4, + integer field5 +} + +template MyRecord m_parametrizedTemplate + ( + integer p_integer := 0, + boolean p_boolean := true, + address p_address := null, + MyEnumeratedType p_enumerated := e_black, + template integer p_integerTemplate := ? + ) := { + field1 := p_integer, + field2 := p_boolean, + field3 := p_address, + field4 := p_enumerated, + field5 := p_integerTemplate +} + + + +type component GeneralComp { + +} + + +testcase TC_Sem_05040102_parameters_of_kind_template_001() runs on GeneralComp { + + var MyRecord DefaultValues := { + field1 := 0, + field2 := true, + field3 := null, + field4 := e_black, + field5 := 1 //any number can be used here to correspond with ? matching + } + + var MyRecord ModifiedValues := { + field1 := 1, + field2 := false, + field3 := 1, + field4 := e_white, + field5 := 1 + } + + var MyRecord PartlyModifiedValues := { + field1 := 0, + field2 := false, + field3 := null, + field4 := e_white, + field5 := 1 + } + + if ( + match(DefaultValues, m_parametrizedTemplate) and + match(ModifiedValues, m_parametrizedTemplate(1,false,1,e_white,1)) and + match(PartlyModifiedValues, m_parametrizedTemplate(-,false,-,e_white,-)) + ) { + setverdict(pass); + } + else { + setverdict(fail); + } + +} + + +control{ + execute(TC_Sem_05040102_parameters_of_kind_template_001()); +} + +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_002.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_002.ttcn new file mode 100644 index 00000000..7a6dafc1 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_002.ttcn @@ -0,0 +1,79 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:5.4.1.2, Ensure that the IUT correctly handles parametrization through the use of parameterized templates. + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Sem_05040102_parameters_of_kind_template_002 { + +type enumerated MyEnumeratedType {e_black, e_white} +type integer address; + +type record MyRecord { + integer field1, + boolean field2, + address field3, + MyEnumeratedType field4, + integer field5 +} + + +type component GeneralComp { + +} + + +testcase TC_Sem_05040102_parameters_of_kind_template_002 ( + MyRecord ExpectedMatch, + integer p_integer := 0, + boolean p_boolean := true, + address p_address := null, + MyEnumeratedType p_enumerated := e_black, + template integer p_integerTemplate := ? + ) runs on GeneralComp { + + var template MyRecord ReceivedRecord := {p_integer, p_boolean, p_address, p_enumerated, p_integerTemplate}; + + if (match(ExpectedMatch, ReceivedRecord)) { + setverdict(pass); + } + else { + setverdict(fail); + } + +} + + +control{ + + var MyRecord DefaultValues := { + field1 := 0, + field2 := true, + field3 := null, + field4 := e_black, + field5 := 1 //any number can be used here to correspond with ? matching + } + + var MyRecord ModifiedValues := { + field1 := 1, + field2 := false, + field3 := 1, + field4 := e_white, + field5 := 1 + } + + var MyRecord PartlyModifiedValues := { + field1 := 0, + field2 := false, + field3 := null, + field4 := e_white, + field5 := 1 + } + + execute(TC_Sem_05040102_parameters_of_kind_template_002(DefaultValues)); + execute(TC_Sem_05040102_parameters_of_kind_template_002(DefaultValues,-,-,-,-,-)); + execute(TC_Sem_05040102_parameters_of_kind_template_002(ModifiedValues,1,false,1,e_white,1)); + execute(TC_Sem_05040102_parameters_of_kind_template_002(PartlyModifiedValues,-,false,-,e_white,-)); +} + +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_003.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_003.ttcn new file mode 100644 index 00000000..009a4ae0 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_003.ttcn @@ -0,0 +1,42 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.1.2, verify that template definition can contain in template formal parameters + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Templates parameters can be defined for templates, functions, altsteps, and test cases. +// To enable a parameterized object to accept templates or matching symbols as actual parameters, +// the extra keyword template shall be added before the type field of the corresponding formal +// parameter. This makes the parameter a template parameter and in effect extends the allowed actual +// parameters for the associated type to include the appropriate set of matching attributes (see +// annex B) as well as the normal set of values. +// Formal template parameters may be in, inout or out parameters. The default for formal template +// parameters is in parameterization. + +module Sem_05040102_parameters_of_kind_template_003 { + + type component GeneralComp { + } + + type record R + { + integer field1, + integer field2 + } + + template R mw_t(template integer p_int1, in template integer p_int2) := { + field1 := p_int1, + field2 := p_int2 + } + + testcase TC_Sem_05040102_parameters_of_kind_template_003() runs on GeneralComp { + log(mw_t(3, ?)); + setverdict(pass); + } + + control{ + execute(TC_Sem_05040102_parameters_of_kind_template_003()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_004.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_004.ttcn new file mode 100644 index 00000000..1f84c386 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_004.ttcn @@ -0,0 +1,41 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.1.2, verify that local template definition can contain in template formal parameters + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Templates parameters can be defined for templates, functions, altsteps, and test cases. +// To enable a parameterized object to accept templates or matching symbols as actual parameters, +// the extra keyword template shall be added before the type field of the corresponding formal +// parameter. This makes the parameter a template parameter and in effect extends the allowed actual +// parameters for the associated type to include the appropriate set of matching attributes (see +// annex B) as well as the normal set of values. +// Formal template parameters may be in, inout or out parameters. The default for formal template +// parameters is in parameterization. + +module Sem_05040102_parameters_of_kind_template_004 { + + type component GeneralComp { + } + + type record R + { + integer field1, + integer field2 + } + + testcase TC_Sem_05040102_parameters_of_kind_template_004() runs on GeneralComp { + template R m_t(template integer p_int1, in template integer p_int2) := { + field1 := p_int1, + field2 := p_int2 + } + log(m_t(3, ?)); + setverdict(pass); + } + + control{ + execute(TC_Sem_05040102_parameters_of_kind_template_004()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_005.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_005.ttcn new file mode 100644 index 00000000..314d7e4f --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_005.ttcn @@ -0,0 +1,35 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.1.2, verify that function definition can contain in, out and inout template formal parameters + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Templates parameters can be defined for templates, functions, altsteps, and test cases. +// To enable a parameterized object to accept templates or matching symbols as actual parameters, +// the extra keyword template shall be added before the type field of the corresponding formal +// parameter. This makes the parameter a template parameter and in effect extends the allowed actual +// parameters for the associated type to include the appropriate set of matching attributes (see +// annex B) as well as the normal set of values. +// Formal template parameters may be in, inout or out parameters. The default for formal template +// parameters is in parameterization. + +module Sem_05040102_parameters_of_kind_template_005 { + + type component GeneralComp { + } + + function f(template integer p_int1, in template integer p_int2, out template integer p_int3, inout template integer p_int4){ + setverdict(pass); + } + + testcase TC_Sem_05040102_parameters_of_kind_template_005() runs on GeneralComp { + var template integer v_int1, v_int2 := ?; + f((1..3), 2, v_int1, v_int2); + } + + control{ + execute(TC_Sem_05040102_parameters_of_kind_template_005()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_006.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_006.ttcn new file mode 100644 index 00000000..3b4d279a --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_006.ttcn @@ -0,0 +1,36 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.1.2, verify that altstep definition can contain in, out and inout template formal parameters + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Templates parameters can be defined for templates, functions, altsteps, and test cases. +// To enable a parameterized object to accept templates or matching symbols as actual parameters, +// the extra keyword template shall be added before the type field of the corresponding formal +// parameter. This makes the parameter a template parameter and in effect extends the allowed actual +// parameters for the associated type to include the appropriate set of matching attributes (see +// annex B) as well as the normal set of values. +// Formal template parameters may be in, inout or out parameters. The default for formal template +// parameters is in parameterization. + +module Sem_05040102_parameters_of_kind_template_006 { + + type component GeneralComp { + } + + altstep a(template integer p_int1, in template integer p_int2, out template integer p_int3, inout template integer p_int4) { + [] any timer.timeout { setverdict(fail); } + [else] { setverdict(pass); } + } + + testcase TC_Sem_05040102_parameters_of_kind_template_006() runs on GeneralComp { + var template integer v_int1, v_int2 := ?; + a((1..3), 2, v_int1, v_int2); + } + + control{ + execute(TC_Sem_05040102_parameters_of_kind_template_006()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_007.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_007.ttcn new file mode 100644 index 00000000..9d62352f --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_007.ttcn @@ -0,0 +1,32 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.1.2, verify that test case definition can contain in, out and inout template formal parameters + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Templates parameters can be defined for templates, functions, altsteps, and test cases. +// To enable a parameterized object to accept templates or matching symbols as actual parameters, +// the extra keyword template shall be added before the type field of the corresponding formal +// parameter. This makes the parameter a template parameter and in effect extends the allowed actual +// parameters for the associated type to include the appropriate set of matching attributes (see +// annex B) as well as the normal set of values. +// Formal template parameters may be in, inout or out parameters. The default for formal template +// parameters is in parameterization. + +module Sem_05040102_parameters_of_kind_template_007 { + + type component GeneralComp { + } + + testcase TC_Sem_05040102_parameters_of_kind_template_007( + template integer p_int1, in template integer p_int2, out template integer p_int3, inout template integer p_int4) runs on GeneralComp { + setverdict(pass); + } + + control { + var template integer v_int1, v_int2 := ?; + execute(TC_Sem_05040102_parameters_of_kind_template_007((1..3), 2, v_int1, v_int2)); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_008.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_008.ttcn new file mode 100644 index 00000000..594f15ce --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_008.ttcn @@ -0,0 +1,33 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.1.2, verify that template formal parameters can be used in the same way as templates or template variables + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Formal template parameters can be used within the parameterized object the same way as +// templates and template variables. + +module Sem_05040102_parameters_of_kind_template_008 { + + type component GeneralComp { + } + + function f(template integer p_int1, in template integer p_int2) { + p_int1 := ?; // modification + if (match(1, p_int2)) { + setverdict(pass); + } else { + setverdict(fail); + } + } + + testcase TC_Sem_05040102_parameters_of_kind_template_008() runs on GeneralComp { + f(*, (0..5)); + } + + control{ + execute(TC_Sem_05040102_parameters_of_kind_template_008()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_009.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_009.ttcn new file mode 100644 index 00000000..4152f7eb --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_009.ttcn @@ -0,0 +1,27 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.1.2, verify that in template formal parameters of template can have default values + ** @verdict pass accept, noexecution + ***************************************************/ + +// The following requirement is tested: +// In parameters may have a default template, which is given by a template instance +// assigned to the parameter. + +module Sem_05040102_parameters_of_kind_template_009 { + + type component GeneralComp { + } + + type record R + { + integer field1, + integer field2 + } + + template R mw_t(template integer p_int1 := ?, in template integer p_int2 := (0..5)) := { + field1 := p_int1, + field2 := p_int2 + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_010.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_010.ttcn new file mode 100644 index 00000000..a1bc23b6 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_010.ttcn @@ -0,0 +1,29 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.1.2, verify that in template formal parameters of local template can have default values + ** @verdict pass accept, noexecution + ***************************************************/ + +// The following requirement is tested: +// In parameters may have a default template, which is given by a template instance +// assigned to the parameter. + +module Sem_05040102_parameters_of_kind_template_010 { + + type component GeneralComp { + } + + type record R + { + integer field1, + integer field2 + } + + function f() { + template R m_t(template integer p_int1 := ?, in template integer p_int2 := (0..5)) := { + field1 := p_int1, + field2 := p_int2 + } + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_011.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_011.ttcn new file mode 100644 index 00000000..432e9e6e --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_011.ttcn @@ -0,0 +1,25 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.1.2, verify that in template formal parameters of function can have default values + ** @verdict pass accept, noexecution + ***************************************************/ + +// The following requirement is tested: +// In parameters may have a default template, which is given by a template instance +// assigned to the parameter. + +module Sem_05040102_parameters_of_kind_template_011 { + + type component GeneralComp { + } + + type record R + { + integer field1, + integer field2 + } + + function f(template integer p_int1 := ?, in template integer p_int2 := (0..5)) { + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_012.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_012.ttcn new file mode 100644 index 00000000..9bf52dd1 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_012.ttcn @@ -0,0 +1,26 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.1.2, verify that in template formal parameters of altstep can have default values + ** @verdict pass accept, noexecution + ***************************************************/ + +// The following requirement is tested: +// In parameters may have a default template, which is given by a template instance +// assigned to the parameter. + +module Sem_05040102_parameters_of_kind_template_012 { + + type component GeneralComp { + } + + type record R + { + integer field1, + integer field2 + } + + altstep a(template integer p_int1 := ?, in template integer p_int2 := (0..5)) { + [] any timer.timeout {} + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_013.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_013.ttcn new file mode 100644 index 00000000..210d6674 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_013.ttcn @@ -0,0 +1,25 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.1.2, verify that in template formal parameters of test case can have default values + ** @verdict pass accept, noexecution + ***************************************************/ + +// The following requirement is tested: +// In parameters may have a default template, which is given by a template instance +// assigned to the parameter. + +module Sem_05040102_parameters_of_kind_template_013 { + + type component GeneralComp { + } + + type record R + { + integer field1, + integer field2 + } + + testcase TC(template integer p_int1 := ?, in template integer p_int2 := (0..5)) runs on GeneralComp { + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_014.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_014.ttcn new file mode 100644 index 00000000..458ed45b --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_014.ttcn @@ -0,0 +1,33 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.1.2, verify that in template formal parameters of modified template can used dash as default value + ** @verdict pass accept, noexecution + ***************************************************/ + +// The following requirement is tested: +// Formal template parameters of modified templates may inherit their default templates from the +// corresponding parameters of their parent templates; this shall explicitly be denoted by using +// a dash (don't change) symbol at the place of the modified template parameter's default template. + +module Sem_05040102_parameters_of_kind_template_014 { + + type component GeneralComp { + } + + type record R + { + integer field1, + integer field2 + } + + template R mw_t(template integer p_int1 := ?, in template integer p_int2 := (0..5)) := { + field1 := p_int1, + field2 := p_int2 + } + + template R mw_tmod(template integer p_int1 := 10, in template integer p_int2 := -) modifies mw_t := { + field1 := p_int1, + field2 := p_int2 + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_015.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_015.ttcn new file mode 100644 index 00000000..19d93d03 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_015.ttcn @@ -0,0 +1,37 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.1.2, verify that template definition can contain in template formal parameters with omit restriction + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Formal template parameters can be restricted to accept actual parameters containing a restricted +// set of matching mechanisms only. Such limitations can be expressed by the restrictions omit, +// present, and value. + +module Sem_05040102_parameters_of_kind_template_015 { + + type component GeneralComp { + } + + type record R + { + integer field1, + integer field2 optional + } + + template R mw_t(template(omit) integer p_int1, in template(omit) integer p_int2) := { + field1 := p_int1, + field2 := p_int2 + } + + testcase TC_Sem_05040102_parameters_of_kind_template_015() runs on GeneralComp { + log(mw_t(3, omit)); + setverdict(pass); + } + + control{ + execute(TC_Sem_05040102_parameters_of_kind_template_015()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_016.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_016.ttcn new file mode 100644 index 00000000..2d3a1a53 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_016.ttcn @@ -0,0 +1,36 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.1.2, verify that local template definition can contain in template formal parameters with omit restriction + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Formal template parameters can be restricted to accept actual parameters containing a restricted +// set of matching mechanisms only. Such limitations can be expressed by the restrictions omit, +// present, and value. + +module Sem_05040102_parameters_of_kind_template_016 { + + type component GeneralComp { + } + + type record R + { + integer field1, + integer field2 optional + } + + testcase TC_Sem_05040102_parameters_of_kind_template_016() runs on GeneralComp { + template R m_t(template(omit) integer p_int1, in template(omit) integer p_int2) := { + field1 := p_int1, + field2 := p_int2 + } + log(m_t(3, omit)); + setverdict(pass); + } + + control{ + execute(TC_Sem_05040102_parameters_of_kind_template_016()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_017.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_017.ttcn new file mode 100644 index 00000000..914cb1fb --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_017.ttcn @@ -0,0 +1,31 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.1.2, verify that function definition can contain in, out and inout template formal parameters with omit restriction + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Formal template parameters can be restricted to accept actual parameters containing a restricted +// set of matching mechanisms only. Such limitations can be expressed by the restrictions omit, +// present, and value. + +module Sem_05040102_parameters_of_kind_template_017 { + + type component GeneralComp { + } + + function f(template(omit) integer p_int1, in template(omit) integer p_int2, + out template(omit) integer p_int3, inout template(omit) integer p_int4){ + setverdict(pass); + } + + testcase TC_Sem_05040102_parameters_of_kind_template_017() runs on GeneralComp { + var template(omit) integer v_int1, v_int2 := 20; + f(omit, 2, v_int1, v_int2); + } + + control{ + execute(TC_Sem_05040102_parameters_of_kind_template_017()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_018.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_018.ttcn new file mode 100644 index 00000000..a8aa0a31 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_018.ttcn @@ -0,0 +1,32 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.1.2, verify that altstep definition can contain in, out and inout template formal parameters with omit restriction + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Formal template parameters can be restricted to accept actual parameters containing a restricted +// set of matching mechanisms only. Such limitations can be expressed by the restrictions omit, +// present, and value. + +module Sem_05040102_parameters_of_kind_template_018 { + + type component GeneralComp { + } + + altstep a(template(omit) integer p_int1, in template(omit) integer p_int2, + out template(omit) integer p_int3, inout template(omit) integer p_int4) { + [] any timer.timeout { setverdict(fail); } + [else] { setverdict(pass); } + } + + testcase TC_Sem_05040102_parameters_of_kind_template_018() runs on GeneralComp { + var template(omit) integer v_int1, v_int2 := omit; + a(0, 2, v_int1, v_int2); + } + + control{ + execute(TC_Sem_05040102_parameters_of_kind_template_018()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_019.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_019.ttcn new file mode 100644 index 00000000..7e62040f --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_019.ttcn @@ -0,0 +1,28 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.1.2, verify that test case definition can contain in, out and inout template formal parameters with omit restriction + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Formal template parameters can be restricted to accept actual parameters containing a restricted +// set of matching mechanisms only. Such limitations can be expressed by the restrictions omit, +// present, and value. + +module Sem_05040102_parameters_of_kind_template_019 { + + type component GeneralComp { + } + + testcase TC_Sem_05040102_parameters_of_kind_template_019( + template(omit) integer p_int1, in template(omit) integer p_int2, + out template(omit) integer p_int3, inout template(omit) integer p_int4) runs on GeneralComp { + setverdict(pass); + } + + control { + var template(omit) integer v_int1, v_int2 := 20; + execute(TC_Sem_05040102_parameters_of_kind_template_019(omit, 2, v_int1, v_int2)); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_020.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_020.ttcn new file mode 100644 index 00000000..cdaa21e3 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_020.ttcn @@ -0,0 +1,37 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.1.2, verify that template definition can contain in template formal parameters with present restriction + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Formal template parameters can be restricted to accept actual parameters containing a restricted +// set of matching mechanisms only. Such limitations can be expressed by the restrictions omit, +// present, and value. + +module Sem_05040102_parameters_of_kind_template_020 { + + type component GeneralComp { + } + + type record R + { + integer field1, + integer field2 optional + } + + template R mw_t(template(present) integer p_int1, in template(present) integer p_int2) := { + field1 := p_int1, + field2 := p_int2 + } + + testcase TC_Sem_05040102_parameters_of_kind_template_020() runs on GeneralComp { + log(mw_t(3, (0..5))); + setverdict(pass); + } + + control{ + execute(TC_Sem_05040102_parameters_of_kind_template_020()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_021.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_021.ttcn new file mode 100644 index 00000000..7aa209cd --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_021.ttcn @@ -0,0 +1,36 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.1.2, verify that local template definition can contain in template formal parameters with present restriction + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Formal template parameters can be restricted to accept actual parameters containing a restricted +// set of matching mechanisms only. Such limitations can be expressed by the restrictions omit, +// present, and value. + +module Sem_05040102_parameters_of_kind_template_021 { + + type component GeneralComp { + } + + type record R + { + integer field1, + integer field2 optional + } + + testcase TC_Sem_05040102_parameters_of_kind_template_021() runs on GeneralComp { + template R m_t(template(present) integer p_int1, in template(present) integer p_int2) := { + field1 := p_int1, + field2 := p_int2 + } + log(m_t(3, (0..5))); + setverdict(pass); + } + + control{ + execute(TC_Sem_05040102_parameters_of_kind_template_021()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_022.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_022.ttcn new file mode 100644 index 00000000..443f7620 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_022.ttcn @@ -0,0 +1,31 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.1.2, verify that function definition can contain in, out and inout template formal parameters with present restriction + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Formal template parameters can be restricted to accept actual parameters containing a restricted +// set of matching mechanisms only. Such limitations can be expressed by the restrictions omit, +// present, and value. + +module Sem_05040102_parameters_of_kind_template_022 { + + type component GeneralComp { + } + + function f(template(present) integer p_int1, in template(present) integer p_int2, + out template(present) integer p_int3, inout template(present) integer p_int4){ + setverdict(pass); + } + + testcase TC_Sem_05040102_parameters_of_kind_template_022() runs on GeneralComp { + var template(present) integer v_int1, v_int2 := 20; + f((0..5), 2, v_int1, v_int2); + } + + control{ + execute(TC_Sem_05040102_parameters_of_kind_template_022()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_023.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_023.ttcn new file mode 100644 index 00000000..9b148b09 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_023.ttcn @@ -0,0 +1,32 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.1.2, verify that altstep definition can contain in, out and inout template formal parameters with present restriction + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Formal template parameters can be restricted to accept actual parameters containing a restricted +// set of matching mechanisms only. Such limitations can be expressed by the restrictions omit, +// present, and value. + +module Sem_05040102_parameters_of_kind_template_023 { + + type component GeneralComp { + } + + altstep a(template(present) integer p_int1, in template(present) integer p_int2, + out template(present) integer p_int3, inout template(present) integer p_int4) { + [] any timer.timeout { setverdict(fail); } + [else] { setverdict(pass); } + } + + testcase TC_Sem_05040102_parameters_of_kind_template_023() runs on GeneralComp { + var template(present) integer v_int1, v_int2 := (0..5); + a(0, 2, v_int1, v_int2); + } + + control{ + execute(TC_Sem_05040102_parameters_of_kind_template_023()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_024.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_024.ttcn new file mode 100644 index 00000000..b2a612ac --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_024.ttcn @@ -0,0 +1,28 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.1.2, verify that test case definition can contain in, out and inout template formal parameters with present restriction + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Formal template parameters can be restricted to accept actual parameters containing a restricted +// set of matching mechanisms only. Such limitations can be expressed by the restrictions omit, +// present, and value. + +module Sem_05040102_parameters_of_kind_template_024 { + + type component GeneralComp { + } + + testcase TC_Sem_05040102_parameters_of_kind_template_024( + template(present) integer p_int1, in template(present) integer p_int2, + out template(present) integer p_int3, inout template(present) integer p_int4) runs on GeneralComp { + setverdict(pass); + } + + control { + var template(present) integer v_int1, v_int2 := 20; + execute(TC_Sem_05040102_parameters_of_kind_template_024((0..5), 2, v_int1, v_int2)); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_025.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_025.ttcn new file mode 100644 index 00000000..d1d096fb --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_025.ttcn @@ -0,0 +1,37 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.1.2, verify that template definition can contain in template formal parameters with value restriction + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Formal template parameters can be restricted to accept actual parameters containing a restricted +// set of matching mechanisms only. Such limitations can be expressed by the restrictions omit, +// present, and value. + +module Sem_05040102_parameters_of_kind_template_025 { + + type component GeneralComp { + } + + type record R + { + integer field1, + integer field2 optional + } + + template R mw_t(template(value) integer p_int1, in template(value) integer p_int2) := { + field1 := p_int1, + field2 := p_int2 + } + + testcase TC_Sem_05040102_parameters_of_kind_template_025() runs on GeneralComp { + log(mw_t(3, 4)); + setverdict(pass); + } + + control{ + execute(TC_Sem_05040102_parameters_of_kind_template_025()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_026.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_026.ttcn new file mode 100644 index 00000000..5646bc1f --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_026.ttcn @@ -0,0 +1,36 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.1.2, verify that local template definition can contain in template formal parameters with value restriction + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Formal template parameters can be restricted to accept actual parameters containing a restricted +// set of matching mechanisms only. Such limitations can be expressed by the restrictions omit, +// present, and value. + +module Sem_05040102_parameters_of_kind_template_026 { + + type component GeneralComp { + } + + type record R + { + integer field1, + integer field2 optional + } + + testcase TC_Sem_05040102_parameters_of_kind_template_026() runs on GeneralComp { + template R m_t(template(value) integer p_int1, in template(value) integer p_int2) := { + field1 := p_int1, + field2 := p_int2 + } + log(m_t(3, 4)); + setverdict(pass); + } + + control{ + execute(TC_Sem_05040102_parameters_of_kind_template_026()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_027.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_027.ttcn new file mode 100644 index 00000000..7053ccf9 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_027.ttcn @@ -0,0 +1,31 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.1.2, verify that function definition can contain in, out and inout template formal parameters with value restriction + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Formal template parameters can be restricted to accept actual parameters containing a restricted +// set of matching mechanisms only. Such limitations can be expressed by the restrictions omit, +// present, and value. + +module Sem_05040102_parameters_of_kind_template_027 { + + type component GeneralComp { + } + + function f(template(value) integer p_int1, in template(value) integer p_int2, + out template(value) integer p_int3, inout template(value) integer p_int4){ + setverdict(pass); + } + + testcase TC_Sem_05040102_parameters_of_kind_template_027() runs on GeneralComp { + var template(value) integer v_int1, v_int2 := 20; + f(0, 2, v_int1, v_int2); + } + + control{ + execute(TC_Sem_05040102_parameters_of_kind_template_027()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_028.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_028.ttcn new file mode 100644 index 00000000..47870e76 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_028.ttcn @@ -0,0 +1,32 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.1.2, verify that altstep definition can contain in, out and inout template formal parameters with value restriction + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Formal template parameters can be restricted to accept actual parameters containing a restricted +// set of matching mechanisms only. Such limitations can be expressed by the restrictions omit, +// present, and value. + +module Sem_05040102_parameters_of_kind_template_028 { + + type component GeneralComp { + } + + altstep a(template(value) integer p_int1, in template(value) integer p_int2, + out template(value) integer p_int3, inout template(value) integer p_int4) { + [] any timer.timeout { setverdict(fail); } + [else] { setverdict(pass); } + } + + testcase TC_Sem_05040102_parameters_of_kind_template_028() runs on GeneralComp { + var template(value) integer v_int1, v_int2 := 20; + a(0, 2, v_int1, v_int2); + } + + control{ + execute(TC_Sem_05040102_parameters_of_kind_template_028()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_029.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_029.ttcn new file mode 100644 index 00000000..32846c2e --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_029.ttcn @@ -0,0 +1,28 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.1.2, verify that test case definition can contain in, out and inout template formal parameters with value restriction + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Formal template parameters can be restricted to accept actual parameters containing a restricted +// set of matching mechanisms only. Such limitations can be expressed by the restrictions omit, +// present, and value. + +module Sem_05040102_parameters_of_kind_template_029 { + + type component GeneralComp { + } + + testcase TC_Sem_05040102_parameters_of_kind_template_029( + template(value) integer p_int1, in template(value) integer p_int2, + out template(value) integer p_int3, inout template(value) integer p_int4) runs on GeneralComp { + setverdict(pass); + } + + control { + var template(value) integer v_int1, v_int2 := 20; + execute(TC_Sem_05040102_parameters_of_kind_template_029(0, 2, v_int1, v_int2)); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_030.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_030.ttcn new file mode 100644 index 00000000..eff5951d --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_030.ttcn @@ -0,0 +1,37 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.1.2, verify that template definition can contain in template formal parameters with short omit restriction + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Formal template parameters can be restricted to accept actual parameters containing a restricted +// set of matching mechanisms only. Such limitations can be expressed by the restrictions omit, +// present, and value. The restriction template (omit) can be replaced by the shorthand notation omit. + +module Sem_05040102_parameters_of_kind_template_030 { + + type component GeneralComp { + } + + type record R + { + integer field1, + integer field2 optional + } + + template R mw_t(omit integer p_int1, in omit integer p_int2) := { + field1 := p_int1, + field2 := p_int2 + } + + testcase TC_Sem_05040102_parameters_of_kind_template_030() runs on GeneralComp { + log(mw_t(3, omit)); + setverdict(pass); + } + + control{ + execute(TC_Sem_05040102_parameters_of_kind_template_030()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_031.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_031.ttcn new file mode 100644 index 00000000..a9d1874b --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_031.ttcn @@ -0,0 +1,36 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.1.2, verify that local template definition can contain in template formal parameters with short omit restriction + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Formal template parameters can be restricted to accept actual parameters containing a restricted +// set of matching mechanisms only. Such limitations can be expressed by the restrictions omit, +// present, and value. The restriction template (omit) can be replaced by the shorthand notation omit. + +module Sem_05040102_parameters_of_kind_template_031 { + + type component GeneralComp { + } + + type record R + { + integer field1, + integer field2 optional + } + + testcase TC_Sem_05040102_parameters_of_kind_template_031() runs on GeneralComp { + template R m_t(omit integer p_int1, in omit integer p_int2) := { + field1 := p_int1, + field2 := p_int2 + } + log(m_t(3, omit)); + setverdict(pass); + } + + control{ + execute(TC_Sem_05040102_parameters_of_kind_template_031()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_032.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_032.ttcn new file mode 100644 index 00000000..8cefe5a6 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_032.ttcn @@ -0,0 +1,31 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.1.2, verify that function definition can contain in, out and inout template formal parameters with short omit restriction + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Formal template parameters can be restricted to accept actual parameters containing a restricted +// set of matching mechanisms only. Such limitations can be expressed by the restrictions omit, +// present, and value. The restriction template (omit) can be replaced by the shorthand notation omit. + +module Sem_05040102_parameters_of_kind_template_032 { + + type component GeneralComp { + } + + function f(omit integer p_int1, in omit integer p_int2, + out omit integer p_int3, inout omit integer p_int4){ + setverdict(pass); + } + + testcase TC_Sem_05040102_parameters_of_kind_template_032() runs on GeneralComp { + var omit integer v_int1, v_int2 := 20; + f(omit, 2, v_int1, v_int2); + } + + control{ + execute(TC_Sem_05040102_parameters_of_kind_template_032()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_033.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_033.ttcn new file mode 100644 index 00000000..97772bbe --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_033.ttcn @@ -0,0 +1,32 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.1.2, verify that altstep definition can contain in, out and inout template formal parameters with short omit restriction + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Formal template parameters can be restricted to accept actual parameters containing a restricted +// set of matching mechanisms only. Such limitations can be expressed by the restrictions omit, +// present, and value. The restriction template (omit) can be replaced by the shorthand notation omit. + +module Sem_05040102_parameters_of_kind_template_033 { + + type component GeneralComp { + } + + altstep a(omit integer p_int1, in omit integer p_int2, + out omit integer p_int3, inout omit integer p_int4) { + [] any timer.timeout { setverdict(fail); } + [else] { setverdict(pass); } + } + + testcase TC_Sem_05040102_parameters_of_kind_template_033() runs on GeneralComp { + var omit integer v_int1, v_int2 := omit; + a(0, 2, v_int1, v_int2); + } + + control{ + execute(TC_Sem_05040102_parameters_of_kind_template_033()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_034.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_034.ttcn new file mode 100644 index 00000000..73279e32 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_034.ttcn @@ -0,0 +1,28 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.1.2, verify that test case definition can contain in, out and inout template formal parameters with short omit restriction + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Formal template parameters can be restricted to accept actual parameters containing a restricted +// set of matching mechanisms only. Such limitations can be expressed by the restrictions omit, +// present, and value. The restriction template (omit) can be replaced by the shorthand notation omit. + +module Sem_05040102_parameters_of_kind_template_034 { + + type component GeneralComp { + } + + testcase TC_Sem_05040102_parameters_of_kind_template_034( + omit integer p_int1, in omit integer p_int2, + out omit integer p_int3, inout omit integer p_int4) runs on GeneralComp { + setverdict(pass); + } + + control { + var omit integer v_int1, v_int2 := 20; + execute(TC_Sem_05040102_parameters_of_kind_template_034(omit, 2, v_int1, v_int2)); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_035.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_035.ttcn new file mode 100644 index 00000000..5aa18e7a --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_035.ttcn @@ -0,0 +1,30 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.1.2, verify that null is suitable default value of formal template parameters of component type + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Restriction e) +// Default templates of component type formal parameters shall be built from the special values +// null, mtc, self, or system. + +module Sem_05040102_parameters_of_kind_template_035 { + + type component GeneralComp { + } + + function f(template GeneralComp p_comp := null) { + log(p_comp); + } + + testcase TC_Sem_05040102_parameters_of_kind_template_035() runs on GeneralComp { + f(); + setverdict(pass); + } + + control{ + execute(TC_Sem_05040102_parameters_of_kind_template_035()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_036.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_036.ttcn new file mode 100644 index 00000000..ff604f0c --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_036.ttcn @@ -0,0 +1,30 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.1.2, verify that self is suitable default value of formal template parameters of component type + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Restriction e) +// Default templates of component type formal parameters shall be built from the special values +// null, mtc, self, or system. + +module Sem_05040102_parameters_of_kind_template_036 { + + type component GeneralComp { + } + + function f(template GeneralComp p_comp := self) { + log(p_comp); + } + + testcase TC_Sem_05040102_parameters_of_kind_template_036() runs on GeneralComp { + f(); + setverdict(pass); + } + + control{ + execute(TC_Sem_05040102_parameters_of_kind_template_036()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_037.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_037.ttcn new file mode 100644 index 00000000..02ab2645 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_037.ttcn @@ -0,0 +1,30 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.1.2, verify that mtc is suitable default value of formal template parameters of component type + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Restriction e) +// Default templates of component type formal parameters shall be built from the special values +// null, mtc, self, or system. + +module Sem_05040102_parameters_of_kind_template_037 { + + type component GeneralComp { + } + + function f(template GeneralComp p_comp := mtc) { + log(p_comp); + } + + testcase TC_Sem_05040102_parameters_of_kind_template_037() runs on GeneralComp { + f(); + setverdict(pass); + } + + control{ + execute(TC_Sem_05040102_parameters_of_kind_template_037()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_038.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_038.ttcn new file mode 100644 index 00000000..3b51c122 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_038.ttcn @@ -0,0 +1,30 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.1.2, verify that system is suitable default value of formal template parameters of component type + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Restriction e) +// Default templates of component type formal parameters shall be built from the special values +// null, mtc, self, or system. + +module Sem_05040102_parameters_of_kind_template_038 { + + type component GeneralComp { + } + + function f(template GeneralComp p_comp := system) { + log(p_comp); + } + + testcase TC_Sem_05040102_parameters_of_kind_template_038() runs on GeneralComp { + f(); + setverdict(pass); + } + + control{ + execute(TC_Sem_05040102_parameters_of_kind_template_038()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_039.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_039.ttcn new file mode 100644 index 00000000..4112bfd1 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_039.ttcn @@ -0,0 +1,27 @@ +/*************************************************** + ** @author STF 548 + ** @version 0.0.2 + ** @purpose 1:5.4.1.2, verify that default template instance of template formal parameters can reference component elements + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// Background: +// Prior to the version TTCN-3:2017, the template instance could not refer to elements of the component type referenced in the runs on clause. + +module Sem_05040102_parameters_of_kind_template_039 { + type component GeneralComp { + var template integer vc_int := ?; + } + + function f(in template integer p_int := vc_int) runs on GeneralComp { + } + + testcase TC_Sem_05040102_parameters_of_kind_template_039() runs on GeneralComp { + f(); + setverdict(pass); + } + + control{ + execute(TC_Sem_05040102_parameters_of_kind_template_039()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_040.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_040.ttcn new file mode 100644 index 00000000..0ce916f7 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_040.ttcn @@ -0,0 +1,32 @@ +/*************************************************** + ** @author STF 548 + ** @version 0.0.2 + ** @purpose 1:5.4.1.2, verify that default template instance of template formal parameters can invoke functions with runs on clause + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// Background: +// Prior to the version TTCN-3:2017, the template instance could not contain invocation of functions with a runs on clause. + +module Sem_05040101_parameters_of_kind_value_040 { + type component GeneralComp { + var integer vc_int := 1; + } + + function fx() runs on GeneralComp return template integer { + return (vc_int..100); + } + + function f(in template integer p_int := fx()) runs on GeneralComp { + log(p_int); + } + + testcase TC_Sem_05040101_parameters_of_kind_value_040() runs on GeneralComp { + f(); + setverdict(pass); + } + + control{ + execute(TC_Sem_05040101_parameters_of_kind_value_040()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_041.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_041.ttcn new file mode 100644 index 00000000..b65909d6 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_041.ttcn @@ -0,0 +1,35 @@ +/*************************************************** + ** @author STF 548 + ** @version 0.0.1 + ** @purpose 1:5.4.1.2, verify that default template instance of template formal parameters is resolved in the scope of the parameterized entity + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// If a default template is used, it is evaluated in the scope of the parameterized entity, not the scope of the actual parameter list. + +module Sem_05040102_parameters_of_kind_template_041 { + type component GeneralComp { + var template integer vc_int := ?; + } + + function f(in template integer p_int := vc_int) runs on GeneralComp { + if (match(10, p_int)) { + setverdict(pass); + } else { + setverdict(fail); + } + } + + testcase TC_Sem_05040102_parameters_of_kind_template_041() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + vc_int := (1, 2, 3); + v_ptc.start(f()); // p_int default to ? (vc_int of v_ptc) and not to (1, 2, 3) (vc_int of self) + v_ptc.done; + setverdict(pass); + } + + control{ + execute(TC_Sem_05040102_parameters_of_kind_template_041()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040103_parameters_of_kind_timer/NegSem_05040103_parameters_of_kind_timer_001.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040103_parameters_of_kind_timer/NegSem_05040103_parameters_of_kind_timer_001.ttcn new file mode 100644 index 00000000..0c9c6f07 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040103_parameters_of_kind_timer/NegSem_05040103_parameters_of_kind_timer_001.ttcn @@ -0,0 +1,33 @@ +/***************************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:5.4.1.3, Verify that functions with timer parameters cannot be used in component.start operation + ** @verdict pass reject + *****************************************************************/ + +// The following requirement is tested: +// Only function and altstep definitions may have formal timer parameters, with the exception of functions or +// altsteps started as test component behaviour (see clause 21.3.2). + +module NegSem_05040103_parameters_of_kind_timer_001 { + + type component C { + } + + function f_test(inout timer p_tmr) runs on C { + p_tmr.timeout; + setverdict(pass); + } + + testcase TC_NegSem_05040103_parameters_of_kind_timer_001() runs on C system C { + timer t_tmr := 0.1; + var C v_ptc := C.create; + t_tmr.start; + v_ptc.start(f_test(t_tmr)); + v_ptc.done; + } + + control { + execute(TC_NegSem_05040103_parameters_of_kind_timer_001()); + } +} \ No newline at end of file diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040103_parameters_of_kind_timer/NegSem_05040103_parameters_of_kind_timer_002.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040103_parameters_of_kind_timer/NegSem_05040103_parameters_of_kind_timer_002.ttcn new file mode 100644 index 00000000..9f091949 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040103_parameters_of_kind_timer/NegSem_05040103_parameters_of_kind_timer_002.ttcn @@ -0,0 +1,34 @@ +/***************************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:5.4.1.3, Verify that altsteps with timer parameters cannot be used in component.start operation + ** @verdict pass reject + *****************************************************************/ + +// The following requirement is tested: +// Only function and altstep definitions may have formal timer parameters, with the exception of functions or +// altsteps started as test component behaviour (see clause 21.3.2). + +module NegSem_05040103_parameters_of_kind_timer_002 { + + type component C { + } + + altstep f_test(inout timer p_tmr) runs on C { + [] p_tmr.timeout { + setverdict(pass); + } + } + + testcase TC_NegSem_05040103_parameters_of_kind_timer_002() runs on C system C { + timer t_tmr := 0.1; + var C v_ptc := C.create; + t_tmr.start; + v_ptc.start(f_test(t_tmr)); + v_ptc.done; + } + + control { + execute(TC_NegSem_05040103_parameters_of_kind_timer_002()); + } +} \ No newline at end of file diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040103_parameters_of_kind_timer/NegSem_05040103_parameters_of_kind_timer_003.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040103_parameters_of_kind_timer/NegSem_05040103_parameters_of_kind_timer_003.ttcn new file mode 100644 index 00000000..b698dc44 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040103_parameters_of_kind_timer/NegSem_05040103_parameters_of_kind_timer_003.ttcn @@ -0,0 +1,27 @@ +/***************************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:5.4.1.3, Verify that test cases cannot have timer parameters + ** @verdict pass reject + *****************************************************************/ + +// The following requirement is tested: +// Only function and altstep definitions may have formal timer parameters, with the exception of functions or +// altsteps started as test component behaviour (see clause 21.3.2). + +module NegSem_05040103_parameters_of_kind_timer_003 { + + type component C { + } + + testcase TC_NegSem_05040103_parameters_of_kind_timer_003(timer p_tmr) runs on C { + p_tmr.timeout; + setverdict(pass); + } + + control { + timer t_tmr := 0.1; + t_tmr.start; + execute(TC_NegSem_05040103_parameters_of_kind_timer_003(t_tmr)); + } +} \ No newline at end of file diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040103_parameters_of_kind_timer/NegSem_05040103_parameters_of_kind_timer_004.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040103_parameters_of_kind_timer/NegSem_05040103_parameters_of_kind_timer_004.ttcn new file mode 100644 index 00000000..fae59e38 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040103_parameters_of_kind_timer/NegSem_05040103_parameters_of_kind_timer_004.ttcn @@ -0,0 +1,29 @@ +/***************************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:5.4.1.3, Verify that templates cannot have timer parameters + ** @verdict pass reject + *****************************************************************/ + +// The following requirement is tested: +// Only function and altstep definitions may have formal timer parameters, with the exception of functions or +// altsteps started as test component behaviour (see clause 21.3.2). + +module NegSem_05040103_parameters_of_kind_timer_004 { + + type component C { + } + + template boolean m_msg (timer p_tmr) := p_tmr.running; + + testcase TC_NegSem_05040103_parameters_of_kind_timer_004() runs on C system C { + timer t_tmr := 0.1; + t_tmr.start; + log(m_msg(t_tmr)); + setverdict(pass); + } + + control { + execute(TC_NegSem_05040103_parameters_of_kind_timer_004()); + } +} \ No newline at end of file diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040103_parameters_of_kind_timer/NegSyn_05040103_parameters_of_kind_timer_001.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040103_parameters_of_kind_timer/NegSyn_05040103_parameters_of_kind_timer_001.ttcn new file mode 100644 index 00000000..c774ec94 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040103_parameters_of_kind_timer/NegSyn_05040103_parameters_of_kind_timer_001.ttcn @@ -0,0 +1,30 @@ +/***************************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:5.4.1.3, Verify that in timer parameters are not allowed + ** @verdict pass reject + *****************************************************************/ + +// The following requirement is tested: +// Formal timer parameters shall be inout parameters, which can optionally be indicated by the keyword inout. + +module NegSyn_05040103_parameters_of_kind_timer_001 { + + type component C { + } + + function f_test(in timer p_tmr) { + p_tmr.timeout; + } + + testcase TC_NegSyn_05040103_parameters_of_kind_timer_001() runs on C { + timer t_tmr := 1.0; + t_tmr.start; + f_test(t_tmr); + setverdict(pass); + } + + control { + execute(TC_NegSyn_05040103_parameters_of_kind_timer_001()); + } +} \ No newline at end of file diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040103_parameters_of_kind_timer/NegSyn_05040103_parameters_of_kind_timer_002.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040103_parameters_of_kind_timer/NegSyn_05040103_parameters_of_kind_timer_002.ttcn new file mode 100644 index 00000000..ae884d84 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040103_parameters_of_kind_timer/NegSyn_05040103_parameters_of_kind_timer_002.ttcn @@ -0,0 +1,42 @@ +/***************************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:5.4.1.3, Verify that out timer parameters are not allowed + ** @verdict pass reject + *****************************************************************/ + +// The following requirement is tested: +// Formal timer parameters shall be inout parameters, which can optionally be indicated by the keyword inout. + +module NegSyn_05040103_parameters_of_kind_timer_002 { + + type component C { + + } + + function f_test(out timer p_tmr) { + + p_tmr.start(1.0); + + } + + + testcase TC_NegSyn_05040103_parameters_of_kind_timer_002() runs on C{ + + timer t_tmr; + + f_test(t_tmr); + + t_tmr.timeout; + setverdict(pass); + + } + + + control { + + execute(TC_NegSyn_05040103_parameters_of_kind_timer_002()); + + } + +} \ No newline at end of file diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040103_parameters_of_kind_timer/Sem_05040103_parameters_of_kind_timer_001.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040103_parameters_of_kind_timer/Sem_05040103_parameters_of_kind_timer_001.ttcn new file mode 100644 index 00000000..cda1d795 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040103_parameters_of_kind_timer/Sem_05040103_parameters_of_kind_timer_001.ttcn @@ -0,0 +1,98 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:5.4.1.3, Ensure that the IUT correctly handles parametrization through the use of timer parameters. + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +module Sem_05040103_parameters_of_kind_timer_001 { + +type enumerated MyEnumeratedType {e_black, e_white} +type integer address; + +type record MyRecord { + integer field1, + boolean field2, + address field3, + MyEnumeratedType field4, + integer field5 +} + +type port TestPort message { + inout MyRecord +} + +type component GeneralComp { + port TestPort generalPort; + port TestPort otherport; +} +function f_parametrizationCheck ( + MyRecord ExpectedMatch, + timer p_timer, + integer p_integer := 0, + boolean p_boolean := true, + address p_address := null, + MyEnumeratedType p_enumerated := e_black, + template integer p_integerTemplate := ? + ) runs on GeneralComp { + var template MyRecord ReceivedRecordTemplate := {p_integer, p_boolean, p_address, p_enumerated, p_integerTemplate}; + + if ( match(ExpectedMatch, ReceivedRecordTemplate) and (p_timer.running) ) { + setverdict(pass); + } + else { + setverdict(fail); + } + } + +testcase TC_Sem_05040103_parameters_of_kind_timer_001 ( + MyRecord ExpectedMatch, + integer p_integer := 0, + boolean p_boolean := true, + address p_address := null, + MyEnumeratedType p_enumerated := e_black, + template integer p_integerTemplate := ? + ) runs on GeneralComp { + + timer t_check; + t_check.start(5.0); + f_parametrizationCheck(ExpectedMatch, t_check, p_integer, p_boolean, p_address, p_enumerated, p_integerTemplate); + + t_check.stop; + +} + + +control{ + + var MyRecord DefaultValues := { + field1 := 0, + field2 := true, + field3 := null, + field4 := e_black, + field5 := 1 //any number can be used here to correspond with ? matching + } + + var MyRecord ModifiedValues := { + field1 := 1, + field2 := false, + field3 := 1, + field4 := e_white, + field5 := 1 + } + + var MyRecord PartlyModifiedValues := { + field1 := 0, + field2 := false, + field3 := null, + field4 := e_white, + field5 := 1 + } + + execute(TC_Sem_05040103_parameters_of_kind_timer_001(DefaultValues)); + execute(TC_Sem_05040103_parameters_of_kind_timer_001(DefaultValues,-,-,-,-,-)); + execute(TC_Sem_05040103_parameters_of_kind_timer_001(ModifiedValues,1,false,1,e_white,1)); + execute(TC_Sem_05040103_parameters_of_kind_timer_001(PartlyModifiedValues,-,false,-,e_white,-)); +} + +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040103_parameters_of_kind_timer/Sem_05040103_parameters_of_kind_timer_002.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040103_parameters_of_kind_timer/Sem_05040103_parameters_of_kind_timer_002.ttcn new file mode 100644 index 00000000..50b9f7ac --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040103_parameters_of_kind_timer/Sem_05040103_parameters_of_kind_timer_002.ttcn @@ -0,0 +1,30 @@ +/***************************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:5.4.1.3, Verify that inout prefix can be used for timer parameters + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirement is tested: +// Formal timer parameters shall be inout parameters, which can optionally be indicated by the keyword inout. + +module Sem_05040103_parameters_of_kind_timer_002 { + + type component C { + } + + function f_test(inout timer p_tmr) { + p_tmr.timeout; + setverdict(pass); + } + + testcase TC_Sem_05040103_parameters_of_kind_timer_001() runs on C { + timer t_tmr := 0.1; + t_tmr.start; + f_test(t_tmr); + } + + control { + execute(TC_Sem_05040103_parameters_of_kind_timer_001()); + } +} \ No newline at end of file diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040103_parameters_of_kind_timer/Sem_05040103_parameters_of_kind_timer_003.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040103_parameters_of_kind_timer/Sem_05040103_parameters_of_kind_timer_003.ttcn new file mode 100644 index 00000000..dc23dca3 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040103_parameters_of_kind_timer/Sem_05040103_parameters_of_kind_timer_003.ttcn @@ -0,0 +1,32 @@ +/***************************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:5.4.1.3, Verify that altstep can have timer parameters + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirement is tested: +// Only function and altstep definitions may have formal timer parameters, with the exception of functions or +// altsteps started as test component behaviour (see clause 21.3.2). + +module Sem_05040103_parameters_of_kind_timer_003 { + + type component C { + } + + altstep a_test(timer p_tmr) { + [] p_tmr.timeout { + setverdict(pass); + } + } + + testcase TC_Sem_05040103_parameters_of_kind_timer_001() runs on C { + timer t_tmr := 0.1; + t_tmr.start; + a_test(t_tmr); + } + + control { + execute(TC_Sem_05040103_parameters_of_kind_timer_001()); + } +} \ No newline at end of file diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040104_parameters_of_kind_port/NegSem_05040104_parameters_of_kind_port_001.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040104_parameters_of_kind_port/NegSem_05040104_parameters_of_kind_port_001.ttcn new file mode 100644 index 00000000..96980d45 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040104_parameters_of_kind_port/NegSem_05040104_parameters_of_kind_port_001.ttcn @@ -0,0 +1,35 @@ +/***************************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:5.4.1.4, Verify that functions with port parameters cannot be used in component.start operation + ** @verdict pass reject + *****************************************************************/ + +// The following requirement is tested: +// Only function and altstep definitions may have formal port parameters, - with the exception of functions or +// altsteps started as test component behaviour (see clause 21.3.2). + +module NegSem_05040104_parameters_of_kind_port_001 { + + type port P message { + inout integer + } + type component C { + port P p; + } + + function f_test(P p_port) runs on C { + p_port.send(1); + setverdict(pass); + } + + testcase TC_NegSem_05040104_parameters_of_kind_port_001() runs on C system C { + var C v_ptc := C.create; + v_ptc.start(f_test(p)); + v_ptc.done; + } + + control { + execute(TC_NegSem_05040104_parameters_of_kind_port_001()); + } +} \ No newline at end of file diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040104_parameters_of_kind_port/NegSem_05040104_parameters_of_kind_port_002.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040104_parameters_of_kind_port/NegSem_05040104_parameters_of_kind_port_002.ttcn new file mode 100644 index 00000000..0c1b7b6e --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040104_parameters_of_kind_port/NegSem_05040104_parameters_of_kind_port_002.ttcn @@ -0,0 +1,38 @@ +/***************************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:5.4.1.4, Verify that altsteps with port parameters cannot be used in component.start operation + ** @verdict pass reject + *****************************************************************/ + +// The following requirement is tested: +// Only function and altstep definitions may have formal port parameters, - with the exception of functions or +// altsteps started as test component behaviour (see clause 21.3.2). + +module NegSem_05040104_parameters_of_kind_port_002 { + + type port P message { + inout integer + } + type component C { + port P p; + } + + altstep a_test(P p_port) runs on C { + [] p_port.receive(integer:?) { + setverdict(pass); + } + } + + testcase TC_NegSem_05040104_parameters_of_kind_port_002() runs on C system C { + var C v_ptc := C.create; + connect(mtc:p, mtc:p); + p.send(1); + v_ptc.start(a_test(p)); + v_ptc.done; + } + + control { + execute(TC_NegSem_05040104_parameters_of_kind_port_002()); + } +} \ No newline at end of file diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040104_parameters_of_kind_port/NegSem_05040104_parameters_of_kind_port_003.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040104_parameters_of_kind_port/NegSem_05040104_parameters_of_kind_port_003.ttcn new file mode 100644 index 00000000..91c9376a --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040104_parameters_of_kind_port/NegSem_05040104_parameters_of_kind_port_003.ttcn @@ -0,0 +1,33 @@ +/***************************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:5.4.1.4, Verify that in port parameters are not allowed + ** @verdict pass reject + *****************************************************************/ + +// The following requirement is tested: +// Formal port parameters shall be inout parameters, which can optionally be indicated by the keyword inout. + +module NegSem_05040104_parameters_of_kind_port_003 { + + type port P message { + inout integer + } + + type component C { + port P p; + } + + function f_test(in P p_port) { + p_port.send(1); + } + + testcase TC_NegSem_05040104_parameters_of_kind_port_003() runs on C { + f_test(p); + setverdict(pass); + } + + control { + execute(TC_NegSem_05040104_parameters_of_kind_port_003()); + } +} \ No newline at end of file diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040104_parameters_of_kind_port/NegSem_05040104_parameters_of_kind_port_004.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040104_parameters_of_kind_port/NegSem_05040104_parameters_of_kind_port_004.ttcn new file mode 100644 index 00000000..0c3bf6eb --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040104_parameters_of_kind_port/NegSem_05040104_parameters_of_kind_port_004.ttcn @@ -0,0 +1,32 @@ +/***************************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:5.4.1.4, Verify that out port parameters are not allowed + ** @verdict pass reject + *****************************************************************/ + +// The following requirement is tested: +// Formal port parameters shall be inout parameters, which can optionally be indicated by the keyword inout. + +module NegSem_05040104_parameters_of_kind_port_004 { + + type port P message { + inout integer + } + + type component C { + port P p; + } + + function f_test(out P p_port) { + setverdict(pass); + } + + testcase TC_NegSem_05040104_parameters_of_kind_port_004() runs on C { + f_test(p); + } + + control { + execute(TC_NegSem_05040104_parameters_of_kind_port_004()); + } +} \ No newline at end of file diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040104_parameters_of_kind_port/NegSem_05040104_parameters_of_kind_port_005.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040104_parameters_of_kind_port/NegSem_05040104_parameters_of_kind_port_005.ttcn new file mode 100644 index 00000000..04eeb605 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040104_parameters_of_kind_port/NegSem_05040104_parameters_of_kind_port_005.ttcn @@ -0,0 +1,33 @@ +/***************************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:5.4.1.4, Verify that test cases cannot have port parameters + ** @verdict pass reject + *****************************************************************/ + +// The following requirement is tested: +// Only function and altstep definitions may have formal port parameters, - with the exception of functions or +// altsteps started as test component behaviour (see clause 21.3.2). + +module NegSem_05040104_parameters_of_kind_port_005 { + + type port P message { + inout integer + } + type component C { + port P p; + } + + testcase TC_Test(P p_port) runs on C { // should cause a compilation error + p_port.send(1); + setverdict(pass); + } + + testcase TC_NegSem_05040104_parameters_of_kind_port_005(P p_port) runs on C { + setverdict(pass); + } + + control { + execute(TC_NegSem_05040104_parameters_of_kind_port_005()); + } +} \ No newline at end of file diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040104_parameters_of_kind_port/NegSem_05040104_parameters_of_kind_port_006.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040104_parameters_of_kind_port/NegSem_05040104_parameters_of_kind_port_006.ttcn new file mode 100644 index 00000000..e3d53bef --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040104_parameters_of_kind_port/NegSem_05040104_parameters_of_kind_port_006.ttcn @@ -0,0 +1,31 @@ +/***************************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:5.4.1.4, Verify that templates cannot contain port parameters + ** @verdict pass reject + *****************************************************************/ + +// The following requirement is tested: +// Only function and altstep definitions may have formal port parameters, - with the exception of functions or +// altsteps started as test component behaviour (see clause 21.3.2). + +module NegSem_05040104_parameters_of_kind_port_006 { + + type port P message { + inout integer + } + type component C { + port P p; + } + + template boolean m_msg(P p_par) := p_par.checkstate("Started"); + + testcase TC_NegSem_05040104_parameters_of_kind_port_006() runs on C system C { + log(m_msg(p)); + setverdict(pass); + } + + control { + execute(TC_NegSem_05040104_parameters_of_kind_port_006()); + } +} \ No newline at end of file diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040104_parameters_of_kind_port/Sem_05040104_parameters_of_kind_port_001.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040104_parameters_of_kind_port/Sem_05040104_parameters_of_kind_port_001.ttcn new file mode 100644 index 00000000..10a4d2e6 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040104_parameters_of_kind_port/Sem_05040104_parameters_of_kind_port_001.ttcn @@ -0,0 +1,111 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:5.4.1.4, Ensure that the IUT accepts port parametrization types for functions. + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Sem_05040104_parameters_of_kind_port_001 { + + type enumerated MyEnumeratedType {e_black, e_white} + type integer address; + + type record MyRecord { + integer field1, + boolean field2, + address field3, + MyEnumeratedType field4, + integer field5 + } + + type port TestPort message { + inout MyRecord + } + + type component GeneralComp { + port TestPort generalPort; + port TestPort otherPort; + } + + function f_parametrizationCheck ( + MyRecord ExpectedMatch, + timer p_timer, + integer p_integer := 0, + boolean p_boolean := true, + address p_address := null, + MyEnumeratedType p_enumerated := e_black, + template integer p_integerTemplate := ?, + TestPort p_port + ) runs on GeneralComp { + var template MyRecord ReceivedRecordTemplate := {p_integer, p_boolean, p_address, p_enumerated, p_integerTemplate}; + + p_port.send(ExpectedMatch); + } + + testcase TC_Sem_05040104_parameters_of_kind_port_001_a ( + MyRecord ExpectedMatch, + integer p_integer := 0, + boolean p_boolean := true, + address p_address := null, + MyEnumeratedType p_enumerated := e_black, + template integer p_integerTemplate := ? + ) runs on GeneralComp { + + timer t_check; + t_check.start(5.0); + f_parametrizationCheck(ExpectedMatch, t_check, p_integer, p_boolean, p_address, p_enumerated, p_integerTemplate,generalPort); + alt { + [] generalPort.receive { + setverdict(pass); + } + [] t_check.timeout { + setverdict(fail); + } + } + + t_check.stop; + + } + + testcase TC_Sem_05040104_parameters_of_kind_port_001_b ( + MyRecord ExpectedMatch, + integer p_integer := 0, + boolean p_boolean := true, + address p_address := null, + MyEnumeratedType p_enumerated := e_black, + template integer p_integerTemplate := ? + ) runs on GeneralComp { + + timer t_check; + t_check.start(1.0); + f_parametrizationCheck(ExpectedMatch, t_check, p_integer, p_boolean, p_address, p_enumerated, p_integerTemplate,otherPort); + alt { + [] otherPort.receive { + setverdict(pass); + } + [] t_check.timeout { + setverdict(fail); + } + } + + t_check.stop; + + } + + + control{ + + var MyRecord ModifiedValues := { + field1 := 1, + field2 := false, + field3 := 1, + field4 := e_white, + field5 := 1 + } + + //the following testcases will call same function with different port parameter values + execute(TC_Sem_05040104_parameters_of_kind_port_001_a(ModifiedValues,1,false,1,e_white,1)); + execute(TC_Sem_05040104_parameters_of_kind_port_001_b(ModifiedValues,1,false,1,e_white,1)); + + } + +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040104_parameters_of_kind_port/Sem_05040104_parameters_of_kind_port_002.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040104_parameters_of_kind_port/Sem_05040104_parameters_of_kind_port_002.ttcn new file mode 100644 index 00000000..dcfe29d5 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040104_parameters_of_kind_port/Sem_05040104_parameters_of_kind_port_002.ttcn @@ -0,0 +1,33 @@ +/***************************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:5.4.1.4, Verify that inout prefix can be used for port parameters + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirement is tested: +// Formal port parameters shall be inout parameters, which can optionally be indicated by the keyword inout. + +module Sem_05040104_parameters_of_kind_port_002 { + + type port P message { + inout integer + } + + type component C { + port P p; + } + + function f_test(inout P p_port) { + p_port.send(1); + setverdict(pass); + } + + testcase TC_Sem_05040104_parameters_of_kind_port_002() runs on C { + f_test(p); + } + + control { + execute(TC_Sem_05040104_parameters_of_kind_port_002()); + } +} \ No newline at end of file diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/050401_top_level/NOTES b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/050401_top_level/NOTES new file mode 100644 index 00000000..245e7102 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/050401_top_level/NOTES @@ -0,0 +1,7 @@ +The following requirements are present in 5.4.1.1 and 5.4.1.2 too and they are tested as a part of these clauses: + +Formal parameters of parameterized templates, functions, altsteps, and testcases are defined in formal parameter lists. Formal parameters shall be in, inout or out parameters (see definitions in clause 3.1). + +If not stated otherwise, a formal parameter is an in parameter. + +Formal in parameters may have default values. This default value is used when no actual parameter is provided. \ No newline at end of file diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/050401_top_level/NegSem_050401_top_level_001.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/050401_top_level/NegSem_050401_top_level_001.ttcn new file mode 100644 index 00000000..45c72a2d --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/050401_top_level/NegSem_050401_top_level_001.ttcn @@ -0,0 +1,43 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.1, verify that error is generated for incompatible actual value of in parameter + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If parameters are passed by value (i.e. in case of in and out parameters), type compatibility +// rules specified in 6.3 apply. + +module NegSem_050401_top_level_001 { + + type component GeneralComp { + } + + type record R1 { + integer field1, + integer field2 + } + + type record R2 { + integer option1, + integer option2 optional + } + + function f(R2 p_rec) { + if (match(p_rec, {1, 2})) { + setverdict(pass); + } else { + setverdict(fail, "p_rec value not matching ", p_rec, {1, 2}); + } + } + + testcase TC_NegSem_050401_top_level_001() runs on GeneralComp { + var R1 v_rec := {field1 := 1, field2 := 2}; + f(v_rec); + } + + control{ + execute(TC_NegSem_050401_top_level_001()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/050401_top_level/NegSem_050401_top_level_002.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/050401_top_level/NegSem_050401_top_level_002.ttcn new file mode 100644 index 00000000..f73bb342 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/050401_top_level/NegSem_050401_top_level_002.ttcn @@ -0,0 +1,42 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.1, verify that error is generated for incompatible actual value of out parameter + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If parameters are passed by value (i.e. in case of in and out parameters), type compatibility +// rules specified in 6.3 apply. + +module NegSem_050401_top_level_002 { + + type component GeneralComp { + } + + type record R1 { + integer field1, + integer field2 + } + + type record R2 { + integer option1, + integer option2 optional + } + + function f(out R2 p_rec) { + p_rec.option1 := 1; + p_rec.option2 := 2; + } + + testcase TC_NegSem_050401_top_level_002() runs on GeneralComp { + var R1 v_rec; + f(v_rec); + if ( match(v_rec, {1, 2})) { setverdict(pass); } + else { setverdict(fail, "p_rec value not matching ", v_rec, {1, 2}); } + } + + control{ + execute(TC_NegSem_050401_top_level_002()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/050401_top_level/NegSem_050401_top_level_003.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/050401_top_level/NegSem_050401_top_level_003.ttcn new file mode 100644 index 00000000..42d664bd --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/050401_top_level/NegSem_050401_top_level_003.ttcn @@ -0,0 +1,40 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.1, verify that error is generated if actual inout parameter doesn't adhere to strong typing rules + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// When parameters are passed by reference, strong typing is required. Both the actual and formal +// parameter shall be of the same type. + +module NegSem_050401_top_level_003 { + + type component GeneralComp { + } + + type record R1 { + integer field1, + integer field2 + } + + type record R2 { + integer option1, + integer option2 + } + + function f(inout R2 p_rec) { + if (match(p_rec, {1, 2})) { setverdict(pass); } + else { setverdict(fail, "p_rec value not matching ", p_rec, {1, 2}); } + } + + testcase TC_NegSem_050401_top_level_003() runs on GeneralComp { + var R1 v_rec := { field1 := 1, field2 := 2 }; + f(v_rec); // R1 and R2 are compatible types, but not the same. Strong typing requires exactly the same types. + } + + control{ + execute(TC_NegSem_050401_top_level_003()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/050401_top_level/Sem_050401_top_level_001.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/050401_top_level/Sem_050401_top_level_001.ttcn new file mode 100644 index 00000000..eb94c1de --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/050401_top_level/Sem_050401_top_level_001.ttcn @@ -0,0 +1,29 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.1, verify that in parameters can be read within parametrized content + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// For all these three sorts of parameter passing, the formal parameters can both be read and set +// (i.e. get new values being assigned) within the parametrized object. + +module Sem_050401_top_level_001 { + + type component GeneralComp { + } + + function f(in integer p_int) { + if (p_int == 0) { setverdict(pass); } // reading from p_int + else { setverdict(fail); } + } + + testcase TC_Sem_050401_top_level_001() runs on GeneralComp { + f(0); + } + + control{ + execute(TC_Sem_050401_top_level_001()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/050401_top_level/Sem_050401_top_level_002.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/050401_top_level/Sem_050401_top_level_002.ttcn new file mode 100644 index 00000000..f6f3dc9d --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/050401_top_level/Sem_050401_top_level_002.ttcn @@ -0,0 +1,34 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.1, verify that out parameters can be read within parametrized content + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// For all these three sorts of parameter passing, the formal parameters can both be read and set +// (i.e. get new values being assigned) within the parametrized object. + +module Sem_050401_top_level_002 { + + type component GeneralComp { + } + + function f(out integer p_int) { + log(p_int); // read access: UNINITIALIZED shall be printed as no assignment has been made + } + + testcase TC_Sem_050401_top_level_002() runs on GeneralComp { + var integer v_int := 10; + f(v_int); + if (v_int == 10) { + setverdict(pass); + } else { + setverdict(fail); + } + } + + control{ + execute(TC_Sem_050401_top_level_002()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/050401_top_level/Sem_050401_top_level_003.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/050401_top_level/Sem_050401_top_level_003.ttcn new file mode 100644 index 00000000..1d66ae14 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/050401_top_level/Sem_050401_top_level_003.ttcn @@ -0,0 +1,30 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.1, verify that inout parameters can be read within parametrized content + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// For all these three sorts of parameter passing, the formal parameters can both be read and set +// (i.e. get new values being assigned) within the parametrized object. + +module Sem_050401_top_level_003 { + + type component GeneralComp { + } + + function f(inout integer p_int) { + if (p_int == 0) { setverdict(pass); } // reading from p_int + else { setverdict(fail); } + } + + testcase TC_Sem_050401_top_level_003() runs on GeneralComp { + var integer v_int := 0; + f(v_int); + } + + control{ + execute(TC_Sem_050401_top_level_003()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/050401_top_level/Sem_050401_top_level_004.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/050401_top_level/Sem_050401_top_level_004.ttcn new file mode 100644 index 00000000..44dc54ff --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/050401_top_level/Sem_050401_top_level_004.ttcn @@ -0,0 +1,30 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.1, verify that in parameters can be set within parametrized content + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// For all these three sorts of parameter passing, the formal parameters can both be read and set +// (i.e. get new values being assigned) within the parametrized object. + +module Sem_050401_top_level_004 { + + type component GeneralComp { + } + + function f(in integer p_int) { + p_int := 3; // setting p_int within parametrized content + if (p_int == 3) { setverdict(pass); } + else { setverdict(fail); } + } + + testcase TC_Sem_050401_top_level_004() runs on GeneralComp { + f(0); + } + + control{ + execute(TC_Sem_050401_top_level_004()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/050401_top_level/Sem_050401_top_level_005.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/050401_top_level/Sem_050401_top_level_005.ttcn new file mode 100644 index 00000000..c0509055 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/050401_top_level/Sem_050401_top_level_005.ttcn @@ -0,0 +1,31 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.1, verify that out parameters can be set within parametrized content + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// For all these three sorts of parameter passing, the formal parameters can both be read and set +// (i.e. get new values being assigned) within the parametrized object. + +module Sem_050401_top_level_005 { + + type component GeneralComp { + } + + function f(out integer p_int) { + p_int := 3; // setting p_int within parametrized content + if (p_int == 3) { setverdict(pass); } + else { setverdict(fail); } + } + + testcase TC_Sem_050401_top_level_005() runs on GeneralComp { + var integer v_int := 0; + f(v_int); + } + + control{ + execute(TC_Sem_050401_top_level_005()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/050401_top_level/Sem_050401_top_level_006.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/050401_top_level/Sem_050401_top_level_006.ttcn new file mode 100644 index 00000000..82012d96 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/050401_top_level/Sem_050401_top_level_006.ttcn @@ -0,0 +1,31 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.1, verify that inout parameters can be set within parametrized content + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// For all these three sorts of parameter passing, the formal parameters can both be read and set +// (i.e. get new values being assigned) within the parametrized object. + +module Sem_050401_top_level_006 { + + type component GeneralComp { + } + + function f(inout integer p_int) { + p_int := 3; // setting p_int within parametrized content + if (p_int == 3) { setverdict(pass); } + else { setverdict(fail); } + } + + testcase TC_Sem_050401_top_level_006() runs on GeneralComp { + var integer v_int := 0; + f(v_int); + } + + control{ + execute(TC_Sem_050401_top_level_006()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/050401_top_level/Sem_050401_top_level_007.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/050401_top_level/Sem_050401_top_level_007.ttcn new file mode 100644 index 00000000..a3edec46 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/050401_top_level/Sem_050401_top_level_007.ttcn @@ -0,0 +1,32 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.1, verify that in parameters can be used as actual in parameters of parameterized objects + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Formal parameters can be used directly as actual parameters for other parametrized objects, +// e.g. as actual parameters in function invocations or as actual parameters in template instances. + +module Sem_050401_top_level_007 { + + type component GeneralComp { + } + + template integer mw_range(in integer p_upperBound) := (0..p_upperBound); + + function f(in integer p_int) { + var template integer vm_t := mw_range(p_int); + log(vm_t); + setverdict(pass); + } + + testcase TC_Sem_050401_top_level_007() runs on GeneralComp { + f(5); + } + + control{ + execute(TC_Sem_050401_top_level_007()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/050401_top_level/Sem_050401_top_level_008.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/050401_top_level/Sem_050401_top_level_008.ttcn new file mode 100644 index 00000000..303e17d0 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/050401_top_level/Sem_050401_top_level_008.ttcn @@ -0,0 +1,33 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.1, verify that in parameters can be used as actual out parameters of parameterized objects + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Formal parameters can be used directly as actual parameters for other parametrized objects, +// e.g. as actual parameters in function invocations or as actual parameters in template instances. + +module Sem_050401_top_level_008 { + + type component GeneralComp { + } + + function fx(out integer p_int) { + p_int := 3; + } + + function f(in integer p_int) { + fx(p_int); + setverdict(pass); + } + + testcase TC_Sem_050401_top_level_008() runs on GeneralComp { + f(5); + } + + control{ + execute(TC_Sem_050401_top_level_008()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/050401_top_level/Sem_050401_top_level_009.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/050401_top_level/Sem_050401_top_level_009.ttcn new file mode 100644 index 00000000..c091f1f8 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/050401_top_level/Sem_050401_top_level_009.ttcn @@ -0,0 +1,33 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.1, verify that in parameters can be used as actual inout parameters of parameterized objects + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Formal parameters can be used directly as actual parameters for other parametrized objects, +// e.g. as actual parameters in function invocations or as actual parameters in template instances. + +module Sem_050401_top_level_009 { + + type component GeneralComp { + } + + function fx(inout integer p_int) { + p_int := p_int + 3; + } + + function f(in integer p_int) { + fx(p_int); + setverdict(pass); + } + + testcase TC_Sem_050401_top_level_009() runs on GeneralComp { + f(5); + } + + control{ + execute(TC_Sem_050401_top_level_009()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/050401_top_level/Sem_050401_top_level_010.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/050401_top_level/Sem_050401_top_level_010.ttcn new file mode 100644 index 00000000..f0766bd7 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/050401_top_level/Sem_050401_top_level_010.ttcn @@ -0,0 +1,35 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.1, verify that out parameters can be used as actual in parameters of parameterized objects + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Formal parameters can be used directly as actual parameters for other parametrized objects, +// e.g. as actual parameters in function invocations or as actual parameters in template instances. + +module Sem_050401_top_level_010 { + + type component GeneralComp { + } + + template integer mw_range(in integer p_upperBound) := (0..p_upperBound); + + function f(out integer p_int) { + var template integer vm_t; + p_int := 5; + vm_t := mw_range(p_int); + log(vm_t); + setverdict(pass); + } + + testcase TC_Sem_050401_top_level_010() runs on GeneralComp { + var integer v_int := 0; + f(v_int); + } + + control{ + execute(TC_Sem_050401_top_level_010()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/050401_top_level/Sem_050401_top_level_011.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/050401_top_level/Sem_050401_top_level_011.ttcn new file mode 100644 index 00000000..5dd93869 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/050401_top_level/Sem_050401_top_level_011.ttcn @@ -0,0 +1,34 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.1, verify that out parameters can be used as actual out parameters of parameterized objects + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Formal parameters can be used directly as actual parameters for other parametrized objects, +// e.g. as actual parameters in function invocations or as actual parameters in template instances. + +module Sem_050401_top_level_011 { + + type component GeneralComp { + } + + function fx(out integer p_int) { + p_int := 3; + } + + function f(out integer p_int) { + fx(p_int); + setverdict(pass); + } + + testcase TC_Sem_050401_top_level_011() runs on GeneralComp { + var integer v_int; + f(v_int); + } + + control{ + execute(TC_Sem_050401_top_level_011()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/050401_top_level/Sem_050401_top_level_012.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/050401_top_level/Sem_050401_top_level_012.ttcn new file mode 100644 index 00000000..0d9bb29e --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/050401_top_level/Sem_050401_top_level_012.ttcn @@ -0,0 +1,35 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.1, verify that out parameters can be used as actual inout parameters of parameterized objects + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Formal parameters can be used directly as actual parameters for other parametrized objects, +// e.g. as actual parameters in function invocations or as actual parameters in template instances. + +module Sem_050401_top_level_012 { + + type component GeneralComp { + } + + function fx(inout integer p_int) { + p_int := 3; + } + + function f(out integer p_int) { + p_int := 0; + fx(p_int); + setverdict(pass); + } + + testcase TC_Sem_050401_top_level_012() runs on GeneralComp { + var integer v_int; + f(v_int); + } + + control{ + execute(TC_Sem_050401_top_level_012()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/050401_top_level/Sem_050401_top_level_013.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/050401_top_level/Sem_050401_top_level_013.ttcn new file mode 100644 index 00000000..db676bdf --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/050401_top_level/Sem_050401_top_level_013.ttcn @@ -0,0 +1,34 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.1, verify that inout parameters can be used as actual in parameters of parameterized objects + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Formal parameters can be used directly as actual parameters for other parametrized objects, +// e.g. as actual parameters in function invocations or as actual parameters in template instances. + +module Sem_050401_top_level_013 { + + type component GeneralComp { + } + + template integer mw_range(in integer p_upperBound) := (0..p_upperBound); + + function f(inout integer p_int) { + var template integer vm_t; + vm_t := mw_range(p_int); + log(vm_t); + setverdict(pass); + } + + testcase TC_Sem_050401_top_level_013() runs on GeneralComp { + var integer v_int := 5; + f(v_int); + } + + control{ + execute(TC_Sem_050401_top_level_013()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/050401_top_level/Sem_050401_top_level_014.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/050401_top_level/Sem_050401_top_level_014.ttcn new file mode 100644 index 00000000..c465a3bc --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/050401_top_level/Sem_050401_top_level_014.ttcn @@ -0,0 +1,34 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.1, verify that inout parameters can be used as actual out parameters of parameterized objects + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Formal parameters can be used directly as actual parameters for other parametrized objects, +// e.g. as actual parameters in function invocations or as actual parameters in template instances. + +module Sem_050401_top_level_014 { + + type component GeneralComp { + } + + function fx(out integer p_int) { + p_int := 3; + } + + function f(inout integer p_int) { + fx(p_int); + setverdict(pass); + } + + testcase TC_Sem_050401_top_level_014() runs on GeneralComp { + var integer v_int := 0; + f(v_int); + } + + control{ + execute(TC_Sem_050401_top_level_014()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/050401_top_level/Sem_050401_top_level_015.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/050401_top_level/Sem_050401_top_level_015.ttcn new file mode 100644 index 00000000..bc8d90ef --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/050401_top_level/Sem_050401_top_level_015.ttcn @@ -0,0 +1,34 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.1, verify that inout parameters can be used as actual inout parameters of parameterized objects + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Formal parameters can be used directly as actual parameters for other parametrized objects, +// e.g. as actual parameters in function invocations or as actual parameters in template instances. + +module Sem_050401_top_level_015 { + + type component GeneralComp { + } + + function fx(inout integer p_int) { + p_int := 3; + } + + function f(inout integer p_int) { + fx(p_int); + setverdict(pass); + } + + testcase TC_Sem_050401_top_level_015() runs on GeneralComp { + var integer v_int := 0; + f(v_int); + } + + control{ + execute(TC_Sem_050401_top_level_015()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/050401_top_level/Sem_050401_top_level_016.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/050401_top_level/Sem_050401_top_level_016.ttcn new file mode 100644 index 00000000..161ceb87 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/050401_top_level/Sem_050401_top_level_016.ttcn @@ -0,0 +1,40 @@ +/*************************************************** + ** @author STF 487 (updated by STF 521) + ** @version 0.0.2 + ** @purpose 1:5.4.1, verify that compatibility rules are used for passing in parameters + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// If parameters are passed by value (i.e. in case of in and out parameters), type compatibility +// rules specified in 6.3 apply. + +module Sem_050401_top_level_016 { + + type component GeneralComp { + } + + type record R1 { + integer field1, + integer field2 + } + + type record R2 { + integer option1, + integer option2 + } + + function f(R2 p_rec) { + if (match(p_rec, {1, 2})) { setverdict(pass); } + else { setverdict(fail, "p_rec value not matching ", p_rec, R2:{1, 2}); } + } + + testcase TC_Sem_050401_top_level_016() runs on GeneralComp { + var R1 v_rec := { field1 := 1, field2 := 2 }; + f(v_rec); + } + + control{ + execute(TC_Sem_050401_top_level_016()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/050401_top_level/Sem_050401_top_level_017.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/050401_top_level/Sem_050401_top_level_017.ttcn new file mode 100644 index 00000000..05f03175 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/050401_top_level/Sem_050401_top_level_017.ttcn @@ -0,0 +1,42 @@ +/*************************************************** + ** @author STF 487 (updated by STF 521) + ** @version 0.0.2 + ** @purpose 1:5.4.1, verify that compatibility rules are used for passing out parameters + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// If parameters are passed by value (i.e. in case of in and out parameters), type compatibility +// rules specified in 6.3 apply. + +module Sem_050401_top_level_017 { + + type component GeneralComp { + } + + type record R1 { + integer field1, + integer field2 + } + + type record R2 { + integer option1, + integer option2 + } + + function f(out R2 p_rec) { + p_rec.option1 := 1; + p_rec.option2 := 2; + } + + testcase TC_Sem_050401_top_level_017() runs on GeneralComp { + var R1 v_rec; + f(v_rec); + if (match(v_rec, {1, 2})) { setverdict(pass); } + else { setverdict(fail, "v_rec value not matching ", v_rec, R1:{1, 2}); } + } + + control{ + execute(TC_Sem_050401_top_level_017()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/050401_top_level/Sem_050401_top_level_018.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/050401_top_level/Sem_050401_top_level_018.ttcn new file mode 100644 index 00000000..3547a28b --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/050401_top_level/Sem_050401_top_level_018.ttcn @@ -0,0 +1,35 @@ +/*************************************************** + ** @author STF 487 (updated by STF 521) + ** @version 0.0.2 + ** @purpose 1:5.4.1, verify that strong typing is used for passing inout parameters + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// When parameters are passed by reference, strong typing is required. Both the actual and formal +// parameter shall be of the same type. + +module Sem_050401_top_level_018 { + + type component GeneralComp { + } + + type record R1 { + integer field1, + integer field2 + } + + function f(inout R1 p_rec) { + if (match(p_rec, {1, 2})) { setverdict(pass); } + else { setverdict(fail, "p_rec value not matching ", p_rec, R1:{1, 2}); } + } + + testcase TC_Sem_050401_top_level_018() runs on GeneralComp { + var R1 v_rec := { field1 := 1, field2 := 2 }; + f(v_rec); + } + + control{ + execute(TC_Sem_050401_top_level_018()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/050401_top_level/Sem_050401_top_level_019.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/050401_top_level/Sem_050401_top_level_019.ttcn new file mode 100644 index 00000000..97a838d5 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/050401_top_level/Sem_050401_top_level_019.ttcn @@ -0,0 +1,29 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.1, verify that @lazy modifier can be used for value parameters + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Formal value or template parameters may be declared lazy using the @lazy modifier. The behaviour +// of lazy parameters is defined in clause 3.1, definition of lazy values or templates. + +module Sem_050401_top_level_019 { + + type component GeneralComp { + } + + function f(@lazy integer p_int) { + if (p_int == 1) { setverdict(pass); } + else { setverdict(fail); } + } + + testcase TC_Sem_050401_top_level_019() runs on GeneralComp { + f(1); + } + + control{ + execute(TC_Sem_050401_top_level_019()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/050401_top_level/Sem_050401_top_level_020.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/050401_top_level/Sem_050401_top_level_020.ttcn new file mode 100644 index 00000000..49671937 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/050401_top_level/Sem_050401_top_level_020.ttcn @@ -0,0 +1,29 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.1, verify that @lazy modifier can be used for template parameters + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Formal value or template parameters may be declared lazy using the @lazy modifier. The behaviour +// of lazy parameters is defined in clause 3.1, definition of lazy values or templates. + +module Sem_050401_top_level_020 { + + type component GeneralComp { + } + + function f(template @lazy integer pm_int) { + if (match(1, pm_int)) { setverdict(pass); } + else { setverdict(fail); } + } + + testcase TC_Sem_050401_top_level_020() runs on GeneralComp { + f(1); + } + + control{ + execute(TC_Sem_050401_top_level_020()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/050401_top_level/Sem_050401_top_level_021.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/050401_top_level/Sem_050401_top_level_021.ttcn new file mode 100644 index 00000000..60c18b8b --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/050401_top_level/Sem_050401_top_level_021.ttcn @@ -0,0 +1,35 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.1, verify that @lazy parameters containing component variable references are properly evaluated + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Formal value or template parameters may be declared lazy using the @lazy modifier. The behaviour +// of lazy parameters is defined in clause 3.1, definition of lazy values or templates. + +// Note: the test checks the situation described in NOTE 2: +// The actual values of component variables used in the delayed evaluation of a lazy or fuzzy parameter +// may differ from their values at the time, when the parameterized function or alstep was called. + +module Sem_050401_top_level_021 { + + type component GeneralComp { + var integer vc_int := 20; + } + + function f(@lazy integer p_int) runs on GeneralComp { + vc_int := 0; + if (p_int == 1) { setverdict(pass); } + else { setverdict(fail); } + } + + testcase TC_Sem_050401_top_level_021() runs on GeneralComp { + f(vc_int + 1); + } + + control{ + execute(TC_Sem_050401_top_level_021()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/050401_top_level/Sem_050401_top_level_022.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/050401_top_level/Sem_050401_top_level_022.ttcn new file mode 100644 index 00000000..26bb7f1f --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/050401_top_level/Sem_050401_top_level_022.ttcn @@ -0,0 +1,29 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.1, verify that @fuzzy modifier can be used for value parameters + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Formal value or template parameters may be declared fuzzy using the @fuzzy modifier. The behaviour +// of fuzzy parameters is defined in clause 3.1, definition of fuzzy values or templates. + +module Sem_050401_top_level_022 { + + type component GeneralComp { + } + + function f(@fuzzy integer p_int) { + if (p_int == 1) { setverdict(pass); } + else { setverdict(fail); } + } + + testcase TC_Sem_050401_top_level_022() runs on GeneralComp { + f(1); + } + + control{ + execute(TC_Sem_050401_top_level_022()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/050401_top_level/Sem_050401_top_level_023.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/050401_top_level/Sem_050401_top_level_023.ttcn new file mode 100644 index 00000000..3b8565fd --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/050401_top_level/Sem_050401_top_level_023.ttcn @@ -0,0 +1,29 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.1, verify that @fuzzy modifier can be used for template parameters + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Formal value or template parameters may be declared fuzzy using the @fuzzy modifier. The behaviour +// of fuzzy parameters is defined in clause 3.1, definition of fuzzy values or templates. + +module Sem_050401_top_level_023 { + + type component GeneralComp { + } + + function f(template @fuzzy integer pm_int) { + if (match(1, pm_int)) { setverdict(pass); } + else { setverdict(fail); } + } + + testcase TC_Sem_050401_top_level_023() runs on GeneralComp { + f(1); + } + + control{ + execute(TC_Sem_050401_top_level_023()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/050401_top_level/Sem_050401_top_level_024.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/050401_top_level/Sem_050401_top_level_024.ttcn new file mode 100644 index 00000000..137b6242 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/050401_top_level/Sem_050401_top_level_024.ttcn @@ -0,0 +1,35 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.1, verify that @fuzzy parameters containing component variable references are properly evaluated + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Formal value or template parameters may be declared fuzzy using the @fuzzy modifier. The behaviour +// of fuzzy parameters is defined in clause 3.1, definition of fuzzy values or templates. + +// Note: the test checks the situation described in NOTE 2: +// The actual values of component variables used in the delayed evaluation of a lazy or fuzzy parameter +// may differ from their values at the time, when the parameterized function or alstep was called. + +module Sem_050401_top_level_024 { + + type component GeneralComp { + var integer vc_int := 20; + } + + function f(@fuzzy integer p_int) runs on GeneralComp { + vc_int := 0; + if (p_int == 1) { setverdict(pass); } + else { setverdict(fail); } + } + + testcase TC_Sem_050401_top_level_024() runs on GeneralComp { + f(vc_int + 1); + } + + control{ + execute(TC_Sem_050401_top_level_024()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/050401_top_level/Sem_050401_top_level_025.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/050401_top_level/Sem_050401_top_level_025.ttcn new file mode 100644 index 00000000..8a739ccf --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/050401_top_level/Sem_050401_top_level_025.ttcn @@ -0,0 +1,39 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.1, verify that default values of @lazy parameters are properly evaluated + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Assigning default values for lazy and fuzzy formal parameters does not change the parameters' semantics: +// when the default values are used as actual values for the parameters, they shall be evaluated the same +// way (i.e. delayed) as if an actual parameter was provided. + +module Sem_050401_top_level_025 { + + type component GeneralComp { + } + + function f(@lazy float p_int := rnd()) runs on GeneralComp { + var float v_float; + // rnd function is used for checking: + // 1. first rnd with a seed is called to initiate the generator with a fixed value + // 2. the next call is without a seed (to continue the sequence); this value is saved + // 3. the third call re-uses the seed to restart the sequence + // 4. the rnd call used in evaluation of the default value shall produce the same result now as in the 2nd step + rnd(1.0); + v_float := rnd(); + rnd(1.0); + if (p_int == v_float) { setverdict(pass); } + else { setverdict(fail); } + } + + testcase TC_Sem_050401_top_level_025() runs on GeneralComp { + f(); + } + + control{ + execute(TC_Sem_050401_top_level_025()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/050401_top_level/Sem_050401_top_level_026.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/050401_top_level/Sem_050401_top_level_026.ttcn new file mode 100644 index 00000000..2186d59e --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/050401_top_level/Sem_050401_top_level_026.ttcn @@ -0,0 +1,39 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.1, verify that default values of @fuzzy parameters are properly evaluated + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Assigning default values for lazy and fuzzy formal parameters does not change the parameters' semantics: +// when the default values are used as actual values for the parameters, they shall be evaluated the same +// way (i.e. delayed) as if an actual parameter was provided. + +module Sem_050401_top_level_026 { + + type component GeneralComp { + } + + function f(@fuzzy float p_int := rnd()) runs on GeneralComp { + var float v_float; + // rnd function is used for checking: + // 1. first rnd with a seed is called to initiate the generator with a fixed value + // 2. the next call is without a seed (to continue the sequence); this value is saved + // 3. the third call re-uses the seed to restart the sequence + // 4. the rnd call used in evaluation of the default value shall produce the same result now as in the 2nd step + rnd(1.0); + v_float := rnd(); + rnd(1.0); + if (p_int == v_float) { setverdict(pass); } + else { setverdict(fail); } + } + + testcase TC_Sem_050401_top_level_026() runs on GeneralComp { + f(); + } + + control{ + execute(TC_Sem_050401_top_level_026()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/050401_top_level/Sem_050401_top_level_027.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/050401_top_level/Sem_050401_top_level_027.ttcn new file mode 100644 index 00000000..a9ccb2db --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/050401_top_level/Sem_050401_top_level_027.ttcn @@ -0,0 +1,36 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.1, verify that passing lazy parameter to formal parameter without modifier disables lazy evaluation + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Lazy and fuzzy properties are valid only in the scope, where the parameters' names are visible. +// For example, if a fuzzy parameter is passed to a formal parameter declared without a modifier, it +// loses its fuzzy feature inside the called function. Similarly, if it is passed to a lazy formal +// parameter, it becomes lazy within the called function. + +module Sem_050401_top_level_027 { + + type component GeneralComp { + var integer vc_int := 20; + } + + function fx(integer p_int) runs on GeneralComp { + vc_int := 0; // doesn't have effect on the parameter value anymore as the parameter is not lazy + if (p_int == 21) { setverdict(pass); } + else { setverdict(fail); } + } + function f(@lazy integer p_int) runs on GeneralComp { + fx(p_int); // causes evaluation of the value + } + + testcase TC_Sem_050401_top_level_027() runs on GeneralComp { + f(vc_int + 1); // vc_int is equal to 20 at the time of function call + } + + control{ + execute(TC_Sem_050401_top_level_027()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/050401_top_level/Sem_050401_top_level_028.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/050401_top_level/Sem_050401_top_level_028.ttcn new file mode 100644 index 00000000..011051ba --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/050401_top_level/Sem_050401_top_level_028.ttcn @@ -0,0 +1,36 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.1, verify that passing fuzzy parameter to formal parameter without modifier disables fuzzy evaluation + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Lazy and fuzzy properties are valid only in the scope, where the parameters' names are visible. +// For example, if a fuzzy parameter is passed to a formal parameter declared without a modifier, it +// loses its fuzzy feature inside the called function. Similarly, if it is passed to a lazy formal +// parameter, it becomes lazy within the called function. + +module Sem_050401_top_level_028 { + + type component GeneralComp { + var integer vc_int := 20; + } + + function fx(integer p_int) runs on GeneralComp { + vc_int := 0; // doesn't have effect on the parameter value anymore as the parameter is not lazy + if (p_int == 21) { setverdict(pass); } + else { setverdict(fail); } + } + function f(@fuzzy integer p_int) runs on GeneralComp { + fx(p_int); // causes evaluation of the value + } + + testcase TC_Sem_050401_top_level_028() runs on GeneralComp { + f(vc_int + 1); // vc_int is equal to 20 at the time of function call + } + + control{ + execute(TC_Sem_050401_top_level_028()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/050401_top_level/Sem_050401_top_level_029.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/050401_top_level/Sem_050401_top_level_029.ttcn new file mode 100644 index 00000000..8c9e203a --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/050401_top_level/Sem_050401_top_level_029.ttcn @@ -0,0 +1,39 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.1, verify that fuzzy parameter passed to lazy formal parameter enables lazy evaluation + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Lazy and fuzzy properties are valid only in the scope, where the parameters' names are visible. +// For example, if a fuzzy parameter is passed to a formal parameter declared without a modifier, it +// loses its fuzzy feature inside the called function. Similarly, if it is passed to a lazy formal +// parameter, it becomes lazy within the called function. + +module Sem_050401_top_level_029 { + + type component GeneralComp { + var integer vc_int := 20; + } + + function fx(@lazy integer p_int) runs on GeneralComp { + vc_int := 0; // p_int hasn't been evaluated yet - this change will have impact on evaluation + if (p_int == 1) { setverdict(pass); } + else { setverdict(fail); } + vc_int := 10; // no impact on p_int value as the parameter has been already evaluated + if (p_int == 1) { setverdict(pass); } + else { setverdict(fail); } + } + function f(@fuzzy integer p_int) runs on GeneralComp { + fx(p_int); // no evaluation of the value yet + } + + testcase TC_Sem_050401_top_level_029() runs on GeneralComp { + f(vc_int + 1); // vc_int is equal to 20 at the time of function call + } + + control{ + execute(TC_Sem_050401_top_level_029()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_001.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_001.ttcn new file mode 100644 index 00000000..23fe8bd5 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_001.ttcn @@ -0,0 +1,33 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that template parameters cannot be used as in formal value parameters of functions + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed by value to in formal value parameters shall be +// variables, literal values, module parameters, constants, variables, value returning +// (external) functions, formal value parameters (of in, inout or out parameterization) +// of the current scope or expressions composed of the above. + +module NegSem_050402_actual_parameters_001 { + + type component GeneralComp { + } + + template integer m_msg := 1; + + function f_test(in integer p_val) { + if (p_val == 1) { setverdict(pass); } + else { setverdict(fail); } + } + + testcase TC_NegSem_050402_actual_parameters_001() runs on GeneralComp { + f_test(m_msg); // tested parameter passing + } + + control { + execute(TC_NegSem_050402_actual_parameters_001()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_002.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_002.ttcn new file mode 100644 index 00000000..ff69a38e --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_002.ttcn @@ -0,0 +1,32 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that template variables cannot be used as in formal value parameters of functions + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed by value to in formal value parameters shall be +// variables, literal values, module parameters, constants, variables, value returning +// (external) functions, formal value parameters (of in, inout or out parameterization) +// of the current scope or expressions composed of the above. + +module NegSem_050402_actual_parameters_002 { + + type component GeneralComp { + } + + function f_test(in integer p_val) { + if (p_val == 2) { setverdict(pass); } + else { setverdict(fail); } + } + + testcase TC_NegSem_050402_actual_parameters_002() runs on GeneralComp { + var template integer vm_msg := 2; + f_test(vm_msg); // tested parameter passing + } + + control { + execute(TC_NegSem_050402_actual_parameters_002()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_003.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_003.ttcn new file mode 100644 index 00000000..0af96803 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_003.ttcn @@ -0,0 +1,36 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that template in parameters cannot be used as in formal value parameters of functions + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed by value to in formal value parameters shall be +// variables, literal values, module parameters, constants, variables, value returning +// (external) functions, formal value parameters (of in, inout or out parameterization) +// of the current scope or expressions composed of the above. + +module NegSem_050402_actual_parameters_003 { + + type component GeneralComp { + } + + function f_test(in integer p_val) { + if (p_val == 3) { setverdict(pass); } + else { setverdict(fail); } + } + + function f_caller(in template integer p_val) { + f_test(p_val); // tested parameter passing + } + + + testcase TC_NegSem_050402_actual_parameters_003() runs on GeneralComp { + f_caller(3); // this parameter passing is not a subject of the test + } + + control { + execute(TC_NegSem_050402_actual_parameters_003()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_004.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_004.ttcn new file mode 100644 index 00000000..9f557ab1 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_004.ttcn @@ -0,0 +1,38 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that template out parameters cannot be used as in formal value parameters of functions + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed by value to in formal value parameters shall be +// variables, literal values, module parameters, constants, variables, value returning +// (external) functions, formal value parameters (of in, inout or out parameterization) +// of the current scope or expressions composed of the above. + +module NegSem_050402_actual_parameters_004 { + + type component GeneralComp { + } + + function f_test(in integer p_val) { + if (p_val == 4) { setverdict(pass); } + else { setverdict(fail); } + } + + function f_caller(out template integer p_val) { + p_val := 4; // out parameter shall have a value before we can pass it to a function + f_test(p_val); // tested parameter passing + } + + + testcase TC_NegSem_050402_actual_parameters_004() runs on GeneralComp { + var template integer v_val; + f_caller(v_val); // this parameter passing is not a subject of the test + } + + control { + execute(TC_NegSem_050402_actual_parameters_004()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_005.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_005.ttcn new file mode 100644 index 00000000..f4f70a9a --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_005.ttcn @@ -0,0 +1,37 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that template inout parameters cannot be used as in formal value parameters of functions + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed by value to in formal value parameters shall be +// variables, literal values, module parameters, constants, variables, value returning +// (external) functions, formal value parameters (of in, inout or out parameterization) +// of the current scope or expressions composed of the above. + +module NegSem_050402_actual_parameters_005 { + + type component GeneralComp { + } + + function f_test(in integer p_val) { + if (p_val == 4) { setverdict(pass); } + else { setverdict(fail); } + } + + function f_caller(inout template integer p_val) { + f_test(p_val); // tested parameter passing + } + + + testcase TC_NegSem_050402_actual_parameters_005() runs on GeneralComp { + var template integer v_val := 5; + f_caller(v_val); // this parameter passing is not a subject of the test + } + + control { + execute(TC_NegSem_050402_actual_parameters_005()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_006.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_006.ttcn new file mode 100644 index 00000000..aa285243 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_006.ttcn @@ -0,0 +1,34 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that template parameters cannot be used as in formal value parameters of templates + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed by value to in formal value parameters shall be +// variables, literal values, module parameters, constants, variables, value returning +// (external) functions, formal value parameters (of in, inout or out parameterization) +// of the current scope or expressions composed of the above. + +module NegSem_050402_actual_parameters_006 { + + type component GeneralComp { + } + + template integer m_msg := 1; + + template integer m_test(in integer p_val) := 5 + p_val; + + testcase TC_NegSem_050402_actual_parameters_006() runs on GeneralComp { + if (match(6, m_test(m_msg))) { // tested parameter passing + setverdict(pass); + } else { + setverdict(fail); + } + } + + control { + execute(TC_NegSem_050402_actual_parameters_006()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_007.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_007.ttcn new file mode 100644 index 00000000..5156778e --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_007.ttcn @@ -0,0 +1,33 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that template variables cannot be used as in formal value parameters of templates + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed by value to in formal value parameters shall be +// variables, literal values, module parameters, constants, variables, value returning +// (external) functions, formal value parameters (of in, inout or out parameterization) +// of the current scope or expressions composed of the above. + +module NegSem_050402_actual_parameters_007 { + + type component GeneralComp { + } + + template integer m_test(in integer p_val) := 5 + p_val; + + testcase TC_NegSem_050402_actual_parameters_007() runs on GeneralComp { + var template integer vm_msg := 2; + if (match(7, m_test(vm_msg))) { // tested parameter passing + setverdict(pass); + } else { + setverdict(fail); + } + } + + control { + execute(TC_NegSem_050402_actual_parameters_007()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_008.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_008.ttcn new file mode 100644 index 00000000..fc2194e0 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_008.ttcn @@ -0,0 +1,37 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that template in parameters cannot be used as in formal value parameters of templates + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed by value to in formal value parameters shall be +// variables, literal values, module parameters, constants, variables, value returning +// (external) functions, formal value parameters (of in, inout or out parameterization) +// of the current scope or expressions composed of the above. + +module NegSem_050402_actual_parameters_008 { + + type component GeneralComp { + } + + template integer m_test(in integer p_val) := 5 + p_val; + + function f_caller(in template integer p_val) { + if (match(8, m_test(p_val))) { // tested parameter passing + setverdict(pass); + } else { + setverdict(fail); + } + } + + + testcase TC_NegSem_050402_actual_parameters_008() runs on GeneralComp { + f_caller(3); // this parameter passing is not a subject of the test + } + + control { + execute(TC_NegSem_050402_actual_parameters_008()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_009.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_009.ttcn new file mode 100644 index 00000000..0913be27 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_009.ttcn @@ -0,0 +1,39 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that template out parameters cannot be used as in formal value parameters of templates + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed by value to in formal value parameters shall be +// variables, literal values, module parameters, constants, variables, value returning +// (external) functions, formal value parameters (of in, inout or out parameterization) +// of the current scope or expressions composed of the above. + +module NegSem_050402_actual_parameters_009 { + + type component GeneralComp { + } + + template integer m_test(in integer p_val) := 5 + p_val; + + function f_caller(out template integer p_val) { + p_val := 4; // out parameter shall have a value before we can pass it to a function + if (match(9, m_test(p_val))) { // tested parameter passing + setverdict(pass); + } else { + setverdict(fail); + } + } + + + testcase TC_NegSem_050402_actual_parameters_009() runs on GeneralComp { + var template integer v_val; + f_caller(v_val); // this parameter passing is not a subject of the test + } + + control { + execute(TC_NegSem_050402_actual_parameters_009()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_010.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_010.ttcn new file mode 100644 index 00000000..66a31dd9 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_010.ttcn @@ -0,0 +1,38 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that template inout parameters cannot be used as in formal value parameters of templates + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed by value to in formal value parameters shall be +// variables, literal values, module parameters, constants, variables, value returning +// (external) functions, formal value parameters (of in, inout or out parameterization) +// of the current scope or expressions composed of the above. + +module NegSem_050402_actual_parameters_010 { + + type component GeneralComp { + } + + template integer m_test(in integer p_val) := 5 + p_val; + + function f_caller(inout template integer p_val) { + if (match(10, m_test(p_val))) { // tested parameter passing + setverdict(pass); + } else { + setverdict(fail); + } + } + + + testcase TC_NegSem_050402_actual_parameters_010() runs on GeneralComp { + var template integer v_val := 5; + f_caller(v_val); // this parameter passing is not a subject of the test + } + + control { + execute(TC_NegSem_050402_actual_parameters_010()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_011.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_011.ttcn new file mode 100644 index 00000000..638b29b5 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_011.ttcn @@ -0,0 +1,37 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that template parameters cannot be used as in formal value parameters of altsteps + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed by value to in formal value parameters shall be +// variables, literal values, module parameters, constants, variables, value returning +// (external) functions, formal value parameters (of in, inout or out parameterization) +// of the current scope or expressions composed of the above. + +module NegSem_050402_actual_parameters_011 { + + type component GeneralComp { + timer t := 0.0; + } + + template integer m_msg := 1; + + altstep a_test(integer p_val) runs on GeneralComp { + []t.timeout { + if (p_val == 1) { setverdict(pass); } + else { setverdict(fail); } + } + } + + testcase TC_NegSem_050402_actual_parameters_011() runs on GeneralComp { + t.start; + a_test(m_msg); // tested parameter passing + } + + control { + execute(TC_NegSem_050402_actual_parameters_011()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_012.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_012.ttcn new file mode 100644 index 00000000..37a91024 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_012.ttcn @@ -0,0 +1,36 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that template variables cannot be used as in formal value parameters of altsteps + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed by value to in formal value parameters shall be +// variables, literal values, module parameters, constants, variables, value returning +// (external) functions, formal value parameters (of in, inout or out parameterization) +// of the current scope or expressions composed of the above. + +module NegSem_050402_actual_parameters_012 { + + type component GeneralComp { + timer t := 0.0; + } + + altstep a_test(integer p_val) runs on GeneralComp { + []t.timeout { + if (p_val == 2) { setverdict(pass); } + else { setverdict(fail); } + } + } + + testcase TC_NegSem_050402_actual_parameters_012() runs on GeneralComp { + var template integer vm_msg := 2; + t.start; + a_test(vm_msg); // tested parameter passing + } + + control { + execute(TC_NegSem_050402_actual_parameters_012()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_013.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_013.ttcn new file mode 100644 index 00000000..371fc086 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_013.ttcn @@ -0,0 +1,40 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that template in parameters cannot be used as in formal value parameters of altsteps + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed by value to in formal value parameters shall be +// variables, literal values, module parameters, constants, variables, value returning +// (external) functions, formal value parameters (of in, inout or out parameterization) +// of the current scope or expressions composed of the above. + +module NegSem_050402_actual_parameters_013 { + + type component GeneralComp { + timer t := 0.0; + } + + altstep a_test(integer p_val) runs on GeneralComp { + []t.timeout { + if (p_val == 3) { setverdict(pass); } + else { setverdict(fail); } + } + } + + function f_caller(in template integer p_val) runs on GeneralComp { + a_test(p_val); // tested parameter passing + } + + + testcase TC_NegSem_050402_actual_parameters_013() runs on GeneralComp { + t.start; + f_caller(3); // this parameter passing is not a subject of the test + } + + control { + execute(TC_NegSem_050402_actual_parameters_013()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_014.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_014.ttcn new file mode 100644 index 00000000..b2f7362d --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_014.ttcn @@ -0,0 +1,42 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that template out parameters cannot be used as in formal value parameters of altsteps + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed by value to in formal value parameters shall be +// variables, literal values, module parameters, constants, variables, value returning +// (external) functions, formal value parameters (of in, inout or out parameterization) +// of the current scope or expressions composed of the above. + +module NegSem_050402_actual_parameters_014 { + + type component GeneralComp { + timer t := 0.0; + } + + altstep a_test(integer p_val) runs on GeneralComp { + []t.timeout { + if (p_val == 4) { setverdict(pass); } + else { setverdict(fail); } + } + } + + function f_caller(out template integer p_val) runs on GeneralComp { + p_val := 4; // out parameter shall have a value before we can pass it to a function + a_test(p_val); // tested parameter passing + } + + + testcase TC_NegSem_050402_actual_parameters_014() runs on GeneralComp { + var template integer v_val; + t.start; + f_caller(v_val); // this parameter passing is not a subject of the test + } + + control { + execute(TC_NegSem_050402_actual_parameters_014()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_015.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_015.ttcn new file mode 100644 index 00000000..82f1485b --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_015.ttcn @@ -0,0 +1,41 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that template inout parameters cannot be used as in formal value parameters of altsteps + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed by value to in formal value parameters shall be +// variables, literal values, module parameters, constants, variables, value returning +// (external) functions, formal value parameters (of in, inout or out parameterization) +// of the current scope or expressions composed of the above. + +module NegSem_050402_actual_parameters_015 { + + type component GeneralComp { + timer t := 0.0; + } + + altstep a_test(integer p_val) runs on GeneralComp { + []t.timeout { + if (p_val == 5) { setverdict(pass); } + else { setverdict(fail); } + } + } + + function f_caller(inout template integer p_val) runs on GeneralComp { + a_test(p_val); // tested parameter passing + } + + + testcase TC_NegSem_050402_actual_parameters_015() runs on GeneralComp { + var template integer v_val := 5; + t.start; + f_caller(v_val); // this parameter passing is not a subject of the test + } + + control { + execute(TC_NegSem_050402_actual_parameters_015()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_016.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_016.ttcn new file mode 100644 index 00000000..c960fc52 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_016.ttcn @@ -0,0 +1,29 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that template parameters cannot be used as in formal value parameters of test cases + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed by value to in formal value parameters shall be +// variables, literal values, module parameters, constants, variables, value returning +// (external) functions, formal value parameters (of in, inout or out parameterization) +// of the current scope or expressions composed of the above. + +module NegSem_050402_actual_parameters_016 { + + type component GeneralComp { + } + + template integer m_msg := 1; + + testcase TC_NegSem_050402_actual_parameters_016(in integer p_val) runs on GeneralComp { + if (p_val == 1) { setverdict(pass); } + else { setverdict(fail); } + } + + control { + execute(TC_NegSem_050402_actual_parameters_016(m_msg)); // tested parameter passing + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_017.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_017.ttcn new file mode 100644 index 00000000..354fe092 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_017.ttcn @@ -0,0 +1,28 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that template variables cannot be used as in formal value parameters of test cases + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed by value to in formal value parameters shall be +// variables, literal values, module parameters, constants, variables, value returning +// (external) functions, formal value parameters (of in, inout or out parameterization) +// of the current scope or expressions composed of the above. + +module NegSem_050402_actual_parameters_017 { + + type component GeneralComp { + } + + testcase TC_NegSem_050402_actual_parameters_017(in integer p_val) runs on GeneralComp { + if (p_val == 2) { setverdict(pass); } + else { setverdict(fail); } + } + + control { + var template integer vm_msg := 2; + execute(TC_NegSem_050402_actual_parameters_017(vm_msg)); // tested parameter passing + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_018.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_018.ttcn new file mode 100644 index 00000000..d815a929 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_018.ttcn @@ -0,0 +1,31 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that template in parameters cannot be used as in formal value parameters of test cases + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed by value to in formal value parameters shall be +// variables, literal values, module parameters, constants, variables, value returning +// (external) functions, formal value parameters (of in, inout or out parameterization) +// of the current scope or expressions composed of the above. + +module NegSem_050402_actual_parameters_018 { + + type component GeneralComp { + } + + testcase TC_NegSem_050402_actual_parameters_018(in integer p_val) runs on GeneralComp { + if (p_val == 3) { setverdict(pass); } + else { setverdict(fail); } + } + + function f_caller(in template integer p_val) { + execute(TC_NegSem_050402_actual_parameters_018(p_val)); // tested parameter passing + } + + control { + f_caller(3); // this parameter passing is not a subject of the test + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_019.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_019.ttcn new file mode 100644 index 00000000..fa2d9a28 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_019.ttcn @@ -0,0 +1,33 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that template out parameters cannot be used as in formal value parameters of test cases + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed by value to in formal value parameters shall be +// variables, literal values, module parameters, constants, variables, value returning +// (external) functions, formal value parameters (of in, inout or out parameterization) +// of the current scope or expressions composed of the above. + +module NegSem_050402_actual_parameters_019 { + + type component GeneralComp { + } + + testcase TC_NegSem_050402_actual_parameters_019(in integer p_val) runs on GeneralComp { + if (p_val == 4) { setverdict(pass); } + else { setverdict(fail); } + } + + function f_caller(out template integer p_val) { + p_val := 4; // out parameter shall have a value before we can pass it to a function + execute(TC_NegSem_050402_actual_parameters_019(p_val)); // tested parameter passing + } + + control { + var template integer vm_val; + f_caller(vm_val); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_020.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_020.ttcn new file mode 100644 index 00000000..b2555fef --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_020.ttcn @@ -0,0 +1,32 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that template inout parameters cannot be used as in formal value parameters of test cases + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed by value to in formal value parameters shall be +// variables, literal values, module parameters, constants, variables, value returning +// (external) functions, formal value parameters (of in, inout or out parameterization) +// of the current scope or expressions composed of the above. + +module NegSem_050402_actual_parameters_020 { + + type component GeneralComp { + } + + testcase TC_NegSem_050402_actual_parameters_020(in integer p_val) runs on GeneralComp { + if (p_val == 5) { setverdict(pass); } + else { setverdict(fail); } + } + + function f_caller(inout template integer p_val) { + execute(TC_NegSem_050402_actual_parameters_020(p_val)); // tested parameter passing + } + + control { + var template integer vm_val := 5; + f_caller(vm_val); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_021.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_021.ttcn new file mode 100644 index 00000000..17f107d6 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_021.ttcn @@ -0,0 +1,30 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that literals cannot be used as inout formal value parameters of functions + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to inout formal value parameters shall be variables +// or formal value parameters (of in, inout or out parameterization) or references to +// elements of variables or formal value parameters of structured types. + +module NegSem_050402_actual_parameters_021 { + + type component GeneralComp { + } + + function f_test(inout integer p_val) { + if (p_val == 1) { setverdict(pass); } + else { setverdict(fail); } + } + + testcase TC_NegSem_050402_actual_parameters_021() runs on GeneralComp { + f_test(1); // tested parameter passing + } + + control { + execute(TC_NegSem_050402_actual_parameters_021()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_022.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_022.ttcn new file mode 100644 index 00000000..5e3c5fd3 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_022.ttcn @@ -0,0 +1,32 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that module parameters cannot be used as inout formal value parameters of functions + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to inout formal value parameters shall be variables +// or formal value parameters (of in, inout or out parameterization) or references to +// elements of variables or formal value parameters of structured types. + +module NegSem_050402_actual_parameters_022 { + + type component GeneralComp { + } + + modulepar integer PX_VAL := 2; + + function f_test(inout integer p_val) { + if (p_val == 2) { setverdict(pass); } + else { setverdict(fail); } + } + + testcase TC_NegSem_050402_actual_parameters_022() runs on GeneralComp { + f_test(PX_VAL); // tested parameter passing + } + + control { + execute(TC_NegSem_050402_actual_parameters_022()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_023.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_023.ttcn new file mode 100644 index 00000000..875e14b7 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_023.ttcn @@ -0,0 +1,32 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that constants cannot be used as inout formal value parameters of functions + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to inout formal value parameters shall be variables +// or formal value parameters (of in, inout or out parameterization) or references to +// elements of variables or formal value parameters of structured types. + +module NegSem_050402_actual_parameters_023 { + + type component GeneralComp { + } + + const integer c_val := 3; + + function f_test(inout integer p_val) { + if (p_val == 3) { setverdict(pass); } + else { setverdict(fail); } + } + + testcase TC_NegSem_050402_actual_parameters_023() runs on GeneralComp { + f_test(c_val); // tested parameter passing + } + + control { + execute(TC_NegSem_050402_actual_parameters_023()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_024.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_024.ttcn new file mode 100644 index 00000000..76e596bf --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_024.ttcn @@ -0,0 +1,34 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that function calls cannot be used as inout formal value parameters of functions + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to inout formal value parameters shall be variables +// or formal value parameters (of in, inout or out parameterization) or references to +// elements of variables or formal value parameters of structured types. + +module NegSem_050402_actual_parameters_024 { + + type component GeneralComp { + } + + function f_ret() return integer { + return 5; + } + + function f_test(inout integer p_val) { + if (p_val == 5) { setverdict(pass); } + else { setverdict(fail); } + } + + testcase TC_NegSem_050402_actual_parameters_024() runs on GeneralComp { + f_test(f_ret()); // tested parameter passing + } + + control { + execute(TC_NegSem_050402_actual_parameters_024()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_025.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_025.ttcn new file mode 100644 index 00000000..46e231cb --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_025.ttcn @@ -0,0 +1,35 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that expressions cannot be used as inout formal value parameters of functions + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to inout formal value parameters shall be variables +// or formal value parameters (of in, inout or out parameterization) or references to +// elements of variables or formal value parameters of structured types. + +module NegSem_050402_actual_parameters_025 { + + type component GeneralComp { + } + + function f_ret() return integer { + return 4; + } + + function f_test(inout integer p_val) { + if (p_val == 9) { setverdict(pass); } + else { setverdict(fail); } + } + + testcase TC_NegSem_050402_actual_parameters_025() runs on GeneralComp { + var integer v_val := 5; + f_test(10 + f_ret() - v_val); // tested parameter passing + } + + control { + execute(TC_NegSem_050402_actual_parameters_025()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_026.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_026.ttcn new file mode 100644 index 00000000..fe08fbf0 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_026.ttcn @@ -0,0 +1,32 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that template parameters cannot be used as inout formal value parameters of functions + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to inout formal value parameters shall be variables +// or formal value parameters (of in, inout or out parameterization) or references to +// elements of variables or formal value parameters of structured types. + +module NegSem_050402_actual_parameters_026 { + + type component GeneralComp { + } + + template integer m_msg := 1; + + function f_test(inout integer p_val) { + if (p_val == 1) { setverdict(pass); } + else { setverdict(fail); } + } + + testcase TC_NegSem_050402_actual_parameters_026() runs on GeneralComp { + f_test(m_msg); // tested parameter passing + } + + control { + execute(TC_NegSem_050402_actual_parameters_026()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_027.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_027.ttcn new file mode 100644 index 00000000..b5059bb2 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_027.ttcn @@ -0,0 +1,31 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that template variables cannot be used as inout formal value parameters of functions + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to inout formal value parameters shall be variables +// or formal value parameters (of in, inout or out parameterization) or references to +// elements of variables or formal value parameters of structured types. + +module NegSem_050402_actual_parameters_027 { + + type component GeneralComp { + } + + function f_test(inout integer p_val) { + if (p_val == 2) { setverdict(pass); } + else { setverdict(fail); } + } + + testcase TC_NegSem_050402_actual_parameters_027() runs on GeneralComp { + var template integer vm_msg := 2; + f_test(vm_msg); // tested parameter passing + } + + control { + execute(TC_NegSem_050402_actual_parameters_027()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_028.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_028.ttcn new file mode 100644 index 00000000..77b5ada9 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_028.ttcn @@ -0,0 +1,35 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that template in parameters cannot be used as inout formal value parameters of functions + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to inout formal value parameters shall be variables +// or formal value parameters (of in, inout or out parameterization) or references to +// elements of variables or formal value parameters of structured types. + +module NegSem_050402_actual_parameters_028 { + + type component GeneralComp { + } + + function f_test(inout integer p_val) { + if (p_val == 3) { setverdict(pass); } + else { setverdict(fail); } + } + + function f_caller(in template integer p_val) { + f_test(p_val); // tested parameter passing + } + + + testcase TC_NegSem_050402_actual_parameters_028() runs on GeneralComp { + f_caller(3); // this parameter passing is not a subject of the test + } + + control { + execute(TC_NegSem_050402_actual_parameters_028()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_029.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_029.ttcn new file mode 100644 index 00000000..1bf8fecb --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_029.ttcn @@ -0,0 +1,37 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that template out parameters cannot be used as inout formal value parameters of functions + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to inout formal value parameters shall be variables +// or formal value parameters (of in, inout or out parameterization) or references to +// elements of variables or formal value parameters of structured types. + +module NegSem_050402_actual_parameters_029 { + + type component GeneralComp { + } + + function f_test(inout integer p_val) { + if (p_val == 4) { setverdict(pass); } + else { setverdict(fail); } + } + + function f_caller(out template integer p_val) { + p_val := 4; // out parameter shall have a value before we can pass it to a function + f_test(p_val); // tested parameter passing + } + + + testcase TC_NegSem_050402_actual_parameters_029() runs on GeneralComp { + var template integer v_val; + f_caller(v_val); // this parameter passing is not a subject of the test + } + + control { + execute(TC_NegSem_050402_actual_parameters_029()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_030.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_030.ttcn new file mode 100644 index 00000000..61383d58 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_030.ttcn @@ -0,0 +1,36 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that template inout parameters cannot be used as inout formal value parameters of functions + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to inout formal value parameters shall be variables +// or formal value parameters (of in, inout or out parameterization) or references to +// elements of variables or formal value parameters of structured types. + +module NegSem_050402_actual_parameters_030 { + + type component GeneralComp { + } + + function f_test(in integer p_val) { + if (p_val == 4) { setverdict(pass); } + else { setverdict(fail); } + } + + function f_caller(inout template integer p_val) { + f_test(p_val); // tested parameter passing + } + + + testcase TC_NegSem_050402_actual_parameters_030() runs on GeneralComp { + var template integer v_val := 5; + f_caller(v_val); // this parameter passing is not a subject of the test + } + + control { + execute(TC_NegSem_050402_actual_parameters_030()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_031.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_031.ttcn new file mode 100644 index 00000000..3b92e1fc --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_031.ttcn @@ -0,0 +1,35 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that template variable element reference cannot be used as inout formal value parameters of functions + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to inout formal value parameters shall be variables +// or formal value parameters (of in, inout or out parameterization) or references to +// elements of variables or formal value parameters of structured types. + +module NegSem_050402_actual_parameters_031 { + + type component GeneralComp { + } + + type record R { + integer field1 + } + + function f_test(inout integer p_val) { + if (p_val == 10) { setverdict(pass); } + else { setverdict(fail); } + } + + testcase TC_NegSem_050402_actual_parameters_031() runs on GeneralComp { + var template R v_val := { field1 := 10 }; + f_test(v_val.field1); // tested parameter passing + } + + control { + execute(TC_NegSem_050402_actual_parameters_031()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_032.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_032.ttcn new file mode 100644 index 00000000..2a66339e --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_032.ttcn @@ -0,0 +1,38 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that reference to elements of formal value parameters cannot be used as inout formal value parameters of functions + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to inout formal value parameters shall be variables +// or formal value parameters (of in, inout or out parameterization) or references to +// elements of variables or formal value parameters of structured types. + +module NegSem_050402_actual_parameters_032 { + + type component GeneralComp { + } + + type record R { + integer field1 + } + + function f_test(inout integer p_val) { + if (p_val == 11) { setverdict(pass); } + else { setverdict(fail); } + } + + function f_caller(in template R p_param) { + f_test(p_param.field1); // tested parameter passing + } + + testcase TC_NegSem_050402_actual_parameters_032() runs on GeneralComp { + f_caller({field1 := 11 }); + } + + control { + execute(TC_NegSem_050402_actual_parameters_032()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_033.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_033.ttcn new file mode 100644 index 00000000..1f7e1bdb --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_033.ttcn @@ -0,0 +1,34 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that literals cannot be used as inout formal value parameters of altsteps + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to inout formal value parameters shall be variables +// or formal value parameters (of in, inout or out parameterization) or references to +// elements of variables or formal value parameters of structured types. + +module NegSem_050402_actual_parameters_033 { + + type component GeneralComp { + timer t := 0.0; + } + + altstep a_test(inout integer p_val) runs on GeneralComp { + []t.timeout { + if (p_val == 1) { setverdict(pass); } + else { setverdict(fail); } + } + } + + testcase TC_NegSem_050402_actual_parameters_033() runs on GeneralComp { + t.start; + a_test(1); // tested parameter passing + } + + control { + execute(TC_NegSem_050402_actual_parameters_033()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_034.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_034.ttcn new file mode 100644 index 00000000..51f663e2 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_034.ttcn @@ -0,0 +1,36 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that module parameters cannot be used as inout formal value parameters of altsteps + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to inout formal value parameters shall be variables +// or formal value parameters (of in, inout or out parameterization) or references to +// elements of variables or formal value parameters of structured types. + +module NegSem_050402_actual_parameters_034 { + + type component GeneralComp { + timer t := 0.0; + } + + modulepar integer PX_VAL := 2; + + altstep a_test(inout integer p_val) runs on GeneralComp { + []t.timeout { + if (p_val == 2) { setverdict(pass); } + else { setverdict(fail); } + } + } + + testcase TC_NegSem_050402_actual_parameters_034() runs on GeneralComp { + t.start; + a_test(PX_VAL); // tested parameter passing + } + + control { + execute(TC_NegSem_050402_actual_parameters_034()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_035.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_035.ttcn new file mode 100644 index 00000000..75e3cc62 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_035.ttcn @@ -0,0 +1,36 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that constants cannot be used as inout formal value parameters of altsteps + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to inout formal value parameters shall be variables +// or formal value parameters (of in, inout or out parameterization) or references to +// elements of variables or formal value parameters of structured types. + +module NegSem_050402_actual_parameters_035 { + + type component GeneralComp { + timer t := 0.0; + } + + const integer c_val := 3; + + altstep a_test(inout integer p_val) runs on GeneralComp { + []t.timeout { + if (p_val == 3) { setverdict(pass); } + else { setverdict(fail); } + } + } + + testcase TC_NegSem_050402_actual_parameters_035() runs on GeneralComp { + t.start; + a_test(c_val); // tested parameter passing + } + + control { + execute(TC_NegSem_050402_actual_parameters_035()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_036.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_036.ttcn new file mode 100644 index 00000000..631b20ff --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_036.ttcn @@ -0,0 +1,38 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that function calls cannot be used as inout formal value parameters of altsteps + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to inout formal value parameters shall be variables +// or formal value parameters (of in, inout or out parameterization) or references to +// elements of variables or formal value parameters of structured types. + +module NegSem_050402_actual_parameters_036 { + + type component GeneralComp { + timer t := 0.0; + } + + function f_ret() return integer { + return 5; + } + + altstep a_test(inout integer p_val) runs on GeneralComp { + []t.timeout { + if (p_val == 5) { setverdict(pass); } + else { setverdict(fail); } + } + } + + testcase TC_NegSem_050402_actual_parameters_036() runs on GeneralComp { + t.start; + a_test(f_ret()); // tested parameter passing + } + + control { + execute(TC_NegSem_050402_actual_parameters_036()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_037.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_037.ttcn new file mode 100644 index 00000000..2ddd75ee --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_037.ttcn @@ -0,0 +1,39 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that expressions cannot be used as inout formal value parameters of altsteps + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to inout formal value parameters shall be variables +// or formal value parameters (of in, inout or out parameterization) or references to +// elements of variables or formal value parameters of structured types. + +module NegSem_050402_actual_parameters_037 { + + type component GeneralComp { + timer t := 0.0; + } + + function f_ret() return integer { + return 4; + } + + altstep a_test(inout integer p_val) runs on GeneralComp { + []t.timeout { + if (p_val == 9) { setverdict(pass); } + else { setverdict(fail); } + } + } + + testcase TC_NegSem_050402_actual_parameters_037() runs on GeneralComp { + var integer v_val := 5; + t.start; + a_test(10 + f_ret() - v_val); // tested parameter passing + } + + control { + execute(TC_NegSem_050402_actual_parameters_037()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_038.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_038.ttcn new file mode 100644 index 00000000..ca9dbefa --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_038.ttcn @@ -0,0 +1,36 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that template parameters cannot be used as inout formal value parameters of altsteps + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to inout formal value parameters shall be variables +// or formal value parameters (of in, inout or out parameterization) or references to +// elements of variables or formal value parameters of structured types. + +module NegSem_050402_actual_parameters_038 { + + type component GeneralComp { + timer t := 0.0; + } + + template integer m_msg := 1; + + altstep a_test(inout integer p_val) runs on GeneralComp { + []t.timeout { + if (p_val == 1) { setverdict(pass); } + else { setverdict(fail); } + } + } + + testcase TC_NegSem_050402_actual_parameters_038() runs on GeneralComp { + t.start; + a_test(m_msg); // tested parameter passing + } + + control { + execute(TC_NegSem_050402_actual_parameters_038()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_039.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_039.ttcn new file mode 100644 index 00000000..6895f59b --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_039.ttcn @@ -0,0 +1,35 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that template variables cannot be used as inout formal value parameters of altsteps + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to inout formal value parameters shall be variables +// or formal value parameters (of in, inout or out parameterization) or references to +// elements of variables or formal value parameters of structured types. + +module NegSem_050402_actual_parameters_039 { + + type component GeneralComp { + timer t := 0.0; + } + + altstep a_test(inout integer p_val) runs on GeneralComp { + []t.timeout { + if (p_val == 1) { setverdict(pass); } + else { setverdict(fail); } + } + } + + testcase TC_NegSem_050402_actual_parameters_039() runs on GeneralComp { + var template integer vm_msg := 2; + t.start; + a_test(vm_msg); // tested parameter passing + } + + control { + execute(TC_NegSem_050402_actual_parameters_039()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_040.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_040.ttcn new file mode 100644 index 00000000..7effbefe --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_040.ttcn @@ -0,0 +1,39 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that template in parameters cannot be used as inout formal value parameters of altsteps + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to inout formal value parameters shall be variables +// or formal value parameters (of in, inout or out parameterization) or references to +// elements of variables or formal value parameters of structured types.. + +module NegSem_050402_actual_parameters_040 { + + type component GeneralComp { + timer t := 0.0; + } + + altstep a_test(inout integer p_val) runs on GeneralComp { + []t.timeout { + if (p_val == 1) { setverdict(pass); } + else { setverdict(fail); } + } + } + + function f_caller(in template integer p_val) runs on GeneralComp { + a_test(p_val); // tested parameter passing + } + + + testcase TC_NegSem_050402_actual_parameters_040() runs on GeneralComp { + t.start; + f_caller(3); // this parameter passing is not a subject of the test + } + + control { + execute(TC_NegSem_050402_actual_parameters_040()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_041.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_041.ttcn new file mode 100644 index 00000000..467890d5 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_041.ttcn @@ -0,0 +1,41 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that template out parameters cannot be used as inout formal value parameters of altsteps + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to inout formal value parameters shall be variables +// or formal value parameters (of in, inout or out parameterization) or references to +// elements of variables or formal value parameters of structured types. + +module NegSem_050402_actual_parameters_041 { + + type component GeneralComp { + timer t := 0.0; + } + + altstep a_test(inout integer p_val) runs on GeneralComp { + []t.timeout { + if (p_val == 1) { setverdict(pass); } + else { setverdict(fail); } + } + } + + function f_caller(out template integer p_val) runs on GeneralComp { + p_val := 4; // out parameter shall have a value before we can pass it to a function + a_test(p_val); // tested parameter passing + } + + + testcase TC_NegSem_050402_actual_parameters_041() runs on GeneralComp { + var template integer v_val; + t.start; + f_caller(v_val); // this parameter passing is not a subject of the test + } + + control { + execute(TC_NegSem_050402_actual_parameters_041()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_042.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_042.ttcn new file mode 100644 index 00000000..f98a263e --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_042.ttcn @@ -0,0 +1,40 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that template inout parameters cannot be used as inout formal value parameters of altsteps + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to inout formal value parameters shall be variables +// or formal value parameters (of in, inout or out parameterization) or references to +// elements of variables or formal value parameters of structured types. + +module NegSem_050402_actual_parameters_042 { + + type component GeneralComp { + timer t := 0.0; + } + + altstep a_test(inout integer p_val) runs on GeneralComp { + []t.timeout { + if (p_val == 1) { setverdict(pass); } + else { setverdict(fail); } + } + } + + function f_caller(inout template integer p_val) runs on GeneralComp { + a_test(p_val); // tested parameter passing + } + + + testcase TC_NegSem_050402_actual_parameters_042() runs on GeneralComp { + var template integer v_val := 5; + t.start; + f_caller(v_val); // this parameter passing is not a subject of the test + } + + control { + execute(TC_NegSem_050402_actual_parameters_042()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_043.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_043.ttcn new file mode 100644 index 00000000..b867cf80 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_043.ttcn @@ -0,0 +1,39 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that template variable element reference cannot be used as inout formal value parameters of altsteps + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to inout formal value parameters shall be variables +// or formal value parameters (of in, inout or out parameterization) or references to +// elements of variables or formal value parameters of structured types. + +module NegSem_050402_actual_parameters_043 { + + type component GeneralComp { + timer t := 0.0; + } + + type record R { + integer field1 + } + + altstep a_test(inout integer p_val) runs on GeneralComp { + []t.timeout { + if (p_val == 10) { setverdict(pass); } + else { setverdict(fail); } + } + } + + testcase TC_NegSem_050402_actual_parameters_043() runs on GeneralComp { + var template R v_val := { field1 := 10 }; + t.start; + a_test(v_val.field1); // tested parameter passing + } + + control { + execute(TC_NegSem_050402_actual_parameters_043()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_044.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_044.ttcn new file mode 100644 index 00000000..f2ab835b --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_044.ttcn @@ -0,0 +1,42 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that reference to elements of formal value parameters cannot be used as inout formal value parameters of altsteps + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to inout formal value parameters shall be variables +// or formal value parameters (of in, inout or out parameterization) or references to +// elements of variables or formal value parameters of structured types. + +module NegSem_050402_actual_parameters_044 { + + type component GeneralComp { + timer t := 0.0; + } + + type record R { + integer field1 + } + + altstep a_test(inout integer p_val) runs on GeneralComp { + []t.timeout { + if (p_val == 11) { setverdict(pass); } + else { setverdict(fail); } + } + } + + function f_caller(in template R p_param) runs on GeneralComp { + a_test(p_param.field1); // tested parameter passing + } + + testcase TC_NegSem_050402_actual_parameters_044() runs on GeneralComp { + t.start; + f_caller({field1 := 11 }); + } + + control { + execute(TC_NegSem_050402_actual_parameters_044()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_045.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_045.ttcn new file mode 100644 index 00000000..1e9d6e12 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_045.ttcn @@ -0,0 +1,26 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that literals cannot be used as inout formal value parameters of test cases + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to inout formal value parameters shall be variables +// or formal value parameters (of in, inout or out parameterization) or references to +// elements of variables or formal value parameters of structured types. + +module NegSem_050402_actual_parameters_045 { + + type component GeneralComp { + } + + testcase TC_NegSem_050402_actual_parameters_045(inout integer p_val) runs on GeneralComp { + if (p_val == 1) { setverdict(pass); } + else { setverdict(fail); } + } + + control { + execute(TC_NegSem_050402_actual_parameters_045(1)); // tested parameter passing + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_046.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_046.ttcn new file mode 100644 index 00000000..f3769424 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_046.ttcn @@ -0,0 +1,28 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that module parameters cannot be used as inout formal value parameters of test cases + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to inout formal value parameters shall be variables +// or formal value parameters (of in, inout or out parameterization) or references to +// elements of variables or formal value parameters of structured types. + +module NegSem_050402_actual_parameters_046 { + + type component GeneralComp { + } + + modulepar integer PX_VAL := 2; + + testcase TC_NegSem_050402_actual_parameters_046(inout integer p_val) runs on GeneralComp { + if (p_val == 2) { setverdict(pass); } + else { setverdict(fail); } + } + + control { + execute(TC_NegSem_050402_actual_parameters_046(PX_VAL)); // tested parameter passing + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_047.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_047.ttcn new file mode 100644 index 00000000..f6bb3aeb --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_047.ttcn @@ -0,0 +1,28 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that constants cannot be used as inout formal value parameters of test cases + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to inout formal value parameters shall be variables +// or formal value parameters (of in, inout or out parameterization) or references to +// elements of variables or formal value parameters of structured types. + +module NegSem_050402_actual_parameters_047 { + + type component GeneralComp { + } + + const integer c_val := 3; + + testcase TC_NegSem_050402_actual_parameters_047(inout integer p_val) runs on GeneralComp { + if (p_val == 3) { setverdict(pass); } + else { setverdict(fail); } + } + + control { + execute(TC_NegSem_050402_actual_parameters_047(c_val)); // tested parameter passing + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_048.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_048.ttcn new file mode 100644 index 00000000..9133f269 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_048.ttcn @@ -0,0 +1,30 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that function calls cannot be used as inout formal value parameters of test cases + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to inout formal value parameters shall be variables +// or formal value parameters (of in, inout or out parameterization) or references to +// elements of variables or formal value parameters of structured types. + +module NegSem_050402_actual_parameters_048 { + + type component GeneralComp { + } + + function f_ret() return integer { + return 5; + } + + testcase TC_NegSem_050402_actual_parameters_048(inout integer p_val) runs on GeneralComp { + if (p_val == 5) { setverdict(pass); } + else { setverdict(fail); } + } + + control { + execute(TC_NegSem_050402_actual_parameters_048(f_ret())); // tested parameter passing + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_049.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_049.ttcn new file mode 100644 index 00000000..2c0e44c1 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_049.ttcn @@ -0,0 +1,31 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that expressions cannot be used as inout formal value parameters of test cases + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to inout formal value parameters shall be variables +// or formal value parameters (of in, inout or out parameterization) or references to +// elements of variables or formal value parameters of structured types. + +module NegSem_050402_actual_parameters_049 { + + type component GeneralComp { + } + + function f_ret() return integer { + return 4; + } + + testcase TC_NegSem_050402_actual_parameters_049(inout integer p_val) runs on GeneralComp { + if (p_val == 9) { setverdict(pass); } + else { setverdict(fail); } + } + + control { + var integer v_val := 5; + execute(TC_NegSem_050402_actual_parameters_049(10 + f_ret() - v_val)); // tested parameter passing + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_050.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_050.ttcn new file mode 100644 index 00000000..fb2255d2 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_050.ttcn @@ -0,0 +1,28 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that template parameters cannot be used as inout formal value parameters of test cases + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to inout formal value parameters shall be variables +// or formal value parameters (of in, inout or out parameterization) or references to +// elements of variables or formal value parameters of structured types. + +module NegSem_050402_actual_parameters_050 { + + type component GeneralComp { + } + + template integer m_msg := 1; + + testcase TC_NegSem_050402_actual_parameters_050(inout integer p_val) runs on GeneralComp { + if (p_val == 1) { setverdict(pass); } + else { setverdict(fail); } + } + + control { + execute(TC_NegSem_050402_actual_parameters_050(m_msg)); // tested parameter passing + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_051.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_051.ttcn new file mode 100644 index 00000000..6b972a1c --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_051.ttcn @@ -0,0 +1,26 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that template variables cannot be used as inout formal value parameters of test cases + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to inout formal value parameters shall be variables +// or formal value parameters (of in, inout or out parameterization) or references to +// elements of variables or formal value parameters of structured types. +module NegSem_050402_actual_parameters_051 { + + type component GeneralComp { + } + + testcase TC_NegSem_050402_actual_parameters_051(inout integer p_val) runs on GeneralComp { + if (p_val == 2) { setverdict(pass); } + else { setverdict(fail); } + } + + control { + var template integer vm_msg := 2; + execute(TC_NegSem_050402_actual_parameters_051(vm_msg)); // tested parameter passing + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_052.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_052.ttcn new file mode 100644 index 00000000..87fd26c1 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_052.ttcn @@ -0,0 +1,30 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that template in parameters cannot be used as inout formal value parameters of test cases + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to inout formal value parameters shall be variables +// or formal value parameters (of in, inout or out parameterization) or references to +// elements of variables or formal value parameters of structured types. + +module NegSem_050402_actual_parameters_052 { + + type component GeneralComp { + } + + testcase TC_NegSem_050402_actual_parameters_052(inout integer p_val) runs on GeneralComp { + if (p_val == 3) { setverdict(pass); } + else { setverdict(fail); } + } + + function f_caller(in template integer p_val) { + execute(TC_NegSem_050402_actual_parameters_052(p_val)); // tested parameter passing + } + + control { + f_caller(3); // this parameter passing is not a subject of the test + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_053.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_053.ttcn new file mode 100644 index 00000000..efd7cce4 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_053.ttcn @@ -0,0 +1,32 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that template out parameters cannot be used as inout formal value parameters of test cases + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to inout formal value parameters shall be variables +// or formal value parameters (of in, inout or out parameterization) or references to +// elements of variables or formal value parameters of structured types. + +module NegSem_050402_actual_parameters_053 { + + type component GeneralComp { + } + + testcase TC_NegSem_050402_actual_parameters_053(inout integer p_val) runs on GeneralComp { + if (p_val == 4) { setverdict(pass); } + else { setverdict(fail); } + } + + function f_caller(out template integer p_val) { + p_val := 4; // out parameter shall have a value before we can pass it to a function + execute(TC_NegSem_050402_actual_parameters_053(p_val)); // tested parameter passing + } + + control { + var template integer vm_val; + f_caller(vm_val); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_054.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_054.ttcn new file mode 100644 index 00000000..457e34a9 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_054.ttcn @@ -0,0 +1,31 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that template inout parameters cannot be used as inout formal value parameters of test cases + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to inout formal value parameters shall be variables +// or formal value parameters (of in, inout or out parameterization) or references to +// elements of variables or formal value parameters of structured types. + +module NegSem_050402_actual_parameters_054 { + + type component GeneralComp { + } + + testcase TC_NegSem_050402_actual_parameters_054(inout integer p_val) runs on GeneralComp { + if (p_val == 5) { setverdict(pass); } + else { setverdict(fail); } + } + + function f_caller(inout template integer p_val) { + execute(TC_NegSem_050402_actual_parameters_054(p_val)); // tested parameter passing + } + + control { + var template integer vm_val := 5; + f_caller(vm_val); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_055.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_055.ttcn new file mode 100644 index 00000000..bdf3f20e --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_055.ttcn @@ -0,0 +1,31 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that template variable element reference cannot be used as inout formal value parameters of test cases + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to inout formal value parameters shall be variables +// or formal value parameters (of in, inout or out parameterization) or references to +// elements of variables or formal value parameters of structured types. + +module NegSem_050402_actual_parameters_055 { + + type component GeneralComp { + } + + type record R { + integer field1 + } + + testcase TC_NegSem_050402_actual_parameters_055(inout integer p_val) runs on GeneralComp { + if (p_val == 10) { setverdict(pass); } + else { setverdict(fail); } + } + + control { + var template R v_val := { field1 := 10 }; + execute(TC_NegSem_050402_actual_parameters_055(v_val.field1)); // tested parameter passing + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_056.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_056.ttcn new file mode 100644 index 00000000..0c00f537 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_056.ttcn @@ -0,0 +1,34 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that reference to elements of formal value parameters cannot be used as inout formal value parameters of test cases + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to inout formal value parameters shall be variables +// or formal value parameters (of in, inout or out parameterization) or references to +// elements of variables or formal value parameters of structured types. + +module NegSem_050402_actual_parameters_056 { + + type component GeneralComp { + } + + type record R { + integer field1 + } + + testcase TC_NegSem_050402_actual_parameters_056(inout integer p_val) runs on GeneralComp { + if (p_val == 11) { setverdict(pass); } + else { setverdict(fail); } + } + + function f_caller(in template R p_param) { + execute(TC_NegSem_050402_actual_parameters_056(p_param.field1)); // tested parameter passing + } + + control { + f_caller({field1 := 11 }); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_057.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_057.ttcn new file mode 100644 index 00000000..2773b8e6 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_057.ttcn @@ -0,0 +1,30 @@ +/*************************************************** + ** @author STF 487 (updated by STF 521) + ** @version 0.0.2 + ** @purpose 1:5.4.2, verify that literals cannot be used as out formal template parameters of functions + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to out formal template parameters shall be template variables, +// formal template parameters or references to elements of template variables or formal template +// parameters of structured types. + +module NegSem_050402_actual_parameters_057 { + + type component GeneralComp { + } + + function f_test(out template integer p_val) { + p_val := ?; + setverdict(pass); + } + + testcase TC_NegSem_050402_actual_parameters_057() runs on GeneralComp { + f_test(1); // tested parameter passing + } + + control { + execute(TC_NegSem_050402_actual_parameters_057()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_058.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_058.ttcn new file mode 100644 index 00000000..dfd1dbb0 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_058.ttcn @@ -0,0 +1,32 @@ +/*************************************************** + ** @author STF 487 (updated by STF 521) + ** @version 0.0.2 + ** @purpose 1:5.4.2, verify that module parameters cannot be used as out formal template parameters of functions + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to out formal template parameters shall be template variables, +// formal template parameters or references to elements of template variables or formal template +// parameters of structured types. + +module NegSem_050402_actual_parameters_058 { + + type component GeneralComp { + } + + modulepar integer PX_VAL := 2; + + function f_test(out template integer p_val) { + p_val := ?; + setverdict(pass); + } + + testcase TC_NegSem_050402_actual_parameters_058() runs on GeneralComp { + f_test(PX_VAL); // tested parameter passing + } + + control { + execute(TC_NegSem_050402_actual_parameters_058()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_059.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_059.ttcn new file mode 100644 index 00000000..15cdf62d --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_059.ttcn @@ -0,0 +1,32 @@ +/*************************************************** + ** @author STF 487 (updated by STF 521) + ** @version 0.0.2 + ** @purpose 1:5.4.2, verify that constants cannot be used as out formal template parameters of functions + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to out formal template parameters shall be template variables, +// formal template parameters or references to elements of template variables or formal template +// parameters of structured types. + +module NegSem_050402_actual_parameters_059 { + + type component GeneralComp { + } + + const integer c_val := 3; + + function f_test(out template integer p_val) { + p_val := ?; + setverdict(pass); + } + + testcase TC_NegSem_050402_actual_parameters_059() runs on GeneralComp { + f_test(c_val); // tested parameter passing + } + + control { + execute(TC_NegSem_050402_actual_parameters_059()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_060.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_060.ttcn new file mode 100644 index 00000000..2ed380f5 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_060.ttcn @@ -0,0 +1,34 @@ +/*************************************************** + ** @author STF 487 (updated by STF 521) + ** @version 0.0.2 + ** @purpose 1:5.4.2, verify that function calls cannot be used as out formal template parameters of functions + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to out formal template parameters shall be template variables, +// formal template parameters or references to elements of template variables or formal template +// parameters of structured types. + +module NegSem_050402_actual_parameters_060 { + + type component GeneralComp { + } + + function f_ret() return integer { + return 5; + } + + function f_test(out template integer p_val) { + p_val := ?; + setverdict(pass); + } + + testcase TC_NegSem_050402_actual_parameters_060() runs on GeneralComp { + f_test(f_ret()); // tested parameter passing + } + + control { + execute(TC_NegSem_050402_actual_parameters_060()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_061.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_061.ttcn new file mode 100644 index 00000000..8485d5d8 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_061.ttcn @@ -0,0 +1,35 @@ +/*************************************************** + ** @author STF 487 (updated by STF 521) + ** @version 0.0.2 + ** @purpose 1:5.4.2, verify that expressions cannot be used as out formal template parameters of functions + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to out formal template parameters shall be template variables, +// formal template parameters or references to elements of template variables or formal template +// parameters of structured types. + +module NegSem_050402_actual_parameters_061 { + + type component GeneralComp { + } + + function f_ret() return integer { + return 4; + } + + function f_test(out template integer p_val) { + p_val := ?; + setverdict(pass); + } + + testcase TC_NegSem_050402_actual_parameters_061() runs on GeneralComp { + var integer v_val := 5; + f_test(10 + f_ret() - v_val); // tested parameter passing + } + + control { + execute(TC_NegSem_050402_actual_parameters_061()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_062.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_062.ttcn new file mode 100644 index 00000000..07bcce3e --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_062.ttcn @@ -0,0 +1,32 @@ +/*************************************************** + ** @author STF 487 (updated by STF 521) + ** @version 0.0.2 + ** @purpose 1:5.4.2, verify that template parameters cannot be used as out formal template parameters of functions + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to out formal template parameters shall be template variables, +// formal template parameters or references to elements of template variables or formal template +// parameters of structured types. + +module NegSem_050402_actual_parameters_062 { + + type component GeneralComp { + } + + template integer m_msg := 1; + + function f_test(out template integer p_val) { + p_val := ?; + setverdict(pass); + } + + testcase TC_NegSem_050402_actual_parameters_062() runs on GeneralComp { + f_test(m_msg); // tested parameter passing + } + + control { + execute(TC_NegSem_050402_actual_parameters_062()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_063.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_063.ttcn new file mode 100644 index 00000000..ff41b229 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_063.ttcn @@ -0,0 +1,34 @@ +/*************************************************** + ** @author STF 487 (updated by STF 521) + ** @version 0.0.2 + ** @purpose 1:5.4.2, verify that literals cannot be used as out formal template parameters of altsteps + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to out formal template parameters shall be template variables, +// formal template parameters or references to elements of template variables or formal template +// parameters of structured types. + +module NegSem_050402_actual_parameters_063 { + + type component GeneralComp { + timer t := 0.0; + } + + altstep a_test(out template integer p_val) runs on GeneralComp { + []t.timeout { + p_val := ?; + setverdict(pass); + } + } + + testcase TC_NegSem_050402_actual_parameters_063() runs on GeneralComp { + t.start; + a_test(1); // tested parameter passing + } + + control { + execute(TC_NegSem_050402_actual_parameters_063()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_064.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_064.ttcn new file mode 100644 index 00000000..c92507a2 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_064.ttcn @@ -0,0 +1,36 @@ +/*************************************************** + ** @author STF 487 (updated by STF 521) + ** @version 0.0.2 + ** @purpose 1:5.4.2, verify that module parameters cannot be used as out formal template parameters of altsteps + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to out formal template parameters shall be template variables, +// formal template parameters or references to elements of template variables or formal template +// parameters of structured types. + +module NegSem_050402_actual_parameters_064 { + + type component GeneralComp { + timer t := 0.0; + } + + modulepar integer PX_VAL := 2; + + altstep a_test(out template integer p_val) runs on GeneralComp { + []t.timeout { + p_val := ?; + setverdict(pass); + } + } + + testcase TC_NegSem_050402_actual_parameters_064() runs on GeneralComp { + t.start; + a_test(PX_VAL); // tested parameter passing + } + + control { + execute(TC_NegSem_050402_actual_parameters_064()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_065.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_065.ttcn new file mode 100644 index 00000000..fa486db0 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_065.ttcn @@ -0,0 +1,36 @@ +/*************************************************** + ** @author STF 487 (updated by STF 521) + ** @version 0.0.2 + ** @purpose 1:5.4.2, verify that constants cannot be used as out formal template parameters of altsteps + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to out formal template parameters shall be template variables, +// formal template parameters or references to elements of template variables or formal template +// parameters of structured types. + +module NegSem_050402_actual_parameters_065 { + + type component GeneralComp { + timer t := 0.0; + } + + const integer c_val := 3; + + altstep a_test(out template integer p_val) runs on GeneralComp { + []t.timeout { + p_val := ?; + setverdict(pass); + } + } + + testcase TC_NegSem_050402_actual_parameters_065() runs on GeneralComp { + t.start; + a_test(c_val); // tested parameter passing + } + + control { + execute(TC_NegSem_050402_actual_parameters_065()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_066.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_066.ttcn new file mode 100644 index 00000000..a4881bc0 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_066.ttcn @@ -0,0 +1,38 @@ +/*************************************************** + ** @author STF 487 (updated by STF 521) + ** @version 0.0.2 + ** @purpose 1:5.4.2, verify that function calls cannot be used as out formal template parameters of altsteps + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to out formal template parameters shall be template variables, +// formal template parameters or references to elements of template variables or formal template +// parameters of structured types. + +module NegSem_050402_actual_parameters_066 { + + type component GeneralComp { + timer t := 0.0; + } + + function f_ret() return integer { + return 5; + } + + altstep a_test(out template integer p_val) runs on GeneralComp { + []t.timeout { + p_val := ?; + setverdict(pass); + } + } + + testcase TC_NegSem_050402_actual_parameters_066() runs on GeneralComp { + t.start; + a_test(f_ret()); // tested parameter passing + } + + control { + execute(TC_NegSem_050402_actual_parameters_066()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_067.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_067.ttcn new file mode 100644 index 00000000..4e874a05 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_067.ttcn @@ -0,0 +1,39 @@ +/*************************************************** + ** @author STF 487 (updated by STF 521) + ** @version 0.0.2 + ** @purpose 1:5.4.2, verify that expressions cannot be used as out formal template parameters of altsteps + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to out formal template parameters shall be template variables, +// formal template parameters or references to elements of template variables or formal template +// parameters of structured types. + +module NegSem_050402_actual_parameters_067 { + + type component GeneralComp { + timer t := 0.0; + } + + function f_ret() return integer { + return 4; + } + + altstep a_test(out template integer p_val) runs on GeneralComp { + []t.timeout { + p_val := ?; + setverdict(pass); + } + } + + testcase TC_NegSem_050402_actual_parameters_067() runs on GeneralComp { + var integer v_val := 5; + t.start; + a_test(10 + f_ret() - v_val); // tested parameter passing + } + + control { + execute(TC_NegSem_050402_actual_parameters_067()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_068.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_068.ttcn new file mode 100644 index 00000000..b3d3700c --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_068.ttcn @@ -0,0 +1,36 @@ +/*************************************************** + ** @author STF 487 (updated by STF 521) + ** @version 0.0.2 + ** @purpose 1:5.4.2, verify that template parameters cannot be used as out formal template parameters of altsteps + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to out formal template parameters shall be template variables, +// formal template parameters or references to elements of template variables or formal template +// parameters of structured types. + +module NegSem_050402_actual_parameters_068 { + + type component GeneralComp { + timer t := 0.0; + } + + template integer m_msg := 1; + + altstep a_test(out template integer p_val) runs on GeneralComp { + []t.timeout { + p_val := ?; + setverdict(pass); + } + } + + testcase TC_NegSem_050402_actual_parameters_068() runs on GeneralComp { + t.start; + a_test(m_msg); // tested parameter passing + } + + control { + execute(TC_NegSem_050402_actual_parameters_068()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_069.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_069.ttcn new file mode 100644 index 00000000..eb093825 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_069.ttcn @@ -0,0 +1,26 @@ +/*************************************************** + ** @author STF 487 (updated by STF 521) + ** @version 0.0.2 + ** @purpose 1:5.4.2, verify that literals cannot be used as out formal template parameters of test cases + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to out formal template parameters shall be template variables, +// formal template parameters or references to elements of template variables or formal template +// parameters of structured types. + +module NegSem_050402_actual_parameters_069 { + + type component GeneralComp { + } + + testcase TC_NegSem_050402_actual_parameters_069(out template integer p_val) runs on GeneralComp { + p_val := ?; + setverdict(pass); + } + + control { + execute(TC_NegSem_050402_actual_parameters_069(1)); // tested parameter passing + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_070.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_070.ttcn new file mode 100644 index 00000000..b384568f --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_070.ttcn @@ -0,0 +1,28 @@ +/*************************************************** + ** @author STF 487 (updated by STF 521) + ** @version 0.0.2 + ** @purpose 1:5.4.2, verify that module parameters cannot be used as out formal template parameters of test cases + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to out formal template parameters shall be template variables, +// formal template parameters or references to elements of template variables or formal template +// parameters of structured types. + +module NegSem_050402_actual_parameters_070 { + + type component GeneralComp { + } + + modulepar integer PX_VAL := 2; + + testcase TC_NegSem_050402_actual_parameters_070(out template integer p_val) runs on GeneralComp { + p_val := ?; + setverdict(pass); + } + + control { + execute(TC_NegSem_050402_actual_parameters_070(PX_VAL)); // tested parameter passing + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_071.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_071.ttcn new file mode 100644 index 00000000..7e8fd39b --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_071.ttcn @@ -0,0 +1,28 @@ +/*************************************************** + ** @author STF 487 (updated by STF 521) + ** @version 0.0.2 + ** @purpose 1:5.4.2, verify that constants cannot be used as out formal template parameters of test cases + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to out formal template parameters shall be template variables, +// formal template parameters or references to elements of template variables or formal template +// parameters of structured types. + +module NegSem_050402_actual_parameters_071 { + + type component GeneralComp { + } + + const integer c_val := 3; + + testcase TC_NegSem_050402_actual_parameters_071(out template integer p_val) runs on GeneralComp { + p_val := ?; + setverdict(pass); + } + + control { + execute(TC_NegSem_050402_actual_parameters_071(c_val)); // tested parameter passing + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_072.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_072.ttcn new file mode 100644 index 00000000..5b06b730 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_072.ttcn @@ -0,0 +1,30 @@ +/*************************************************** + ** @author STF 487 (updated by STF 521) + ** @version 0.0.2 + ** @purpose 1:5.4.2, verify that function calls cannot be used as out formal template parameters of test cases + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to out formal template parameters shall be template variables, +// formal template parameters or references to elements of template variables or formal template +// parameters of structured types. + +module NegSem_050402_actual_parameters_072 { + + type component GeneralComp { + } + + function f_ret() return integer { + return 5; + } + + testcase TC_NegSem_050402_actual_parameters_072(out template integer p_val) runs on GeneralComp { + p_val := ?; + setverdict(pass); + } + + control { + execute(TC_NegSem_050402_actual_parameters_072(f_ret())); // tested parameter passing + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_073.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_073.ttcn new file mode 100644 index 00000000..9e006e09 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_073.ttcn @@ -0,0 +1,31 @@ +/*************************************************** + ** @author STF 487 (updated by STF 521) + ** @version 0.0.2 + ** @purpose 1:5.4.2, verify that expressions cannot be used as out formal template parameters of test cases + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to out formal template parameters shall be template variables, +// formal template parameters or references to elements of template variables or formal template +// parameters of structured types. + +module NegSem_050402_actual_parameters_073 { + + type component GeneralComp { + } + + function f_ret() return integer { + return 4; + } + + testcase TC_NegSem_050402_actual_parameters_073(out template integer p_val) runs on GeneralComp { + p_val := ?; + setverdict(pass); + } + + control { + var integer v_val := 5; + execute(TC_NegSem_050402_actual_parameters_073(10 + f_ret() - v_val)); // tested parameter passing + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_074.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_074.ttcn new file mode 100644 index 00000000..7710fd28 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_074.ttcn @@ -0,0 +1,28 @@ +/*************************************************** + ** @author STF 487 (updated by STF 521) + ** @version 0.0.2 + ** @purpose 1:5.4.2, verify that template parameters cannot be used as out formal template parameters of test cases + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to out formal template parameters shall be template variables, +// formal template parameters or references to elements of template variables or formal template +// parameters of structured types. + +module NegSem_050402_actual_parameters_074 { + + type component GeneralComp { + } + + template integer m_msg := 1; + + testcase TC_NegSem_050402_actual_parameters_074(out template integer p_val) runs on GeneralComp { + p_val := ?; + setverdict(pass); + } + + control { + execute(TC_NegSem_050402_actual_parameters_074(m_msg)); // tested parameter passing + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_075.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_075.ttcn new file mode 100644 index 00000000..e89b0303 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_075.ttcn @@ -0,0 +1,31 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that literals cannot be used as inout formal template parameters of functions + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to inout formal template parameters shall be variables, +// template variables, formal value or template parameters (of in, inout or out +// parameterization) of the current scope or references to elements of (template) variables +// or formal (template) parameters of structured types. + +module NegSem_050402_actual_parameters_075 { + + type component GeneralComp { + } + + function f_test(inout template integer p_val) { + if (match(1, p_val)) { setverdict(pass); } + else { setverdict(fail); } + } + + testcase TC_NegSem_050402_actual_parameters_075() runs on GeneralComp { + f_test(1); // tested parameter passing + } + + control { + execute(TC_NegSem_050402_actual_parameters_075()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_076.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_076.ttcn new file mode 100644 index 00000000..a2e65880 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_076.ttcn @@ -0,0 +1,33 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that module parameters cannot be used as inout formal template parameters of functions + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to inout formal template parameters shall be variables, +// template variables, formal value or template parameters (of in, inout or out +// parameterization) of the current scope or references to elements of (template) variables +// or formal (template) parameters of structured types. + +module NegSem_050402_actual_parameters_076 { + + type component GeneralComp { + } + + modulepar integer PX_VAL := 2; + + function f_test(inout template integer p_val) { + if (match(2, p_val)) { setverdict(pass); } + else { setverdict(fail); } + } + + testcase TC_NegSem_050402_actual_parameters_076() runs on GeneralComp { + f_test(PX_VAL); // tested parameter passing + } + + control { + execute(TC_NegSem_050402_actual_parameters_076()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_077.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_077.ttcn new file mode 100644 index 00000000..31321a4b --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_077.ttcn @@ -0,0 +1,33 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that constants cannot be used as inout formal template parameters of functions + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to inout formal template parameters shall be variables, +// template variables, formal value or template parameters (of in, inout or out +// parameterization) of the current scope or references to elements of (template) variables +// or formal (template) parameters of structured types. + +module NegSem_050402_actual_parameters_077 { + + type component GeneralComp { + } + + const integer c_val := 3; + + function f_test(inout template integer p_val) { + if (match(3, p_val)) { setverdict(pass); } + else { setverdict(fail); } + } + + testcase TC_NegSem_050402_actual_parameters_077() runs on GeneralComp { + f_test(c_val); // tested parameter passing + } + + control { + execute(TC_NegSem_050402_actual_parameters_077()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_078.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_078.ttcn new file mode 100644 index 00000000..ced909e8 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_078.ttcn @@ -0,0 +1,35 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that function calls cannot be used as inout formal template parameters of functions + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to inout formal template parameters shall be variables, +// template variables, formal value or template parameters (of in, inout or out +// parameterization) of the current scope or references to elements of (template) variables +// or formal (template) parameters of structured types. + +module NegSem_050402_actual_parameters_078 { + + type component GeneralComp { + } + + function f_ret() return integer { + return 5; + } + + function f_test(inout template integer p_val) { + if (match(5, p_val)) { setverdict(pass); } + else { setverdict(fail); } + } + + testcase TC_NegSem_050402_actual_parameters_078() runs on GeneralComp { + f_test(f_ret()); // tested parameter passing + } + + control { + execute(TC_NegSem_050402_actual_parameters_078()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_079.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_079.ttcn new file mode 100644 index 00000000..11690ad6 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_079.ttcn @@ -0,0 +1,36 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that expressions cannot be used as inout formal template parameters of functions + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to inout formal template parameters shall be variables, +// template variables, formal value or template parameters (of in, inout or out +// parameterization) of the current scope or references to elements of (template) variables +// or formal (template) parameters of structured types. + +module NegSem_050402_actual_parameters_079 { + + type component GeneralComp { + } + + function f_ret() return integer { + return 4; + } + + function f_test(inout template integer p_val) { + if (match(9, p_val)) { setverdict(pass); } + else { setverdict(fail); } + } + + testcase TC_NegSem_050402_actual_parameters_079() runs on GeneralComp { + var integer v_val := 5; + f_test(10 + f_ret() - v_val); // tested parameter passing + } + + control { + execute(TC_NegSem_050402_actual_parameters_079()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_080.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_080.ttcn new file mode 100644 index 00000000..02681b64 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_080.ttcn @@ -0,0 +1,33 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that template parameters cannot be used as inout formal template parameters of functions + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to inout formal template parameters shall be variables, +// template variables, formal value or template parameters (of in, inout or out +// parameterization) of the current scope or references to elements of (template) variables +// or formal (template) parameters of structured types. + +module NegSem_050402_actual_parameters_080 { + + type component GeneralComp { + } + + template integer m_msg := 1; + + function f_test(inout template integer p_val) { + if (match(1, p_val)) { setverdict(pass); } + else { setverdict(fail); } + } + + testcase TC_NegSem_050402_actual_parameters_080() runs on GeneralComp { + f_test(m_msg); // tested parameter passing + } + + control { + execute(TC_NegSem_050402_actual_parameters_080()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_081.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_081.ttcn new file mode 100644 index 00000000..056d0799 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_081.ttcn @@ -0,0 +1,34 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that literals cannot be used as inout formal template parameters of altsteps + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to inout formal template parameters shall be variables, +// template variables, formal value or template parameters (of in, inout or out +// parameterization) of the current scope or references to elements of (template) variables +// or formal (template) parameters of structured types. +module NegSem_050402_actual_parameters_081 { + + type component GeneralComp { + timer t := 0.0; + } + + altstep a_test(inout template integer p_val) runs on GeneralComp { + []t.timeout { + if (match(1, p_val)) { setverdict(pass); } + else { setverdict(fail); } + } + } + + testcase TC_NegSem_050402_actual_parameters_081() runs on GeneralComp { + t.start; + a_test(1); // tested parameter passing + } + + control { + execute(TC_NegSem_050402_actual_parameters_081()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_082.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_082.ttcn new file mode 100644 index 00000000..bb294849 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_082.ttcn @@ -0,0 +1,36 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that module parameters cannot be used as inout formal template parameters of altsteps + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to inout formal template parameters shall be variables, +// template variables, formal value or template parameters (of in, inout or out +// parameterization) of the current scope or references to elements of (template) variables +// or formal (template) parameters of structured types. +module NegSem_050402_actual_parameters_082 { + + type component GeneralComp { + timer t := 0.0; + } + + modulepar integer PX_VAL := 2; + + altstep a_test(inout template integer p_val) runs on GeneralComp { + []t.timeout { + if (match(2, p_val)) { setverdict(pass); } + else { setverdict(fail); } + } + } + + testcase TC_NegSem_050402_actual_parameters_082() runs on GeneralComp { + t.start; + a_test(PX_VAL); // tested parameter passing + } + + control { + execute(TC_NegSem_050402_actual_parameters_082()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_083.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_083.ttcn new file mode 100644 index 00000000..92a79125 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_083.ttcn @@ -0,0 +1,37 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that constants cannot be used as inout formal template parameters of altsteps + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to inout formal template parameters shall be variables, +// template variables, formal value or template parameters (of in, inout or out +// parameterization) of the current scope or references to elements of (template) variables +// or formal (template) parameters of structured types. + +module NegSem_050402_actual_parameters_083 { + + type component GeneralComp { + timer t := 0.0; + } + + const integer c_val := 3; + + altstep a_test(inout template integer p_val) runs on GeneralComp { + []t.timeout { + if (match(3, p_val)) { setverdict(pass); } + else { setverdict(fail); } + } + } + + testcase TC_NegSem_050402_actual_parameters_083() runs on GeneralComp { + t.start; + a_test(c_val); // tested parameter passing + } + + control { + execute(TC_NegSem_050402_actual_parameters_083()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_084.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_084.ttcn new file mode 100644 index 00000000..3cd3597e --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_084.ttcn @@ -0,0 +1,39 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that function calls cannot be used as inout formal template parameters of altsteps + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to inout formal template parameters shall be variables, +// template variables, formal value or template parameters (of in, inout or out +// parameterization) of the current scope or references to elements of (template) variables +// or formal (template) parameters of structured types. + +module NegSem_050402_actual_parameters_084 { + + type component GeneralComp { + timer t := 0.0; + } + + function f_ret() return integer { + return 5; + } + + altstep a_test(inout template integer p_val) runs on GeneralComp { + []t.timeout { + if (match(5, p_val)) { setverdict(pass); } + else { setverdict(fail); } + } + } + + testcase TC_NegSem_050402_actual_parameters_084() runs on GeneralComp { + t.start; + a_test(f_ret()); // tested parameter passing + } + + control { + execute(TC_NegSem_050402_actual_parameters_084()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_085.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_085.ttcn new file mode 100644 index 00000000..5ae961e0 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_085.ttcn @@ -0,0 +1,40 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that expressions cannot be used as inout formal template parameters of altsteps + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to inout formal template parameters shall be variables, +// template variables, formal value or template parameters (of in, inout or out +// parameterization) of the current scope or references to elements of (template) variables +// or formal (template) parameters of structured types. + +module NegSem_050402_actual_parameters_085 { + + type component GeneralComp { + timer t := 0.0; + } + + function f_ret() return integer { + return 4; + } + + altstep a_test(inout template integer p_val) runs on GeneralComp { + []t.timeout { + if (match(9, p_val)) { setverdict(pass); } + else { setverdict(fail); } + } + } + + testcase TC_NegSem_050402_actual_parameters_085() runs on GeneralComp { + var integer v_val := 5; + t.start; + a_test(10 + f_ret() - v_val); // tested parameter passing + } + + control { + execute(TC_NegSem_050402_actual_parameters_085()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_086.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_086.ttcn new file mode 100644 index 00000000..88784e28 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_086.ttcn @@ -0,0 +1,37 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that template parameters cannot be used as inout formal template parameters of altsteps + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to inout formal template parameters shall be variables, +// template variables, formal value parameters, formal template parameters or references +// to elements of variables, template variables, formal value parameters or formal template +// parameters of structured types. + +module NegSem_050402_actual_parameters_086 { + + type component GeneralComp { + timer t := 0.0; + } + + template integer m_msg := 1; + + altstep a_test(inout template integer p_val) runs on GeneralComp { + []t.timeout { + if (match(1, p_val)) { setverdict(pass); } + else { setverdict(fail); } + } + } + + testcase TC_NegSem_050402_actual_parameters_086() runs on GeneralComp { + t.start; + a_test(m_msg); // tested parameter passing + } + + control { + execute(TC_NegSem_050402_actual_parameters_086()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_087.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_087.ttcn new file mode 100644 index 00000000..081f064a --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_087.ttcn @@ -0,0 +1,27 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that literals cannot be used as inout formal template parameters of test cases + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to inout formal template parameters shall be variables, +// template variables, formal value or template parameters (of in, inout or out +// parameterization) of the current scope or references to elements of (template) variables +// or formal (template) parameters of structured types. + +module NegSem_050402_actual_parameters_087 { + + type component GeneralComp { + } + + testcase TC_NegSem_050402_actual_parameters_087(inout template integer p_val) runs on GeneralComp { + if (match(1, p_val)) { setverdict(pass); } + else { setverdict(fail); } + } + + control { + execute(TC_NegSem_050402_actual_parameters_087(1)); // tested parameter passing + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_088.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_088.ttcn new file mode 100644 index 00000000..dbc74ecc --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_088.ttcn @@ -0,0 +1,29 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that module parameters cannot be used as inout formal template parameters of test cases + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to inout formal template parameters shall be variables, +// template variables, formal value or template parameters (of in, inout or out +// parameterization) of the current scope or references to elements of (template) variables +// or formal (template) parameters of structured types. + +module NegSem_050402_actual_parameters_088 { + + type component GeneralComp { + } + + modulepar integer PX_VAL := 2; + + testcase TC_NegSem_050402_actual_parameters_088(inout template integer p_val) runs on GeneralComp { + if (match(2, p_val)) { setverdict(pass); } + else { setverdict(fail); } + } + + control { + execute(TC_NegSem_050402_actual_parameters_088(PX_VAL)); // tested parameter passing + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_089.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_089.ttcn new file mode 100644 index 00000000..052c6031 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_089.ttcn @@ -0,0 +1,29 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that constants cannot be used as inout formal template parameters of test cases + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to inout formal template parameters shall be variables, +// template variables, formal value or template parameters (of in, inout or out +// parameterization) of the current scope or references to elements of (template) variables +// or formal (template) parameters of structured types. + +module NegSem_050402_actual_parameters_089 { + + type component GeneralComp { + } + + const integer c_val := 3; + + testcase TC_NegSem_050402_actual_parameters_089(inout template integer p_val) runs on GeneralComp { + if (match(3, p_val)) { setverdict(pass); } + else { setverdict(fail); } + } + + control { + execute(TC_NegSem_050402_actual_parameters_089(c_val)); // tested parameter passing + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_090.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_090.ttcn new file mode 100644 index 00000000..4a90ee42 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_090.ttcn @@ -0,0 +1,31 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that function calls cannot be used as inout formal template parameters of test cases + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to inout formal template parameters shall be variables, +// template variables, formal value or template parameters (of in, inout or out +// parameterization) of the current scope or references to elements of (template) variables +// or formal (template) parameters of structured types. + +module NegSem_050402_actual_parameters_090 { + + type component GeneralComp { + } + + function f_ret() return integer { + return 5; + } + + testcase TC_NegSem_050402_actual_parameters_090(inout template integer p_val) runs on GeneralComp { + if (match(5, p_val)) { setverdict(pass); } + else { setverdict(fail); } + } + + control { + execute(TC_NegSem_050402_actual_parameters_090(f_ret())); // tested parameter passing + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_091.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_091.ttcn new file mode 100644 index 00000000..3ee56b09 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_091.ttcn @@ -0,0 +1,32 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that expressions cannot be used as inout formal template parameters of test cases + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to inout formal template parameters shall be variables, +// template variables, formal value or template parameters (of in, inout or out +// parameterization) of the current scope or references to elements of (template) variables +// or formal (template) parameters of structured types. + +module NegSem_050402_actual_parameters_091 { + + type component GeneralComp { + } + + function f_ret() return integer { + return 4; + } + + testcase TC_NegSem_050402_actual_parameters_091(inout template integer p_val) runs on GeneralComp { + if (match(9, p_val)) { setverdict(pass); } + else { setverdict(fail); } + } + + control { + var integer v_val := 5; + execute(TC_NegSem_050402_actual_parameters_091(10 + f_ret() - v_val)); // tested parameter passing + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_092.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_092.ttcn new file mode 100644 index 00000000..99883dbb --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_092.ttcn @@ -0,0 +1,29 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that template parameters cannot be used as inout formal template parameters of test cases + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to inout formal template parameters shall be variables, +// template variables, formal value or template parameters (of in, inout or out +// parameterization) of the current scope or references to elements of (template) variables +// or formal (template) parameters of structured types. + +module NegSem_050402_actual_parameters_092 { + + type component GeneralComp { + } + + template integer m_msg := 1; + + testcase TC_NegSem_050402_actual_parameters_092(inout template integer p_val) runs on GeneralComp { + if (match(1, p_val)) { setverdict(pass); } + else { setverdict(fail); } + } + + control { + execute(TC_NegSem_050402_actual_parameters_092(m_msg)); // tested parameter passing + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_093.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_093.ttcn new file mode 100644 index 00000000..2d4ef1ae --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_093.ttcn @@ -0,0 +1,42 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that referencing errors are detected in actual parameters passed to in formal value parameters + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// When actual parameters that are passed to in formal value or template parameters +// contain a value or template reference, rules for using references on the right hand +// side of assignments apply. + +module NegSem_050402_actual_parameters_093 { + + type component GeneralComp { + } + + type record R { + integer field1, + record { + integer subfield1, + integer subfield2 + } field2 optional + } + + function f_test(in integer p_val) { + if (p_val == 2) { setverdict(pass); } + else { setverdict(fail); } + } + + testcase TC_NegSem_050402_actual_parameters_093() runs on GeneralComp { + var R v_rec := { + field1 := 1, + field2 := omit + } + f_test(v_rec.field2.subfield1); // tested parameter passing + } + + control { + execute(TC_NegSem_050402_actual_parameters_093()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_094.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_094.ttcn new file mode 100644 index 00000000..7522919f --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_094.ttcn @@ -0,0 +1,43 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that referencing errors are detected in actual parameters passed to in formal template parameters + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// When actual parameters that are passed to in formal value or template parameters +// contain a value or template reference, rules for using references on the right hand +// side of assignments apply. + +module NegSem_050402_actual_parameters_094 { + + type component GeneralComp { + } + + type record R { + integer field1, + record { + integer subfield1, + integer subfield2 + } field2 optional + } + + template R mw_rec := { + field1 := 1, + field2 := * + } + + function f_test(in template integer p_val) { + if (match(255, p_val)) { setverdict(pass); } + else { setverdict(fail); } + } + + testcase TC_NegSem_050402_actual_parameters_094() runs on GeneralComp { + f_test(mw_rec.field2.subfield1); // tested parameter passing (using referencing rules specified at 15.6.2) + } + + control { + execute(TC_NegSem_050402_actual_parameters_094()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_095.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_095.ttcn new file mode 100644 index 00000000..ece386e8 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_095.ttcn @@ -0,0 +1,44 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that referencing errors are detected in actual parameters passed to out formal template parameters + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// When actual parameters that are passed to inout and out formal value or template +// parameters contain a value or template reference, rules for using references on +// the left hand side of assignments apply. + +module NegSem_050402_actual_parameters_095 { + + type component GeneralComp { + } + + type record R { + integer field1, + record { + integer subfield1, + integer subfield2 + } field2 optional + } + + function f_test(out template integer p_val) { + p_val := 10; + } + + testcase TC_NegSem_050402_actual_parameters_095() runs on GeneralComp { + var template R v_rec := { + field1 := 1, + field2 := ({ subfield1 := 0, subfield2 := 1}, { subfield1 := 2, subfield2 := 3 }) + }; + f_test(v_rec.field2.subfield1); // tested parameter passing (using referencing rules specified at 15.6.2) + if (valueof(v_rec.field2.subfield1) == 10 and match(0, v_rec.field2.subfield2)) { setverdict(pass); } + else { setverdict(fail); } + + } + + control { + execute(TC_NegSem_050402_actual_parameters_095()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_096.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_096.ttcn new file mode 100644 index 00000000..9db9d6c2 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_096.ttcn @@ -0,0 +1,45 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that referencing rules are correctly applied to actual parameters of inout formal template parameters + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// When actual parameters that are passed to inout and out formal value or template +// parameters contain a value or template reference, rules for using references on +// the left hand side of assignments apply. + +module NegSem_050402_actual_parameters_096 { + + type component GeneralComp { + } + + type record R { + integer field1, + record { + integer subfield1, + integer subfield2 + } field2 optional + } + + function f_test(inout template integer p_val) { + p_val := 10; + } + + testcase TC_NegSem_050402_actual_parameters_096() runs on GeneralComp { + var template R v_rec := { + field1 := 1, + field2 := ({ subfield1 := 0, subfield2 := 1}, { subfield1 := 2, subfield2 := 3 }) + }; + // expected error since v_rec.field2.subfield1 not defined since v_rec.field2 is not *, ? or omit (see expansion rules) + f_test(v_rec.field2.subfield1); // tested parameter passing (using referencing rules specified at 15.6.2) + log(v_rec); + if (valueof(v_rec.field2.subfield1) == 10 and match(0, v_rec.field2.subfield2)) { setverdict(pass); } + else { setverdict(fail); } + } + + control { + execute(TC_NegSem_050402_actual_parameters_096()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_097.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_097.ttcn new file mode 100644 index 00000000..b1a054b6 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_097.ttcn @@ -0,0 +1,33 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that string item references cannot be used as inout formal value parameters of functions + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to inout formal value parameters shall be variables +// or formal value parameters (of in, inout or out parameterization) or references to +// elements of variables or formal value parameters of structured types. +// (see also the NOTE from 5.4.2) + +module NegSem_050402_actual_parameters_097 { + + type component GeneralComp { + } + + function f_test(inout charstring p_val) { + if (p_val == "t") { setverdict(pass); } + else { setverdict(fail); } + p_val := "r"; + } + + testcase TC_NegSem_050402_actual_parameters_097() runs on GeneralComp { + var charstring v_val := "test"; + f_test(v_val[0]); // tested parameter passing + } + + control { + execute(TC_NegSem_050402_actual_parameters_097()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_098.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_098.ttcn new file mode 100644 index 00000000..036981bf --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_098.ttcn @@ -0,0 +1,30 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that ordinary values cannot be passed to timer parameters + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to formal timer parameters shall be component +// timers, local timers or formal timer parameters of the current scope. + +module NegSem_050402_actual_parameters_098 { + + type component GeneralComp { + } + + function f_test(timer t_par) { + t_par.start; + if (t_par.running) { setverdict(pass); } + else { setverdict(fail); } + } + + testcase TC_NegSem_050402_actual_parameters_098() runs on GeneralComp { + f_test(5.0); // tested parameter passing: it should not be possible to pass a float value to a timer parameter + } + + control { + execute(TC_NegSem_050402_actual_parameters_098()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_099.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_099.ttcn new file mode 100644 index 00000000..9d3d6c7a --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_099.ttcn @@ -0,0 +1,35 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that values cannot be passed to port parameters + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to formal port parameters shall be component +// ports or formal port parameters of the current scope. + +module NegSem_050402_actual_parameters_099 { + + type port IntPort message { + inout integer; + } + + type component GeneralComp { + port IntPort p; + } + + function f_test(IntPort p_port) { + p_port.stop; + } + + testcase TC_NegSem_050402_actual_parameters_099() runs on GeneralComp { + var integer v_val := 5; + f_test(v_val); // tested parameter passing + setverdict(pass); + } + + control { + execute(TC_NegSem_050402_actual_parameters_099()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_100.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_100.ttcn new file mode 100644 index 00000000..edddd11f --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_100.ttcn @@ -0,0 +1,29 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that list notation containing actual parameters in wrong order is not accepted + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// When using list notation, the order of elements in the actual parameter list shall +// be the same as their order in the corresponding formal parameter list. + +module NegSem_050402_actual_parameters_100 { + + type component GeneralComp { + } + + function f_test (integer p_val1, charstring p_val2) { + if ( match(p_val1, 1) and match(p_val2, "test")) { setverdict(pass); } + else { setverdict(fail); } + } + + testcase TC_NegSem_050402_actual_parameters_100() runs on GeneralComp { + f_test("test", 1); + } + + control { + execute(TC_NegSem_050402_actual_parameters_100()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_101.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_101.ttcn new file mode 100644 index 00000000..ea560b78 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_101.ttcn @@ -0,0 +1,28 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that list notation containing less actual parameters than required is not accepted + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// For each formal parameter without a default there shall be an actual parameter. + +module NegSem_050402_actual_parameters_101 { + + type component GeneralComp { + } + + function f_test (integer p_val1, charstring p_val2) { + if (p_val1 == 1) { setverdict(pass); } + else { setverdict(fail); } + } + + testcase TC_NegSem_050402_actual_parameters_101() runs on GeneralComp { + f_test(1); + } + + control { + execute(TC_NegSem_050402_actual_parameters_101()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_102.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_102.ttcn new file mode 100644 index 00000000..aa4e330d --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_102.ttcn @@ -0,0 +1,28 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that parameter without default value cannot be skipped + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// For each formal parameter without a default there shall be an actual parameter. + +module NegSem_050402_actual_parameters_102 { + + type component GeneralComp { + } + + function f_test (integer p_val1, charstring p_val2) { + if (p_val1 == 1) { setverdict(pass); } + else { setverdict(fail); } + } + + testcase TC_NegSem_050402_actual_parameters_102() runs on GeneralComp { + f_test(1, -); + } + + control { + execute(TC_NegSem_050402_actual_parameters_102()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_103.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_103.ttcn new file mode 100644 index 00000000..fa5ac9db --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_103.ttcn @@ -0,0 +1,29 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that mixing list and assignment notation is not allowed in parameterized calls (value as actual parameter) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Either list notation or assignment notation shall be used in a single parameter +// list. They shall not be mixed. + +module NegSem_050402_actual_parameters_103 { + + type component GeneralComp { + } + + function f_test (integer p_val1, charstring p_val2) { + if ( match(p_val1, 1) and match(p_val2, "test")) { setverdict(pass); } + else { setverdict(fail); } + } + + testcase TC_NegSem_050402_actual_parameters_103() runs on GeneralComp { + f_test(p_val1 := 1, "test"); + } + + control { + execute(TC_NegSem_050402_actual_parameters_103()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_104.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_104.ttcn new file mode 100644 index 00000000..a3dee3cd --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_104.ttcn @@ -0,0 +1,29 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that mixing list and assignment notation is not allowed in parameterized calls (skipped actual parameter) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Either list notation or assignment notation shall be used in a single parameter +// list. They shall not be mixed. + +module NegSem_050402_actual_parameters_104 { + + type component GeneralComp { + } + + function f_test (integer p_val1, charstring p_val2 := "test") { + if ( match(p_val1, 1) and match(p_val2, "test")) { setverdict(pass); } + else { setverdict(fail); } + } + + testcase TC_NegSem_050402_actual_parameters_104() runs on GeneralComp { + f_test(p_val1 := 1, -); + } + + control { + execute(TC_NegSem_050402_actual_parameters_104()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_105.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_105.ttcn new file mode 100644 index 00000000..7f0a39a1 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_105.ttcn @@ -0,0 +1,29 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that parameters cannot be assigned more than once in assignment notation + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// When using assignment notation, each formal parameter shall be assigned an actual +// parameter at most once. + +module NegSem_050402_actual_parameters_105 { + + type component GeneralComp { + } + + function f_test (integer p_val1, charstring p_val2) { + if (match(p_val1 == 1 and p_val2 == "test") { setverdict(pass); } + else { setverdict(fail); } + } + + testcase TC_NegSem_050402_actual_parameters_105() runs on GeneralComp { + f_test(p_val1 := 1, p_val2 := "test", p_val1 := 1); + } + + control { + execute(TC_NegSem_050402_actual_parameters_105()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_106.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_106.ttcn new file mode 100644 index 00000000..d0f5c8d7 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_106.ttcn @@ -0,0 +1,28 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that assignment notation that doesn't contain all parameters is not accepted + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// For each formal parameter without default value, there shall be an actual parameter. + +module NegSem_050402_actual_parameters_106 { + + type component GeneralComp { + } + + function f_test (integer p_val1, charstring p_val2, integer p_val3) { + if (match(p_val1, 1) and match(p_val2, "test") and match(p_val3, 3)) { setverdict(pass); } + else { setverdict(fail); } + } + + testcase TC_NegSem_050402_actual_parameters_106() runs on GeneralComp { + f_test(p_val2 := "test", p_val3 := 3); + } + + control { + execute(TC_NegSem_050402_actual_parameters_106()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_107.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_107.ttcn new file mode 100644 index 00000000..e8934829 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_107.ttcn @@ -0,0 +1,40 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that incompatible values cannot be passed to in formal parameters + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// The type of each actual parameter shall be compatible with the type of each +// corresponding formal parameter. + +module NegSem_050402_actual_parameters_107 { + + type component GeneralComp { + } + + type record R1 { + integer field1, + integer field2 + } + + type record R2 { + integer elem1, + integer elem2 optional + } + + function f_test (R1 p_val) { + if (p_val == { field1 := 1, field2 := 2 }) { setverdict(pass); } + else { setverdict(fail); } + } + + testcase TC_NegSem_050402_actual_parameters_107() runs on GeneralComp { + var R2 v_rec := { 1, 2 }; + f_test(v_rec); + } + + control { + execute(TC_NegSem_050402_actual_parameters_107()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_108.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_108.ttcn new file mode 100644 index 00000000..11c90612 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_108.ttcn @@ -0,0 +1,42 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that incompatible values cannot be passed from out formal parameters + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// The type of each actual parameter shall be compatible with the type of each +// corresponding formal parameter. + +module NegSem_050402_actual_parameters_108 { + + type component GeneralComp { + } + + type record R1 { + integer field1, + integer field2 optional + } + + type record R2 { + integer elem1, + integer elem2 + } + + function f_test (out R1 p_val) { + p_val.field1 := 1; + p_val.field2 := 2; + } + + testcase TC_NegSem_050402_actual_parameters_108() runs on GeneralComp { + var R2 v_rec; + f_test(v_rec); + if (v_rec == { elem1 := 1, elem2 := 2 }) { setverdict(pass); } + else { setverdict(fail); } + } + + control { + execute(TC_NegSem_050402_actual_parameters_108()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_109.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_109.ttcn new file mode 100644 index 00000000..d9ee710c --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_109.ttcn @@ -0,0 +1,39 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that incompatible values cannot be passed to inout formal parameters + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Strong typing is required for parameters passed by reference. + +module NegSem_050402_actual_parameters_109 { + + type component GeneralComp { + } + + type record R1 { + integer field1, + integer field2 optional + } + + type record R2 { + integer elem1, + integer elem2 + } + + function f_test (inout R1 p_val) { + if (p_val == { field1 := 1, field2 := 2 }) { setverdict(pass); } + else { setverdict(fail); } + } + + testcase TC_NegSem_050402_actual_parameters_109() runs on GeneralComp { + var R2 v_rec := { 1, 2 }; + f_test(v_rec); + } + + control { + execute(TC_NegSem_050402_actual_parameters_109()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_110.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_110.ttcn new file mode 100644 index 00000000..75bc2caf --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_110.ttcn @@ -0,0 +1,36 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that values of compatible but distinct types cannot be passed to inout formal parameters + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Strong typing is required for parameters passed by reference. + +module NegSem_050402_actual_parameters_110 { + + type component GeneralComp { + } + + type record R1 { + integer field1, + integer field2 optional + } + + type R1 R2; + + function f_test (inout R1 p_val) { + if (p_val == { field1 := 1, field2 := 2 }) { setverdict(pass); } + else { setverdict(fail); } + } + + testcase TC_NegSem_050402_actual_parameters_110() runs on GeneralComp { + var R2 v_rec := { 1, 2 }; + f_test(v_rec); + } + + control { + execute(TC_NegSem_050402_actual_parameters_110()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_111.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_111.ttcn new file mode 100644 index 00000000..1121b962 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_111.ttcn @@ -0,0 +1,29 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that incompatible templates cannot be passed to template parameters with omit restriction + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters passed to restricted formal template parameters shall obey +// the restrictions given in clause 15.8. + +module NegSem_050402_actual_parameters_111 { + + type component GeneralComp { + } + + function f_test (omit integer p_val) { + if (match(1, p_val)) { setverdict(pass); } + else { setverdict(fail); } + } + + testcase TC_NegSem_050402_actual_parameters_111() runs on GeneralComp { + f_test((0..10)); + } + + control { + execute(TC_NegSem_050402_actual_parameters_111()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_112.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_112.ttcn new file mode 100644 index 00000000..f69a5b73 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_112.ttcn @@ -0,0 +1,29 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that compatible templates can be passed to template parameters with value restriction + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters passed to restricted formal template parameters shall obey +// the restrictions given in clause 15.8. + +module NegSem_050402_actual_parameters_112 { + + type component GeneralComp { + } + + function f_test (template(value) integer p_val) { + if (match(1, p_val)) { setverdict(pass); } + else { setverdict(fail); } + } + + testcase TC_NegSem_050402_actual_parameters_112() runs on GeneralComp { + f_test((1, 2, 3)); + } + + control { + execute(TC_NegSem_050402_actual_parameters_112()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_113.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_113.ttcn new file mode 100644 index 00000000..04ce15f1 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_113.ttcn @@ -0,0 +1,29 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that compatible templates can be passed to template parameters with present restriction + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters passed to restricted formal template parameters shall obey +// the restrictions given in clause 15.8. + +module NegSem_050402_actual_parameters_113 { + + type component GeneralComp { + } + + function f_test (template(present) integer p_val) { + if (match(1, p_val)) { setverdict(pass); } + else { setverdict(fail); } + } + + testcase TC_NegSem_050402_actual_parameters_113() runs on GeneralComp { + f_test(*); + } + + control { + execute(TC_NegSem_050402_actual_parameters_113()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_114.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_114.ttcn new file mode 100644 index 00000000..d43d618c --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_114.ttcn @@ -0,0 +1,39 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that parametrized entities used as actual parameter cannot be passed without parameter list + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// All parameterized entities specified as an actual parameter shall have their +// own parameters resolved in the top-level actual parameter list. + +module NegSem_050402_actual_parameters_114 { + + type component GeneralComp { + } + + type record R { + integer field1, + integer field2 optional + } + + template R mw_rec(template integer p_field2) := { + field1 := 1, + field2 := p_field2 + } + + function f_test (template R p_match) { + if (match({1, omit}, p_match)) { setverdict(pass); } + else { setverdict(fail); } + } + + testcase TC_NegSem_050402_actual_parameters_114() runs on GeneralComp { + f_test(mw_rec); + } + + control { + execute(TC_NegSem_050402_actual_parameters_114()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_115.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_115.ttcn new file mode 100644 index 00000000..9d43750b --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_115.ttcn @@ -0,0 +1,31 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that error is generated when no actual parameter list is used for functions with no parameters + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If the formal parameter list of TTCN-3 objects function, testcase, signature, +// altstep or external function is empty, then the empty parentheses shall be +// included both in the declaration and in the invocation of that object. In all +// other cases the empty parentheses shall be omitted. + +module NegSem_050402_actual_parameters_115 { + + type component GeneralComp { + } + + function f_test () return integer { + setverdict(pass); + return 1; + } + + testcase TC_NegSem_050402_actual_parameters_115() runs on GeneralComp { + log(f_test); + } + + control { + execute(TC_NegSem_050402_actual_parameters_115()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_116.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_116.ttcn new file mode 100644 index 00000000..d32fe54b --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_116.ttcn @@ -0,0 +1,26 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that error is generated when no actual parameter list is used for test cases with no parameters + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If the formal parameter list of TTCN-3 objects function, testcase, signature, +// altstep or external function is empty, then the empty parentheses shall be +// included both in the declaration and in the invocation of that object. In all +// other cases the empty parentheses shall be omitted. + +module NegSem_050402_actual_parameters_116 { + + type component GeneralComp { + } + + testcase TC_NegSem_050402_actual_parameters_116() runs on GeneralComp { + setverdict(pass); + } + + control { + execute(TC_NegSem_050402_actual_parameters_116); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_117.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_117.ttcn new file mode 100644 index 00000000..37a31840 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_117.ttcn @@ -0,0 +1,36 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that error is generated when no actual parameter list is used for altsteps with no parameters + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If the formal parameter list of TTCN-3 objects function, testcase, signature, +// altstep or external function is empty, then the empty parentheses shall be +// included both in the declaration and in the invocation of that object. In all +// other cases the empty parentheses shall be omitted. + +module NegSem_050402_actual_parameters_117 { + + type component GeneralComp { + } + + altstep a_test () { + [] any timer.timeout { setverdict(pass); } + } + + testcase TC_NegSem_050402_actual_parameters_117() runs on GeneralComp { + timer t_instant := 0.0; + t_instant.start; + alt { + [] a_test { + setverdict(pass); + } + } + } + + control { + execute(TC_NegSem_050402_actual_parameters_117()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_118.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_118.ttcn new file mode 100644 index 00000000..41a13dc3 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_118.ttcn @@ -0,0 +1,29 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that error is generated when empty actual parameter list is used for templates with no parameters + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If the formal parameter list of TTCN-3 objects function, testcase, signature, +// altstep or external function is empty, then the empty parentheses shall be +// included both in the declaration and in the invocation of that object. In all +// other cases the empty parentheses shall be omitted. + +module NegSem_050402_actual_parameters_118 { + + type component GeneralComp { + } + + template integer mw_allInt := ?; + + testcase TC_NegSem_050402_actual_parameters_118() runs on GeneralComp { + if (match(1, mw_allInt())) { setverdict(pass); } + else { setverdict(fail); } + } + + control { + execute(TC_NegSem_050402_actual_parameters_118()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_119.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_119.ttcn new file mode 100644 index 00000000..0af03a05 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_119.ttcn @@ -0,0 +1,36 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that uninitialized values cannot be passed to in formal parameters + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Unless specified differently in the relevant clause(s), actual parameters +// passed to in or inout formal parameters shall be at least partially +// initialized (for an exemption see e.g. clause 16.1.2 of the present document). + +module NegSem_050402_actual_parameters_119 { + + type component GeneralComp { + } + + type record R { + integer field1, + integer field2 optional + } + + function f_test (R p_val) { + if (not isbound(p_val)) { setverdict(pass); } + else { setverdict(fail); } + } + + testcase TC_NegSem_050402_actual_parameters_119() runs on GeneralComp { + var R v_rec; + f_test(v_rec); + } + + control { + execute(TC_NegSem_050402_actual_parameters_119()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_120.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_120.ttcn new file mode 100644 index 00000000..c7f578bf --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_120.ttcn @@ -0,0 +1,36 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that uninitialized values cannot be passed to inout formal parameters + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Unless specified differently in the relevant clause(s), actual parameters +// passed to in or inout formal parameters shall be at least partially +// initialized (for an exemption see e.g. clause 16.1.2 of the present document). + +module NegSem_050402_actual_parameters_120 { + + type component GeneralComp { + } + + type record R { + integer field1, + integer field2 optional + } + + function f_test (inout R p_val) { + if (not isbound(p_val)) { setverdict(pass); } + else { setverdict(fail); } + } + + testcase TC_NegSem_050402_actual_parameters_120() runs on GeneralComp { + var R v_rec; + f_test(v_rec); + } + + control { + execute(TC_NegSem_050402_actual_parameters_120()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_121.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_121.ttcn new file mode 100644 index 00000000..4da84e2e --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_121.ttcn @@ -0,0 +1,36 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that function calls passed to lazy formal parameters cannot contain inout parameters + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Functions, called by actual parameters passed to fuzzy or lazy formal parameters +// of the calling function, shall not have inout or out formal parameters. The called +// functions may use other functions with inout or out parameters internally. + +module NegSem_050402_actual_parameters_121 { + + type component GeneralComp { + } + + function f_eval(inout integer p_val) return integer { + p_val := p_val + 1; + return p_val; + } + + function f_test (@lazy integer p_val) { + if (p_val == 2) { setverdict(pass); } + else { setverdict(fail); } + } + + testcase TC_NegSem_050402_actual_parameters_121() runs on GeneralComp { + var integer v_val := 0; + f_test(1 + f_eval(v_val)); + } + + control { + execute(TC_NegSem_050402_actual_parameters_121()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_122.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_122.ttcn new file mode 100644 index 00000000..e8842186 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_122.ttcn @@ -0,0 +1,36 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that function calls passed to fuzzy formal parameters cannot contain inout parameters + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Functions, called by actual parameters passed to fuzzy or lazy formal parameters +// of the calling function, shall not have inout or out formal parameters. The called +// functions may use other functions with inout or out parameters internally. + +module NegSem_050402_actual_parameters_122 { + + type component GeneralComp { + } + + function f_eval(inout integer p_val) return integer { + p_val := p_val + 1; + return p_val; + } + + function f_test (@fuzzy integer p_val) { + if (p_val == 2) { setverdict(pass); } + else { setverdict(fail); } + } + + testcase TC_NegSem_050402_actual_parameters_122() runs on GeneralComp { + var integer v_val := 0; + f_test(1 + f_eval(v_val)); + } + + control { + execute(TC_NegSem_050402_actual_parameters_122()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_123.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_123.ttcn new file mode 100644 index 00000000..5d3436fc --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_123.ttcn @@ -0,0 +1,36 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that function calls passed to lazy formal parameters cannot contain out parameters + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Functions, called by actual parameters passed to fuzzy or lazy formal parameters +// of the calling function, shall not have inout or out formal parameters. The called +// functions may use other functions with inout or out parameters internally. + +module NegSem_050402_actual_parameters_123 { + + type component GeneralComp { + } + + function f_eval(out integer p_val) return integer { + p_val := 10; + return 1; + } + + function f_test (@lazy integer p_val) { + if (p_val == 12) { setverdict(pass); } + else { setverdict(fail); } + } + + testcase TC_NegSem_050402_actual_parameters_123() runs on GeneralComp { + var integer v_val := 0; + f_test(1 + f_eval(v_val) + v_val); + } + + control { + execute(TC_NegSem_050402_actual_parameters_123()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_124.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_124.ttcn new file mode 100644 index 00000000..60ee4eb8 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_124.ttcn @@ -0,0 +1,36 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that function calls passed to fuzzy formal parameters cannot contain out parameters + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Functions, called by actual parameters passed to fuzzy or lazy formal parameters +// of the calling function, shall not have inout or out formal parameters. The called +// functions may use other functions with inout or out parameters internally. + +module NegSem_050402_actual_parameters_124 { + + type component GeneralComp { + } + + function f_eval(out integer p_val) return integer { + p_val := 10; + return 1; + } + + function f_test (@fuzzy integer p_val) { + if (p_val == 12) { setverdict(pass); } + else { setverdict(fail); } + } + + testcase TC_NegSem_050402_actual_parameters_124() runs on GeneralComp { + var integer v_val := 0; + f_test(1 + f_eval(v_val) + v_val); + } + + control { + execute(TC_NegSem_050402_actual_parameters_124()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_125.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_125.ttcn new file mode 100644 index 00000000..98ac82fc --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_125.ttcn @@ -0,0 +1,31 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that error is generated when lazy variable is passed to inout formal parameter + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters passed to out and inout parameters shall not be references to +// lazy or fuzzy variables. + +module NegSem_050402_actual_parameters_125 { + + type component GeneralComp { + } + + function f_test (inout integer p_val) { + p_val := 10; + } + + testcase TC_NegSem_050402_actual_parameters_125() runs on GeneralComp { + var @lazy integer v_val := 1; + f_test(v_val); + if (v_val == 10) { setverdict(pass); } + else { setverdict(fail); } + } + + control { + execute(TC_NegSem_050402_actual_parameters_125()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_126.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_126.ttcn new file mode 100644 index 00000000..9e85f4ac --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_126.ttcn @@ -0,0 +1,31 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that error is generated when fuzzy variable is passed to inout formal parameter + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters passed to out and inout parameters shall not be references to +// lazy or fuzzy variables. + +module NegSem_050402_actual_parameters_126 { + + type component GeneralComp { + } + + function f_test (inout integer p_val) { + p_val := 10; + } + + testcase TC_NegSem_050402_actual_parameters_126() runs on GeneralComp { + var @fuzzy integer v_val := 1; + f_test(v_val); + if (v_val == 10) { setverdict(pass); } + else { setverdict(fail); } + } + + control { + execute(TC_NegSem_050402_actual_parameters_126()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_127.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_127.ttcn new file mode 100644 index 00000000..76cbabf1 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_127.ttcn @@ -0,0 +1,31 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that error is generated when lazy variable is passed to out formal parameter + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters passed to out and inout parameters shall not be references to +// lazy or fuzzy variables. + +module NegSem_050402_actual_parameters_127 { + + type component GeneralComp { + } + + function f_test (out integer p_val) { + p_val := 10; + } + + testcase TC_NegSem_050402_actual_parameters_127() runs on GeneralComp { + var @lazy integer v_val := 1; + f_test(v_val); + if (v_val == 10) { setverdict(pass); } + else { setverdict(fail); } + } + + control { + execute(TC_NegSem_050402_actual_parameters_127()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_128.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_128.ttcn new file mode 100644 index 00000000..b7b9fc5c --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_128.ttcn @@ -0,0 +1,31 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that error is generated when fuzzy variable is passed to out formal parameter + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters passed to out and inout parameters shall not be references to +// lazy or fuzzy variables. + +module NegSem_050402_actual_parameters_128 { + + type component GeneralComp { + } + + function f_test (out integer p_val) { + p_val := 10; + } + + testcase TC_NegSem_050402_actual_parameters_128() runs on GeneralComp { + var @fuzzy integer v_val := 1; + f_test(v_val); + if (v_val == 10) { setverdict(pass); } + else { setverdict(fail); } + } + + control { + execute(TC_NegSem_050402_actual_parameters_128()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_129.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_129.ttcn new file mode 100644 index 00000000..c94cd328 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_129.ttcn @@ -0,0 +1,39 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that error is generated when passing record and its field to inout parameters + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Whenever a value or template of a record, set, union, record of, set of, array +// and anytype type is passed as an actual parameter to an inout parameter, none of +// the fields or elemens of this structured value or template shall be passed as +// an actual parameter to another inout parameter of the same parameterized TTCN-3 +// object. This restriction applies recursively to all sub-elements of the structured +// value or template in any level of nesting. + +module NegSem_050402_actual_parameters_129 { + + type component GeneralComp { + } + + type record R { + integer field1 + } + + function f_test (inout integer p_val, inout R p_rec) { + p_rec.field1 := 10; + if (p_val == 10) { setverdict(pass); } + else { setverdict(fail); } + } + + testcase TC_NegSem_050402_actual_parameters_129() runs on GeneralComp { + var R v_val := { field1 := 1 }; + f_test(v_val.field1, v_val); + } + + control { + execute(TC_NegSem_050402_actual_parameters_129()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_130.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_130.ttcn new file mode 100644 index 00000000..eba2d3b2 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_130.ttcn @@ -0,0 +1,39 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that error is generated when passing set and its field to inout parameters + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Whenever a value or template of a record, set, union, record of, set of, array +// and anytype type is passed as an actual parameter to an inout parameter, none of +// the fields or elemens of this structured value or template shall be passed as +// an actual parameter to another inout parameter of the same parameterized TTCN-3 +// object. This restriction applies recursively to all sub-elements of the structured +// value or template in any level of nesting. + +module NegSem_050402_actual_parameters_130 { + + type component GeneralComp { + } + + type set S { + integer field1 + } + + function f_test (inout integer p_val, inout S p_set) { + p_set.field1 := 10; + if (p_val == 10) { setverdict(pass); } + else { setverdict(fail); } + } + + testcase TC_NegSem_050402_actual_parameters_130() runs on GeneralComp { + var S v_val := { field1 := 1 }; + f_test(v_val.field1, v_val); + } + + control { + execute(TC_NegSem_050402_actual_parameters_130()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_131.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_131.ttcn new file mode 100644 index 00000000..da99b551 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_131.ttcn @@ -0,0 +1,40 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that error is generated when passing union and its element to inout parameters + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Whenever a value or template of a record, set, union, record of, set of, array +// and anytype type is passed as an actual parameter to an inout parameter, none of +// the fields or elemens of this structured value or template shall be passed as +// an actual parameter to another inout parameter of the same parameterized TTCN-3 +// object. This restriction applies recursively to all sub-elements of the structured +// value or template in any level of nesting. + +module NegSem_050402_actual_parameters_131 { + + type component GeneralComp { + } + + type union U { + integer option1, + charstring option2 + } + + function f_test (inout integer p_val, inout U p_un) { + p_un.option1 := 10; + if (p_val == 10) { setverdict(pass); } + else { setverdict(fail); } + } + + testcase TC_NegSem_050402_actual_parameters_131() runs on GeneralComp { + var U v_val := { option1 := 1 }; + f_test(v_val.option1, v_val); + } + + control { + execute(TC_NegSem_050402_actual_parameters_131()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_132.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_132.ttcn new file mode 100644 index 00000000..324e0170 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_132.ttcn @@ -0,0 +1,37 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that error is generated when passing record of and its element to inout parameters + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Whenever a value or template of a record, set, union, record of, set of, array +// and anytype type is passed as an actual parameter to an inout parameter, none of +// the fields or elemens of this structured value or template shall be passed as +// an actual parameter to another inout parameter of the same parameterized TTCN-3 +// object. This restriction applies recursively to all sub-elements of the structured +// value or template in any level of nesting. + +module NegSem_050402_actual_parameters_132 { + + type component GeneralComp { + } + + type record of integer RI; + + function f_test (inout integer p_val, inout RI p_rec) { + p_rec[0] := 10; + if (p_val == 10) { setverdict(pass); } + else { setverdict(fail); } + } + + testcase TC_NegSem_050402_actual_parameters_132() runs on GeneralComp { + var RI v_val := { 1 }; + f_test(v_val[0], v_val); + } + + control { + execute(TC_NegSem_050402_actual_parameters_132()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_133.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_133.ttcn new file mode 100644 index 00000000..717b58a6 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_133.ttcn @@ -0,0 +1,37 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that error is generated when passing set of and its element to inout parameters + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Whenever a value or template of a record, set, union, record of, set of, array +// and anytype type is passed as an actual parameter to an inout parameter, none of +// the fields or elemens of this structured value or template shall be passed as +// an actual parameter to another inout parameter of the same parameterized TTCN-3 +// object. This restriction applies recursively to all sub-elements of the structured +// value or template in any level of nesting. + +module NegSem_050402_actual_parameters_133 { + + type component GeneralComp { + } + + type set of integer SI; + + function f_test (inout integer p_val, inout SI p_set) { + p_set[0] := 10; + if (p_val == 10) { setverdict(pass); } + else { setverdict(fail); } + } + + testcase TC_NegSem_050402_actual_parameters_133() runs on GeneralComp { + var SI v_val := { 1 }; + f_test(v_val[0], v_val); + } + + control { + execute(TC_NegSem_050402_actual_parameters_133()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_134.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_134.ttcn new file mode 100644 index 00000000..c08f6654 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_134.ttcn @@ -0,0 +1,37 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that error is generated when passing array and its element to inout parameters + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Whenever a value or template of a record, set, union, record of, set of, array +// and anytype type is passed as an actual parameter to an inout parameter, none of +// the fields or elemens of this structured value or template shall be passed as +// an actual parameter to another inout parameter of the same parameterized TTCN-3 +// object. This restriction applies recursively to all sub-elements of the structured +// value or template in any level of nesting. + +module NegSem_050402_actual_parameters_134 { + + type component GeneralComp { + } + + type integer A[2]; + + function f_test (inout integer p_val, inout A p_arr) { + p_arr[0] := 10; + if (p_val == 10) { setverdict(pass); } + else { setverdict(fail); } + } + + testcase TC_NegSem_050402_actual_parameters_134() runs on GeneralComp { + var A v_val := { 1, 2 }; + f_test(v_val[0], v_val); + } + + control { + execute(TC_NegSem_050402_actual_parameters_134()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_135.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_135.ttcn new file mode 100644 index 00000000..f69bac73 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_135.ttcn @@ -0,0 +1,35 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that error is generated when passing anytype value and its element to inout parameters + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Whenever a value or template of a record, set, union, record of, set of, array +// and anytype type is passed as an actual parameter to an inout parameter, none of +// the fields or elemens of this structured value or template shall be passed as +// an actual parameter to another inout parameter of the same parameterized TTCN-3 +// object. This restriction applies recursively to all sub-elements of the structured +// value or template in any level of nesting. + +module NegSem_050402_actual_parameters_135 { + + type component GeneralComp { + } + + function f_test (inout integer p_val, inout anytype p_any) { + p_any.integer := 10; + if (p_val == 10) { setverdict(pass); } + else { setverdict(fail); } + } + + testcase TC_NegSem_050402_actual_parameters_135() runs on GeneralComp { + var anytype v_val := { integer := 1 }; + f_test(v_val.integer, v_val); + } + + control { + execute(TC_NegSem_050402_actual_parameters_135()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_136.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_136.ttcn new file mode 100644 index 00000000..32d9417b --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_136.ttcn @@ -0,0 +1,43 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that error is generated when passing record and its sub-elements to inout parameters + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Whenever a value or template of a record, set, union, record of, set of, array +// and anytype type is passed as an actual parameter to an inout parameter, none of +// the fields or elemens of this structured value or template shall be passed as +// an actual parameter to another inout parameter of the same parameterized TTCN-3 +// object. This restriction applies recursively to all sub-elements of the structured +// value or template in any level of nesting. + +module NegSem_050402_actual_parameters_136 { + + type component GeneralComp { + } + + type record Sub { + integer subfield1 + } + + type record R { + Sub field1 + } + + function f_test (inout integer p_val, inout R p_rec) { + p_rec.field1.subfield1 := 10; + if (p_val == 10) { setverdict(pass); } + else { setverdict(fail); } + } + + testcase TC_NegSem_050402_actual_parameters_136() runs on GeneralComp { + var R v_val := { field1 := { subfield1 := 1 } }; + f_test(v_val.field1.subfield1, v_val); + } + + control { + execute(TC_NegSem_050402_actual_parameters_136()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_137.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_137.ttcn new file mode 100644 index 00000000..76158721 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_137.ttcn @@ -0,0 +1,43 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that error is generated when passing set and its sub-field to inout parameters + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Whenever a value or template of a record, set, union, record of, set of, array +// and anytype type is passed as an actual parameter to an inout parameter, none of +// the fields or elemens of this structured value or template shall be passed as +// an actual parameter to another inout parameter of the same parameterized TTCN-3 +// object. This restriction applies recursively to all sub-elements of the structured +// value or template in any level of nesting. + +module NegSem_050402_actual_parameters_137 { + + type component GeneralComp { + } + + type record Sub { + integer subfield1 + } + + type set S { + Sub field1 + } + + function f_test (inout integer p_val, inout S p_set) { + p_set.field1.subfield1 := 10; + if (p_val == 10) { setverdict(pass); } + else { setverdict(fail); } + } + + testcase TC_NegSem_050402_actual_parameters_137() runs on GeneralComp { + var S v_val := { field1 := { subfield1 := 1 } }; + f_test(v_val.field1.subfield1, v_val); + } + + control { + execute(TC_NegSem_050402_actual_parameters_137()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_138.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_138.ttcn new file mode 100644 index 00000000..49314a06 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_138.ttcn @@ -0,0 +1,44 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that error is generated when passing union and its sub-element to inout parameters + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Whenever a value or template of a record, set, union, record of, set of, array +// and anytype type is passed as an actual parameter to an inout parameter, none of +// the fields or elemens of this structured value or template shall be passed as +// an actual parameter to another inout parameter of the same parameterized TTCN-3 +// object. This restriction applies recursively to all sub-elements of the structured +// value or template in any level of nesting. + +module NegSem_050402_actual_parameters_138 { + + type component GeneralComp { + } + + type record Sub { + integer subfield1 + } + + type union U { + Sub option1, + charstring option2 + } + + function f_test (inout integer p_val, inout U p_un) { + p_un.option1.subfield1 := 10; + if (p_val == 10) { setverdict(pass); } + else { setverdict(fail); } + } + + testcase TC_NegSem_050402_actual_parameters_138() runs on GeneralComp { + var U v_val := { option1 := { subfield1 := 1 } }; + f_test(v_val.option1.subfield1, v_val); + } + + control { + execute(TC_NegSem_050402_actual_parameters_138()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_139.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_139.ttcn new file mode 100644 index 00000000..3e0f9e0f --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_139.ttcn @@ -0,0 +1,41 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that error is generated when passing record of and its sub-element to inout parameters + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Whenever a value or template of a record, set, union, record of, set of, array +// and anytype type is passed as an actual parameter to an inout parameter, none of +// the fields or elemens of this structured value or template shall be passed as +// an actual parameter to another inout parameter of the same parameterized TTCN-3 +// object. This restriction applies recursively to all sub-elements of the structured +// value or template in any level of nesting. + +module NegSem_050402_actual_parameters_139 { + + type component GeneralComp { + } + + type record Sub { + integer subfield1 + } + + type record of Sub RS; + + function f_test (inout integer p_val, inout RS p_rec) { + p_rec[0].subfield1 := 10; + if (p_val == 10) { setverdict(pass); } + else { setverdict(fail); } + } + + testcase TC_NegSem_050402_actual_parameters_139() runs on GeneralComp { + var RS v_val := { { subfield1 := 1 } }; + f_test(v_val[0].subfield1, v_val); + } + + control { + execute(TC_NegSem_050402_actual_parameters_139()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_140.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_140.ttcn new file mode 100644 index 00000000..f27a9a8b --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_140.ttcn @@ -0,0 +1,41 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that error is generated when passing set of and its sub-element to inout parameters + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Whenever a value or template of a record, set, union, record of, set of, array +// and anytype type is passed as an actual parameter to an inout parameter, none of +// the fields or elemens of this structured value or template shall be passed as +// an actual parameter to another inout parameter of the same parameterized TTCN-3 +// object. This restriction applies recursively to all sub-elements of the structured +// value or template in any level of nesting. + +module NegSem_050402_actual_parameters_140 { + + type component GeneralComp { + } + + type record Sub { + integer subfield1 + } + + type set of Sub SoS; + + function f_test (inout integer p_val, inout SoS p_set) { + p_set[0].subfield1 := 10; + if (p_val == 10) { setverdict(pass); } + else { setverdict(fail); } + } + + testcase TC_NegSem_050402_actual_parameters_140() runs on GeneralComp { + var SoS v_val := { { subfield1 := 1 } }; + f_test(v_val[0].subfield1, v_val); + } + + control { + execute(TC_NegSem_050402_actual_parameters_140()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_141.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_141.ttcn new file mode 100644 index 00000000..886a0c52 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_141.ttcn @@ -0,0 +1,41 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that error is generated when passing array and its sub-element to inout parameters + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Whenever a value or template of a record, set, union, record of, set of, array +// and anytype type is passed as an actual parameter to an inout parameter, none of +// the fields or elemens of this structured value or template shall be passed as +// an actual parameter to another inout parameter of the same parameterized TTCN-3 +// object. This restriction applies recursively to all sub-elements of the structured +// value or template in any level of nesting. + +module NegSem_050402_actual_parameters_141 { + + type component GeneralComp { + } + + type record Sub { + integer subfield1 + } + + type Sub A[2]; + + function f_test (inout integer p_val, inout A p_arr) { + p_arr[0].subfield1 := 10; + if (p_val == 10) { setverdict(pass); } + else { setverdict(fail); } + } + + testcase TC_NegSem_050402_actual_parameters_141() runs on GeneralComp { + var A v_val := { { subfield1 := 1 }, { subfield1 := 2 } }; + f_test(v_val[0].subfield1, v_val); + } + + control { + execute(TC_NegSem_050402_actual_parameters_141()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_142.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_142.ttcn new file mode 100644 index 00000000..cf8be243 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_142.ttcn @@ -0,0 +1,39 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that error is generated when passing anytype value and its sub-element to inout parameters + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Whenever a value or template of a record, set, union, record of, set of, array +// and anytype type is passed as an actual parameter to an inout parameter, none of +// the fields or elemens of this structured value or template shall be passed as +// an actual parameter to another inout parameter of the same parameterized TTCN-3 +// object. This restriction applies recursively to all sub-elements of the structured +// value or template in any level of nesting. + +module NegSem_050402_actual_parameters_142 { + + type component GeneralComp { + } + + type record Sub { + integer subfield1 + } + + function f_test (inout integer p_val, inout anytype p_any) { + p_any.Sub.subfield1 := 10; + if (p_val == 10) { setverdict(pass); } + else { setverdict(fail); } + } + + testcase TC_NegSem_050402_actual_parameters_142() runs on GeneralComp { + var anytype v_val := { Sub := { subfield1 := 1 } }; + f_test(v_val.Sub.subfield1, v_val); + } + + control { + execute(TC_NegSem_050402_actual_parameters_142()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_143.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_143.ttcn new file mode 100644 index 00000000..eab31189 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_143.ttcn @@ -0,0 +1,38 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that error is generated when passing distinct union alternatives to inout parameters + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Whenever a value or template of a record, set, union, record of, set of, array +// and anytype type is passed as an actual parameter to an inout parameter, none of +// the fields or elemens of this structured value or template shall be passed as +// an actual parameter to another inout parameter of the same parameterized TTCN-3 +// object. This restriction applies recursively to all sub-elements of the structured +// value or template in any level of nesting. + +module NegSem_050402_actual_parameters_143 { + + type component GeneralComp { + } + + type union U { + integer option1, + charstring option2 + } + + function f_test (inout integer p_val, inout charstring p_char) { + setverdict(pass); + } + + testcase TC_NegSem_050402_actual_parameters_143() runs on GeneralComp { + var U v_val := { option1 := 1 }; + f_test(v_val.option1, v_val.option2); + } + + control { + execute(TC_NegSem_050402_actual_parameters_143()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_144.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_144.ttcn new file mode 100644 index 00000000..149e7aa7 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_144.ttcn @@ -0,0 +1,33 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that error is generated when passing distinct union alternatives to inout parameters + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Whenever a value or template of a record, set, union, record of, set of, array +// and anytype type is passed as an actual parameter to an inout parameter, none of +// the fields or elemens of this structured value or template shall be passed as +// an actual parameter to another inout parameter of the same parameterized TTCN-3 +// object. This restriction applies recursively to all sub-elements of the structured +// value or template in any level of nesting. + +module NegSem_050402_actual_parameters_144 { + + type component GeneralComp { + } + + function f_test (inout integer p_val, inout charstring p_char) { + setverdict(pass); + } + + testcase TC_NegSem_050402_actual_parameters_144() runs on GeneralComp { + var anytype v_val := { integer := 1 }; + f_test(v_val.integer, v_val.charstring); + } + + control { + execute(TC_NegSem_050402_actual_parameters_144()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_145.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_145.ttcn new file mode 100644 index 00000000..75682241 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_145.ttcn @@ -0,0 +1,27 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that the fourth part of the Example 3 produces the expected error + ** @verdict pass reject + ***************************************************/ + +module NegSem_050402_actual_parameters_145 { + + type component GeneralComp { + } + type record of integer RoI; + + function f_testReferences (inout RoI p_roi, inout integer p_elem) { + } + + testcase TC_NegSem_050402_actual_parameters_145() runs on GeneralComp { + var RoI v_roi := { 0, 1, 2, 3, 4, 5 }; + f_testReferences(v_roi, v_roi[2]); // produces an error as elements of v_roi are not allowed + // to be passed by reference if the parent structure (v_roi) is passed by reference too. + setverdict(pass); + } + + control { + execute(TC_NegSem_050402_actual_parameters_145()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_146.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_146.ttcn new file mode 100644 index 00000000..06837f96 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_146.ttcn @@ -0,0 +1,32 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that literal cannot be used as actual out value parameters of functions + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to out formal value parameters shall be (template) variables, +// formal (template) parameters (of in, inout or out parameterization) or references to elements +// of (template) variables or formal (template) parameters of structured types. Furthermore it is +// allowed to use the dash symbol "-" as an actual out parameter, signifying that a possible result +// for that parameter will not be passed back. + +module NegSem_050402_actual_parameters_146 { + + type component GeneralComp { + } + + function f_test(out integer p_val) { + p_val := 9 + } + + testcase TC_NegSem_050402_actual_parameters_146() runs on GeneralComp { + f_test(1); + setverdict(pass); + } + + control { + execute(TC_NegSem_050402_actual_parameters_146()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_147.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_147.ttcn new file mode 100644 index 00000000..ed161213 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_147.ttcn @@ -0,0 +1,37 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that expression cannot be used as actual out value parameters of functions + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to out formal value parameters shall be (template) variables, +// formal (template) parameters (of in, inout or out parameterization) or references to elements +// of (template) variables or formal (template) parameters of structured types. Furthermore it is +// allowed to use the dash symbol "-" as an actual out parameter, signifying that a possible result +// for that parameter will not be passed back. + +module NegSem_050402_actual_parameters_147 { + + type component GeneralComp { + } + + function f_ret() return integer { + return 4; + } + + function f_test(out integer p_val) { + p_val := 9 + } + + testcase TC_NegSem_050402_actual_parameters_147() runs on GeneralComp { + var integer v_val := 5; + f_test(10 + f_ret() - v_val); + setverdict(pass); + } + + control { + execute(TC_NegSem_050402_actual_parameters_147()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_148.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_148.ttcn new file mode 100644 index 00000000..f70773c7 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_148.ttcn @@ -0,0 +1,36 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that function calls cannot be used as actual out value parameters of functions + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to out formal value parameters shall be (template) variables, +// formal (template) parameters (of in, inout or out parameterization) or references to elements +// of (template) variables or formal (template) parameters of structured types. Furthermore it is +// allowed to use the dash symbol "-" as an actual out parameter, signifying that a possible result +// for that parameter will not be passed back. + +module NegSem_050402_actual_parameters_148 { + + type component GeneralComp { + } + + function f_ret() return integer { + return 4; + } + + function f_test(out integer p_val) { + p_val := 9 + } + + testcase TC_NegSem_050402_actual_parameters_148() runs on GeneralComp { + f_test(f_ret()); + setverdict(pass); + } + + control { + execute(TC_NegSem_050402_actual_parameters_148()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_149.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_149.ttcn new file mode 100644 index 00000000..dfcecc89 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_149.ttcn @@ -0,0 +1,34 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that module parameters cannot be used as actual out value parameters of functions + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to out formal value parameters shall be (template) variables, +// formal (template) parameters (of in, inout or out parameterization) or references to elements +// of (template) variables or formal (template) parameters of structured types. Furthermore it is +// allowed to use the dash symbol "-" as an actual out parameter, signifying that a possible result +// for that parameter will not be passed back. + +module NegSem_050402_actual_parameters_149 { + + type component GeneralComp { + } + + modulepar integer PX_VAL := 2; + + function f_test(out integer p_val) { + p_val := 9 + } + + testcase TC_NegSem_050402_actual_parameters_149() runs on GeneralComp { + f_test(PX_VAL); + setverdict(pass); + } + + control { + execute(TC_NegSem_050402_actual_parameters_149()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_150.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_150.ttcn new file mode 100644 index 00000000..1d183cdc --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_150.ttcn @@ -0,0 +1,34 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that templates cannot be used as actual out value parameters of functions + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to out formal value parameters shall be (template) variables, +// formal (template) parameters (of in, inout or out parameterization) or references to elements +// of (template) variables or formal (template) parameters of structured types. Furthermore it is +// allowed to use the dash symbol "-" as an actual out parameter, signifying that a possible result +// for that parameter will not be passed back. + +module NegSem_050402_actual_parameters_150 { + + type component GeneralComp { + } + + template integer mw_msg := ?; + + function f_test(out integer p_val) { + p_val := 9 + } + + testcase TC_NegSem_050402_actual_parameters_150() runs on GeneralComp { + f_test(mw_msg); + setverdict(pass); + } + + control { + execute(TC_NegSem_050402_actual_parameters_150()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_151.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_151.ttcn new file mode 100644 index 00000000..6d5235d8 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_151.ttcn @@ -0,0 +1,33 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that constants cannot be used as actual out value parameters of functions + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to out formal value parameters shall be (template) variables, +// formal (template) parameters (of in, inout or out parameterization) or references to elements +// of (template) variables or formal (template) parameters of structured types. Furthermore it is +// allowed to use the dash symbol "-" as an actual out parameter, signifying that a possible result +// for that parameter will not be passed back. + +module NegSem_050402_actual_parameters_151 { + + type component GeneralComp { + } + + function f_test(out integer p_val) { + p_val := 9 + } + + testcase TC_NegSem_050402_actual_parameters_151() runs on GeneralComp { + const integer c_val := 3; + f_test(c_val); + setverdict(pass); + } + + control { + execute(TC_NegSem_050402_actual_parameters_151()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_152.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_152.ttcn new file mode 100644 index 00000000..f6dc6c0e --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_152.ttcn @@ -0,0 +1,36 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that literal cannot be used as actual out value parameters of altsteps + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to out formal value parameters shall be (template) variables, +// formal (template) parameters (of in, inout or out parameterization) or references to elements +// of (template) variables or formal (template) parameters of structured types. Furthermore it is +// allowed to use the dash symbol "-" as an actual out parameter, signifying that a possible result +// for that parameter will not be passed back. + +module NegSem_050402_actual_parameters_152 { + + type component GeneralComp { + } + + altstep a_test(out integer p_val) { + [] any timer.timeout { + p_val := 9 + } + } + + testcase TC_NegSem_050402_actual_parameters_152() runs on GeneralComp { + timer t_tmr := 0.1; + t_tmr.start; + a_test(1); + setverdict(pass); + } + + control { + execute(TC_NegSem_050402_actual_parameters_152()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_153.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_153.ttcn new file mode 100644 index 00000000..0de3fe58 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_153.ttcn @@ -0,0 +1,41 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that expression cannot be used as actual out value parameters of altsteps + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to out formal value parameters shall be (template) variables, +// formal (template) parameters (of in, inout or out parameterization) or references to elements +// of (template) variables or formal (template) parameters of structured types. Furthermore it is +// allowed to use the dash symbol "-" as an actual out parameter, signifying that a possible result +// for that parameter will not be passed back. + +module NegSem_050402_actual_parameters_147 { + + type component GeneralComp { + } + + altstep a_test(out integer p_val) { + [] any timer.timeout { + p_val := 9 + } + } + + function f_test(out integer p_val) { + p_val := 9 + } + + testcase TC_NegSem_050402_actual_parameters_153() runs on GeneralComp { + var integer v_val := 5; + timer t_tmr := 0.1; + t_tmr.start; + a_test(10 + f_ret() - v_val); + setverdict(pass); + } + + control { + execute(TC_NegSem_050402_actual_parameters_153()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_154.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_154.ttcn new file mode 100644 index 00000000..b5984ae0 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_154.ttcn @@ -0,0 +1,40 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that function calls cannot be used as actual out value parameters of altsteps + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to out formal value parameters shall be (template) variables, +// formal (template) parameters (of in, inout or out parameterization) or references to elements +// of (template) variables or formal (template) parameters of structured types. Furthermore it is +// allowed to use the dash symbol "-" as an actual out parameter, signifying that a possible result +// for that parameter will not be passed back. + +module NegSem_050402_actual_parameters_154 { + + type component GeneralComp { + } + + altstep a_test(out integer p_val) { + [] any timer.timeout { + p_val := 9 + } + } + + function f_test(out integer p_val) { + p_val := 9 + } + + testcase TC_NegSem_050402_actual_parameters_154() runs on GeneralComp { + timer t_tmr := 0.1; + t_tmr.start; + a_test(f_ret()); + setverdict(pass); + } + + control { + execute(TC_NegSem_050402_actual_parameters_154()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_155.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_155.ttcn new file mode 100644 index 00000000..904e28b1 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_155.ttcn @@ -0,0 +1,38 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that module parameters cannot be used as actual out value parameters of altsteps + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to out formal value parameters shall be (template) variables, +// formal (template) parameters (of in, inout or out parameterization) or references to elements +// of (template) variables or formal (template) parameters of structured types. Furthermore it is +// allowed to use the dash symbol "-" as an actual out parameter, signifying that a possible result +// for that parameter will not be passed back. + +module NegSem_050402_actual_parameters_155 { + + type component GeneralComp { + } + + modulepar integer PX_VAL := 2; + + altstep a_test(out integer p_val) { + [] any timer.timeout { + p_val := 9 + } + } + + testcase TC_NegSem_050402_actual_parameters_155() runs on GeneralComp { + timer t_tmr := 0.1; + t_tmr.start; + a_test(PX_VAL); + setverdict(pass); + } + + control { + execute(TC_NegSem_050402_actual_parameters_155()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_156.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_156.ttcn new file mode 100644 index 00000000..f686d4a8 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_156.ttcn @@ -0,0 +1,38 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that templates cannot be used as actual out value parameters of altsteps + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to out formal value parameters shall be (template) variables, +// formal (template) parameters (of in, inout or out parameterization) or references to elements +// of (template) variables or formal (template) parameters of structured types. Furthermore it is +// allowed to use the dash symbol "-" as an actual out parameter, signifying that a possible result +// for that parameter will not be passed back. + +module NegSem_050402_actual_parameters_156 { + + type component GeneralComp { + } + + template integer mw_msg := ?; + + altstep a_test(out integer p_val) { + [] any timer.timeout { + p_val := 9 + } + } + + testcase TC_NegSem_050402_actual_parameters_156() runs on GeneralComp { + timer t_tmr := 0.1; + t_tmr.start; + a_test(mw_msg); + setverdict(pass); + } + + control { + execute(TC_NegSem_050402_actual_parameters_156()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_157.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_157.ttcn new file mode 100644 index 00000000..da5ed8d0 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_157.ttcn @@ -0,0 +1,37 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that constants cannot be used as actual out value parameters of altsteps + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to out formal value parameters shall be (template) variables, +// formal (template) parameters (of in, inout or out parameterization) or references to elements +// of (template) variables or formal (template) parameters of structured types. Furthermore it is +// allowed to use the dash symbol "-" as an actual out parameter, signifying that a possible result +// for that parameter will not be passed back. + +module NegSem_050402_actual_parameters_157 { + + type component GeneralComp { + } + + altstep a_test(out integer p_val) { + [] any timer.timeout { + p_val := 9 + } + } + + testcase TC_NegSem_050402_actual_parameters_157() runs on GeneralComp { + const integer c_val := 3; + timer t_tmr := 0.1; + t_tmr.start; + a_test(c_val); + setverdict(pass); + } + + control { + execute(TC_NegSem_050402_actual_parameters_157()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_158.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_158.ttcn new file mode 100644 index 00000000..ebb2bd1f --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_158.ttcn @@ -0,0 +1,29 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that function cannot have more actual than formal parameters + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// The number of actual parameters in the list notation shall not exceed the number of parameters +// in the formal parameter list. + +module NegSem_050402_actual_parameters_158 { + + type component GeneralComp { + } + + function f_test(in integer p_val) { + if (p_val == 1) { setverdict(pass); } + else { setverdict(fail); } + } + + testcase TC_NegSem_050402_actual_parameters_158() runs on GeneralComp { + f_test(1, 2); // tested parameter passing + } + + control { + execute(TC_NegSem_050402_actual_parameters_158()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_159.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_159.ttcn new file mode 100644 index 00000000..863816ba --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_159.ttcn @@ -0,0 +1,27 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that templates cannot have more actual than formal parameters + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// The number of actual parameters in the list notation shall not exceed the number of parameters +// in the formal parameter list. + +module NegSem_050402_actual_parameters_159 { + + type component GeneralComp { + } + + template integer mw_range (integer p_par) := (0..p_par); + + testcase TC_NegSem_050402_actual_parameters_159() runs on GeneralComp { + log(mw_range(1, 2)); // tested parameter passing + setverdict(pass); + } + + control { + execute(TC_NegSem_050402_actual_parameters_159()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_160.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_160.ttcn new file mode 100644 index 00000000..be3d59b0 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_160.ttcn @@ -0,0 +1,33 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that altstep cannot have more actual than formal parameters + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// The number of actual parameters in the list notation shall not exceed the number of parameters +// in the formal parameter list. + +module NegSem_050402_actual_parameters_160 { + + type component GeneralComp { + } + + altstep a_test(in integer p_val) { + [] any timer.timeout { + if (p_val == 1) { setverdict(pass); } + else { setverdict(fail); } + } + } + + testcase TC_NegSem_050402_actual_parameters_160() runs on GeneralComp { + timer t_tmr := 0.1; + t_tmr.start; + a_test(1, 2); // tested parameter passing + } + + control { + execute(TC_NegSem_050402_actual_parameters_160()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_161.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_161.ttcn new file mode 100644 index 00000000..48a9887d --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_161.ttcn @@ -0,0 +1,25 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that function cannot have more actual than formal parameters + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// The number of actual parameters in the list notation shall not exceed the number of parameters +// in the formal parameter list. + +module NegSem_050402_actual_parameters_161 { + + type component GeneralComp { + } + + testcase TC_NegSem_050402_actual_parameters_161(in integer p_val) runs on GeneralComp { + if (p_val == 1) { setverdict(pass); } + else { setverdict(fail); } + } + + control { + execute(TC_NegSem_050402_actual_parameters_161(1, 2)); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_162.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_162.ttcn new file mode 100644 index 00000000..ed1a6177 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_162.ttcn @@ -0,0 +1,34 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that restricted template variables cannot be passed to unrestricted inout template parameters + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// For inout formal template parameters, the template restriction of the actual and the formal parameter must be the same. + +module NegSem_050402_actual_parameters_162 { + + type component GeneralComp { + } + + type record R1 { + integer field1, + integer field2 optional + } + + function f_test (inout template R1 p_val) { + if (valueof(p_val) == { field1 := 1, field2 := 2 }) { setverdict(pass); } + else { setverdict(fail); } + } + + testcase TC_NegSem_050402_actual_parameters_162() runs on GeneralComp { + var template(value) R1 v_rec := { 1, 2 }; + f_test(v_rec); + } + + control { + execute(TC_NegSem_050402_actual_parameters_162()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_163.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_163.ttcn new file mode 100644 index 00000000..eb2cbec7 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_163.ttcn @@ -0,0 +1,34 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that unrestricted template variables cannot be passed to restricted inout template parameters + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// For inout formal template parameters, the template restriction of the actual and the formal parameter must be the same. + +module NegSem_050402_actual_parameters_163 { + + type component GeneralComp { + } + + type record R1 { + integer field1, + integer field2 optional + } + + function f_test (inout template(value) R1 p_val) { + if (valueof(p_val) == { field1 := 1, field2 := 2 }) { setverdict(pass); } + else { setverdict(fail); } + } + + testcase TC_NegSem_050402_actual_parameters_163() runs on GeneralComp { + var template R1 v_rec := { 1, 2 }; + f_test(v_rec); + } + + control { + execute(TC_NegSem_050402_actual_parameters_163()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_164.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_164.ttcn new file mode 100644 index 00000000..c1c68670 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_164.ttcn @@ -0,0 +1,34 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that restricted template variables cannot be passed to inout template parameters with a different restriction + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// For inout formal template parameters, the template restriction of the actual and the formal parameter must be the same. + +module NegSem_050402_actual_parameters_164 { + + type component GeneralComp { + } + + type record R1 { + integer field1, + integer field2 optional + } + + function f_test (inout template(omit) R1 p_val) { + if (valueof(p_val) == { field1 := 1, field2 := 2 }) { setverdict(pass); } + else { setverdict(fail); } + } + + testcase TC_NegSem_050402_actual_parameters_164() runs on GeneralComp { + var template(value) R1 v_rec := { 1, 2 }; + f_test(v_rec); + } + + control { + execute(TC_NegSem_050402_actual_parameters_164()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_165.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_165.ttcn new file mode 100644 index 00000000..0cdbf2b0 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_165.ttcn @@ -0,0 +1,32 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that value variables cannot be used as out formal template parameters of functions + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to out formal template parameters shall be template variables, +// formal template parameters or references to elements of template variables or formal template +// parameters of structured types. + +module NegSem_050402_actual_parameters_165 { + + type component GeneralComp { + } + + function f_test(out template integer p_val) { + p_val := 2; + } + + testcase TC_NegSem_050402_actual_parameters_165() runs on GeneralComp { + var integer vm_msg; + f_test(vm_msg); // tested parameter passing + if (match(2, vm_msg)) { setverdict(pass); } + else { setverdict(fail); } + } + + control { + execute(TC_NegSem_050402_actual_parameters_165()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_166.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_166.ttcn new file mode 100644 index 00000000..7eb2be9f --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_166.ttcn @@ -0,0 +1,36 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that value in parameters cannot be used as out formal template parameters of functions + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to out formal template parameters shall be template variables, +// formal template parameters or references to elements of template variables or formal template +// parameters of structured types. + +module NegSem_050402_actual_parameters_166 { + + type component GeneralComp { + } + + function f_test(out template integer p_val) { + p_val := 0; + } + + function f_caller(in integer p_val) { + f_test(p_val); // tested parameter passing + if (match(0, p_val)) { setverdict(pass); } + else { setverdict(fail); } + } + + + testcase TC_NegSem_050402_actual_parameters_166() runs on GeneralComp { + f_caller(3); // this parameter passing is not a subject of the test + } + + control { + execute(TC_NegSem_050402_actual_parameters_166()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_167.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_167.ttcn new file mode 100644 index 00000000..5946f366 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_167.ttcn @@ -0,0 +1,38 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that value out parameters cannot be used as out formal template parameters of functions + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to out formal template parameters shall be template variables, +// formal template parameters or references to elements of template variables or formal template +// parameters of structured types. + +module NegSem_050402_actual_parameters_167 { + + type component GeneralComp { + } + + function f_test(out template integer p_val) { + p_val := 0; + } + + function f_caller(out integer p_val) { + p_val := 4; // out parameter shall have a value before we can pass it to a function + f_test(p_val); // tested parameter passing + if (match(0, p_val)) { setverdict(pass); } + else { setverdict(fail); } + } + + + testcase TC_NegSem_050402_actual_parameters_167() runs on GeneralComp { + var integer v_val; + f_caller(v_val); // this parameter passing is not a subject of the test + } + + control { + execute(TC_NegSem_050402_actual_parameters_167()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_168.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_168.ttcn new file mode 100644 index 00000000..40e8f56f --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_168.ttcn @@ -0,0 +1,37 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that value inout parameters cannot be used as out formal template parameters of functions + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to out formal template parameters shall be template variables, +// formal template parameters or references to elements of template variables or formal template +// parameters of structured types. + +module NegSem_050402_actual_parameters_168 { + + type component GeneralComp { + } + + function f_test(out template integer p_val) { + p_val := 0; + } + + function f_caller(inout integer p_val) { + f_test(p_val); // tested parameter passing + if (match(0, p_val)) { setverdict(pass); } + else { setverdict(fail); } + } + + + testcase TC_NegSem_050402_actual_parameters_168() runs on GeneralComp { + var integer v_val := 5; + f_caller(v_val); // this parameter passing is not a subject of the test + } + + control { + execute(TC_NegSem_050402_actual_parameters_168()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_169.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_169.ttcn new file mode 100644 index 00000000..472e386e --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_169.ttcn @@ -0,0 +1,36 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that value variable element reference cannot be used as out formal template parameters of functions + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to out formal template parameters shall be template variables, +// formal template parameters or references to elements of template variables or formal template +// parameters of structured types. + +module NegSem_050402_actual_parameters_169 { + + type component GeneralComp { + } + + type record R { + integer field1 + } + + function f_test(out template integer p_val) { + p_val := ?; + } + + testcase TC_NegSem_050402_actual_parameters_169() runs on GeneralComp { + var R v_val := { field1 := 10 }; + f_test(v_val.field1); // tested parameter passing + if (match( { field1 := 0 }, v_val)) { setverdict(pass); } + else { setverdict(fail); } + } + + control { + execute(TC_NegSem_050402_actual_parameters_169()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_170.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_170.ttcn new file mode 100644 index 00000000..69270ded --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_170.ttcn @@ -0,0 +1,39 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that reference to elements of formal value parameters cannot be used as out formal template parameters of functions + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to out formal template parameters shall be template variables, +// formal template parameters or references to elements of template variables or formal template +// parameters of structured types. + +module NegSem_050402_actual_parameters_170 { + + type component GeneralComp { + } + + type record R { + integer field1 + } + + function f_test(out template integer p_val) { + p_val := ?; + } + + function f_caller(in R p_param) { + f_test(p_param.field1); // tested parameter passing + if (match( { field1 := 0 }, p_param)) { setverdict(pass); } + else { setverdict(fail); } + } + + testcase TC_NegSem_050402_actual_parameters_170() runs on GeneralComp { + f_caller({field1 := 11 }); + } + + control { + execute(TC_NegSem_050402_actual_parameters_170()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_171.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_171.ttcn new file mode 100644 index 00000000..791ff105 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_171.ttcn @@ -0,0 +1,36 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that value variables cannot be used as out formal template parameters of altsteps + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to out formal template parameters shall be template variables, +// formal template parameters or references to elements of template variables or formal template +// parameters of structured types. + +module NegSem_050402_actual_parameters_171 { + + type component GeneralComp { + timer t := 0.0; + } + + altstep a_test(out template integer p_val) runs on GeneralComp { + []t.timeout { + p_val := 0; + } + } + + testcase TC_NegSem_050402_actual_parameters_171() runs on GeneralComp { + var integer vm_msg := 2; + t.start; + a_test(vm_msg); // tested parameter passing + if (match(0, vm_msg)) { setverdict(pass); } + else { setverdict(fail); } + } + + control { + execute(TC_NegSem_050402_actual_parameters_171()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_172.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_172.ttcn new file mode 100644 index 00000000..4cc26a41 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_172.ttcn @@ -0,0 +1,40 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that value in parameters cannot be used as out formal template parameters of altsteps + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to out formal template parameters shall be template variables, +// formal template parameters or references to elements of template variables or formal template +// parameters of structured types. + +module NegSem_050402_actual_parameters_172 { + + type component GeneralComp { + timer t := 0.0; + } + + altstep a_test(out template integer p_val) runs on GeneralComp { + []t.timeout { + p_val := 0; + } + } + + function f_caller(in integer p_val) runs on GeneralComp { + a_test(p_val); // tested parameter passing + if (match(0, p_val)) { setverdict(pass); } + else { setverdict(fail); } + } + + + testcase TC_NegSem_050402_actual_parameters_172() runs on GeneralComp { + t.start; + f_caller(3); // this parameter passing is not a subject of the test + } + + control { + execute(TC_NegSem_050402_actual_parameters_172()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_173.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_173.ttcn new file mode 100644 index 00000000..ab52fc01 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_173.ttcn @@ -0,0 +1,42 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that value out parameters cannot be used as out formal template parameters of altsteps + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to out formal template parameters shall be template variables, +// formal template parameters or references to elements of template variables or formal template +// parameters of structured types. + +module NegSem_050402_actual_parameters_173 { + + type component GeneralComp { + timer t := 0.0; + } + + altstep a_test(out template integer p_val) runs on GeneralComp { + []t.timeout { + p_val := 0; + } + } + + function f_caller(out integer p_val) runs on GeneralComp { + p_val := 4; // out parameter shall have a value before we can pass it to a function + a_test(p_val); // tested parameter passing + if (match(0 , p_val)) { setverdict(pass); } + else { setverdict(fail); } + } + + + testcase TC_NegSem_050402_actual_parameters_173() runs on GeneralComp { + var integer v_val; + t.start; + f_caller(v_val); // this parameter passing is not a subject of the test + } + + control { + execute(TC_NegSem_050402_actual_parameters_173()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_174.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_174.ttcn new file mode 100644 index 00000000..10244d1c --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_174.ttcn @@ -0,0 +1,41 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that value inout parameters cannot be used as out formal template parameters of altsteps + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to out formal template parameters shall be template variables, +// formal template parameters or references to elements of template variables or formal template +// parameters of structured types. + +module NegSem_050402_actual_parameters_174 { + + type component GeneralComp { + timer t := 0.0; + } + + altstep a_test(out template integer p_val) runs on GeneralComp { + []t.timeout { + p_val := 0; + } + } + + function f_caller(inout integer p_val) runs on GeneralComp { + a_test(p_val); // tested parameter passing + if (match(0, p_val)) { setverdict(pass); } + else { setverdict(fail); } + } + + + testcase TC_NegSem_050402_actual_parameters_174() runs on GeneralComp { + var integer v_val := 5; + t.start; + f_caller(v_val); // this parameter passing is not a subject of the test + } + + control { + execute(TC_NegSem_050402_actual_parameters_174()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_175.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_175.ttcn new file mode 100644 index 00000000..51fb44d7 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_175.ttcn @@ -0,0 +1,40 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that value variable element reference cannot be used as out formal template parameters of altsteps + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to out formal template parameters shall be template variables, +// formal template parameters or references to elements of template variables or formal template +// parameters of structured types. + +module NegSem_050402_actual_parameters_175 { + + type component GeneralComp { + timer t := 0.0; + } + + type record R { + integer field1 + } + + altstep a_test(out template integer p_val) runs on GeneralComp { + []t.timeout { + p_val := 5; + } + } + + testcase TC_NegSem_050402_actual_parameters_175() runs on GeneralComp { + var R v_val := { field1 := 10 }; + t.start; + a_test(v_val.field1); // tested parameter passing + if (match({ field1 := 5 }, v_val)) { setverdict(pass); } + else { setverdict(fail); } + } + + control { + execute(TC_NegSem_050402_actual_parameters_175()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_176.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_176.ttcn new file mode 100644 index 00000000..35889b5d --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_176.ttcn @@ -0,0 +1,43 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that reference to elements of formal value parameters cannot be used as out formal template parameters of altsteps + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to out formal template parameters shall be template variables, +// formal template parameters or references to elements of template variables or formal template +// parameters of structured types. + +module NegSem_050402_actual_parameters_176 { + + type component GeneralComp { + timer t := 0.0; + } + + type record R { + integer field1 + } + + altstep a_test(out template integer p_val) runs on GeneralComp { + []t.timeout { + p_val := 5; + } + } + + function f_caller(in R p_param) runs on GeneralComp { + a_test(p_param.field1); // tested parameter passing + if (match({ field1 := 5 }, p_param)) { setverdict(pass); } + else { setverdict(fail); } + } + + testcase TC_NegSem_050402_actual_parameters_176() runs on GeneralComp { + t.start; + f_caller({field1 := 11 }); + } + + control { + execute(TC_NegSem_050402_actual_parameters_176()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_177.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_177.ttcn new file mode 100644 index 00000000..2da4d1ce --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_177.ttcn @@ -0,0 +1,27 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that value variables cannot be used as out formal template parameters of test cases + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to out formal template parameters shall be template variables, +// formal template parameters or references to elements of template variables or formal template +// parameters of structured types. + +module NegSem_050402_actual_parameters_177 { + + type component GeneralComp { + } + + testcase TC_NegSem_050402_actual_parameters_177(out template integer p_val) runs on GeneralComp { + p_val := ?; + setverdict(pass); + } + + control { + var integer vm_msg := 2; + execute(TC_NegSem_050402_actual_parameters_177(vm_msg)); // tested parameter passing + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_178.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_178.ttcn new file mode 100644 index 00000000..e68b33d5 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_178.ttcn @@ -0,0 +1,30 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that value in parameters cannot be used as out formal template parameters of test cases + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to out formal template parameters shall be template variables, +// formal template parameters or references to elements of template variables or formal template +// parameters of structured types. + +module NegSem_050402_actual_parameters_178 { + + type component GeneralComp { + } + + testcase TC_NegSem_050402_actual_parameters_178(out template integer p_val) runs on GeneralComp { + p_val := ?; + setverdict(pass); + } + + function f_caller(in integer p_val) { + execute(TC_NegSem_050402_actual_parameters_178(p_val)); // tested parameter passing + } + + control { + f_caller(3); // this parameter passing is not a subject of the test + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_179.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_179.ttcn new file mode 100644 index 00000000..18031c01 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_179.ttcn @@ -0,0 +1,31 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that value out parameters cannot be used as out formal template parameters of test cases + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to out formal template parameters shall be template variables, +// formal template parameters or references to elements of template variables or formal template +// parameters of structured types. + +module NegSem_050402_actual_parameters_179 { + + type component GeneralComp { + } + + testcase TC_NegSem_050402_actual_parameters_179(out template integer p_val) runs on GeneralComp { + p_val := ?; + setverdict(pass); + } + + function f_caller(out integer p_val) { + execute(TC_NegSem_050402_actual_parameters_179(p_val)); // tested parameter passing + } + + control { + var integer vm_val; + f_caller(vm_val); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_180.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_180.ttcn new file mode 100644 index 00000000..29fa2fb9 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_180.ttcn @@ -0,0 +1,31 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that value inout parameters cannot be used as out formal template parameters of test cases + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to out formal template parameters shall be template variables, +// formal template parameters or references to elements of template variables or formal template +// parameters of structured types. + +module NegSem_050402_actual_parameters_180 { + + type component GeneralComp { + } + + testcase TC_NegSem_050402_actual_parameters_180(out template integer p_val) runs on GeneralComp { + p_val := ?; + setverdict(pass); + } + + function f_caller(inout integer p_val) { + execute(TC_NegSem_050402_actual_parameters_180(p_val)); // tested parameter passing + } + + control { + var integer vm_val := 5; + f_caller(vm_val); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_181.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_181.ttcn new file mode 100644 index 00000000..f66eed8f --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_181.ttcn @@ -0,0 +1,31 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that variable element reference cannot be used as out formal template parameters of test cases + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to out formal template parameters shall be template variables, +// formal template parameters or references to elements of template variables or formal template +// parameters of structured types. + +module NegSem_050402_actual_parameters_181 { + + type component GeneralComp { + } + + type record R { + integer field1 + } + + testcase TC_NegSem_050402_actual_parameters_181(out template integer p_val) runs on GeneralComp { + p_val := ?; + setverdict(pass); + } + + control { + var R v_val := { field1 := 10 }; + execute(TC_NegSem_050402_actual_parameters_181(v_val.field1)); // tested parameter passing + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_182.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_182.ttcn new file mode 100644 index 00000000..b6e7465a --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_182.ttcn @@ -0,0 +1,35 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that reference to elements of formal value parameters cannot be used as out formal template parameters of test cases + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to out formal template parameters shall be template variables, +// formal template parameters or references to elements of template variables or formal template +// parameters of structured types. + +module NegSem_050402_actual_parameters_182 { + + type component GeneralComp { + } + + type record R { + integer field1 + } + + testcase TC_NegSem_050402_actual_parameters_182(out template integer p_val) runs on GeneralComp { + p_val := ?; + setverdict(pass); + } + + function f_caller(in R p_param) { + execute(TC_NegSem_050402_actual_parameters_182(p_param.field1)); // tested parameter passing + } + + control { + var R mw_t := { field1 := 1 }; + f_caller(mw_t); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_183.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_183.ttcn new file mode 100644 index 00000000..1482178f --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_183.ttcn @@ -0,0 +1,37 @@ +/*************************************************** + ** @author STF 548 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that parameter reuse is not allowed in the mixed notation + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Restriction o +// If the mixed notation is used, ... the parameters given in assignment notation shall not assign parameters +// that already have an actual parameter given in list notation. + +module NegSem_050402_actual_parameters_183 { + + type component GeneralComp { + } + + function f_mixed (out integer p_par1, in integer p_par2 := 2, inout integer p_par3) { + p_par1 := 1 + p_par2; + if (p_par2 == 2 and p_par3 == 0) { + setverdict(pass); + } else { + setverdict(fail); + } + } + + testcase TC_NegSem_050402_actual_parameters_183() runs on GeneralComp { + var integer v := 0; + f_mixed(-, 5, p_par3 := v, p_par2 := 2); + + setverdict(pass); + } + + control { + execute(TC_NegSem_050402_actual_parameters_183()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSyn_050402_actual_parameters_001.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSyn_050402_actual_parameters_001.ttcn new file mode 100644 index 00000000..64cefafb --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSyn_050402_actual_parameters_001.ttcn @@ -0,0 +1,36 @@ +/*************************************************** + ** @author STF 548 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that in mixed notation, no value list notation can be used following the first assignment notation + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Restriction o +// If the mixed notation is used, no value list notation shall be used following the first assignment notation + +module NegSyn_050402_actual_parameters_001 { + + type component GeneralComp { + } + + function f_mixed (out integer p_par1, in integer p_par2 := 2, inout integer p_par3) { + p_par1 := 1 + p_par2; + if (p_par2 == 2 and p_par3 == 0) { + setverdict(pass); + } else { + setverdict(fail); + } + } + + testcase TC_NegSyn_050402_actual_parameters_001() runs on GeneralComp { + var integer v := 0; + f_mixed(-,p_par2 := 2, v); + + setverdict(pass); + } + + control { + execute(TC_NegSyn_050402_actual_parameters_001()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_001.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_001.ttcn new file mode 100644 index 00000000..f89eee94 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_001.ttcn @@ -0,0 +1,85 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:5.4.2, Ensure that the IUT accepts allowed assignments of actual parameters. + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Sem_050402_actual_parameters_001 { + +type enumerated MyEnumeratedType {e_black, e_white} +type integer address; + +type record MyRecord { + integer field1, + boolean field2, + address field3, + MyEnumeratedType field4, + integer field5 +} + + +type component GeneralComp { + +} + +testcase TC_Sem_050402_actual_parameters_001 ( + MyRecord ExpectedMatch, + integer p_integer := 0, + boolean p_boolean := true, + address p_address := null, + MyEnumeratedType p_enumerated := e_black, + template integer p_integerTemplate := ? + ) runs on GeneralComp { + + var template MyRecord ReceivedRecord := {p_integer, p_boolean, p_address, p_enumerated, p_integerTemplate}; + + if ( match(ExpectedMatch, ReceivedRecord)) { + setverdict(pass); + } + else { + setverdict(fail); + } + +} + + +control{ + + var MyRecord DefaultValues := { + field1 := 0, + field2 := true, + field3 := null, + field4 := e_black, + field5 := 1 //any number can be used here to correspond with ? matching + } + + var MyRecord ModifiedValues := { + field1 := 1, + field2 := false, + field3 := 1, + field4 := e_white, + field5 := 1 + } + + var MyRecord PartlyModifiedValues := { + field1 := 0, + field2 := false, + field3 := null, + field4 := e_white, + field5 := 1 + } + +//possible ways of invoking assignment of actual parameters + execute(TC_Sem_050402_actual_parameters_001(DefaultValues)); + execute(TC_Sem_050402_actual_parameters_001(DefaultValues,-,-,-,-,-)); + execute(TC_Sem_050402_actual_parameters_001(ExpectedMatch:=DefaultValues)); + + execute(TC_Sem_050402_actual_parameters_001(ModifiedValues,1,false,1,e_white,1)); + execute(TC_Sem_050402_actual_parameters_001(p_integerTemplate:=1,p_boolean:=false,p_enumerated:=e_white,p_integer:=1,p_address:=1,ExpectedMatch:=ModifiedValues)); + + execute(TC_Sem_050402_actual_parameters_001(PartlyModifiedValues,-,false,-,e_white,-)); + execute(TC_Sem_050402_actual_parameters_001(p_boolean:=false,p_enumerated:=e_white,ExpectedMatch:=PartlyModifiedValues)); + +} + +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_002.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_002.ttcn new file mode 100644 index 00000000..a1745d70 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_002.ttcn @@ -0,0 +1,85 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:5.4.2, Ensure that the IUT accepts nested assignment of actual parameters. + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +module Sem_050402_actual_parameters_002 { + +type enumerated MyEnumeratedType {e_black, e_white} +type integer address; + +type record MyRecord { + integer field1, + boolean field2, + address field3, + MyEnumeratedType field4, + integer field5 +} + +template MyRecord m_parametrizedTemplate1 + ( + integer p_integer := 0, + boolean p_boolean := true, + address p_address := null, + MyEnumeratedType p_enumerated := e_black, + template integer p_integerTemplate := ? + ) := { + field1 := p_integer, + field2 := p_boolean, + field3 := p_address, + field4 := p_enumerated, + field5 := p_integerTemplate +} + + +template MyRecord m_parametrizedTemplate2 + ( + integer p_integer := 0, + boolean p_boolean := true, + address p_address := null, + MyEnumeratedType p_enumerated := e_black, + template integer p_integerTemplate := ? + ) := { + field1 := p_integer+1, //this line is different from the previous template + field2 := not p_boolean, //this line is different from the previous template + field3 := p_address, + field4 := p_enumerated, + field5 := p_integerTemplate +} + + + +type component GeneralComp { + +} + + +testcase TC_Sem_050402_actual_parameters_002(template MyRecord p_templateSelection) runs on GeneralComp { + + + var MyRecord ExpectedValues := { + field1 := 1, + field2 := false, + field3 := 1, + field4 := e_white, + field5 := 1 + } + + if (match(ExpectedValues, p_templateSelection)) { + setverdict(pass); + } + else { + setverdict(fail); + } + +} + + +control{ + execute(TC_Sem_050402_actual_parameters_002(m_parametrizedTemplate1(1,false,1,e_white,1)) ); + execute(TC_Sem_050402_actual_parameters_002(m_parametrizedTemplate2(0,true,1,e_white,1)) ); +} + +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_003.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_003.ttcn new file mode 100644 index 00000000..62f0dff0 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_003.ttcn @@ -0,0 +1,31 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that literals can be used as in formal value parameters of functions + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed by value to in formal value parameters shall be +// variables, literal values, module parameters, constants, variables, value returning +// (external) functions, formal value parameters (of in, inout or out parameterization) +// of the current scope or expressions composed of the above. + +module Sem_050402_actual_parameters_003 { + + type component GeneralComp { + } + + function f_test(in integer p_val) { + if (p_val == 1) { setverdict(pass); } + else { setverdict(fail); } + } + + testcase TC_Sem_050402_actual_parameters_003() runs on GeneralComp { + f_test(1); // tested parameter passing + } + + control { + execute(TC_Sem_050402_actual_parameters_003()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_004.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_004.ttcn new file mode 100644 index 00000000..26823f55 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_004.ttcn @@ -0,0 +1,33 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that module parameters can be used as in formal value parameters of functions + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed by value to in formal value parameters shall be +// variables, literal values, module parameters, constants, variables, value returning +// (external) functions, formal value parameters (of in, inout or out parameterization) +// of the current scope or expressions composed of the above. + +module Sem_050402_actual_parameters_004 { + + type component GeneralComp { + } + + modulepar integer PX_VAL := 2; + + function f_test(in integer p_val) { + if (p_val == 2) { setverdict(pass); } + else { setverdict(fail); } + } + + testcase TC_Sem_050402_actual_parameters_004() runs on GeneralComp { + f_test(PX_VAL); // tested parameter passing + } + + control { + execute(TC_Sem_050402_actual_parameters_004()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_005.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_005.ttcn new file mode 100644 index 00000000..44a59d71 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_005.ttcn @@ -0,0 +1,33 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that constants can be used as in formal value parameters of functions + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed by value to in formal value parameters shall be +// variables, literal values, module parameters, constants, variables, value returning +// (external) functions, formal value parameters (of in, inout or out parameterization) +// of the current scope or expressions composed of the above. + +module Sem_050402_actual_parameters_005 { + + type component GeneralComp { + } + + const integer c_val := 3; + + function f_test(in integer p_val) { + if (p_val == 3) { setverdict(pass); } + else { setverdict(fail); } + } + + testcase TC_Sem_050402_actual_parameters_005() runs on GeneralComp { + f_test(c_val); // tested parameter passing + } + + control { + execute(TC_Sem_050402_actual_parameters_005()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_006.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_006.ttcn new file mode 100644 index 00000000..ddbdbc62 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_006.ttcn @@ -0,0 +1,32 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that variables can be used as in formal value parameters of functions + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed by value to in formal value parameters shall be +// variables, literal values, module parameters, constants, variables, value returning +// (external) functions, formal value parameters (of in, inout or out parameterization) +// of the current scope or expressions composed of the above. + +module Sem_050402_actual_parameters_006 { + + type component GeneralComp { + } + + function f_test(in integer p_val) { + if (p_val == 4) { setverdict(pass); } + else { setverdict(fail); } + } + + testcase TC_Sem_050402_actual_parameters_006() runs on GeneralComp { + var integer v_val := 4; + f_test(v_val); // tested parameter passing + } + + control { + execute(TC_Sem_050402_actual_parameters_006()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_007.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_007.ttcn new file mode 100644 index 00000000..760ec813 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_007.ttcn @@ -0,0 +1,35 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that function calls can be used as in formal value parameters of functions + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed by value to in formal value parameters shall be +// variables, literal values, module parameters, constants, variables, value returning +// (external) functions, formal value parameters (of in, inout or out parameterization) +// of the current scope or expressions composed of the above. + +module Sem_050402_actual_parameters_007 { + + type component GeneralComp { + } + + function f_ret() return integer { + return 5; + } + + function f_test(in integer p_val) { + if (p_val == 5) { setverdict(pass); } + else { setverdict(fail); } + } + + testcase TC_Sem_050402_actual_parameters_007() runs on GeneralComp { + f_test(f_ret()); // tested parameter passing + } + + control { + execute(TC_Sem_050402_actual_parameters_007()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_008.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_008.ttcn new file mode 100644 index 00000000..ee0e8341 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_008.ttcn @@ -0,0 +1,36 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that in value parameters can be used as in formal value parameters of functions + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed by value to in formal value parameters shall be +// variables, literal values, module parameters, constants, variables, value returning +// (external) functions, formal value parameters (of in, inout or out parameterization) +// of the current scope or expressions composed of the above. + +module Sem_050402_actual_parameters_008 { + + type component GeneralComp { + } + + function f_test(in integer p_val) { + if (p_val == 6) { setverdict(pass); } + else { setverdict(fail); } + } + + function f_caller(in integer p_val) { + f_test(p_val); // tested parameter passing + } + + + testcase TC_Sem_050402_actual_parameters_008() runs on GeneralComp { + f_caller(6); // this parameter passing is not a subject of the test + } + + control { + execute(TC_Sem_050402_actual_parameters_008()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_009.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_009.ttcn new file mode 100644 index 00000000..fd7e3b20 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_009.ttcn @@ -0,0 +1,38 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that out value parameters can be used as in formal value parameters of functions + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed by value to in formal value parameters shall be +// variables, literal values, module parameters, constants, variables, value returning +// (external) functions, formal value parameters (of in, inout or out parameterization) +// of the current scope or expressions composed of the above. + +module Sem_050402_actual_parameters_009 { + + type component GeneralComp { + } + + function f_test(in integer p_val) { + if (p_val == 7) { setverdict(pass); } + else { setverdict(fail); } + } + + function f_caller(out integer p_val) { + p_val := 7; // out parameter shall have a value before we can pass it to a function + f_test(p_val); // tested parameter passing + } + + + testcase TC_Sem_050402_actual_parameters_009() runs on GeneralComp { + var integer v_val; + f_caller(v_val); // this parameter passing is not a subject of the test + } + + control { + execute(TC_Sem_050402_actual_parameters_009()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_010.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_010.ttcn new file mode 100644 index 00000000..4f998c62 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_010.ttcn @@ -0,0 +1,36 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that inout value parameters can be used as in formal value parameters of functions + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed by value to in formal value parameters shall be +// variables, literal values, module parameters, constants, variables, value returning +// (external) functions, formal value parameters (of in, inout or out parameterization) +// of the current scope or expressions composed of the above. + +module Sem_050402_actual_parameters_010 { + + type component GeneralComp { + } + + function f_test(in integer p_val) { + if (p_val == 8) { setverdict(pass); } + else { setverdict(fail); } + } + + function f_caller(inout integer p_val) { + f_test(p_val); // tested parameter passing + } + + testcase TC_Sem_050402_actual_parameters_010() runs on GeneralComp { + var integer v_val := 8; + f_caller(v_val); // this parameter passing is not a subject of the test + } + + control { + execute(TC_Sem_050402_actual_parameters_010()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_011.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_011.ttcn new file mode 100644 index 00000000..fc71ca7b --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_011.ttcn @@ -0,0 +1,36 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that expressions can be used as in formal value parameters of functions + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed by value to in formal value parameters shall be +// variables, literal values, module parameters, constants, variables, value returning +// (external) functions, formal value parameters (of in, inout or out parameterization) +// of the current scope or expressions composed of the above. + +module Sem_050402_actual_parameters_011 { + + type component GeneralComp { + } + + function f_ret() return integer { + return 4; + } + + function f_test(in integer p_val) { + if (p_val == 9) { setverdict(pass); } + else { setverdict(fail); } + } + + testcase TC_Sem_050402_actual_parameters_011() runs on GeneralComp { + var integer v_val := 5; + f_test(10 + f_ret() - v_val); // tested parameter passing + } + + control { + execute(TC_Sem_050402_actual_parameters_011()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_012.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_012.ttcn new file mode 100644 index 00000000..48e2477f --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_012.ttcn @@ -0,0 +1,32 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that literals can be used as in formal value parameters of templates + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed by value to in formal value parameters shall be +// variables, literal values, module parameters, constants, variables, value returning +// (external) functions, formal value parameters (of in, inout or out parameterization) +// of the current scope or expressions composed of the above. + +module Sem_050402_actual_parameters_012 { + + type component GeneralComp { + } + + template integer m_test(in integer p_val) := 11 + p_val; + + testcase TC_Sem_050402_actual_parameters_012() runs on GeneralComp { + if (match(12, m_test(1))) { // tested parameter passing + setverdict(pass); + } else { + setverdict(fail); + } + } + + control { + execute(TC_Sem_050402_actual_parameters_012()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_013.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_013.ttcn new file mode 100644 index 00000000..5f552224 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_013.ttcn @@ -0,0 +1,34 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that module parameters can be used as in formal value parameters of templates + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed by value to in formal value parameters shall be +// variables, literal values, module parameters, constants, variables, value returning +// (external) functions, formal value parameters (of in, inout or out parameterization) +// of the current scope or expressions composed of the above. + +module Sem_050402_actual_parameters_013 { + + type component GeneralComp { + } + + modulepar integer PX_VAL := 2; + + template integer m_test(in integer p_val) := 11 + p_val; + + testcase TC_Sem_050402_actual_parameters_013() runs on GeneralComp { + if (match(13, m_test(PX_VAL))) { // tested parameter passing + setverdict(pass); + } else { + setverdict(fail); + } + } + + control { + execute(TC_Sem_050402_actual_parameters_013()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_014.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_014.ttcn new file mode 100644 index 00000000..945200e9 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_014.ttcn @@ -0,0 +1,34 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that constants can be used as in formal value parameters of templates + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed by value to in formal value parameters shall be +// variables, literal values, module parameters, constants, variables, value returning +// (external) functions, formal value parameters (of in, inout or out parameterization) +// of the current scope or expressions composed of the above. + +module Sem_050402_actual_parameters_014 { + + type component GeneralComp { + } + + const integer c_val := 3; + + template integer m_test(in integer p_val) := 11 + p_val; + + testcase TC_Sem_050402_actual_parameters_014() runs on GeneralComp { + if (match(14, m_test(c_val))) { // tested parameter passing + setverdict(pass); + } else { + setverdict(fail); + } + } + + control { + execute(TC_Sem_050402_actual_parameters_014()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_015.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_015.ttcn new file mode 100644 index 00000000..32e61457 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_015.ttcn @@ -0,0 +1,33 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that variables can be used as in formal value parameters of templates + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed by value to in formal value parameters shall be +// variables, literal values, module parameters, constants, variables, value returning +// (external) functions, formal value parameters (of in, inout or out parameterization) +// of the current scope or expressions composed of the above. + +module Sem_050402_actual_parameters_015 { + + type component GeneralComp { + } + + template integer m_test(in integer p_val) := 11 + p_val; + + testcase TC_Sem_050402_actual_parameters_015() runs on GeneralComp { + var integer v_val := 4; + if (match(15, m_test(v_val))) { // tested parameter passing + setverdict(pass); + } else { + setverdict(fail); + } + } + + control { + execute(TC_Sem_050402_actual_parameters_015()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_016.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_016.ttcn new file mode 100644 index 00000000..ebc41205 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_016.ttcn @@ -0,0 +1,36 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that function calls can be used as in formal value parameters of templates + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed by value to in formal value parameters shall be +// variables, literal values, module parameters, constants, variables, value returning +// (external) functions, formal value parameters (of in, inout or out parameterization) +// of the current scope or expressions composed of the above. + +module Sem_050402_actual_parameters_016 { + + type component GeneralComp { + } + + function f_ret() return integer { + return 5; + } + + template integer m_test(in integer p_val) := 11 + p_val; + + testcase TC_Sem_050402_actual_parameters_016() runs on GeneralComp { + if (match(16, m_test(f_ret()))) { // tested parameter passing + setverdict(pass); + } else { + setverdict(fail); + } + } + + control { + execute(TC_Sem_050402_actual_parameters_016()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_017.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_017.ttcn new file mode 100644 index 00000000..707db428 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_017.ttcn @@ -0,0 +1,37 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that in value parameters can be used as in formal value parameters of templates + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed by value to in formal value parameters shall be +// variables, literal values, module parameters, constants, variables, value returning +// (external) functions, formal value parameters (of in, inout or out parameterization) +// of the current scope or expressions composed of the above. + +module Sem_050402_actual_parameters_017 { + + type component GeneralComp { + } + + template integer m_test(in integer p_val) := 11 + p_val; + + function f_caller(in integer p_val) { + if (match(17, m_test(p_val))) { // tested parameter passing + setverdict(pass); + } else { + setverdict(fail); + } + } + + + testcase TC_Sem_050402_actual_parameters_017() runs on GeneralComp { + f_caller(6); // this parameter passing is not a subject of the test + } + + control { + execute(TC_Sem_050402_actual_parameters_017()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_018.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_018.ttcn new file mode 100644 index 00000000..e40b1128 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_018.ttcn @@ -0,0 +1,39 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that out value parameters can be used as in formal value parameters of templates + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed by value to in formal value parameters shall be +// variables, literal values, module parameters, constants, variables, value returning +// (external) functions, formal value parameters (of in, inout or out parameterization) +// of the current scope or expressions composed of the above. + +module Sem_050402_actual_parameters_018 { + + type component GeneralComp { + } + + template integer m_test(in integer p_val) := 11 + p_val; + + function f_caller(out integer p_val) { + p_val := 7; // out parameter shall have a value before we can pass it to a function + if (match(18, m_test(p_val))) { // tested parameter passing + setverdict(pass); + } else { + setverdict(fail); + } + } + + + testcase TC_Sem_050402_actual_parameters_018() runs on GeneralComp { + var integer v_val; + f_caller(v_val); // this parameter passing is not a subject of the test + } + + control { + execute(TC_Sem_050402_actual_parameters_018()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_019.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_019.ttcn new file mode 100644 index 00000000..357f6291 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_019.ttcn @@ -0,0 +1,37 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that inout value parameters can be used as in formal value parameters of templates + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed by value to in formal value parameters shall be +// variables, literal values, module parameters, constants, variables, value returning +// (external) functions, formal value parameters (of in, inout or out parameterization) +// of the current scope or expressions composed of the above. + +module Sem_050402_actual_parameters_019 { + + type component GeneralComp { + } + + template integer m_test(in integer p_val) := 11 + p_val; + + function f_caller(inout integer p_val) { + if (match(19, m_test(p_val))) { // tested parameter passing + setverdict(pass); + } else { + setverdict(fail); + } + } + + testcase TC_Sem_050402_actual_parameters_019() runs on GeneralComp { + var integer v_val := 8; + f_caller(v_val); // this parameter passing is not a subject of the test + } + + control { + execute(TC_Sem_050402_actual_parameters_019()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_020.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_020.ttcn new file mode 100644 index 00000000..b85f848d --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_020.ttcn @@ -0,0 +1,37 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that expressions can be used as in formal value parameters of templates + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed by value to in formal value parameters shall be +// variables, literal values, module parameters, constants, variables, value returning +// (external) functions, formal value parameters (of in, inout or out parameterization) +// of the current scope or expressions composed of the above. + +module Sem_050402_actual_parameters_020 { + + type component GeneralComp { + } + + function f_ret() return integer { + return 4; + } + + template integer m_test(in integer p_val) := 11 + p_val; + + testcase TC_Sem_050402_actual_parameters_020() runs on GeneralComp { + var integer v_val := 5; + if (match(20, m_test(10 + f_ret() - v_val))) { // tested parameter passing + setverdict(pass); + } else { + setverdict(fail); + } + } + + control { + execute(TC_Sem_050402_actual_parameters_020()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_021.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_021.ttcn new file mode 100644 index 00000000..bd949c53 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_021.ttcn @@ -0,0 +1,35 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that literals can be used as in formal value parameters of altsteps + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed by value to in formal value parameters shall be +// variables, literal values, module parameters, constants, variables, value returning +// (external) functions, formal value parameters (of in, inout or out parameterization) +// of the current scope or expressions composed of the above. + +module Sem_050402_actual_parameters_021 { + + type component GeneralComp { + timer t := 0.0; + } + + altstep a_test(integer p_val) runs on GeneralComp { + []t.timeout { + if (p_val == 1) { setverdict(pass); } + else { setverdict(fail); } + } + } + + testcase TC_Sem_050402_actual_parameters_021() runs on GeneralComp { + t.start; + a_test(1); // tested parameter passing + } + + control { + execute(TC_Sem_050402_actual_parameters_021()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_022.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_022.ttcn new file mode 100644 index 00000000..9baff4ce --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_022.ttcn @@ -0,0 +1,37 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that module parameters can be used as in formal value parameters of altsteps + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed by value to in formal value parameters shall be +// variables, literal values, module parameters, constants, variables, value returning +// (external) functions, formal value parameters (of in, inout or out parameterization) +// of the current scope or expressions composed of the above. + +module Sem_050402_actual_parameters_022 { + + type component GeneralComp { + timer t := 0.0; + } + + modulepar integer PX_VAL := 2; + + altstep a_test(integer p_val) runs on GeneralComp { + []t.timeout { + if (p_val == 2) { setverdict(pass); } + else { setverdict(fail); } + } + } + + testcase TC_Sem_050402_actual_parameters_022() runs on GeneralComp { + t.start; + a_test(PX_VAL); // tested parameter passing + } + + control { + execute(TC_Sem_050402_actual_parameters_022()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_023.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_023.ttcn new file mode 100644 index 00000000..587f1381 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_023.ttcn @@ -0,0 +1,37 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that constants can be used as in formal value parameters of altsteps + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed by value to in formal value parameters shall be +// variables, literal values, module parameters, constants, variables, value returning +// (external) functions, formal value parameters (of in, inout or out parameterization) +// of the current scope or expressions composed of the above. + +module Sem_050402_actual_parameters_023 { + + type component GeneralComp { + timer t := 0.0; + } + + const integer c_val := 3; + + altstep a_test(integer p_val) runs on GeneralComp { + []t.timeout { + if (p_val == 3) { setverdict(pass); } + else { setverdict(fail); } + } + } + + testcase TC_Sem_050402_actual_parameters_023() runs on GeneralComp { + t.start; + a_test(c_val); // tested parameter passing + } + + control { + execute(TC_Sem_050402_actual_parameters_023()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_024.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_024.ttcn new file mode 100644 index 00000000..328af75c --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_024.ttcn @@ -0,0 +1,36 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that variables can be used as in formal value parameters of altsteps + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed by value to in formal value parameters shall be +// variables, literal values, module parameters, constants, variables, value returning +// (external) functions, formal value parameters (of in, inout or out parameterization) +// of the current scope or expressions composed of the above. + +module Sem_050402_actual_parameters_024 { + + type component GeneralComp { + timer t := 0.0; + } + + altstep a_test(integer p_val) runs on GeneralComp { + []t.timeout { + if (p_val == 4) { setverdict(pass); } + else { setverdict(fail); } + } + } + + testcase TC_Sem_050402_actual_parameters_024() runs on GeneralComp { + var integer v_val := 4; + t.start; + a_test(v_val); // tested parameter passing + } + + control { + execute(TC_Sem_050402_actual_parameters_024()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_025.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_025.ttcn new file mode 100644 index 00000000..9d093492 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_025.ttcn @@ -0,0 +1,39 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that function calls can be used as in formal value parameters of altsteps + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed by value to in formal value parameters shall be +// variables, literal values, module parameters, constants, variables, value returning +// (external) functions, formal value parameters (of in, inout or out parameterization) +// of the current scope or expressions composed of the above. + +module Sem_050402_actual_parameters_025 { + + type component GeneralComp { + timer t := 0.0; + } + + function f_ret() return integer { + return 5; + } + + altstep a_test(integer p_val) runs on GeneralComp { + []t.timeout { + if (p_val == 5) { setverdict(pass); } + else { setverdict(fail); } + } + } + + testcase TC_Sem_050402_actual_parameters_025() runs on GeneralComp { + t.start; + a_test(f_ret()); // tested parameter passing + } + + control { + execute(TC_Sem_050402_actual_parameters_025()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_026.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_026.ttcn new file mode 100644 index 00000000..7813ad88 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_026.ttcn @@ -0,0 +1,40 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that in value parameters can be used as in formal value parameters of altsteps + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed by value to in formal value parameters shall be +// variables, literal values, module parameters, constants, variables, value returning +// (external) functions, formal value parameters (of in, inout or out parameterization) +// of the current scope or expressions composed of the above. + +module Sem_050402_actual_parameters_026 { + + type component GeneralComp { + timer t := 0.0; + } + + altstep a_test(integer p_val) runs on GeneralComp { + []t.timeout { + if (p_val == 6) { setverdict(pass); } + else { setverdict(fail); } + } + } + + function f_caller(in integer p_val) runs on GeneralComp{ + t.start; + a_test(p_val); // tested parameter passing + } + + + testcase TC_Sem_050402_actual_parameters_026() runs on GeneralComp { + f_caller(6); // this parameter passing is not a subject of the test + } + + control { + execute(TC_Sem_050402_actual_parameters_026()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_027.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_027.ttcn new file mode 100644 index 00000000..0d46c82f --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_027.ttcn @@ -0,0 +1,42 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that out value parameters can be used as in formal value parameters of altsteps + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed by value to in formal value parameters shall be +// variables, literal values, module parameters, constants, variables, value returning +// (external) functions, formal value parameters (of in, inout or out parameterization) +// of the current scope or expressions composed of the above. + +module Sem_050402_actual_parameters_027 { + + type component GeneralComp { + timer t := 0.0; + } + + altstep a_test(integer p_val) runs on GeneralComp { + []t.timeout { + if (p_val == 7) { setverdict(pass); } + else { setverdict(fail); } + } + } + + function f_caller(out integer p_val) runs on GeneralComp { + t.start; + p_val := 7; // out parameter shall have a value before we can pass it to a function + a_test(p_val); // tested parameter passing + } + + + testcase TC_Sem_050402_actual_parameters_027() runs on GeneralComp { + var integer v_val; + f_caller(v_val); // this parameter passing is not a subject of the test + } + + control { + execute(TC_Sem_050402_actual_parameters_027()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_028.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_028.ttcn new file mode 100644 index 00000000..07090e3e --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_028.ttcn @@ -0,0 +1,40 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that inout value parameters can be used as in formal value parameters of altsteps + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed by value to in formal value parameters shall be +// variables, literal values, module parameters, constants, variables, value returning +// (external) functions, formal value parameters (of in, inout or out parameterization) +// of the current scope or expressions composed of the above. + +module Sem_050402_actual_parameters_028 { + + type component GeneralComp { + timer t := 0.0; + } + + altstep a_test(integer p_val) runs on GeneralComp { + []t.timeout { + if (p_val == 8) { setverdict(pass); } + else { setverdict(fail); } + } + } + + function f_caller(inout integer p_val) runs on GeneralComp { + t.start; + a_test(p_val); // tested parameter passing + } + + testcase TC_Sem_050402_actual_parameters_028() runs on GeneralComp { + var integer v_val := 8; + f_caller(v_val); // this parameter passing is not a subject of the test + } + + control { + execute(TC_Sem_050402_actual_parameters_028()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_029.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_029.ttcn new file mode 100644 index 00000000..651b9dcf --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_029.ttcn @@ -0,0 +1,40 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that expressions can be used as in formal value parameters of altsteps + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed by value to in formal value parameters shall be +// variables, literal values, module parameters, constants, variables, value returning +// (external) functions, formal value parameters (of in, inout or out parameterization) +// of the current scope or expressions composed of the above. + +module Sem_050402_actual_parameters_029 { + + type component GeneralComp { + timer t := 0.0; + } + + function f_ret() return integer { + return 4; + } + + altstep a_test(integer p_val) runs on GeneralComp { + []t.timeout { + if (p_val == 9) { setverdict(pass); } + else { setverdict(fail); } + } + } + + testcase TC_Sem_050402_actual_parameters_029() runs on GeneralComp { + var integer v_val := 5; + t.start; + a_test(10 + f_ret() - v_val); // tested parameter passing + } + + control { + execute(TC_Sem_050402_actual_parameters_029()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_030.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_030.ttcn new file mode 100644 index 00000000..eccceb2a --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_030.ttcn @@ -0,0 +1,27 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that literals can be used as in formal value parameters of test cases + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed by value to in formal value parameters shall be +// variables, literal values, module parameters, constants, variables, value returning +// (external) functions, formal value parameters (of in, inout or out parameterization) +// of the current scope or expressions composed of the above. + +module Sem_050402_actual_parameters_030 { + + type component GeneralComp { + } + + testcase TC_Sem_050402_actual_parameters_030(in integer p_val) runs on GeneralComp { + if (p_val == 1) { setverdict(pass); } + else { setverdict(fail); } + } + + control { + execute(TC_Sem_050402_actual_parameters_030(1)); // tested parameter passing + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_031.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_031.ttcn new file mode 100644 index 00000000..8a3019ef --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_031.ttcn @@ -0,0 +1,29 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that module parameters can be used as in formal value parameters of test cases + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed by value to in formal value parameters shall be +// variables, literal values, module parameters, constants, variables, value returning +// (external) functions, formal value parameters (of in, inout or out parameterization) +// of the current scope or expressions composed of the above. + +module Sem_050402_actual_parameters_031 { + + type component GeneralComp { + } + + modulepar integer PX_VAL := 2; + + testcase TC_Sem_050402_actual_parameters_031(in integer p_val) runs on GeneralComp { + if (p_val == 2) { setverdict(pass); } + else { setverdict(fail); } + } + + control { + execute(TC_Sem_050402_actual_parameters_031(PX_VAL)); // tested parameter passing + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_032.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_032.ttcn new file mode 100644 index 00000000..3dd594db --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_032.ttcn @@ -0,0 +1,29 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that constants can be used as in formal value parameters of test cases + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed by value to in formal value parameters shall be +// variables, literal values, module parameters, constants, variables, value returning +// (external) functions, formal value parameters (of in, inout or out parameterization) +// of the current scope or expressions composed of the above. + +module Sem_050402_actual_parameters_032 { + + type component GeneralComp { + } + + const integer c_val := 3; + + testcase TC_Sem_050402_actual_parameters_032(in integer p_val) runs on GeneralComp { + if (p_val == 3) { setverdict(pass); } + else { setverdict(fail); } + } + + control { + execute(TC_Sem_050402_actual_parameters_032(c_val)); // tested parameter passing + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_033.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_033.ttcn new file mode 100644 index 00000000..8b189d10 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_033.ttcn @@ -0,0 +1,28 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that variables can be used as in formal value parameters of test cases + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed by value to in formal value parameters shall be +// variables, literal values, module parameters, constants, variables, value returning +// (external) functions, formal value parameters (of in, inout or out parameterization) +// of the current scope or expressions composed of the above. + +module Sem_050402_actual_parameters_033 { + + type component GeneralComp { + } + + testcase TC_Sem_050402_actual_parameters_033(in integer p_val) runs on GeneralComp { + if (p_val == 4) { setverdict(pass); } + else { setverdict(fail); } + } + + control { + var integer v_val := 4; + execute(TC_Sem_050402_actual_parameters_033(v_val)); // tested parameter passing + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_034.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_034.ttcn new file mode 100644 index 00000000..723f931f --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_034.ttcn @@ -0,0 +1,31 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that function calls can be used as in formal value parameters of test cases + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed by value to in formal value parameters shall be +// variables, literal values, module parameters, constants, variables, value returning +// (external) functions, formal value parameters (of in, inout or out parameterization) +// of the current scope or expressions composed of the above. + +module Sem_050402_actual_parameters_034 { + + type component GeneralComp { + } + + function f_ret() return integer { + return 5; + } + + testcase TC_Sem_050402_actual_parameters_034(in integer p_val) runs on GeneralComp { + if (p_val == 5) { setverdict(pass); } + else { setverdict(fail); } + } + + control { + execute(TC_Sem_050402_actual_parameters_034(f_ret())); // tested parameter passing + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_035.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_035.ttcn new file mode 100644 index 00000000..ebe4cb13 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_035.ttcn @@ -0,0 +1,31 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that in value parameters can be used as in formal value parameters of test cases + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed by value to in formal value parameters shall be +// variables, literal values, module parameters, constants, variables, value returning +// (external) functions, formal value parameters (of in, inout or out parameterization) +// of the current scope or expressions composed of the above. + +module Sem_050402_actual_parameters_035 { + + type component GeneralComp { + } + + testcase TC_Sem_050402_actual_parameters_035(in integer p_val) runs on GeneralComp { + if (p_val == 6) { setverdict(pass); } + else { setverdict(fail); } + } + + function f_caller(in integer p_val) { + execute(TC_Sem_050402_actual_parameters_035(p_val)); // tested parameter passing + } + + control { + f_caller(6); // this parameter passing is not a subject of the test + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_036.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_036.ttcn new file mode 100644 index 00000000..9a0b2552 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_036.ttcn @@ -0,0 +1,34 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that out value parameters can be used as in formal value parameters of test cases + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed by value to in formal value parameters shall be +// variables, literal values, module parameters, constants, variables, value returning +// (external) functions, formal value parameters (of in, inout or out parameterization) +// of the current scope or expressions composed of the above. + +module Sem_050402_actual_parameters_036 { + + type component GeneralComp { + } + + testcase TC_Sem_050402_actual_parameters_036(in integer p_val) runs on GeneralComp { + if (p_val == 7) { setverdict(pass); } + else { setverdict(fail); } + } + + function f_caller(out integer p_val) { + p_val := 7; // out parameter shall have a value before we can pass it to a function + execute(TC_Sem_050402_actual_parameters_036(p_val)); // tested parameter passing + } + + + control { + var integer v_val; + f_caller(v_val); // this parameter passing is not a subject of the test + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_037.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_037.ttcn new file mode 100644 index 00000000..1a8ca84d --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_037.ttcn @@ -0,0 +1,32 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that inout value parameters can be used as in formal value parameters of test cases + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed by value to in formal value parameters shall be +// variables, literal values, module parameters, constants, variables, value returning +// (external) functions, formal value parameters (of in, inout or out parameterization) +// of the current scope or expressions composed of the above. + +module Sem_050402_actual_parameters_037 { + + type component GeneralComp { + } + + testcase TC_Sem_050402_actual_parameters_037(in integer p_val) runs on GeneralComp { + if (p_val == 8) { setverdict(pass); } + else { setverdict(fail); } + } + + function f_caller(inout integer p_val) { + execute(TC_Sem_050402_actual_parameters_037(p_val)); // tested parameter passing + } + + control { + var integer v_val := 8; + f_caller(v_val); // this parameter passing is not a subject of the test + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_038.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_038.ttcn new file mode 100644 index 00000000..b8c3c2fc --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_038.ttcn @@ -0,0 +1,32 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that expressions can be used as in formal value parameters of test cases + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed by value to in formal value parameters shall be +// variables, literal values, module parameters, constants, variables, value returning +// (external) functions, formal value parameters (of in, inout or out parameterization) +// of the current scope or expressions composed of the above. + +module Sem_050402_actual_parameters_038 { + + type component GeneralComp { + } + + function f_ret() return integer { + return 4; + } + + testcase TC_Sem_050402_actual_parameters_038(in integer p_val) runs on GeneralComp { + if (p_val == 9) { setverdict(pass); } + else { setverdict(fail); } + } + + control { + var integer v_val := 5; + execute(TC_Sem_050402_actual_parameters_038(10 + f_ret() - v_val)); // tested parameter passing + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_039.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_039.ttcn new file mode 100644 index 00000000..71ebbe77 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_039.ttcn @@ -0,0 +1,31 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that variables can be used as inout formal value parameters of functions + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to inout formal value parameters shall be variables +// or formal value parameters (of in, inout or out parameterization) or references to +// elements of variables or formal value parameters of structured types. + +module Sem_050402_actual_parameters_039 { + + type component GeneralComp { + } + + function f_test(inout integer p_val) { + if (p_val == 4) { setverdict(pass); } + else { setverdict(fail); } + } + + testcase TC_Sem_050402_actual_parameters_039() runs on GeneralComp { + var integer v_val := 4; + f_test(v_val); // tested parameter passing + } + + control { + execute(TC_Sem_050402_actual_parameters_039()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_040.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_040.ttcn new file mode 100644 index 00000000..12060d16 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_040.ttcn @@ -0,0 +1,35 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that in value parameters can be used as inout formal value parameters of functions + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to inout formal value parameters shall be variables +// or formal value parameters (of in, inout or out parameterization) or references to +// elements of variables or formal value parameters of structured types. + +module Sem_050402_actual_parameters_040 { + + type component GeneralComp { + } + + function f_test(inout integer p_val) { + if (p_val == 6) { setverdict(pass); } + else { setverdict(fail); } + } + + function f_caller(in integer p_val) { + f_test(p_val); // tested parameter passing + } + + + testcase TC_Sem_050402_actual_parameters_040() runs on GeneralComp { + f_caller(6); // this parameter passing is not a subject of the test + } + + control { + execute(TC_Sem_050402_actual_parameters_040()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_041.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_041.ttcn new file mode 100644 index 00000000..dafad8af --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_041.ttcn @@ -0,0 +1,37 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that out value parameters can be used as inout formal value parameters of functions + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to inout formal value parameters shall be variables +// or formal value parameters (of in, inout or out parameterization) or references to +// elements of variables or formal value parameters of structured types. + +module Sem_050402_actual_parameters_041 { + + type component GeneralComp { + } + + function f_test(inout integer p_val) { + if (p_val == 7) { setverdict(pass); } + else { setverdict(fail); } + } + + function f_caller(out integer p_val) { + p_val := 7; // out parameter shall have a value before we can pass it to a function + f_test(p_val); // tested parameter passing + } + + + testcase TC_Sem_050402_actual_parameters_041() runs on GeneralComp { + var integer v_val; + f_caller(v_val); // this parameter passing is not a subject of the test + } + + control { + execute(TC_Sem_050402_actual_parameters_041()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_042.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_042.ttcn new file mode 100644 index 00000000..3518f284 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_042.ttcn @@ -0,0 +1,35 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that inout value parameters can be used as inout formal value parameters of functions + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to inout formal value parameters shall be variables +// or formal value parameters (of in, inout or out parameterization) or references to +// elements of variables or formal value parameters of structured types. + +module Sem_050402_actual_parameters_042 { + + type component GeneralComp { + } + + function f_test(inout integer p_val) { + if (p_val == 8) { setverdict(pass); } + else { setverdict(fail); } + } + + function f_caller(inout integer p_val) { + f_test(p_val); // tested parameter passing + } + + testcase TC_Sem_050402_actual_parameters_042() runs on GeneralComp { + var integer v_val := 8; + f_caller(v_val); // this parameter passing is not a subject of the test + } + + control { + execute(TC_Sem_050402_actual_parameters_042()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_043.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_043.ttcn new file mode 100644 index 00000000..4700cfea --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_043.ttcn @@ -0,0 +1,35 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that variable element reference can be used as inout formal value parameters of functions + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to inout formal value parameters shall be variables +// or formal value parameters (of in, inout or out parameterization) or references to +// elements of variables or formal value parameters of structured types. + +module Sem_050402_actual_parameters_043 { + + type component GeneralComp { + } + + type record R { + integer field1 + } + + function f_test(inout integer p_val) { + if (p_val == 10) { setverdict(pass); } + else { setverdict(fail); } + } + + testcase TC_Sem_050402_actual_parameters_043() runs on GeneralComp { + var R v_val := { field1 := 10 }; + f_test(v_val.field1); // tested parameter passing + } + + control { + execute(TC_Sem_050402_actual_parameters_043()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_044.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_044.ttcn new file mode 100644 index 00000000..02fc78c6 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_044.ttcn @@ -0,0 +1,38 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that reference to elements of formal value parameters can be used as inout formal value parameters of functions + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to inout formal value parameters shall be variables +// or formal value parameters (of in, inout or out parameterization) or references to +// elements of variables or formal value parameters of structured types. + +module Sem_050402_actual_parameters_044 { + + type component GeneralComp { + } + + type record R { + integer field1 + } + + function f_test(inout integer p_val) { + if (p_val == 11) { setverdict(pass); } + else { setverdict(fail); } + } + + function f_caller(in R p_param) { + f_test(p_param.field1); // tested parameter passing + } + + testcase TC_Sem_050402_actual_parameters_044() runs on GeneralComp { + f_caller({field1 := 11 }); + } + + control { + execute(TC_Sem_050402_actual_parameters_044()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_045.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_045.ttcn new file mode 100644 index 00000000..8f673880 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_045.ttcn @@ -0,0 +1,35 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that variables can be used as inout formal value parameters of altsteps + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to inout formal value parameters shall be variables +// or formal value parameters (of in, inout or out parameterization) or references to +// elements of variables or formal value parameters of structured types. + +module Sem_050402_actual_parameters_045 { + + type component GeneralComp { + timer t := 0.0; + } + + altstep a_test(inout integer p_val) runs on GeneralComp { + []t.timeout { + if (p_val == 4) { setverdict(pass); } + else { setverdict(fail); } + } + } + + testcase TC_Sem_050402_actual_parameters_045() runs on GeneralComp { + var integer v_val := 4; + t.start; + a_test(v_val); // tested parameter passing + } + + control { + execute(TC_Sem_050402_actual_parameters_045()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_046.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_046.ttcn new file mode 100644 index 00000000..ba6cc0ff --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_046.ttcn @@ -0,0 +1,39 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that in value parameters can be used as inout formal value parameters of altsteps + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to inout formal value parameters shall be variables +// or formal value parameters (of in, inout or out parameterization) or references to +// elements of variables or formal value parameters of structured types. + +module Sem_050402_actual_parameters_046 { + + type component GeneralComp { + timer t := 0.0; + } + + altstep a_test(inout integer p_val) runs on GeneralComp { + []t.timeout { + if (p_val == 6) { setverdict(pass); } + else { setverdict(fail); } + } + } + + function f_caller(in integer p_val) runs on GeneralComp{ + t.start; + a_test(p_val); // tested parameter passing + } + + + testcase TC_Sem_050402_actual_parameters_046() runs on GeneralComp { + f_caller(6); // this parameter passing is not a subject of the test + } + + control { + execute(TC_Sem_050402_actual_parameters_046()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_047.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_047.ttcn new file mode 100644 index 00000000..2b1db968 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_047.ttcn @@ -0,0 +1,41 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that out value parameters can be used as inout formal value parameters of altsteps + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to inout formal value parameters shall be variables +// or formal value parameters (of in, inout or out parameterization) or references to +// elements of variables or formal value parameters of structured types. + +module Sem_050402_actual_parameters_047 { + + type component GeneralComp { + timer t := 0.0; + } + + altstep a_test(inout integer p_val) runs on GeneralComp { + []t.timeout { + if (p_val == 7) { setverdict(pass); } + else { setverdict(fail); } + } + } + + function f_caller(out integer p_val) runs on GeneralComp { + t.start; + p_val := 7; // out parameter shall have a value before we can pass it to a function + a_test(p_val); // tested parameter passing + } + + + testcase TC_Sem_050402_actual_parameters_047() runs on GeneralComp { + var integer v_val; + f_caller(v_val); // this parameter passing is not a subject of the test + } + + control { + execute(TC_Sem_050402_actual_parameters_047()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_048.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_048.ttcn new file mode 100644 index 00000000..00cc303a --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_048.ttcn @@ -0,0 +1,39 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that inout value parameters can be used as inout formal value parameters of altsteps + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to inout formal value parameters shall be variables +// or formal value parameters (of in, inout or out parameterization) or references to +// elements of variables or formal value parameters of structured types. + +module Sem_050402_actual_parameters_048 { + + type component GeneralComp { + timer t := 0.0; + } + + altstep a_test(inout integer p_val) runs on GeneralComp { + []t.timeout { + if (p_val == 8) { setverdict(pass); } + else { setverdict(fail); } + } + } + + function f_caller(inout integer p_val) runs on GeneralComp { + t.start; + a_test(p_val); // tested parameter passing + } + + testcase TC_Sem_050402_actual_parameters_048() runs on GeneralComp { + var integer v_val := 8; + f_caller(v_val); // this parameter passing is not a subject of the test + } + + control { + execute(TC_Sem_050402_actual_parameters_048()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_049.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_049.ttcn new file mode 100644 index 00000000..74ca0b9a --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_049.ttcn @@ -0,0 +1,39 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that variable element reference can be used as inout formal value parameters of altsteps + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to inout formal value parameters shall be variables +// or formal value parameters (of in, inout or out parameterization) or references to +// elements of variables or formal value parameters of structured types. + +module Sem_050402_actual_parameters_049 { + + type component GeneralComp { + timer t := 0.0; + } + + type record R { + integer field1 + } + + altstep a_test(inout integer p_val) runs on GeneralComp { + []t.timeout { + if (p_val == 10) { setverdict(pass); } + else { setverdict(fail); } + } + } + + testcase TC_Sem_050402_actual_parameters_049() runs on GeneralComp { + var R v_val := { field1 := 10 }; + t.start; + a_test(v_val.field1); // tested parameter passing + } + + control { + execute(TC_Sem_050402_actual_parameters_049()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_050.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_050.ttcn new file mode 100644 index 00000000..41197ff8 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_050.ttcn @@ -0,0 +1,42 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that reference to elements of formal value parameters can be used as inout formal value parameters of altsteps + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to inout formal value parameters shall be variables +// or formal value parameters (of in, inout or out parameterization) or references to +// elements of variables or formal value parameters of structured types. + +module Sem_050402_actual_parameters_050 { + + type component GeneralComp { + timer t := 0.0; + } + + type record R { + integer field1 + } + + altstep a_test(inout integer p_val) runs on GeneralComp { + []t.timeout { + if (p_val == 11) { setverdict(pass); } + else { setverdict(fail); } + } + } + + function f_caller(in R p_param) runs on GeneralComp { + a_test(p_param.field1); // tested parameter passing + } + + testcase TC_Sem_050402_actual_parameters_050() runs on GeneralComp { + t.start; + f_caller({field1 := 11 }); + } + + control { + execute(TC_Sem_050402_actual_parameters_050()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_051.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_051.ttcn new file mode 100644 index 00000000..5f732781 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_051.ttcn @@ -0,0 +1,27 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that variables can be used as inout formal value parameters of test cases + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to inout formal value parameters shall be variables +// or formal value parameters (of in, inout or out parameterization) or references to +// elements of variables or formal value parameters of structured types. + +module Sem_050402_actual_parameters_051 { + + type component GeneralComp { + } + + testcase TC_Sem_050402_actual_parameters_051(inout integer p_val) runs on GeneralComp { + if (p_val == 4) { setverdict(pass); } + else { setverdict(fail); } + } + + control { + var integer v_val := 4; + execute(TC_Sem_050402_actual_parameters_051(v_val)); // tested parameter passing + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_052.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_052.ttcn new file mode 100644 index 00000000..3b027370 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_052.ttcn @@ -0,0 +1,30 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that in value parameters can be used as inout formal value parameters of test cases + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to inout formal value parameters shall be variables +// or formal value parameters (of in, inout or out parameterization) or references to +// elements of variables or formal value parameters of structured types. + +module Sem_050402_actual_parameters_052 { + + type component GeneralComp { + } + + testcase TC_Sem_050402_actual_parameters_052(inout integer p_val) runs on GeneralComp { + if (p_val == 6) { setverdict(pass); } + else { setverdict(fail); } + } + + function f_caller(in integer p_val) { + execute(TC_Sem_050402_actual_parameters_052(p_val)); // tested parameter passing + } + + control { + f_caller(6); // this parameter passing is not a subject of the test + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_053.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_053.ttcn new file mode 100644 index 00000000..1cf0fe8d --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_053.ttcn @@ -0,0 +1,33 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that out value parameters can be used as inout formal value parameters of test cases + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to inout formal value parameters shall be variables +// or formal value parameters (of in, inout or out parameterization) or references to +// elements of variables or formal value parameters of structured types. + +module Sem_050402_actual_parameters_053 { + + type component GeneralComp { + } + + testcase TC_Sem_050402_actual_parameters_053(inout integer p_val) runs on GeneralComp { + if (p_val == 7) { setverdict(pass); } + else { setverdict(fail); } + } + + function f_caller(out integer p_val) { + p_val := 7; // out parameter shall have a value before we can pass it to a function + execute(TC_Sem_050402_actual_parameters_053(p_val)); // tested parameter passing + } + + + control { + var integer v_val; + f_caller(v_val); // this parameter passing is not a subject of the test + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_054.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_054.ttcn new file mode 100644 index 00000000..071ba838 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_054.ttcn @@ -0,0 +1,31 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that inout value parameters can be used as inout formal value parameters of test cases + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to inout formal value parameters shall be variables +// or formal value parameters (of in, inout or out parameterization) or references to +// elements of variables or formal value parameters of structured types. + +module Sem_050402_actual_parameters_054 { + + type component GeneralComp { + } + + testcase TC_Sem_050402_actual_parameters_054(inout integer p_val) runs on GeneralComp { + if (p_val == 8) { setverdict(pass); } + else { setverdict(fail); } + } + + function f_caller(inout integer p_val) { + execute(TC_Sem_050402_actual_parameters_054(p_val)); // tested parameter passing + } + + control { + var integer v_val := 8; + f_caller(v_val); // this parameter passing is not a subject of the test + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_055.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_055.ttcn new file mode 100644 index 00000000..b39b00e4 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_055.ttcn @@ -0,0 +1,31 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that variable element reference can be used as inout formal value parameters of test cases + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to inout formal value parameters shall be variables +// or formal value parameters (of in, inout or out parameterization) or references to +// elements of variables or formal value parameters of structured types. + +module Sem_050402_actual_parameters_055 { + + type component GeneralComp { + } + + type record R { + integer field1 + } + + testcase TC_Sem_050402_actual_parameters_055(inout integer p_val) runs on GeneralComp { + if (p_val == 10) { setverdict(pass); } + else { setverdict(fail); } + } + + control { + var R v_val := { field1 := 10 }; + execute(TC_Sem_050402_actual_parameters_055(v_val.field1)); // tested parameter passing + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_056.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_056.ttcn new file mode 100644 index 00000000..1e8896af --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_056.ttcn @@ -0,0 +1,35 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that reference to elements of formal value parameters can be used as inout formal value parameters of test cases + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to inout formal value parameters shall be variables +// or formal value parameters (of in, inout or out parameterization) or references to +// elements of variables or formal value parameters of structured types. + +module Sem_050402_actual_parameters_056 { + + type component GeneralComp { + } + + type record R { + integer field1 + } + + testcase TC_Sem_050402_actual_parameters_056(inout integer p_val) runs on GeneralComp { + if (p_val == 11) { setverdict(pass); } + else { setverdict(fail); } + } + + function f_caller(in R p_param) { + execute(TC_Sem_050402_actual_parameters_056(p_param.field1)); // tested parameter passing + } + + control { + f_caller({field1 := 11 }); + + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_057.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_057.ttcn new file mode 100644 index 00000000..9004d26f --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_057.ttcn @@ -0,0 +1,32 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that literals can be used as in formal template parameters of functions + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to in formal template parameters shall be literal +// values, module parameters, constants, variables, value or template returning (external) +// functions, formal value parameters (of in, inout or out parameterization) of the current +// scope or expressions composed of the above, as well as templates, template variables or +// formal template parameters (of in, inout or out parameterization) of the current scope. + +module Sem_050402_actual_parameters_057 { + + type component GeneralComp { + } + + function f_test(in template integer p_val) { + if (match(1, p_val)) { setverdict(pass); } + else { setverdict(fail); } + } + + testcase TC_Sem_050402_actual_parameters_057() runs on GeneralComp { + f_test(1); // tested parameter passing + } + + control { + execute(TC_Sem_050402_actual_parameters_057()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_058.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_058.ttcn new file mode 100644 index 00000000..3f993bbb --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_058.ttcn @@ -0,0 +1,34 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that module parameters can be used as in formal template parameters of functions + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to in formal template parameters shall be literal +// values, module parameters, constants, variables, value or template returning (external) +// functions, formal value parameters (of in, inout or out parameterization) of the current +// scope or expressions composed of the above, as well as templates, template variables or +// formal template parameters (of in, inout or out parameterization) of the current scope. + +module Sem_050402_actual_parameters_058 { + + type component GeneralComp { + } + + modulepar integer PX_VAL := 2; + + function f_test(in template integer p_val) { + if (match(2, p_val)) { setverdict(pass); } + else { setverdict(fail); } + } + + testcase TC_Sem_050402_actual_parameters_058() runs on GeneralComp { + f_test(PX_VAL); // tested parameter passing + } + + control { + execute(TC_Sem_050402_actual_parameters_058()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_059.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_059.ttcn new file mode 100644 index 00000000..bc718cb0 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_059.ttcn @@ -0,0 +1,34 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that constants can be used as in formal template parameters of functions + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to in formal template parameters shall be literal +// values, module parameters, constants, variables, value or template returning (external) +// functions, formal value parameters (of in, inout or out parameterization) of the current +// scope or expressions composed of the above, as well as templates, template variables or +// formal template parameters (of in, inout or out parameterization) of the current scope. + +module Sem_050402_actual_parameters_059 { + + type component GeneralComp { + } + + const integer c_val := 3; + + function f_test(in template integer p_val) { + if (match(3, p_val)) { setverdict(pass); } + else { setverdict(fail); } + } + + testcase TC_Sem_050402_actual_parameters_059() runs on GeneralComp { + f_test(c_val); // tested parameter passing + } + + control { + execute(TC_Sem_050402_actual_parameters_059()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_060.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_060.ttcn new file mode 100644 index 00000000..93992010 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_060.ttcn @@ -0,0 +1,33 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that variables can be used as in formal template parameters of functions + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to in formal template parameters shall be literal +// values, module parameters, constants, variables, value or template returning (external) +// functions, formal value parameters (of in, inout or out parameterization) of the current +// scope or expressions composed of the above, as well as templates, template variables or +// formal template parameters (of in, inout or out parameterization) of the current scope. + +module Sem_050402_actual_parameters_060 { + + type component GeneralComp { + } + + function f_test(in template integer p_val) { + if (match(4, p_val)) { setverdict(pass); } + else { setverdict(fail); } + } + + testcase TC_Sem_050402_actual_parameters_060() runs on GeneralComp { + var integer v_val := 4; + f_test(v_val); // tested parameter passing + } + + control { + execute(TC_Sem_050402_actual_parameters_060()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_061.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_061.ttcn new file mode 100644 index 00000000..ee11958d --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_061.ttcn @@ -0,0 +1,36 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that function calls can be used as in formal template parameters of functions + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to in formal template parameters shall be literal +// values, module parameters, constants, variables, value or template returning (external) +// functions, formal value parameters (of in, inout or out parameterization) of the current +// scope or expressions composed of the above, as well as templates, template variables or +// formal template parameters (of in, inout or out parameterization) of the current scope. + +module Sem_050402_actual_parameters_061 { + + type component GeneralComp { + } + + function f_ret() return integer { + return 5; + } + + function f_test(in template integer p_val) { + if (match(5, p_val)) { setverdict(pass); } + else { setverdict(fail); } + } + + testcase TC_Sem_050402_actual_parameters_061() runs on GeneralComp { + f_test(f_ret()); // tested parameter passing + } + + control { + execute(TC_Sem_050402_actual_parameters_061()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_062.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_062.ttcn new file mode 100644 index 00000000..fc174bbe --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_062.ttcn @@ -0,0 +1,37 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that in value parameters can be used as in formal template parameters of functions + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to in formal template parameters shall be literal +// values, module parameters, constants, variables, value or template returning (external) +// functions, formal value parameters (of in, inout or out parameterization) of the current +// scope or expressions composed of the above, as well as templates, template variables or +// formal template parameters (of in, inout or out parameterization) of the current scope. + +module Sem_050402_actual_parameters_062 { + + type component GeneralComp { + } + + function f_test(in template integer p_val) { + if (match(6, p_val)) { setverdict(pass); } + else { setverdict(fail); } + } + + function f_caller(in integer p_val) { + f_test(p_val); // tested parameter passing + } + + + testcase TC_Sem_050402_actual_parameters_062() runs on GeneralComp { + f_caller(6); // this parameter passing is not a subject of the test + } + + control { + execute(TC_Sem_050402_actual_parameters_062()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_063.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_063.ttcn new file mode 100644 index 00000000..4652a335 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_063.ttcn @@ -0,0 +1,39 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that out value parameters can be used as in formal template parameters of functions + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to in formal template parameters shall be literal +// values, module parameters, constants, variables, value or template returning (external) +// functions, formal value parameters (of in, inout or out parameterization) of the current +// scope or expressions composed of the above, as well as templates, template variables or +// formal template parameters (of in, inout or out parameterization) of the current scope. + +module Sem_050402_actual_parameters_063 { + + type component GeneralComp { + } + + function f_test(in template integer p_val) { + if (match(7, p_val)) { setverdict(pass); } + else { setverdict(fail); } + } + + function f_caller(out integer p_val) { + p_val := 7; // out parameter shall have a value before we can pass it to a function + f_test(p_val); // tested parameter passing + } + + + testcase TC_Sem_050402_actual_parameters_063() runs on GeneralComp { + var integer v_val; + f_caller(v_val); // this parameter passing is not a subject of the test + } + + control { + execute(TC_Sem_050402_actual_parameters_063()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_064.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_064.ttcn new file mode 100644 index 00000000..f9164851 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_064.ttcn @@ -0,0 +1,37 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that inout value parameters can be used as in formal template parameters of functions + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to in formal template parameters shall be literal +// values, module parameters, constants, variables, value or template returning (external) +// functions, formal value parameters (of in, inout or out parameterization) of the current +// scope or expressions composed of the above, as well as templates, template variables or +// formal template parameters (of in, inout or out parameterization) of the current scope. + +module Sem_050402_actual_parameters_064 { + + type component GeneralComp { + } + + function f_test(in template integer p_val) { + if (match(8, p_val)) { setverdict(pass); } + else { setverdict(fail); } + } + + function f_caller(inout integer p_val) { + f_test(p_val); // tested parameter passing + } + + testcase TC_Sem_050402_actual_parameters_064() runs on GeneralComp { + var integer v_val := 8; + f_caller(v_val); // this parameter passing is not a subject of the test + } + + control { + execute(TC_Sem_050402_actual_parameters_064()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_065.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_065.ttcn new file mode 100644 index 00000000..ec410123 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_065.ttcn @@ -0,0 +1,37 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that expressions can be used as in formal template parameters of functions + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to in formal template parameters shall be literal +// values, module parameters, constants, variables, value or template returning (external) +// functions, formal value parameters (of in, inout or out parameterization) of the current +// scope or expressions composed of the above, as well as templates, template variables or +// formal template parameters (of in, inout or out parameterization) of the current scope. + +module Sem_050402_actual_parameters_065 { + + type component GeneralComp { + } + + function f_ret() return integer { + return 4; + } + + function f_test(in template integer p_val) { + if (match(9, p_val)) { setverdict(pass); } + else { setverdict(fail); } + } + + testcase TC_Sem_050402_actual_parameters_065() runs on GeneralComp { + var integer v_val := 5; + f_test(10 + f_ret() - v_val); // tested parameter passing + } + + control { + execute(TC_Sem_050402_actual_parameters_065()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_066.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_066.ttcn new file mode 100644 index 00000000..b17d09c5 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_066.ttcn @@ -0,0 +1,34 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that template parameters can be used as in formal template parameters of functions + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to in formal template parameters shall be literal +// values, module parameters, constants, variables, value or template returning (external) +// functions, formal value parameters (of in, inout or out parameterization) of the current +// scope or expressions composed of the above, as well as templates, template variables or +// formal template parameters (of in, inout or out parameterization) of the current scope. + +module Sem_050402_actual_parameters_066 { + + type component GeneralComp { + } + + template integer m_msg := 1; + + function f_test(in template integer p_val) { + if (match(1, p_val)) { setverdict(pass); } + else { setverdict(fail); } + } + + testcase TC_Sem_050402_actual_parameters_066() runs on GeneralComp { + f_test(m_msg); // tested parameter passing + } + + control { + execute(TC_Sem_050402_actual_parameters_066()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_067.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_067.ttcn new file mode 100644 index 00000000..b1a3f015 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_067.ttcn @@ -0,0 +1,33 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that template variables can be used as in formal template parameters of functions + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to in formal template parameters shall be literal +// values, module parameters, constants, variables, value or template returning (external) +// functions, formal value parameters (of in, inout or out parameterization) of the current +// scope or expressions composed of the above, as well as templates, template variables or +// formal template parameters (of in, inout or out parameterization) of the current scope. + +module Sem_050402_actual_parameters_067 { + + type component GeneralComp { + } + + function f_test(in template integer p_val) { + if (match(2, p_val)) { setverdict(pass); } + else { setverdict(fail); } + } + + testcase TC_Sem_050402_actual_parameters_067() runs on GeneralComp { + var template integer vm_msg := 2; + f_test(vm_msg); // tested parameter passing + } + + control { + execute(TC_Sem_050402_actual_parameters_067()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_068.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_068.ttcn new file mode 100644 index 00000000..dbd4b642 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_068.ttcn @@ -0,0 +1,37 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that template in parameters can be used as in formal template parameters of functions + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to in formal template parameters shall be literal +// values, module parameters, constants, variables, value or template returning (external) +// functions, formal value parameters (of in, inout or out parameterization) of the current +// scope or expressions composed of the above, as well as templates, template variables or +// formal template parameters (of in, inout or out parameterization) of the current scope. + +module Sem_050402_actual_parameters_068 { + + type component GeneralComp { + } + + function f_test(in template integer p_val) { + if (match(3, p_val)) { setverdict(pass); } + else { setverdict(fail); } + } + + function f_caller(in template integer p_val) { + f_test(p_val); // tested parameter passing + } + + + testcase TC_Sem_050402_actual_parameters_068() runs on GeneralComp { + f_caller(3); // this parameter passing is not a subject of the test + } + + control { + execute(TC_Sem_050402_actual_parameters_068()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_069.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_069.ttcn new file mode 100644 index 00000000..c578b727 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_069.ttcn @@ -0,0 +1,39 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that template out parameters can be used as in formal template parameters of functions + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to in formal template parameters shall be literal +// values, module parameters, constants, variables, value or template returning (external) +// functions, formal value parameters (of in, inout or out parameterization) of the current +// scope or expressions composed of the above, as well as templates, template variables or +// formal template parameters (of in, inout or out parameterization) of the current scope. + +module Sem_050402_actual_parameters_069 { + + type component GeneralComp { + } + + function f_test(in template integer p_val) { + if (match(4, p_val)) { setverdict(pass); } + else { setverdict(fail); } + } + + function f_caller(out template integer p_val) { + p_val := 4; // out parameter shall have a value before we can pass it to a function + f_test(p_val); // tested parameter passing + } + + + testcase TC_Sem_050402_actual_parameters_069() runs on GeneralComp { + var template integer v_val; + f_caller(v_val); // this parameter passing is not a subject of the test + } + + control { + execute(TC_Sem_050402_actual_parameters_069()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_070.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_070.ttcn new file mode 100644 index 00000000..4eb472e4 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_070.ttcn @@ -0,0 +1,38 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that template inout parameters can be used as in formal template parameters of functions + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to in formal template parameters shall be literal +// values, module parameters, constants, variables, value or template returning (external) +// functions, formal value parameters (of in, inout or out parameterization) of the current +// scope or expressions composed of the above, as well as templates, template variables or +// formal template parameters (of in, inout or out parameterization) of the current scope. + +module Sem_050402_actual_parameters_070 { + + type component GeneralComp { + } + + function f_test(in template integer p_val) { + if (match(5, p_val)) { setverdict(pass); } + else { setverdict(fail); } + } + + function f_caller(inout template integer p_val) { + f_test(p_val); // tested parameter passing + } + + + testcase TC_Sem_050402_actual_parameters_070() runs on GeneralComp { + var template integer v_val := 5; + f_caller(v_val); // this parameter passing is not a subject of the test + } + + control { + execute(TC_Sem_050402_actual_parameters_070()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_071.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_071.ttcn new file mode 100644 index 00000000..27429033 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_071.ttcn @@ -0,0 +1,33 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that literals can be used as in formal template parameters of templates + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to in formal template parameters shall be literal +// values, module parameters, constants, variables, value or template returning (external) +// functions, formal value parameters (of in, inout or out parameterization) of the current +// scope or expressions composed of the above, as well as templates, template variables or +// formal template parameters (of in, inout or out parameterization) of the current scope. + +module Sem_050402_actual_parameters_071 { + + type component GeneralComp { + } + + template integer m_test(in template integer p_val) := 11 + valueof(p_val); + + testcase TC_Sem_050402_actual_parameters_071() runs on GeneralComp { + if (match(12, m_test(1))) { // tested parameter passing + setverdict(pass); + } else { + setverdict(fail); + } + } + + control { + execute(TC_Sem_050402_actual_parameters_071()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_072.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_072.ttcn new file mode 100644 index 00000000..3cf3b1de --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_072.ttcn @@ -0,0 +1,35 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that module parameters can be used as in formal template parameters of templates + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to in formal template parameters shall be literal +// values, module parameters, constants, variables, value or template returning (external) +// functions, formal value parameters (of in, inout or out parameterization) of the current +// scope or expressions composed of the above, as well as templates, template variables or +// formal template parameters (of in, inout or out parameterization) of the current scope. + +module Sem_050402_actual_parameters_072 { + + type component GeneralComp { + } + + modulepar integer PX_VAL := 2; + + template integer m_test(in template integer p_val) := 11 + valueof(p_val); + + testcase TC_Sem_050402_actual_parameters_072() runs on GeneralComp { + if (match(13, m_test(PX_VAL))) { // tested parameter passing + setverdict(pass); + } else { + setverdict(fail); + } + } + + control { + execute(TC_Sem_050402_actual_parameters_072()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_073.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_073.ttcn new file mode 100644 index 00000000..d9e274a3 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_073.ttcn @@ -0,0 +1,35 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that constants can be used as in formal template parameters of templates + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to in formal template parameters shall be literal +// values, module parameters, constants, variables, value or template returning (external) +// functions, formal value parameters (of in, inout or out parameterization) of the current +// scope or expressions composed of the above, as well as templates, template variables or +// formal template parameters (of in, inout or out parameterization) of the current scope. + +module Sem_050402_actual_parameters_073 { + + type component GeneralComp { + } + + const integer c_val := 3; + + template integer m_test(in template integer p_val) := 11 + valueof(p_val); + + testcase TC_Sem_050402_actual_parameters_073() runs on GeneralComp { + if (match(14, m_test(c_val))) { // tested parameter passing + setverdict(pass); + } else { + setverdict(fail); + } + } + + control { + execute(TC_Sem_050402_actual_parameters_073()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_074.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_074.ttcn new file mode 100644 index 00000000..71654dba --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_074.ttcn @@ -0,0 +1,34 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that variables can be used as in formal template parameters of templates + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to in formal template parameters shall be literal +// values, module parameters, constants, variables, value or template returning (external) +// functions, formal value parameters (of in, inout or out parameterization) of the current +// scope or expressions composed of the above, as well as templates, template variables or +// formal template parameters (of in, inout or out parameterization) of the current scope. + +module Sem_050402_actual_parameters_074 { + + type component GeneralComp { + } + + template integer m_test(in template integer p_val) := 11 + valueof(p_val); + + testcase TC_Sem_050402_actual_parameters_074() runs on GeneralComp { + var integer v_val := 4; + if (match(15, m_test(v_val))) { // tested parameter passing + setverdict(pass); + } else { + setverdict(fail); + } + } + + control { + execute(TC_Sem_050402_actual_parameters_074()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_075.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_075.ttcn new file mode 100644 index 00000000..324663fa --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_075.ttcn @@ -0,0 +1,37 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that function calls can be used as in formal template parameters of templates + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to in formal template parameters shall be literal +// values, module parameters, constants, variables, value or template returning (external) +// functions, formal value parameters (of in, inout or out parameterization) of the current +// scope or expressions composed of the above, as well as templates, template variables or +// formal template parameters (of in, inout or out parameterization) of the current scope. + +module Sem_050402_actual_parameters_075 { + + type component GeneralComp { + } + + function f_ret() return integer { + return 5; + } + + template integer m_test(in template integer p_val) := 11 + valueof(p_val); + + testcase TC_Sem_050402_actual_parameters_075() runs on GeneralComp { + if (match(16, m_test(f_ret()))) { // tested parameter passing + setverdict(pass); + } else { + setverdict(fail); + } + } + + control { + execute(TC_Sem_050402_actual_parameters_075()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_076.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_076.ttcn new file mode 100644 index 00000000..100a0ebf --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_076.ttcn @@ -0,0 +1,38 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that in value parameters can be used as in formal template parameters of templates + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to in formal template parameters shall be literal +// values, module parameters, constants, variables, value or template returning (external) +// functions, formal value parameters (of in, inout or out parameterization) of the current +// scope or expressions composed of the above, as well as templates, template variables or +// formal template parameters (of in, inout or out parameterization) of the current scope. + +module Sem_050402_actual_parameters_076 { + + type component GeneralComp { + } + + template integer m_test(in template integer p_val) := 11 + valueof(p_val); + + function f_caller(in integer p_val) { + if (match(17, m_test(p_val))) { // tested parameter passing + setverdict(pass); + } else { + setverdict(fail); + } + } + + + testcase TC_Sem_050402_actual_parameters_076() runs on GeneralComp { + f_caller(6); // this parameter passing is not a subject of the test + } + + control { + execute(TC_Sem_050402_actual_parameters_076()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_077.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_077.ttcn new file mode 100644 index 00000000..6bd65673 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_077.ttcn @@ -0,0 +1,40 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that out value parameters can be used as in formal template parameters of templates + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to in formal template parameters shall be literal +// values, module parameters, constants, variables, value or template returning (external) +// functions, formal value parameters (of in, inout or out parameterization) of the current +// scope or expressions composed of the above, as well as templates, template variables or +// formal template parameters (of in, inout or out parameterization) of the current scope. + +module Sem_050402_actual_parameters_077 { + + type component GeneralComp { + } + + template integer m_test(in template integer p_val) := 11 + valueof(p_val); + + function f_caller(out integer p_val) { + p_val := 7; // out parameter shall have a value before we can pass it to a function + if (match(18, m_test(p_val))) { // tested parameter passing + setverdict(pass); + } else { + setverdict(fail); + } + } + + + testcase TC_Sem_050402_actual_parameters_077() runs on GeneralComp { + var integer v_val; + f_caller(v_val); // this parameter passing is not a subject of the test + } + + control { + execute(TC_Sem_050402_actual_parameters_077()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_078.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_078.ttcn new file mode 100644 index 00000000..c164da7a --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_078.ttcn @@ -0,0 +1,38 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that inout value parameters can be used as in formal template parameters of templates + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to in formal template parameters shall be literal +// values, module parameters, constants, variables, value or template returning (external) +// functions, formal value parameters (of in, inout or out parameterization) of the current +// scope or expressions composed of the above, as well as templates, template variables or +// formal template parameters (of in, inout or out parameterization) of the current scope. + +module Sem_050402_actual_parameters_078 { + + type component GeneralComp { + } + + template integer m_test(in template integer p_val) := 11 + valueof(p_val); + + function f_caller(inout integer p_val) { + if (match(19, m_test(p_val))) { // tested parameter passing + setverdict(pass); + } else { + setverdict(fail); + } + } + + testcase TC_Sem_050402_actual_parameters_078() runs on GeneralComp { + var integer v_val := 8; + f_caller(v_val); // this parameter passing is not a subject of the test + } + + control { + execute(TC_Sem_050402_actual_parameters_078()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_079.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_079.ttcn new file mode 100644 index 00000000..be035b2b --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_079.ttcn @@ -0,0 +1,38 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that expressions can be used as in formal template parameters of templates + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to in formal template parameters shall be literal +// values, module parameters, constants, variables, value or template returning (external) +// functions, formal value parameters (of in, inout or out parameterization) of the current +// scope or expressions composed of the above, as well as templates, template variables or +// formal template parameters (of in, inout or out parameterization) of the current scope. + +module Sem_050402_actual_parameters_079 { + + type component GeneralComp { + } + + function f_ret() return integer { + return 4; + } + + template integer m_test(in template integer p_val) := 11 + valueof(p_val); + + testcase TC_Sem_050402_actual_parameters_079() runs on GeneralComp { + var integer v_val := 5; + if (match(20, m_test(10 + f_ret() - v_val))) { // tested parameter passing + setverdict(pass); + } else { + setverdict(fail); + } + } + + control { + execute(TC_Sem_050402_actual_parameters_079()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_080.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_080.ttcn new file mode 100644 index 00000000..0c5cd1f0 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_080.ttcn @@ -0,0 +1,35 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that template parameters can be used as in formal template parameters of templates + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to in formal template parameters shall be literal +// values, module parameters, constants, variables, value or template returning (external) +// functions, formal value parameters (of in, inout or out parameterization) of the current +// scope or expressions composed of the above, as well as templates, template variables or +// formal template parameters (of in, inout or out parameterization) of the current scope. + +module Sem_050402_actual_parameters_080 { + + type component GeneralComp { + } + + template integer m_msg := 1; + + template integer m_test(in template integer p_val) := 5 + valueof(p_val); + + testcase TC_Sem_050402_actual_parameters_080() runs on GeneralComp { + if (match(6, m_test(m_msg))) { // tested parameter passing + setverdict(pass); + } else { + setverdict(fail); + } + } + + control { + execute(TC_Sem_050402_actual_parameters_080()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_081.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_081.ttcn new file mode 100644 index 00000000..e8971e99 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_081.ttcn @@ -0,0 +1,34 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that template variables can be used as in formal template parameters of templates + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to in formal template parameters shall be literal +// values, module parameters, constants, variables, value or template returning (external) +// functions, formal value parameters (of in, inout or out parameterization) of the current +// scope or expressions composed of the above, as well as templates, template variables or +// formal template parameters (of in, inout or out parameterization) of the current scope. + +module Sem_050402_actual_parameters_081 { + + type component GeneralComp { + } + + template integer m_test(in template integer p_val) := 5 + valueof(p_val); + + testcase TC_Sem_050402_actual_parameters_081() runs on GeneralComp { + var template integer vm_msg := 2; + if (match(7, m_test(vm_msg))) { // tested parameter passing + setverdict(pass); + } else { + setverdict(fail); + } + } + + control { + execute(TC_Sem_050402_actual_parameters_081()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_082.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_082.ttcn new file mode 100644 index 00000000..0fd50fca --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_082.ttcn @@ -0,0 +1,38 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that template in parameters can be used as in formal template parameters of templates + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to in formal template parameters shall be literal +// values, module parameters, constants, variables, value or template returning (external) +// functions, formal value parameters (of in, inout or out parameterization) of the current +// scope or expressions composed of the above, as well as templates, template variables or +// formal template parameters (of in, inout or out parameterization) of the current scope. + +module Sem_050402_actual_parameters_082 { + + type component GeneralComp { + } + + template integer m_test(in template integer p_val) := 5 + valueof(p_val); + + function f_caller(in template integer p_val) { + if (match(8, m_test(p_val))) { // tested parameter passing + setverdict(pass); + } else { + setverdict(fail); + } + } + + + testcase TC_Sem_050402_actual_parameters_082() runs on GeneralComp { + f_caller(3); // this parameter passing is not a subject of the test + } + + control { + execute(TC_Sem_050402_actual_parameters_082()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_083.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_083.ttcn new file mode 100644 index 00000000..52522945 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_083.ttcn @@ -0,0 +1,40 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that template out parameters can be used as in formal template parameters of templates + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to in formal template parameters shall be literal +// values, module parameters, constants, variables, value or template returning (external) +// functions, formal value parameters (of in, inout or out parameterization) of the current +// scope or expressions composed of the above, as well as templates, template variables or +// formal template parameters (of in, inout or out parameterization) of the current scope. + +module Sem_050402_actual_parameters_083 { + + type component GeneralComp { + } + + template integer m_test(in template integer p_val) := 5 + valueof(p_val); + + function f_caller(out template integer p_val) { + p_val := 4; // out parameter shall have a value before we can pass it to a function + if (match(9, m_test(p_val))) { // tested parameter passing + setverdict(pass); + } else { + setverdict(fail); + } + } + + + testcase TC_Sem_050402_actual_parameters_083() runs on GeneralComp { + var template integer v_val; + f_caller(v_val); // this parameter passing is not a subject of the test + } + + control { + execute(TC_Sem_050402_actual_parameters_083()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_084.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_084.ttcn new file mode 100644 index 00000000..93cc3269 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_084.ttcn @@ -0,0 +1,39 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that template inout parameters can be used as in formal template parameters of templates + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to in formal template parameters shall be literal +// values, module parameters, constants, variables, value or template returning (external) +// functions, formal value parameters (of in, inout or out parameterization) of the current +// scope or expressions composed of the above, as well as templates, template variables or +// formal template parameters (of in, inout or out parameterization) of the current scope. + +module Sem_050402_actual_parameters_084 { + + type component GeneralComp { + } + + template integer m_test(in template integer p_val) := 5 + valueof(p_val); + + function f_caller(inout template integer p_val) { + if (match(10, m_test(p_val))) { // tested parameter passing + setverdict(pass); + } else { + setverdict(fail); + } + } + + + testcase TC_Sem_050402_actual_parameters_084() runs on GeneralComp { + var template integer v_val := 5; + f_caller(v_val); // this parameter passing is not a subject of the test + } + + control { + execute(TC_Sem_050402_actual_parameters_084()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_085.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_085.ttcn new file mode 100644 index 00000000..0fe1ec19 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_085.ttcn @@ -0,0 +1,36 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that literals can be used as in formal template parameters of altsteps + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to in formal template parameters shall be literal +// values, module parameters, constants, variables, value or template returning (external) +// functions, formal value parameters (of in, inout or out parameterization) of the current +// scope or expressions composed of the above, as well as templates, template variables or +// formal template parameters (of in, inout or out parameterization) of the current scope. + +module Sem_050402_actual_parameters_085 { + + type component GeneralComp { + timer t := 0.0; + } + + altstep a_test(in template integer p_val) runs on GeneralComp { + []t.timeout { + if (match(1, p_val)) { setverdict(pass); } + else { setverdict(fail); } + } + } + + testcase TC_Sem_050402_actual_parameters_085() runs on GeneralComp { + t.start; + a_test(1); // tested parameter passing + } + + control { + execute(TC_Sem_050402_actual_parameters_085()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_086.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_086.ttcn new file mode 100644 index 00000000..061e5471 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_086.ttcn @@ -0,0 +1,38 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that module parameters can be used as in formal template parameters of altsteps + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to in formal template parameters shall be literal +// values, module parameters, constants, variables, value or template returning (external) +// functions, formal value parameters (of in, inout or out parameterization) of the current +// scope or expressions composed of the above, as well as templates, template variables or +// formal template parameters (of in, inout or out parameterization) of the current scope. + +module Sem_050402_actual_parameters_086 { + + type component GeneralComp { + timer t := 0.0; + } + + modulepar integer PX_VAL := 2; + + altstep a_test(in template integer p_val) runs on GeneralComp { + []t.timeout { + if (match(2, p_val)) { setverdict(pass); } + else { setverdict(fail); } + } + } + + testcase TC_Sem_050402_actual_parameters_086() runs on GeneralComp { + t.start; + a_test(PX_VAL); // tested parameter passing + } + + control { + execute(TC_Sem_050402_actual_parameters_086()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_087.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_087.ttcn new file mode 100644 index 00000000..dfa9f15f --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_087.ttcn @@ -0,0 +1,38 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that constants can be used as in formal template parameters of altsteps + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to in formal template parameters shall be literal +// values, module parameters, constants, variables, value or template returning (external) +// functions, formal value parameters (of in, inout or out parameterization) of the current +// scope or expressions composed of the above, as well as templates, template variables or +// formal template parameters (of in, inout or out parameterization) of the current scope. + +module Sem_050402_actual_parameters_087 { + + type component GeneralComp { + timer t := 0.0; + } + + const integer c_val := 3; + + altstep a_test(in template integer p_val) runs on GeneralComp { + []t.timeout { + if (match(3, p_val)) { setverdict(pass); } + else { setverdict(fail); } + } + } + + testcase TC_Sem_050402_actual_parameters_087() runs on GeneralComp { + t.start; + a_test(c_val); // tested parameter passing + } + + control { + execute(TC_Sem_050402_actual_parameters_087()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_088.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_088.ttcn new file mode 100644 index 00000000..1ea2a665 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_088.ttcn @@ -0,0 +1,37 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that variables can be used as in formal template parameters of altsteps + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to in formal template parameters shall be literal +// values, module parameters, constants, variables, value or template returning (external) +// functions, formal value parameters (of in, inout or out parameterization) of the current +// scope or expressions composed of the above, as well as templates, template variables or +// formal template parameters (of in, inout or out parameterization) of the current scope. + +module Sem_050402_actual_parameters_088 { + + type component GeneralComp { + timer t := 0.0; + } + + altstep a_test(in template integer p_val) runs on GeneralComp { + []t.timeout { + if (match(4, p_val)) { setverdict(pass); } + else { setverdict(fail); } + } + } + + testcase TC_Sem_050402_actual_parameters_088() runs on GeneralComp { + var integer v_val := 4; + t.start; + a_test(v_val); // tested parameter passing + } + + control { + execute(TC_Sem_050402_actual_parameters_088()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_089.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_089.ttcn new file mode 100644 index 00000000..43315b96 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_089.ttcn @@ -0,0 +1,40 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that function calls can be used as in formal template parameters of altsteps + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to in formal template parameters shall be literal +// values, module parameters, constants, variables, value or template returning (external) +// functions, formal value parameters (of in, inout or out parameterization) of the current +// scope or expressions composed of the above, as well as templates, template variables or +// formal template parameters (of in, inout or out parameterization) of the current scope. + +module Sem_050402_actual_parameters_089 { + + type component GeneralComp { + timer t := 0.0; + } + + function f_ret() return integer { + return 5; + } + + altstep a_test(in template integer p_val) runs on GeneralComp { + []t.timeout { + if (match(5, p_val)) { setverdict(pass); } + else { setverdict(fail); } + } + } + + testcase TC_Sem_050402_actual_parameters_089() runs on GeneralComp { + t.start; + a_test(f_ret()); // tested parameter passing + } + + control { + execute(TC_Sem_050402_actual_parameters_089()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_090.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_090.ttcn new file mode 100644 index 00000000..f79d73d8 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_090.ttcn @@ -0,0 +1,41 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that in value parameters can be used as in formal template parameters of altsteps + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to in formal template parameters shall be literal +// values, module parameters, constants, variables, value or template returning (external) +// functions, formal value parameters (of in, inout or out parameterization) of the current +// scope or expressions composed of the above, as well as templates, template variables or +// formal template parameters (of in, inout or out parameterization) of the current scope. + +module Sem_050402_actual_parameters_090 { + + type component GeneralComp { + timer t := 0.0; + } + + altstep a_test(in template integer p_val) runs on GeneralComp { + []t.timeout { + if (match(6, p_val)) { setverdict(pass); } + else { setverdict(fail); } + } + } + + function f_caller(in integer p_val) runs on GeneralComp{ + t.start; + a_test(p_val); // tested parameter passing + } + + + testcase TC_Sem_050402_actual_parameters_090() runs on GeneralComp { + f_caller(6); // this parameter passing is not a subject of the test + } + + control { + execute(TC_Sem_050402_actual_parameters_090()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_091.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_091.ttcn new file mode 100644 index 00000000..aab672cc --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_091.ttcn @@ -0,0 +1,43 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that out value parameters can be used as in formal template parameters of altsteps + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to in formal template parameters shall be literal +// values, module parameters, constants, variables, value or template returning (external) +// functions, formal value parameters (of in, inout or out parameterization) of the current +// scope or expressions composed of the above, as well as templates, template variables or +// formal template parameters (of in, inout or out parameterization) of the current scope. + +module Sem_050402_actual_parameters_091 { + + type component GeneralComp { + timer t := 0.0; + } + + altstep a_test(in template integer p_val) runs on GeneralComp { + []t.timeout { + if (match(7, p_val)) { setverdict(pass); } + else { setverdict(fail); } + } + } + + function f_caller(out integer p_val) runs on GeneralComp { + t.start; + p_val := 7; // out parameter shall have a value before we can pass it to a function + a_test(p_val); // tested parameter passing + } + + + testcase TC_Sem_050402_actual_parameters_091() runs on GeneralComp { + var integer v_val; + f_caller(v_val); // this parameter passing is not a subject of the test + } + + control { + execute(TC_Sem_050402_actual_parameters_091()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_092.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_092.ttcn new file mode 100644 index 00000000..db2f60c6 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_092.ttcn @@ -0,0 +1,41 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that inout value parameters can be used as in formal template parameters of altsteps + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to in formal template parameters shall be literal +// values, module parameters, constants, variables, value or template returning (external) +// functions, formal value parameters (of in, inout or out parameterization) of the current +// scope or expressions composed of the above, as well as templates, template variables or +// formal template parameters (of in, inout or out parameterization) of the current scope. + +module Sem_050402_actual_parameters_092 { + + type component GeneralComp { + timer t := 0.0; + } + + altstep a_test(in template integer p_val) runs on GeneralComp { + []t.timeout { + if (match(8, p_val)) { setverdict(pass); } + else { setverdict(fail); } + } + } + + function f_caller(inout integer p_val) runs on GeneralComp { + t.start; + a_test(p_val); // tested parameter passing + } + + testcase TC_Sem_050402_actual_parameters_092() runs on GeneralComp { + var integer v_val := 8; + f_caller(v_val); // this parameter passing is not a subject of the test + } + + control { + execute(TC_Sem_050402_actual_parameters_092()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_093.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_093.ttcn new file mode 100644 index 00000000..5205ef18 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_093.ttcn @@ -0,0 +1,41 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that expressions can be used as in formal template parameters of altsteps + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to in formal template parameters shall be literal +// values, module parameters, constants, variables, value or template returning (external) +// functions, formal value parameters (of in, inout or out parameterization) of the current +// scope or expressions composed of the above, as well as templates, template variables or +// formal template parameters (of in, inout or out parameterization) of the current scope. + +module Sem_050402_actual_parameters_093 { + + type component GeneralComp { + timer t := 0.0; + } + + function f_ret() return integer { + return 4; + } + + altstep a_test(in template integer p_val) runs on GeneralComp { + []t.timeout { + if (match(9, p_val)) { setverdict(pass); } + else { setverdict(fail); } + } + } + + testcase TC_Sem_050402_actual_parameters_093() runs on GeneralComp { + var integer v_val := 5; + t.start; + a_test(10 + f_ret() - v_val); // tested parameter passing + } + + control { + execute(TC_Sem_050402_actual_parameters_093()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_094.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_094.ttcn new file mode 100644 index 00000000..d1f0c376 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_094.ttcn @@ -0,0 +1,38 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that template parameters can be used as in formal template parameters of altsteps + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to in formal template parameters shall be literal +// values, module parameters, constants, variables, value or template returning (external) +// functions, formal value parameters (of in, inout or out parameterization) of the current +// scope or expressions composed of the above, as well as templates, template variables or +// formal template parameters (of in, inout or out parameterization) of the current scope. + +module Sem_050402_actual_parameters_094 { + + type component GeneralComp { + timer t := 0.0; + } + + template integer m_msg := 1; + + altstep a_test(in template integer p_val) runs on GeneralComp { + []t.timeout { + if (match(1, p_val)) { setverdict(pass); } + else { setverdict(fail); } + } + } + + testcase TC_Sem_050402_actual_parameters_094() runs on GeneralComp { + t.start; + a_test(m_msg); // tested parameter passing + } + + control { + execute(TC_Sem_050402_actual_parameters_094()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_095.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_095.ttcn new file mode 100644 index 00000000..382f0694 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_095.ttcn @@ -0,0 +1,37 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that template variables can be used as in formal template parameters of altsteps + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to in formal template parameters shall be literal +// values, module parameters, constants, variables, value or template returning (external) +// functions, formal value parameters (of in, inout or out parameterization) of the current +// scope or expressions composed of the above, as well as templates, template variables or +// formal template parameters (of in, inout or out parameterization) of the current scope. + +module Sem_050402_actual_parameters_095 { + + type component GeneralComp { + timer t := 0.0; + } + + altstep a_test(in template integer p_val) runs on GeneralComp { + []t.timeout { + if (match(2, p_val)) { setverdict(pass); } + else { setverdict(fail); } + } + } + + testcase TC_Sem_050402_actual_parameters_095() runs on GeneralComp { + var template integer vm_msg := 2; + t.start; + a_test(vm_msg); // tested parameter passing + } + + control { + execute(TC_Sem_050402_actual_parameters_095()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_096.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_096.ttcn new file mode 100644 index 00000000..1f02fb6a --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_096.ttcn @@ -0,0 +1,41 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that template in parameters can be used as in formal template parameters of altsteps + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to in formal template parameters shall be literal +// values, module parameters, constants, variables, value or template returning (external) +// functions, formal value parameters (of in, inout or out parameterization) of the current +// scope or expressions composed of the above, as well as templates, template variables or +// formal template parameters (of in, inout or out parameterization) of the current scope. + +module Sem_050402_actual_parameters_096 { + + type component GeneralComp { + timer t := 0.0; + } + + altstep a_test(in template integer p_val) runs on GeneralComp { + []t.timeout { + if (match(3, p_val)) { setverdict(pass); } + else { setverdict(fail); } + } + } + + function f_caller(in template integer p_val) runs on GeneralComp { + a_test(p_val); // tested parameter passing + } + + + testcase TC_Sem_050402_actual_parameters_096() runs on GeneralComp { + t.start; + f_caller(3); // this parameter passing is not a subject of the test + } + + control { + execute(TC_Sem_050402_actual_parameters_096()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_097.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_097.ttcn new file mode 100644 index 00000000..4dd7d885 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_097.ttcn @@ -0,0 +1,43 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that template out parameters can be used as in formal template parameters of altsteps + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to in formal template parameters shall be literal +// values, module parameters, constants, variables, value or template returning (external) +// functions, formal value parameters (of in, inout or out parameterization) of the current +// scope or expressions composed of the above, as well as templates, template variables or +// formal template parameters (of in, inout or out parameterization) of the current scope. + +module Sem_050402_actual_parameters_097 { + + type component GeneralComp { + timer t := 0.0; + } + + altstep a_test(in template integer p_val) runs on GeneralComp { + []t.timeout { + if (match(4, p_val)) { setverdict(pass); } + else { setverdict(fail); } + } + } + + function f_caller(out template integer p_val) runs on GeneralComp { + p_val := 4; // out parameter shall have a value before we can pass it to a function + a_test(p_val); // tested parameter passing + } + + + testcase TC_Sem_050402_actual_parameters_097() runs on GeneralComp { + var template integer v_val; + t.start; + f_caller(v_val); // this parameter passing is not a subject of the test + } + + control { + execute(TC_Sem_050402_actual_parameters_097()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_098.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_098.ttcn new file mode 100644 index 00000000..e69e5a9e --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_098.ttcn @@ -0,0 +1,42 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that template inout parameters can be used as in formal template parameters of altsteps + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to in formal template parameters shall be literal +// values, module parameters, constants, variables, value or template returning (external) +// functions, formal value parameters (of in, inout or out parameterization) of the current +// scope or expressions composed of the above, as well as templates, template variables or +// formal template parameters (of in, inout or out parameterization) of the current scope. + +module Sem_050402_actual_parameters_098 { + + type component GeneralComp { + timer t := 0.0; + } + + altstep a_test(in template integer p_val) runs on GeneralComp { + []t.timeout { + if (match(5, p_val)) { setverdict(pass); } + else { setverdict(fail); } + } + } + + function f_caller(inout template integer p_val) runs on GeneralComp { + a_test(p_val); // tested parameter passing + } + + + testcase TC_Sem_050402_actual_parameters_098() runs on GeneralComp { + var template integer v_val := 5; + t.start; + f_caller(v_val); // this parameter passing is not a subject of the test + } + + control { + execute(TC_Sem_050402_actual_parameters_098()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_099.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_099.ttcn new file mode 100644 index 00000000..59dbaa02 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_099.ttcn @@ -0,0 +1,28 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that literals can be used as in formal template parameters of test cases + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to in formal template parameters shall be literal +// values, module parameters, constants, variables, value or template returning (external) +// functions, formal value parameters (of in, inout or out parameterization) of the current +// scope or expressions composed of the above, as well as templates, template variables or +// formal template parameters (of in, inout or out parameterization) of the current scope. + +module Sem_050402_actual_parameters_099 { + + type component GeneralComp { + } + + testcase TC_Sem_050402_actual_parameters_099(in template integer p_val) runs on GeneralComp { + if (match(1, p_val)) { setverdict(pass); } + else { setverdict(fail); } + } + + control { + execute(TC_Sem_050402_actual_parameters_099(1)); // tested parameter passing + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_100.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_100.ttcn new file mode 100644 index 00000000..3eaddc16 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_100.ttcn @@ -0,0 +1,30 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that module parameters can be used as in formal template parameters of test cases + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to in formal template parameters shall be literal +// values, module parameters, constants, variables, value or template returning (external) +// functions, formal value parameters (of in, inout or out parameterization) of the current +// scope or expressions composed of the above, as well as templates, template variables or +// formal template parameters (of in, inout or out parameterization) of the current scope. + +module Sem_050402_actual_parameters_100 { + + type component GeneralComp { + } + + modulepar integer PX_VAL := 2; + + testcase TC_Sem_050402_actual_parameters_100(in template integer p_val) runs on GeneralComp { + if (match(2, p_val)) { setverdict(pass); } + else { setverdict(fail); } + } + + control { + execute(TC_Sem_050402_actual_parameters_100(PX_VAL)); // tested parameter passing + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_101.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_101.ttcn new file mode 100644 index 00000000..abeee130 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_101.ttcn @@ -0,0 +1,30 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that constants can be used as in formal template parameters of test cases + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to in formal template parameters shall be literal +// values, module parameters, constants, variables, value or template returning (external) +// functions, formal value parameters (of in, inout or out parameterization) of the current +// scope or expressions composed of the above, as well as templates, template variables or +// formal template parameters (of in, inout or out parameterization) of the current scope. + +module Sem_050402_actual_parameters_101 { + + type component GeneralComp { + } + + const integer c_val := 3; + + testcase TC_Sem_050402_actual_parameters_101(in template integer p_val) runs on GeneralComp { + if (match(3, p_val)) { setverdict(pass); } + else { setverdict(fail); } + } + + control { + execute(TC_Sem_050402_actual_parameters_101(c_val)); // tested parameter passing + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_102.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_102.ttcn new file mode 100644 index 00000000..e3afc920 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_102.ttcn @@ -0,0 +1,29 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that variables can be used as in formal template parameters of test cases + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to in formal template parameters shall be literal +// values, module parameters, constants, variables, value or template returning (external) +// functions, formal value parameters (of in, inout or out parameterization) of the current +// scope or expressions composed of the above, as well as templates, template variables or +// formal template parameters (of in, inout or out parameterization) of the current scope. + +module Sem_050402_actual_parameters_102 { + + type component GeneralComp { + } + + testcase TC_Sem_050402_actual_parameters_102(in template integer p_val) runs on GeneralComp { + if (match(4, p_val)) { setverdict(pass); } + else { setverdict(fail); } + } + + control { + var integer v_val := 4; + execute(TC_Sem_050402_actual_parameters_102(v_val)); // tested parameter passing + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_103.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_103.ttcn new file mode 100644 index 00000000..b1fc7937 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_103.ttcn @@ -0,0 +1,32 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that function calls can be used as in formal template parameters of test cases + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to in formal template parameters shall be literal +// values, module parameters, constants, variables, value or template returning (external) +// functions, formal value parameters (of in, inout or out parameterization) of the current +// scope or expressions composed of the above, as well as templates, template variables or +// formal template parameters (of in, inout or out parameterization) of the current scope. + +module Sem_050402_actual_parameters_103 { + + type component GeneralComp { + } + + function f_ret() return integer { + return 5; + } + + testcase TC_Sem_050402_actual_parameters_103(in template integer p_val) runs on GeneralComp { + if (match(5, p_val)) { setverdict(pass); } + else { setverdict(fail); } + } + + control { + execute(TC_Sem_050402_actual_parameters_103(f_ret())); // tested parameter passing + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_104.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_104.ttcn new file mode 100644 index 00000000..d683c039 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_104.ttcn @@ -0,0 +1,32 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that in value parameters can be used as in formal template parameters of test cases + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to in formal template parameters shall be literal +// values, module parameters, constants, variables, value or template returning (external) +// functions, formal value parameters (of in, inout or out parameterization) of the current +// scope or expressions composed of the above, as well as templates, template variables or +// formal template parameters (of in, inout or out parameterization) of the current scope. + +module Sem_050402_actual_parameters_104 { + + type component GeneralComp { + } + + testcase TC_Sem_050402_actual_parameters_104(in template integer p_val) runs on GeneralComp { + if (match(6, p_val)) { setverdict(pass); } + else { setverdict(fail); } + } + + function f_caller(in integer p_val) { + execute(TC_Sem_050402_actual_parameters_104(p_val)); // tested parameter passing + } + + control { + f_caller(6); // this parameter passing is not a subject of the test + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_105.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_105.ttcn new file mode 100644 index 00000000..f1608c84 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_105.ttcn @@ -0,0 +1,35 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that out value parameters can be used as in formal template parameters of test cases + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to in formal template parameters shall be literal +// values, module parameters, constants, variables, value or template returning (external) +// functions, formal value parameters (of in, inout or out parameterization) of the current +// scope or expressions composed of the above, as well as templates, template variables or +// formal template parameters (of in, inout or out parameterization) of the current scope. + +module Sem_050402_actual_parameters_105 { + + type component GeneralComp { + } + + testcase TC_Sem_050402_actual_parameters_105(in template integer p_val) runs on GeneralComp { + if (match(7, p_val)) { setverdict(pass); } + else { setverdict(fail); } + } + + function f_caller(out integer p_val) { + p_val := 7; // out parameter shall have a value before we can pass it to a function + execute(TC_Sem_050402_actual_parameters_105(p_val)); // tested parameter passing + } + + + control { + var integer v_val; + f_caller(v_val); // this parameter passing is not a subject of the test + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_106.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_106.ttcn new file mode 100644 index 00000000..2766240e --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_106.ttcn @@ -0,0 +1,33 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that inout value parameters can be used as in formal template parameters of test cases + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to in formal template parameters shall be literal +// values, module parameters, constants, variables, value or template returning (external) +// functions, formal value parameters (of in, inout or out parameterization) of the current +// scope or expressions composed of the above, as well as templates, template variables or +// formal template parameters (of in, inout or out parameterization) of the current scope. + +module Sem_050402_actual_parameters_106 { + + type component GeneralComp { + } + + testcase TC_Sem_050402_actual_parameters_106(in template integer p_val) runs on GeneralComp { + if (match(8, p_val)) { setverdict(pass); } + else { setverdict(fail); } + } + + function f_caller(inout integer p_val) { + execute(TC_Sem_050402_actual_parameters_106(p_val)); // tested parameter passing + } + + control { + var integer v_val := 8; + f_caller(v_val); // this parameter passing is not a subject of the test + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_107.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_107.ttcn new file mode 100644 index 00000000..176c7e5c --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_107.ttcn @@ -0,0 +1,33 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that expressions can be used as in formal template parameters of test cases + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to in formal template parameters shall be literal +// values, module parameters, constants, variables, value or template returning (external) +// functions, formal value parameters (of in, inout or out parameterization) of the current +// scope or expressions composed of the above, as well as templates, template variables or +// formal template parameters (of in, inout or out parameterization) of the current scope. + +module Sem_050402_actual_parameters_107 { + + type component GeneralComp { + } + + function f_ret() return integer { + return 4; + } + + testcase TC_Sem_050402_actual_parameters_107(in template integer p_val) runs on GeneralComp { + if (match(9, p_val)) { setverdict(pass); } + else { setverdict(fail); } + } + + control { + var integer v_val := 5; + execute(TC_Sem_050402_actual_parameters_107(10 + f_ret() - v_val)); // tested parameter passing + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_108.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_108.ttcn new file mode 100644 index 00000000..2d044948 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_108.ttcn @@ -0,0 +1,30 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that template parameters can be used as in formal template parameters of test cases + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to in formal template parameters shall be literal +// values, module parameters, constants, variables, value or template returning (external) +// functions, formal value parameters (of in, inout or out parameterization) of the current +// scope or expressions composed of the above, as well as templates, template variables or +// formal template parameters (of in, inout or out parameterization) of the current scope. + +module Sem_050402_actual_parameters_108 { + + type component GeneralComp { + } + + template integer m_msg := 1; + + testcase TC_Sem_050402_actual_parameters_108(in template integer p_val) runs on GeneralComp { + if (match(1, p_val)) { setverdict(pass); } + else { setverdict(fail); } + } + + control { + execute(TC_Sem_050402_actual_parameters_108(m_msg)); // tested parameter passing + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_109.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_109.ttcn new file mode 100644 index 00000000..3be893c1 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_109.ttcn @@ -0,0 +1,29 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that template variables can be used as in formal template parameters of test cases + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to in formal template parameters shall be literal +// values, module parameters, constants, variables, value or template returning (external) +// functions, formal value parameters (of in, inout or out parameterization) of the current +// scope or expressions composed of the above, as well as templates, template variables or +// formal template parameters (of in, inout or out parameterization) of the current scope. + +module Sem_050402_actual_parameters_109 { + + type component GeneralComp { + } + + testcase TC_Sem_050402_actual_parameters_109(in template integer p_val) runs on GeneralComp { + if (match(2, p_val)) { setverdict(pass); } + else { setverdict(fail); } + } + + control { + var template integer vm_msg := 2; + execute(TC_Sem_050402_actual_parameters_109(vm_msg)); // tested parameter passing + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_110.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_110.ttcn new file mode 100644 index 00000000..dd8428b7 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_110.ttcn @@ -0,0 +1,32 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that template in parameters can be used as in formal template parameters of test cases + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to in formal template parameters shall be literal +// values, module parameters, constants, variables, value or template returning (external) +// functions, formal value parameters (of in, inout or out parameterization) of the current +// scope or expressions composed of the above, as well as templates, template variables or +// formal template parameters (of in, inout or out parameterization) of the current scope. + +module Sem_050402_actual_parameters_110 { + + type component GeneralComp { + } + + testcase TC_Sem_050402_actual_parameters_110(in template integer p_val) runs on GeneralComp { + if (match(3, p_val)) { setverdict(pass); } + else { setverdict(fail); } + } + + function f_caller(in template integer p_val) { + execute(TC_Sem_050402_actual_parameters_110(p_val)); // tested parameter passing + } + + control { + f_caller(3); // this parameter passing is not a subject of the test + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_111.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_111.ttcn new file mode 100644 index 00000000..fbbff2c0 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_111.ttcn @@ -0,0 +1,34 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that template out parameters can be used as in formal template parameters of test cases + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to in formal template parameters shall be literal +// values, module parameters, constants, variables, value or template returning (external) +// functions, formal value parameters (of in, inout or out parameterization) of the current +// scope or expressions composed of the above, as well as templates, template variables or +// formal template parameters (of in, inout or out parameterization) of the current scope. + +module Sem_050402_actual_parameters_111 { + + type component GeneralComp { + } + + testcase TC_Sem_050402_actual_parameters_111(in template integer p_val) runs on GeneralComp { + if (match(4, p_val)) { setverdict(pass); } + else { setverdict(fail); } + } + + function f_caller(out template integer p_val) { + p_val := 4; // out parameter shall have a value before we can pass it to a function + execute(TC_Sem_050402_actual_parameters_111(p_val)); // tested parameter passing + } + + control { + var template integer vm_val; + f_caller(vm_val); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_112.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_112.ttcn new file mode 100644 index 00000000..34db0c62 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_112.ttcn @@ -0,0 +1,33 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that template inout parameters can be used as in formal template parameters of test cases + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to in formal template parameters shall be literal +// values, module parameters, constants, variables, value or template returning (external) +// functions, formal value parameters (of in, inout or out parameterization) of the current +// scope or expressions composed of the above, as well as templates, template variables or +// formal template parameters (of in, inout or out parameterization) of the current scope. + +module Sem_050402_actual_parameters_112 { + + type component GeneralComp { + } + + testcase TC_Sem_050402_actual_parameters_112(in template integer p_val) runs on GeneralComp { + if (match(5, p_val)) { setverdict(pass); } + else { setverdict(fail); } + } + + function f_caller(inout template integer p_val) { + execute(TC_Sem_050402_actual_parameters_112(p_val)); // tested parameter passing + } + + control { + var template integer vm_val := 5; + f_caller(vm_val); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_113.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_113.ttcn new file mode 100644 index 00000000..c5debcd7 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_113.ttcn @@ -0,0 +1,32 @@ +/*************************************************** + ** @author STF 487 (updated by STF 521) + ** @version 0.0.2 + ** @purpose 1:5.4.2, verify that template variables can be used as out formal template parameters of functions + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to out formal template parameters shall be template variables, +// formal template parameters or references to elements of template variables or formal template +// parameters of structured types. + +module Sem_050402_actual_parameters_113 { + + type component GeneralComp { + } + + function f_test(out template integer p_val) { + p_val := 2; + } + + testcase TC_Sem_050402_actual_parameters_113() runs on GeneralComp { + var template integer vm_msg; + f_test(vm_msg); // tested parameter passing + if (match(2, vm_msg)) { setverdict(pass); } + else { setverdict(fail); } + } + + control { + execute(TC_Sem_050402_actual_parameters_113()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_114.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_114.ttcn new file mode 100644 index 00000000..c1b07c6e --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_114.ttcn @@ -0,0 +1,36 @@ +/*************************************************** + ** @author STF 487 (updated by STF 521) + ** @version 0.0.2 + ** @purpose 1:5.4.2, verify that template in parameters can be used as out formal template parameters of functions + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to out formal template parameters shall be template variables, +// formal template parameters or references to elements of template variables or formal template +// parameters of structured types. + +module Sem_050402_actual_parameters_114 { + + type component GeneralComp { + } + + function f_test(out template integer p_val) { + p_val := 0; + } + + function f_caller(in template integer p_val) { + f_test(p_val); // tested parameter passing + if (match(0, p_val)) { setverdict(pass); } + else { setverdict(fail); } + } + + + testcase TC_Sem_050402_actual_parameters_114() runs on GeneralComp { + f_caller(3); // this parameter passing is not a subject of the test + } + + control { + execute(TC_Sem_050402_actual_parameters_114()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_115.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_115.ttcn new file mode 100644 index 00000000..c8251da0 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_115.ttcn @@ -0,0 +1,38 @@ +/*************************************************** + ** @author STF 487 (updated by STF 521) + ** @version 0.0.2 + ** @purpose 1:5.4.2, verify that template out parameters can be used as out formal template parameters of functions + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to out formal template parameters shall be template variables, +// formal template parameters or references to elements of template variables or formal template +// parameters of structured types. + +module Sem_050402_actual_parameters_115 { + + type component GeneralComp { + } + + function f_test(out template integer p_val) { + p_val := 0; + } + + function f_caller(out template integer p_val) { + p_val := 4; // out parameter shall have a value before we can pass it to a function + f_test(p_val); // tested parameter passing + if (match(0, p_val)) { setverdict(pass); } + else { setverdict(fail); } + } + + + testcase TC_Sem_050402_actual_parameters_115() runs on GeneralComp { + var template integer v_val; + f_caller(v_val); // this parameter passing is not a subject of the test + } + + control { + execute(TC_Sem_050402_actual_parameters_115()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_116.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_116.ttcn new file mode 100644 index 00000000..c7b6c452 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_116.ttcn @@ -0,0 +1,37 @@ +/*************************************************** + ** @author STF 487 (updated by STF 521) + ** @version 0.0.2 + ** @purpose 1:5.4.2, verify that template inout parameters can be used as out formal template parameters of functions + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to out formal template parameters shall be template variables, +// formal template parameters or references to elements of template variables or formal template +// parameters of structured types. + +module Sem_050402_actual_parameters_116 { + + type component GeneralComp { + } + + function f_test(out template integer p_val) { + p_val := 0; + } + + function f_caller(inout template integer p_val) { + f_test(p_val); // tested parameter passing + if (match(0, p_val)) { setverdict(pass); } + else { setverdict(fail); } + } + + + testcase TC_Sem_050402_actual_parameters_116() runs on GeneralComp { + var template integer v_val := 5; + f_caller(v_val); // this parameter passing is not a subject of the test + } + + control { + execute(TC_Sem_050402_actual_parameters_116()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_117.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_117.ttcn new file mode 100644 index 00000000..7fe9ca22 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_117.ttcn @@ -0,0 +1,36 @@ +/*************************************************** + ** @author STF 487 (updated by STF 521) + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that template variable element reference can be used as out formal template parameters of functions + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to out formal template parameters shall be template variables, +// formal template parameters or references to elements of template variables or formal template +// parameters of structured types. + +module Sem_050402_actual_parameters_117 { + + type component GeneralComp { + } + + type record R { + integer field1 + } + + function f_test(out template integer p_val) { + p_val := ?; + } + + testcase TC_Sem_050402_actual_parameters_117() runs on GeneralComp { + var template R v_val := { field1 := 10 }; + f_test(v_val.field1); // tested parameter passing + if (match( { field1 := 0 }, v_val)) { setverdict(pass); } + else { setverdict(fail); } + } + + control { + execute(TC_Sem_050402_actual_parameters_117()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_118.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_118.ttcn new file mode 100644 index 00000000..79db2238 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_118.ttcn @@ -0,0 +1,39 @@ +/*************************************************** + ** @author STF 487 (updated by STF 521) + ** @version 0.0.2 + ** @purpose 1:5.4.2, verify that reference to elements of formal template parameters can be used as out formal template parameters of functions + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to out formal template parameters shall be template variables, +// formal template parameters or references to elements of template variables or formal template +// parameters of structured types. + +module Sem_050402_actual_parameters_118 { + + type component GeneralComp { + } + + type record R { + integer field1 + } + + function f_test(out template integer p_val) { + p_val := ?; + } + + function f_caller(in template R p_param) { + f_test(p_param.field1); // tested parameter passing + if (match( { field1 := 0 }, p_param)) { setverdict(pass); } + else { setverdict(fail); } + } + + testcase TC_Sem_050402_actual_parameters_118() runs on GeneralComp { + f_caller({field1 := 11 }); + } + + control { + execute(TC_Sem_050402_actual_parameters_118()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_119.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_119.ttcn new file mode 100644 index 00000000..aa113008 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_119.ttcn @@ -0,0 +1,36 @@ +/*************************************************** + ** @author STF 487 (updated by STF 521) + ** @version 0.0.2 + ** @purpose 1:5.4.2, verify that template variables can be used as out formal template parameters of altsteps + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to out formal template parameters shall be template variables, +// formal template parameters or references to elements of template variables or formal template +// parameters of structured types. + +module Sem_050402_actual_parameters_119 { + + type component GeneralComp { + timer t := 0.0; + } + + altstep a_test(out template integer p_val) runs on GeneralComp { + []t.timeout { + p_val := 0; + } + } + + testcase TC_Sem_050402_actual_parameters_119() runs on GeneralComp { + var template integer vm_msg := 2; + t.start; + a_test(vm_msg); // tested parameter passing + if (match(0, vm_msg)) { setverdict(pass); } + else { setverdict(fail); } + } + + control { + execute(TC_Sem_050402_actual_parameters_119()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_120.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_120.ttcn new file mode 100644 index 00000000..0b0525bb --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_120.ttcn @@ -0,0 +1,40 @@ +/*************************************************** + ** @author STF 487 (updated by STF 521) + ** @version 0.0.2 + ** @purpose 1:5.4.2, verify that template in parameters can be used as out formal template parameters of altsteps + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to out formal template parameters shall be template variables, +// formal template parameters or references to elements of template variables or formal template +// parameters of structured types. + +module Sem_050402_actual_parameters_120 { + + type component GeneralComp { + timer t := 0.0; + } + + altstep a_test(out template integer p_val) runs on GeneralComp { + []t.timeout { + p_val := 0; + } + } + + function f_caller(in template integer p_val) runs on GeneralComp { + a_test(p_val); // tested parameter passing + if (match(0, p_val)) { setverdict(pass); } + else { setverdict(fail); } + } + + + testcase TC_Sem_050402_actual_parameters_120() runs on GeneralComp { + t.start; + f_caller(3); // this parameter passing is not a subject of the test + } + + control { + execute(TC_Sem_050402_actual_parameters_120()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_121.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_121.ttcn new file mode 100644 index 00000000..f6c5c38c --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_121.ttcn @@ -0,0 +1,42 @@ +/*************************************************** + ** @author STF 487 (updated by STF 521) + ** @version 0.0.2 + ** @purpose 1:5.4.2, verify that template out parameters can be used as out formal template parameters of altsteps + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to out formal template parameters shall be template variables, +// formal template parameters or references to elements of template variables or formal template +// parameters of structured types. + +module Sem_050402_actual_parameters_121 { + + type component GeneralComp { + timer t := 0.0; + } + + altstep a_test(out template integer p_val) runs on GeneralComp { + []t.timeout { + p_val := 0; + } + } + + function f_caller(out template integer p_val) runs on GeneralComp { + p_val := 4; // out parameter shall have a value before we can pass it to a function + a_test(p_val); // tested parameter passing + if (match(0 , p_val)) { setverdict(pass); } + else { setverdict(fail); } + } + + + testcase TC_Sem_050402_actual_parameters_121() runs on GeneralComp { + var template integer v_val; + t.start; + f_caller(v_val); // this parameter passing is not a subject of the test + } + + control { + execute(TC_Sem_050402_actual_parameters_121()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_122.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_122.ttcn new file mode 100644 index 00000000..b19de1eb --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_122.ttcn @@ -0,0 +1,41 @@ +/*************************************************** + ** @author STF 487 (updated by STF 521) + ** @version 0.0.2 + ** @purpose 1:5.4.2, verify that template inout parameters can be used as out formal template parameters of altsteps + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to out formal template parameters shall be template variables, +// formal template parameters or references to elements of template variables or formal template +// parameters of structured types. + +module Sem_050402_actual_parameters_122 { + + type component GeneralComp { + timer t := 0.0; + } + + altstep a_test(out template integer p_val) runs on GeneralComp { + []t.timeout { + p_val := 0; + } + } + + function f_caller(inout template integer p_val) runs on GeneralComp { + a_test(p_val); // tested parameter passing + if (match(0, p_val)) { setverdict(pass); } + else { setverdict(fail); } + } + + + testcase TC_Sem_050402_actual_parameters_122() runs on GeneralComp { + var template integer v_val := 5; + t.start; + f_caller(v_val); // this parameter passing is not a subject of the test + } + + control { + execute(TC_Sem_050402_actual_parameters_122()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_123.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_123.ttcn new file mode 100644 index 00000000..d643d111 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_123.ttcn @@ -0,0 +1,40 @@ +/*************************************************** + ** @author STF 487 (updated by STF 521) + ** @version 0.0.2 + ** @purpose 1:5.4.2, verify that template variable element reference can be used as out formal template parameters of altsteps + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to out formal template parameters shall be template variables, +// formal template parameters or references to elements of template variables or formal template +// parameters of structured types. + +module Sem_050402_actual_parameters_123 { + + type component GeneralComp { + timer t := 0.0; + } + + type record R { + integer field1 + } + + altstep a_test(out template integer p_val) runs on GeneralComp { + []t.timeout { + p_val := 5; + } + } + + testcase TC_Sem_050402_actual_parameters_123() runs on GeneralComp { + var template R v_val := { field1 := 10 }; + t.start; + a_test(v_val.field1); // tested parameter passing + if (match({ field1 := 5 }, v_val)) { setverdict(pass); } + else { setverdict(fail); } + } + + control { + execute(TC_Sem_050402_actual_parameters_123()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_124.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_124.ttcn new file mode 100644 index 00000000..9038f5af --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_124.ttcn @@ -0,0 +1,43 @@ +/*************************************************** + ** @author STF 487 (updated by STF 521) + ** @version 0.0.2 + ** @purpose 1:5.4.2, verify that reference to elements of formal template parameters can be used as out formal template parameters of altsteps + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to out formal template parameters shall be template variables, +// formal template parameters or references to elements of template variables or formal template +// parameters of structured types. + +module Sem_050402_actual_parameters_124 { + + type component GeneralComp { + timer t := 0.0; + } + + type record R { + integer field1 + } + + altstep a_test(out template integer p_val) runs on GeneralComp { + []t.timeout { + p_val := 5; + } + } + + function f_caller(in template R p_param) runs on GeneralComp { + a_test(p_param.field1); // tested parameter passing + if (match({ field1 := 5 }, p_param)) { setverdict(pass); } + else { setverdict(fail); } + } + + testcase TC_Sem_050402_actual_parameters_124() runs on GeneralComp { + t.start; + f_caller({field1 := 11 }); + } + + control { + execute(TC_Sem_050402_actual_parameters_124()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_125.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_125.ttcn new file mode 100644 index 00000000..16d50474 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_125.ttcn @@ -0,0 +1,27 @@ +/*************************************************** + ** @author STF 487 (updated by STF 521) + ** @version 0.0.2 + ** @purpose 1:5.4.2, verify that template variables can be used as out formal template parameters of test cases + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to out formal template parameters shall be template variables, +// formal template parameters or references to elements of template variables or formal template +// parameters of structured types. + +module Sem_050402_actual_parameters_125 { + + type component GeneralComp { + } + + testcase TC_Sem_050402_actual_parameters_125(out template integer p_val) runs on GeneralComp { + p_val := ?; + setverdict(pass); + } + + control { + var template integer vm_msg := 2; + execute(TC_Sem_050402_actual_parameters_125(vm_msg)); // tested parameter passing + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_126.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_126.ttcn new file mode 100644 index 00000000..ae1d3cd8 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_126.ttcn @@ -0,0 +1,30 @@ +/*************************************************** + ** @author STF 487 (updated by STF 521) + ** @version 0.0.2 + ** @purpose 1:5.4.2, verify that template in parameters can be used as out formal template parameters of test cases + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to out formal template parameters shall be template variables, +// formal template parameters or references to elements of template variables or formal template +// parameters of structured types. + +module Sem_050402_actual_parameters_126 { + + type component GeneralComp { + } + + testcase TC_Sem_050402_actual_parameters_126(out template integer p_val) runs on GeneralComp { + p_val := ?; + setverdict(pass); + } + + function f_caller(in template integer p_val) { + execute(TC_Sem_050402_actual_parameters_126(p_val)); // tested parameter passing + } + + control { + f_caller(3); // this parameter passing is not a subject of the test + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_127.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_127.ttcn new file mode 100644 index 00000000..ad353b12 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_127.ttcn @@ -0,0 +1,31 @@ +/*************************************************** + ** @author STF 487 (updated by STF 521) + ** @version 0.0.2 + ** @purpose 1:5.4.2, verify that template out parameters can be used as out formal template parameters of test cases + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to out formal template parameters shall be template variables, +// formal template parameters or references to elements of template variables or formal template +// parameters of structured types. + +module Sem_050402_actual_parameters_127 { + + type component GeneralComp { + } + + testcase TC_Sem_050402_actual_parameters_127(out template integer p_val) runs on GeneralComp { + p_val := ?; + setverdict(pass); + } + + function f_caller(out template integer p_val) { + execute(TC_Sem_050402_actual_parameters_127(p_val)); // tested parameter passing + } + + control { + var template integer vm_val; + f_caller(vm_val); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_128.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_128.ttcn new file mode 100644 index 00000000..bc0eb1fb --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_128.ttcn @@ -0,0 +1,31 @@ +/*************************************************** + ** @author STF 487 (updated by STF 521) + ** @version 0.0.2 + ** @purpose 1:5.4.2, verify that template inout parameters can be used as out formal template parameters of test cases + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to out formal template parameters shall be template variables, +// formal template parameters or references to elements of template variables or formal template +// parameters of structured types. + +module Sem_050402_actual_parameters_128 { + + type component GeneralComp { + } + + testcase TC_Sem_050402_actual_parameters_128(out template integer p_val) runs on GeneralComp { + p_val := ?; + setverdict(pass); + } + + function f_caller(inout template integer p_val) { + execute(TC_Sem_050402_actual_parameters_128(p_val)); // tested parameter passing + } + + control { + var template integer vm_val := 5; + f_caller(vm_val); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_129.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_129.ttcn new file mode 100644 index 00000000..4e416538 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_129.ttcn @@ -0,0 +1,31 @@ +/*************************************************** + ** @author STF 487 (updated by STF 521) + ** @version 0.0.2 + ** @purpose 1:5.4.2, verify that template variable element reference can be used as out formal template parameters of test cases + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to out formal template parameters shall be template variables, +// formal template parameters or references to elements of template variables or formal template +// parameters of structured types. + +module Sem_050402_actual_parameters_129 { + + type component GeneralComp { + } + + type record R { + integer field1 + } + + testcase TC_Sem_050402_actual_parameters_129(out template integer p_val) runs on GeneralComp { + p_val := ?; + setverdict(pass); + } + + control { + var template R v_val := { field1 := 10 }; + execute(TC_Sem_050402_actual_parameters_129(v_val.field1)); // tested parameter passing + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_130.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_130.ttcn new file mode 100644 index 00000000..ed914d95 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_130.ttcn @@ -0,0 +1,35 @@ +/*************************************************** + ** @author STF 487 (updated by STF 521) + ** @version 0.0.2 + ** @purpose 1:5.4.2, verify that reference to elements of formal template parameters can be used as out formal template parameters of test cases + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to out formal template parameters shall be template variables, +// formal template parameters or references to elements of template variables or formal template +// parameters of structured types. + +module Sem_050402_actual_parameters_130 { + + type component GeneralComp { + } + + type record R { + integer field1 + } + + testcase TC_Sem_050402_actual_parameters_130(out template integer p_val) runs on GeneralComp { + p_val := ?; + setverdict(pass); + } + + function f_caller(in template R p_param) { + execute(TC_Sem_050402_actual_parameters_130(p_param.field1)); // tested parameter passing + } + + control { + var template R mw_t := { field1 := 1 }; + f_caller(mw_t); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_131.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_131.ttcn new file mode 100644 index 00000000..7eac5229 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_131.ttcn @@ -0,0 +1,32 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that template variables can be used as inout formal template parameters of functions + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to inout formal template parameters shall be variables, +// template variables, formal value or template parameters (of in, inout or out +// parameterization) of the current scope or references to elements of (template) variables +// or formal (template) parameters of structured types. + +module Sem_050402_actual_parameters_131 { + + type component GeneralComp { + } + + function f_test(inout template integer p_val) { + if (match(2, p_val)) { setverdict(pass); } + else { setverdict(fail); } + } + + testcase TC_Sem_050402_actual_parameters_131() runs on GeneralComp { + var template integer vm_msg := 2; + f_test(vm_msg); // tested parameter passing + } + + control { + execute(TC_Sem_050402_actual_parameters_131()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_132.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_132.ttcn new file mode 100644 index 00000000..20656d35 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_132.ttcn @@ -0,0 +1,36 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that template in parameters can be used as inout formal template parameters of functions + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to inout formal template parameters shall be variables, +// template variables, formal value or template parameters (of in, inout or out +// parameterization) of the current scope or references to elements of (template) variables +// or formal (template) parameters of structured types. + +module Sem_050402_actual_parameters_132 { + + type component GeneralComp { + } + + function f_test(inout template integer p_val) { + if (match(3, p_val)) { setverdict(pass); } + else { setverdict(fail); } + } + + function f_caller(in template integer p_val) { + f_test(p_val); // tested parameter passing + } + + + testcase TC_Sem_050402_actual_parameters_132() runs on GeneralComp { + f_caller(3); // this parameter passing is not a subject of the test + } + + control { + execute(TC_Sem_050402_actual_parameters_132()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_133.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_133.ttcn new file mode 100644 index 00000000..0e506e0f --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_133.ttcn @@ -0,0 +1,38 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that template out parameters can be used as inout formal template parameters of functions + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to inout formal template parameters shall be variables, +// template variables, formal value or template parameters (of in, inout or out +// parameterization) of the current scope or references to elements of (template) variables +// or formal (template) parameters of structured types. + +module Sem_050402_actual_parameters_133 { + + type component GeneralComp { + } + + function f_test(inout template integer p_val) { + if (match(4, p_val)) { setverdict(pass); } + else { setverdict(fail); } + } + + function f_caller(out template integer p_val) { + p_val := 4; // out parameter shall have a value before we can pass it to a function + f_test(p_val); // tested parameter passing + } + + + testcase TC_Sem_050402_actual_parameters_133() runs on GeneralComp { + var template integer v_val; + f_caller(v_val); // this parameter passing is not a subject of the test + } + + control { + execute(TC_Sem_050402_actual_parameters_133()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_134.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_134.ttcn new file mode 100644 index 00000000..db1543f4 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_134.ttcn @@ -0,0 +1,37 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that template inout parameters can be used as inout formal template parameters of functions + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to inout formal template parameters shall be variables, +// template variables, formal value or template parameters (of in, inout or out +// parameterization) of the current scope or references to elements of (template) variables +// or formal (template) parameters of structured types. + +module Sem_050402_actual_parameters_134 { + + type component GeneralComp { + } + + function f_test(inout template integer p_val) { + if (match(5, p_val)) { setverdict(pass); } + else { setverdict(fail); } + } + + function f_caller(inout template integer p_val) { + f_test(p_val); // tested parameter passing + } + + + testcase TC_Sem_050402_actual_parameters_134() runs on GeneralComp { + var template integer v_val := 5; + f_caller(v_val); // this parameter passing is not a subject of the test + } + + control { + execute(TC_Sem_050402_actual_parameters_134()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_135.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_135.ttcn new file mode 100644 index 00000000..e1879a5d --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_135.ttcn @@ -0,0 +1,36 @@ +/*************************************************** + ** @author STF 487 (updated by STF 521) + ** @version 0.0.2 + ** @purpose 1:5.4.2, verify that template variable element reference can be used as inout formal template parameters of functions + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to inout formal template parameters shall be variables, +// template variables, formal value or template parameters (of in, inout or out +// parameterization) of the current scope or references to elements of (template) variables +// or formal (template) parameters of structured types. + +module Sem_050402_actual_parameters_135 { + + type component GeneralComp { + } + + type record R { + integer field1 + } + + function f_test(inout template(present) integer p_val) { + if (match(10, p_val)) { setverdict(pass); } + else { setverdict(fail); } + } + + testcase TC_Sem_050402_actual_parameters_135() runs on GeneralComp { + var template(present) R v_val := { field1 := 10 }; + f_test(v_val.field1); // tested parameter passing + } + + control { + execute(TC_Sem_050402_actual_parameters_135()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_136.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_136.ttcn new file mode 100644 index 00000000..d4f2ec58 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_136.ttcn @@ -0,0 +1,39 @@ +/*************************************************** + ** @author STF 487 (updated by STF 521) + ** @version 0.0.2 + ** @purpose 1:5.4.2, verify that reference to elements of formal value parameters can be used as inout formal template parameters of functions + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to inout formal template parameters shall be variables, +// template variables, formal value or template parameters (of in, inout or out +// parameterization) of the current scope or references to elements of (template) variables +// or formal (template) parameters of structured types. + +module Sem_050402_actual_parameters_136 { + + type component GeneralComp { + } + + type record R { + integer field1 + } + + function f_test(inout template(present) integer p_val) { + if (match(11, p_val)) { setverdict(pass); } + else { setverdict(fail); } + } + + function f_caller(in template(present) R p_param) { + f_test(p_param.field1); // tested parameter passing + } + + testcase TC_Sem_050402_actual_parameters_136() runs on GeneralComp { + f_caller({field1 := 11 }); + } + + control { + execute(TC_Sem_050402_actual_parameters_136()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_137.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_137.ttcn new file mode 100644 index 00000000..73007ebe --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_137.ttcn @@ -0,0 +1,36 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that template variables can be used as inout formal template parameters of altsteps + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to inout formal template parameters shall be variables, +// template variables, formal value or template parameters (of in, inout or out +// parameterization) of the current scope or references to elements of (template) variables +// or formal (template) parameters of structured types. + +module Sem_050402_actual_parameters_137 { + + type component GeneralComp { + timer t := 0.0; + } + + altstep a_test(inout template integer p_val) runs on GeneralComp { + []t.timeout { + if (match(2, p_val)) { setverdict(pass); } + else { setverdict(fail); } + } + } + + testcase TC_Sem_050402_actual_parameters_137() runs on GeneralComp { + var template integer vm_msg := 2; + t.start; + a_test(vm_msg); // tested parameter passing + } + + control { + execute(TC_Sem_050402_actual_parameters_137()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_138.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_138.ttcn new file mode 100644 index 00000000..552cc830 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_138.ttcn @@ -0,0 +1,40 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that template in parameters can be used as inout formal template parameters of altsteps + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to inout formal template parameters shall be variables, +// template variables, formal value or template parameters (of in, inout or out +// parameterization) of the current scope or references to elements of (template) variables +// or formal (template) parameters of structured types. + +module Sem_050402_actual_parameters_138 { + + type component GeneralComp { + timer t := 0.0; + } + + altstep a_test(inout template integer p_val) runs on GeneralComp { + []t.timeout { + if (match(3, p_val)) { setverdict(pass); } + else { setverdict(fail); } + } + } + + function f_caller(in template integer p_val) runs on GeneralComp { + a_test(p_val); // tested parameter passing + } + + + testcase TC_Sem_050402_actual_parameters_138() runs on GeneralComp { + t.start; + f_caller(3); // this parameter passing is not a subject of the test + } + + control { + execute(TC_Sem_050402_actual_parameters_138()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_139.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_139.ttcn new file mode 100644 index 00000000..1ffdac11 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_139.ttcn @@ -0,0 +1,42 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that template out parameters can be used as inout formal template parameters of altsteps + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to inout formal template parameters shall be variables, +// template variables, formal value or template parameters (of in, inout or out +// parameterization) of the current scope or references to elements of (template) variables +// or formal (template) parameters of structured types. + +module Sem_050402_actual_parameters_139 { + + type component GeneralComp { + timer t := 0.0; + } + + altstep a_test(inout template integer p_val) runs on GeneralComp { + []t.timeout { + if (match(4, p_val)) { setverdict(pass); } + else { setverdict(fail); } + } + } + + function f_caller(out template integer p_val) runs on GeneralComp { + p_val := 4; // out parameter shall have a value before we can pass it to a function + a_test(p_val); // tested parameter passing + } + + + testcase TC_Sem_050402_actual_parameters_139() runs on GeneralComp { + var template integer v_val; + t.start; + f_caller(v_val); // this parameter passing is not a subject of the test + } + + control { + execute(TC_Sem_050402_actual_parameters_139()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_140.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_140.ttcn new file mode 100644 index 00000000..819858b8 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_140.ttcn @@ -0,0 +1,41 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that template inout parameters can be used as inout formal template parameters of altsteps + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to inout formal template parameters shall be variables, +// template variables, formal value or template parameters (of in, inout or out +// parameterization) of the current scope or references to elements of (template) variables +// or formal (template) parameters of structured types. + +module Sem_050402_actual_parameters_140 { + + type component GeneralComp { + timer t := 0.0; + } + + altstep a_test(inout template integer p_val) runs on GeneralComp { + []t.timeout { + if (match(5, p_val)) { setverdict(pass); } + else { setverdict(fail); } + } + } + + function f_caller(inout template integer p_val) runs on GeneralComp { + a_test(p_val); // tested parameter passing + } + + + testcase TC_Sem_050402_actual_parameters_140() runs on GeneralComp { + var template integer v_val := 5; + t.start; + f_caller(v_val); // this parameter passing is not a subject of the test + } + + control { + execute(TC_Sem_050402_actual_parameters_140()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_141.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_141.ttcn new file mode 100644 index 00000000..c983bb01 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_141.ttcn @@ -0,0 +1,40 @@ +/*************************************************** + ** @author STF 487 (updated by STF 521) + ** @version 0.0.2 + ** @purpose 1:5.4.2, verify that template variable element reference can be used as inout formal template parameters of altsteps + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to inout formal template parameters shall be variables, +// template variables, formal value or template parameters (of in, inout or out +// parameterization) of the current scope or references to elements of (template) variables +// or formal (template) parameters of structured types. + +module Sem_050402_actual_parameters_141 { + + type component GeneralComp { + timer t := 0.0; + } + + type record R { + integer field1 + } + + altstep a_test(inout template(present) integer p_val) runs on GeneralComp { + []t.timeout { + if (match(10, p_val)) { setverdict(pass); } + else { setverdict(fail); } + } + } + + testcase TC_Sem_050402_actual_parameters_141() runs on GeneralComp { + var template(present) R v_val := { field1 := 10 }; + t.start; + a_test(v_val.field1); // tested parameter passing + } + + control { + execute(TC_Sem_050402_actual_parameters_141()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_142.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_142.ttcn new file mode 100644 index 00000000..2d526d85 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_142.ttcn @@ -0,0 +1,43 @@ +/*************************************************** + ** @author STF 487 (updated by STF 521) + ** @version 0.0.2 + ** @purpose 1:5.4.2, verify that reference to elements of formal value parameters can be used as inout formal template parameters of altsteps + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to inout formal template parameters shall be variables, +// template variables, formal value or template parameters (of in, inout or out +// parameterization) of the current scope or references to elements of (template) variables +// or formal (template) parameters of structured types. + +module Sem_050402_actual_parameters_142 { + + type component GeneralComp { + timer t := 0.0; + } + + type record R { + integer field1 + } + + altstep a_test(inout template(present) integer p_val) runs on GeneralComp { + []t.timeout { + if (match(11, p_val)) { setverdict(pass); } + else { setverdict(fail); } + } + } + + function f_caller(in template(present) R p_param) runs on GeneralComp { + a_test(p_param.field1); // tested parameter passing + } + + testcase TC_Sem_050402_actual_parameters_142() runs on GeneralComp { + t.start; + f_caller({field1 := 11 }); + } + + control { + execute(TC_Sem_050402_actual_parameters_142()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_143.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_143.ttcn new file mode 100644 index 00000000..37aeafe5 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_143.ttcn @@ -0,0 +1,28 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that template variables can be used as inout formal template parameters of test cases + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to inout formal template parameters shall be variables, +// template variables, formal value or template parameters (of in, inout or out +// parameterization) of the current scope or references to elements of (template) variables +// or formal (template) parameters of structured types. + +module Sem_050402_actual_parameters_143 { + + type component GeneralComp { + } + + testcase TC_Sem_050402_actual_parameters_143(inout template integer p_val) runs on GeneralComp { + if (match(2, p_val)) { setverdict(pass); } + else { setverdict(fail); } + } + + control { + var template integer vm_msg := 2; + execute(TC_Sem_050402_actual_parameters_143(vm_msg)); // tested parameter passing + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_144.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_144.ttcn new file mode 100644 index 00000000..fc576bb9 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_144.ttcn @@ -0,0 +1,31 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that template in parameters can be used as inout formal template parameters of test cases + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to inout formal template parameters shall be variables, +// template variables, formal value or template parameters (of in, inout or out +// parameterization) of the current scope or references to elements of (template) variables +// or formal (template) parameters of structured types. + +module Sem_050402_actual_parameters_144 { + + type component GeneralComp { + } + + testcase TC_Sem_050402_actual_parameters_144(inout template integer p_val) runs on GeneralComp { + if (match(3, p_val)) { setverdict(pass); } + else { setverdict(fail); } + } + + function f_caller(in template integer p_val) { + execute(TC_Sem_050402_actual_parameters_144(p_val)); // tested parameter passing + } + + control { + f_caller(3); // this parameter passing is not a subject of the test + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_145.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_145.ttcn new file mode 100644 index 00000000..86691ef8 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_145.ttcn @@ -0,0 +1,33 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that template out parameters can be used as inout formal template parameters of test cases + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to inout formal template parameters shall be variables, +// template variables, formal value or template parameters (of in, inout or out +// parameterization) of the current scope or references to elements of (template) variables +// or formal (template) parameters of structured types. + +module Sem_050402_actual_parameters_145 { + + type component GeneralComp { + } + + testcase TC_Sem_050402_actual_parameters_145(inout template integer p_val) runs on GeneralComp { + if (match(4, p_val)) { setverdict(pass); } + else { setverdict(fail); } + } + + function f_caller(out template integer p_val) { + p_val := 4; // out parameter shall have a value before we can pass it to a function + execute(TC_Sem_050402_actual_parameters_145(p_val)); // tested parameter passing + } + + control { + var template integer vm_val; + f_caller(vm_val); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_146.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_146.ttcn new file mode 100644 index 00000000..f9797e75 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_146.ttcn @@ -0,0 +1,32 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that template inout parameters can be used as inout formal template parameters of test cases + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to inout formal template parameters shall be variables, +// template variables, formal value or template parameters (of in, inout or out +// parameterization) of the current scope or references to elements of (template) variables +// or formal (template) parameters of structured types. + +module Sem_050402_actual_parameters_146 { + + type component GeneralComp { + } + + testcase TC_Sem_050402_actual_parameters_146(inout template integer p_val) runs on GeneralComp { + if (match(5, p_val)) { setverdict(pass); } + else { setverdict(fail); } + } + + function f_caller(inout template integer p_val) { + execute(TC_Sem_050402_actual_parameters_146(p_val)); // tested parameter passing + } + + control { + var template integer vm_val := 5; + f_caller(vm_val); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_147.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_147.ttcn new file mode 100644 index 00000000..5439bb03 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_147.ttcn @@ -0,0 +1,32 @@ +/*************************************************** + ** @author STF 487 (updated by STF 521) + ** @version 0.0.2 + ** @purpose 1:5.4.2, verify that template variable element reference can be used as inout formal template parameters of test cases + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to inout formal template parameters shall be variables, +// template variables, formal value or template parameters (of in, inout or out +// parameterization) of the current scope or references to elements of (template) variables +// or formal (template) parameters of structured types. + +module Sem_050402_actual_parameters_147 { + + type component GeneralComp { + } + + type record R { + integer field1 + } + + testcase TC_Sem_050402_actual_parameters_147(inout template(present) integer p_val) runs on GeneralComp { + if (match(10, p_val)) { setverdict(pass); } + else { setverdict(fail); } + } + + control { + var template(present) R v_val := { field1 := 10 }; + execute(TC_Sem_050402_actual_parameters_147(v_val.field1)); // tested parameter passing + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_148.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_148.ttcn new file mode 100644 index 00000000..0a00df3e --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_148.ttcn @@ -0,0 +1,35 @@ +/*************************************************** + ** @author STF 487 (updated by STF 521) + ** @version 0.0.2 + ** @purpose 1:5.4.2, verify that reference to elements of formal value parameters can be used as inout formal template parameters of test cases + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to inout formal template parameters shall be variables, +// template variables, formal value or template parameters (of in, inout or out +// parameterization) of the current scope or references to elements of (template) variables +// or formal (template) parameters of structured types. + +module Sem_050402_actual_parameters_148 { + + type component GeneralComp { + } + + type record R { + integer field1 + } + + testcase TC_Sem_050402_actual_parameters_148(inout template(present) integer p_val) runs on GeneralComp { + if (match(11, p_val)) { setverdict(pass); } + else { setverdict(fail); } + } + + function f_caller(in template(present) R p_param) { + execute(TC_Sem_050402_actual_parameters_148(p_param.field1)); // tested parameter passing + } + + control { + f_caller({field1 := 11 }); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_149.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_149.ttcn new file mode 100644 index 00000000..921cb7ba --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_149.ttcn @@ -0,0 +1,45 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that referencing rules are correctly applied to actual parameters of in formal value parameters + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// When actual parameters that are passed to in formal value or template parameters +// contain a value or template reference, rules for using references on the right hand +// side of assignments apply. + +module Sem_050402_actual_parameters_149 { + + type component GeneralComp { + } + + type record R { + integer field1, + record { + integer subfield1, + integer subfield2 + } field2 optional + } + + function f_test(in integer p_val) { + if (p_val == 2) { setverdict(pass); } + else { setverdict(fail); } + } + + testcase TC_Sem_050402_actual_parameters_149() runs on GeneralComp { + var R v_rec := { + field1 := 1, + field2 := { + subfield1 := 2, + subfield2 := 3 + } + } + f_test(v_rec.field2.subfield1); // tested parameter passing + } + + control { + execute(TC_Sem_050402_actual_parameters_149()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_150.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_150.ttcn new file mode 100644 index 00000000..5183ea7b --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_150.ttcn @@ -0,0 +1,43 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that referencing rules are correctly applied to actual parameters of in formal template parameters + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// When actual parameters that are passed to in formal value or template parameters +// contain a value or template reference, rules for using references on the right hand +// side of assignments apply. + +module Sem_050402_actual_parameters_150 { + + type component GeneralComp { + } + + type record R { + integer field1, + record { + integer subfield1, + integer subfield2 + } field2 optional + } + + template R mw_rec := { + field1 := 1, + field2 := ? + } + + function f_test(in template integer p_val) { + if (match(255, p_val)) { setverdict(pass); } + else { setverdict(fail); } + } + + testcase TC_Sem_050402_actual_parameters_150() runs on GeneralComp { + f_test(mw_rec.field2.subfield1); // tested parameter passing (using referencing rules specified at 15.6.2) + } + + control { + execute(TC_Sem_050402_actual_parameters_150()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_151.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_151.ttcn new file mode 100644 index 00000000..dd79562d --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_151.ttcn @@ -0,0 +1,47 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that referencing rules are correctly applied to actual parameters of out formal value parameters + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// When actual parameters that are passed to inout and out formal value or template +// parameters contain a value or template reference, rules for using references on +// the left hand side of assignments apply. + +module Sem_050402_actual_parameters_151 { + + type component GeneralComp { + } + + type record R { + integer field1, + record { + integer subfield1, + integer subfield2 + } field2 optional + } + + function f_test(out integer p_val) { + p_val := 10; + } + + testcase TC_Sem_050402_actual_parameters_151() runs on GeneralComp { + var R v_rec := { + field1 := 1, + field2 := { + subfield1 := 2, + subfield2 := 3 + } + }; + f_test(v_rec.field2.subfield1); // tested parameter passing + if (v_rec.field2.subfield1 == 10) { setverdict(pass); } + else { setverdict(fail); } + + } + + control { + execute(TC_Sem_050402_actual_parameters_151()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_152.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_152.ttcn new file mode 100644 index 00000000..e8673279 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_152.ttcn @@ -0,0 +1,44 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that referencing rules are correctly applied to actual parameters of out formal template parameters + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// When actual parameters that are passed to inout and out formal value or template +// parameters contain a value or template reference, rules for using references on +// the left hand side of assignments apply. + +module Sem_050402_actual_parameters_152 { + + type component GeneralComp { + } + + type record R { + integer field1, + record { + integer subfield1, + integer subfield2 + } field2 optional + } + + function f_test(out template integer p_val) { + p_val := 10; + } + + testcase TC_Sem_050402_actual_parameters_152() runs on GeneralComp { + var template R v_rec := { + field1 := 1, + field2 := ? + }; + f_test(v_rec.field2.subfield1); // tested parameter passing (using referencing rules specified at 15.6.2) + if (match(valueof(v_rec.field2.subfield1), 10) and match(0, v_rec.field2.subfield2)) { setverdict(pass); } + else { setverdict(fail); } + + } + + control { + execute(TC_Sem_050402_actual_parameters_152()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_153.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_153.ttcn new file mode 100644 index 00000000..4a2b45da --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_153.ttcn @@ -0,0 +1,48 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that referencing rules are correctly applied to actual parameters of inout formal value parameters + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// When actual parameters that are passed to inout and out formal value or template +// parameters contain a value or template reference, rules for using references on +// the left hand side of assignments apply. + +module Sem_050402_actual_parameters_153 { + + type component GeneralComp { + } + + type record R { + integer field1, + record { + integer subfield1, + integer subfield2 + } field2 optional + } + + function f_test(inout integer p_val) { + if (p_val == 2) { setverdict(pass); } + else { setverdict(fail); } + p_val := 10; + } + + testcase TC_Sem_050402_actual_parameters_153() runs on GeneralComp { + var R v_rec := { + field1 := 1, + field2 := { + subfield1 := 2, + subfield2 := 3 + } + }; + f_test(v_rec.field2.subfield1); // tested parameter passing + if (v_rec.field2.subfield1 == 10) { setverdict(pass); } + else { setverdict(fail); } + } + + control { + execute(TC_Sem_050402_actual_parameters_153()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_154.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_154.ttcn new file mode 100644 index 00000000..7e1c8f0b --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_154.ttcn @@ -0,0 +1,46 @@ +/*************************************************** + ** @author STF 487 (updated by STF 521) + ** @version 0.0.2 + ** @purpose 1:5.4.2, verify that referencing rules are correctly applied to actual parameters of inout formal template parameters + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// When actual parameters that are passed to inout and out formal value or template +// parameters contain a value or template reference, rules for using references on +// the left hand side of assignments apply. + +module Sem_050402_actual_parameters_154 { + + type component GeneralComp { + } + + type record R { + integer field1, + record { + integer subfield1, + integer subfield2 + } field2 optional + } + + function f_test(inout template(present) integer p_val) { + if (match(25, p_val)) { setverdict(pass); } + else { setverdict(fail); } + p_val := 10; + } + + testcase TC_Sem_050402_actual_parameters_154() runs on GeneralComp { + var template(present) R v_rec := { + field1 := 1, + field2 := ? + }; + f_test(v_rec.field2.subfield1); // tested parameter passing (using referencing rules specified at 15.6.2) + if (match(valueof(v_rec.field2.subfield1), 10) and match(0, v_rec.field2.subfield2)) { setverdict(pass); } + else { setverdict(fail); } + + } + + control { + execute(TC_Sem_050402_actual_parameters_154()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_155.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_155.ttcn new file mode 100644 index 00000000..879a1cee --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_155.ttcn @@ -0,0 +1,35 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that out formal parameters are passed to actual parameter in correct (list notation) + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// The values of out formal parameters are passed to the actual parameters in the same +// order as is the order of formal parameters in the definition of the parameterized +// TTCN-3 object. + +module Sem_050402_actual_parameters_155 { + + type component GeneralComp { + } + + function f_test(out integer p_val1, out integer p_val2, out integer p_val3) { + p_val1 := 1; + p_val2 := 2; + p_val3 := 3; + } + + testcase TC_Sem_050402_actual_parameters_155() runs on GeneralComp { + var integer v_val; + f_test(v_val, v_val, v_val); // tested parameter passing + if (v_val == 3) { setverdict(pass); } + else { setverdict(fail); } + + } + + control { + execute(TC_Sem_050402_actual_parameters_155()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_156.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_156.ttcn new file mode 100644 index 00000000..05ab10d7 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_156.ttcn @@ -0,0 +1,35 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that out formal parameters are passed to actual parameter in correct (assignment notation) + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// The values of out formal parameters are passed to the actual parameters in the same +// order as is the order of formal parameters in the definition of the parameterized +// TTCN-3 object. + +module Sem_050402_actual_parameters_156 { + + type component GeneralComp { + } + + function f_test(out integer p_val1, out integer p_val2, out integer p_val3) { + p_val1 := 1; + p_val2 := 2; + p_val3 := 3; + } + + testcase TC_Sem_050402_actual_parameters_156() runs on GeneralComp { + var integer v_val; + f_test(p_val3 := v_val, p_val2 := v_val, p_val1 := v_val); // tested parameter passing + if (v_val == 3) { setverdict(pass); } + else { setverdict(fail); } + + } + + control { + execute(TC_Sem_050402_actual_parameters_156()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_157.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_157.ttcn new file mode 100644 index 00000000..3a078c54 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_157.ttcn @@ -0,0 +1,32 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that component timers can be passed to timer parameters + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to formal timer parameters shall be component +// timers, local timers or formal timer parameters of the current scope. + +module Sem_050402_actual_parameters_157 { + + type component GeneralComp { + timer tc_tmr := 5.0; + } + + function f_test(timer t_par) { + t_par.stop; + } + + testcase TC_Sem_050402_actual_parameters_157() runs on GeneralComp { + tc_tmr.start; + f_test(tc_tmr); // tested parameter passing + if (not tc_tmr.running) { setverdict(pass); } + else { setverdict(fail); } + } + + control { + execute(TC_Sem_050402_actual_parameters_157()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_158.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_158.ttcn new file mode 100644 index 00000000..2f29bbb4 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_158.ttcn @@ -0,0 +1,32 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that component timers can be passed to timer parameters + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to formal timer parameters shall be component +// timers, local timers or formal timer parameters of the current scope. + +module Sem_050402_actual_parameters_158 { + + type component GeneralComp { + } + + function f_test(timer t_par) { + t_par.stop; + } + + testcase TC_Sem_050402_actual_parameters_158() runs on GeneralComp { + timer t_tmr := 5.0; + t_tmr.start; + f_test(t_tmr); // tested parameter passing + if (not t_tmr.running) { setverdict(pass); } + else { setverdict(fail); } + } + + control { + execute(TC_Sem_050402_actual_parameters_158()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_159.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_159.ttcn new file mode 100644 index 00000000..73fb6a8c --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_159.ttcn @@ -0,0 +1,36 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that timer parameters can be passed to timer parameters + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to formal timer parameters shall be component +// timers, local timers or formal timer parameters of the current scope. + +module Sem_050402_actual_parameters_159 { + + type component GeneralComp { + } + + function f_test(timer t_par) { + t_par.stop; + } + + function f_caller(timer t_par) { + f_test(t_par); // tested parameter passing + } + + testcase TC_Sem_050402_actual_parameters_159() runs on GeneralComp { + timer t_tmr := 5.0; + t_tmr.start; + f_caller(t_tmr); // this parameter passing is not a subject of the test + if (not t_tmr.running) { setverdict(pass); } + else { setverdict(fail); } + } + + control { + execute(TC_Sem_050402_actual_parameters_159()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_160.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_160.ttcn new file mode 100644 index 00000000..9e4d9b05 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_160.ttcn @@ -0,0 +1,35 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that component ports can be passed to port parameters + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to formal port parameters shall be component +// ports or formal port parameters of the current scope. + +module Sem_050402_actual_parameters_160 { + + type port IntPort message { + inout integer; + } + + type component GeneralComp { + port IntPort p; + } + + function f_test(IntPort p_port) { + p_port.stop; + } + + testcase TC_Sem_050402_actual_parameters_160() runs on GeneralComp { + f_test(p); // tested parameter passing + if (p.checkstate("Stopped")) { setverdict(pass); } + else { setverdict(fail); } + } + + control { + execute(TC_Sem_050402_actual_parameters_160()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_161.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_161.ttcn new file mode 100644 index 00000000..a1c6153a --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_161.ttcn @@ -0,0 +1,39 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that port parameters can be passed to port parameters + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to formal port parameters shall be component +// ports or formal port parameters of the current scope. + +module Sem_050402_actual_parameters_161 { + + type port IntPort message { + inout integer; + } + + type component GeneralComp { + port IntPort p; + } + + function f_test(IntPort p_port) { + p_port.stop; + } + + function f_caller(IntPort p_port) { + f_test(p_port); // tested parameter passing + } + + testcase TC_Sem_050402_actual_parameters_161() runs on GeneralComp { + f_test(p); // this component port passing is not a subject of this test + if (p.checkstate("Stopped")) { setverdict(pass); } + else { setverdict(fail); } + } + + control { + execute(TC_Sem_050402_actual_parameters_161()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_162.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_162.ttcn new file mode 100644 index 00000000..62609025 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_162.ttcn @@ -0,0 +1,29 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that actual parameters override default values + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// When a formal parameter has been defined with a default value or template, +// respectively, then it is not necessary to provide an actual parameter. + +module Sem_050402_actual_parameters_162 { + + type component GeneralComp { + } + + function f_test(integer p_val := 5) { + if (p_val != 5) { setverdict(pass); } + else { setverdict(fail); } + } + + testcase TC_Sem_050402_actual_parameters_162() runs on GeneralComp { + f_test(0); // tested parameter passing + } + + control { + execute(TC_Sem_050402_actual_parameters_162()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_163.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_163.ttcn new file mode 100644 index 00000000..e5313bf7 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_163.ttcn @@ -0,0 +1,29 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that default values are used if actual parameters are missing + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// When a formal parameter has been defined with a default value or template, +// respectively, then it is not necessary to provide an actual parameter. + +module Sem_050402_actual_parameters_163 { + + type component GeneralComp { + } + + function f_test(integer p_val := 5) { + if (p_val == 5) { setverdict(pass); } + else { setverdict(fail); } + } + + testcase TC_Sem_050402_actual_parameters_163() runs on GeneralComp { + f_test(-); // tested parameter passing + } + + control { + execute(TC_Sem_050402_actual_parameters_163()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_164.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_164.ttcn new file mode 100644 index 00000000..a5260c1c --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_164.ttcn @@ -0,0 +1,29 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that actual parameters override default templates + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// When a formal parameter has been defined with a default value or template, +// respectively, then it is not necessary to provide an actual parameter. + +module Sem_050402_actual_parameters_164 { + + type component GeneralComp { + } + + function f_test(template integer p_val := (0..5)) { + if (match(10, p_val)) { setverdict(pass); } + else { setverdict(fail); } + } + + testcase TC_Sem_050402_actual_parameters_164() runs on GeneralComp { + f_test(?); // tested parameter passing + } + + control { + execute(TC_Sem_050402_actual_parameters_164()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_165.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_165.ttcn new file mode 100644 index 00000000..46afed1b --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_165.ttcn @@ -0,0 +1,29 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that default templates are used if actual parameters are missing + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// When a formal parameter has been defined with a default value or template, +// respectively, then it is not necessary to provide an actual parameter. + +module Sem_050402_actual_parameters_165 { + + type component GeneralComp { + } + + function f_test(template integer p_val := (0..5)) { + if (match(3, p_val)) { setverdict(pass); } + else { setverdict(fail); } + } + + testcase TC_Sem_050402_actual_parameters_165() runs on GeneralComp { + f_test(-); // tested parameter passing + } + + control { + execute(TC_Sem_050402_actual_parameters_165()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_166.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_166.ttcn new file mode 100644 index 00000000..ae3cdc03 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_166.ttcn @@ -0,0 +1,47 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that actual parameters are evaluated in order of their appearance (list notation) + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// The actual parameters are evaluated in the order of their appearance. + +module Sem_050402_actual_parameters_166 { + + type component GeneralComp { + var integer vc_counter := 0; + } + + function f_eval1() runs on GeneralComp return integer { + if (vc_counter == 0) + { + setverdict(pass); + vc_counter := vc_counter + 1; + } + else { setverdict(fail); } + return vc_counter; + } + + function f_eval2() runs on GeneralComp return integer { + if (vc_counter == 1) + { + setverdict(pass); + vc_counter := vc_counter + 1; + } + else { setverdict(fail); } + return vc_counter; + } + + function f_test(integer p_par1, integer p_par2) { + } + + testcase TC_Sem_050402_actual_parameters_166() runs on GeneralComp { + f_test(f_eval1(), f_eval2()); // tested feature: f_eval1 shall be called before f_eval2 + } + + control { + execute(TC_Sem_050402_actual_parameters_166()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_167.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_167.ttcn new file mode 100644 index 00000000..ad48b113 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_167.ttcn @@ -0,0 +1,49 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that actual parameters are evaluated in order of their appearance (assignment notation) + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// The actual parameters are evaluated in the order of their appearance. + +module Sem_050402_actual_parameters_167 { + + type component GeneralComp { + var integer vc_counter := 0; + } + + function f_eval1() runs on GeneralComp return integer { + log("f_eval1"); + if (vc_counter == 0) + { + setverdict(pass); + vc_counter := vc_counter + 1; + } + else { setverdict(fail); } + return vc_counter; + } + + function f_eval2() runs on GeneralComp return integer { + log("f_eval2"); + if (vc_counter == 1) + { + setverdict(pass); + vc_counter := vc_counter + 1; + } + else { setverdict(fail); } + return vc_counter; + } + + function f_test(integer p_par1, integer p_par2) { + } + + testcase TC_Sem_050402_actual_parameters_167() runs on GeneralComp { + f_test(p_par2 := f_eval1(), p_par1 := f_eval2()); // tested feature: f_eval1 shall be called before f_eval2 + } + + control { + execute(TC_Sem_050402_actual_parameters_167()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_168.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_168.ttcn new file mode 100644 index 00000000..248307b7 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_168.ttcn @@ -0,0 +1,37 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that rules for referencing are applied to actual paremeters before passing to out formal parameters + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Before passing the actual parameter, the rules for referencing the element on +// the left hand side of assignments are applied, expanding the structured value +// so that the referenced element becomes accessible (see clauses 6.2 and 15.6 for +// more details). + +module Sem_050402_actual_parameters_168 { + + type component GeneralComp { + var integer vc_index := 0; + } + + type record of integer RI; + + function f_test(out integer p_par1) runs on GeneralComp { + vc_index := 1; + p_par1 := 10; + } + + testcase TC_Sem_050402_actual_parameters_168() runs on GeneralComp { + var RI v_ri := { 1, 2 } + f_test(v_ri[vc_index]); // tested parameter passing + if (v_ri == { 10, 2 }) { setverdict(pass); } + else { setverdict(fail); } + } + + control { + execute(TC_Sem_050402_actual_parameters_168()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_169.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_169.ttcn new file mode 100644 index 00000000..eabb28d3 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_169.ttcn @@ -0,0 +1,37 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that rules for referencing are applied to actual paremeters before passing to inout formal parameters + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Before passing the actual parameter, the rules for referencing the element on +// the left hand side of assignments are applied, expanding the structured value +// so that the referenced element becomes accessible (see clauses 6.2 and 15.6 for +// more details). + +module Sem_050402_actual_parameters_169 { + + type component GeneralComp { + var integer vc_index := 0; + } + + type record of integer RI; + + function f_test(inout integer p_par1) runs on GeneralComp { + vc_index := 1; + p_par1 := 10; + } + + testcase TC_Sem_050402_actual_parameters_169() runs on GeneralComp { + var RI v_ri := { 1, 2 } + f_test(v_ri[vc_index]); // tested parameter passing + if (v_ri == { 10, 2 }) { setverdict(pass); } + else { setverdict(fail); } + } + + control { + execute(TC_Sem_050402_actual_parameters_169()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_170.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_170.ttcn new file mode 100644 index 00000000..dea38686 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_170.ttcn @@ -0,0 +1,37 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that default parameters are evaluated in order of the formal parameter list (list notation) + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// If for some formal parameters no actual parameter has been provided, their default +// values are taken and evaluated in the order of the formal parameter list. + +module Sem_050402_actual_parameters_170 { + + type component GeneralComp { + } + + function f_eval1() return integer { + setverdict(pass); + return 1; + } + + function f_eval2() return integer { + if (getverdict != pass) { setverdict(fail); } // if f_eval was called, the verdict would be already pass + return 2; + } + + function f_test(integer p_par1, integer p_par2 := f_eval1(), integer p_par3 := f_eval2()) { + } + + testcase TC_Sem_050402_actual_parameters_170() runs on GeneralComp { + f_test(0, -, -); // tested feature: f_eval1 shall be called before f_eval2 + } + + control { + execute(TC_Sem_050402_actual_parameters_170()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_171.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_171.ttcn new file mode 100644 index 00000000..46a46ba0 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_171.ttcn @@ -0,0 +1,37 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that default parameters are evaluated in order of the formal parameter list (assignment notation) + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// If for some formal parameters no actual parameter has been provided, their default +// values are taken and evaluated in the order of the formal parameter list. + +module Sem_050402_actual_parameters_171 { + + type component GeneralComp { + } + + function f_eval1() return integer { + setverdict(pass); + return 1; + } + + function f_eval2() return integer { + if (getverdict != pass) { setverdict(fail); } // if f_eval was called, the verdict would be already pass + return 2; + } + + function f_test(integer p_par1 := f_eval1(), integer p_par2, integer p_par3 := f_eval2()) { + } + + testcase TC_Sem_050402_actual_parameters_171() runs on GeneralComp { + f_test(p_par2 := 0); // tested feature: f_eval1 shall be called before f_eval2 + } + + control { + execute(TC_Sem_050402_actual_parameters_171()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_172.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_172.ttcn new file mode 100644 index 00000000..3219ba29 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_172.ttcn @@ -0,0 +1,28 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that it is possible to use parametrized template with no parentheses if all parameters have default values + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// The empty brackets for instances of parameterized templates that have only parameters +// with default values are optional when no actual parameters are provided, i.e. all +// formal parameters use their default values. + +module Sem_050402_actual_parameters_172 { + + type component GeneralComp { + } + + template integer mw_int (integer p_val := 10):= (0..p_val); + + testcase TC_Sem_050402_actual_parameters_172() runs on GeneralComp { + if (match(5, mw_int)) { setverdict(pass); } + else { setverdict(fail); } + } + + control { + execute(TC_Sem_050402_actual_parameters_172()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_173.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_173.ttcn new file mode 100644 index 00000000..f04a4db2 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_173.ttcn @@ -0,0 +1,28 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that it is possible to use parametrized template with empty parentheses + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// The empty brackets for instances of parameterized templates that have only parameters +// with default values are optional when no actual parameters are provided, i.e. all +// formal parameters use their default values. + +module Sem_050402_actual_parameters_173 { + + type component GeneralComp { + } + + template integer mw_int (integer p_val := 10):= (0..p_val); + + testcase TC_Sem_050402_actual_parameters_173() runs on GeneralComp { + if (match(5, mw_int())) { setverdict(pass); } + else { setverdict(fail); } + } + + control { + execute(TC_Sem_050402_actual_parameters_173()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_174.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_174.ttcn new file mode 100644 index 00000000..a1512611 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_174.ttcn @@ -0,0 +1,29 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that actual parameter values override default values + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// The actual parameter of a formal parameter with default value can be skipped by using +// dash "-" as actual parameter. + +module Sem_050402_actual_parameters_174 { + + type component GeneralComp { + } + + function f_test (integer p_val := 10) { + if (p_val != 10) { setverdict(pass); } + else { setverdict(fail); } + } + + testcase TC_Sem_050402_actual_parameters_174() runs on GeneralComp { + f_test(0); + } + + control { + execute(TC_Sem_050402_actual_parameters_174()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_175.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_175.ttcn new file mode 100644 index 00000000..3735f4a6 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_175.ttcn @@ -0,0 +1,29 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that actual parameters in the beginning of list notation can be skipped + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// The actual parameter of a formal parameter with default value can be skipped by using +// dash "-" as actual parameter. + +module Sem_050402_actual_parameters_175 { + + type component GeneralComp { + } + + function f_test (integer p_val1 := 10, integer p_val2) { + if (match(p_val1, 10) and match(p_val2, 2)) { setverdict(pass); } + else { setverdict(fail); } + } + + testcase TC_Sem_050402_actual_parameters_175() runs on GeneralComp { + f_test(-, 2); + } + + control { + execute(TC_Sem_050402_actual_parameters_175()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_176.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_176.ttcn new file mode 100644 index 00000000..4d8626db --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_176.ttcn @@ -0,0 +1,29 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that multiple actual parameters of list notation can be skipped + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// The actual parameter of a formal parameter with default value can be skipped by using +// dash "-" as actual parameter. + +module Sem_050402_actual_parameters_176 { + + type component GeneralComp { + } + + function f_test (integer p_val1, integer p_val2 := 20, integer p_val3, integer p_val4 := 40, integer p_val5) { + if ( match(p_val1, 1) and match(p_val2, 20) and match(p_val3, 3) and match(p_val4, 40) and match(p_val5, 5)) { setverdict(pass); } + else { setverdict(fail); } + } + + testcase TC_Sem_050402_actual_parameters_176() runs on GeneralComp { + f_test(1, -, 3, -, 5); + } + + control { + execute(TC_Sem_050402_actual_parameters_176()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_177.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_177.ttcn new file mode 100644 index 00000000..8c76eadb --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_177.ttcn @@ -0,0 +1,29 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that actual parameters at the end of list notation can be explicitly skipped + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// The actual parameter of a formal parameter with default value can be skipped by using +// dash "-" as actual parameter. + +module Sem_050402_actual_parameters_177 { + + type component GeneralComp { + } + + function f_test (integer p_val1, integer p_val2 := 20) { + if (match(p_val1, 1) and match(p_val2, 20)) { setverdict(pass); } + else { setverdict(fail); } + } + + testcase TC_Sem_050402_actual_parameters_177() runs on GeneralComp { + f_test(1, -); + } + + control { + execute(TC_Sem_050402_actual_parameters_177()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_178.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_178.ttcn new file mode 100644 index 00000000..a10977ef --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_178.ttcn @@ -0,0 +1,30 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that missing actual parameters at the end of list notation are considered to be skipped (single parameter) + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// An actual parameter can also be skipped by just leaving it out if no other actual +// parameter follows in the actual parameter list - either because the parameter is +// last or because all following formal parameters have default values and are left out. + +module Sem_050402_actual_parameters_178 { + + type component GeneralComp { + } + + function f_test (integer p_val1, integer p_val2 := 20) { + if (match(p_val1, 1) and match(p_val2, 20)) { setverdict(pass); } + else { setverdict(fail); } + } + + testcase TC_Sem_050402_actual_parameters_178() runs on GeneralComp { + f_test(1); + } + + control { + execute(TC_Sem_050402_actual_parameters_178()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_179.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_179.ttcn new file mode 100644 index 00000000..bab24a94 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_179.ttcn @@ -0,0 +1,31 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that missing actual parameters at the end of list notation are considered to be skipped (multiple parameter) + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// An actual parameter can also be skipped by just leaving it out if no other actual +// parameter follows in the actual parameter list - either because the parameter is +// last or because all following formal parameters have default values and are left out. + +module Sem_050402_actual_parameters_179 { + + type component GeneralComp { + var integer vc_counter := 0; + } + + function f_test (integer p_val1, integer p_val2 := 20, integer p_val3 := 30, integer p_val4 := 40) { + if (match(p_val1, 1) and match(p_val2, 20) and match(p_val3, 30) and match(p_val4, 40)) { setverdict(pass); } + else { setverdict(fail); } + } + + testcase TC_Sem_050402_actual_parameters_179() runs on GeneralComp { + f_test(1, -); + } + + control { + execute(TC_Sem_050402_actual_parameters_179()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_180.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_180.ttcn new file mode 100644 index 00000000..15d8903b --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_180.ttcn @@ -0,0 +1,28 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that assignment notation containing all parameters in declaration order is accepted + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// For each formal parameter without default value, there shall be an actual parameter. + +module Sem_050402_actual_parameters_180 { + + type component GeneralComp { + } + + function f_test (integer p_val1, charstring p_val2, integer p_val3) { + if ( match(p_val1, 1) and match(p_val2, "test") and match(p_val3, 3)) { setverdict(pass); } + else { setverdict(fail); } + } + + testcase TC_Sem_050402_actual_parameters_180() runs on GeneralComp { + f_test(p_val1 := 1, p_val2 := "test", p_val3 := 3); + } + + control { + execute(TC_Sem_050402_actual_parameters_180()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_181.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_181.ttcn new file mode 100644 index 00000000..de1c866a --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_181.ttcn @@ -0,0 +1,28 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that assignment notation containing all parameters in random order is accepted + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// For each formal parameter without default value, there shall be an actual parameter. + +module Sem_050402_actual_parameters_181 { + + type component GeneralComp { + } + + function f_test (integer p_val1, charstring p_val2, integer p_val3) { + if ( match(p_val1, 1) and match(p_val2, "test") and match(p_val3, 3)) { setverdict(pass); } + else { setverdict(fail); } + } + + testcase TC_Sem_050402_actual_parameters_181() runs on GeneralComp { + f_test(p_val3 := 3, p_val1 := 1, p_val2 := "test"); + } + + control { + execute(TC_Sem_050402_actual_parameters_181()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_182.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_182.ttcn new file mode 100644 index 00000000..9b1390b2 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_182.ttcn @@ -0,0 +1,29 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that assignment notation can omit parameters with default value + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// In order to use the default value of a formal parameter, no assignment for this +// specific parameter shall be provided. + +module Sem_050402_actual_parameters_182 { + + type component GeneralComp { + } + + function f_test (integer p_val1 := 10, charstring p_val2, integer p_val3) { + if ( match(p_val1, 10) and match(p_val2, "test") and match(p_val3, 3)) { setverdict(pass); } + else { setverdict(fail); } + } + + testcase TC_Sem_050402_actual_parameters_182() runs on GeneralComp { + f_test(p_val2 := "test", p_val3 := 3); + } + + control { + execute(TC_Sem_050402_actual_parameters_182()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_183.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_183.ttcn new file mode 100644 index 00000000..e1e4efe7 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_183.ttcn @@ -0,0 +1,40 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that compatible values can be passed to in formal parameters + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// The type of each actual parameter shall be compatible with the type of each +// corresponding formal parameter. + +module Sem_050402_actual_parameters_183 { + + type component GeneralComp { + } + + type record R1 { + integer field1, + integer field2 optional + } + + type record R2 { + integer elem1, + integer elem2 optional + } + + function f_test (R1 p_val) { + if (p_val == { field1 := 1, field2 := 2 }) { setverdict(pass); } + else { setverdict(fail); } + } + + testcase TC_Sem_050402_actual_parameters_183() runs on GeneralComp { + var R2 v_rec := { 1, 2 }; + f_test(v_rec); + } + + control { + execute(TC_Sem_050402_actual_parameters_183()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_184.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_184.ttcn new file mode 100644 index 00000000..67bf310f --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_184.ttcn @@ -0,0 +1,42 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that compatible values can be passed from out formal parameters + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// The type of each actual parameter shall be compatible with the type of each +// corresponding formal parameter. + +module Sem_050402_actual_parameters_184 { + + type component GeneralComp { + } + + type record R1 { + integer field1, + integer field2 optional + } + + type record R2 { + integer elem1, + integer elem2 optional + } + + function f_test (out R1 p_val) { + p_val.field1 := 1; + p_val.field2 := 2; + } + + testcase TC_Sem_050402_actual_parameters_184() runs on GeneralComp { + var R2 v_rec; + f_test(v_rec); + if (v_rec == { elem1 := 1, elem2 := 2 }) { setverdict(pass); } + else { setverdict(fail); } + } + + control { + execute(TC_Sem_050402_actual_parameters_184()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_185.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_185.ttcn new file mode 100644 index 00000000..80355dce --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_185.ttcn @@ -0,0 +1,29 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that compatible templates can be passed to template parameters with omit restriction + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Actual parameters passed to restricted formal template parameters shall obey +// the restrictions given in clause 15.8. + +module Sem_050402_actual_parameters_185 { + + type component GeneralComp { + } + + function f_test (omit integer p_val) { + if (match(1, p_val)) { setverdict(pass); } + else { setverdict(fail); } + } + + testcase TC_Sem_050402_actual_parameters_185() runs on GeneralComp { + f_test(1); + } + + control { + execute(TC_Sem_050402_actual_parameters_185()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_186.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_186.ttcn new file mode 100644 index 00000000..166791c5 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_186.ttcn @@ -0,0 +1,29 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that compatible templates can be passed to template parameters with value restriction + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Actual parameters passed to restricted formal template parameters shall obey +// the restrictions given in clause 15.8. + +module Sem_050402_actual_parameters_186 { + + type component GeneralComp { + } + + function f_test (template(value) integer p_val) { + if (match(1, p_val)) { setverdict(pass); } + else { setverdict(fail); } + } + + testcase TC_Sem_050402_actual_parameters_186() runs on GeneralComp { + f_test(1); + } + + control { + execute(TC_Sem_050402_actual_parameters_186()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_187.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_187.ttcn new file mode 100644 index 00000000..d6e8e1cd --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_187.ttcn @@ -0,0 +1,29 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that compatible templates can be passed to template parameters with present restriction + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Actual parameters passed to restricted formal template parameters shall obey +// the restrictions given in clause 15.8. + +module Sem_050402_actual_parameters_187 { + + type component GeneralComp { + } + + function f_test (template(present) integer p_val) { + if (match(1, p_val)) { setverdict(pass); } + else { setverdict(fail); } + } + + testcase TC_Sem_050402_actual_parameters_187() runs on GeneralComp { + f_test((0..10)); + } + + control { + execute(TC_Sem_050402_actual_parameters_187()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_188.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_188.ttcn new file mode 100644 index 00000000..d81031b8 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_188.ttcn @@ -0,0 +1,41 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that it is possible to use nested actual parameter lists + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// All parameterized entities specified as an actual parameter shall have their +// own parameters resolved in the top-level actual parameter list. + +module Sem_050402_actual_parameters_188 { + + type component GeneralComp { + } + + type record R { + integer field1, + integer field2 + } + + template integer mw_int (integer p_upper) := (0..p_upper); + + template R mw_rec(template integer p_field2) := { + field1 := 1, + field2 := p_field2 + } + + function f_test (template R p_match) { + if (match({1, 5}, p_match)) { setverdict(pass); } + else { setverdict(fail); } + } + + testcase TC_Sem_050402_actual_parameters_188() runs on GeneralComp { + f_test(mw_rec(mw_int(10))); + } + + control { + execute(TC_Sem_050402_actual_parameters_188()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_189.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_189.ttcn new file mode 100644 index 00000000..f9291b96 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_189.ttcn @@ -0,0 +1,30 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that empty actual parameter list can be used for functions with no parameters + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// If the formal parameter list of TTCN-3 objects function, testcase, signature, +// altstep or external function is empty, then the empty parentheses shall be +// included both in the declaration and in the invocation of that object. In all +// other cases the empty parentheses shall be omitted. + +module Sem_050402_actual_parameters_189 { + + type component GeneralComp { + } + + function f_test () { + setverdict(pass); + } + + testcase TC_Sem_050402_actual_parameters_189() runs on GeneralComp { + f_test(); + } + + control { + execute(TC_Sem_050402_actual_parameters_189()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_190.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_190.ttcn new file mode 100644 index 00000000..a5c21e05 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_190.ttcn @@ -0,0 +1,32 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that empty actual parameter list can be used for altsteps with no parameters + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// If the formal parameter list of TTCN-3 objects function, testcase, signature, +// altstep or external function is empty, then the empty parentheses shall be +// included both in the declaration and in the invocation of that object. In all +// other cases the empty parentheses shall be omitted. + +module Sem_050402_actual_parameters_190 { + + type component GeneralComp { + } + + altstep a_test () { + [] any timer.timeout { setverdict(pass); } + } + + testcase TC_Sem_050402_actual_parameters_190() runs on GeneralComp { + timer t_instant := 0.0; + t_instant.start; + a_test(); + } + + control { + execute(TC_Sem_050402_actual_parameters_190()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_191.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_191.ttcn new file mode 100644 index 00000000..0a96f31f --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_191.ttcn @@ -0,0 +1,37 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that partially initialized values can be passed to in formal parameters + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Unless specified differently in the relevant clause(s), actual parameters +// passed to in or inout formal parameters shall be at least partially +// initialized (for an exemption see e.g. clause 16.1.2 of the present document). + +module Sem_050402_actual_parameters_191 { + + type component GeneralComp { + } + + type record R { + integer field1, + integer field2 optional + } + + function f_test (R p_val) { + if (match(p_val.field1, 1) and not isbound(p_val.field2)) { setverdict(pass); } + else { setverdict(fail); } + } + + testcase TC_Sem_050402_actual_parameters_191() runs on GeneralComp { + var R v_rec; + v_rec.field1 := 1; + f_test(v_rec); + } + + control { + execute(TC_Sem_050402_actual_parameters_191()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_192.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_192.ttcn new file mode 100644 index 00000000..7e51fa46 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_192.ttcn @@ -0,0 +1,37 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that partially initialized values can be passed to inout formal parameters + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Unless specified differently in the relevant clause(s), actual parameters +// passed to in or inout formal parameters shall be at least partially +// initialized (for an exemption see e.g. clause 16.1.2 of the present document). + +module Sem_050402_actual_parameters_192 { + + type component GeneralComp { + } + + type record R { + integer field1, + integer field2 optional + } + + function f_test (inout R p_val) { + if (match(p_val.field1, 1) and not isbound(p_val.field2)) { setverdict(pass); } + else { setverdict(fail); } + } + + testcase TC_Sem_050402_actual_parameters_192() runs on GeneralComp { + var R v_rec; + v_rec.field1 := 1; + f_test(v_rec); + } + + control { + execute(TC_Sem_050402_actual_parameters_192()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_193.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_193.ttcn new file mode 100644 index 00000000..71c97abc --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_193.ttcn @@ -0,0 +1,28 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that Example 1 can be executed + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +module Sem_050402_actual_parameters_193 { + + type component GeneralComp { + } + + // A function definition with a formal parameter list + function MyFunction(integer FormalPar1, boolean FormalPar2, bitstring FormalPar3) { + setverdict(pass); + } + + testcase TC_Sem_050402_actual_parameters_193() runs on GeneralComp { + // A function call with an actual parameter list + MyFunction(123, true,'1100'B); + // A function call with assignment notation for actual parameters + MyFunction(FormalPar1 := 123, FormalPar3 := '1100'B, FormalPar2 := true); + } + + control { + execute(TC_Sem_050402_actual_parameters_193()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_194.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_194.ttcn new file mode 100644 index 00000000..2906a6a8 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_194.ttcn @@ -0,0 +1,30 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that Example 2 can be executed + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +module Sem_050402_actual_parameters_194 { + + type component GeneralComp { + } + + type integer MyTemplateType; + + template MyTemplateType MyGlobalTemplate := ?; + + function MyFunction(in template MyTemplateType MyValueParameter){ + setverdict(pass); + }; + // MyValueParameter is in parameter, the in keyword is optional + + testcase TC_Sem_050402_actual_parameters_194() runs on GeneralComp { + // A function call with an actual parameter + MyFunction(MyGlobalTemplate); + } + + control { + execute(TC_Sem_050402_actual_parameters_194()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_195.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_195.ttcn new file mode 100644 index 00000000..7683b0af --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_195.ttcn @@ -0,0 +1,28 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that the first part of the Example 3 can be executed + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +module Sem_050402_actual_parameters_195 { + + type component GeneralComp { + } + + function MyFunction(inout boolean MyReferenceParameter) { + // MyReferenceParameter is an inout parameter + setverdict(pass); + } + + testcase TC_Sem_050402_actual_parameters_195() runs on GeneralComp { + var boolean MyBooleanVariable := false; + // A function call with an actual parameter + MyFunction(MyBooleanVariable); + // The actual parameter can be read and set within the function + } + + control { + execute(TC_Sem_050402_actual_parameters_195()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_196.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_196.ttcn new file mode 100644 index 00000000..b9fb740b --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_196.ttcn @@ -0,0 +1,31 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that the third part of the Example 3 can be executed + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +module Sem_050402_actual_parameters_196 { + + type component GeneralComp { + } + + type record of integer RoI; + + function f_swapElements (inout integer p_int1, inout integer p_int2) { + var integer v_tmp := p_int1; + p_int1 := p_int2; + p_int2 := v_tmp; + } + + testcase TC_Sem_050402_actual_parameters_196() runs on GeneralComp { + var RoI v_roi := { 0, 1, 2, 3, 4, 5 }; + f_swapElements(v_roi[0], v_roi[5]); // after the function call, v_roi is { 5, 1, 2, 3, 4, 0 } + if (v_roi == { 5, 1, 2, 3, 4, 0 }) { setverdict(pass); } + else { setverdict(fail); } + } + + control { + execute(TC_Sem_050402_actual_parameters_196()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_197.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_197.ttcn new file mode 100644 index 00000000..5f79a553 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_197.ttcn @@ -0,0 +1,28 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that the first part of the Example 3 can be executed + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +module Sem_050402_actual_parameters_197 { + + type component GeneralComp { + } + + function MyFunction(inout boolean MyReferenceParameter) { + // MyReferenceParameter is an inout parameter + setverdict(pass); + } + + testcase TC_Sem_050402_actual_parameters_197() runs on GeneralComp { + var boolean MyBooleanVariable := false; + // A function call with an actual parameter + MyFunction(MyBooleanVariable); + // The actual parameter can be read and set within the function + } + + control { + execute(TC_Sem_050402_actual_parameters_197()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_198.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_198.ttcn new file mode 100644 index 00000000..f579bab6 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_198.ttcn @@ -0,0 +1,29 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that the the Example 4 can be executed + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +module Sem_050402_actual_parameters_198 { + + type component GeneralComp { + } + + // A function definition with an empty parameter list shall be written as + function MyFunction() { setverdict(pass); } + + // A record definition with an empty parameter list shall be written as + type record MyRecord { } + // and shall be used as + template MyRecord Mytemplate := { } + + testcase TC_Sem_050402_actual_parameters_198() runs on GeneralComp { + // and shall be called as + MyFunction(); + } + + control { + execute(TC_Sem_050402_actual_parameters_198()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_199.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_199.ttcn new file mode 100644 index 00000000..6a683781 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_199.ttcn @@ -0,0 +1,43 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that the Example 5 can be executed + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +module Sem_050402_actual_parameters_199 { + + type port P message { + inout MyMessageType; + } + + type component GeneralComp { + port P MyPCO; + } + + // Given the message definition + type record MyMessageType + { + integer field1, + charstring field2, + boolean field3 + } + + // A message template might be + template MyMessageType MyTemplate(integer MyValue) := + { + field1 := MyValue, + field2 := pattern "abc*xyz", + field3 := true + } + + testcase TC_Sem_050402_actual_parameters_199(template MyMessageType RxMsg) runs on GeneralComp { + MyPCO.send(MyMessageType:{7, "abcdefxyz", true }); + MyPCO.receive(RxMsg); + setverdict(pass); + } + + control { + execute(TC_Sem_050402_actual_parameters_199(MyTemplate(7))); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_200.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_200.ttcn new file mode 100644 index 00000000..ad106ab9 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_200.ttcn @@ -0,0 +1,34 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that the Example 6 can be executed + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +module Sem_050402_actual_parameters_200 { + + type component GeneralComp { + } + + modulepar boolean logMessage := true; + function logMsg(@lazy charstring complex) { + if (logMessage) { + log(complex); + } + } + + function computeComplexMessage() return charstring { + // some complicated computation + setverdict(pass); + return "hello"; + } + + testcase TC_Sem_050402_actual_parameters_200() runs on GeneralComp { + logMsg(computeComplexMessage()); // computeComplexMessage() is only invoked if + // logMessage is true + } + + control { + execute(TC_Sem_050402_actual_parameters_200()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_201.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_201.ttcn new file mode 100644 index 00000000..a941ad49 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_201.ttcn @@ -0,0 +1,46 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that the Example 7 can be executed + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +module Sem_050402_actual_parameters_201 { + + type component GeneralComp { + var integer v_id; + port MyPortType P; + } + + type record MyMessage { integer id, float number } + type port MyPortType message { inout MyMessage } + + function sendLazy(@lazy MyMessage pdu) runs on GeneralComp { + for (v_id := 1; v_id<9; v_id:=v_id+1){ + P.send(pdu); // the actual parameter passed to the formal parameter pdu is evaluated only in + // the first loop;let say rnd() returns 0.924946; the message { 1, 0.924946 } is + // sent out 8 times + } + setverdict(pass,"messages has been sent out") + } + function sendFuzzy(@fuzzy MyMessage pdu) runs on GeneralComp { + for (v_id := 1; v_id<9; v_id:=v_id+1){ + P.send(pdu); // the actual parameter passed to the formal parameter pdu is evaluated in each + // loop; let say rnd() returns 0.924946, 0.680497, 0.630836, 0.648681, 0.428501, + // 0.262539, 0.646990, 0.265262 in subsuent calls; the messages 1, 0.924946 }, + // {{ 2, 0.680497 }, { 3, 0.630836 }, { 4, 0.648681 }, { 5, 0.428501 }, + // { 6, 0.262539 }, { 7, 0.646990 } and { 8, 0.265262 } are sent out in sequence + } + setverdict(pass,"messages has been sent out") + } + + testcase TC_Sem_050402_actual_parameters_201() runs on GeneralComp system GeneralComp { + connect(self:P,self:P); + sendLazy({v_id, rnd()}); //note that at this point v_id is unintialized yet + sendFuzzy({v_id, rnd()}) + } + + control { + execute(TC_Sem_050402_actual_parameters_201()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_202.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_202.ttcn new file mode 100644 index 00000000..e47ba261 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_202.ttcn @@ -0,0 +1,31 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that the Example 8 can be executed + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +module Sem_050402_actual_parameters_202 { + + type component GeneralComp { + } + + function f_initValues (out integer p_par1, out integer p_par2) { + p_par1 := 1; + p_par2 := 2; + } + + testcase TC_Sem_050402_actual_parameters_202() runs on GeneralComp { + var integer v_var1; + f_initValues(p_par2 := v_var1, p_par1 := v_var1); + // After this function call, v_var1 will contain 2, as parameters are assigned in + // the same order as in the definition of the f_initValues function. Thus p_par1 is + // assigned first to v_var1 and p_par2 after that ovewriting the previous value. + if (v_var1 == 2) { setverdict(pass); } + else { setverdict(fail); } + } + + control { + execute(TC_Sem_050402_actual_parameters_202()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_203.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_203.ttcn new file mode 100644 index 00000000..602346c3 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_203.ttcn @@ -0,0 +1,37 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that variables can be used as actual out value parameters of functions + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to out formal value parameters shall be (template) variables, +// formal (template) parameters (of in, inout or out parameterization) or references to elements +// of (template) variables or formal (template) parameters of structured types. Furthermore it is +// allowed to use the dash symbol "-" as an actual out parameter, signifying that a possible result +// for that parameter will not be passed back. + +module Sem_050402_actual_parameters_203 { + + type component GeneralComp { + } + + function f_test(out integer p_val) { + p_val := 9 + } + + testcase TC_Sem_050402_actual_parameters_203() runs on GeneralComp { + var integer v_val := 5; + f_test(v_val); // tested parameter passing + if (v_val == 9) { + setverdict(pass); + }else { + setverdict(fail); + } + } + + control { + execute(TC_Sem_050402_actual_parameters_203()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_204.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_204.ttcn new file mode 100644 index 00000000..366d518f --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_204.ttcn @@ -0,0 +1,37 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that variables can be used as actual out value parameters of functions + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to out formal value parameters shall be (template) variables, +// formal (template) parameters (of in, inout or out parameterization) or references to elements +// of (template) variables or formal (template) parameters of structured types. Furthermore it is +// allowed to use the dash symbol "-" as an actual out parameter, signifying that a possible result +// for that parameter will not be passed back. + +module Sem_050402_actual_parameters_204 { + + type component GeneralComp { + } + + function f_test(out integer p_val) { + p_val := 9 + } + + testcase TC_Sem_050402_actual_parameters_204() runs on GeneralComp { + var integer v_val := 5; + f_test(v_val); // tested parameter passing + if (v_val == 9) { + setverdict(pass); + }else { + setverdict(fail); + } + } + + control { + execute(TC_Sem_050402_actual_parameters_204()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_205.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_205.ttcn new file mode 100644 index 00000000..736167f2 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_205.ttcn @@ -0,0 +1,40 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that in value parameters can be used as actual out value parameters of functions + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to out formal value parameters shall be (template) variables, +// formal (template) parameters (of in, inout or out parameterization) or references to elements +// of (template) variables or formal (template) parameters of structured types. Furthermore it is +// allowed to use the dash symbol "-" as an actual out parameter, signifying that a possible result +// for that parameter will not be passed back. + +module Sem_050402_actual_parameters_205 { + + type component GeneralComp { + } + + function f_test(out integer p_val) { + p_val := 9 + } + + function f_caller(integer p_val) { + f_test(p_val); // tested parameter passing + if (p_val == 9) { + setverdict(pass); + }else { + setverdict(fail); + } + } + + testcase TC_Sem_050402_actual_parameters_205() runs on GeneralComp { + f_caller(0); + } + + control { + execute(TC_Sem_050402_actual_parameters_205()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_206.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_206.ttcn new file mode 100644 index 00000000..9f3d4f7d --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_206.ttcn @@ -0,0 +1,41 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that out value parameters can be used as actual out value parameters of functions + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to out formal value parameters shall be (template) variables, +// formal (template) parameters (of in, inout or out parameterization) or references to elements +// of (template) variables or formal (template) parameters of structured types. Furthermore it is +// allowed to use the dash symbol "-" as an actual out parameter, signifying that a possible result +// for that parameter will not be passed back. + +module Sem_050402_actual_parameters_206 { + + type component GeneralComp { + } + + function f_test(out integer p_val) { + p_val := 9 + } + + function f_caller(out integer p_val) { + f_test(p_val); // tested parameter passing + if (p_val == 9) { + setverdict(pass); + }else { + setverdict(fail); + } + } + + testcase TC_Sem_050402_actual_parameters_206() runs on GeneralComp { + var integer v_val; + f_caller(v_val); + } + + control { + execute(TC_Sem_050402_actual_parameters_206()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_207.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_207.ttcn new file mode 100644 index 00000000..ca984083 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_207.ttcn @@ -0,0 +1,41 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that inout value parameters can be used as actual out value parameters of functions + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to out formal value parameters shall be (template) variables, +// formal (template) parameters (of in, inout or out parameterization) or references to elements +// of (template) variables or formal (template) parameters of structured types. Furthermore it is +// allowed to use the dash symbol "-" as an actual out parameter, signifying that a possible result +// for that parameter will not be passed back. + +module Sem_050402_actual_parameters_207 { + + type component GeneralComp { + } + + function f_test(out integer p_val) { + p_val := 9 + } + + function f_caller(inout integer p_val) { + f_test(p_val); // tested parameter passing + if (p_val == 9) { + setverdict(pass); + }else { + setverdict(fail); + } + } + + testcase TC_Sem_050402_actual_parameters_207() runs on GeneralComp { + var integer v_val := 1; + f_caller(v_val); + } + + control { + execute(TC_Sem_050402_actual_parameters_207()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_208.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_208.ttcn new file mode 100644 index 00000000..939a86a5 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_208.ttcn @@ -0,0 +1,40 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that in template parameters can be used as actual out value parameters of functions + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to out formal value parameters shall be (template) variables, +// formal (template) parameters (of in, inout or out parameterization) or references to elements +// of (template) variables or formal (template) parameters of structured types. Furthermore it is +// allowed to use the dash symbol "-" as an actual out parameter, signifying that a possible result +// for that parameter will not be passed back. + +module Sem_050402_actual_parameters_208 { + + type component GeneralComp { + } + + function f_test(out integer p_val) { + p_val := 9 + } + + function f_caller(template integer p_val) { + f_test(p_val); // tested parameter passing + if (valueof(p_val) == 9) { + setverdict(pass); + }else { + setverdict(fail); + } + } + + testcase TC_Sem_050402_actual_parameters_208() runs on GeneralComp { + f_caller(?); + } + + control { + execute(TC_Sem_050402_actual_parameters_208()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_209.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_209.ttcn new file mode 100644 index 00000000..7bcf5410 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_209.ttcn @@ -0,0 +1,41 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that out template parameters can be used as actual out value parameters of functions + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to out formal value parameters shall be (template) variables, +// formal (template) parameters (of in, inout or out parameterization) or references to elements +// of (template) variables or formal (template) parameters of structured types. Furthermore it is +// allowed to use the dash symbol "-" as an actual out parameter, signifying that a possible result +// for that parameter will not be passed back. + +module Sem_050402_actual_parameters_209 { + + type component GeneralComp { + } + + function f_test(out integer p_val) { + p_val := 9 + } + + function f_caller(out template integer p_val) { + f_test(p_val); // tested parameter passing + if (valueof(p_val) == 9) { + setverdict(pass); + }else { + setverdict(fail); + } + } + + testcase TC_Sem_050402_actual_parameters_209() runs on GeneralComp { + var template integer v_val; + f_caller(v_val); + } + + control { + execute(TC_Sem_050402_actual_parameters_209()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_210.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_210.ttcn new file mode 100644 index 00000000..88f390c5 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_210.ttcn @@ -0,0 +1,41 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that inout template parameters can be used as actual out value parameters of functions + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to out formal value parameters shall be (template) variables, +// formal (template) parameters (of in, inout or out parameterization) or references to elements +// of (template) variables or formal (template) parameters of structured types. Furthermore it is +// allowed to use the dash symbol "-" as an actual out parameter, signifying that a possible result +// for that parameter will not be passed back. + +module Sem_050402_actual_parameters_210 { + + type component GeneralComp { + } + + function f_test(out integer p_val) { + p_val := 9 + } + + function f_caller(inout template integer p_val) { + f_test(p_val); // tested parameter passing + if (valueof(p_val) == 9) { + setverdict(pass); + }else { + setverdict(fail); + } + } + + testcase TC_Sem_050402_actual_parameters_210() runs on GeneralComp { + var template integer v_val := ?; + f_caller(v_val); + } + + control { + execute(TC_Sem_050402_actual_parameters_210()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_211.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_211.ttcn new file mode 100644 index 00000000..b46d24d6 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_211.ttcn @@ -0,0 +1,32 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that dash can be used as an actual out value parameter of functions + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to out formal value parameters shall be (template) variables, +// formal (template) parameters (of in, inout or out parameterization) or references to elements +// of (template) variables or formal (template) parameters of structured types. Furthermore it is +// allowed to use the dash symbol "-" as an actual out parameter, signifying that a possible result +// for that parameter will not be passed back. + +module Sem_050402_actual_parameters_211 { + + type component GeneralComp { + } + + function f_test(out integer p_val) { + p_val := 9 + } + + testcase TC_Sem_050402_actual_parameters_211() runs on GeneralComp { + f_test(-); // tested parameter passing + setverdict(pass); + } + + control { + execute(TC_Sem_050402_actual_parameters_211()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_212.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_212.ttcn new file mode 100644 index 00000000..cd03ebb8 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_212.ttcn @@ -0,0 +1,41 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that variables can be used as actual out value parameters of altsteps + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to out formal value parameters shall be (template) variables, +// formal (template) parameters (of in, inout or out parameterization) or references to elements +// of (template) variables or formal (template) parameters of structured types. Furthermore it is +// allowed to use the dash symbol "-" as an actual out parameter, signifying that a possible result +// for that parameter will not be passed back. + +module Sem_050402_actual_parameters_212 { + + type component GeneralComp { + } + + altstep a_test(out integer p_val) { + [] any timer.timeout { + p_val := 9 + } + } + + testcase TC_Sem_050402_actual_parameters_212() runs on GeneralComp { + var integer v_val := 5; + timer t_tmr := 0.1; + t_tmr.start; + a_test(v_val); // tested parameter passing + if (v_val == 9) { + setverdict(pass); + }else { + setverdict(fail); + } + } + + control { + execute(TC_Sem_050402_actual_parameters_212()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_213.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_213.ttcn new file mode 100644 index 00000000..66ad994a --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_213.ttcn @@ -0,0 +1,41 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that variables can be used as actual out value parameters of altsteps + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to out formal value parameters shall be (template) variables, +// formal (template) parameters (of in, inout or out parameterization) or references to elements +// of (template) variables or formal (template) parameters of structured types. Furthermore it is +// allowed to use the dash symbol "-" as an actual out parameter, signifying that a possible result +// for that parameter will not be passed back. + +module Sem_050402_actual_parameters_213 { + + type component GeneralComp { + } + + altstep a_test(out integer p_val) { + [] any timer.timeout { + p_val := 9 + } + } + + testcase TC_Sem_050402_actual_parameters_213() runs on GeneralComp { + var integer v_val := 5; + timer t_tmr := 0.1; + t_tmr.start; + a_test(v_val); // tested parameter passing + if (v_val == 9) { + setverdict(pass); + }else { + setverdict(fail); + } + } + + control { + execute(TC_Sem_050402_actual_parameters_213()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_214.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_214.ttcn new file mode 100644 index 00000000..b34b8227 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_214.ttcn @@ -0,0 +1,44 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that in value parameters can be used as actual out value parameters of altsteps + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to out formal value parameters shall be (template) variables, +// formal (template) parameters (of in, inout or out parameterization) or references to elements +// of (template) variables or formal (template) parameters of structured types. Furthermore it is +// allowed to use the dash symbol "-" as an actual out parameter, signifying that a possible result +// for that parameter will not be passed back. + +module Sem_050402_actual_parameters_214 { + + type component GeneralComp { + } + + altstep a_test(out integer p_val) { + [] any timer.timeout { + p_val := 9 + } + } + + function f_caller(integer p_val) { + timer t_tmr := 0.1; + t_tmr.start; + a_test(p_val); // tested parameter passing + if (p_val == 9) { + setverdict(pass); + }else { + setverdict(fail); + } + } + + testcase TC_Sem_050402_actual_parameters_214() runs on GeneralComp { + f_caller(0); + } + + control { + execute(TC_Sem_050402_actual_parameters_214()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_215.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_215.ttcn new file mode 100644 index 00000000..6990ae29 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_215.ttcn @@ -0,0 +1,45 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that out value parameters can be used as actual out value parameters of altsteps + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to out formal value parameters shall be (template) variables, +// formal (template) parameters (of in, inout or out parameterization) or references to elements +// of (template) variables or formal (template) parameters of structured types. Furthermore it is +// allowed to use the dash symbol "-" as an actual out parameter, signifying that a possible result +// for that parameter will not be passed back. + +module Sem_050402_actual_parameters_215 { + + type component GeneralComp { + } + + altstep a_test(out integer p_val) { + [] any timer.timeout { + p_val := 9 + } + } + + function f_caller(out integer p_val) { + timer t_tmr := 0.1; + t_tmr.start; + a_test(p_val); // tested parameter passing + if (p_val == 9) { + setverdict(pass); + }else { + setverdict(fail); + } + } + + testcase TC_Sem_050402_actual_parameters_215() runs on GeneralComp { + var integer v_val; + f_caller(v_val); + } + + control { + execute(TC_Sem_050402_actual_parameters_215()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_216.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_216.ttcn new file mode 100644 index 00000000..df900886 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_216.ttcn @@ -0,0 +1,45 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that inout value parameters can be used as actual out value parameters of altsteps + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to out formal value parameters shall be (template) variables, +// formal (template) parameters (of in, inout or out parameterization) or references to elements +// of (template) variables or formal (template) parameters of structured types. Furthermore it is +// allowed to use the dash symbol "-" as an actual out parameter, signifying that a possible result +// for that parameter will not be passed back. + +module Sem_050402_actual_parameters_216 { + + type component GeneralComp { + } + + altstep a_test(out integer p_val) { + [] any timer.timeout { + p_val := 9 + } + } + + function f_caller(inout integer p_val) { + timer t_tmr := 0.1; + t_tmr.start; + a_test(p_val); // tested parameter passing + if (p_val == 9) { + setverdict(pass); + }else { + setverdict(fail); + } + } + + testcase TC_Sem_050402_actual_parameters_216() runs on GeneralComp { + var integer v_val := 1; + f_caller(v_val); + } + + control { + execute(TC_Sem_050402_actual_parameters_216()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_217.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_217.ttcn new file mode 100644 index 00000000..6b41597f --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_217.ttcn @@ -0,0 +1,44 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that in template parameters can be used as actual out value parameters of altsteps + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to out formal value parameters shall be (template) variables, +// formal (template) parameters (of in, inout or out parameterization) or references to elements +// of (template) variables or formal (template) parameters of structured types. Furthermore it is +// allowed to use the dash symbol "-" as an actual out parameter, signifying that a possible result +// for that parameter will not be passed back. + +module Sem_050402_actual_parameters_217 { + + type component GeneralComp { + } + + altstep a_test(out integer p_val) { + [] any timer.timeout { + p_val := 9 + } + } + + function f_caller(template integer p_val) { + timer t_tmr := 0.1; + t_tmr.start; + a_test(p_val); // tested parameter passing + if (valueof(p_val) == 9) { + setverdict(pass); + }else { + setverdict(fail); + } + } + + testcase TC_Sem_050402_actual_parameters_217() runs on GeneralComp { + f_caller(?); + } + + control { + execute(TC_Sem_050402_actual_parameters_217()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_218.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_218.ttcn new file mode 100644 index 00000000..d34567e4 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_218.ttcn @@ -0,0 +1,45 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that out template parameters can be used as actual out value parameters of altsteps + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to out formal value parameters shall be (template) variables, +// formal (template) parameters (of in, inout or out parameterization) or references to elements +// of (template) variables or formal (template) parameters of structured types. Furthermore it is +// allowed to use the dash symbol "-" as an actual out parameter, signifying that a possible result +// for that parameter will not be passed back. + +module Sem_050402_actual_parameters_218 { + + type component GeneralComp { + } + + altstep a_test(out integer p_val) { + [] any timer.timeout { + p_val := 9 + } + } + + function f_caller(out template integer p_val) { + timer t_tmr := 0.1; + t_tmr.start; + a_test(p_val); // tested parameter passing + if (valueof(p_val) == 9) { + setverdict(pass); + }else { + setverdict(fail); + } + } + + testcase TC_Sem_050402_actual_parameters_218() runs on GeneralComp { + var template integer v_val; + f_caller(v_val); + } + + control { + execute(TC_Sem_050402_actual_parameters_218()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_219.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_219.ttcn new file mode 100644 index 00000000..ea26ab9a --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_219.ttcn @@ -0,0 +1,45 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that inout template parameters can be used as actual out value parameters of altsteps + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to out formal value parameters shall be (template) variables, +// formal (template) parameters (of in, inout or out parameterization) or references to elements +// of (template) variables or formal (template) parameters of structured types. Furthermore it is +// allowed to use the dash symbol "-" as an actual out parameter, signifying that a possible result +// for that parameter will not be passed back. + +module Sem_050402_actual_parameters_219 { + + type component GeneralComp { + } + + altstep a_test(out integer p_val) { + [] any timer.timeout { + p_val := 9 + } + } + + function f_caller(inout template integer p_val) { + timer t_tmr := 0.1; + t_tmr.start; + a_test(p_val); // tested parameter passing + if (valueof(p_val) == 9) { + setverdict(pass); + }else { + setverdict(fail); + } + } + + testcase TC_Sem_050402_actual_parameters_219() runs on GeneralComp { + var template integer v_val := ?; + f_caller(v_val); + } + + control { + execute(TC_Sem_050402_actual_parameters_219()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_220.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_220.ttcn new file mode 100644 index 00000000..7b248905 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_220.ttcn @@ -0,0 +1,36 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that dash can be used as an actual out value parameter of altsteps + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to out formal value parameters shall be (template) variables, +// formal (template) parameters (of in, inout or out parameterization) or references to elements +// of (template) variables or formal (template) parameters of structured types. Furthermore it is +// allowed to use the dash symbol "-" as an actual out parameter, signifying that a possible result +// for that parameter will not be passed back. + +module Sem_050402_actual_parameters_220 { + + type component GeneralComp { + } + + altstep a_test(out integer p_val) { + [] any timer.timeout { + p_val := 9 + } + } + + testcase TC_Sem_050402_actual_parameters_220() runs on GeneralComp { + timer t_tmr := 0.1; + t_tmr.start; + a_test(-); // tested parameter passing + setverdict(pass); + } + + control { + execute(TC_Sem_050402_actual_parameters_220()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_221.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_221.ttcn new file mode 100644 index 00000000..5fae44cc --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_221.ttcn @@ -0,0 +1,31 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that dash can be used as an actual out template parameter of functions + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to out formal template parameters shall be template variables, formal +// template parameters or references to elements of template variables or formal template parameters of +// structured types. Furthermore it is allowed to use the dash symbol "-" as an actual out parameter, +// signifying that a possible result for that parameter will not be passed back. + +module Sem_050402_actual_parameters_221 { + + type component GeneralComp { + } + + function f_test(out template integer p_val) { + p_val := ? + } + + testcase TC_Sem_050402_actual_parameters_221() runs on GeneralComp { + f_test(-); // tested parameter passing + setverdict(pass); + } + + control { + execute(TC_Sem_050402_actual_parameters_221()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_222.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_222.ttcn new file mode 100644 index 00000000..5c7acbb1 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_222.ttcn @@ -0,0 +1,35 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that dash can be used as an actual out template parameter of altsteps + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to out formal template parameters shall be template variables, formal +// template parameters or references to elements of template variables or formal template parameters of +// structured types. Furthermore it is allowed to use the dash symbol "-" as an actual out parameter, +// signifying that a possible result for that parameter will not be passed back. + +module Sem_050402_actual_parameters_222 { + + type component GeneralComp { + } + + altstep a_test(out template integer p_val) { + [] any timer.timeout { + p_val := ? + } + } + + testcase TC_Sem_050402_actual_parameters_222() runs on GeneralComp { + timer t_tmr := 0.1; + t_tmr.start; + a_test(-); // tested parameter passing + setverdict(pass); + } + + control { + execute(TC_Sem_050402_actual_parameters_222()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_223.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_223.ttcn new file mode 100644 index 00000000..2ee612fb --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_223.ttcn @@ -0,0 +1,30 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that actual out value parameters of functions can be skipped if they are the last ones + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// An actual parameter can also be skipped by just leaving it out if no other actual parameter follows in the actual parameter +// list - either because the parameter is last or because all following formal parameters are out parameters or have default +// values and are left out. + +module Sem_050402_actual_parameters_223 { + + type component GeneralComp { + } + + function f_test(out integer p_val) { + p_val := 9 + } + + testcase TC_Sem_050402_actual_parameters_223() runs on GeneralComp { + f_test(); // tested parameter passing + setverdict(pass); + } + + control { + execute(TC_Sem_050402_actual_parameters_223()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_224.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_224.ttcn new file mode 100644 index 00000000..9f123d3a --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_224.ttcn @@ -0,0 +1,34 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that actual out value parameters of altsteps can be skipped if they are the last ones + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// An actual parameter can also be skipped by just leaving it out if no other actual parameter follows in the actual parameter +// list - either because the parameter is last or because all following formal parameters are out parameters or have default +// values and are left out. + +module Sem_050402_actual_parameters_224 { + + type component GeneralComp { + } + + altstep a_test(out integer p_val) { + [] any timer.timeout { + p_val := 9 + } + } + + testcase TC_Sem_050402_actual_parameters_224() runs on GeneralComp { + timer t_tmr := 0.1; + t_tmr.start; + a_test(-); // tested parameter passing + setverdict(pass); + } + + control { + execute(TC_Sem_050402_actual_parameters_224()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_225.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_225.ttcn new file mode 100644 index 00000000..896ec493 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_225.ttcn @@ -0,0 +1,30 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that actual out template parameters of functions can be skipped if they are the last ones + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// An actual parameter can also be skipped by just leaving it out if no other actual parameter follows in the actual parameter +// list - either because the parameter is last or because all following formal parameters are out parameters or have default +// values and are left out. + +module Sem_050402_actual_parameters_225 { + + type component GeneralComp { + } + + function f_test(out template integer p_val) { + p_val := ? + } + + testcase TC_Sem_050402_actual_parameters_225() runs on GeneralComp { + f_test(); // tested parameter passing + setverdict(pass); + } + + control { + execute(TC_Sem_050402_actual_parameters_225()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_226.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_226.ttcn new file mode 100644 index 00000000..c6e3dab6 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_226.ttcn @@ -0,0 +1,34 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that actual out template parameters of altsteps can be skipped if they are the last ones + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// An actual parameter can also be skipped by just leaving it out if no other actual parameter follows in the actual parameter +// list - either because the parameter is last or because all following formal parameters are out parameters or have default +// values and are left out. + +module Sem_050402_actual_parameters_226 { + + type component GeneralComp { + } + + altstep a_test(out template integer p_val) { + [] any timer.timeout { + p_val := ? + } + } + + testcase TC_Sem_050402_actual_parameters_226() runs on GeneralComp { + timer t_tmr := 0.1; + t_tmr.start; + a_test(); // tested parameter passing + setverdict(pass); + } + + control { + execute(TC_Sem_050402_actual_parameters_226()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_227.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_227.ttcn new file mode 100644 index 00000000..4e1cade9 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_227.ttcn @@ -0,0 +1,41 @@ +/*************************************************** + ** @author STF 548 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that mixed notation can be used + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Actual parameters can be provided ... in a mixed notation where the first parameters are given in list notation +// and additional parameters in assignment notation. +// The test is based on modified example 11 + +module Sem_050402_actual_parameters_227 { + + type component GeneralComp { + } + + function f_mixed (out integer p_par1, in integer p_par2 := 2, inout integer p_par3) { + p_par1 := 1 + p_par2; + if (p_par2 == 2 and p_par3 == 0) { + setverdict(pass); + } else { + setverdict(fail); + } + } + + testcase TC_Sem_050402_actual_parameters_227() runs on GeneralComp { + var integer v := 0; + // the following statements all have the same semantics: + f_mixed(-,2,v); + f_mixed(-,p_par2 := 2, p_par3 := v); + f_mixed(-,-,p_par3 := v); + f_mixed(-,p_par3 := v, p_par2 := 2); + + setverdict(pass); + } + + control { + execute(TC_Sem_050402_actual_parameters_227()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/0504_toplevel/NegSem_0504_parametrization_incompatibility_001.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/0504_toplevel/NegSem_0504_parametrization_incompatibility_001.ttcn new file mode 100644 index 00000000..e46ef668 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/0504_toplevel/NegSem_0504_parametrization_incompatibility_001.ttcn @@ -0,0 +1,61 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:5.4, Ensure that the IUT correctly handles received testcase parametrization type incompatibility. + ** @verdict pass reject + ***************************************************/ +module NegSem_0504_parametrization_incompatibility_001 { + +type enumerated MyEnumeratedType {e_black, e_white} +type integer address; + +type record MyRecord { + integer field1, + boolean field2, + address field3, + MyEnumeratedType field4, + integer field5 +} + + +type component GeneralComp { + +} + + +testcase TC_NegSem_0504_parametrization_incompatibility_001 ( + MyRecord ExpectedMatch, + integer p_integer := 0, + boolean p_boolean := true, + address p_address := null, + MyEnumeratedType p_enumerated := e_black, + template integer p_integerTemplate := ? + ) runs on GeneralComp { + + // MyRecord cannot be built from the default p_integerTemplate parameter + var MyRecord ReceivedRecord := {p_integer, p_boolean, p_address, p_enumerated, p_integerTemplate}; + + if ( ReceivedRecord == ExpectedMatch ) { + setverdict(pass); + } + else { + setverdict(fail); + } + +} + + +control{ + + var MyRecord DefaultValues := { + field1 := 0, + field2 := true, + field3 := null, + field4 := e_black, + field5 := 1 //any number can be used here to correspond with ? matching + } + + execute(TC_NegSem_0504_parametrization_incompatibility_001(DefaultValues)); +} + +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/0504_toplevel/NegSyn_0504_forbidden_parametrization_001.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/0504_toplevel/NegSyn_0504_forbidden_parametrization_001.ttcn new file mode 100644 index 00000000..2d2b7c7e --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/0504_toplevel/NegSyn_0504_forbidden_parametrization_001.ttcn @@ -0,0 +1,22 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:5.4, Ensure that the IUT rejects forbidden module parametrization types. + ** @verdict pass reject + ***************************************************/ +module NegSyn_0504_forbidden_parametrization_001 { + +modulepar { template integer INTEGER_MODULE_PARAMETER := 0 } + +type component GeneralComp { +} + + +testcase TC_NegSyn_0504_forbidden_parametrization_001() runs on GeneralComp { +} + +control{ + execute(TC_NegSyn_0504_forbidden_parametrization_001()); +} + +} diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/0504_toplevel/NegSyn_0504_forbidden_parametrization_002.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/0504_toplevel/NegSyn_0504_forbidden_parametrization_002.ttcn new file mode 100644 index 00000000..27f4cd3a --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/0504_toplevel/NegSyn_0504_forbidden_parametrization_002.ttcn @@ -0,0 +1,22 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:5.4, Ensure that the IUT rejects forbidden module parametrization types. + ** @verdict pass reject + ***************************************************/ +module NegSyn_0504_forbidden_parametrization_002 { + +modulepar { timer TIMER_MODULE_PARAMETER } + +type component GeneralComp { +} + + +testcase TC_NegSyn_0504_forbidden_parametrization_002() runs on GeneralComp { +} + +control{ + execute(TC_NegSyn_0504_forbidden_parametrization_002()); +} + +} diff --git a/ATS/core_language/05_basic_language_elements/0505_cyclic_definitions/NegSem_0505_cyclic_definitions_001.ttcn b/ATS/core_language/05_basic_language_elements/0505_cyclic_definitions/NegSem_0505_cyclic_definitions_001.ttcn new file mode 100644 index 00000000..440aaa4e --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0505_cyclic_definitions/NegSem_0505_cyclic_definitions_001.ttcn @@ -0,0 +1,22 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:5.5, Verify that an error is detected when two constants reference each other + ** @verdict pass reject + ***************************************************/ + +// The following requirements are tested: +// Direct and indirect cyclic definitions are not allowed with the exception of the +// following cases: +// a) for recursive type definitions (see clause 6.2); +// b) function and altstep definitions (i.e. recursive function or altstep calls); +// c) cyclic import definitions, if the imported definitions only form allowed cyclic +// definitions. +// The test is a copy of example 1 from the chapter 5.5 +module NegSem_0505_cyclic_definitions_001 { + + type record ARecordType { integer a, integer b }; + const ARecordType c_test1 := { 1 , c_test2.b}; // c_test1 refers to c_test2 + const ARecordType c_test2 := { 1 , c_test1.b}; // c_test2 refers to c_test1 + +} diff --git a/ATS/core_language/05_basic_language_elements/0505_cyclic_definitions/NegSem_0505_cyclic_definitions_002.ttcn b/ATS/core_language/05_basic_language_elements/0505_cyclic_definitions/NegSem_0505_cyclic_definitions_002.ttcn new file mode 100644 index 00000000..74c55265 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0505_cyclic_definitions/NegSem_0505_cyclic_definitions_002.ttcn @@ -0,0 +1,35 @@ +/*************************************************** + ** @author STF 470 (updated by STF 521) + ** @version 0.0.2 + ** @purpose 1:5.5, Verify that an error is detected when a forbidded cyclic reference occurs in cyclic import + ** @verdict pass reject + ***************************************************/ + +// The following requirements are tested: +// Direct and indirect cyclic definitions are not allowed with the exception of the +// following cases: +// a) for recursive type definitions (see clause 6.2); +// b) function and altstep definitions (i.e. recursive function or altstep calls); +// c) cyclic import definitions, if the imported definitions only form allowed cyclic +// definitions. +// The test is a modification of example 1 from the chapter 5.5 that defines both constants +// in different modules. + +module NegSem_0505_cyclic_definitions_002 { + import from NegSem_0505_cyclic_definitions_002_import { const c_test1 } + type record ARecordType { integer a, integer b }; + const ARecordType c_test2 := { 1 , c_test1.b}; // c_test2 refers to c_test1 + + testcase TC_Sem_0505_cyclic_definitions_005() runs on GeneralComp system GeneralComp { + log(c_test2); + } + + control{ + execute(TC_Sem_0505_cyclic_definitions_005()); + } +} + +module NegSem_0505_cyclic_definitions_002_import { + import from NegSem_0505_cyclic_definitions_002 all; + const ARecordType c_test1 := { 1 , c_test2.b}; // c_test1 refers to c_test2 +} diff --git a/ATS/core_language/05_basic_language_elements/0505_cyclic_definitions/Sem_0505_cyclic_definitions_001.ttcn b/ATS/core_language/05_basic_language_elements/0505_cyclic_definitions/Sem_0505_cyclic_definitions_001.ttcn new file mode 100644 index 00000000..5d8aeeeb --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0505_cyclic_definitions/Sem_0505_cyclic_definitions_001.ttcn @@ -0,0 +1,34 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:5.5, Ensure that the IUT correctly handles recursive functions + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Sem_0505_cyclic_definitions_001 { + +type component GeneralComp { +} + +function f_recursive(integer p_argument) return integer { + if(p_argument==0) { + return 1; + } + else { + return p_argument*f_recursive(p_argument-1); + } +} + +testcase TC_Sem_0505_cyclic_definitions_001() runs on GeneralComp { + if (f_recursive(10) == 3628800) { // checks 10! + setverdict(pass); + } + else { + setverdict(fail); + } +} + +control{ + execute(TC_Sem_0505_cyclic_definitions_001()); +} + +} diff --git a/ATS/core_language/05_basic_language_elements/0505_cyclic_definitions/Sem_0505_cyclic_definitions_002.ttcn b/ATS/core_language/05_basic_language_elements/0505_cyclic_definitions/Sem_0505_cyclic_definitions_002.ttcn new file mode 100644 index 00000000..32a03b63 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0505_cyclic_definitions/Sem_0505_cyclic_definitions_002.ttcn @@ -0,0 +1,36 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:5.5, Ensure that the IUT correctly handles cyclic imports + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +module Sem_0505_cyclic_definitions_002 { + type integer MyInteger; + import from Sem_0505_cyclic_definitions_002_import { type MyIntegerList } + + +type component GeneralComp { +} + +testcase TC_Sem_0505_cyclic_definitions_002() runs on GeneralComp { + var MyIntegerList v_list := {1,2}; + + if ( match(v_list, { 1, 2})) { + setverdict(pass); + } + else { + setverdict(fail); + } +} + +control{ + execute(TC_Sem_0505_cyclic_definitions_002()); +} + +} + +module Sem_0505_cyclic_definitions_002_import { + import from Sem_0505_cyclic_definitions_002 { type MyInteger } + type record of MyInteger MyIntegerList; +} diff --git a/ATS/core_language/05_basic_language_elements/0505_cyclic_definitions/Sem_0505_cyclic_definitions_003.ttcn b/ATS/core_language/05_basic_language_elements/0505_cyclic_definitions/Sem_0505_cyclic_definitions_003.ttcn new file mode 100644 index 00000000..0b3247ec --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0505_cyclic_definitions/Sem_0505_cyclic_definitions_003.ttcn @@ -0,0 +1,57 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:5.5, Verify that cyclic import containing cyclic function calls is allowed + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirements are tested: +// Direct and indirect cyclic definitions are not allowed with the exception of the +// following cases: +// a) for recursive type definitions (see clause 6.2); +// b) function and altstep definitions (i.e. recursive function or altstep calls); +// c) cyclic import definitions, if the imported definitions only form allowed cyclic +// definitions. +// In particular, the combination of c and b is tested + +module Sem_0505_cyclic_definitions_003 { + import from Sem_0505_cyclic_definitions_003_import { function f_factImp; } + type component GeneralComp { + } + + function f_fact(integer p_argument) return integer { + if(p_argument==0) { + return 1; + } + else { + return p_argument*f_factImp(p_argument-1); + } + } + + testcase TC_Sem_0505_cyclic_definitions_003() runs on GeneralComp { + if (f_fact(10) == 3628800) { // checks 10! + setverdict(pass); + } + else { + setverdict(fail); + } + } + + control{ + execute(TC_Sem_0505_cyclic_definitions_003()); + } + +} + +module Sem_0505_cyclic_definitions_003_import { + import from Sem_0505_cyclic_definitions_003 { function f_fact; } + function f_factImp(integer p_argument) return integer { + if(p_argument==0) { + return 1; + } + else { + return p_argument*f_fact(p_argument-1); + } + } + +} \ No newline at end of file diff --git a/ATS/core_language/05_basic_language_elements/0505_cyclic_definitions/Sem_0505_cyclic_definitions_004.ttcn b/ATS/core_language/05_basic_language_elements/0505_cyclic_definitions/Sem_0505_cyclic_definitions_004.ttcn new file mode 100644 index 00000000..311db307 --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/0505_cyclic_definitions/Sem_0505_cyclic_definitions_004.ttcn @@ -0,0 +1,52 @@ +/*************************************************** + ** @author STF 470 (updated by STF 521) + ** @version 0.0.2 + ** @purpose 1:5.5, Verify that cyclic altsteps are allowed + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirements are tested: +// Direct and indirect cyclic definitions are not allowed with the exception of the +// following cases: +// b) ... altstep definitions (i.e. recursive ... altstep calls); + +module Sem_0505_cyclic_definitions_004 { + type port P message { + inout integer; + } + type component GeneralComp { + var integer vc_receiveCounter := 0; + timer t_tmr := 1.0; + port P p1; + } + + altstep a_test() runs on GeneralComp { + [] p1.receive(integer:(0..3)) { + vc_receiveCounter := vc_receiveCounter + 1; + a_test(); + } + [] p1.receive(integer:?) { + if (vc_receiveCounter == 4) { + setverdict(pass); + } else { + setverdict(fail); + } + } + [] t_tmr.timeout { + setverdict(fail); + } + } + + testcase TC_Sem_0505_cyclic_definitions_004() runs on GeneralComp system GeneralComp { + connect(self:p1, self:p1); + for (var integer i := 0; i < 5; i := i + 1) { + p1.send(i); + } + t_tmr.start; + a_test(); + } + + control{ + execute(TC_Sem_0505_cyclic_definitions_004()); + } +} diff --git a/ATS/core_language/05_basic_language_elements/05_toplevel/NegSyn_05_TopLevel_001.ttcn b/ATS/core_language/05_basic_language_elements/05_toplevel/NegSyn_05_TopLevel_001.ttcn new file mode 100644 index 00000000..b1d5c1ec --- /dev/null +++ b/ATS/core_language/05_basic_language_elements/05_toplevel/NegSyn_05_TopLevel_001.ttcn @@ -0,0 +1,12 @@ + +const integer wrongTopLevel := 1; + +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:5, Ensure that when the IUT loads a module containing some definitions before the module declaration then the module is rejected. + ** @verdict pass reject + *****************************************************************/ +module NegSyn_05_TopLevel_001 { + +} diff --git a/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060100_simple_basic_types_and_values/NegSyn_060100_SimpleBasicTypes_001.ttcn b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060100_simple_basic_types_and_values/NegSyn_060100_SimpleBasicTypes_001.ttcn new file mode 100644 index 00000000..4e78de7a --- /dev/null +++ b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060100_simple_basic_types_and_values/NegSyn_060100_SimpleBasicTypes_001.ttcn @@ -0,0 +1,9 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:6.1.0, Assign float to integer values + ** @verdict pass reject + ***************************************************/ +module NegSyn_060100_SimpleBasicTypes_001 { + const integer c_i1 := 0.0; // not an integer value +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060100_simple_basic_types_and_values/NegSyn_060100_SimpleBasicTypes_002.ttcn b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060100_simple_basic_types_and_values/NegSyn_060100_SimpleBasicTypes_002.ttcn new file mode 100644 index 00000000..750a5c00 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060100_simple_basic_types_and_values/NegSyn_060100_SimpleBasicTypes_002.ttcn @@ -0,0 +1,9 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:6.1.0, Assign boolean to integer values + ** @verdict pass reject + ***************************************************/ +module NegSyn_060100_SimpleBasicTypes_002 { + const integer c_i1 := true; // not an integer value +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060100_simple_basic_types_and_values/NegSyn_060100_SimpleBasicTypes_003.ttcn b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060100_simple_basic_types_and_values/NegSyn_060100_SimpleBasicTypes_003.ttcn new file mode 100644 index 00000000..ea479f61 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060100_simple_basic_types_and_values/NegSyn_060100_SimpleBasicTypes_003.ttcn @@ -0,0 +1,9 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:6.1.0, Assign integer to float values + ** @verdict pass reject + ***************************************************/ +module NegSyn_060100_SimpleBasicTypes_003 { + const float c_f1 := 0; // not a float value +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060100_simple_basic_types_and_values/NegSyn_060100_SimpleBasicTypes_004.ttcn b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060100_simple_basic_types_and_values/NegSyn_060100_SimpleBasicTypes_004.ttcn new file mode 100644 index 00000000..bd94fff7 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060100_simple_basic_types_and_values/NegSyn_060100_SimpleBasicTypes_004.ttcn @@ -0,0 +1,9 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:6.1.0, Assign boolean to float values + ** @verdict pass reject + ***************************************************/ +module NegSyn_060100_SimpleBasicTypes_004 { + const float c_f1 := true; // not a float value +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060100_simple_basic_types_and_values/NegSyn_060100_SimpleBasicTypes_005.ttcn b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060100_simple_basic_types_and_values/NegSyn_060100_SimpleBasicTypes_005.ttcn new file mode 100644 index 00000000..76f86b2f --- /dev/null +++ b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060100_simple_basic_types_and_values/NegSyn_060100_SimpleBasicTypes_005.ttcn @@ -0,0 +1,9 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:6.1.0, Assign verdicttype to float values + ** @verdict pass reject + ***************************************************/ +module NegSyn_060100_SimpleBasicTypes_005 { + const float c_f1 := pass; // not a float value +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060100_simple_basic_types_and_values/NegSyn_060100_SimpleBasicTypes_006.ttcn b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060100_simple_basic_types_and_values/NegSyn_060100_SimpleBasicTypes_006.ttcn new file mode 100644 index 00000000..e28c53cd --- /dev/null +++ b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060100_simple_basic_types_and_values/NegSyn_060100_SimpleBasicTypes_006.ttcn @@ -0,0 +1,9 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:6.1.0, Assign integer to verdicttype values + ** @verdict pass reject + ***************************************************/ +module NegSyn_060100_SimpleBasicTypes_006 { + const verdicttype c_v1 := 1; // not a verdict +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060100_simple_basic_types_and_values/Sem_060100_SimpleBasicTypes_001.ttcn b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060100_simple_basic_types_and_values/Sem_060100_SimpleBasicTypes_001.ttcn new file mode 100644 index 00000000..a7ef00c2 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060100_simple_basic_types_and_values/Sem_060100_SimpleBasicTypes_001.ttcn @@ -0,0 +1,25 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:6.1.0, Assign and read integer values + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Sem_060100_SimpleBasicTypes_001 { + + const integer c_i := 5; + + type component GeneralComp {} + + testcase TC_Sem_610_SimpleBasicTypes_001() runs on GeneralComp { + if (c_i == 5){ + setverdict(pass); + } + else { + setverdict(fail); + } + } + + control{ + execute(TC_Sem_610_SimpleBasicTypes_001()); + } +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060100_simple_basic_types_and_values/Sem_060100_SimpleBasicTypes_002.ttcn b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060100_simple_basic_types_and_values/Sem_060100_SimpleBasicTypes_002.ttcn new file mode 100644 index 00000000..449807f8 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060100_simple_basic_types_and_values/Sem_060100_SimpleBasicTypes_002.ttcn @@ -0,0 +1,25 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:6.1.0, Assign and read large integer values + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Sem_060100_SimpleBasicTypes_002 { + + const integer c_i := 50000000000000; + + type component GeneralComp {} + + testcase TC_Sem_610_SimpleBasicTypes_002() runs on GeneralComp { + if (c_i == 50000000000000){ + setverdict(pass); + } + else { + setverdict(fail); + } + } + + control{ + execute(TC_Sem_610_SimpleBasicTypes_002()); + } +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060100_simple_basic_types_and_values/Sem_060100_SimpleBasicTypes_003.ttcn b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060100_simple_basic_types_and_values/Sem_060100_SimpleBasicTypes_003.ttcn new file mode 100644 index 00000000..82a11e9e --- /dev/null +++ b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060100_simple_basic_types_and_values/Sem_060100_SimpleBasicTypes_003.ttcn @@ -0,0 +1,25 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:6.1.0, Assign and read float values + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Sem_060100_SimpleBasicTypes_003 { + + const float c_f := 5.12E-5; + + type component GeneralComp {} + + testcase TC_Sem_610_SimpleBasicTypes_003() runs on GeneralComp { + if (c_f > 5E-5){ + setverdict(pass); + } + else { + setverdict(fail); + } + } + + control{ + execute(TC_Sem_610_SimpleBasicTypes_003()); + } +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060100_simple_basic_types_and_values/Sem_060100_SimpleBasicTypes_004.ttcn b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060100_simple_basic_types_and_values/Sem_060100_SimpleBasicTypes_004.ttcn new file mode 100644 index 00000000..c09d40ce --- /dev/null +++ b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060100_simple_basic_types_and_values/Sem_060100_SimpleBasicTypes_004.ttcn @@ -0,0 +1,25 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:6.1.0, Assign and read large float values + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Sem_060100_SimpleBasicTypes_004 { + + const float c_f := 5.23E200; + + type component GeneralComp {} + + testcase TC_Sem_610_SimpleBasicTypes_004() runs on GeneralComp { + if (c_f > 1E200){ + setverdict(pass); + } + else { + setverdict(fail); + } + } + + control{ + execute(TC_Sem_610_SimpleBasicTypes_004()); + } +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060100_simple_basic_types_and_values/Sem_060100_SimpleBasicTypes_005.ttcn b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060100_simple_basic_types_and_values/Sem_060100_SimpleBasicTypes_005.ttcn new file mode 100644 index 00000000..3323f5e3 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060100_simple_basic_types_and_values/Sem_060100_SimpleBasicTypes_005.ttcn @@ -0,0 +1,25 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:6.1.0, Assign and read verdicts + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Sem_060100_SimpleBasicTypes_005 { + + const verdicttype c_v := inconc; + + type component GeneralComp {} + + testcase TC_Sem_610_SimpleBasicTypes_005() runs on GeneralComp { + if (c_v == inconc){ + setverdict(pass); + } + else { + setverdict(fail); + } + } + + control{ + execute(TC_Sem_610_SimpleBasicTypes_005()); + } +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060100_simple_basic_types_and_values/Syn_060100_SimpleBasicTypes_001.ttcn b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060100_simple_basic_types_and_values/Syn_060100_SimpleBasicTypes_001.ttcn new file mode 100644 index 00000000..a5b73c9d --- /dev/null +++ b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060100_simple_basic_types_and_values/Syn_060100_SimpleBasicTypes_001.ttcn @@ -0,0 +1,11 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:6.1.0, Assign different integer values + ** @verdict pass accept, noexecution + ***************************************************/ +module Syn_060100_SimpleBasicTypes_001 { + const integer c_i1 := 0; + const integer c_i2 := 1; + const integer c_i3 := -5; +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060100_simple_basic_types_and_values/Syn_060100_SimpleBasicTypes_002.ttcn b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060100_simple_basic_types_and_values/Syn_060100_SimpleBasicTypes_002.ttcn new file mode 100644 index 00000000..c194f094 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060100_simple_basic_types_and_values/Syn_060100_SimpleBasicTypes_002.ttcn @@ -0,0 +1,10 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:6.1.0, Assign large integer values + ** @verdict pass accept, noexecution + ***************************************************/ +module Syn_060100_SimpleBasicTypes_002 { + const integer c_i1 := 10000000000000; // large positive 10^13 + const integer c_i2 := -10000000000000; // large negative -10^13 +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060100_simple_basic_types_and_values/Syn_060100_SimpleBasicTypes_003.ttcn b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060100_simple_basic_types_and_values/Syn_060100_SimpleBasicTypes_003.ttcn new file mode 100644 index 00000000..3032b66e --- /dev/null +++ b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060100_simple_basic_types_and_values/Syn_060100_SimpleBasicTypes_003.ttcn @@ -0,0 +1,13 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:6.1.0, Assign different float values + ** @verdict pass accept, noexecution + ***************************************************/ +module Syn_060100_SimpleBasicTypes_003 { + const float c_f1 := 0.0; + const float c_f2 := 131E57; + const float c_f3 := 131E-57; + const float c_f4 := -502E55; + const float c_f5 := -502E-55; +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060100_simple_basic_types_and_values/Syn_060100_SimpleBasicTypes_004.ttcn b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060100_simple_basic_types_and_values/Syn_060100_SimpleBasicTypes_004.ttcn new file mode 100644 index 00000000..e2dae646 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060100_simple_basic_types_and_values/Syn_060100_SimpleBasicTypes_004.ttcn @@ -0,0 +1,12 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:6.1.0, Assign small and large float values + ** @verdict pass accept, noexecution + ***************************************************/ +module Syn_060100_SimpleBasicTypes_004 { + const float c_f1 := 2E256; // large positive 2^256 + const float c_f2 := -2E256; // large negative -2^256 + const float c_f3 := 2E-256; // small positive 2^-256 + const float c_f4 := -2E-256; // small negative -2^256 +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060100_simple_basic_types_and_values/Syn_060100_SimpleBasicTypes_005.ttcn b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060100_simple_basic_types_and_values/Syn_060100_SimpleBasicTypes_005.ttcn new file mode 100644 index 00000000..0a79fbf7 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060100_simple_basic_types_and_values/Syn_060100_SimpleBasicTypes_005.ttcn @@ -0,0 +1,10 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:6.1.0, Accept float mantisa for float values + ** @verdict pass accept, noexecution + ***************************************************/ +module Syn_060100_SimpleBasicTypes_005 { + const float c_f1 := 2.0E2; + const float c_f2 := -2.1E-1; +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060100_simple_basic_types_and_values/Syn_060100_SimpleBasicTypes_006.ttcn b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060100_simple_basic_types_and_values/Syn_060100_SimpleBasicTypes_006.ttcn new file mode 100644 index 00000000..2dc3fc2a --- /dev/null +++ b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060100_simple_basic_types_and_values/Syn_060100_SimpleBasicTypes_006.ttcn @@ -0,0 +1,13 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:6.1.0, Accept all verdict values + ** @verdict pass accept, noexecution + ***************************************************/ +module Syn_060100_SimpleBasicTypes_006 { + const verdicttype c_v1 := pass; + const verdicttype c_v2 := fail; + const verdicttype c_v4 := inconc; + const verdicttype c_v5 := none; + const verdicttype c_v6 := error; +} \ No newline at end of file diff --git a/ATS/core_language/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 b/ATS/core_language/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 new file mode 100644 index 00000000..625c8a11 --- /dev/null +++ b/ATS/core_language/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 @@ -0,0 +1,32 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:6.1.1.1, Access bitstring elements + ** @verdict pass reject + ***************************************************/ +/* The following requirements are tested: + * Only single elements of the string may be accessed. + * Trying to assign strings with length 0 or more than 1 + * to a string element using the array-like syntax shall + * cause an error. +*/ + +module NegSem_06010101_AccessStringElements_001 { + + type component GeneralComp {} + + testcase TC_NegSem_06010101_AccessStringElements_001() runs on GeneralComp { + var octetstring v_b := '100010'O; + v_b[1] := '11'O; //error: only individual elements can be accessed + if (v_b == '100001'O){ + setverdict(pass); + } + else { + setverdict(fail, "v_b:",v_b); + } + } + + control{ + execute(TC_NegSem_06010101_AccessStringElements_001()); + } +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/06010101_accessing_individual_string_elements/NegSem_06010101_AccessStringElements_002.ttcn b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/06010101_accessing_individual_string_elements/NegSem_06010101_AccessStringElements_002.ttcn new file mode 100644 index 00000000..a32ec0b4 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/06010101_accessing_individual_string_elements/NegSem_06010101_AccessStringElements_002.ttcn @@ -0,0 +1,32 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:6.1.1.1, Access bitstring elements + ** @verdict pass reject + ***************************************************/ +/* The following requirements are tested: + * The index shall be between zero and the + * length of the string minus one for retrieving + * an element from a string. Trying to retrieve outside + * this range shall cause an error. +*/ + +module NegSem_06010101_AccessStringElements_002 { + + type component GeneralComp {} + + testcase TC_NegSem_06010101_AccessStringElements_002() runs on GeneralComp { + var octetstring v_b := '100010'O; + v_b[6] := '01'O; //error: index outside of range + if (v_b == '100001'O){ + setverdict(pass); + } + else { + setverdict(fail, "v_b:",v_b); + } + } + + control{ + execute(TC_NegSem_06010101_AccessStringElements_002()); + } +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/06010101_accessing_individual_string_elements/NegSyn_06010101_AccessStringElements_001.ttcn b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/06010101_accessing_individual_string_elements/NegSyn_06010101_AccessStringElements_001.ttcn new file mode 100644 index 00000000..597dde18 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/06010101_accessing_individual_string_elements/NegSyn_06010101_AccessStringElements_001.ttcn @@ -0,0 +1,26 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:6.1.1.1, Access universal charstring elements + ** @verdict pass reject + ***************************************************/ +/* The following requirements are tested: + * For assigning an element to the end of a string, the length of the string should be used as + * index. Trying to assign an element to the end of a string with an index larger than the + * length of the string shall cause an error. +*/ + +module NegSyn_06010101_AccessStringElements_001 { + + type component GeneralComp {} + + testcase TC_NegSyn_06010101_AccessStringElements_001() runs on GeneralComp { + var universal charstring v_b := "AbCdE"; + + v_b[1] := "FF"; // incorrect legth + } + + control{ + execute(TC_NegSyn_06010101_AccessStringElements_001()); + } +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/06010101_accessing_individual_string_elements/NegSyn_06010101_AccessStringElements_002.ttcn b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/06010101_accessing_individual_string_elements/NegSyn_06010101_AccessStringElements_002.ttcn new file mode 100644 index 00000000..1ee45a04 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/06010101_accessing_individual_string_elements/NegSyn_06010101_AccessStringElements_002.ttcn @@ -0,0 +1,26 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:6.1.1.1, Access bitstring elements + ** @verdict pass reject + ***************************************************/ +/* The following requirements are tested: + * For initializing an uninitialized string with a single element, + * the index value zero (0) can be used as index. Trying to assign a + * single element to an uninitialized string with an index which is + * not zero (0) shall cause an error. +*/ + +module NegSyn_06010101_AccessStringElements_002 { + + type component GeneralComp {} + + testcase TC_NegSyn_06010101_AccessStringElements_002() runs on GeneralComp { + var universal charstring v_b := ""; + v_b[2] := "AB"; //error: incorrect index + } + + control{ + execute(TC_NegSyn_06010101_AccessStringElements_002()); + } +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/06010101_accessing_individual_string_elements/Sem_06010101_AccessStringElements_001.ttcn b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/06010101_accessing_individual_string_elements/Sem_06010101_AccessStringElements_001.ttcn new file mode 100644 index 00000000..82bb9839 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/06010101_accessing_individual_string_elements/Sem_06010101_AccessStringElements_001.ttcn @@ -0,0 +1,25 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:6.1.1.1, Access bitstring elements + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Sem_06010101_AccessStringElements_001 { + + type component GeneralComp {} + + testcase TC_Sem_06010101_AccessStringElements_001() runs on GeneralComp { + var bitstring v_b := '10001'B; + v_b[2] := '1'B; + if (v_b == '10101'B){ + setverdict(pass); + } + else { + setverdict(fail); + } + } + + control{ + execute(TC_Sem_06010101_AccessStringElements_001()); + } +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/06010101_accessing_individual_string_elements/Sem_06010101_AccessStringElements_002.ttcn b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/06010101_accessing_individual_string_elements/Sem_06010101_AccessStringElements_002.ttcn new file mode 100644 index 00000000..441def07 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/06010101_accessing_individual_string_elements/Sem_06010101_AccessStringElements_002.ttcn @@ -0,0 +1,25 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:6.1.1.1, Access octetstring elements + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Sem_06010101_AccessStringElements_002 { + + type component GeneralComp {} + + testcase TC_Sem_06010101_AccessStringElements_002() runs on GeneralComp { + var octetstring v_b := '100010'O; + v_b[2] := '01'O; + if (v_b == '100001'O){ + setverdict(pass); + } + else { + setverdict(fail); + } + } + + control{ + execute(TC_Sem_06010101_AccessStringElements_002()); + } +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/06010101_accessing_individual_string_elements/Sem_06010101_AccessStringElements_003.ttcn b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/06010101_accessing_individual_string_elements/Sem_06010101_AccessStringElements_003.ttcn new file mode 100644 index 00000000..f893fc57 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/06010101_accessing_individual_string_elements/Sem_06010101_AccessStringElements_003.ttcn @@ -0,0 +1,25 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:6.1.1.1, Access hexstring elements + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Sem_06010101_AccessStringElements_003 { + + type component GeneralComp {} + + testcase TC_Sem_06010101_AccessStringElements_003() runs on GeneralComp { + var hexstring v_b := '10001'H; + v_b[2] := '1'H; + if (v_b == '10101'H){ + setverdict(pass); + } + else { + setverdict(fail); + } + } + + control{ + execute(TC_Sem_06010101_AccessStringElements_003()); + } +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/06010101_accessing_individual_string_elements/Sem_06010101_AccessStringElements_004.ttcn b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/06010101_accessing_individual_string_elements/Sem_06010101_AccessStringElements_004.ttcn new file mode 100644 index 00000000..f7f25e81 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/06010101_accessing_individual_string_elements/Sem_06010101_AccessStringElements_004.ttcn @@ -0,0 +1,29 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:6.1.1.1, Access bitstring elements + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Sem_06010101_AccessStringElements_004 { + + type component GeneralComp {} + + testcase TC_Sem_06010101_AccessStringElements_004() runs on GeneralComp { + var bitstring v_b := ''B; + v_b[0] := '1'B; + v_b[1] := '0'B; + v_b[2] := '1'B; + v_b[3] := '0'B; + v_b[4] := '1'B; + if (v_b == '10101'B){ + setverdict(pass); + } + else { + setverdict(fail); + } + } + + control{ + execute(TC_Sem_06010101_AccessStringElements_004()); + } +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/06010101_accessing_individual_string_elements/Sem_06010101_AccessStringElements_005.ttcn b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/06010101_accessing_individual_string_elements/Sem_06010101_AccessStringElements_005.ttcn new file mode 100644 index 00000000..f88a8542 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/06010101_accessing_individual_string_elements/Sem_06010101_AccessStringElements_005.ttcn @@ -0,0 +1,29 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:6.1.1.1, Access hexstring elements + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Sem_06010101_AccessStringElements_005 { + + type component GeneralComp {} + + testcase TC_Sem_06010101_AccessStringElements_005() runs on GeneralComp { + var hexstring v_b := '00000'H; + v_b[0] := '1'H; + v_b[1] := '0'H; + v_b[2] := '1'H; + v_b[3] := '0'H; + v_b[4] := '1'H; + if (v_b == '10101'H){ + setverdict(pass); + } + else { + setverdict(fail); + } + } + + control{ + execute(TC_Sem_06010101_AccessStringElements_005()); + } +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/06010101_accessing_individual_string_elements/Sem_06010101_AccessStringElements_006.ttcn b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/06010101_accessing_individual_string_elements/Sem_06010101_AccessStringElements_006.ttcn new file mode 100644 index 00000000..2fbaf41e --- /dev/null +++ b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/06010101_accessing_individual_string_elements/Sem_06010101_AccessStringElements_006.ttcn @@ -0,0 +1,26 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:6.1.1.1, Access octetstring elements + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Sem_06010101_AccessStringElements_006 { + + type component GeneralComp {} + + testcase TC_Sem_06010101_AccessStringElements_006() runs on GeneralComp { + var octetstring v_b := ''O; + v_b[0] := '10'O; + v_b[1] := '01'O; + if (v_b == '1001'O){ + setverdict(pass); + } + else { + setverdict(fail); + } + } + + control{ + execute(TC_Sem_06010101_AccessStringElements_006()); + } +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/06010101_accessing_individual_string_elements/Sem_06010101_AccessStringElements_007.ttcn b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/06010101_accessing_individual_string_elements/Sem_06010101_AccessStringElements_007.ttcn new file mode 100644 index 00000000..ebfefd4b --- /dev/null +++ b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/06010101_accessing_individual_string_elements/Sem_06010101_AccessStringElements_007.ttcn @@ -0,0 +1,25 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:6.1.1.1, Access charstring elements + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Sem_06010101_AccessStringElements_007 { + + type component GeneralComp {} + + testcase TC_Sem_06010101_AccessStringElements_007() runs on GeneralComp { + var charstring v_b := "abc"; + v_b[2] := "d"; + if (v_b == "abd"){ + setverdict(pass); + } + else { + setverdict(fail); + } + } + + control{ + execute(TC_Sem_06010101_AccessStringElements_007()); + } +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/06010101_accessing_individual_string_elements/Sem_06010101_AccessStringElements_008.ttcn b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/06010101_accessing_individual_string_elements/Sem_06010101_AccessStringElements_008.ttcn new file mode 100644 index 00000000..f0f79386 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/06010101_accessing_individual_string_elements/Sem_06010101_AccessStringElements_008.ttcn @@ -0,0 +1,25 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:6.1.1.1, Access charstring elements + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Sem_06010101_AccessStringElements_008 { + + type component GeneralComp {} + + testcase TC_Sem_06010101_AccessStringElements_008() runs on GeneralComp { + var universal charstring v_b := char (0, 0, 40, 20); + v_b[0] := "d"; + if (v_b[0] == "d"){ + setverdict(pass); + } + else { + setverdict(fail); + } + } + + control{ + execute(TC_Sem_06010101_AccessStringElements_008()); + } +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/06010101_accessing_individual_string_elements/Sem_06010101_AccessStringElements_009.ttcn b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/06010101_accessing_individual_string_elements/Sem_06010101_AccessStringElements_009.ttcn new file mode 100644 index 00000000..275174a3 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/06010101_accessing_individual_string_elements/Sem_06010101_AccessStringElements_009.ttcn @@ -0,0 +1,26 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:6.1.1.1, Access charstring elements with non printable characters + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Sem_06010101_AccessStringElements_009 { + + type component GeneralComp {} + + testcase TC_Sem_06010101_AccessStringElements_009() runs on GeneralComp { + var universal charstring v_b := char (0, 0, 1, 116); + + + if (v_b == "Ŵ" ){ + setverdict(pass); + } + else { + setverdict(fail); + } + } + + control{ + execute(TC_Sem_06010101_AccessStringElements_009()); + } +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/06010101_accessing_individual_string_elements/Sem_06010101_AccessStringElements_010.ttcn b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/06010101_accessing_individual_string_elements/Sem_06010101_AccessStringElements_010.ttcn new file mode 100644 index 00000000..222877e6 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/06010101_accessing_individual_string_elements/Sem_06010101_AccessStringElements_010.ttcn @@ -0,0 +1,25 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:6.1.1.1, Ensure that For initializing an uninitialized string with a single element, the index value zero (0) can be used as index. + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Sem_06010101_AccessStringElements_010 { + + type component GeneralComp {} + + testcase TC_Sem_06010101_AccessStringElements_010() runs on GeneralComp { + var universal charstring v_b :=""; + v_b[0] := "a"; + if (v_b == "a"){ + setverdict(pass); + } + else { + setverdict(fail); + } + } + + control{ + execute(TC_Sem_06010101_AccessStringElements_010()); + } +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/060101_toplevel/NegSyn_060101_TopLevel_001.ttcn b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/060101_toplevel/NegSyn_060101_TopLevel_001.ttcn new file mode 100644 index 00000000..12ecdefa --- /dev/null +++ b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/060101_toplevel/NegSyn_060101_TopLevel_001.ttcn @@ -0,0 +1,9 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:6.1.1, Assign invalid bitstring value + ** @verdict pass reject + ***************************************************/ +module NegSyn_060101_TopLevel_001 { + const bitstring c_b1 := '2'B; // not an bitstring value +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/060101_toplevel/NegSyn_060101_TopLevel_002.ttcn b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/060101_toplevel/NegSyn_060101_TopLevel_002.ttcn new file mode 100644 index 00000000..d9a660fe --- /dev/null +++ b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/060101_toplevel/NegSyn_060101_TopLevel_002.ttcn @@ -0,0 +1,9 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:6.1.1, Assign string to bitstring values + ** @verdict pass reject + ***************************************************/ +module NegSyn_060101_TopLevel_002 { + const bitstring c_b1 := "1"; // not an bitstring value +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/060101_toplevel/NegSyn_060101_TopLevel_003.ttcn b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/060101_toplevel/NegSyn_060101_TopLevel_003.ttcn new file mode 100644 index 00000000..727035fc --- /dev/null +++ b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/060101_toplevel/NegSyn_060101_TopLevel_003.ttcn @@ -0,0 +1,9 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:6.1.1, Assign octetstring to bitstring values + ** @verdict pass reject + ***************************************************/ +module NegSyn_060101_TopLevel_003 { + const bitstring c_b1 := '01'O; // not an bitstring value +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/060101_toplevel/NegSyn_060101_TopLevel_004.ttcn b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/060101_toplevel/NegSyn_060101_TopLevel_004.ttcn new file mode 100644 index 00000000..83d4d380 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/060101_toplevel/NegSyn_060101_TopLevel_004.ttcn @@ -0,0 +1,9 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:6.1.1, Assign invalid hexstring value + ** @verdict pass reject + ***************************************************/ +module NegSyn_060101_TopLevel_004 { + const hexstring c_b1 := '01H'O; // not an hexstring value +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/060101_toplevel/NegSyn_060101_TopLevel_005.ttcn b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/060101_toplevel/NegSyn_060101_TopLevel_005.ttcn new file mode 100644 index 00000000..185f3b9f --- /dev/null +++ b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/060101_toplevel/NegSyn_060101_TopLevel_005.ttcn @@ -0,0 +1,9 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:6.1.1, Assign string to hexstring values + ** @verdict pass reject + ***************************************************/ +module NegSyn_060101_TopLevel_005 { + const hexstring c_b1 := "010"; // not an hexstring value +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/060101_toplevel/NegSyn_060101_TopLevel_006.ttcn b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/060101_toplevel/NegSyn_060101_TopLevel_006.ttcn new file mode 100644 index 00000000..6430eb1f --- /dev/null +++ b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/060101_toplevel/NegSyn_060101_TopLevel_006.ttcn @@ -0,0 +1,9 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:6.1.1, Assign octetstring to hexstring values + ** @verdict pass reject + ***************************************************/ +module NegSyn_060101_TopLevel_006 { + const hexstring c_b1 := '01'O; // not an hexstring value +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/060101_toplevel/NegSyn_060101_TopLevel_007.ttcn b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/060101_toplevel/NegSyn_060101_TopLevel_007.ttcn new file mode 100644 index 00000000..55583dde --- /dev/null +++ b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/060101_toplevel/NegSyn_060101_TopLevel_007.ttcn @@ -0,0 +1,9 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:6.1.1, Assign invalid hexstring value + ** @verdict pass reject + ***************************************************/ +module NegSyn_060101_TopLevel_007 { + const octetstring c_b1 := '1FA'O; // not an octetstring value, odd number of nibbles +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/060101_toplevel/NegSyn_060101_TopLevel_008.ttcn b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/060101_toplevel/NegSyn_060101_TopLevel_008.ttcn new file mode 100644 index 00000000..2289256b --- /dev/null +++ b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/060101_toplevel/NegSyn_060101_TopLevel_008.ttcn @@ -0,0 +1,9 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:6.1.1, Assign string to octetstring values + ** @verdict pass reject + ***************************************************/ +module NegSyn_060101_TopLevel_008 { + const octetstring c_b1 := "F15A"; // not an octetstring value +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/060101_toplevel/NegSyn_060101_TopLevel_009.ttcn b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/060101_toplevel/NegSyn_060101_TopLevel_009.ttcn new file mode 100644 index 00000000..11055d67 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/060101_toplevel/NegSyn_060101_TopLevel_009.ttcn @@ -0,0 +1,9 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:6.1.1, Assign hexstring to octetstring values + ** @verdict pass reject + ***************************************************/ +module NegSyn_060101_TopLevel_009 { + const octetstring c_b1 := 'FA'H; // not an octetstring value +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/060101_toplevel/NegSyn_060101_TopLevel_010.ttcn b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/060101_toplevel/NegSyn_060101_TopLevel_010.ttcn new file mode 100644 index 00000000..c07aff4e --- /dev/null +++ b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/060101_toplevel/NegSyn_060101_TopLevel_010.ttcn @@ -0,0 +1,9 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:6.1.1, Assign invalid hexstring value + ** @verdict pass reject + ***************************************************/ +module NegSyn_060101_TopLevel_010 { + const octetstring c_b1 := '1FAH'O; // not an octetstring value, H not valid +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/060101_toplevel/Sem_060101_TopLevel_001.ttcn b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/060101_toplevel/Sem_060101_TopLevel_001.ttcn new file mode 100644 index 00000000..c595f2f7 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/060101_toplevel/Sem_060101_TopLevel_001.ttcn @@ -0,0 +1,25 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:6.1.1, Assign and read bitstring + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Sem_060101_TopLevel_001 { + + const bitstring c_b := '10001'B; + + type component GeneralComp {} + + testcase TC_Sem_611_TopLevel_001() runs on GeneralComp { + if (c_b == '10001'B){ + setverdict(pass); + } + else { + setverdict(fail); + } + } + + control{ + execute(TC_Sem_611_TopLevel_001()); + } +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/060101_toplevel/Sem_060101_TopLevel_002.ttcn b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/060101_toplevel/Sem_060101_TopLevel_002.ttcn new file mode 100644 index 00000000..50ff0e7a --- /dev/null +++ b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/060101_toplevel/Sem_060101_TopLevel_002.ttcn @@ -0,0 +1,25 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:6.1.1, Assign and read hexstring + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Sem_060101_TopLevel_002 { + + const hexstring c_h := 'E1F0A'H; + + type component GeneralComp {} + + testcase TC_Sem_611_TopLevel_002() runs on GeneralComp { + if (c_h == 'e1f0a'H){ + setverdict(pass); + } + else { + setverdict(fail); + } + } + + control{ + execute(TC_Sem_611_TopLevel_002()); + } +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/060101_toplevel/Sem_060101_TopLevel_003.ttcn b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/060101_toplevel/Sem_060101_TopLevel_003.ttcn new file mode 100644 index 00000000..16564c91 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/060101_toplevel/Sem_060101_TopLevel_003.ttcn @@ -0,0 +1,25 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:6.1.1, Assign and read octetstring + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Sem_060101_TopLevel_003 { + + const octetstring c_o := 'E1F30A'O; + + type component GeneralComp {} + + testcase TC_Sem_611_TopLevel_003() runs on GeneralComp { + if (c_o == 'e1f30a'O){ + setverdict(pass); + } + else { + setverdict(fail); + } + } + + control{ + execute(TC_Sem_611_TopLevel_003()); + } +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/060101_toplevel/Sem_060101_TopLevel_004.ttcn b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/060101_toplevel/Sem_060101_TopLevel_004.ttcn new file mode 100644 index 00000000..8cb5dee6 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/060101_toplevel/Sem_060101_TopLevel_004.ttcn @@ -0,0 +1,32 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:6.1.1, Assign and read charstring + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Sem_060101_TopLevel_004 { + + const charstring c_s1 := "abcdef"; + const charstring c_s2 := "ab""cdef"; + + type component GeneralComp {} + + testcase TC_Sem_611_TopLevel_004() runs on GeneralComp { + if (c_s1 == "abcdef"){ + setverdict(pass); + } + else { + setverdict(fail); + } + if (lengthof(c_s2) == 7){ + setverdict(pass); + } + else { + setverdict(fail); + } + } + + control{ + execute(TC_Sem_611_TopLevel_004()); + } +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/060101_toplevel/Sem_060101_TopLevel_005.ttcn b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/060101_toplevel/Sem_060101_TopLevel_005.ttcn new file mode 100644 index 00000000..08cfdc6e --- /dev/null +++ b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/060101_toplevel/Sem_060101_TopLevel_005.ttcn @@ -0,0 +1,25 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:6.1.1, Assign and read universal charstring + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Sem_060101_TopLevel_005 { + + const universal charstring c_s1 := char (0, 0, 40, 48) & char ( 0, 0, 1, 113); + + type component GeneralComp {} + + testcase TC_Sem_611_TopLevel_005() runs on GeneralComp { + if (lengthof(c_s1) == 2) { + setverdict(pass); + } + else { + setverdict(fail); + } + } + + control{ + execute(TC_Sem_611_TopLevel_005()); + } +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/060101_toplevel/Sem_060101_TopLevel_006.ttcn b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/060101_toplevel/Sem_060101_TopLevel_006.ttcn new file mode 100644 index 00000000..5f0daa9c --- /dev/null +++ b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/060101_toplevel/Sem_060101_TopLevel_006.ttcn @@ -0,0 +1,25 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:6.1.1, Assign and read universal charstring + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Sem_060101_TopLevel_006 { + + const universal charstring c_s1 := "the Braille character " & char (0, 0, 40, 48) & "looks like this"; + + type component GeneralComp {} + + testcase TC_Sem_611_TopLevel_006() runs on GeneralComp { + if (lengthof(c_s1) > 10) { + setverdict(pass); + } + else { + setverdict(fail); + } + } + + control{ + execute(TC_Sem_611_TopLevel_006()); + } +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/060101_toplevel/Sem_060101_TopLevel_007.ttcn b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/060101_toplevel/Sem_060101_TopLevel_007.ttcn new file mode 100644 index 00000000..069d553c --- /dev/null +++ b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/060101_toplevel/Sem_060101_TopLevel_007.ttcn @@ -0,0 +1,42 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:6.1.1, Assign and read universal charstring using USI like notation + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +/* The following requirements are tested: + The UCS sequence identifier-like (USI-like) notation using their short identifiers of code point. The USI-like notation is composed of the keyword char followed by parentheses. The +parentheses enclose a comma-separated list of short identifiers . Each short identifier represents a single +character and it shall be composed of a letter U or u followed by an optional "+" PLUS SIGN character, +followed by 1..8 hexadecimal digits. +*/ + +module Sem_060101_TopLevel_007 { + + type component GeneralComp {} + + testcase TC_Sem_060101_TopLevel_007() runs on GeneralComp { + var universal charstring v_a := char(U0041); //USI notation for character "A" + var universal charstring v_b := char(U0171); //USI notation for character "ű" + var universal charstring v_c := char(U41); //USI notation for character "A" without leading zeroes + var universal charstring v_d := char(U+171,U41); //USI notation for character "ű" and "A" without leading zeroes and + sign notation + + + + if (match(v_a,"A") and + match(v_b,"ű") and + match(v_c,"A") and + match(v_d,"űA")) + { + setverdict(pass,"v_a:",v_a, "v_b:",v_b, "v_c:",v_c,"v_d:",v_d); + } + else { + setverdict(fail,"v_a:",v_a, "v_b:",v_b, "v_c:",v_c,"v_d:",v_d); + } + } + + control{ + execute(TC_Sem_060101_TopLevel_007()); + } +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/060101_toplevel/Sem_060101_TopLevel_008.ttcn b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/060101_toplevel/Sem_060101_TopLevel_008.ttcn new file mode 100644 index 00000000..4b60931c --- /dev/null +++ b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/060101_toplevel/Sem_060101_TopLevel_008.ttcn @@ -0,0 +1,34 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:6.1.1, Assign and read bitstring with newline character + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +/* The following requirements are tested: + * Within the quotes any number of whitespaces or any sequence of the following C0 control characters: + * LF(10), VT(11), FF(12), CR(13) which constitutes a newline may be included. The newline shall be preceded by a backslash ("\"). + * Such whitespaces, control characters and backslash will be ignored for the value and length calculation. +*/ + +module Sem_060101_TopLevel_008 { + + type component GeneralComp {} + + testcase TC_Sem_060101_TopLevel_008() runs on GeneralComp { + var bitstring v_a := '0101\ + 1010'B; + + if (match(v_a,'01011010'B)) + { + setverdict(pass,"v_a:",v_a); + } + else { + setverdict(fail,"v_a:",v_a); + } + } + + control{ + execute(TC_Sem_060101_TopLevel_008()); + } +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/060101_toplevel/Sem_060101_TopLevel_009.ttcn b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/060101_toplevel/Sem_060101_TopLevel_009.ttcn new file mode 100644 index 00000000..24df894b --- /dev/null +++ b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/060101_toplevel/Sem_060101_TopLevel_009.ttcn @@ -0,0 +1,34 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:6.1.1, Ensure that whitespaces, control characters and backslash will be ignored for the bitstring length calculation + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +/* The following requirements are tested: + * Within the quotes any number of whitespaces or any sequence of the following C0 control characters: + * LF(10), VT(11), FF(12), CR(13) which constitutes a newline may be included. The newline shall be preceded by a backslash ("\"). + * Such whitespaces, control characters and backslash will be ignored for the value and length calculation. +*/ + +module Sem_060101_TopLevel_009 { + + type component GeneralComp {} + + testcase TC_Sem_060101_TopLevel_009() runs on GeneralComp { + var bitstring v_a := '0101\ + 1010'B; + + if (match(lengthof(v_a), 8)) + { + setverdict(pass,"Size of v_a is:",lengthof(v_a)); + } + else { + setverdict(fail,"Size of v_a is:",lengthof(v_a)); + } + } + + control{ + execute(TC_Sem_060101_TopLevel_009()); + } +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/060101_toplevel/Sem_060101_TopLevel_010.ttcn b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/060101_toplevel/Sem_060101_TopLevel_010.ttcn new file mode 100644 index 00000000..555fc302 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/060101_toplevel/Sem_060101_TopLevel_010.ttcn @@ -0,0 +1,34 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:6.1.1, Assign and read hexstring with newline character + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +/* The following requirements are tested: + * Within the quotes any number of whitespaces or any sequence of the following C0 control characters: + * LF(10), VT(11), FF(12), CR(13) which constitutes a newline may be included. The newline shall be preceded by a backslash ("\"). + * Such whitespaces, control characters and backslash will be ignored for the value and length calculation. +*/ + +module Sem_060101_TopLevel_010 { + + type component GeneralComp {} + + testcase TC_Sem_060101_TopLevel_010() runs on GeneralComp { + var hexstring v_a := 'Ab\ + cD'H; + + if (match(v_a,'AbcD'H)) + { + setverdict(pass,"v_a:",v_a); + } + else { + setverdict(fail,"v_a:",v_a); + } + } + + control{ + execute(TC_Sem_060101_TopLevel_010()); + } +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/060101_toplevel/Sem_060101_TopLevel_011.ttcn b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/060101_toplevel/Sem_060101_TopLevel_011.ttcn new file mode 100644 index 00000000..f7a9a3ff --- /dev/null +++ b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/060101_toplevel/Sem_060101_TopLevel_011.ttcn @@ -0,0 +1,36 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:6.1.1, Ensure that whitespaces, control characters and backslash will be ignored for the hexstring length calculation + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +/* The following requirements are tested: + * Within the quotes any number of whitespaces or any sequence of the following C0 control characters: + * LF(10), VT(11), FF(12), CR(13) which constitutes a newline may be included. The newline shall be preceded by a backslash ("\"). + * Such whitespaces, control characters and backslash will be ignored for the value and length calculation. +*/ + +module Sem_060101_TopLevel_011 { + + type component GeneralComp {} + + testcase TC_Sem_060101_TopLevel_011() runs on GeneralComp { + var hexstring v_a := '12\ + 34\ + Ab\ + Cd'H; + + if (match(lengthof(v_a), 8)) + { + setverdict(pass,"Size of v_a is:",lengthof(v_a)); + } + else { + setverdict(fail,"Size of v_a is:",lengthof(v_a)); + } + } + + control{ + execute(TC_Sem_060101_TopLevel_011()); + } +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/060101_toplevel/Sem_060101_TopLevel_012.ttcn b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/060101_toplevel/Sem_060101_TopLevel_012.ttcn new file mode 100644 index 00000000..38ed0780 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/060101_toplevel/Sem_060101_TopLevel_012.ttcn @@ -0,0 +1,34 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:6.1.1, Assign and read octetstring with newline character + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +/* The following requirements are tested: + * Within the quotes any number of whitespaces or any sequence of the following C0 control characters: + * LF(10), VT(11), FF(12), CR(13) which constitutes a newline may be included. The newline shall be preceded by a backslash ("\"). + * Such whitespaces, control characters and backslash will be ignored for the value and length calculation. +*/ + +module Sem_060101_TopLevel_012 { + + type component GeneralComp {} + + testcase TC_Sem_060101_TopLevel_012() runs on GeneralComp { + var octetstring v_a := '1234\ + 56'O; + + if (match(v_a,'123456'O)) + { + setverdict(pass,"v_a:",v_a); + } + else { + setverdict(fail,"v_a:",v_a); + } + } + + control{ + execute(TC_Sem_060101_TopLevel_012()); + } +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/060101_toplevel/Sem_060101_TopLevel_013.ttcn b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/060101_toplevel/Sem_060101_TopLevel_013.ttcn new file mode 100644 index 00000000..5b20d0f2 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/060101_toplevel/Sem_060101_TopLevel_013.ttcn @@ -0,0 +1,35 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:6.1.1, Ensure that whitespaces, control characters and backslash will be ignored for the octetstring length calculation + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +/* The following requirements are tested: + * Within the quotes any number of whitespaces or any sequence of the following C0 control characters: + * LF(10), VT(11), FF(12), CR(13) which constitutes a newline may be included. The newline shall be preceded by a backslash ("\"). + * Such whitespaces, control characters and backslash will be ignored for the value and length calculation. +*/ + +module Sem_060101_TopLevel_013 { + + type component GeneralComp {} + + testcase TC_Sem_060101_TopLevel_013() runs on GeneralComp { + var octetstring v_a := '12\ + 34\ + 56'O; // 3 octets + + if (match(lengthof(v_a), 3)) + { + setverdict(pass,"Size of v_a is: ",lengthof(v_a)); + } + else { + setverdict(fail,"Size of v_a is: ",lengthof(v_a)); + } + } + + control{ + execute(TC_Sem_060101_TopLevel_013()); + } +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/060101_toplevel/Sem_060101_TopLevel_014.ttcn b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/060101_toplevel/Sem_060101_TopLevel_014.ttcn new file mode 100644 index 00000000..e8bbef42 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/060101_toplevel/Sem_060101_TopLevel_014.ttcn @@ -0,0 +1,26 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:6.1.1, Ensure that whitespaces and backslash character is allowed in a universal charstring + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +module Sem_060101_TopLevel_014 { + + type component GeneralComp {} + + testcase TC_Sem_060101_TopLevel_014() runs on GeneralComp { + var universal charstring v_a := "ABC\ DEF"; + if (match(v_a,"ABC\ DEF")) + { + setverdict(pass,"v_a:",v_a); + } + else { + setverdict(fail,"v_a:",v_a); + } + } + + control{ + execute(TC_Sem_060101_TopLevel_014()); + } +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/060101_toplevel/Sem_060101_TopLevel_015.ttcn b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/060101_toplevel/Sem_060101_TopLevel_015.ttcn new file mode 100644 index 00000000..6c311184 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/060101_toplevel/Sem_060101_TopLevel_015.ttcn @@ -0,0 +1,27 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:6.1.1,Ensure that whitespaces, control characters and backslash will be included for the universal charstring length calculation + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +module Sem_060101_TopLevel_015 { + + type component GeneralComp {} + + testcase TC_Sem_060101_TopLevel_015() runs on GeneralComp { + var universal charstring v_a := "ABC\ DEF"; //lengthof(v_a) is 11 + + if (match(lengthof(v_a), 11)) + { + setverdict(pass,"Size of v_a is:",lengthof(v_a)); + } + else { + setverdict(fail,"Size of v_a is:",lengthof(v_a)); + } + } + + control{ + execute(TC_Sem_060101_TopLevel_015()); + } +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/060101_toplevel/Syn_060101_TopLevel_001.ttcn b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/060101_toplevel/Syn_060101_TopLevel_001.ttcn new file mode 100644 index 00000000..1d3f0b07 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/060101_toplevel/Syn_060101_TopLevel_001.ttcn @@ -0,0 +1,13 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:6.1.1, Assign different bitstring values + ** @verdict pass accept, noexecution + ***************************************************/ +module Syn_060101_TopLevel_001 { + const bitstring c_b1 := '0'B; + const bitstring c_b2 := '1'B; + const bitstring c_b3 := '01001'B; + const bitstring c_b4 := '000000000000000000000'B; + const bitstring c_b5 := '111111111111111111111'B; +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/060101_toplevel/Syn_060101_TopLevel_002.ttcn b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/060101_toplevel/Syn_060101_TopLevel_002.ttcn new file mode 100644 index 00000000..0e6961ee --- /dev/null +++ b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/060101_toplevel/Syn_060101_TopLevel_002.ttcn @@ -0,0 +1,13 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:6.1.1, Assign different hexstring values + ** @verdict pass accept, noexecution + ***************************************************/ +module Syn_060101_TopLevel_002 { + const hexstring c_h1 := '0'H; + const hexstring c_h2 := '1FaB5'H; + const hexstring c_h3 := '07aDC4'H; + const hexstring c_h4 := '0000000000000000000000000'H; + const hexstring c_h5 := 'FFFFFFFFFFFFFFFFFFFFFFFFF'H; +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/060101_toplevel/Syn_060101_TopLevel_003.ttcn b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/060101_toplevel/Syn_060101_TopLevel_003.ttcn new file mode 100644 index 00000000..7a23da43 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/060101_toplevel/Syn_060101_TopLevel_003.ttcn @@ -0,0 +1,13 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:6.1.1, Assign different octetstring values + ** @verdict pass accept, noexecution + ***************************************************/ +module Syn_060101_TopLevel_003 { + const octetstring c_o1 := '00'O; + const octetstring c_o2 := '1Fa3B5'O; + const octetstring c_o3 := '07aDC4'O; + const octetstring c_o4 := '000000000000000000000000'O; + const octetstring c_o5 := 'FFFFFFFFFFFFFFFFFFFFFFFF'O; +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010201_lists_of_values/NOTES b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010201_lists_of_values/NOTES new file mode 100644 index 00000000..b3f4afeb --- /dev/null +++ b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010201_lists_of_values/NOTES @@ -0,0 +1,2 @@ +- TODO: missing positive semantic tests for all types except bitstring +- TODO: missing negative tests for universal charstring \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010201_lists_of_values/NegSem_06010201_ListOfValues_001.ttcn b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010201_lists_of_values/NegSem_06010201_ListOfValues_001.ttcn new file mode 100644 index 00000000..6dfee92b --- /dev/null +++ b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010201_lists_of_values/NegSem_06010201_ListOfValues_001.ttcn @@ -0,0 +1,20 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:6.1.2.1, Assign values to restricted bitstring. + ** @verdict pass reject + ***************************************************/ +module NegSem_06010201_ListOfValues_001 { + type bitstring MyListOfBitStrings ('01'B, '10'B, '11'B); + + type component GeneralComp {} + + testcase TC_NegSem_06010201_ListOfValues_001() runs on GeneralComp { + var MyListOfBitStrings v_b := '00'B; // value is not defined by the type + setverdict(pass); + } + + control{ + execute(TC_NegSem_06010201_ListOfValues_001()); + } +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010201_lists_of_values/NegSem_06010201_ListOfValues_002.ttcn b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010201_lists_of_values/NegSem_06010201_ListOfValues_002.ttcn new file mode 100644 index 00000000..09ad4d0f --- /dev/null +++ b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010201_lists_of_values/NegSem_06010201_ListOfValues_002.ttcn @@ -0,0 +1,20 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:6.1.2.1, Assign values to restricted hexstring. + ** @verdict pass reject + ***************************************************/ +module NegSem_06010201_ListOfValues_002 { + type hexstring MyListOfHexStrings ('01'H, '10'H); + + type component GeneralComp {} + + testcase TC_NegSem_06010201_ListOfValues_002() runs on GeneralComp { + var MyListOfHexStrings v_h := '00'H; // value is not defined by the type + setverdict(pass); + } + + control{ + execute(TC_NegSem_06010201_ListOfValues_002()); + } +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010201_lists_of_values/NegSem_06010201_ListOfValues_003.ttcn b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010201_lists_of_values/NegSem_06010201_ListOfValues_003.ttcn new file mode 100644 index 00000000..af74c98d --- /dev/null +++ b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010201_lists_of_values/NegSem_06010201_ListOfValues_003.ttcn @@ -0,0 +1,20 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:6.1.2.1, Assign values to restricted octetstring. + ** @verdict pass reject + ***************************************************/ +module NegSem_06010201_ListOfValues_003 { + type octetstring MyListOfOctetStrings ('01'O, '10'O); + + type component GeneralComp {} + + testcase TC_NegSem_06010201_ListOfValues_003() runs on GeneralComp { + var MyListOfOctetStrings v_h := '00'O; // value is not defined by the type + setverdict(pass); + } + + control{ + execute(TC_NegSem_06010201_ListOfValues_003()); + } +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010201_lists_of_values/NegSem_06010201_ListOfValues_004.ttcn b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010201_lists_of_values/NegSem_06010201_ListOfValues_004.ttcn new file mode 100644 index 00000000..ee6d7b60 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010201_lists_of_values/NegSem_06010201_ListOfValues_004.ttcn @@ -0,0 +1,20 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:6.1.2.1, Assign values to restricted charstring. + ** @verdict pass reject + ***************************************************/ +module NegSem_06010201_ListOfValues_004 { + type charstring MyCharstr ("a", "abc"); + + type component GeneralComp {} + + testcase TC_NegSem_06010201_ListOfValues_004() runs on GeneralComp { + var MyCharstr v_b := "d"; // value is not defined by the type + setverdict(pass); + } + + control{ + execute(TC_NegSem_06010201_ListOfValues_004()); + } +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010201_lists_of_values/NegSem_06010201_ListOfValues_005.ttcn b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010201_lists_of_values/NegSem_06010201_ListOfValues_005.ttcn new file mode 100644 index 00000000..75dc329b --- /dev/null +++ b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010201_lists_of_values/NegSem_06010201_ListOfValues_005.ttcn @@ -0,0 +1,20 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:6.1.2.1, Assign values to restricted integer. + ** @verdict pass reject + ***************************************************/ +module NegSem_06010201_ListOfValues_005 { + type integer MyInt (1, 5); + + type component GeneralComp {} + + testcase TC_NegSem_06010201_ListOfValues_005() runs on GeneralComp { + var MyInt v_i := 2; // value is not defined by the type + setverdict(pass); + } + + control{ + execute(TC_NegSem_06010201_ListOfValues_005()); + } +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010201_lists_of_values/NegSem_06010201_ListOfValues_006.ttcn b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010201_lists_of_values/NegSem_06010201_ListOfValues_006.ttcn new file mode 100644 index 00000000..e7f7c393 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010201_lists_of_values/NegSem_06010201_ListOfValues_006.ttcn @@ -0,0 +1,20 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:6.1.2.1, Assign values to restricted float. + ** @verdict pass reject + ***************************************************/ +module NegSem_06010201_ListOfValues_006 { + type float MyFloat (1.0, 5.0); + + type component GeneralComp {} + + testcase TC_NegSem_06010201_ListOfValues_006() runs on GeneralComp { + var MyFloat v_f := 2.0; // value is not defined by the type + setverdict(pass); + } + + control{ + execute(TC_NegSem_06010201_ListOfValues_006()); + } +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010201_lists_of_values/Sem_06010201_ListOfValues_001.ttcn b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010201_lists_of_values/Sem_06010201_ListOfValues_001.ttcn new file mode 100644 index 00000000..58a5900c --- /dev/null +++ b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010201_lists_of_values/Sem_06010201_ListOfValues_001.ttcn @@ -0,0 +1,25 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:6.1.2.1, Assign invalid values to restricted bitstring. + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Sem_06010201_ListOfValues_001 { + type bitstring MyListOfBitStrings ('01'B, '10'B, '11'B); + + type component GeneralComp {} + + testcase TC_Sem_06010201_ListOfValues_001() runs on GeneralComp { + var MyListOfBitStrings v_b := '10'B; + if (v_b == '10'B){ + setverdict(pass); + } + else { + setverdict(fail); + } + } + + control{ + execute(TC_Sem_06010201_ListOfValues_001()); + } +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010202_lists_of_types/NOTES b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010202_lists_of_types/NOTES new file mode 100644 index 00000000..fd260736 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010202_lists_of_types/NOTES @@ -0,0 +1 @@ +- TODO: missing positive and negative semantic tests for all types except bitstring diff --git a/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010202_lists_of_types/NegSem_06010202_ListOfTypes_001.ttcn b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010202_lists_of_types/NegSem_06010202_ListOfTypes_001.ttcn new file mode 100644 index 00000000..38f3e525 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010202_lists_of_types/NegSem_06010202_ListOfTypes_001.ttcn @@ -0,0 +1,22 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:6.1.2.2, Assign invalid values to list of types restricted bitstring. + ** @verdict pass reject + ***************************************************/ +module NegSem_06010202_ListOfTypes_001 { + type bitstring BitStrings1 ('0'B, '1'B ); + type bitstring BitStrings2 ('00'B, '01'B, '10'B, '10'B); + type bitstring BitStrings_1_2 (BitStrings1, BitStrings2); + + type component GeneralComp {} + + testcase TC_NegSem_06010202_ListOfTypes_001() runs on GeneralComp { + var BitStrings_1_2 v_b := '11'B; // 11 is not defined by the type + setverdict(pass); + } + + control{ + execute(TC_NegSem_06010202_ListOfTypes_001()); + } +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010202_lists_of_types/NegSem_06010202_ListOfTypes_002.ttcn b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010202_lists_of_types/NegSem_06010202_ListOfTypes_002.ttcn new file mode 100644 index 00000000..262a9555 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010202_lists_of_types/NegSem_06010202_ListOfTypes_002.ttcn @@ -0,0 +1,23 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:6.1.2.2, Assign invalid values to list of types restricted hexstring. + ** @verdict pass reject + ***************************************************/ +module NegSem_06010202_ListOfTypes_002 { + type hexstring HexStrings1 ('FE80'H, '01'H ); + type hexstring HexStrings2 ('00'H, '7F'H, 'B8'H, 'A0'H); + type hexstring HexStrings_1_2 (HexStrings1, HexStrings2); + + type component GeneralComp {} + + testcase TC_NegSem_06010202_ListOfTypes_002() runs on GeneralComp { + var HexStrings_1_2 v_b; + v_b := 'FE70'H; //FE70 value is not defined by any hexstrings + setverdict(pass); + } + + control{ + execute(TC_NegSem_06010202_ListOfTypes_002()); + } +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010202_lists_of_types/NegSem_06010202_ListOfTypes_003.ttcn b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010202_lists_of_types/NegSem_06010202_ListOfTypes_003.ttcn new file mode 100644 index 00000000..aa0f9fe3 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010202_lists_of_types/NegSem_06010202_ListOfTypes_003.ttcn @@ -0,0 +1,23 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:6.1.2.2, Assign invalid values to list of types restricted octetstring. + ** @verdict pass reject + ***************************************************/ +module NegSem_06010202_ListOfTypes_003 { + type octetstring Firstoctetstrings('0036'O,'0050'O); //30 and 40 in decimal + type octetstring Secondtoctetstrings ('0074'O,'0120'O); //50 and 60 in decimal + type octetstring octetStrings_1_2 (Firstoctetstrings, Secondtoctetstrings); + + type component GeneralComp {} + + testcase TC_NegSem_06010202_ListOfTypes_003() runs on GeneralComp { + var octetStrings_1_2 v_b; + v_b := '0014'O; // '0014'O value is not defined + setverdict(pass); + } + + control{ + execute(TC_NegSem_06010202_ListOfTypes_003()); + } +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010202_lists_of_types/NegSem_06010202_ListOfTypes_004.ttcn b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010202_lists_of_types/NegSem_06010202_ListOfTypes_004.ttcn new file mode 100644 index 00000000..8bf77b75 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010202_lists_of_types/NegSem_06010202_ListOfTypes_004.ttcn @@ -0,0 +1,23 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:6.1.2.2, Assign invalid values to list of types restricted charstring. + ** @verdict pass reject + ***************************************************/ +module NegSem_06010202_ListOfTypes_004 { + type charstring Firstcharstrings("abc", "def"); + type charstring Secondcharstrings("ghi", "jkl"); + type charstring charStrings_1_2 (Firstcharstrings,Secondcharstrings); + + type component GeneralComp {} + + testcase TC_NegSem_06010202_ListOfTypes_004() runs on GeneralComp { + var charStrings_1_2 v_b; + v_b := "xyz"; // invalid charsting + setverdict(pass); + } + + control{ + execute(TC_NegSem_06010202_ListOfTypes_004()); + } +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010202_lists_of_types/NegSem_06010202_ListOfTypes_005.ttcn b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010202_lists_of_types/NegSem_06010202_ListOfTypes_005.ttcn new file mode 100644 index 00000000..9bdd6366 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010202_lists_of_types/NegSem_06010202_ListOfTypes_005.ttcn @@ -0,0 +1,22 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:6.1.2.2, Assign invalid values to list of types restricted universal charstrings. + ** @verdict pass reject + ***************************************************/ +module NegSem_06010202_ListOfTypes_005 { + type universal charstring unicharString1 ("0" .. "9","A".."Z"); // charstring between "0" and "9" and "A".."Z" + type universal charstring unicharString2 ("a".."z"); // charstring between "a" to "z" + type universal charstring unicharStrings_1_2 (unicharString1, unicharString2); + type component GeneralComp {} + + testcase TC_NegSem_06010202_ListOfTypes_005() runs on GeneralComp { + var unicharStrings_1_2 v_b; + v_b:="?"; // invalid + setverdict(pass); + } + + control{ + execute(TC_NegSem_06010202_ListOfTypes_005()); + } +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010202_lists_of_types/NegSem_06010202_ListOfTypes_006.ttcn b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010202_lists_of_types/NegSem_06010202_ListOfTypes_006.ttcn new file mode 100644 index 00000000..a85fd403 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010202_lists_of_types/NegSem_06010202_ListOfTypes_006.ttcn @@ -0,0 +1,23 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:6.1.2.2, Assign invalid values to list of types restricted integers. + ** @verdict pass reject + ***************************************************/ +module NegSem_06010202_ListOfTypes_006 { + type integer Integer1 (0..9 ); + type integer Integer2 (20..30); + type integer Integer_1_2 (Integer1, Integer2); + + type component GeneralComp {} + + testcase TC_NegSem_06010202_ListOfTypes_006() runs on GeneralComp { + var Integer_1_2 v_b; + v_b := 15; //invalid + setverdict(pass); + } + + control{ + execute(TC_NegSem_06010202_ListOfTypes_006()); + } +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010202_lists_of_types/NegSem_06010202_ListOfTypes_007.ttcn b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010202_lists_of_types/NegSem_06010202_ListOfTypes_007.ttcn new file mode 100644 index 00000000..22cb1049 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010202_lists_of_types/NegSem_06010202_ListOfTypes_007.ttcn @@ -0,0 +1,23 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:6.1.2.2, Assign invalid values to list of types restricted floats. + ** @verdict pass reject + ***************************************************/ +module NegSem_06010202_ListOfTypes_007 { + type float Float1 (1.0E0..9E0); //float values between 1 and 9 + type float Float2 (2.0E1..3.0E1); //float values between 20 and 30 + type float Float_1_2 (Float1, Float2); + + type component GeneralComp {} + + testcase TC_NegSem_06010202_ListOfTypes_007() runs on GeneralComp { + var Float_1_2 v_b; + v_b := 15.5E0; //invalid + setverdict(pass); + } + + control{ + execute(TC_NegSem_06010202_ListOfTypes_007()); + } +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010202_lists_of_types/NegSem_06010202_ListOfTypes_008.ttcn b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010202_lists_of_types/NegSem_06010202_ListOfTypes_008.ttcn new file mode 100644 index 00000000..468d6711 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010202_lists_of_types/NegSem_06010202_ListOfTypes_008.ttcn @@ -0,0 +1,22 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:6.1.2.2, Assign invalid values to list of types restricted boolean value. + ** @verdict pass reject + ***************************************************/ +module NegSem_06010202_ListOfTypes_008 { + type boolean MyBoolean1 (false); //only "false" is accepted + + + type component GeneralComp {} + + testcase TC_NegSem_06010202_ListOfTypes_008() runs on GeneralComp { + var MyBoolean1 v_b; + v_b := true; // invalid + setverdict(pass); + } + + control{ + execute(TC_NegSem_06010202_ListOfTypes_008()); + } +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010202_lists_of_types/NegSem_06010202_ListOfTypes_009.ttcn b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010202_lists_of_types/NegSem_06010202_ListOfTypes_009.ttcn new file mode 100644 index 00000000..f787ec7a --- /dev/null +++ b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010202_lists_of_types/NegSem_06010202_ListOfTypes_009.ttcn @@ -0,0 +1,23 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:6.1.2.2, Assign invalid values to list of types restricted verdicttype. + ** @verdict pass reject + ***************************************************/ +module NegSem_06010202_ListOfTypes_009 { + type verdicttype Myverdict1 (pass, error); //only "pass" and "error" values are listed + type verdicttype Myverdict2 (inconc, none); //only "inconc" and "none" values are listed + type verdicttype Myverdict_1_2 (Myverdict1, Myverdict2); + + + type component GeneralComp {} + + testcase TC_NegSem_06010202_ListOfTypes_009() runs on GeneralComp { + var Myverdict_1_2 v_b; + v_b := fail; //invalid + setverdict(pass); + } + control{ + execute(TC_NegSem_06010202_ListOfTypes_009()); + } +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010202_lists_of_types/Sem_06010202_ListOfTypes_001.ttcn b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010202_lists_of_types/Sem_06010202_ListOfTypes_001.ttcn new file mode 100644 index 00000000..420b63e2 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010202_lists_of_types/Sem_06010202_ListOfTypes_001.ttcn @@ -0,0 +1,24 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:6.1.2.2, Assign values to list of types restricted bitstring. + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Sem_06010202_ListOfTypes_001 { + type bitstring BitStrings1 ('0'B, '1'B ); + type bitstring BitStrings2 ('00'B, '01'B, '10'B, '11'B); + type bitstring BitStrings_1_2 (BitStrings1, BitStrings2); + + type component GeneralComp {} + + testcase TC_Sem_06010202_ListOfTypes_001() runs on GeneralComp { + var BitStrings_1_2 v_b; + v_b := '10'B; + v_b := '1'B; + setverdict(pass); + } + + control{ + execute(TC_Sem_06010202_ListOfTypes_001()); + } +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010202_lists_of_types/Sem_06010202_ListOfTypes_002.ttcn b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010202_lists_of_types/Sem_06010202_ListOfTypes_002.ttcn new file mode 100644 index 00000000..7a385dd6 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010202_lists_of_types/Sem_06010202_ListOfTypes_002.ttcn @@ -0,0 +1,24 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:6.1.2.2, Assign values to list of types restricted hexstring. + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Sem_06010202_ListOfTypes_002 { + type hexstring HexStrings1 ('FE80'H, '01'H ); + type hexstring HexStrings2 ('00'H, '7F'H, 'B8'H, 'A0'H); + type hexstring HexStrings_1_2 (HexStrings1, HexStrings2); + + type component GeneralComp {} + + testcase TC_Sem_06010202_ListOfTypes_002() runs on GeneralComp { + var HexStrings_1_2 v_b; + v_b := 'FE80'H; //FE80 value is defined by the type HexStrings1 + v_b := '7F'H; //7F value is defined by the type HexStrings2 + setverdict(pass); + } + + control{ + execute(TC_Sem_06010202_ListOfTypes_002()); + } +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010202_lists_of_types/Sem_06010202_ListOfTypes_003.ttcn b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010202_lists_of_types/Sem_06010202_ListOfTypes_003.ttcn new file mode 100644 index 00000000..b604f8ce --- /dev/null +++ b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010202_lists_of_types/Sem_06010202_ListOfTypes_003.ttcn @@ -0,0 +1,24 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:6.1.2.2, Assign values to list of types restricted octetstring. + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Sem_06010202_ListOfTypes_003 { + type octetstring Firstoctetstrings('0036'O,'0050'O); //30 and 40 in decimal + type octetstring Secondtoctetstrings ('0074'O,'0120'O); //50 and 60 in decimal + type octetstring octetStrings_1_2 (Firstoctetstrings, Secondtoctetstrings); + + type component GeneralComp {} + + testcase TC_Sem_06010202_ListOfTypes_003() runs on GeneralComp { + var octetStrings_1_2 v_b; + v_b := '0074'O; // '0074'O value is defined by the type Secondtoctetstrings + v_b := '0050'O; //'0050'O value is defined by the type Firstoctetstrings + setverdict(pass); + } + + control{ + execute(TC_Sem_06010202_ListOfTypes_003()); + } +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010202_lists_of_types/Sem_06010202_ListOfTypes_004.ttcn b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010202_lists_of_types/Sem_06010202_ListOfTypes_004.ttcn new file mode 100644 index 00000000..01dd0627 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010202_lists_of_types/Sem_06010202_ListOfTypes_004.ttcn @@ -0,0 +1,24 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:6.1.2.2, Assign values to list of types restricted charstring. + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Sem_06010202_ListOfTypes_004 { + type charstring Firstcharstrings("abc", "def"); + type charstring Secondcharstrings("ghi", "jkl"); + type charstring charStrings_1_2 (Firstcharstrings,Secondcharstrings); + + type component GeneralComp {} + + testcase TC_Sem_06010202_ListOfTypes_004() runs on GeneralComp { + var charStrings_1_2 v_b; + v_b := "abc"; + v_b := "jkl"; + setverdict(pass); + } + + control{ + execute(TC_Sem_06010202_ListOfTypes_004()); + } +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010202_lists_of_types/Sem_06010202_ListOfTypes_005.ttcn b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010202_lists_of_types/Sem_06010202_ListOfTypes_005.ttcn new file mode 100644 index 00000000..43ca10f3 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010202_lists_of_types/Sem_06010202_ListOfTypes_005.ttcn @@ -0,0 +1,24 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:6.1.2.2, Assign values to list of types unicharstring allows non-printable characters + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Sem_06010202_ListOfTypes_005 { + type universal charstring unicharString1 ("0" .. "9","A".."Z"); // charstring between "0" and "9" and "A".."Z" + type universal charstring unicharString2 ("a".."z"); // charstring between "a" to "z" + type universal charstring unicharStrings_1_2 (unicharString1, unicharString2); + type component GeneralComp {} + + testcase TC_Sem_06010202_ListOfTypes_006() runs on GeneralComp { + var unicharStrings_1_2 v_b; + v_b :="5"; + v_b :="H"; + v_b:="j"; + setverdict(pass); + } + + control{ + execute(TC_Sem_06010202_ListOfTypes_006()); + } +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010202_lists_of_types/Sem_06010202_ListOfTypes_006.ttcn b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010202_lists_of_types/Sem_06010202_ListOfTypes_006.ttcn new file mode 100644 index 00000000..fc9e06c0 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010202_lists_of_types/Sem_06010202_ListOfTypes_006.ttcn @@ -0,0 +1,24 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:6.1.2.2, Assign values to list of types restricted integers. + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Sem_06010202_ListOfTypes_006 { + type integer Integer1 (0..9 ); + type integer Integer2 (20..30); + type integer Integer_1_2 (Integer1, Integer2); + + type component GeneralComp {} + + testcase TC_Sem_06010202_ListOfTypes_006() runs on GeneralComp { + var Integer_1_2 v_b; + v_b := 5; + v_b := 25; + setverdict(pass); + } + + control{ + execute(TC_Sem_06010202_ListOfTypes_006()); + } +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010202_lists_of_types/Sem_06010202_ListOfTypes_007.ttcn b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010202_lists_of_types/Sem_06010202_ListOfTypes_007.ttcn new file mode 100644 index 00000000..8bbbdaa4 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010202_lists_of_types/Sem_06010202_ListOfTypes_007.ttcn @@ -0,0 +1,24 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:6.1.2.2, Assign values to list of types restricted floats. + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Sem_06010202_ListOfTypes_007 { + type float Float1 (1.0E0..9E0); //float values between 1 and 9 + type float Float2 (2.0E1..3.0E1); //float values between 20 and 30 + type float Float_1_2 (Float1, Float2); + + type component GeneralComp {} + + testcase TC_Sem_06010202_ListOfTypes_007() runs on GeneralComp { + var Float_1_2 v_b; + v_b := 5.5E0; //5.5 is between 1 and 9 + v_b := 2.55E1; //25.5 is between 20 and 30 + setverdict(pass); + } + + control{ + execute(TC_Sem_06010202_ListOfTypes_007()); + } +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010202_lists_of_types/Sem_06010202_ListOfTypes_008.ttcn b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010202_lists_of_types/Sem_06010202_ListOfTypes_008.ttcn new file mode 100644 index 00000000..4078ca08 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010202_lists_of_types/Sem_06010202_ListOfTypes_008.ttcn @@ -0,0 +1,22 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:6.1.2.2, Assign values to list of types restricted boolean value. + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Sem_06010202_ListOfTypes_008 { + type boolean MyBoolean1 (false,true); + + + type component GeneralComp {} + + testcase TC_Sem_06010202_ListOfTypes_008() runs on GeneralComp { + var MyBoolean1 v_b; + v_b := false; + setverdict(pass); + } + + control{ + execute(TC_Sem_06010202_ListOfTypes_008()); + } +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010202_lists_of_types/Sem_06010202_ListOfTypes_009.ttcn b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010202_lists_of_types/Sem_06010202_ListOfTypes_009.ttcn new file mode 100644 index 00000000..e9403c5e --- /dev/null +++ b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010202_lists_of_types/Sem_06010202_ListOfTypes_009.ttcn @@ -0,0 +1,25 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:6.1.2.2, Assign values to list of types restricted verdicttype. + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Sem_06010202_ListOfTypes_009 { + type verdicttype Myverdict1 (pass, error); //only "pass" and "error" values are listed + type verdicttype Myverdict2 (inconc, none); //only "inconc" and "none" values are listed + type verdicttype Myverdict_1_2 (Myverdict1, Myverdict2); + + + type component GeneralComp {} + + testcase TC_Sem_06010202_ListOfTypes_009() runs on GeneralComp { + var Myverdict_1_2 v_b; + v_b := pass; + v_b := none; + setverdict(pass); + } + + control{ + execute(TC_Sem_06010202_ListOfTypes_009()); + } +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010203_ranges/NegSem_06010203_Ranges_001.ttcn b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010203_ranges/NegSem_06010203_Ranges_001.ttcn new file mode 100644 index 00000000..d6d40ca5 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010203_ranges/NegSem_06010203_Ranges_001.ttcn @@ -0,0 +1,20 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:6.1.2.3, Assign invalid values to restricted integer. + ** @verdict pass reject + ***************************************************/ +module NegSem_06010203_Ranges_001 { + type integer MyIntegerRange (0 .. 255); + + type component GeneralComp {} + + testcase TC_NegSem_06010203_Ranges_001() runs on GeneralComp { + var MyIntegerRange v_i := -1; // -1 is outside range + setverdict(pass); + } + + control{ + execute(TC_NegSem_06010203_Ranges_001()); + } +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010203_ranges/NegSem_06010203_Ranges_002.ttcn b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010203_ranges/NegSem_06010203_Ranges_002.ttcn new file mode 100644 index 00000000..98d43ecb --- /dev/null +++ b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010203_ranges/NegSem_06010203_Ranges_002.ttcn @@ -0,0 +1,20 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:6.1.2.3, Assign invalid values to restricted integer. + ** @verdict pass reject + ***************************************************/ +module NegSem_06010203_Ranges_002 { + type integer MyIntegerRange (-infinity .. 0); + + type component GeneralComp {} + + testcase TC_NegSem_06010203_Ranges_002() runs on GeneralComp { + var MyIntegerRange v_i := 1; // 1 is outside range + setverdict(pass); + } + + control{ + execute(TC_NegSem_06010203_Ranges_002()); + } +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010203_ranges/NegSem_06010203_Ranges_003.ttcn b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010203_ranges/NegSem_06010203_Ranges_003.ttcn new file mode 100644 index 00000000..3fb70d7e --- /dev/null +++ b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010203_ranges/NegSem_06010203_Ranges_003.ttcn @@ -0,0 +1,21 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:6.1.2.3, Assure that not_a_number is not allowed in float range subtyping. + ** @verdict pass reject + ***************************************************/ +module NegSem_06010203_Ranges_003 { + // causes an error as not_a_number is not allowed in range subtyping + type float MyFloatRange (-infinity .. not_a_number); + + type component GeneralComp {} + + testcase TC_NegSem_06010203_Ranges_003() runs on GeneralComp { + var MyFloatRange v_i; + setverdict(pass); + } + + control{ + execute(TC_NegSem_06010203_Ranges_003()); + } +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010203_ranges/NegSem_06010203_Ranges_004.ttcn b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010203_ranges/NegSem_06010203_Ranges_004.ttcn new file mode 100644 index 00000000..39aa66e0 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010203_ranges/NegSem_06010203_Ranges_004.ttcn @@ -0,0 +1,20 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:6.1.2.3, Assign invalid values to restricted integer with exclusive bounds. + ** @verdict pass reject + ***************************************************/ +module NegSem_06010203_Ranges_004 { + type integer MyIntegerRange (!-3 .. 0); + + type component GeneralComp {} + + testcase TC_NegSem_06010203_Ranges_004() runs on GeneralComp { + var MyIntegerRange v_i := -3; // -3 is outside range + setverdict(pass); + } + + control{ + execute(TC_NegSem_06010203_Ranges_004()); + } +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010203_ranges/NegSem_06010203_Ranges_005.ttcn b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010203_ranges/NegSem_06010203_Ranges_005.ttcn new file mode 100644 index 00000000..c8402c28 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010203_ranges/NegSem_06010203_Ranges_005.ttcn @@ -0,0 +1,20 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:6.1.2.3, Assign invalid values to restricted integer with exclusive bounds. + ** @verdict pass reject + ***************************************************/ +module NegSem_06010203_Ranges_005 { + type integer MyIntegerRange (-infinity .. !0); + + type component GeneralComp {} + + testcase TC_NegSem_06010203_Ranges_005() runs on GeneralComp { + var MyIntegerRange v_i := 0; // 0 is outside range + setverdict(pass); + } + + control{ + execute(TC_NegSem_06010203_Ranges_005()); + } +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010203_ranges/NegSem_06010203_Ranges_006.ttcn b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010203_ranges/NegSem_06010203_Ranges_006.ttcn new file mode 100644 index 00000000..6e724ebe --- /dev/null +++ b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010203_ranges/NegSem_06010203_Ranges_006.ttcn @@ -0,0 +1,23 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:6.1.2.3, Assign range to boolean not permitted. + ** @verdict pass reject + ***************************************************/ +module NegSem_06010203_Ranges_006 { + // only restrictions for integer, float, charstring and universal charstring are allowed in ranges + type integer MyBooleanRange (false .. true); // should be rejected + + type component GeneralComp {} + + testcase TC_NegSem_06010203_Ranges_006() runs on GeneralComp { + var MyBooleanRange v_b1; + v_b1 := true; + v_b1 := false; + setverdict(pass); + } + + control{ + execute(TC_NegSem_06010203_Ranges_006()); + } +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010203_ranges/NegSem_06010203_Ranges_007.ttcn b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010203_ranges/NegSem_06010203_Ranges_007.ttcn new file mode 100644 index 00000000..37f30c8c --- /dev/null +++ b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010203_ranges/NegSem_06010203_Ranges_007.ttcn @@ -0,0 +1,21 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:6.1.2.3, Assign invalid value to range constrained charstring. + ** @verdict pass reject + ***************************************************/ +module NegSem_06010203_Ranges_007 { + type charstring MyCharstringRange (!"a"..!"f"); + + type component GeneralComp {} + + testcase TC_NegSem_06010203_Ranges_007() runs on GeneralComp { + var MyCharstringRange v_c1; + v_c1 := "a"; + setverdict(pass); + } + + control{ + execute(TC_NegSem_06010203_Ranges_007()); + } +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010203_ranges/NegSem_06010203_Ranges_008.ttcn b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010203_ranges/NegSem_06010203_Ranges_008.ttcn new file mode 100644 index 00000000..024926ad --- /dev/null +++ b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010203_ranges/NegSem_06010203_Ranges_008.ttcn @@ -0,0 +1,21 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:6.1.2.3, Assign invalid value to range constrained charstring. + ** @verdict pass reject + ***************************************************/ +module NegSem_06010203_Ranges_008 { + type charstring MyCharstringRange ("a"..!"f"); + + type component GeneralComp {} + + testcase TC_NegSem_06010203_Ranges_008() runs on GeneralComp { + var MyCharstringRange v_c1; + v_c1 := "f"; + setverdict(pass); + } + + control{ + execute(TC_NegSem_06010203_Ranges_008()); + } +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010203_ranges/NegSem_06010203_Ranges_009.ttcn b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010203_ranges/NegSem_06010203_Ranges_009.ttcn new file mode 100644 index 00000000..be47857b --- /dev/null +++ b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010203_ranges/NegSem_06010203_Ranges_009.ttcn @@ -0,0 +1,21 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:6.1.2.3, Assign invalid value to range constrained charstring. + ** @verdict pass reject + ***************************************************/ +module NegSem_06010203_Ranges_009 { + type charstring MyCharstringRange ("a".."f"); + + type component GeneralComp {} + + testcase TC_NegSem_06010203_Ranges_009() runs on GeneralComp { + var MyCharstringRange v_c1; + v_c1 := "g"; + setverdict(pass); + } + + control{ + execute(TC_NegSem_06010203_Ranges_009()); + } +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010203_ranges/NegSem_06010203_Ranges_010.ttcn b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010203_ranges/NegSem_06010203_Ranges_010.ttcn new file mode 100644 index 00000000..cf608591 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010203_ranges/NegSem_06010203_Ranges_010.ttcn @@ -0,0 +1,20 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:6.1.2.3, Assign invalid values to restricted float. + ** @verdict pass reject + ***************************************************/ +module NegSem_06010203_Ranges_010 { + type float MyFloatRange (-infinity .. 0.0); + + type component GeneralComp {} + + testcase TC_NegSem_06010203_Ranges_010() runs on GeneralComp { + var MyFloatRange v_f := 1.0; // 1.0 is outside range + setverdict(pass); + } + + control{ + execute(TC_NegSem_06010203_Ranges_010()); + } +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010203_ranges/NegSem_06010203_Ranges_011.ttcn b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010203_ranges/NegSem_06010203_Ranges_011.ttcn new file mode 100644 index 00000000..c94b3401 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010203_ranges/NegSem_06010203_Ranges_011.ttcn @@ -0,0 +1,20 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:6.1.2.3, Assign invalid values to range restricted float. + ** @verdict pass reject + ***************************************************/ +module NegSem_06010203_Ranges_011 { + type float MyFloatRange (-5.0 .. 0.0); + + type component GeneralComp {} + + testcase TC_NegSem_06010203_Ranges_011() runs on GeneralComp { + var MyFloatRange v_f := 10.0; // 10.0 is outside range + setverdict(pass); + } + + control{ + execute(TC_NegSem_06010203_Ranges_011()); + } +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010203_ranges/NegSem_06010203_Ranges_012.ttcn b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010203_ranges/NegSem_06010203_Ranges_012.ttcn new file mode 100644 index 00000000..334aa111 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010203_ranges/NegSem_06010203_Ranges_012.ttcn @@ -0,0 +1,20 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:6.1.2.3, Assign invalid values to range excluded restricted float. + ** @verdict pass reject + ***************************************************/ +module NegSem_06010203_Ranges_012 { + type float MyFloatRange (-1.0 .. !10.0); + + type component GeneralComp {} + + testcase TC_NegSem_06010203_Ranges_012() runs on GeneralComp { + var MyFloatRange v_f := 10.0; // 10.0 is outside range + setverdict(pass); + } + + control{ + execute(TC_NegSem_06010203_Ranges_012()); + } +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010203_ranges/NegSem_06010203_Ranges_013.ttcn b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010203_ranges/NegSem_06010203_Ranges_013.ttcn new file mode 100644 index 00000000..b4542b53 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010203_ranges/NegSem_06010203_Ranges_013.ttcn @@ -0,0 +1,21 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:6.1.2.3, Assign invalid value to range constrained universal charstring. + ** @verdict pass reject + ***************************************************/ +module NegSem_06010203_Ranges_013 { + type universal charstring MyUCharString (char(0, 0, 1, 111) .. !char(0, 0, 1, 113)); + + type component GeneralComp {} + + testcase TC_NegSem_06010203_Ranges_013() runs on GeneralComp { + var MyUCharString v_uc1; + v_uc1 := char(0, 0, 1, 100); // out of range + setverdict(pass); + } + + control{ + execute(TC_NegSem_06010203_Ranges_013()); + } +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010203_ranges/NegSem_06010203_Ranges_014.ttcn b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010203_ranges/NegSem_06010203_Ranges_014.ttcn new file mode 100644 index 00000000..888655ea --- /dev/null +++ b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010203_ranges/NegSem_06010203_Ranges_014.ttcn @@ -0,0 +1,21 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:6.1.2.3, Assign invalid value to range constrained universal charstring with mixed bounds. + ** @verdict pass reject + ***************************************************/ +module NegSem_06010203_Ranges_014 { + type universal charstring MyUCharString (char(0, 0, 1, 111) .. !char(0, 0, 1, 113)); + + type component GeneralComp {} + + testcase TC_NegSem_06010203_Ranges_014() runs on GeneralComp { + var MyUCharString v_uc1; + v_uc1 := char(0, 0, 1, 113); // 113 is excluded + setverdict(pass); + } + + control{ + execute(TC_NegSem_06010203_Ranges_014()); + } +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010203_ranges/NegSem_06010203_Ranges_015.ttcn b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010203_ranges/NegSem_06010203_Ranges_015.ttcn new file mode 100644 index 00000000..adb34e66 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010203_ranges/NegSem_06010203_Ranges_015.ttcn @@ -0,0 +1,21 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:6.1.2.3, Assign invalid value to range constrained charstring. + ** @verdict pass reject + ***************************************************/ +module NegSem_06010203_Ranges_015 { + type charstring MyCharstringRange ("a".."f"); + + type component GeneralComp {} + + testcase TC_NegSem_06010203_Ranges_015() runs on GeneralComp { + var MyCharstringRange v_c1; + v_c1 := "abcgef"; // g not allowed + setverdict(pass); + } + + control{ + execute(TC_NegSem_06010203_Ranges_015()); + } +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010203_ranges/NegSem_06010203_Ranges_016.ttcn b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010203_ranges/NegSem_06010203_Ranges_016.ttcn new file mode 100644 index 00000000..3c6a8375 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010203_ranges/NegSem_06010203_Ranges_016.ttcn @@ -0,0 +1,21 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:6.1.2.3, Invalid value infinity for range constrained charstring. + ** @verdict pass reject + ***************************************************/ +module NegSem_06010203_Ranges_016 { + type charstring MyCharstringRange ("a"..infinity); // infinity not allowed for charstring + + type component GeneralComp {} + + testcase TC_NegSem_06010203_Ranges_016() runs on GeneralComp { + var MyCharstringRange v_c1; + v_c1 := "abcgef"; + setverdict(pass); + } + + control{ + execute(TC_NegSem_06010203_Ranges_016()); + } +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010203_ranges/NegSem_06010203_Ranges_017.ttcn b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010203_ranges/NegSem_06010203_Ranges_017.ttcn new file mode 100644 index 00000000..da7735f2 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010203_ranges/NegSem_06010203_Ranges_017.ttcn @@ -0,0 +1,21 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:6.1.2.3, Invalid value -infinity for range constrained charstring. + ** @verdict pass reject + ***************************************************/ +module NegSem_06010203_Ranges_017 { + type charstring MyCharstringRange (-infinity.."d"); // -infinity not allowed for charstring + + type component GeneralComp {} + + testcase TC_NegSem_06010203_Ranges_017() runs on GeneralComp { + var MyCharstringRange v_c1; + v_c1 := "abcgef"; + setverdict(pass); + } + + control{ + execute(TC_NegSem_06010203_Ranges_017()); + } +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010203_ranges/Sem_06010203_Ranges_001.ttcn b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010203_ranges/Sem_06010203_Ranges_001.ttcn new file mode 100644 index 00000000..36ebe236 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010203_ranges/Sem_06010203_Ranges_001.ttcn @@ -0,0 +1,23 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:6.1.2.3, Assign values to range restricted integer. + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Sem_06010203_Ranges_001 { + type integer MyIntegerRange (0 .. 255); + + type component GeneralComp {} + + testcase TC_Sem_06010203_Ranges_001() runs on GeneralComp { + var MyIntegerRange v_i; + v_i := 0; + v_i := 100; + v_i := 255; + setverdict(pass); + } + + control{ + execute(TC_Sem_06010203_Ranges_001()); + } +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010203_ranges/Sem_06010203_Ranges_002.ttcn b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010203_ranges/Sem_06010203_Ranges_002.ttcn new file mode 100644 index 00000000..6ee33a84 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010203_ranges/Sem_06010203_Ranges_002.ttcn @@ -0,0 +1,28 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:6.1.2.3, Assign values to infinity range restricted integer. + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Sem_06010203_Ranges_002 { + type integer MyIntegerRange1 (-infinity .. 0); + type integer MyIntegerRange2 (0 .. infinity); + + type component GeneralComp {} + + testcase TC_Sem_06010203_Ranges_002() runs on GeneralComp { + var MyIntegerRange1 v_i1; + var MyIntegerRange2 v_i2; + v_i1 := 0; + v_i1 := -100; + v_i1 := -200000; + v_i2 := 0; + v_i2 := 100; + v_i2 := 200000; + setverdict(pass); + } + + control{ + execute(TC_Sem_06010203_Ranges_002()); + } +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010203_ranges/Sem_06010203_Ranges_003.ttcn b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010203_ranges/Sem_06010203_Ranges_003.ttcn new file mode 100644 index 00000000..8b86c46b --- /dev/null +++ b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010203_ranges/Sem_06010203_Ranges_003.ttcn @@ -0,0 +1,28 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:6.1.2.3, Assign values to range restricted integer with exclusive bounds. + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Sem_06010203_Ranges_003 { + type integer MyIntegerRange1 (!0 .. 255); + type integer MyIntegerRange2 (0 .. !255); + + type component GeneralComp {} + + testcase TC_Sem_06010203_Ranges_003() runs on GeneralComp { + var MyIntegerRange1 v_i1; + var MyIntegerRange2 v_i2; + v_i1 := 1; // 0 not allowed + v_i1 := 100; + v_i1 := 255; + v_i2 := 0; + v_i2 := 100; + v_i2 := 254; // 255 not allowed + setverdict(pass); + } + + control{ + execute(TC_Sem_06010203_Ranges_003()); + } +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010203_ranges/Sem_06010203_Ranges_004.ttcn b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010203_ranges/Sem_06010203_Ranges_004.ttcn new file mode 100644 index 00000000..933085af --- /dev/null +++ b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010203_ranges/Sem_06010203_Ranges_004.ttcn @@ -0,0 +1,24 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:6.1.2.3, Assign values to range restricted cahrstring with inclusive bounds. + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Sem_06010203_Ranges_004 { + type charstring MyCharstringRange ("a".."f"); + + type component GeneralComp {} + + testcase TC_Sem_06010203_Ranges_004() runs on GeneralComp { + var MyCharstringRange v_c1; + v_c1 := "a"; + v_c1 := "c"; + v_c1 := "f"; + v_c1 := "acdef"; + setverdict(pass); + } + + control{ + execute(TC_Sem_06010203_Ranges_004()); + } +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010203_ranges/Sem_06010203_Ranges_005.ttcn b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010203_ranges/Sem_06010203_Ranges_005.ttcn new file mode 100644 index 00000000..2ae332c3 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010203_ranges/Sem_06010203_Ranges_005.ttcn @@ -0,0 +1,26 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:6.1.2.3, Assign values to range restricted cahrstring with exclusive bounds. + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Sem_06010203_Ranges_005 { + type charstring MyCharstringRange (!"a"..!"f"); + + type component GeneralComp {} + + testcase TC_Sem_06010203_Ranges_005() runs on GeneralComp { + var MyCharstringRange v_c1; + v_c1 := "b"; + v_c1 := "c"; + v_c1 := "d"; + v_c1 := "e"; + v_c1 := "bcde"; + v_c1 := "bbeeebccdee"; + setverdict(pass); + } + + control{ + execute(TC_Sem_06010203_Ranges_005()); + } +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010203_ranges/Sem_06010203_Ranges_006.ttcn b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010203_ranges/Sem_06010203_Ranges_006.ttcn new file mode 100644 index 00000000..2a5deabf --- /dev/null +++ b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010203_ranges/Sem_06010203_Ranges_006.ttcn @@ -0,0 +1,25 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:6.1.2.3, Assign values to range restricted cahrstring with mixed bounds. + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Sem_06010203_Ranges_006 { + type charstring MyCahrstringRange (!"a".."f"); + + type component GeneralComp {} + + testcase TC_Sem_06010203_Ranges_006() runs on GeneralComp { + var MyCahrstringRange v_c1; + v_c1 := "b"; + v_c1 := "c"; + v_c1 := "d"; + v_c1 := "e"; + v_c1 := "f"; + setverdict(pass); + } + + control{ + execute(TC_Sem_06010203_Ranges_006()); + } +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010203_ranges/Sem_06010203_Ranges_007.ttcn b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010203_ranges/Sem_06010203_Ranges_007.ttcn new file mode 100644 index 00000000..f0876e09 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010203_ranges/Sem_06010203_Ranges_007.ttcn @@ -0,0 +1,21 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:6.1.2.3, Assign values to range restricted universal charstring. + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Sem_06010203_Ranges_007 { + type universal charstring MyUCharString (char(0, 0, 1, 111) .. char(0, 0, 1, 113)); + + type component GeneralComp {} + + testcase TC_Sem_06010203_Ranges_007() runs on GeneralComp { + var MyUCharString v_uc1; + v_uc1 := char(0, 0, 1, 111); + setverdict(pass); + } + + control{ + execute(TC_Sem_06010203_Ranges_007()); + } +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010203_ranges/Sem_06010203_Ranges_008.ttcn b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010203_ranges/Sem_06010203_Ranges_008.ttcn new file mode 100644 index 00000000..773281d8 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010203_ranges/Sem_06010203_Ranges_008.ttcn @@ -0,0 +1,25 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:6.1.2.3, Assign values to range restricted universal charstring with mixed bounds. + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Sem_06010203_Ranges_008 { + // Defines a string type of any length with each character within the range (111 or 112) + type universal charstring MyUCharString (char(0, 0, 1, 111) .. !char(0, 0, 1, 113)); + + type component GeneralComp {} + + testcase TC_Sem_06010203_Ranges_008() runs on GeneralComp { + var MyUCharString v_uc1; + v_uc1 := char(0, 0, 1, 111); + v_uc1 := char(0, 0, 1, 112); + v_uc1 := char(0, 0, 1, 112) & char(0, 0, 1, 112); + v_uc1 := char(0, 0, 1, 112) & char(0, 0, 1, 111) & char(0, 0, 1, 112); + setverdict(pass); + } + + control{ + execute(TC_Sem_06010203_Ranges_008()); + } +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010204_string_length_restrictions/NOTES b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010204_string_length_restrictions/NOTES new file mode 100644 index 00000000..fd260736 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010204_string_length_restrictions/NOTES @@ -0,0 +1 @@ +- TODO: missing positive and negative semantic tests for all types except bitstring diff --git a/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010204_string_length_restrictions/NegSem_06010204_StringLenghtRestrict_001.ttcn b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010204_string_length_restrictions/NegSem_06010204_StringLenghtRestrict_001.ttcn new file mode 100644 index 00000000..826ad4a8 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010204_string_length_restrictions/NegSem_06010204_StringLenghtRestrict_001.ttcn @@ -0,0 +1,20 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:6.1.2.4, Assign invalid values to length restricted bitstring. + ** @verdict pass reject + ***************************************************/ +module NegSem_06010204_StringLenghtRestrict_001 { + type bitstring BitStrings length(1 .. 2); + + type component GeneralComp {} + + testcase TC_NegSem_06010204_StringLenghtRestrict_001() runs on GeneralComp { + var BitStrings v_b := '111'B; // value length 3 != type length is 1 or 2 + setverdict(pass); + } + + control{ + execute(TC_NegSem_06010204_StringLenghtRestrict_001()); + } +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010204_string_length_restrictions/NegSem_06010204_StringLenghtRestrict_002.ttcn b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010204_string_length_restrictions/NegSem_06010204_StringLenghtRestrict_002.ttcn new file mode 100644 index 00000000..c8768daf --- /dev/null +++ b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010204_string_length_restrictions/NegSem_06010204_StringLenghtRestrict_002.ttcn @@ -0,0 +1,20 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:6.1.2.4, Assign invalid values to length restricted bitstring. + ** @verdict pass reject + ***************************************************/ +module NegSem_06010204_StringLenghtRestrict_002 { + type bitstring BitStrings length(2); + + type component GeneralComp {} + + testcase TC_NegSem_06010204_StringLenghtRestrict_002() runs on GeneralComp { + var BitStrings v_b := '111'B; // value length 3 != type length is 2 + setverdict(pass); + } + + control{ + execute(TC_NegSem_06010204_StringLenghtRestrict_002()); + } +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010204_string_length_restrictions/NegSem_06010204_StringLenghtRestrict_003.ttcn b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010204_string_length_restrictions/NegSem_06010204_StringLenghtRestrict_003.ttcn new file mode 100644 index 00000000..a0cf43d4 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010204_string_length_restrictions/NegSem_06010204_StringLenghtRestrict_003.ttcn @@ -0,0 +1,21 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:6.1.2.4, Assign invalid values to length restricted hexstring + ** @verdict pass reject + ***************************************************/ +module NegSem_06010204_StringLenghtRestrict_003 { + type hexstring HexStrings1 length(3); //3 hexadecimal digits + + type component GeneralComp {} + + testcase TC_NegSem_06010204_StringLenghtRestrict_003() runs on GeneralComp { + var HexStrings1 v_b1; + v_b1 := 'FE00'H; //invalid length 4 + setverdict(pass); + } + + control{ + execute(TC_NegSem_06010204_StringLenghtRestrict_003()); + } +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010204_string_length_restrictions/NegSem_06010204_StringLenghtRestrict_004.ttcn b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010204_string_length_restrictions/NegSem_06010204_StringLenghtRestrict_004.ttcn new file mode 100644 index 00000000..e376f205 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010204_string_length_restrictions/NegSem_06010204_StringLenghtRestrict_004.ttcn @@ -0,0 +1,21 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:6.1.2.4, Assign invalid values to length restricted hexstring + ** @verdict pass reject + ***************************************************/ +module NegSem_06010204_StringLenghtRestrict_004 { + type hexstring HexStrings1 length(2 .. infinity); //hexadecimal digits between 2 and 5 + + type component GeneralComp {} + + testcase TC_NegSem_06010204_StringLenghtRestrict_004() runs on GeneralComp { + var HexStrings1 v_b1; + v_b1 := 'A'H; //invalid length 1 + setverdict(pass); + } + + control{ + execute(TC_NegSem_06010204_StringLenghtRestrict_004()); + } +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010204_string_length_restrictions/NegSem_06010204_StringLenghtRestrict_005.ttcn b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010204_string_length_restrictions/NegSem_06010204_StringLenghtRestrict_005.ttcn new file mode 100644 index 00000000..c5a471a9 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010204_string_length_restrictions/NegSem_06010204_StringLenghtRestrict_005.ttcn @@ -0,0 +1,21 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:6.1.2.4, Assign invalid values to length restricted octetstring + ** @verdict pass reject + ***************************************************/ +module NegSem_06010204_StringLenghtRestrict_005 { + type octetstring ocStrings1 length(4); + + type component GeneralComp {} + + testcase TC_NegSem_06010204_StringLenghtRestrict_005() runs on GeneralComp { + var ocStrings1 v_b1; + v_b1 := 'FE8001'O; //3 octets invalid length + setverdict(pass); + } + + control{ + execute(TC_NegSem_06010204_StringLenghtRestrict_005()); + } +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010204_string_length_restrictions/NegSem_06010204_StringLenghtRestrict_006.ttcn b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010204_string_length_restrictions/NegSem_06010204_StringLenghtRestrict_006.ttcn new file mode 100644 index 00000000..a7d8a1e6 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010204_string_length_restrictions/NegSem_06010204_StringLenghtRestrict_006.ttcn @@ -0,0 +1,21 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:6.1.2.4, Assign invalid values to length restricted octetstring + ** @verdict pass reject + ***************************************************/ +module NegSem_06010204_StringLenghtRestrict_006 { + type octetstring ocStrings1 length(2..infinity); + + type component GeneralComp {} + + testcase TC_NegSem_06010204_StringLenghtRestrict_006() runs on GeneralComp { + var ocStrings1 v_b1; + v_b1 := 'FE'O; //1 octet invalid length + setverdict(pass); + } + + control{ + execute(TC_NegSem_06010204_StringLenghtRestrict_006()); + } +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010204_string_length_restrictions/NegSem_06010204_StringLenghtRestrict_007.ttcn b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010204_string_length_restrictions/NegSem_06010204_StringLenghtRestrict_007.ttcn new file mode 100644 index 00000000..239fc088 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010204_string_length_restrictions/NegSem_06010204_StringLenghtRestrict_007.ttcn @@ -0,0 +1,21 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:6.1.2.4, Assign invalid values to length restricted charstring + ** @verdict pass reject + ***************************************************/ +module NegSem_06010204_StringLenghtRestrict_007{ + type charstring myStrings1 length(2..infinity); + + type component GeneralComp {} + + testcase TC_NegSem_06010204_StringLenghtRestrict_007() runs on GeneralComp { + var myStrings1 v_b1; + v_b1 := "a"; //1 charc. length + setverdict(pass); + } + + control{ + execute(TC_NegSem_06010204_StringLenghtRestrict_007()); + } +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010204_string_length_restrictions/NegSem_06010204_StringLenghtRestrict_008.ttcn b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010204_string_length_restrictions/NegSem_06010204_StringLenghtRestrict_008.ttcn new file mode 100644 index 00000000..4d15d1ad --- /dev/null +++ b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010204_string_length_restrictions/NegSem_06010204_StringLenghtRestrict_008.ttcn @@ -0,0 +1,21 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:6.1.2.4, Assign invalid values to length restricted charstring + ** @verdict pass reject + ***************************************************/ +module NegSem_06010204_StringLenghtRestrict_008{ + type charstring myStrings1 length(2); + + type component GeneralComp {} + + testcase TC_NegSem_06010204_StringLenghtRestrict_008() runs on GeneralComp { + var myStrings1 v_b1; + v_b1 := "abc"; //2 characters length req. + setverdict(pass); + } + + control{ + execute(TC_NegSem_06010204_StringLenghtRestrict_008()); + } +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010204_string_length_restrictions/NegSyn_06010204_StringLenghtRestrict_001.ttcn b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010204_string_length_restrictions/NegSyn_06010204_StringLenghtRestrict_001.ttcn new file mode 100644 index 00000000..2233de14 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010204_string_length_restrictions/NegSyn_06010204_StringLenghtRestrict_001.ttcn @@ -0,0 +1,10 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:6.1.2.4, upper boundary should be greater than lower boundary in string lenght restictions + ** @verdict pass reject + ***************************************************/ +module NegSyn_06010204_StringLenghtRestrict_001 { + type hexstring HexStrings1 length(3 .. 1); // upper bounder is smaller than lower bound + +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010204_string_length_restrictions/NegSyn_06010204_StringLenghtRestrict_002.ttcn b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010204_string_length_restrictions/NegSyn_06010204_StringLenghtRestrict_002.ttcn new file mode 100644 index 00000000..411b78a9 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010204_string_length_restrictions/NegSyn_06010204_StringLenghtRestrict_002.ttcn @@ -0,0 +1,10 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:6.1.2.4, boundary integers should be non negative integers + ** @verdict pass reject + ***************************************************/ +module NegSyn_06010204_StringLenghtRestrict_001 { + type hexstring HexStrings1 length(0 .. -5); // negative boundary for length + +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010204_string_length_restrictions/Sem_06010204_StringLenghtRestrict_001.ttcn b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010204_string_length_restrictions/Sem_06010204_StringLenghtRestrict_001.ttcn new file mode 100644 index 00000000..4011e640 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010204_string_length_restrictions/Sem_06010204_StringLenghtRestrict_001.ttcn @@ -0,0 +1,28 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:6.1.2.4, Assign values to list of types restricted bitstring. + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Sem_06010204_StringLenghtRestrict_001 { + type bitstring BitStrings1 length(1 .. 2); + type bitstring BitStrings2 length(5); + type bitstring BitStrings3 length(0 .. infinity); + + type component GeneralComp {} + + testcase TC_Sem_06010204_StringLenghtRestrict_001() runs on GeneralComp { + var BitStrings1 v_b1; + var BitStrings2 v_b2; + var BitStrings3 v_b3; + v_b1 := '10'B; + v_b1 := '1'B; + v_b2 := '10000'B; + v_b3 := '111111'B; + setverdict(pass); + } + + control{ + execute(TC_Sem_06010204_StringLenghtRestrict_001()); + } +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010204_string_length_restrictions/Sem_06010204_StringLenghtRestrict_002.ttcn b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010204_string_length_restrictions/Sem_06010204_StringLenghtRestrict_002.ttcn new file mode 100644 index 00000000..aad50de0 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010204_string_length_restrictions/Sem_06010204_StringLenghtRestrict_002.ttcn @@ -0,0 +1,28 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:6.1.2.4, Assign values to list of types restricted hexstring. + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Sem_06010204_StringLenghtRestrict_002 { + type hexstring HexStrings1 length(1 .. 2); + type hexstring HexStrings2 length(4); + type hexstring HexStrings3 length(0 .. infinity); + + type component GeneralComp {} + + testcase TC_Sem_06010204_StringLenghtRestrict_002() runs on GeneralComp { + var HexStrings1 v_b1; + var HexStrings2 v_b2; + var HexStrings3 v_b3; + v_b1 := 'F'H; + v_b1 := 'FE'H; + v_b2 := 'FE80'H; + v_b3 := 'FFFFFFFFFF'H; + setverdict(pass); + } + + control{ + execute(TC_Sem_06010204_StringLenghtRestrict_002()); + } +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010204_string_length_restrictions/Sem_06010204_StringLenghtRestrict_003.ttcn b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010204_string_length_restrictions/Sem_06010204_StringLenghtRestrict_003.ttcn new file mode 100644 index 00000000..f207bfe5 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010204_string_length_restrictions/Sem_06010204_StringLenghtRestrict_003.ttcn @@ -0,0 +1,28 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:6.1.2.4, Assign values to list of types restricted octetstring. + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Sem_06010204_StringLenghtRestrict_003 { + type octetstring ocStrings1 length(2 .. 4); + type octetstring ocStrings2 length(4); + type octetstring ocStrings3 length(0 .. infinity); + + type component GeneralComp {} + + testcase TC_Sem_06010204_StringLenghtRestrict_003() runs on GeneralComp { + var ocStrings1 v_b1; + var ocStrings2 v_b2; + var ocStrings3 v_b3; + v_b1 := 'FE80'O; //2 octets + v_b1 := 'FE8001'O; //3 octets + v_b2 := 'FE800201'O; //4 octets + v_b3 := 'FE830043'O; //4 octets + setverdict(pass); + } + + control{ + execute(TC_Sem_06010204_StringLenghtRestrict_003()); + } +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010204_string_length_restrictions/Sem_06010204_StringLenghtRestrict_004.ttcn b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010204_string_length_restrictions/Sem_06010204_StringLenghtRestrict_004.ttcn new file mode 100644 index 00000000..0ba42a8e --- /dev/null +++ b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010204_string_length_restrictions/Sem_06010204_StringLenghtRestrict_004.ttcn @@ -0,0 +1,28 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:6.1.2.4, Assign values to list of types restricted charstring. + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Sem_06010204_StringLenghtRestrict_004 { + type charstring myStrings1 length(2 .. 4); //length between 2 and 4 characters + type charstring myStrings2 length(4); //fixed length 4 characters + type charstring myStrings3 length(0 .. infinity); //unlimited character length + + type component GeneralComp {} + + testcase TC_Sem_06010204_StringLenghtRestrict_004() runs on GeneralComp { + var myStrings1 v_b1; + var myStrings2 v_b2; + var myStrings3 v_b3; + v_b1 := "ab"; //2 characters + v_b1 := "abc"; //3 characters + v_b2 := "efgh"; //fixed 4 characters + v_b3 := "abcdefghijklm"; //unlimited + setverdict(pass); + } + + control{ + execute(TC_Sem_06010204_StringLenghtRestrict_004()); + } +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010205_pattern_subtyping_of_character_string_types/NOTES b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010205_pattern_subtyping_of_character_string_types/NOTES new file mode 100644 index 00000000..ffe1dc1d --- /dev/null +++ b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010205_pattern_subtyping_of_character_string_types/NOTES @@ -0,0 +1 @@ +- TODO: missing positive and negative semantic tests for universal charstring diff --git a/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010205_pattern_subtyping_of_character_string_types/NegSem_06010205_StringPattern_001.ttcn b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010205_pattern_subtyping_of_character_string_types/NegSem_06010205_StringPattern_001.ttcn new file mode 100644 index 00000000..aa3efbce --- /dev/null +++ b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010205_pattern_subtyping_of_character_string_types/NegSem_06010205_StringPattern_001.ttcn @@ -0,0 +1,20 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:6.1.2.5, Assign invalid values to pattern restricted character strings. + ** @verdict pass reject + ***************************************************/ +module NegSem_06010205_StringPattern_001 { + type charstring MyString (pattern "?bc*xyz"); + + type component GeneralComp {} + + testcase TC_NegSem_06010205_StringPattern_001() runs on GeneralComp { + var MyString v_c := "abcyz"; // value missing x + setverdict(pass); + } + + control{ + execute(TC_NegSem_06010205_StringPattern_001()); + } +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010205_pattern_subtyping_of_character_string_types/NegSyn_06010205_StringPattern_001.ttcn b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010205_pattern_subtyping_of_character_string_types/NegSyn_06010205_StringPattern_001.ttcn new file mode 100644 index 00000000..366e0523 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010205_pattern_subtyping_of_character_string_types/NegSyn_06010205_StringPattern_001.ttcn @@ -0,0 +1,21 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:6.1.2.5, Assign values to pattern restricted character strings without @nocase modifier. + ** @verdict pass reject, noexecution + ***************************************************/ + +module NegSyn_06010205_StringPattern_001 { + type charstring MyString (pattern "abc*xyz"); //without @nocase + + type component GeneralComp {} + + testcase TC_NegSyn_06010205_StringPattern_001() runs on GeneralComp { + var MyString v_c; + v_c := "ABc1234xYz"; //error value is out of constraint: ABc + } + + control{ + execute(TC_NegSyn_06010205_StringPattern_001()); + } +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010205_pattern_subtyping_of_character_string_types/NegSyn_06010205_StringPattern_002.ttcn b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010205_pattern_subtyping_of_character_string_types/NegSyn_06010205_StringPattern_002.ttcn new file mode 100644 index 00000000..00f35bad --- /dev/null +++ b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010205_pattern_subtyping_of_character_string_types/NegSyn_06010205_StringPattern_002.ttcn @@ -0,0 +1,21 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:6.1.2.5, Assign quadruple values to pattern restricted character strings. + ** @verdict pass reject, noexecution + ***************************************************/ + +module NegSyn_06010205_StringPattern_002 { + type charstring MyString (pattern "\q{0,0,1,116}abc"); //error: not a legal character for the TTCN 3 charstring type + + + type component GeneralComp {} + + testcase TC_NegSyn_06010205_StringPattern_002() runs on GeneralComp { + var MyString v_c := "Ŵabc"; //error: not a legal character of the TTCN 3 charstring type + } + + control{ + execute(TC_NegSyn_06010205_StringPattern_002()); + } +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010205_pattern_subtyping_of_character_string_types/Sem_06010205_StringPattern_001.ttcn b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010205_pattern_subtyping_of_character_string_types/Sem_06010205_StringPattern_001.ttcn new file mode 100644 index 00000000..6a92f666 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010205_pattern_subtyping_of_character_string_types/Sem_06010205_StringPattern_001.ttcn @@ -0,0 +1,25 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:6.1.2.5, Assign values to pattern restricted character strings. + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Sem_06010205_StringPattern_001 { + type charstring MyString (pattern "abc*xyz"); + + type component GeneralComp {} + + testcase TC_Sem_06010205_StringPattern_001() runs on GeneralComp { + var MyString v_c; + v_c := "abcxyz"; + v_c := "abc123xyz"; + v_c := "abc:xyz"; + v_c := "abc...xyz"; + v_c := "abc*xyz"; + setverdict(pass); + } + + control{ + execute(TC_Sem_06010205_StringPattern_001()); + } +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010205_pattern_subtyping_of_character_string_types/Sem_06010205_StringPattern_002.ttcn b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010205_pattern_subtyping_of_character_string_types/Sem_06010205_StringPattern_002.ttcn new file mode 100644 index 00000000..e5b75448 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010205_pattern_subtyping_of_character_string_types/Sem_06010205_StringPattern_002.ttcn @@ -0,0 +1,25 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:6.1.2.5, Assign values to pattern restricted character strings. + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Sem_06010205_StringPattern_002 { + type charstring MyString (pattern "abc?xyz"); + + type component GeneralComp {} + + testcase TC_Sem_06010205_StringPattern_002() runs on GeneralComp { + var MyString v_c; + v_c := "abc1xyz"; + v_c := "abc:xyz"; + v_c := "abc.xyz"; + v_c := "abc*xyz"; + v_c := "abc?xyz"; + setverdict(pass); + } + + control{ + execute(TC_Sem_06010205_StringPattern_002()); + } +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010205_pattern_subtyping_of_character_string_types/Sem_06010205_StringPattern_003.ttcn b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010205_pattern_subtyping_of_character_string_types/Sem_06010205_StringPattern_003.ttcn new file mode 100644 index 00000000..a8248ebc --- /dev/null +++ b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010205_pattern_subtyping_of_character_string_types/Sem_06010205_StringPattern_003.ttcn @@ -0,0 +1,33 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:6.1.2.5, Assign values to pattern restricted character strings with @nocase modifier. + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +/* The following requirements are tested: +When the "@nocase" modifier is used after the pattern keyword, the matching is evaluated in a case insensitive way. +*/ + +module Sem_06010205_StringPattern_003 { + type charstring MyString (pattern @nocase "abc*xyz"); // with @nocase modifier now characters from "A...Z" is also allowed + + type component GeneralComp {} + + testcase TC_Sem_06010205_StringPattern_003() runs on GeneralComp { + + var MyString v_c; + + //valid: + v_c := "ABc1234xyz"; + v_c := "aBC:xYz"; + v_c := "AbC.xyZ"; + v_c := "ABc*xYZ"; + v_c := "ABC?XYZ"; + setverdict(pass,"The resuls is: ",v_c); + } + + control{ + execute(TC_Sem_06010205_StringPattern_003()); + } +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010206_mixing_subtyping_mechanisms/0601020601_mixing_patterns_lists_and_ranges/NegSem_0601020601_MixingSubtype_001.ttcn b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010206_mixing_subtyping_mechanisms/0601020601_mixing_patterns_lists_and_ranges/NegSem_0601020601_MixingSubtype_001.ttcn new file mode 100644 index 00000000..0f1ee209 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010206_mixing_subtyping_mechanisms/0601020601_mixing_patterns_lists_and_ranges/NegSem_0601020601_MixingSubtype_001.ttcn @@ -0,0 +1,20 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:6.1.2.6.1, Assign invalid values to mixed restricted floats. + ** @verdict pass reject + ***************************************************/ +module NegSem_0601020601_MixingSubtype_001 { + type float lessThanPiAndNaN (-infinity .. 3142E-3, not_a_number); + + type component GeneralComp {} + + testcase TC_NegSem_0601020601_MixingSubtype_001() runs on GeneralComp { + var lessThanPiAndNaN v_f := 4.0; // value out of range + setverdict(pass); + } + + control{ + execute(TC_NegSem_0601020601_MixingSubtype_001()); + } +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010206_mixing_subtyping_mechanisms/0601020601_mixing_patterns_lists_and_ranges/NegSem_0601020601_MixingSubtype_002.ttcn b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010206_mixing_subtyping_mechanisms/0601020601_mixing_patterns_lists_and_ranges/NegSem_0601020601_MixingSubtype_002.ttcn new file mode 100644 index 00000000..bd7c9075 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010206_mixing_subtyping_mechanisms/0601020601_mixing_patterns_lists_and_ranges/NegSem_0601020601_MixingSubtype_002.ttcn @@ -0,0 +1,20 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:6.1.2.6.1, Assign invalid values to mixed restricted integers. + ** @verdict pass reject + ***************************************************/ +module NegSem_0601020601_MixingSubtype_002 { + type integer MyInt (1, 5, 10, 100 .. infinity); + + type component GeneralComp {} + + testcase TC_NegSem_0601020601_MixingSubtype_002() runs on GeneralComp { + var MyInt v_i := 6; // value out of range + setverdict(pass); + } + + control{ + execute(TC_NegSem_0601020601_MixingSubtype_002()); + } +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010206_mixing_subtyping_mechanisms/0601020601_mixing_patterns_lists_and_ranges/Sem_0601020601_MixingSubtype_001.ttcn b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010206_mixing_subtyping_mechanisms/0601020601_mixing_patterns_lists_and_ranges/Sem_0601020601_MixingSubtype_001.ttcn new file mode 100644 index 00000000..10105985 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010206_mixing_subtyping_mechanisms/0601020601_mixing_patterns_lists_and_ranges/Sem_0601020601_MixingSubtype_001.ttcn @@ -0,0 +1,24 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:6.1.2.6.1, Assign values to mixed restricted floats. + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Sem_0601020601_MixingSubtype_001 { + type float lessThanPiAndNaN (-infinity .. 3142E-3, not_a_number); + + type component GeneralComp {} + + testcase TC_Sem_0601020601_MixingSubtype_001() runs on GeneralComp { + var lessThanPiAndNaN v_f; + v_f := 3.14E0; + v_f := 0.0; + v_f := -4E40; + v_f := not_a_number; + setverdict(pass); + } + + control{ + execute(TC_Sem_0601020601_MixingSubtype_001()); + } +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010206_mixing_subtyping_mechanisms/0601020601_mixing_patterns_lists_and_ranges/Sem_0601020601_MixingSubtype_002.ttcn b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010206_mixing_subtyping_mechanisms/0601020601_mixing_patterns_lists_and_ranges/Sem_0601020601_MixingSubtype_002.ttcn new file mode 100644 index 00000000..214e7163 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010206_mixing_subtyping_mechanisms/0601020601_mixing_patterns_lists_and_ranges/Sem_0601020601_MixingSubtype_002.ttcn @@ -0,0 +1,25 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:6.1.2.6.1, Assign values to mixed restricted integers. + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Sem_0601020601_MixingSubtype_002 { + type integer MyInt (1, 5, 10, 100 .. infinity); + + type component GeneralComp {} + + testcase TC_Sem_0601020601_MixingSubtype_002() runs on GeneralComp { + var MyInt v_i; + v_i := 1; + v_i := 5; + v_i := 10; + v_i := 100; + v_i := 1000; + setverdict(pass); + } + + control{ + execute(TC_Sem_0601020601_MixingSubtype_002()); + } +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010206_mixing_subtyping_mechanisms/0601020602_using_length_restriction_with_other_constraints/NOTES b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010206_mixing_subtyping_mechanisms/0601020602_using_length_restriction_with_other_constraints/NOTES new file mode 100644 index 00000000..ffe1dc1d --- /dev/null +++ b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010206_mixing_subtyping_mechanisms/0601020602_using_length_restriction_with_other_constraints/NOTES @@ -0,0 +1 @@ +- TODO: missing positive and negative semantic tests for universal charstring diff --git a/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010206_mixing_subtyping_mechanisms/0601020602_using_length_restriction_with_other_constraints/NegSem_0601020602_StringMixing_001.ttcn b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010206_mixing_subtyping_mechanisms/0601020602_using_length_restriction_with_other_constraints/NegSem_0601020602_StringMixing_001.ttcn new file mode 100644 index 00000000..cefc5e7b --- /dev/null +++ b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010206_mixing_subtyping_mechanisms/0601020602_using_length_restriction_with_other_constraints/NegSem_0601020602_StringMixing_001.ttcn @@ -0,0 +1,20 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:6.1.2.6.2, Assign invalid values to mixed restricted character strings. + ** @verdict pass reject + ***************************************************/ +module NegSem_0601020602_StringMixing_001 { + type charstring MyString (pattern "?bc*xyz") length (5 .. 8); + + type component GeneralComp {} + + testcase TC_NegSem_0601020602_StringMixing_001() runs on GeneralComp { + var MyString v_c := "abcyz"; // value missing x + setverdict(pass); + } + + control{ + execute(TC_NegSem_0601020602_StringMixing_001()); + } +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010206_mixing_subtyping_mechanisms/0601020602_using_length_restriction_with_other_constraints/NegSem_0601020602_StringMixing_002.ttcn b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010206_mixing_subtyping_mechanisms/0601020602_using_length_restriction_with_other_constraints/NegSem_0601020602_StringMixing_002.ttcn new file mode 100644 index 00000000..811d0a20 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010206_mixing_subtyping_mechanisms/0601020602_using_length_restriction_with_other_constraints/NegSem_0601020602_StringMixing_002.ttcn @@ -0,0 +1,20 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:6.1.2.6.2, Assign invalid values to mixed restricted character strings. + ** @verdict pass reject + ***************************************************/ +module NegSem_0601020602_StringMixing_002 { + type charstring MyString (pattern "?bc*xyz") length (5 .. 8); + + type component GeneralComp {} + + testcase TC_NegSem_0601020602_StringMixing_002() runs on GeneralComp { + var MyString v_c := "abc123xyz"; // value length 9 exceeds 8 + setverdict(pass); + } + + control{ + execute(TC_NegSem_0601020602_StringMixing_002()); + } +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010206_mixing_subtyping_mechanisms/0601020602_using_length_restriction_with_other_constraints/NegSem_0601020602_StringMixing_003.ttcn b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010206_mixing_subtyping_mechanisms/0601020602_using_length_restriction_with_other_constraints/NegSem_0601020602_StringMixing_003.ttcn new file mode 100644 index 00000000..2219daf1 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010206_mixing_subtyping_mechanisms/0601020602_using_length_restriction_with_other_constraints/NegSem_0601020602_StringMixing_003.ttcn @@ -0,0 +1,20 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:6.1.2.6.2, Assign invalid values to mixed restricted character strings. + ** @verdict pass reject + ***************************************************/ +module NegSem_0601020602_StringMixing_003 { + type charstring MyString ("a".."z") length (3 .. 8); + + type component GeneralComp {} + + testcase TC_NegSem_0601020602_StringMixing_003() runs on GeneralComp { + var MyString v_c := "abc1xyz"; // char 1 not allowed + setverdict(pass); + } + + control{ + execute(TC_NegSem_0601020602_StringMixing_003()); + } +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010206_mixing_subtyping_mechanisms/0601020602_using_length_restriction_with_other_constraints/NegSem_0601020602_StringMixing_004.ttcn b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010206_mixing_subtyping_mechanisms/0601020602_using_length_restriction_with_other_constraints/NegSem_0601020602_StringMixing_004.ttcn new file mode 100644 index 00000000..f160cd51 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010206_mixing_subtyping_mechanisms/0601020602_using_length_restriction_with_other_constraints/NegSem_0601020602_StringMixing_004.ttcn @@ -0,0 +1,20 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:6.1.2.6.2, Assign invalid values to mixed restricted bit strings. + ** @verdict pass reject + ***************************************************/ +module NegSem_0601020602_StringMixing_004 { + type bitstring MyString ('111'B, '101010'B, '111111'B) length (4 .. 8); + + type component GeneralComp {} + + testcase TC_NegSem_0601020602_StringMixing_004() runs on GeneralComp { + var MyString v_c := '111'B; // value lenght 3 not allowed + setverdict(pass); + } + + control{ + execute(TC_NegSem_0601020602_StringMixing_004()); + } +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010206_mixing_subtyping_mechanisms/0601020602_using_length_restriction_with_other_constraints/NegSem_0601020602_StringMixing_005.ttcn b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010206_mixing_subtyping_mechanisms/0601020602_using_length_restriction_with_other_constraints/NegSem_0601020602_StringMixing_005.ttcn new file mode 100644 index 00000000..f4a17d49 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010206_mixing_subtyping_mechanisms/0601020602_using_length_restriction_with_other_constraints/NegSem_0601020602_StringMixing_005.ttcn @@ -0,0 +1,20 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:6.1.2.6.2, Assign invalid values to mixed restricted hex strings. + ** @verdict pass reject + ***************************************************/ +module NegSem_0601020602_StringMixing_005 { + type hexstring MyString ('1F1'H, '103A10'H, '111111'H) length (4 .. 8); + + type component GeneralComp {} + + testcase TC_NegSem_0601020602_StringMixing_005() runs on GeneralComp { + var MyString v_c := '1F1'H; // value lenght 3 not allowed + setverdict(pass); + } + + control{ + execute(TC_NegSem_0601020602_StringMixing_005()); + } +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010206_mixing_subtyping_mechanisms/0601020602_using_length_restriction_with_other_constraints/NegSem_0601020602_StringMixing_006.ttcn b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010206_mixing_subtyping_mechanisms/0601020602_using_length_restriction_with_other_constraints/NegSem_0601020602_StringMixing_006.ttcn new file mode 100644 index 00000000..94018359 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010206_mixing_subtyping_mechanisms/0601020602_using_length_restriction_with_other_constraints/NegSem_0601020602_StringMixing_006.ttcn @@ -0,0 +1,20 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:6.1.2.6.2, Assign invalid values to mixed restricted octet strings. + ** @verdict pass reject + ***************************************************/ +module NegSem_0601020602_StringMixing_006 { + type octetstring MyString ('FF1111'O, '101010A3'O, 'FFFFFFFFFF'O) length (4); + + type component GeneralComp {} + + testcase TC_NegSem_0601020602_StringMixing_006() runs on GeneralComp { + var MyString v_c := 'FF1111'O; // value lenght 3 not allowed + setverdict(pass); + } + + control{ + execute(TC_NegSem_0601020602_StringMixing_006()); + } +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010206_mixing_subtyping_mechanisms/0601020602_using_length_restriction_with_other_constraints/Sem_0601020602_StringMixing_001.ttcn b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010206_mixing_subtyping_mechanisms/0601020602_using_length_restriction_with_other_constraints/Sem_0601020602_StringMixing_001.ttcn new file mode 100644 index 00000000..4406ba26 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010206_mixing_subtyping_mechanisms/0601020602_using_length_restriction_with_other_constraints/Sem_0601020602_StringMixing_001.ttcn @@ -0,0 +1,25 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:6.1.2.6.2, Assign values to mixed restricted character strings. + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Sem_0601020602_StringMixing_001 { + type charstring MyString (pattern "abc*xyz") length (5 .. 8); + + type component GeneralComp {} + + testcase TC_Sem_0601020602_StringMixing_001() runs on GeneralComp { + var MyString v_c; + v_c := "abcxyz"; + v_c := "abc12xyz"; + v_c := "abc:xyz"; + v_c := "abc..xyz"; + v_c := "abc*xyz"; + setverdict(pass); + } + + control{ + execute(TC_Sem_0601020602_StringMixing_001()); + } +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010206_mixing_subtyping_mechanisms/0601020602_using_length_restriction_with_other_constraints/Sem_0601020602_StringMixing_002.ttcn b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010206_mixing_subtyping_mechanisms/0601020602_using_length_restriction_with_other_constraints/Sem_0601020602_StringMixing_002.ttcn new file mode 100644 index 00000000..1f606321 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010206_mixing_subtyping_mechanisms/0601020602_using_length_restriction_with_other_constraints/Sem_0601020602_StringMixing_002.ttcn @@ -0,0 +1,24 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:6.1.2.6.2, Assign values to mixed restricted character strings. + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Sem_0601020602_StringMixing_002 { + type charstring MyString ("a".."z") length (3 .. 8); + + type component GeneralComp {} + + testcase TC_Sem_0601020602_StringMixing_002() runs on GeneralComp { + var template MyString v_c; + v_c := "abc"; + v_c := "abcdefgh"; + v_c := pattern "abc?def"; + v_c := pattern "abc*xyz"; + setverdict(pass); + } + + control{ + execute(TC_Sem_0601020602_StringMixing_002()); + } +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010206_mixing_subtyping_mechanisms/0601020602_using_length_restriction_with_other_constraints/Sem_0601020602_StringMixing_003.ttcn b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010206_mixing_subtyping_mechanisms/0601020602_using_length_restriction_with_other_constraints/Sem_0601020602_StringMixing_003.ttcn new file mode 100644 index 00000000..436306e5 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010206_mixing_subtyping_mechanisms/0601020602_using_length_restriction_with_other_constraints/Sem_0601020602_StringMixing_003.ttcn @@ -0,0 +1,23 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:6.1.2.6.2, Assign values to mixed restricted character strings. + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Sem_0601020602_StringMixing_003 { + type charstring MyString ("abcdef", "abc", "123abc") length (3 .. 8); + + type component GeneralComp {} + + testcase TC_Sem_0601020602_StringMixing_003() runs on GeneralComp { + var MyString v_c; + v_c := "123abc"; + v_c := "abc"; + v_c := "abcdef"; + setverdict(pass); + } + + control{ + execute(TC_Sem_0601020602_StringMixing_003()); + } +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010206_mixing_subtyping_mechanisms/0601020602_using_length_restriction_with_other_constraints/Sem_0601020602_StringMixing_004.ttcn b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010206_mixing_subtyping_mechanisms/0601020602_using_length_restriction_with_other_constraints/Sem_0601020602_StringMixing_004.ttcn new file mode 100644 index 00000000..304b5e65 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010206_mixing_subtyping_mechanisms/0601020602_using_length_restriction_with_other_constraints/Sem_0601020602_StringMixing_004.ttcn @@ -0,0 +1,23 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:6.1.2.6.2, Assign values to mixed restricted bit strings. + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Sem_0601020602_StringMixing_004 { + type bitstring MyString ('111'B, '101010'B, '111111'B) length (3 .. 8); + + type component GeneralComp {} + + testcase TC_Sem_0601020602_StringMixing_004() runs on GeneralComp { + var MyString v_c; + v_c := '111'B; + v_c := '101010'B; + v_c := '111111'B; + setverdict(pass); + } + + control{ + execute(TC_Sem_0601020602_StringMixing_004()); + } +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010206_mixing_subtyping_mechanisms/0601020602_using_length_restriction_with_other_constraints/Sem_0601020602_StringMixing_005.ttcn b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010206_mixing_subtyping_mechanisms/0601020602_using_length_restriction_with_other_constraints/Sem_0601020602_StringMixing_005.ttcn new file mode 100644 index 00000000..cf52b325 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010206_mixing_subtyping_mechanisms/0601020602_using_length_restriction_with_other_constraints/Sem_0601020602_StringMixing_005.ttcn @@ -0,0 +1,23 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:6.1.2.6.2, Assign values to mixed restricted hex strings. + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Sem_0601020602_StringMixing_005 { + type hexstring MyString ('1F1'H, '103A10'H, '111111'H) length (3 .. 8); + + type component GeneralComp {} + + testcase TC_Sem_0601020602_StringMixing_005() runs on GeneralComp { + var MyString v_c; + v_c := '1F1'H; + v_c := '103A10'H; + v_c := '111111'H; + setverdict(pass); + } + + control{ + execute(TC_Sem_0601020602_StringMixing_005()); + } +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010206_mixing_subtyping_mechanisms/0601020602_using_length_restriction_with_other_constraints/Sem_0601020602_StringMixing_006.ttcn b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010206_mixing_subtyping_mechanisms/0601020602_using_length_restriction_with_other_constraints/Sem_0601020602_StringMixing_006.ttcn new file mode 100644 index 00000000..ffaa97ae --- /dev/null +++ b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010206_mixing_subtyping_mechanisms/0601020602_using_length_restriction_with_other_constraints/Sem_0601020602_StringMixing_006.ttcn @@ -0,0 +1,23 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:6.1.2.6.2, Assign values to mixed restricted octet strings. + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Sem_0601020602_StringMixing_006 { + type octetstring MyString ('FF1111'O, '101010A3'O, 'FFFFFFFFFF'O) length (3 .. 8); + + type component GeneralComp {} + + testcase TC_Sem_0601020602_StringMixing_006() runs on GeneralComp { + var MyString v_c; + v_c := 'FF1111'O; + v_c := '101010A3'O; + v_c := 'FFFFFFFFFF'O; + setverdict(pass); + } + + control{ + execute(TC_Sem_0601020602_StringMixing_006()); + } +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010206_mixing_subtyping_mechanisms/0601020602_using_length_restriction_with_other_constraints/Sem_0601020602_StringMixing_007.ttcn b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010206_mixing_subtyping_mechanisms/0601020602_using_length_restriction_with_other_constraints/Sem_0601020602_StringMixing_007.ttcn new file mode 100644 index 00000000..dddd7741 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0601_basic_types_and_values/060102_subtyping_of_basic_types/06010206_mixing_subtyping_mechanisms/0601020602_using_length_restriction_with_other_constraints/Sem_0601020602_StringMixing_007.ttcn @@ -0,0 +1,31 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:6.1.2.6.2, Assign values to pattern restricted character strings using @nocase modifier + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +/* The following requirements are tested: +When the "@nocase" modifier is used after the pattern keyword, the matching is evaluated in a case insensitive way +*/ + +module Sem_0601020602_StringMixing_007 { + type charstring unicharString (pattern "[a-z]#(1,5)") length (1..5); // charstring between "a".."z" and length from 1 to 5 + type charstring unicharString_nocase (pattern @nocase "[a-z]#(1,5)") length (1..5); // with @nocase modifier now characters from "A...Z" is also allowed + + type component GeneralComp {} + + testcase TC_Sem_0601020602_StringMixing_007() runs on GeneralComp { + var unicharString v_a; //without @nocase modifier + var unicharString_nocase v_b; //with @nocase modifier + v_a :="abxyz"; + v_b :=v_a; //v_b :="abxyz"; + v_b :="AbXyZ"; + + setverdict(pass,"The result is: ",v_b); + } + + control{ + execute(TC_Sem_0601020602_StringMixing_007()); + } +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060201_record_type_and_values/06020101_referencing_fields_of_record_type/NegSem_06020101_ReferencingRecordFields_001.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060201_record_type_and_values/06020101_referencing_fields_of_record_type/NegSem_06020101_ReferencingRecordFields_001.ttcn new file mode 100644 index 00000000..8fa98426 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060201_record_type_and_values/06020101_referencing_fields_of_record_type/NegSem_06020101_ReferencingRecordFields_001.ttcn @@ -0,0 +1,31 @@ +/*************************************************** + ** @author STF 451 + ** @version 0.0.1 + ** @purpose 1:6.2.1.1, The dot notation used in record type definitions is correctly handled + ** @verdict pass reject + ***************************************************/ +module NegSem_06020101_ReferencingRecordFields_001 { + +type component GeneralComp { +} + + type record R { + integer field1 (1 .. 10), + charstring field2 optional + } + + type R ConstrainedRecord ({1, omit}, {2, "xyz"}, {3, "zyx"}) ; + + type ConstrainedRecord.field1 MyInteger; + +testcase TC_NegSem_06020101_ReferencingRecordFields_001() runs on GeneralComp { + + var MyInteger v_int := 11; // assignment from outside of the carried over (1 .. 10) range constraint + +} + +control { + execute(TC_NegSem_06020101_ReferencingRecordFields_001()); +} + +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060201_record_type_and_values/06020101_referencing_fields_of_record_type/NegSem_06020101_ReferencingRecordFields_002.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060201_record_type_and_values/06020101_referencing_fields_of_record_type/NegSem_06020101_ReferencingRecordFields_002.ttcn new file mode 100644 index 00000000..242e85db --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060201_record_type_and_values/06020101_referencing_fields_of_record_type/NegSem_06020101_ReferencingRecordFields_002.ttcn @@ -0,0 +1,35 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:6.2.1.1, verify that record fields cannot reference themselves + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Fields of record type definitions shall not reference themselves. + +module NegSem_06020101_ReferencingRecordFields_002 { + + type component GeneralComp { + } + + type record R { + integer field1, + R.field2 field2 optional, // this circular reference is NOT ALLOWED + boolean field3 + } + + testcase TC_NegSem_06020101_ReferencingRecordFields_002() runs on GeneralComp { + var R v_rec := { field1 := 1, field2 := omit, field3 := true }; + if (v_rec.field1 == 1) { + setverdict(pass); + } else { + setverdict(fail); + } + } + + control { + execute(TC_NegSem_06020101_ReferencingRecordFields_002()); + } + +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060201_record_type_and_values/06020101_referencing_fields_of_record_type/NegSem_06020101_ReferencingRecordFields_003.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060201_record_type_and_values/06020101_referencing_fields_of_record_type/NegSem_06020101_ReferencingRecordFields_003.ttcn new file mode 100644 index 00000000..7cc7764f --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060201_record_type_and_values/06020101_referencing_fields_of_record_type/NegSem_06020101_ReferencingRecordFields_003.ttcn @@ -0,0 +1,38 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:6.2.1.1, verify that referencing uninitialized record on the right hand of an assignment is not allowed + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Referencing a subfield of an uninitialized or omitted record field or value on the right +// hand side of an assignment shall cause an error. + +module NegSem_06020101_ReferencingRecordFields_003 { + + type component GeneralComp { + } + + type record R { + record { + integer subfield1 + } field1, + charstring field2 optional + } + + testcase TC_NegSem_06020101_ReferencingRecordFields_003() runs on GeneralComp { + var R v_rec; + v_rec.field2 := "abc"; + if (v_rec.field1.subfield1 == 5) { + setverdict(fail); + } else { + setverdict(pass); + } + } + + control { + execute(TC_NegSem_06020101_ReferencingRecordFields_003()); + } + +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060201_record_type_and_values/06020101_referencing_fields_of_record_type/NegSem_06020101_ReferencingRecordFields_004.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060201_record_type_and_values/06020101_referencing_fields_of_record_type/NegSem_06020101_ReferencingRecordFields_004.ttcn new file mode 100644 index 00000000..ae6ebc2e --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060201_record_type_and_values/06020101_referencing_fields_of_record_type/NegSem_06020101_ReferencingRecordFields_004.ttcn @@ -0,0 +1,39 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:6.2.1.1, verify that referencing omitted record on the right hand of an assignment is not allowed + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Referencing a subfield of an uninitialized or omitted record field or value on the right +// hand side of an assignment shall cause an error. + +module NegSem_06020101_ReferencingRecordFields_004 { + + type component GeneralComp { + } + + type record R { + record { + integer subfield1 + } field1 optional, + charstring field2 optional + } + + testcase TC_NegSem_06020101_ReferencingRecordFields_004() runs on GeneralComp { + var R v_rec; + v_rec.field1 := omit; + v_rec.field2 := "abc"; + if (v_rec.field1.subfield1 == 5) { + setverdict(fail); + } else { + setverdict(pass); + } + } + + control { + execute(TC_NegSem_06020101_ReferencingRecordFields_004()); + } + +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060201_record_type_and_values/06020101_referencing_fields_of_record_type/Sem_06020101_ReferencingRecordFields_001.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060201_record_type_and_values/06020101_referencing_fields_of_record_type/Sem_06020101_ReferencingRecordFields_001.ttcn new file mode 100644 index 00000000..35996f4d --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060201_record_type_and_values/06020101_referencing_fields_of_record_type/Sem_06020101_ReferencingRecordFields_001.ttcn @@ -0,0 +1,38 @@ +/*************************************************** + ** @author STF 451 + ** @version 0.0.1 + ** @purpose 1:6.2.1.1, The dot notation used in record type definitions is correctly handled + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Sem_06020101_ReferencingRecordFields_001 { + +type component GeneralComp { +} + + type record R { + integer field1 (1 .. 10), + charstring field2 optional + } + + type R ConstrainedRecord ({1, omit}, {2, "xyz"}, {3, "zyx"}) ; + + type ConstrainedRecord.field1 MyInteger; + +testcase TC_Sem_06020101_ReferencingRecordFields_001() runs on GeneralComp { + + var MyInteger v_int := 9; // v_int is allowed in (1 .. 10) range + + if (v_int==9) { + setverdict(pass); + } + else { + setverdict(fail); + } + +} + +control { + execute(TC_Sem_06020101_ReferencingRecordFields_001()); +} + +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060201_record_type_and_values/06020101_referencing_fields_of_record_type/Sem_06020101_ReferencingRecordFields_002.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060201_record_type_and_values/06020101_referencing_fields_of_record_type/Sem_06020101_ReferencingRecordFields_002.ttcn new file mode 100644 index 00000000..d3bf4a2f --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060201_record_type_and_values/06020101_referencing_fields_of_record_type/Sem_06020101_ReferencingRecordFields_002.ttcn @@ -0,0 +1,38 @@ +/*************************************************** + ** @author STF 451 + ** @version 0.0.1 + ** @purpose 1:6.2.1.1, The dot notation used in record type definitions is correctly handled + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Sem_06020101_ReferencingRecordFields_002 { + +type component GeneralComp { +} + + type record R { + integer field1 (1 .. 10), + charstring field2 optional + } + + type R ConstrainedRecord ({1, omit}, {2, "xyz"}, {3, "zyx"}) ; + + type ConstrainedRecord.field2 MyChar; + +testcase TC_Sem_06020101_ReferencingRecordFields_002() runs on GeneralComp { + + var MyChar v_char := "abc"; // any character string is allowed + + if (v_char=="abc") { + setverdict(pass); + } + else { + setverdict(fail); + } + +} + +control { + execute(TC_Sem_06020101_ReferencingRecordFields_002()); +} + +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060201_record_type_and_values/06020101_referencing_fields_of_record_type/Sem_06020101_ReferencingRecordFields_003.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060201_record_type_and_values/06020101_referencing_fields_of_record_type/Sem_06020101_ReferencingRecordFields_003.ttcn new file mode 100644 index 00000000..b0daad7b --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060201_record_type_and_values/06020101_referencing_fields_of_record_type/Sem_06020101_ReferencingRecordFields_003.ttcn @@ -0,0 +1,36 @@ +/*************************************************** + ** @author STF 451 + ** @version 0.0.1 + ** @purpose 1:6.2.1.1, The dot notation used in record type definitions is correctly handled + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Sem_06020101_ReferencingRecordFields_003 { + +type component GeneralComp { +} + + type record R { + integer field1 (1 .. 10), + charstring field2 optional + } + + type R.field1 MyInteger; + +testcase TC_Sem_06020101_ReferencingRecordFields_003() runs on GeneralComp { + + var MyInteger v_int := 9; // v_int is allowed in (1 .. 10) range + + if (v_int==9) { + setverdict(pass); + } + else { + setverdict(fail); + } + +} + +control { + execute(TC_Sem_06020101_ReferencingRecordFields_003()); +} + +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060201_record_type_and_values/06020101_referencing_fields_of_record_type/Sem_06020101_ReferencingRecordFields_004.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060201_record_type_and_values/06020101_referencing_fields_of_record_type/Sem_06020101_ReferencingRecordFields_004.ttcn new file mode 100644 index 00000000..2b3d1827 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060201_record_type_and_values/06020101_referencing_fields_of_record_type/Sem_06020101_ReferencingRecordFields_004.ttcn @@ -0,0 +1,37 @@ +/*************************************************** + ** @author STF 451 + ** @version 0.0.1 + ** @purpose 1:6.2.1.1, The dot notation used in record type definitions is correctly handled + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Sem_06020101_ReferencingRecordFields_004 { + +type component GeneralComp { +} + + type record R { + integer field1 (1 .. 10), + charstring field2 optional + } + + + type R.field2 MyChar; + +testcase TC_Sem_06020101_ReferencingRecordFields_004() runs on GeneralComp { + + var MyChar v_char := "abc"; // any character string is allowed + + if (v_char=="abc") { + setverdict(pass); + } + else { + setverdict(fail); + } + +} + +control { + execute(TC_Sem_06020101_ReferencingRecordFields_004()); +} + +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060201_record_type_and_values/06020101_referencing_fields_of_record_type/Sem_06020101_ReferencingRecordFields_005.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060201_record_type_and_values/06020101_referencing_fields_of_record_type/Sem_06020101_ReferencingRecordFields_005.ttcn new file mode 100644 index 00000000..7ea06b3f --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060201_record_type_and_values/06020101_referencing_fields_of_record_type/Sem_06020101_ReferencingRecordFields_005.ttcn @@ -0,0 +1,38 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:6.2.1.1, verify that dot notation can be used for referencing elements on the right hand side of an assignement + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Elements of a record shall be referenced by the dot notation TypeIdOrExpression.ElementId, +// where TypeIdOrExpression resolves to the name of a structured type or an expression of +// a structured type such as variable, formal parameter, module parameter, constant, template, +// or function invocation. ElementId shall resolve to the name of a field in the structured +// type. + +module Sem_06020101_ReferencingRecordFields_005 { + + type component GeneralComp { + } + + type record R { + integer field1 (1 .. 10), + charstring field2 optional + } + + testcase TC_Sem_06020101_ReferencingRecordFields_005() runs on GeneralComp { + var R v_rec := { field1 := 5, field2 := "abc" }; + if (v_rec.field1 == 5) { + setverdict(pass); + } else { + setverdict(fail); + } + } + + control { + execute(TC_Sem_06020101_ReferencingRecordFields_005()); + } + +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060201_record_type_and_values/06020101_referencing_fields_of_record_type/Sem_06020101_ReferencingRecordFields_006.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060201_record_type_and_values/06020101_referencing_fields_of_record_type/Sem_06020101_ReferencingRecordFields_006.ttcn new file mode 100644 index 00000000..744b3e9b --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060201_record_type_and_values/06020101_referencing_fields_of_record_type/Sem_06020101_ReferencingRecordFields_006.ttcn @@ -0,0 +1,40 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:6.2.1.1, verify that dot notation can be used for referencing sub-elements on the right hand side of an assignement + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Elements of a record shall be referenced by the dot notation TypeIdOrExpression.ElementId, +// where TypeIdOrExpression resolves to the name of a structured type or an expression of +// a structured type such as variable, formal parameter, module parameter, constant, template, +// or function invocation. ElementId shall resolve to the name of a field in the structured +// type. + +module Sem_06020101_ReferencingRecordFields_006 { + + type component GeneralComp { + } + + type record R { + record { + integer subfield1 + } field1, + charstring field2 optional + } + + testcase TC_Sem_06020101_ReferencingRecordFields_006() runs on GeneralComp { + var R v_rec := { field1 := { subfield1 := 5 }, field2 := "abc" }; + if (v_rec.field1.subfield1 == 5) { + setverdict(pass); + } else { + setverdict(fail); + } + } + + control { + execute(TC_Sem_06020101_ReferencingRecordFields_006()); + } + +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060201_record_type_and_values/06020101_referencing_fields_of_record_type/Sem_06020101_ReferencingRecordFields_007.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060201_record_type_and_values/06020101_referencing_fields_of_record_type/Sem_06020101_ReferencingRecordFields_007.ttcn new file mode 100644 index 00000000..757116b7 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060201_record_type_and_values/06020101_referencing_fields_of_record_type/Sem_06020101_ReferencingRecordFields_007.ttcn @@ -0,0 +1,43 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:6.2.1.1, verify that dot notation can be used for referencing function invocation results + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Elements of a record shall be referenced by the dot notation TypeIdOrExpression.ElementId, +// where TypeIdOrExpression resolves to the name of a structured type or an expression of +// a structured type such as variable, formal parameter, module parameter, constant, template, +// or function invocation. ElementId shall resolve to the name of a field in the structured +// type. + +module Sem_06020101_ReferencingRecordFields_007 { + + type component GeneralComp { + } + + type record R { + record { + integer subfield1 + } field1, + charstring field2 optional + } + + function f_retVal() return R { + return { field1 := { subfield1 := 5 }, field2 := "abc" }; + } + + testcase TC_Sem_06020101_ReferencingRecordFields_007() runs on GeneralComp { + if (f_retVal().field1.subfield1 == 5) { + setverdict(pass); + } else { + setverdict(fail); + } + } + + control { + execute(TC_Sem_06020101_ReferencingRecordFields_007()); + } + +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060201_record_type_and_values/06020101_referencing_fields_of_record_type/Sem_06020101_ReferencingRecordFields_008.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060201_record_type_and_values/06020101_referencing_fields_of_record_type/Sem_06020101_ReferencingRecordFields_008.ttcn new file mode 100644 index 00000000..5f58d448 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060201_record_type_and_values/06020101_referencing_fields_of_record_type/Sem_06020101_ReferencingRecordFields_008.ttcn @@ -0,0 +1,49 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:6.2.1.1, verify that mandatory fields are created and uninitialized when expanding uninitialized record values + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// When referencing a field of an uninitialized record value or field or omitted field +// (including omitting a field at a higher level of the embedding hierarchy) on the left +// hand side of an assignment, the reference shall recursively be expanded up to and +// including the depth of the referenced subfield as follows: +// a) When expanding a value or value field of record type, the subfield referenced in +// the dot notation shall be set to present and all unreferenced mandatory subfields shall +// be left uninitialized; when the assignment is used in a scope where the optional +// attribute is equal to "explicit omit", all unreferenced optional subfields shall be +// left undefined. When the assignment is used in a scope where the optional attribute is +// equal to "implicit omit", all unreferenced optional subfields shall be set to omit. +// b) Expansion of record of/set of/array, union and set values and intermediate fields +// shall follow the rules of item a) in clauses 6.2.3 and 6.2.5.1, and clause 6.2.2.1 +// correspondingly. +// At the end of the expansion, the value at the right hand side of the assignment shall +// be assigned to the referenced subfield. + +module Sem_06020101_ReferencingRecordFields_008 { + + type component GeneralComp { + } + + type record R { + integer field1, + charstring field2 + } + + testcase TC_Sem_06020101_ReferencingRecordFields_008() runs on GeneralComp { + var R v_rec; + v_rec.field2 := "abc"; + if (isbound(v_rec) and not isbound(v_rec.field1)) { + setverdict(pass); + } else { + setverdict(fail); + } + } + + control { + execute(TC_Sem_06020101_ReferencingRecordFields_008()); + } + +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060201_record_type_and_values/06020101_referencing_fields_of_record_type/Sem_06020101_ReferencingRecordFields_009.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060201_record_type_and_values/06020101_referencing_fields_of_record_type/Sem_06020101_ReferencingRecordFields_009.ttcn new file mode 100644 index 00000000..91995676 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060201_record_type_and_values/06020101_referencing_fields_of_record_type/Sem_06020101_ReferencingRecordFields_009.ttcn @@ -0,0 +1,49 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:6.2.1.1, verify that optional fields are created and uninitialized when expanding uninitialized record values (explicit omit) + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// When referencing a field of an uninitialized record value or field or omitted field +// (including omitting a field at a higher level of the embedding hierarchy) on the left +// hand side of an assignment, the reference shall recursively be expanded up to and +// including the depth of the referenced subfield as follows: +// a) When expanding a value or value field of record type, the subfield referenced in +// the dot notation shall be set to present and all unreferenced mandatory subfields shall +// be left uninitialized; when the assignment is used in a scope where the optional +// attribute is equal to "explicit omit", all unreferenced optional subfields shall be +// left undefined. When the assignment is used in a scope where the optional attribute is +// equal to "implicit omit", all unreferenced optional subfields shall be set to omit. +// b) Expansion of record of/set of/array, union and set values and intermediate fields +// shall follow the rules of item a) in clauses 6.2.3 and 6.2.5.1, and clause 6.2.2.1 +// correspondingly. +// At the end of the expansion, the value at the right hand side of the assignment shall +// be assigned to the referenced subfield. + +module Sem_06020101_ReferencingRecordFields_009 { + + type component GeneralComp { + } + + type record R { + integer field1 optional, + charstring field2 + } + + testcase TC_Sem_06020101_ReferencingRecordFields_009() runs on GeneralComp { + var R v_rec; + v_rec.field2 := "abc"; + if (isbound(v_rec) and not isbound(v_rec.field1)) { + setverdict(pass); + } else { + setverdict(fail); + } + } + + control { + execute(TC_Sem_06020101_ReferencingRecordFields_009()); + } + +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060201_record_type_and_values/06020101_referencing_fields_of_record_type/Sem_06020101_ReferencingRecordFields_010.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060201_record_type_and_values/06020101_referencing_fields_of_record_type/Sem_06020101_ReferencingRecordFields_010.ttcn new file mode 100644 index 00000000..930907bc --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060201_record_type_and_values/06020101_referencing_fields_of_record_type/Sem_06020101_ReferencingRecordFields_010.ttcn @@ -0,0 +1,48 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:6.2.1.1, verify that optional fields are created and omitted when expanding uninitialized record values (implicit omit) + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// When referencing a field of an uninitialized record value or field or omitted field +// (including omitting a field at a higher level of the embedding hierarchy) on the left +// hand side of an assignment, the reference shall recursively be expanded up to and +// including the depth of the referenced subfield as follows: +// a) When expanding a value or value field of record type, the subfield referenced in +// the dot notation shall be set to present and all unreferenced mandatory subfields shall +// be left uninitialized; when the assignment is used in a scope where the optional +// attribute is equal to "explicit omit", all unreferenced optional subfields shall be +// left undefined. When the assignment is used in a scope where the optional attribute is +// equal to "implicit omit", all unreferenced optional subfields shall be set to omit. +// b) Expansion of record of/set of/array, union and set values and intermediate fields +// shall follow the rules of item a) in clauses 6.2.3 and 6.2.5.1, and clause 6.2.2.1 +// correspondingly. +// At the end of the expansion, the value at the right hand side of the assignment shall +// be assigned to the referenced subfield. + +module Sem_06020101_ReferencingRecordFields_010 { + + type component GeneralComp { + } + + type record R { + integer field1 optional, + charstring field2 + } + + testcase TC_Sem_06020101_ReferencingRecordFields_010() runs on GeneralComp { + var R v_rec; + v_rec.field2 := "abc"; + if (v_rec == { omit, "abc" }) { + setverdict(pass); + } else { + setverdict(fail); + } + } + + control { + execute(TC_Sem_06020101_ReferencingRecordFields_010()); + } +} with { optional "implicit omit" } diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060201_record_type_and_values/06020101_referencing_fields_of_record_type/Sem_06020101_ReferencingRecordFields_011.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060201_record_type_and_values/06020101_referencing_fields_of_record_type/Sem_06020101_ReferencingRecordFields_011.ttcn new file mode 100644 index 00000000..3116581a --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060201_record_type_and_values/06020101_referencing_fields_of_record_type/Sem_06020101_ReferencingRecordFields_011.ttcn @@ -0,0 +1,57 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:6.2.1.1, verify that referencing fields nested deep inside uninitialized record invokes expansion + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// When referencing a field of an uninitialized record value or field or omitted field +// (including omitting a field at a higher level of the embedding hierarchy) on the left +// hand side of an assignment, the reference shall recursively be expanded up to and +// including the depth of the referenced subfield as follows: +// a) When expanding a value or value field of record type, the subfield referenced in +// the dot notation shall be set to present and all unreferenced mandatory subfields shall +// be left uninitialized; when the assignment is used in a scope where the optional +// attribute is equal to "explicit omit", all unreferenced optional subfields shall be +// left undefined. When the assignment is used in a scope where the optional attribute is +// equal to "implicit omit", all unreferenced optional subfields shall be set to omit. +// b) Expansion of record of/set of/array, union and set values and intermediate fields +// shall follow the rules of item a) in clauses 6.2.3 and 6.2.5.1, and clause 6.2.2.1 +// correspondingly. +// At the end of the expansion, the value at the right hand side of the assignment shall +// be assigned to the referenced subfield. + +module Sem_06020101_ReferencingRecordFields_011 { + + type component GeneralComp { + } + + type record R { + record { + record { + integer nested1, + integer nested2 + } subfield1, + integer subfield2 + } field1, + charstring field2 + } + + testcase TC_Sem_06020101_ReferencingRecordFields_011() runs on GeneralComp { + var R v_rec; + v_rec.field1.subfield1.nested1 := 0; + if (isbound(v_rec) and isbound(v_rec.field1) and not isbound(v_rec.field2) and + isbound(v_rec.field1.subfield1) and not isbound(v_rec.field1.subfield2) and + v_rec.field1.subfield1.nested1 == 0 and not isbound(v_rec.field1.subfield1.nested2)) { + setverdict(pass); + } else { + setverdict(fail); + } + } + + control { + execute(TC_Sem_06020101_ReferencingRecordFields_011()); + } + +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060201_record_type_and_values/06020101_referencing_fields_of_record_type/Sem_06020101_ReferencingRecordFields_012.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060201_record_type_and_values/06020101_referencing_fields_of_record_type/Sem_06020101_ReferencingRecordFields_012.ttcn new file mode 100644 index 00000000..17e46fb9 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060201_record_type_and_values/06020101_referencing_fields_of_record_type/Sem_06020101_ReferencingRecordFields_012.ttcn @@ -0,0 +1,56 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:6.2.1.1, verify that expansion of uninitialized record values works when other constructive types are involved + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// When referencing a field of an uninitialized record value or field or omitted field +// (including omitting a field at a higher level of the embedding hierarchy) on the left +// hand side of an assignment, the reference shall recursively be expanded up to and +// including the depth of the referenced subfield as follows: +// a) When expanding a value or value field of record type, the subfield referenced in +// the dot notation shall be set to present and all unreferenced mandatory subfields shall +// be left uninitialized; when the assignment is used in a scope where the optional +// attribute is equal to "explicit omit", all unreferenced optional subfields shall be +// left undefined. When the assignment is used in a scope where the optional attribute is +// equal to "implicit omit", all unreferenced optional subfields shall be set to omit. +// b) Expansion of record of/set of/array, union and set values and intermediate fields +// shall follow the rules of item a) in clauses 6.2.3 and 6.2.5.1, and clause 6.2.2.1 +// correspondingly. +// At the end of the expansion, the value at the right hand side of the assignment shall +// be assigned to the referenced subfield. + +module Sem_06020101_ReferencingRecordFields_012 { + + type component GeneralComp { + } + + type record R { + union { + record { + integer nested1, + integer nested2 + } option1[2], + integer option2 + } field1, + charstring field2 + } + + testcase TC_Sem_06020101_ReferencingRecordFields_012() runs on GeneralComp { + var R v_rec; + v_rec.field1.option1[0].nested1 := 0; + if (isbound(v_rec) and isbound(v_rec.field1) and not isbound(v_rec.field2) and + match(v_rec.field1.option1[0].nested1, 0) and not isbound(v_rec.field1.option1[0].nested2)) { + setverdict(pass); + } else { + setverdict(fail); + } + } + + control { + execute(TC_Sem_06020101_ReferencingRecordFields_012()); + } + +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060201_record_type_and_values/06020101_referencing_fields_of_record_type/Sem_06020101_ReferencingRecordFields_013.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060201_record_type_and_values/06020101_referencing_fields_of_record_type/Sem_06020101_ReferencingRecordFields_013.ttcn new file mode 100644 index 00000000..220c737f --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060201_record_type_and_values/06020101_referencing_fields_of_record_type/Sem_06020101_ReferencingRecordFields_013.ttcn @@ -0,0 +1,52 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:6.2.1.1, verify that mandatory fields are created and uninitialized when expanding omitted record values + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// When referencing a field of an uninitialized record value or field or omitted field +// (including omitting a field at a higher level of the embedding hierarchy) on the left +// hand side of an assignment, the reference shall recursively be expanded up to and +// including the depth of the referenced subfield as follows: +// a) When expanding a value or value field of record type, the subfield referenced in +// the dot notation shall be set to present and all unreferenced mandatory subfields shall +// be left uninitialized; when the assignment is used in a scope where the optional +// attribute is equal to "explicit omit", all unreferenced optional subfields shall be +// left undefined. When the assignment is used in a scope where the optional attribute is +// equal to "implicit omit", all unreferenced optional subfields shall be set to omit. +// b) Expansion of record of/set of/array, union and set values and intermediate fields +// shall follow the rules of item a) in clauses 6.2.3 and 6.2.5.1, and clause 6.2.2.1 +// correspondingly. +// At the end of the expansion, the value at the right hand side of the assignment shall +// be assigned to the referenced subfield. + +module Sem_06020101_ReferencingRecordFields_013 { + + type component GeneralComp { + } + + type record R { + record { + integer field1, + charstring field2 + } sub optional + } + + testcase TC_Sem_06020101_ReferencingRecordFields_013() runs on GeneralComp { + var R v_rec; + v_rec.sub := omit; + v_rec.sub.field2 := "abc"; + if (isbound(v_rec.sub) and not isbound(v_rec.sub.field1)) { + setverdict(pass); + } else { + setverdict(fail); + } + } + + control { + execute(TC_Sem_06020101_ReferencingRecordFields_013()); + } + +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060201_record_type_and_values/06020101_referencing_fields_of_record_type/Sem_06020101_ReferencingRecordFields_014.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060201_record_type_and_values/06020101_referencing_fields_of_record_type/Sem_06020101_ReferencingRecordFields_014.ttcn new file mode 100644 index 00000000..3c330732 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060201_record_type_and_values/06020101_referencing_fields_of_record_type/Sem_06020101_ReferencingRecordFields_014.ttcn @@ -0,0 +1,52 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:6.2.1.1, verify that optional fields are created and uninitialized when expanding omitted record values (explicit omit) + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// When referencing a field of an uninitialized record value or field or omitted field +// (including omitting a field at a higher level of the embedding hierarchy) on the left +// hand side of an assignment, the reference shall recursively be expanded up to and +// including the depth of the referenced subfield as follows: +// a) When expanding a value or value field of record type, the subfield referenced in +// the dot notation shall be set to present and all unreferenced mandatory subfields shall +// be left uninitialized; when the assignment is used in a scope where the optional +// attribute is equal to "explicit omit", all unreferenced optional subfields shall be +// left undefined. When the assignment is used in a scope where the optional attribute is +// equal to "implicit omit", all unreferenced optional subfields shall be set to omit. +// b) Expansion of record of/set of/array, union and set values and intermediate fields +// shall follow the rules of item a) in clauses 6.2.3 and 6.2.5.1, and clause 6.2.2.1 +// correspondingly. +// At the end of the expansion, the value at the right hand side of the assignment shall +// be assigned to the referenced subfield. + +module Sem_06020101_ReferencingRecordFields_014 { + + type component GeneralComp { + } + + type record R { + record { + integer field1 optional, + charstring field2 + } sub optional + } + + testcase TC_Sem_06020101_ReferencingRecordFields_014() runs on GeneralComp { + var R v_rec; + v_rec.sub := omit; + v_rec.sub.field2 := "abc"; + if (isbound(v_rec.sub) and not isbound(v_rec.sub.field1)) { + setverdict(pass); + } else { + setverdict(fail); + } + } + + control { + execute(TC_Sem_06020101_ReferencingRecordFields_014()); + } + +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060201_record_type_and_values/06020101_referencing_fields_of_record_type/Sem_06020101_ReferencingRecordFields_015.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060201_record_type_and_values/06020101_referencing_fields_of_record_type/Sem_06020101_ReferencingRecordFields_015.ttcn new file mode 100644 index 00000000..a62414c4 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060201_record_type_and_values/06020101_referencing_fields_of_record_type/Sem_06020101_ReferencingRecordFields_015.ttcn @@ -0,0 +1,51 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:6.2.1.1, verify that optional fields are created and omitted when expanding omitted record values (implicit omit) + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// When referencing a field of an uninitialized record value or field or omitted field +// (including omitting a field at a higher level of the embedding hierarchy) on the left +// hand side of an assignment, the reference shall recursively be expanded up to and +// including the depth of the referenced subfield as follows: +// a) When expanding a value or value field of record type, the subfield referenced in +// the dot notation shall be set to present and all unreferenced mandatory subfields shall +// be left uninitialized; when the assignment is used in a scope where the optional +// attribute is equal to "explicit omit", all unreferenced optional subfields shall be +// left undefined. When the assignment is used in a scope where the optional attribute is +// equal to "implicit omit", all unreferenced optional subfields shall be set to omit. +// b) Expansion of record of/set of/array, union and set values and intermediate fields +// shall follow the rules of item a) in clauses 6.2.3 and 6.2.5.1, and clause 6.2.2.1 +// correspondingly. +// At the end of the expansion, the value at the right hand side of the assignment shall +// be assigned to the referenced subfield. + +module Sem_06020101_ReferencingRecordFields_015 { + + type component GeneralComp { + } + + type record R { + record { + integer field1 optional, + charstring field2 + } sub optional + } + + testcase TC_Sem_06020101_ReferencingRecordFields_015() runs on GeneralComp { + var R v_rec; + v_rec.sub := omit; + v_rec.sub.field2 := "abc"; + if (v_rec.sub == { omit, "abc" }) { + setverdict(pass); + } else { + setverdict(fail); + } + } + + control { + execute(TC_Sem_06020101_ReferencingRecordFields_015()); + } +} with { optional "implicit omit" } diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060201_record_type_and_values/06020101_referencing_fields_of_record_type/Sem_06020101_ReferencingRecordFields_016.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060201_record_type_and_values/06020101_referencing_fields_of_record_type/Sem_06020101_ReferencingRecordFields_016.ttcn new file mode 100644 index 00000000..8a04e179 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060201_record_type_and_values/06020101_referencing_fields_of_record_type/Sem_06020101_ReferencingRecordFields_016.ttcn @@ -0,0 +1,60 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:6.2.1.1, verify that referencing fields nested deep inside omitted record invokes expansion + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// When referencing a field of an uninitialized record value or field or omitted field +// (including omitting a field at a higher level of the embedding hierarchy) on the left +// hand side of an assignment, the reference shall recursively be expanded up to and +// including the depth of the referenced subfield as follows: +// a) When expanding a value or value field of record type, the subfield referenced in +// the dot notation shall be set to present and all unreferenced mandatory subfields shall +// be left uninitialized; when the assignment is used in a scope where the optional +// attribute is equal to "explicit omit", all unreferenced optional subfields shall be +// left undefined. When the assignment is used in a scope where the optional attribute is +// equal to "implicit omit", all unreferenced optional subfields shall be set to omit. +// b) Expansion of record of/set of/array, union and set values and intermediate fields +// shall follow the rules of item a) in clauses 6.2.3 and 6.2.5.1, and clause 6.2.2.1 +// correspondingly. +// At the end of the expansion, the value at the right hand side of the assignment shall +// be assigned to the referenced subfield. + +module Sem_06020101_ReferencingRecordFields_016 { + + type component GeneralComp { + } + + type record R { + record { + record { + record { + integer nested1, + integer nested2 + } subfield1, + integer subfield2 + } field1, + charstring field2 + } sub optional + } + + testcase TC_Sem_06020101_ReferencingRecordFields_016() runs on GeneralComp { + var R v_rec; + v_rec.sub := omit; + v_rec.sub.field1.subfield1.nested1 := 0; + if (isbound(v_rec.sub) and isbound(v_rec.sub.field1) and not isbound(v_rec.sub.field2) and + isbound(v_rec.sub.field1.subfield1) and not isbound(v_rec.sub.field1.subfield2) and + match(v_rec.sub.field1.subfield1.nested1, 0) and not isbound(v_rec.sub.field1.subfield1.nested2)) { + setverdict(pass); + } else { + setverdict(fail); + } + } + + control { + execute(TC_Sem_06020101_ReferencingRecordFields_016()); + } + +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060201_record_type_and_values/06020101_referencing_fields_of_record_type/Sem_06020101_ReferencingRecordFields_017.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060201_record_type_and_values/06020101_referencing_fields_of_record_type/Sem_06020101_ReferencingRecordFields_017.ttcn new file mode 100644 index 00000000..94c56fb6 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060201_record_type_and_values/06020101_referencing_fields_of_record_type/Sem_06020101_ReferencingRecordFields_017.ttcn @@ -0,0 +1,59 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:6.2.1.1, verify that expansion of omitted record values works when other constructive types are involved + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// When referencing a field of an uninitialized record value or field or omitted field +// (including omitting a field at a higher level of the embedding hierarchy) on the left +// hand side of an assignment, the reference shall recursively be expanded up to and +// including the depth of the referenced subfield as follows: +// a) When expanding a value or value field of record type, the subfield referenced in +// the dot notation shall be set to present and all unreferenced mandatory subfields shall +// be left uninitialized; when the assignment is used in a scope where the optional +// attribute is equal to "explicit omit", all unreferenced optional subfields shall be +// left undefined. When the assignment is used in a scope where the optional attribute is +// equal to "implicit omit", all unreferenced optional subfields shall be set to omit. +// b) Expansion of record of/set of/array, union and set values and intermediate fields +// shall follow the rules of item a) in clauses 6.2.3 and 6.2.5.1, and clause 6.2.2.1 +// correspondingly. +// At the end of the expansion, the value at the right hand side of the assignment shall +// be assigned to the referenced subfield. + +module Sem_06020101_ReferencingRecordFields_017 { + + type component GeneralComp { + } + + type record R { + record { + union { + record { + integer nested1, + integer nested2 + } option1[2], + integer option2 + } field1, + charstring field2 + } sub optional + } + + testcase TC_Sem_06020101_ReferencingRecordFields_017() runs on GeneralComp { + var R v_rec; + v_rec.sub := omit; + v_rec.sub.field1.option1[0].nested1 := 0; + if (isbound(v_rec) and isbound(v_rec.sub.field1) and not isbound(v_rec.sub.field2) and + match(v_rec.sub.field1.option1[0].nested1, 0) and not isbound(v_rec.sub.field1.option1[0].nested2)) { + setverdict(pass); + } else { + setverdict(fail); + } + } + + control { + execute(TC_Sem_06020101_ReferencingRecordFields_017()); + } + +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060201_record_type_and_values/060201_toplevel/NegSem_060201_RecordTypeValues_001.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060201_record_type_and_values/060201_toplevel/NegSem_060201_RecordTypeValues_001.ttcn new file mode 100644 index 00000000..25f0c4bf --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060201_record_type_and_values/060201_toplevel/NegSem_060201_RecordTypeValues_001.ttcn @@ -0,0 +1,36 @@ +/*************************************************** + ** @author STF 451, re-numbering done by STF 470 and 487 + ** @version 0.0.1 + ** @desc Test cases for clause 6.2 + ** @purpose 1:6.2, Ensure that assignments with "implicit omit" attribute are correctly handled + ** @verdict pass reject + ***************************************************/ +module NegSem_060201_RecordTypeValues_001 { + +type component GeneralComp { +} + + type record R { + integer f1, + integer f2 optional, + integer f3, + integer f4 optional, + integer f5 optional + } + +testcase TC_NegSem_060201_RecordTypeValues_001() runs on GeneralComp { + + var R v_assigned := { 1, 2 } with { optional "implicit omit" } + template R m_check := { 1, omit, 2, omit, omit } + + if (match(v_assigned,m_check)) { //cannot match undefined components of v_assigned + setverdict(pass); + } + +} + +control { + execute(TC_NegSem_060201_RecordTypeValues_001()); +} + +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060201_record_type_and_values/060201_toplevel/NegSyn_060201_RecordTypeValues_001.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060201_record_type_and_values/060201_toplevel/NegSyn_060201_RecordTypeValues_001.ttcn new file mode 100644 index 00000000..4db23423 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060201_record_type_and_values/060201_toplevel/NegSyn_060201_RecordTypeValues_001.ttcn @@ -0,0 +1,18 @@ +/*************************************************** + ** @author STF 409, re-numbering done by STF470 + ** @version 0.0.1 + ** @purpose 1:6.2, The omit keyword shall not be used for mandatory fields. + ** @verdict pass reject + ***************************************************/ +module NegSyn_060201_RecordTypeValues_001 { + type record MyRecord { + integer field1, + MyRecord field2 optional, + integer field3 + } + const MyRecord c_rec := { + field1 := 5, + field2 := omit, + field3 := omit // not optional + }; +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060201_record_type_and_values/060201_toplevel/NegSyn_060201_RecordTypeValues_002.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060201_record_type_and_values/060201_toplevel/NegSyn_060201_RecordTypeValues_002.ttcn new file mode 100644 index 00000000..da14aa4b --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060201_record_type_and_values/060201_toplevel/NegSyn_060201_RecordTypeValues_002.ttcn @@ -0,0 +1,18 @@ +/*************************************************** + ** @author STF 409, re-numbering done by STF470 + ** @version 0.0.1 + ** @purpose 1:6.2, The omit keyword shall not be used for mandatory fields. + ** @verdict pass reject + ***************************************************/ +module NegSyn_060201_RecordTypeValues_002 { + type record MyRecord { + integer field1, + MyRecord field2 optional, + integer field3 + } + const MyRecord c_rec := { + field1 := 5, + field2 := -, + field3 := omit // not optional + }; +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060201_record_type_and_values/060201_toplevel/Sem_060201_RecordTypeValues_001.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060201_record_type_and_values/060201_toplevel/Sem_060201_RecordTypeValues_001.ttcn new file mode 100644 index 00000000..de209b0b --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060201_record_type_and_values/060201_toplevel/Sem_060201_RecordTypeValues_001.ttcn @@ -0,0 +1,39 @@ +/*************************************************** + ** @author STF 451, re-numbering done by STF 470 and 487 + ** @version 0.0.1 + ** @desc Test cases for clause 6.2 + ** @purpose 1:6.2, Ensure that assignments with "implicit omit" attribute are correctly handled + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Sem_060201_RecordTypeValues_001 { + +type component GeneralComp { +} + + type record R { + integer f1, + integer f2 optional, + integer f3, + integer f4 optional, + integer f5 optional + } + +testcase TC_Sem_060201_RecordTypeValues_001() runs on GeneralComp { + + var R v_assigned := { 1, -, 2 } with { optional "implicit omit" } + template R m_check := { 1, omit, 2, omit, omit } + + if (match(v_assigned,m_check)) { + setverdict(pass); + } + else { + setverdict(fail); + } + +} + +control { + execute(TC_Sem_060201_RecordTypeValues_001()); +} + +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060201_record_type_and_values/060201_toplevel/Sem_060201_RecordTypeValues_002.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060201_record_type_and_values/060201_toplevel/Sem_060201_RecordTypeValues_002.ttcn new file mode 100644 index 00000000..2e324f4c --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060201_record_type_and_values/060201_toplevel/Sem_060201_RecordTypeValues_002.ttcn @@ -0,0 +1,40 @@ +/*************************************************** + ** @author STF 451, re-numbering done by STF 470 and 487 + ** @version 0.0.1 + ** @desc Test cases for clause 6.2 + ** @purpose 1:6.2, Ensure that assignments with "implicit omit" attribute are correctly handled + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Sem_060201_RecordTypeValues_002 { + +type component GeneralComp { +} + + type record R { + integer f1, + integer f2 optional, + integer f3, + integer f4 optional, + integer f5 optional + } + + const R c_assigned := { 1, -, 2 } with { optional "implicit omit" } + +testcase TC_Sem_060201_RecordTypeValues_002() runs on GeneralComp { + + template R m_check := { 1, omit, 2, omit, omit } + + if (match(c_assigned,m_check)) { + setverdict(pass); + } + else { + setverdict(fail); + } + +} + +control { + execute(TC_Sem_060201_RecordTypeValues_002()); +} + +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060201_record_type_and_values/060201_toplevel/Sem_060201_RecordTypeValues_003.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060201_record_type_and_values/060201_toplevel/Sem_060201_RecordTypeValues_003.ttcn new file mode 100644 index 00000000..7fca39e1 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060201_record_type_and_values/060201_toplevel/Sem_060201_RecordTypeValues_003.ttcn @@ -0,0 +1,41 @@ +/*************************************************** + ** @author STF 451, re-numbering done by STF 470 and 487 + ** @version 0.0.1 + ** @desc Test cases for clause 6.2 + ** @purpose 1:6.2, Ensure that assignments with "implicit omit" attribute are correctly handled + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Sem_060201_RecordTypeValues_003 { + +type component GeneralComp { +} + + type record R { + integer f1, + integer f2 optional, + integer f3, + integer f4 optional, + integer f5 optional + } + +testcase TC_Sem_060201_RecordTypeValues_003() runs on GeneralComp { + + var R v_assigned := { 1, 2, 3 } with { optional "implicit omit" } + + if ( match(v_assigned.f1,1) + and match(v_assigned.f3,3) + and not ispresent(v_assigned.f4) + and not ispresent(v_assigned.f5) ) { + setverdict(pass); + } + else { + setverdict(fail); + } + +} + +control { + execute(TC_Sem_060201_RecordTypeValues_003()); +} + +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060201_record_type_and_values/060201_toplevel/Sem_060201_RecordTypeValues_004.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060201_record_type_and_values/060201_toplevel/Sem_060201_RecordTypeValues_004.ttcn new file mode 100644 index 00000000..9e104359 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060201_record_type_and_values/060201_toplevel/Sem_060201_RecordTypeValues_004.ttcn @@ -0,0 +1,37 @@ +/*************************************************** + ** @author STF 451 (updated by STF 470, 487 and 521) + ** @version 0.0.1 + ** @desc Test cases for clause 6.2 + ** @purpose 1:6.2, Ensure that assignments with "implicit omit" attribute are correctly handled + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Sem_060201_RecordTypeValues_004 { + +type component GeneralComp { +} + + type record R { + integer f1, + integer f2 optional, + integer f3, + integer f4 optional, + integer f5 optional + } + +testcase TC_Sem_060201_RecordTypeValues_004() runs on GeneralComp { + + var R v_assigned := { 1, 2 } with { optional "implicit omit" } // f3 stays undefined + if (v_assigned.f1 == 1 and + v_assigned.f2 == 2 and + not isbound(v_assigned.f3) and + not ispresent(v_assigned.f4) and + not ispresent(v_assigned.f5)) { + setverdict(pass); + } else { setverdict(fail); } +} + +control { + execute(TC_Sem_060201_RecordTypeValues_004()); +} + +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060201_record_type_and_values/060201_toplevel/Syn_060201_RecordTypeValues_001.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060201_record_type_and_values/060201_toplevel/Syn_060201_RecordTypeValues_001.ttcn new file mode 100644 index 00000000..3c65b82d --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060201_record_type_and_values/060201_toplevel/Syn_060201_RecordTypeValues_001.ttcn @@ -0,0 +1,19 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:6.2.1, The element identifiers are local to the record and shall be unique within the record (but do not have to be globally unique). + ** @verdict pass accept, noexecution + ***************************************************/ +module Syn_060201_RecordTypeValues_001 { + const integer field2 := 4; // do not edit the name + + type record MyRecordType { + integer field1, + MyOtherRecordType field2 optional, + charstring field3 + } + type record MyOtherRecordType { + bitstring field1, + boolean field2 + } +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060201_record_type_and_values/060201_toplevel/Syn_060201_RecordTypeValues_002.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060201_record_type_and_values/060201_toplevel/Syn_060201_RecordTypeValues_002.ttcn new file mode 100644 index 00000000..baa481cc --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060201_record_type_and_values/060201_toplevel/Syn_060201_RecordTypeValues_002.ttcn @@ -0,0 +1,10 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:6.2.1, Ensure that the IUT correctly handles empty record definitions. + ** @verdict pass accept, noexecution + ***************************************************/ +module Syn_060201_RecordTypeValues_002 { + type record MyRecordType { + } +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060202_set_type_and_values/NegSem_060202_SetTypeValues_001.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060202_set_type_and_values/NegSem_060202_SetTypeValues_001.ttcn new file mode 100644 index 00000000..2d2a4230 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060202_set_type_and_values/NegSem_060202_SetTypeValues_001.ttcn @@ -0,0 +1,31 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:6.2.2, The dot notation used in set type definitions is correctly handled + ** @verdict pass reject + ***************************************************/ +module NegSem_060202_SetTypeValues_001 { + +type component GeneralComp { +} + + type set S { + integer field1 (1 .. 10), + charstring field2 optional + } + + type S ConstrainedSet ({1, omit}, {2, "xyz"}, {3, "zyx"}) ; + + type ConstrainedSet.field1 MyInteger; + +testcase TC_NegSem_060202_SetTypeValues_001() runs on GeneralComp { + + var MyInteger v_int := 11; // assignment from outside of the carried over (1 .. 10) range constraint + +} + +control { + execute(TC_NegSem_060202_SetTypeValues_001()); +} + +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060202_set_type_and_values/NegSem_060202_SetTypeValues_002.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060202_set_type_and_values/NegSem_060202_SetTypeValues_002.ttcn new file mode 100644 index 00000000..202b2620 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060202_set_type_and_values/NegSem_060202_SetTypeValues_002.ttcn @@ -0,0 +1,36 @@ +/*************************************************** + ** @author STF470 + ** @version 0.0.1 + ** @desc Test cases for clause 6.2 + ** @purpose 1:6.2, Ensure that assignments with "implicit omit" attribute are correctly handled + ** @verdict pass reject + ***************************************************/ +module NegSem_060202_SetTypeValues_002 { + +type component GeneralComp { +} + + type set S { + integer f1, + integer f2 optional, + integer f3, + integer f4 optional, + integer f5 optional + } + +testcase TC_NegSem_060202_SetTypeValues_002() runs on GeneralComp { + + var S v_assigned := { 1, 2 } with { optional "implicit omit" } + template S m_check := { 1, omit, 2, omit, omit } + + if (match(v_assigned,m_check)) { //cannot match undefined components of v_assigned + setverdict(pass); + } + +} + +control { + execute(TC_NegSem_060202_SetTypeValues_002()); +} + +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060202_set_type_and_values/NegSyn_060202_SetTypeValues_001.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060202_set_type_and_values/NegSyn_060202_SetTypeValues_001.ttcn new file mode 100644 index 00000000..c7b4691f --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060202_set_type_and_values/NegSyn_060202_SetTypeValues_001.ttcn @@ -0,0 +1,18 @@ +/*************************************************** + ** @author STF470 + ** @version 0.0.1 + ** @purpose 1:6.2, The omit keyword shall not be used for mandatory fields. + ** @verdict pass reject + ***************************************************/ +module NegSyn_060202_SetTypeValues_001 { + type set MySet { + integer field1, + MySet field2 optional, + integer field3 + } + const MySet c_set := { + field1 := 5, + field2 := omit, + field3 := omit // not optional + }; +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060202_set_type_and_values/NegSyn_060202_SetTypeValues_002.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060202_set_type_and_values/NegSyn_060202_SetTypeValues_002.ttcn new file mode 100644 index 00000000..8d02d3ce --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060202_set_type_and_values/NegSyn_060202_SetTypeValues_002.ttcn @@ -0,0 +1,18 @@ +/*************************************************** + ** @author STF470 + ** @version 0.0.1 + ** @purpose 1:6.2, The omit keyword shall not be used for mandatory fields. + ** @verdict pass reject + ***************************************************/ +module NegSyn_060202_SetTypeValues_002 { + type record MySet { + integer field1, + MySet field2 optional, + integer field3 + } + const MySet c_set := { + field1 := 5, + field2 := -, + field3 :=omit // not optional + }; +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060202_set_type_and_values/Sem_060202_SetTypeValues_001.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060202_set_type_and_values/Sem_060202_SetTypeValues_001.ttcn new file mode 100644 index 00000000..10530bf3 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060202_set_type_and_values/Sem_060202_SetTypeValues_001.ttcn @@ -0,0 +1,38 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:6.2.2, The dot notation used in set type definitions is correctly handled + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Sem_060202_SetTypeValues_001 { + +type component GeneralComp { +} + + type set S { + integer field1 (1 .. 10), + charstring field2 optional + } + + type S ConstrainedSet ({1, omit}, {2, "xyz"}, {3, "zyx"}) ; + + type ConstrainedSet.field1 MyInteger; + +testcase TC_Sem_060202_SetTypeValues_001() runs on GeneralComp { + + var MyInteger v_int := 9; // v_int is allowed in (1 .. 10) range + + if (v_int==9) { + setverdict(pass); + } + else { + setverdict(fail); + } + +} + +control { + execute(TC_Sem_060202_SetTypeValues_001()); +} + +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060202_set_type_and_values/Sem_060202_SetTypeValues_002.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060202_set_type_and_values/Sem_060202_SetTypeValues_002.ttcn new file mode 100644 index 00000000..245d0b76 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060202_set_type_and_values/Sem_060202_SetTypeValues_002.ttcn @@ -0,0 +1,38 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:6.2.2, The dot notation used in set type definitions is correctly handled + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Sem_060202_SetTypeValues_002 { + +type component GeneralComp { +} + + type set S { + integer field1 (1 .. 10), + charstring field2 optional + } + + type S ConstrainedSet ({1, omit}, {2, "xyz"}, {3, "zyx"}); + + type ConstrainedSet.field2 MyChar; + +testcase TC_Sem_060202_SetTypeValues_002() runs on GeneralComp { + + var MyChar v_char := "abc"; // any character string is allowed + + if (v_char=="abc") { + setverdict(pass); + } + else { + setverdict(fail); + } + +} + +control { + execute(TC_Sem_060202_SetTypeValues_002()); +} + +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060202_set_type_and_values/Sem_060202_SetTypeValues_003.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060202_set_type_and_values/Sem_060202_SetTypeValues_003.ttcn new file mode 100644 index 00000000..375594e1 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060202_set_type_and_values/Sem_060202_SetTypeValues_003.ttcn @@ -0,0 +1,36 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:6.2.2, The dot notation used in set type definitions is correctly handled + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Sem_060202_SetTypeValues_003 { + +type component GeneralComp { +} + + type set S { + integer field1 (1 .. 10), + charstring field2 optional + } + + type S.field1 MyInteger; + +testcase TC_Sem_060202_SetTypeValues_003() runs on GeneralComp { + + var MyInteger v_int := 9; // v_int is allowed in (1 .. 10) range + + if (v_int==9) { + setverdict(pass); + } + else { + setverdict(fail); + } + +} + +control { + execute(TC_Sem_060202_SetTypeValues_003()); +} + +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060202_set_type_and_values/Sem_060202_SetTypeValues_004.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060202_set_type_and_values/Sem_060202_SetTypeValues_004.ttcn new file mode 100644 index 00000000..847453a5 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060202_set_type_and_values/Sem_060202_SetTypeValues_004.ttcn @@ -0,0 +1,37 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:6.2.2, The dot notation used in set type definitions is correctly handled + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Sem_060202_SetTypeValues_004 { + +type component GeneralComp { +} + + type set S { + integer field1 (1 .. 10), + charstring field2 optional + } + + + type S.field2 MyChar; + +testcase TC_Sem_060202_SetTypeValues_004() runs on GeneralComp { + + var MyChar v_char := "abc"; // any character string is allowed + + if (v_char=="abc") { + setverdict(pass); + } + else { + setverdict(fail); + } + +} + +control { + execute(TC_Sem_060202_SetTypeValues_004()); +} + +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060202_set_type_and_values/Sem_060202_SetTypeValues_005.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060202_set_type_and_values/Sem_060202_SetTypeValues_005.ttcn new file mode 100644 index 00000000..69a81fda --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060202_set_type_and_values/Sem_060202_SetTypeValues_005.ttcn @@ -0,0 +1,39 @@ +/*************************************************** + ** @author STF470 + ** @version 0.0.1 + ** @desc Test cases for clause 6.2 + ** @purpose 1:6.2, Ensure that assignments with "implicit omit" attribute are correctly handled + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Sem_060202_SetTypeValues_005 { + +type component GeneralComp { +} + + type set S { + integer f1, + integer f2 optional, + integer f3, + integer f4 optional, + integer f5 optional + } + +testcase TC_Sem_060202_SetTypeValues_005() runs on GeneralComp { + + var S v_assigned := { 1, -, 2 } with { optional "implicit omit" } + template S m_check := { 1, omit, 2, omit, omit } + + if (match(v_assigned,m_check)) { + setverdict(pass); + } + else { + setverdict(fail); + } + +} + +control { + execute(TC_Sem_060202_SetTypeValues_005()); +} + +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060202_set_type_and_values/Sem_060202_SetTypeValues_006.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060202_set_type_and_values/Sem_060202_SetTypeValues_006.ttcn new file mode 100644 index 00000000..f89d4d1d --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060202_set_type_and_values/Sem_060202_SetTypeValues_006.ttcn @@ -0,0 +1,40 @@ +/*************************************************** + ** @author STF470 + ** @version 0.0.1 + ** @desc Test cases for clause 6.2 + ** @purpose 1:6.2, Ensure that assignments with "implicit omit" attribute are correctly handled + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Sem_060202_SetTypeValues_006 { + +type component GeneralComp { +} + + type set S { + integer f1, + integer f2 optional, + integer f3, + integer f4 optional, + integer f5 optional + } + + const S c_assigned := { 1, -, 2 } with { optional "implicit omit" } + +testcase TC_Sem_060202_SetTypeValues_006() runs on GeneralComp { + + template S m_check := { 1, omit, 2, omit, omit } + + if (match(c_assigned,m_check)) { + setverdict(pass); + } + else { + setverdict(fail); + } + +} + +control { + execute(TC_Sem_060202_SetTypeValues_006()); +} + +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060202_set_type_and_values/Sem_060202_SetTypeValues_007.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060202_set_type_and_values/Sem_060202_SetTypeValues_007.ttcn new file mode 100644 index 00000000..368f8e5f --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060202_set_type_and_values/Sem_060202_SetTypeValues_007.ttcn @@ -0,0 +1,41 @@ +/*************************************************** + ** @author STF470 + ** @version 0.0.1 + ** @desc Test cases for clause 6.2 + ** @purpose 1:6.2, Ensure that assignments with "implicit omit" attribute are correctly handled + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Sem_060202_SetTypeValues_007 { + +type component GeneralComp { +} + + type record S { + integer f1, + integer f2 optional, + integer f3, + integer f4 optional, + integer f5 optional + } + +testcase TC_Sem_060202_SetTypeValues_007() runs on GeneralComp { + + var S v_assigned := { 1, 2, 3 } with { optional "implicit omit" } + + if ( match(v_assigned.f1,1) + and match(v_assigned.f3,3) + and not ispresent(v_assigned.f4) + and not ispresent(v_assigned.f5) ) { + setverdict(pass); + } + else { + setverdict(fail); + } + +} + +control { + execute(TC_Sem_060202_SetTypeValues_007()); +} + +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060202_set_type_and_values/Sem_060202_SetTypeValues_008.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060202_set_type_and_values/Sem_060202_SetTypeValues_008.ttcn new file mode 100644 index 00000000..9a656cfe --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060202_set_type_and_values/Sem_060202_SetTypeValues_008.ttcn @@ -0,0 +1,37 @@ +/*************************************************** + ** @author STF470 (updated by STF 521) + ** @version 0.0.1 + ** @desc Test cases for clause 6.2 + ** @purpose 1:6.2, Ensure that assignments with "implicit omit" attribute are correctly handled + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Sem_060202_SetTypeValues_008 { + +type component GeneralComp { +} + + type set S { + integer f1, + integer f2 optional, + integer f3, + integer f4 optional, + integer f5 optional + } + +testcase TC_Sem_060202_SetTypeValues_008() runs on GeneralComp { + + var S v_assigned := { 1, 2 } with { optional "implicit omit" } //f3 stays undefined + if (v_assigned.f1 == 1 and + v_assigned.f2 == 2 and + not isbound(v_assigned.f3) and + not ispresent(v_assigned.f4) and + not ispresent(v_assigned.f5)) { + setverdict(pass); + } else { setverdict(fail); } +} + +control { + execute(TC_Sem_060202_SetTypeValues_008()); +} + +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060202_set_type_and_values/Syn_060202_SetTypeValues_001.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060202_set_type_and_values/Syn_060202_SetTypeValues_001.ttcn new file mode 100644 index 00000000..f2a5904e --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060202_set_type_and_values/Syn_060202_SetTypeValues_001.ttcn @@ -0,0 +1,19 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:6.2.2, The element identifiers are local to the set and shall be unique within the record (but do not have to be globally unique). + ** @verdict pass accept, noexecution + ***************************************************/ +module Syn_060202_SetTypeValues_001 { + const integer field2 := 4; // do not edit the name + + type set MySetType { + integer field1, + MyOtherSetType field2 optional, + charstring field3 + } + type set MyOtherSetType { + bitstring field1, + boolean field2 + } +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060202_set_type_and_values/Syn_060202_SetTypeValues_002.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060202_set_type_and_values/Syn_060202_SetTypeValues_002.ttcn new file mode 100644 index 00000000..58bb4511 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060202_set_type_and_values/Syn_060202_SetTypeValues_002.ttcn @@ -0,0 +1,10 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:6.2.2, Ensure that the IUT correctly handles empty set definitions. + ** @verdict pass accept, noexecution + ***************************************************/ +module Syn_060202_SetTypeValues_002 { + type set MySetType { + } +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/NegSem_060203_records_and_sets_of_single_types_001.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/NegSem_060203_records_and_sets_of_single_types_001.ttcn new file mode 100644 index 00000000..9c50739d --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/NegSem_060203_records_and_sets_of_single_types_001.ttcn @@ -0,0 +1,25 @@ +/*************************************************** + ** @author STF 451 + ** @version 0.0.1 + ** @purpose 1:6.2.3.2, ensure that the inner type referencing is correctly handled + ** @verdict pass reject + ***************************************************/ +module NegSem_060203_records_and_sets_of_single_types_001 { + + type component GeneralComp { + } + + type record length (5) of record of integer ConstrainedStructure (1 .. 10); + type ConstrainedStructure[-] RecordOfInt; + +testcase TC_NegSem_060203_records_and_sets_of_single_types_001() runs on GeneralComp { + + var RecordOfInt v_rec := { 8, 11, 2, 3, 4, 5, 6, 7 }; // a value is outside the restricted range + +} + +control { + execute(TC_NegSem_060203_records_and_sets_of_single_types_001()); +} + +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/NegSem_060203_records_and_sets_of_single_types_002.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/NegSem_060203_records_and_sets_of_single_types_002.ttcn new file mode 100644 index 00000000..996b8590 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/NegSem_060203_records_and_sets_of_single_types_002.ttcn @@ -0,0 +1,25 @@ +/*************************************************** + ** @author STF 451 + ** @version 0.0.1 + ** @purpose 1:6.2.3.2, ensure that the inner type referencing is correctly handled + ** @verdict pass reject + ***************************************************/ +module NegSem_060203_records_and_sets_of_single_types_002 { + + type component GeneralComp { + } + + type record of record length (5) of integer ConstrainedStructure (1 .. 10); + type ConstrainedStructure[-] RecordOfInt; + +testcase TC_NegSem_060203_records_and_sets_of_single_types_002() runs on GeneralComp { + + var RecordOfInt v_rec := { 8, 1, 2, 3, 4, 5, 6, 7 }; // a record is longer than the restricted length + +} + +control { + execute(TC_NegSem_060203_records_and_sets_of_single_types_002()); +} + +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/NegSem_060203_records_and_sets_of_single_types_003.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/NegSem_060203_records_and_sets_of_single_types_003.ttcn new file mode 100644 index 00000000..c64886dc --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/NegSem_060203_records_and_sets_of_single_types_003.ttcn @@ -0,0 +1,29 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:6.2.3, negative index applied to a record of value on the right hand side of an assignment + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Implicit rule, formal requirement requested in CR 6646 (resolution expected +// in TTCN-3:2014) +module NegSem_060203_records_and_sets_of_single_types_003 { + + type component GeneralComp { + } + + type record of integer RoI; + + testcase TC_NegSem_060203_records_and_sets_of_single_types_003() runs on GeneralComp { + + var RoI v_rec := { 0, 1, 2 }; + var integer i := v_rec[-1]; // error expected + setverdict(pass); + } + + control { + execute(TC_NegSem_060203_records_and_sets_of_single_types_003()); + } + +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/NegSem_060203_records_and_sets_of_single_types_004.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/NegSem_060203_records_and_sets_of_single_types_004.ttcn new file mode 100644 index 00000000..a3fd6c79 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/NegSem_060203_records_and_sets_of_single_types_004.ttcn @@ -0,0 +1,29 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:6.2.3, negative index applied to a set of value on the right hand side of an assignment + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Implicit rule, formal requirement requested in CR 6646 (resolution expected +// in TTCN-3:2014) +module NegSem_060203_records_and_sets_of_single_types_004 { + + type component GeneralComp { + } + + type set of integer SoI; + + testcase TC_NegSem_060203_records_and_sets_of_single_types_004() runs on GeneralComp { + + var SoI v_set := { 0, 1, 2 }; + var integer i := v_set[-1]; // error expected + setverdict(pass); + } + + control { + execute(TC_NegSem_060203_records_and_sets_of_single_types_004()); + } + +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/NegSem_060203_records_and_sets_of_single_types_005.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/NegSem_060203_records_and_sets_of_single_types_005.ttcn new file mode 100644 index 00000000..865432e9 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/NegSem_060203_records_and_sets_of_single_types_005.ttcn @@ -0,0 +1,29 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:6.2.3, negative index applied to a record of value on the left hand side of an assignment + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Implicit rule, formal requirement requested in CR 6646 (resolution expected +// in TTCN-3:2014) +module NegSem_060203_records_and_sets_of_single_types_005 { + + type component GeneralComp { + } + + type record of integer RoI; + + testcase TC_NegSem_060203_records_and_sets_of_single_types_005() runs on GeneralComp { + + var RoI v_rec := { 0, 1, 2 }; + v_rec[-1] := 10; // error expected + setverdict(pass); + } + + control { + execute(TC_NegSem_060203_records_and_sets_of_single_types_005()); + } + +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/NegSem_060203_records_and_sets_of_single_types_006.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/NegSem_060203_records_and_sets_of_single_types_006.ttcn new file mode 100644 index 00000000..bf31b8d5 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/NegSem_060203_records_and_sets_of_single_types_006.ttcn @@ -0,0 +1,29 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:6.2.3, negative index applied to a set of value on the left hand side of an assignment + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Implicit rule, formal requirement requested in CR 6646 (resolution expected +// in TTCN-3:2014) +module NegSem_060203_records_and_sets_of_single_types_006 { + + type component GeneralComp { + } + + type set of integer SoI; + + testcase TC_NegSem_060203_records_and_sets_of_single_types_006() runs on GeneralComp { + + var SoI v_set := { 0, 1, 2 }; + v_set[-1] := 10; // error expected + setverdict(pass); + } + + control { + execute(TC_NegSem_060203_records_and_sets_of_single_types_006()); + } + +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/NegSem_060203_records_and_sets_of_single_types_007.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/NegSem_060203_records_and_sets_of_single_types_007.ttcn new file mode 100644 index 00000000..d0f09ebe --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/NegSem_060203_records_and_sets_of_single_types_007.ttcn @@ -0,0 +1,29 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:6.2.3, wrong index type applied to a record of value on the right hand side of an assignment + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Implicit rule, formal requirement requested in CR 6646 (resolution expected +// in TTCN-3:2014) +module NegSem_060203_records_and_sets_of_single_types_007 { + + type component GeneralComp { + } + + type record of integer RoI; + + testcase TC_NegSem_060203_records_and_sets_of_single_types_007() runs on GeneralComp { + + var RoI v_rec := { 0, 1, 2 }; + var integer i := v_rec["0"]; // error expected + setverdict(pass); + } + + control { + execute(TC_NegSem_060203_records_and_sets_of_single_types_007()); + } + +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/NegSem_060203_records_and_sets_of_single_types_008.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/NegSem_060203_records_and_sets_of_single_types_008.ttcn new file mode 100644 index 00000000..aa0b86d8 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/NegSem_060203_records_and_sets_of_single_types_008.ttcn @@ -0,0 +1,29 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:6.2.3, wrong index type applied to a set of value on the right hand side of an assignment + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Implicit rule, formal requirement requested in CR 6646 (resolution expected +// in TTCN-3:2014) +module NegSem_060203_records_and_sets_of_single_types_008 { + + type component GeneralComp { + } + + type set of integer SoI; + + testcase TC_NegSem_060203_records_and_sets_of_single_types_008() runs on GeneralComp { + + var SoI v_set := { 0, 1, 2 }; + var integer i := v_set["0"]; // error expected + setverdict(pass); + } + + control { + execute(TC_NegSem_060203_records_and_sets_of_single_types_008()); + } + +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/NegSem_060203_records_and_sets_of_single_types_009.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/NegSem_060203_records_and_sets_of_single_types_009.ttcn new file mode 100644 index 00000000..a1b973ef --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/NegSem_060203_records_and_sets_of_single_types_009.ttcn @@ -0,0 +1,29 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:6.2.3, wrong index type applied to a record of value on the left hand side of an assignment + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Implicit rule, formal requirement requested in CR 6646 (resolution expected +// in TTCN-3:2014) +module NegSem_060203_records_and_sets_of_single_types_009 { + + type component GeneralComp { + } + + type record of integer RoI; + + testcase TC_NegSem_060203_records_and_sets_of_single_types_009() runs on GeneralComp { + + var RoI v_rec := { 0, 1, 2 }; + v_rec["0"] := 10; // error expected + setverdict(pass); + } + + control { + execute(TC_NegSem_060203_records_and_sets_of_single_types_009()); + } + +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/NegSem_060203_records_and_sets_of_single_types_010.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/NegSem_060203_records_and_sets_of_single_types_010.ttcn new file mode 100644 index 00000000..0201604e --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/NegSem_060203_records_and_sets_of_single_types_010.ttcn @@ -0,0 +1,29 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:6.2.3.2, wrong index type applied to a set of value on the left hand side of an assignment + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Implicit rule, formal requirement requested in CR 6646 (resolution expected +// in TTCN-3:2014) +module NegSem_060203_records_and_sets_of_single_types_010 { + + type component GeneralComp { + } + + type set of integer SoI; + + testcase TC_NegSem_060203_records_and_sets_of_single_types_010() runs on GeneralComp { + + var SoI v_set := { 0, 1, 2 }; + v_set["0"] := 10; // error expected + setverdict(pass); + } + + control { + execute(TC_NegSem_060203_records_and_sets_of_single_types_010()); + } + +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/NegSem_060203_records_and_sets_of_single_types_011.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/NegSem_060203_records_and_sets_of_single_types_011.ttcn new file mode 100644 index 00000000..0aec135f --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/NegSem_060203_records_and_sets_of_single_types_011.ttcn @@ -0,0 +1,33 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:6.2.3.2, record of index greater than the upper bound (left-hand side) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// The index value shall not exceed the limitation placed by length subtyping. + +// Note: right-hand side is not tested, because such an element is non-existent +// and it is impossible to find out whether expected error is caused by this +// this requirement or the rule concerning referencing non-existent elements. + +module NegSem_060203_records_and_sets_of_single_types_011 { + + type component GeneralComp { + } + + type record length (0..3) of integer RoI; + + testcase TC_NegSem_060203_records_and_sets_of_single_types_011() runs on GeneralComp { + + var RoI v_rec := { 0, 1, 2 }; + v_rec[3] := 3; // error expected + setverdict(pass); + } + + control { + execute(TC_NegSem_060203_records_and_sets_of_single_types_011()); + } + +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/NegSem_060203_records_and_sets_of_single_types_012.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/NegSem_060203_records_and_sets_of_single_types_012.ttcn new file mode 100644 index 00000000..5ec3a5a6 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/NegSem_060203_records_and_sets_of_single_types_012.ttcn @@ -0,0 +1,33 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:6.2.3.2, set of index greater than the upper bound (left-hand side) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// The index value shall not exceed the limitation placed by length subtyping. + +// Note: right-hand side is not tested, because such an element is non-existent +// and it is impossible to find out whether expected error is caused by this +// this requirement or the rule concerning referencing non-existent elements. + +module NegSem_060203_records_and_sets_of_single_types_012 { + + type component GeneralComp { + } + + type set length (0..3) of integer SoI; + + testcase TC_NegSem_060203_records_and_sets_of_single_types_012() runs on GeneralComp { + + var SoI v_set := { 0, 1, 2 }; + v_set[3] := 3; // error expected + setverdict(pass); + } + + control { + execute(TC_NegSem_060203_records_and_sets_of_single_types_012()); + } + +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/NegSem_060203_records_and_sets_of_single_types_013.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/NegSem_060203_records_and_sets_of_single_types_013.ttcn new file mode 100644 index 00000000..6e2ef58b --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/NegSem_060203_records_and_sets_of_single_types_013.ttcn @@ -0,0 +1,30 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:6.2.3.2, wrong index type applied to a record of value on the right hand side of an assignment + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If the value of the element indicated by the index at the right-hand of an +// assignment is undefined (uninitialized), this shall cause a semantic or +// run-time error.) +module NegSem_060203_records_and_sets_of_single_types_013 { + + type component GeneralComp { + } + + type record of integer RoI; + + testcase TC_NegSem_060203_records_and_sets_of_single_types_013() runs on GeneralComp { + + var RoI v_rec := { 0, 1, 2 }; + var integer i := v_rec[3]; // error expected + setverdict(pass); + } + + control { + execute(TC_NegSem_060203_records_and_sets_of_single_types_013()); + } + +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/NegSem_060203_records_and_sets_of_single_types_014.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/NegSem_060203_records_and_sets_of_single_types_014.ttcn new file mode 100644 index 00000000..76b7d861 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/NegSem_060203_records_and_sets_of_single_types_014.ttcn @@ -0,0 +1,30 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:6.2.3.2, wrong index type applied to a record of value on the right hand side of an assignment + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If the value of the element indicated by the index at the right-hand of an +// assignment is undefined (uninitialized), this shall cause a semantic or +// run-time error.) +module NegSem_060203_records_and_sets_of_single_types_014 { + + type component GeneralComp { + } + + type set of integer SoI; + + testcase TC_NegSem_060203_records_and_sets_of_single_types_014() runs on GeneralComp { + + var SoI v_set := { 0, 1, 2 }; + var integer i := v_set[3]; // error expected + setverdict(pass); + } + + control { + execute(TC_NegSem_060203_records_and_sets_of_single_types_014()); + } + +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/NegSem_060203_records_and_sets_of_single_types_015.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/NegSem_060203_records_and_sets_of_single_types_015.ttcn new file mode 100644 index 00000000..e5386067 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/NegSem_060203_records_and_sets_of_single_types_015.ttcn @@ -0,0 +1,34 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:6.2.3.2, verify than an error is generated when sending a partially initialized record of value + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Undefined elements are permitted only in transient states (while the value +// remains invisible). Sending a record of value with undefined elements shall +// cause a test case error. + +module NegSem_060203_records_and_sets_of_single_types_015 { + + type record of integer RoI; + + type port P message { + inout RoI + } + + type component GeneralComp { + port P p + } + + testcase TC_NegSem_060203_records_and_sets_of_single_types_015() runs on GeneralComp { + var template RoI mw_sendingTemplate := {0, -, 2}; + p.send(mw_sendingTemplate); // error expected + setverdict(pass); + } + + control{ + execute(TC_NegSem_060203_records_and_sets_of_single_types_015()); + } +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/NegSem_060203_records_and_sets_of_single_types_016.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/NegSem_060203_records_and_sets_of_single_types_016.ttcn new file mode 100644 index 00000000..79a5e85b --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/NegSem_060203_records_and_sets_of_single_types_016.ttcn @@ -0,0 +1,35 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:6.2.3, array as a record-of value index on right hand side (less items than record-of dimension) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// For nested record of or set of types, an array or record of integer restricted +// to a single size can be used as a short-hand notation for a nested index +// notation. + +module NegSem_060203_records_and_sets_of_single_types_016 { + + type component GeneralComp { + } + + type record of record of integer RoRoI; + + testcase TC_NegSem_060203_records_and_sets_of_single_types_016() runs on GeneralComp { + + var RoRoI v_rec := {{0, 1}, {2, 3}}; + var integer v_index[3] := { 1, 0, 0 } + if (v_rec[v_index] == 2) { + setverdict(pass); + } else { + setverdict(fail); + } + } + + control { + execute(TC_NegSem_060203_records_and_sets_of_single_types_016()); + } + +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/NegSem_060203_records_and_sets_of_single_types_017.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/NegSem_060203_records_and_sets_of_single_types_017.ttcn new file mode 100644 index 00000000..16915d42 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/NegSem_060203_records_and_sets_of_single_types_017.ttcn @@ -0,0 +1,36 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:6.2.3, array as a record-of value index on left hand side (less items than record-of dimension) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// For nested record of or set of types, an array or record of integer restricted +// to a single size can be used as a short-hand notation for a nested index +// notation. + +module NegSem_060203_records_and_sets_of_single_types_017 { + + type component GeneralComp { + } + + type record of record of integer RoRoI; + + testcase TC_NegSem_060203_records_and_sets_of_single_types_017() runs on GeneralComp { + + var RoRoI v_rec := {{0, 1}, {2, 3}}; + var integer v_index[3] := { 1, 0, 0 } + v_rec[v_index] := 10; + if (v_rec == {{0, 1}, {10, 3}}) { + setverdict(pass); + } else { + setverdict(fail); + } + } + + control { + execute(TC_NegSem_060203_records_and_sets_of_single_types_017()); + } + +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/NegSem_060203_records_and_sets_of_single_types_018.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/NegSem_060203_records_and_sets_of_single_types_018.ttcn new file mode 100644 index 00000000..1579369d --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/NegSem_060203_records_and_sets_of_single_types_018.ttcn @@ -0,0 +1,36 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:6.2.3, fixed-size record-of as a record-of value index on right hand side (less items than record-of dimension) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// For nested record of or set of types, an array or record of integer restricted +// to a single size can be used as a short-hand notation for a nested index +// notation. + +module NegSem_060203_records_and_sets_of_single_types_018 { + + type component GeneralComp { + } + + type record length(3) of integer Indexer; + type record of record of integer RoRoI; + + testcase TC_NegSem_060203_records_and_sets_of_single_types_018() runs on GeneralComp { + + var RoRoI v_rec := {{0, 1}, {2, 3}}; + var Indexer v_index := { 1, 0, 0 } + if (v_rec[v_index] == 2) { + setverdict(pass); + } else { + setverdict(fail); + } + } + + control { + execute(TC_NegSem_060203_records_and_sets_of_single_types_018()); + } + +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/NegSem_060203_records_and_sets_of_single_types_019.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/NegSem_060203_records_and_sets_of_single_types_019.ttcn new file mode 100644 index 00000000..2cc08c5e --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/NegSem_060203_records_and_sets_of_single_types_019.ttcn @@ -0,0 +1,37 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:6.2.3, fixed-size record-of as a record-of value index on left hand side (less items than record-of dimension) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// For nested record of or set of types, an array or record of integer restricted +// to a single size can be used as a short-hand notation for a nested index +// notation. + +module NegSem_060203_records_and_sets_of_single_types_019 { + + type component GeneralComp { + } + + type record length(3) of integer Indexer; + type record of record of integer RoRoI; + + testcase TC_NegSem_060203_records_and_sets_of_single_types_019() runs on GeneralComp { + + var RoRoI v_rec := {{0, 1}, {2, 3}}; + var Indexer v_index := { 1, 0, 0 } + v_rec[v_index] := 10; + if (v_rec == {{0, 1}, {10, 3}}) { + setverdict(pass); + } else { + setverdict(fail); + } + } + + control { + execute(TC_NegSem_060203_records_and_sets_of_single_types_019()); + } + +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/NegSem_060203_records_and_sets_of_single_types_020.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/NegSem_060203_records_and_sets_of_single_types_020.ttcn new file mode 100644 index 00000000..aac6af65 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/NegSem_060203_records_and_sets_of_single_types_020.ttcn @@ -0,0 +1,36 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:6.2.3, fixed-size set-of as a record-of value index on right hand side + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// For nested record of or set of types, an array or record of integer restricted +// to a single size can be used as a short-hand notation for a nested index +// notation. + +module NegSem_060203_records_and_sets_of_single_types_020 { + + type component GeneralComp { + } + + type set length(2) of integer Indexer; + type record of record of integer RoRoI; + + testcase TC_NegSem_060203_records_and_sets_of_single_types_020() runs on GeneralComp { + + var RoRoI v_rec := {{0, 1}, {2, 3}}; + var Indexer v_index := { 1, 0 } + if (v_rec[v_index] == 2) { + setverdict(pass); + } else { + setverdict(fail); + } + } + + control { + execute(TC_NegSem_060203_records_and_sets_of_single_types_020()); + } + +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/NegSem_060203_records_and_sets_of_single_types_021.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/NegSem_060203_records_and_sets_of_single_types_021.ttcn new file mode 100644 index 00000000..74ab911f --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/NegSem_060203_records_and_sets_of_single_types_021.ttcn @@ -0,0 +1,37 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:6.2.3, fixed-size set-of as a record-of value index on left hand side + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// For nested record of or set of types, an array or record of integer restricted +// to a single size can be used as a short-hand notation for a nested index +// notation. + +module NegSem_060203_records_and_sets_of_single_types_021 { + + type component GeneralComp { + } + + type set length(2) of integer Indexer; + type record of record of integer RoRoI; + + testcase TC_NegSem_060203_records_and_sets_of_single_types_021() runs on GeneralComp { + + var RoRoI v_rec := {{0, 1}, {2, 3}}; + var Indexer v_index := { 1, 0 } + v_rec[v_index] := 10; + if (v_rec == {{0, 1}, {10, 3}}) { + setverdict(pass); + } else { + setverdict(fail); + } + } + + control { + execute(TC_NegSem_060203_records_and_sets_of_single_types_021()); + } + +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/NegSem_060203_records_and_sets_of_single_types_022.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/NegSem_060203_records_and_sets_of_single_types_022.ttcn new file mode 100644 index 00000000..500ff791 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/NegSem_060203_records_and_sets_of_single_types_022.ttcn @@ -0,0 +1,36 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:6.2.3, variable-size record-of as a record-of value index on right hand side + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// For nested record of or set of types, an array or record of integer restricted +// to a single size can be used as a short-hand notation for a nested index +// notation. + +module NegSem_060203_records_and_sets_of_single_types_022 { + + type component GeneralComp { + } + + type record of integer Indexer; + type record of record of integer RoRoI; + + testcase TC_NegSem_060203_records_and_sets_of_single_types_022() runs on GeneralComp { + + var RoRoI v_rec := {{0, 1}, {2, 3}}; + var Indexer v_index := { 1, 0 } + if (v_rec[v_index] == 2) { + setverdict(pass); + } else { + setverdict(fail); + } + } + + control { + execute(TC_NegSem_060203_records_and_sets_of_single_types_022()); + } + +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/NegSem_060203_records_and_sets_of_single_types_023.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/NegSem_060203_records_and_sets_of_single_types_023.ttcn new file mode 100644 index 00000000..1a9a5295 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/NegSem_060203_records_and_sets_of_single_types_023.ttcn @@ -0,0 +1,37 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:6.2.3, variable-size record-of as a record-of value index on left hand side (less items than record-of dimension) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// For nested record of or set of types, an array or record of integer restricted +// to a single size can be used as a short-hand notation for a nested index +// notation. + +module NegSem_060203_records_and_sets_of_single_types_023 { + + type component GeneralComp { + } + + type record of integer Indexer; + type record of record of integer RoRoI; + + testcase TC_NegSem_060203_records_and_sets_of_single_types_023() runs on GeneralComp { + + var RoRoI v_rec := {{0, 1}, {2, 3}}; + var Indexer v_index := { 1, 0 } + v_rec[v_index] := 10; + if (v_rec == {{0, 1}, {10, 3}}) { + setverdict(pass); + } else { + setverdict(fail); + } + } + + control { + execute(TC_NegSem_060203_records_and_sets_of_single_types_023()); + } + +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/NegSyn_060203_records_and_sets_of_single_types_001.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/NegSyn_060203_records_and_sets_of_single_types_001.ttcn new file mode 100644 index 00000000..0e01697a --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/NegSyn_060203_records_and_sets_of_single_types_001.ttcn @@ -0,0 +1,28 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:6.2.3.2, ensure that value list cannot contain an empty assignment + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// No empty assignment is allowed (e.g. two commas, the second immediately +// following the first or only with white space between them). +module NegSyn_060203_records_and_sets_of_single_types_001 { + + type component GeneralComp { + } + + type record of integer RoI; + + testcase TC_NegSyn_060203_records_and_sets_of_single_types_001() runs on GeneralComp { + + var RecordOfInt v_rec := { 0, , 2 }; // syntax error expected + + } + + control { + execute(TC_NegSyn_060203_records_and_sets_of_single_types_001()); + } + +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/Sem_060203_records_and_sets_of_single_types_001.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/Sem_060203_records_and_sets_of_single_types_001.ttcn new file mode 100644 index 00000000..86f19d04 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/Sem_060203_records_and_sets_of_single_types_001.ttcn @@ -0,0 +1,32 @@ +/*************************************************** + ** @author STF 451 + ** @version 0.0.1 + ** @purpose 1:6.2.3.2, ensure that the inner type referencing is correctly handled + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Sem_060203_records_and_sets_of_single_types_001 { + + type component GeneralComp { + } + + type record length (5) of record of integer ConstrainedStructure (1 .. 10); + type ConstrainedStructure[-] RecordOfInt; //references the inner record of integer(1..10) + +testcase TC_Sem_060203_records_and_sets_of_single_types_001() runs on GeneralComp { + + var RecordOfInt v_rec := { 8, 1, 2, 3, 4, 5, 6, 7, 9 }; // any record length is allowed + + if (v_rec[7]==7) { + setverdict(pass); + } + else { + setverdict(fail); + } + +} + +control { + execute(TC_Sem_060203_records_and_sets_of_single_types_001()); +} + +} diff --git a/ATS/core_language/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 b/ATS/core_language/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 new file mode 100644 index 00000000..c12b376e --- /dev/null +++ b/ATS/core_language/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 @@ -0,0 +1,42 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:6.2.3.2, verify assignment of explicitly identified elements to record of values + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// When the assignment notation is used for record of s, elements +// wished to be changed are identified explicitly and either a value +// or the not used symbol "-" can be assigned to them... +// At initialization, only the elements to be assigned values shall be +// specified... It is also possible to leave fields explicitly unspecified +// using the not used symbol "-". +module Sem_060203_records_and_sets_of_single_types_002 { + + type component GeneralComp { + } + + type record of integer RoI; + + testcase TC_Sem_060203_records_and_sets_of_single_types_002() runs on GeneralComp { + + var RoI v_rec := { + [0] := 0, + [1] := 1, + [2] := - + }; + + if (match(v_rec[0], 0) and match(v_rec[1], 1) and not isbound(v_rec[2])) { + setverdict(pass); + } + else { + setverdict(fail); + } + } + + control { + execute(TC_Sem_060203_records_and_sets_of_single_types_002()); + } + +} diff --git a/ATS/core_language/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 b/ATS/core_language/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 new file mode 100644 index 00000000..c80c1ab6 --- /dev/null +++ b/ATS/core_language/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 @@ -0,0 +1,42 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:6.2.3.2, verify assignment of explicitly identified elements to set of values + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// When the assignment notation is used for set of s, elements +// wished to be changed are identified explicitly and either a value +// or the not used symbol "-" can be assigned to them... +// At initialization, only the elements to be assigned values shall be +// specified... It is also possible to leave fields explicitly unspecified +// using the not used symbol "-". +module Sem_060203_records_and_sets_of_single_types_003 { + + type component GeneralComp { + } + + type set of integer SoI; + + testcase TC_Sem_060203_records_and_sets_of_single_types_003() runs on GeneralComp { + + var SoI v_set := { + [0] := 0, + [1] := 1, + [2] := - + }; + + if (match(v_set[0], 0) and match(v_set[1], 1) and not isbound(v_set[2])) { + setverdict(pass); + } + else { + setverdict(fail); + } + } + + control { + execute(TC_Sem_060203_records_and_sets_of_single_types_003()); + } + +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/Sem_060203_records_and_sets_of_single_types_004.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/Sem_060203_records_and_sets_of_single_types_004.ttcn new file mode 100644 index 00000000..2ce1b2bc --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/Sem_060203_records_and_sets_of_single_types_004.ttcn @@ -0,0 +1,39 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:6.2.3.2, verify handling of missing elements in assignment notation for record of values + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// When the assignment notation is used for record of s, ... +// fields, not referred to in the notation, shall remain unchanged.... +// At initialization ... elements not mentioned are implicitly left +// uninitialized. +module Sem_060203_records_and_sets_of_single_types_004 { + + type component GeneralComp { + } + + type record of integer RoI; + + testcase TC_Sem_060203_records_and_sets_of_single_types_004() runs on GeneralComp { + + var RoI v_rec := { + [1] := 1 + }; + + if (not isbound(v_rec[0]) and match(v_rec[1], 1)) { + setverdict(pass); + } + else { + setverdict(fail); + } + + } + + control { + execute(TC_Sem_060203_records_and_sets_of_single_types_004()); + } + +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/Sem_060203_records_and_sets_of_single_types_005.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/Sem_060203_records_and_sets_of_single_types_005.ttcn new file mode 100644 index 00000000..cf14c268 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/Sem_060203_records_and_sets_of_single_types_005.ttcn @@ -0,0 +1,39 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:6.2.3.2, verify handling of missing elements in assignment notation for set of values + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// When the assignment notation is used for record of s, ... +// fields, not referred to in the notation, shall remain unchanged.... +// At initialization ... elements not mentioned are implicitly left +// uninitialized. +module Sem_060203_records_and_sets_of_single_types_005 { + + type component GeneralComp { + } + + type set of integer SoI; + + testcase TC_Sem_060203_records_and_sets_of_single_types_005() runs on GeneralComp { + + var SoI v_set := { + [1] := 1 + }; + + if (not isbound(v_set[0]) and match(v_set[1], 1)) { + setverdict(pass); + } + else { + setverdict(fail); + } + + } + + control { + execute(TC_Sem_060203_records_and_sets_of_single_types_005()); + } + +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/Sem_060203_records_and_sets_of_single_types_006.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/Sem_060203_records_and_sets_of_single_types_006.ttcn new file mode 100644 index 00000000..9434b5a8 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/Sem_060203_records_and_sets_of_single_types_006.ttcn @@ -0,0 +1,42 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:6.2.3.2, verify handling of missing and ignored elements during record of value re-assignment + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// When re-assigning a previously initialized value, using the not used symbol +// or just skipping a field or element in an assignment notation, will cause +// that field or element to remain unchanged. +module Sem_060203_records_and_sets_of_single_types_006 { + + type component GeneralComp { + } + + type record of integer RoI; + + testcase TC_Sem_060203_records_and_sets_of_single_types_006() runs on GeneralComp { + + var RoI v_rec := { + [0] := 0, + [1] := -, + [2] := 2 + }; + v_rec := { + [1] := 1 + }; + if (v_rec == { 0, 1, 2 }) { + setverdict(pass); + } + else { + setverdict(fail); + } + +} + +control { + execute(TC_Sem_060203_records_and_sets_of_single_types_006()); +} + +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/Sem_060203_records_and_sets_of_single_types_007.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/Sem_060203_records_and_sets_of_single_types_007.ttcn new file mode 100644 index 00000000..1a575c89 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/Sem_060203_records_and_sets_of_single_types_007.ttcn @@ -0,0 +1,42 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:6.2.3.2, verify handling of missing and ignored elements during record of value re-assignment + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// When re-assigning a previously initialized value, using the not used symbol +// or just skipping a field or element in an assignment notation, will cause +// that field or element to remain unchanged. +module Sem_060203_records_and_sets_of_single_types_007 { + + type component GeneralComp { + } + + type set of integer SoI; + + testcase TC_Sem_060203_records_and_sets_of_single_types_007() runs on GeneralComp { + + var SoI v_set := { + [0] := 0, + [1] := -, + [2] := 2 + }; + v_set := { + [1] := 1 + }; + if (v_set == { 0, 1, 2 }) { + setverdict(pass); + } + else { + setverdict(fail); + } + + } + + control { + execute(TC_Sem_060203_records_and_sets_of_single_types_007()); + } + +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/Sem_060203_records_and_sets_of_single_types_008.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/Sem_060203_records_and_sets_of_single_types_008.ttcn new file mode 100644 index 00000000..b8cf13ed --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/Sem_060203_records_and_sets_of_single_types_008.ttcn @@ -0,0 +1,35 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:6.2.3.2, verify handling of value list assignment used for initialization of record of values + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// When using the value list notation, all elements in the structure shall +// be specified either with a value or the not used symbol "-". The first +// member of the list is assigned to the first element, the second list +// member is assigned to the second element, etc. +module Sem_060203_records_and_sets_of_single_types_008 { + + type component GeneralComp { + } + + type record of integer RoI; + + testcase TC_Sem_060203_records_and_sets_of_single_types_008() runs on GeneralComp { + + var RoI v_rec := { 0, 1, - }; + if (match(v_rec[0], 0) and match(v_rec[1], 1) and not isbound(v_rec[2])) { + setverdict(pass); + } + else { + setverdict(fail); + } + } + + control { + execute(TC_Sem_060203_records_and_sets_of_single_types_008()); + } + +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/Sem_060203_records_and_sets_of_single_types_009.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/Sem_060203_records_and_sets_of_single_types_009.ttcn new file mode 100644 index 00000000..056975e5 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/Sem_060203_records_and_sets_of_single_types_009.ttcn @@ -0,0 +1,35 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:6.2.3.2, verify handling of value list assignment used for initialization of set of values + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// When using the value list notation, all elements in the structure shall +// be specified either with a value or the not used symbol "-". The first +// member of the list is assigned to the first element, the second list +// member is assigned to the second element, etc. +module Sem_060203_records_and_sets_of_single_types_009 { + + type component GeneralComp { + } + + type record of integer SoI; + + testcase TC_Sem_060203_records_and_sets_of_single_types_009() runs on GeneralComp { + + var SoI v_set := { 0, 1, - }; + if (match(v_set[0], 0) and match(v_set[1], 1) and not isbound(v_set[2])) { + setverdict(pass); + } + else { + setverdict(fail); + } + } + + control { + execute(TC_Sem_060203_records_and_sets_of_single_types_009()); + } + +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/Sem_060203_records_and_sets_of_single_types_010.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/Sem_060203_records_and_sets_of_single_types_010.ttcn new file mode 100644 index 00000000..91bdad28 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/Sem_060203_records_and_sets_of_single_types_010.ttcn @@ -0,0 +1,44 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:6.2.3.2, verify handling of value list assignment used for update of record of values + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Elements to be left out of the assignment shall be explicitly skipped in the list +// by use of the not-used-symbol "-". Already initialized elements left without +// a corresponding list member in a value list notation (i.e. at the end of a list) +// are becoming uninitialized. In this way, a value with initialized elements can be +// made empty by using the empty value list notation ("{}"). +module Sem_060203_records_and_sets_of_single_types_010 { + + type component GeneralComp { + } + + type record of integer RoI; + + testcase TC_Sem_060203_records_and_sets_of_single_types_010() runs on GeneralComp { + + var RoI v_rec := { 0, 1, 2 }; + v_rec := { 10, - }; + if (v_rec == { 10, 1 } ) { + setverdict(pass); + } + else { + setverdict(fail); + } + v_rec := {}; + if (lengthof(v_rec) == 0 ) { + setverdict(pass); + } + else { + setverdict(fail); + } + } + + control { + execute(TC_Sem_060203_records_and_sets_of_single_types_010()); + } + +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/Sem_060203_records_and_sets_of_single_types_011.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/Sem_060203_records_and_sets_of_single_types_011.ttcn new file mode 100644 index 00000000..cdefa282 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/Sem_060203_records_and_sets_of_single_types_011.ttcn @@ -0,0 +1,44 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:6.2.3.2, verify handling of value list assignment used for update of set of values + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Elements to be left out of the assignment shall be explicitly skipped in the list +// by use of the not-used-symbol "-". Already initialized elements left without +// a corresponding list member in a value list notation (i.e. at the end of a list) +// are becoming uninitialized. In this way, a value with initialized elements can be +// made empty by using the empty value list notation ("{}"). +module Sem_060203_records_and_sets_of_single_types_011 { + + type component GeneralComp { + } + + type set of integer SoI; + + testcase TC_Sem_060203_records_and_sets_of_single_types_011() runs on GeneralComp { + + var SoI v_set := { 0, 1, 2 }; + v_set := { 10, - }; + if (v_set == { 10, 1 } ) { + setverdict(pass); + } + else { + setverdict(fail); + } + v_set := {}; + if (lengthof(v_set) == 0 ) { + setverdict(pass); + } + else { + setverdict(fail); + } + } + + control { + execute(TC_Sem_060203_records_and_sets_of_single_types_011()); + } + +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/Sem_060203_records_and_sets_of_single_types_012.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/Sem_060203_records_and_sets_of_single_types_012.ttcn new file mode 100644 index 00000000..10ec6dc7 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/Sem_060203_records_and_sets_of_single_types_012.ttcn @@ -0,0 +1,35 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:6.2.3.2, verify handling of index notation applied to record of values on right-hand side + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Indexed value notations can be used on the right-hand side of assignments. +// The index notation, when used on the right hand side, refers to the value of +// the identified element of a record of. +module Sem_060203_records_and_sets_of_single_types_012 { + + type component GeneralComp { + } + + type record of integer RoI; + + testcase TC_Sem_060203_records_and_sets_of_single_types_012() runs on GeneralComp { + + var RoI v_rec := { 0, 1, 2 }; + var integer i := v_rec[1]; + if (i == 1 ) { + setverdict(pass); + } + else { + setverdict(fail); + } + } + + control { + execute(TC_Sem_060203_records_and_sets_of_single_types_012()); + } + +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/Sem_060203_records_and_sets_of_single_types_013.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/Sem_060203_records_and_sets_of_single_types_013.ttcn new file mode 100644 index 00000000..d22d870b --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/Sem_060203_records_and_sets_of_single_types_013.ttcn @@ -0,0 +1,35 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:6.2.3.2, verify handling of index notation applied to set of values on right-hand side + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Indexed value notations can be used on the right-hand side of assignments. +// The index notation, when used on the right hand side, refers to the value of +// the identified element of a record of. +module Sem_060203_records_and_sets_of_single_types_013 { + + type component GeneralComp { + } + + type set of integer SoI; + + testcase TC_Sem_060203_records_and_sets_of_single_types_013() runs on GeneralComp { + + var SoI v_set := { 0, 1, 2 }; + var integer i := v_set[1]; + if (i == 1 ) { + setverdict(pass); + } + else { + setverdict(fail); + } + } + + control { + execute(TC_Sem_060203_records_and_sets_of_single_types_013()); + } + +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/Sem_060203_records_and_sets_of_single_types_014.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/Sem_060203_records_and_sets_of_single_types_014.ttcn new file mode 100644 index 00000000..7e2b240a --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/Sem_060203_records_and_sets_of_single_types_014.ttcn @@ -0,0 +1,36 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:6.2.3.2, verify handling of index notation applied to record of values on left-hand side + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Indexed value notations can be used on the left-hand side of assignments. +// When it is used at the left hand side, only the value of the identified +// single element is changed, values assigned to other elements already remain +// unchanged. +module Sem_060203_records_and_sets_of_single_types_014 { + + type component GeneralComp { + } + + type record of integer RoI; + + testcase TC_Sem_060203_records_and_sets_of_single_types_014() runs on GeneralComp { + + var RoI v_rec := { 0, 1, 2 }; + v_rec[1] := 10; + if (v_rec == { 0, 10, 2} ) { + setverdict(pass); + } + else { + setverdict(fail); + } + } + + control { + execute(TC_Sem_060203_records_and_sets_of_single_types_014()); + } + +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/Sem_060203_records_and_sets_of_single_types_015.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/Sem_060203_records_and_sets_of_single_types_015.ttcn new file mode 100644 index 00000000..32cac503 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/Sem_060203_records_and_sets_of_single_types_015.ttcn @@ -0,0 +1,36 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:6.2.3.2, verify handling of index notation applied to set of values on left-hand side + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Indexed value notations can be used on the left-hand side of assignments. +// When it is used at the left hand side, only the value of the identified +// single element is changed, values assigned to other elements already remain +// unchanged. +module Sem_060203_records_and_sets_of_single_types_015 { + + type component GeneralComp { + } + + type set of integer SoI; + + testcase TC_Sem_060203_records_and_sets_of_single_types_015() runs on GeneralComp { + + var SoI v_set := { 0, 1, 2 }; + v_set[1] := 10; + if (v_set == { 0, 10, 2} ) { + setverdict(pass); + } + else { + setverdict(fail); + } + } + + control { + execute(TC_Sem_060203_records_and_sets_of_single_types_015()); + } + +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/Sem_060203_records_and_sets_of_single_types_016.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/Sem_060203_records_and_sets_of_single_types_016.ttcn new file mode 100644 index 00000000..555af8a7 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/Sem_060203_records_and_sets_of_single_types_016.ttcn @@ -0,0 +1,34 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:6.2.3.2, verify the first element of a record of value is accessible by an index notation + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// The index of the first element shall be zero. +module Sem_060203_records_and_sets_of_single_types_016 { + + type component GeneralComp { + } + + type record of integer RoI; + + testcase TC_Sem_060203_records_and_sets_of_single_types_016() runs on GeneralComp { + + var RoI v_rec := { 0, 1, 2 }; + v_rec[0] := 10; // first index on the left hand side + v_rec[1] := v_rec[0]; // first index on the right hand side + if (v_rec == { 10, 10, 2} ) { + setverdict(pass); + } + else { + setverdict(fail); + } + } + + control { + execute(TC_Sem_060203_records_and_sets_of_single_types_016()); + } + +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/Sem_060203_records_and_sets_of_single_types_017.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/Sem_060203_records_and_sets_of_single_types_017.ttcn new file mode 100644 index 00000000..82690db8 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/Sem_060203_records_and_sets_of_single_types_017.ttcn @@ -0,0 +1,34 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:6.2.3.2, verify the first element of a set of value is accessible by an index notation + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// The index of the first element shall be zero. +module Sem_060203_records_and_sets_of_single_types_017 { + + type component GeneralComp { + } + + type set of integer SoI; + + testcase TC_Sem_060203_records_and_sets_of_single_types_017() runs on GeneralComp { + + var SoI v_set := { 0, 1, 2 }; + v_set[0] := 10; // first index on the left hand side + v_set[1] := v_set[0]; // first index on the right hand side + if (v_set == { 10, 10, 2} ) { + setverdict(pass); + } + else { + setverdict(fail); + } + } + + control { + execute(TC_Sem_060203_records_and_sets_of_single_types_017()); + } + +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/Sem_060203_records_and_sets_of_single_types_019.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/Sem_060203_records_and_sets_of_single_types_019.ttcn new file mode 100644 index 00000000..91c8d2b7 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/Sem_060203_records_and_sets_of_single_types_019.ttcn @@ -0,0 +1,39 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:6.2.3.2, referencing non-existent element of record of value (left-hand side) + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// If an indexing operator at the left-hand side of an assignment refers to +// a non-existent element, the value at the right-hand side is assigned to +// the element and all elements with an index smaller than the actual index +// and without assigned value are created with an undefined value. +module Sem_060203_records_and_sets_of_single_types_019 { + + type component GeneralComp { + } + + type record of integer RoI; + + testcase TC_Sem_060203_records_and_sets_of_single_types_019() runs on GeneralComp { + + var RoI v_rec := { 0, 1 }; + v_rec[3] := 3; // {0, 1, -, 3} + if (match(v_rec[0], 0) and + match(v_rec[1], 1) and + not isbound(v_rec[2]) and + match(v_rec[3], 3)) { + setverdict(pass); + } + else { + setverdict(fail); + } + } + + control { + execute(TC_Sem_060203_records_and_sets_of_single_types_019()); + } + +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/Sem_060203_records_and_sets_of_single_types_020.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/Sem_060203_records_and_sets_of_single_types_020.ttcn new file mode 100644 index 00000000..0c428d07 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/Sem_060203_records_and_sets_of_single_types_020.ttcn @@ -0,0 +1,39 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:6.2.3, referencing non-existent element of set of value (left-hand side) + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// If an indexing operator at the left-hand side of an assignment refers to +// a non-existent element, the value at the right-hand side is assigned to +// the element and all elements with an index smaller than the actual index +// and without assigned value are created with an undefined value. +module Sem_060203_records_and_sets_of_single_types_020 { + + type component GeneralComp { + } + + type set of integer SoI; + + testcase TC_Sem_060203_records_and_sets_of_single_types_020() runs on GeneralComp { + + var SoI v_set := { 0, 1 }; + v_set[3] := 3; // {0, 1, -, 3} + if (match(v_set[0], 0) and + match(v_set[1], 1) and + not isbound(v_set[2]) and + match(v_set[3], 3)) { + setverdict(pass); + } + else { + setverdict(fail); + } + } + + control { + execute(TC_Sem_060203_records_and_sets_of_single_types_020()); + } + +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/Sem_060203_records_and_sets_of_single_types_021.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/Sem_060203_records_and_sets_of_single_types_021.ttcn new file mode 100644 index 00000000..8adadc0b --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/Sem_060203_records_and_sets_of_single_types_021.ttcn @@ -0,0 +1,38 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:6.2.3, referencing element of uninitialized record of value (left-hand side) + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// If an indexing operator at the left-hand side of an assignment refers to +// a non-existent element, the value at the right-hand side is assigned to +// the element and all elements with an index smaller than the actual index +// and without assigned value are created with an undefined value. +module Sem_060203_records_and_sets_of_single_types_021 { + + type component GeneralComp { + } + + type record of integer RoI; + + testcase TC_Sem_060203_records_and_sets_of_single_types_021() runs on GeneralComp { + + var RoI v_rec; + v_rec[2] := 2; // {-, -, 2} + if (not isbound(v_rec[0]) and + not isbound(v_rec[1]) and + match(v_rec[2], 2)) { + setverdict(pass); + } + else { + setverdict(fail); + } + } + + control { + execute(TC_Sem_060203_records_and_sets_of_single_types_021()); + } + +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/Sem_060203_records_and_sets_of_single_types_022.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/Sem_060203_records_and_sets_of_single_types_022.ttcn new file mode 100644 index 00000000..6669fe51 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/Sem_060203_records_and_sets_of_single_types_022.ttcn @@ -0,0 +1,38 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:6.2.3, referencing element of uninitialized set of value (left-hand side) + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// If an indexing operator at the left-hand side of an assignment refers to +// a non-existent element, the value at the right-hand side is assigned to +// the element and all elements with an index smaller than the actual index +// and without assigned value are created with an undefined value. +module Sem_060203_records_and_sets_of_single_types_022 { + + type component GeneralComp { + } + + type set of integer SoI; + + testcase TC_Sem_060203_records_and_sets_of_single_types_022() runs on GeneralComp { + + var SoI v_set; + v_set[2] := 2; // {-, -, 2} + if (not isbound(v_set[0]) and + not isbound(v_set[1]) and + match(v_set[2], 2)) { + setverdict(pass); + } + else { + setverdict(fail); + } + } + + control { + execute(TC_Sem_060203_records_and_sets_of_single_types_022()); + } + +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/Sem_060203_records_and_sets_of_single_types_023.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/Sem_060203_records_and_sets_of_single_types_023.ttcn new file mode 100644 index 00000000..706d5499 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/Sem_060203_records_and_sets_of_single_types_023.ttcn @@ -0,0 +1,35 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:6.2.3, array as a record-of value index on right hand side (dimensions match) + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// For nested record of or set of types, an array or record of integer restricted +// to a single size can be used as a short-hand notation for a nested index +// notation. + +module Sem_060203_records_and_sets_of_single_types_023 { + + type component GeneralComp { + } + + type record of record of integer RoRoI; + + testcase TC_Sem_060203_records_and_sets_of_single_types_023() runs on GeneralComp { + + var RoRoI v_rec := {{0, 1}, {2, 3}}; + var integer v_index[2] := { 1, 0 } + if (v_rec[v_index] == 2) { + setverdict(pass); + } else { + setverdict(fail); + } + } + + control { + execute(TC_Sem_060203_records_and_sets_of_single_types_023()); + } + +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/Sem_060203_records_and_sets_of_single_types_024.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/Sem_060203_records_and_sets_of_single_types_024.ttcn new file mode 100644 index 00000000..8086bdfe --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/Sem_060203_records_and_sets_of_single_types_024.ttcn @@ -0,0 +1,36 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:6.2.3, array as a record-of value index on left hand side (dimensions match) + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// For nested record of or set of types, an array or record of integer restricted +// to a single size can be used as a short-hand notation for a nested index +// notation. + +module Sem_060203_records_and_sets_of_single_types_024 { + + type component GeneralComp { + } + + type record of record of integer RoRoI; + + testcase TC_Sem_060203_records_and_sets_of_single_types_024() runs on GeneralComp { + + var RoRoI v_rec := {{0, 1}, {2, 3}}; + var integer v_index[2] := { 1, 0 } + v_rec[v_index] := 10; + if (v_rec == {{0, 1}, {10, 3}}) { + setverdict(pass); + } else { + setverdict(fail); + } + } + + control { + execute(TC_Sem_060203_records_and_sets_of_single_types_024()); + } + +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/Sem_060203_records_and_sets_of_single_types_025.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/Sem_060203_records_and_sets_of_single_types_025.ttcn new file mode 100644 index 00000000..91101adc --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/Sem_060203_records_and_sets_of_single_types_025.ttcn @@ -0,0 +1,35 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:6.2.3, array as a record-of value index on right hand side (less items than record-of dimension) + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// For nested record of or set of types, an array or record of integer restricted +// to a single size can be used as a short-hand notation for a nested index +// notation. + +module Sem_060203_records_and_sets_of_single_types_025 { + + type component GeneralComp { + } + + type record of record of record of integer RoRoRoI; + + testcase TC_Sem_060203_records_and_sets_of_single_types_025() runs on GeneralComp { + + var RoRoRoI v_rec := {{{0, 1}, {2, 3}}, {{4, 5, 6}, {7, 8}}}; + var integer v_index[2] := { 1, 0 } + if (v_rec[v_index] == {4, 5, 6}) { + setverdict(pass); + } else { + setverdict(fail); + } + } + + control { + execute(TC_Sem_060203_records_and_sets_of_single_types_025()); + } + +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/Sem_060203_records_and_sets_of_single_types_026.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/Sem_060203_records_and_sets_of_single_types_026.ttcn new file mode 100644 index 00000000..6fc0e16b --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/Sem_060203_records_and_sets_of_single_types_026.ttcn @@ -0,0 +1,36 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:6.2.3, array as a record-of value index on left hand side (less items than record-of dimension) + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// For nested record of or set of types, an array or record of integer restricted +// to a single size can be used as a short-hand notation for a nested index +// notation. + +module Sem_060203_records_and_sets_of_single_types_026 { + + type component GeneralComp { + } + + type record of record of record of integer RoRoRoI; + + testcase TC_Sem_060203_records_and_sets_of_single_types_026() runs on GeneralComp { + + var RoRoRoI v_rec := {{{0, 1}, {2, 3}}, {{4, 5, 6}, {7, 8}}}; + var integer v_index[2] := { 1, 0 } + v_rec[v_index] := { 100, - }; + if (v_rec == {{{0, 1}, {2, 3}}, {{100, 5}, {7, 8}}}) { + setverdict(pass); + } else { + setverdict(fail); + } + } + + control { + execute(TC_Sem_060203_records_and_sets_of_single_types_026()); + } + +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/Sem_060203_records_and_sets_of_single_types_027.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/Sem_060203_records_and_sets_of_single_types_027.ttcn new file mode 100644 index 00000000..99c4f9df --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/Sem_060203_records_and_sets_of_single_types_027.ttcn @@ -0,0 +1,36 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:6.2.3, fixed-size record-of as a record-of value index on right hand side (dimensions match) + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// For nested record of or set of types, an array or record of integer restricted +// to a single size can be used as a short-hand notation for a nested index +// notation. + +module Sem_060203_records_and_sets_of_single_types_027 { + + type component GeneralComp { + } + + type record length(2) of integer Indexer; + type record of record of integer RoRoI; + + testcase TC_Sem_060203_records_and_sets_of_single_types_027() runs on GeneralComp { + + var RoRoI v_rec := {{0, 1}, {2, 3}}; + var Indexer v_index := { 1, 0 } + if (v_rec[v_index] == 2) { + setverdict(pass); + } else { + setverdict(fail); + } + } + + control { + execute(TC_Sem_060203_records_and_sets_of_single_types_027()); + } + +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/Sem_060203_records_and_sets_of_single_types_028.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/Sem_060203_records_and_sets_of_single_types_028.ttcn new file mode 100644 index 00000000..22aa8fc2 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/Sem_060203_records_and_sets_of_single_types_028.ttcn @@ -0,0 +1,37 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:6.2.3, fixed-size record-of as a record-of value index on left hand side (dimensions match) + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// For nested record of or set of types, an array or record of integer restricted +// to a single size can be used as a short-hand notation for a nested index +// notation. + +module Sem_060203_records_and_sets_of_single_types_028 { + + type component GeneralComp { + } + + type record length(2) of integer Indexer; + type record of record of integer RoRoI; + + testcase TC_Sem_060203_records_and_sets_of_single_types_028() runs on GeneralComp { + + var RoRoI v_rec := {{0, 1}, {2, 3}}; + var Indexer v_index := { 1, 0 } + v_rec[v_index] := 10; + if (v_rec == {{0, 1}, {10, 3}}) { + setverdict(pass); + } else { + setverdict(fail); + } + } + + control { + execute(TC_Sem_060203_records_and_sets_of_single_types_028()); + } + +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/Sem_060203_records_and_sets_of_single_types_029.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/Sem_060203_records_and_sets_of_single_types_029.ttcn new file mode 100644 index 00000000..978422b6 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/Sem_060203_records_and_sets_of_single_types_029.ttcn @@ -0,0 +1,36 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:6.2.3, fixed-size record-of as a record-of value index on right hand side (less items than record-of dimension) + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// For nested record of or set of types, an array or record of integer restricted +// to a single size can be used as a short-hand notation for a nested index +// notation. + +module Sem_060203_records_and_sets_of_single_types_029 { + + type component GeneralComp { + } + + type record length(2) of integer Indexer; + type record of record of record of integer RoRoRoI; + + testcase TC_Sem_060203_records_and_sets_of_single_types_029() runs on GeneralComp { + + var RoRoRoI v_rec := {{{0, 1}, {2, 3}}, {{4, 5, 6}, {7, 8}}}; + var Indexer v_index := { 1, 0 } + if (v_rec[v_index] == {4, 5, 6}) { + setverdict(pass); + } else { + setverdict(fail); + } + } + + control { + execute(TC_Sem_060203_records_and_sets_of_single_types_029()); + } + +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/Sem_060203_records_and_sets_of_single_types_030.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/Sem_060203_records_and_sets_of_single_types_030.ttcn new file mode 100644 index 00000000..4087bf3c --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/Sem_060203_records_and_sets_of_single_types_030.ttcn @@ -0,0 +1,37 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:6.2.3, fixed-size record-of as a record-of value index on left hand side (less items than record-of dimension) + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// For nested record of or set of types, an array or record of integer restricted +// to a single size can be used as a short-hand notation for a nested index +// notation. + +module Sem_060203_records_and_sets_of_single_types_030 { + + type component GeneralComp { + } + + type record length(2) of integer Indexer; + type record of record of record of integer RoRoRoI; + + testcase TC_Sem_060203_records_and_sets_of_single_types_030() runs on GeneralComp { + + var RoRoRoI v_rec := {{{0, 1}, {2, 3}}, {{4, 5, 6}, {7, 8}}}; + var Indexer v_index := { 1, 0 } + v_rec[v_index] := { 100, - }; + if (v_rec == {{{0, 1}, {2, 3}}, {{100, 5}, {7, 8}}}) { + setverdict(pass); + } else { + setverdict(fail); + } + } + + control { + execute(TC_Sem_060203_records_and_sets_of_single_types_030()); + } + +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/Sem_060203_records_and_sets_of_single_types_031.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/Sem_060203_records_and_sets_of_single_types_031.ttcn new file mode 100644 index 00000000..ece82f56 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/Sem_060203_records_and_sets_of_single_types_031.ttcn @@ -0,0 +1,35 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:6.2.3, array as a set-of value index on right hand side (dimensions match) + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// For nested record of or set of types, an array or record of integer restricted +// to a single size can be used as a short-hand notation for a nested index +// notation. + +module Sem_060203_records_and_sets_of_single_types_031 { + + type component GeneralComp { + } + + type set of set of integer SoSoI; + + testcase TC_Sem_060203_records_and_sets_of_single_types_031() runs on GeneralComp { + + var SoSoI v_set := {{0, 1}, {2, 3}}; + var integer v_index[2] := { 1, 0 } + if (v_set[v_index] == 2) { + setverdict(pass); + } else { + setverdict(fail); + } + } + + control { + execute(TC_Sem_060203_records_and_sets_of_single_types_031()); + } + +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/Sem_060203_records_and_sets_of_single_types_032.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/Sem_060203_records_and_sets_of_single_types_032.ttcn new file mode 100644 index 00000000..c3125873 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/Sem_060203_records_and_sets_of_single_types_032.ttcn @@ -0,0 +1,36 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:6.2.3, array as a set-of value index on left hand side (dimensions match) + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// For nested record of or set of types, an array or record of integer restricted +// to a single size can be used as a short-hand notation for a nested index +// notation. + +module Sem_060203_records_and_sets_of_single_types_032 { + + type component GeneralComp { + } + + type set of set of integer SoSoI; + + testcase TC_Sem_060203_records_and_sets_of_single_types_032() runs on GeneralComp { + + var SoSoI v_set := {{0, 1}, {2, 3}}; + var integer v_index[2] := { 1, 0 } + v_set[v_index] := 10; + if (v_set == {{0, 1}, {10, 3}}) { + setverdict(pass); + } else { + setverdict(fail); + } + } + + control { + execute(TC_Sem_060203_records_and_sets_of_single_types_032()); + } + +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/Sem_060203_records_and_sets_of_single_types_033.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/Sem_060203_records_and_sets_of_single_types_033.ttcn new file mode 100644 index 00000000..36e15f59 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/Sem_060203_records_and_sets_of_single_types_033.ttcn @@ -0,0 +1,35 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:6.2.3, array as a set-of value index on right hand side (less items than record-of dimension) + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// For nested record of or set of types, an array or record of integer restricted +// to a single size can be used as a short-hand notation for a nested index +// notation. + +module Sem_060203_records_and_sets_of_single_types_033 { + + type component GeneralComp { + } + + type set of set of set of integer SoSoSoI; + + testcase TC_Sem_060203_records_and_sets_of_single_types_033() runs on GeneralComp { + + var SoSoSoI v_set := {{{0, 1}, {2, 3}}, {{4, 5, 6}, {7, 8}}}; + var integer v_index[2] := { 1, 0 } + if (v_set[v_index] == {4, 5, 6}) { + setverdict(pass); + } else { + setverdict(fail); + } + } + + control { + execute(TC_Sem_060203_records_and_sets_of_single_types_033()); + } + +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/Sem_060203_records_and_sets_of_single_types_034.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/Sem_060203_records_and_sets_of_single_types_034.ttcn new file mode 100644 index 00000000..b55a5db0 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/Sem_060203_records_and_sets_of_single_types_034.ttcn @@ -0,0 +1,36 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:6.2.3, array as a set-of value index on left hand side (less items than record-of dimension) + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// For nested record of or set of types, an array or record of integer restricted +// to a single size can be used as a short-hand notation for a nested index +// notation. + +module Sem_060203_records_and_sets_of_single_types_034 { + + type component GeneralComp { + } + + type set of set of set of integer SoSoSoI; + + testcase TC_Sem_060203_records_and_sets_of_single_types_034() runs on GeneralComp { + + var SoSoSoI v_set := {{{0, 1}, {2, 3}}, {{4, 5, 6}, {7, 8}}}; + var integer v_index[2] := { 1, 0 } + v_set[v_index] := { 100, - }; + if (v_set == {{{0, 1}, {2, 3}}, {{100, 5}, {7, 8}}}) { + setverdict(pass); + } else { + setverdict(fail); + } + } + + control { + execute(TC_Sem_060203_records_and_sets_of_single_types_034()); + } + +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/Sem_060203_records_and_sets_of_single_types_035.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/Sem_060203_records_and_sets_of_single_types_035.ttcn new file mode 100644 index 00000000..0ec4d40b --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/Sem_060203_records_and_sets_of_single_types_035.ttcn @@ -0,0 +1,36 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:6.2.3, fixed-size set-of as a record-of value index on right hand side (dimensions match) + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// For nested record of or set of types, an array or record of integer restricted +// to a single size can be used as a short-hand notation for a nested index +// notation. + +module Sem_060203_records_and_sets_of_single_types_035 { + + type component GeneralComp { + } + + type record length(2) of integer Indexer; + type set of set of integer SoSoI; + + testcase TC_Sem_060203_records_and_sets_of_single_types_035() runs on GeneralComp { + + var SoSoI v_set := {{0, 1}, {2, 3}}; + var Indexer v_index := { 1, 0 } + if (v_set[v_index] == 2) { + setverdict(pass); + } else { + setverdict(fail); + } + } + + control { + execute(TC_Sem_060203_records_and_sets_of_single_types_035()); + } + +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/Sem_060203_records_and_sets_of_single_types_036.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/Sem_060203_records_and_sets_of_single_types_036.ttcn new file mode 100644 index 00000000..64714000 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/Sem_060203_records_and_sets_of_single_types_036.ttcn @@ -0,0 +1,37 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:6.2.3, fixed-size set-of as a record-of value index on left hand side (dimensions match) + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// For nested record of or set of types, an array or record of integer restricted +// to a single size can be used as a short-hand notation for a nested index +// notation. + +module Sem_060203_records_and_sets_of_single_types_036 { + + type component GeneralComp { + } + + type record length(2) of integer Indexer; + type set of set of integer SoSoI; + + testcase TC_Sem_060203_records_and_sets_of_single_types_036() runs on GeneralComp { + + var SoSoI v_set := {{0, 1}, {2, 3}}; + var Indexer v_index := { 1, 0 } + v_set[v_index] := 10; + if (v_set == {{0, 1}, {10, 3}}) { + setverdict(pass); + } else { + setverdict(fail); + } + } + + control { + execute(TC_Sem_060203_records_and_sets_of_single_types_036()); + } + +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/Sem_060203_records_and_sets_of_single_types_037.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/Sem_060203_records_and_sets_of_single_types_037.ttcn new file mode 100644 index 00000000..6ab8be6f --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/Sem_060203_records_and_sets_of_single_types_037.ttcn @@ -0,0 +1,36 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:6.2.3, fixed-size set-of as a record-of value index on right hand side (less items than record-of dimension) + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// For nested record of or set of types, an array or record of integer restricted +// to a single size can be used as a short-hand notation for a nested index +// notation. + +module Sem_060203_records_and_sets_of_single_types_037 { + + type component GeneralComp { + } + + type record length(2) of integer Indexer; + type set of set of set of integer SoSoSoI; + + testcase TC_Sem_060203_records_and_sets_of_single_types_037() runs on GeneralComp { + + var SoSoSoI v_set := {{{0, 1}, {2, 3}}, {{4, 5, 6}, {7, 8}}}; + var Indexer v_index := { 1, 0 } + if (v_set[v_index] == {4, 5, 6}) { + setverdict(pass); + } else { + setverdict(fail); + } + } + + control { + execute(TC_Sem_060203_records_and_sets_of_single_types_037()); + } + +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/Sem_060203_records_and_sets_of_single_types_038.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/Sem_060203_records_and_sets_of_single_types_038.ttcn new file mode 100644 index 00000000..8a15b24a --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/Sem_060203_records_and_sets_of_single_types_038.ttcn @@ -0,0 +1,37 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:6.2.3, fixed-size record-of as a set-of value index on left hand side (less items than record-of dimension) + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// For nested record of or set of types, an array or record of integer restricted +// to a single size can be used as a short-hand notation for a nested index +// notation. + +module Sem_060203_records_and_sets_of_single_types_038 { + + type component GeneralComp { + } + + type record length(2) of integer Indexer; + type set of set of set of integer SoSoSoI; + + testcase TC_Sem_060203_records_and_sets_of_single_types_038() runs on GeneralComp { + + var SoSoSoI v_set := {{{0, 1}, {2, 3}}, {{4, 5, 6}, {7, 8}}}; + var Indexer v_index := { 1, 0 } + v_set[v_index] := { 100, - }; + if (v_set == {{{0, 1}, {2, 3}}, {{100, 5}, {7, 8}}}) { + setverdict(pass); + } else { + setverdict(fail); + } + } + + control { + execute(TC_Sem_060203_records_and_sets_of_single_types_038()); + } + +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060204_enumerated_type_and_values/NegSem_060204_enumerated_type_and_values_001.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060204_enumerated_type_and_values/NegSem_060204_enumerated_type_and_values_001.ttcn new file mode 100644 index 00000000..35eae66a --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060204_enumerated_type_and_values/NegSem_060204_enumerated_type_and_values_001.ttcn @@ -0,0 +1,18 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:6.2.7, not unique identifiers in enumerated type declaration + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// The identifiers of enumerated values shall be unique within the enumerated type +// (but do not have to be globally unique) and are consequently visible in the +// context of the given type only. + +module NegSem_060204_enumerated_type_and_values_001 { + + type enumerated MyFirstEnumType { + Monday, Tuesday, Wednesday, Thursday, Friday, Monday + }; +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060204_enumerated_type_and_values/NegSem_060204_enumerated_type_and_values_002.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060204_enumerated_type_and_values/NegSem_060204_enumerated_type_and_values_002.ttcn new file mode 100644 index 00000000..1f7b11de --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060204_enumerated_type_and_values/NegSem_060204_enumerated_type_and_values_002.ttcn @@ -0,0 +1,17 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:6.2.4, two equal user-assigned enumerated values + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Each user-assigned integer number shall be distinct within a single enumerated +// type. + +module NegSem_060204_enumerated_type_and_values_002 { + + type enumerated MyFirstEnumType { + Monday, Tuesday(2), Wednesday(2), Thursday, Friday + }; +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060204_enumerated_type_and_values/NegSem_060204_enumerated_type_and_values_003.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060204_enumerated_type_and_values/NegSem_060204_enumerated_type_and_values_003.ttcn new file mode 100644 index 00000000..a71f45c5 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060204_enumerated_type_and_values/NegSem_060204_enumerated_type_and_values_003.ttcn @@ -0,0 +1,36 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:6.2.4, using enumerated value number directly (left hand side of assignments) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// For each enumerated value without an assigned integer value, the system +// successively associates an integer number in the textual order of the +// enumerated values, starting at the left-hand side, beginning with zero, by +// step 1 and skipping any number occupied by any of the enumerated values with +// a manually assigned value. These values are only used by the system to allow +// the use of relational operators. The user shall not directly use associated +// integer values but can access them and convert integer values into enumerated +// values by using the predefined functions enum2int and int2enum (see clauses +// 16.1.2, C.1.29 C.1.30 and C.1.4 C.1.4). + +module NegSem_060204_enumerated_type_and_values_003 { + + type component GeneralComp { + } + + type enumerated EDays { + Monday, Tuesday, Wednesday, Thursday, Friday + }; + + testcase TC_NegSem_060204_enumerated_type_and_values_003() runs on GeneralComp { + var EDays v_day0 := 0; // ordinal value shall not be accepted + setverdict(pass); + } + + control { + execute(TC_NegSem_060204_enumerated_type_and_values_003()); + } +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060204_enumerated_type_and_values/NegSem_060204_enumerated_type_and_values_004.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060204_enumerated_type_and_values/NegSem_060204_enumerated_type_and_values_004.ttcn new file mode 100644 index 00000000..7ebdbc13 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060204_enumerated_type_and_values/NegSem_060204_enumerated_type_and_values_004.ttcn @@ -0,0 +1,37 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:6.2.4, using enumerated value number directly (right hand side of assignments) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// For each enumerated value without an assigned integer value, the system +// successively associates an integer number in the textual order of the +// enumerated values, starting at the left-hand side, beginning with zero, by +// step 1 and skipping any number occupied by any of the enumerated values with +// a manually assigned value. These values are only used by the system to allow +// the use of relational operators. The user shall not directly use associated +// integer values but can access them and convert integer values into enumerated +// values by using the predefined functions enum2int and int2enum (see clauses +// 16.1.2, C.1.29 C.1.30 and C.1.4 C.1.4). + +module NegSem_060204_enumerated_type_and_values_004 { + + type component GeneralComp { + } + + type enumerated EDays { + Monday, Tuesday, Wednesday, Thursday, Friday + }; + + testcase TC_NegSem_060204_enumerated_type_and_values_004() runs on GeneralComp { + var EDays v_day0 := Monday; + var integer v_int := v_day0; + setverdict(pass); + } + + control { + execute(TC_NegSem_060204_enumerated_type_and_values_004()); + } +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060204_enumerated_type_and_values/NegSem_060204_enumerated_type_and_values_005.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060204_enumerated_type_and_values/NegSem_060204_enumerated_type_and_values_005.ttcn new file mode 100644 index 00000000..3a05453a --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060204_enumerated_type_and_values/NegSem_060204_enumerated_type_and_values_005.ttcn @@ -0,0 +1,32 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:6.2.4, using enumerated value without implicit or explicit type reference + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// For any instantiation or value reference of an enumerated type, the given +// type shall be implicitly or explicitly referenced. + +module NegSem_060204_enumerated_type_and_values_005 { + + type component GeneralComp { + } + + type enumerated EDays { + Monday, Tuesday, Wednesday, Thursday, Friday + }; + + testcase TC_NegSem_060204_enumerated_type_and_values_005() runs on GeneralComp { + if (Tuesday != Wednesday) { // no implicit or explicit reference to enumeration + setverdict(pass); + } else { + setverdict(fail); + } + } + + control { + execute(TC_NegSem_060204_enumerated_type_and_values_005()); + } +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060204_enumerated_type_and_values/NegSem_060204_enumerated_type_and_values_006.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060204_enumerated_type_and_values/NegSem_060204_enumerated_type_and_values_006.ttcn new file mode 100644 index 00000000..2b3f1165 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060204_enumerated_type_and_values/NegSem_060204_enumerated_type_and_values_006.ttcn @@ -0,0 +1,38 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:6.2.4, modulepar with the same name as one of enumerated values of the imported parent type + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// When a TTCN-3 module parameter, formal parameter, constant, variable, +// non-parameterized template or parameterized template with all formal +// parameters having default values of an imported enumerated type is defined, +// the name of that definition shall not be the same as any of the enumerated +// values of that type. + +module NegSem_060204_enumerated_type_and_values_006 { + + import from NegSem_060204_enumerated_type_and_values_006_import all; + + type component GeneralComp { + } + + modulepar EDays Monday := Tuesday; + + testcase TC_NegSem_060204_enumerated_type_and_values_006() runs on GeneralComp { + log(Monday); + setverdict(pass); + } + + control { + execute(TC_NegSem_060204_enumerated_type_and_values_006()); + } +} + +module NegSem_060204_enumerated_type_and_values_006_import { + type enumerated EDays { + Monday, Tuesday, Wednesday, Thursday, Friday + }; +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060204_enumerated_type_and_values/NegSem_060204_enumerated_type_and_values_007.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060204_enumerated_type_and_values/NegSem_060204_enumerated_type_and_values_007.ttcn new file mode 100644 index 00000000..45bd6655 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060204_enumerated_type_and_values/NegSem_060204_enumerated_type_and_values_007.ttcn @@ -0,0 +1,40 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:6.2.4, formal parameter with the same name as one of enumerated values of the imported parent type + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// When a TTCN-3 module parameter, formal parameter, constant, variable, +// non-parameterized template or parameterized template with all formal +// parameters having default values of an imported enumerated type is defined, +// the name of that definition shall not be the same as any of the enumerated +// values of that type. + +module NegSem_060204_enumerated_type_and_values_007 { + + import from NegSem_060204_enumerated_type_and_values_007_import all; + + type component GeneralComp { + } + + function f_test(EDays Monday) { + log(Monday); + } + + testcase TC_NegSem_060204_enumerated_type_and_values_007() runs on GeneralComp { + f_test(Tuesday); + setverdict(pass); + } + + control { + execute(TC_NegSem_060204_enumerated_type_and_values_007()); + } +} + +module NegSem_060204_enumerated_type_and_values_007_import { + type enumerated EDays { + Monday, Tuesday, Wednesday, Thursday, Friday + }; +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060204_enumerated_type_and_values/NegSem_060204_enumerated_type_and_values_008.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060204_enumerated_type_and_values/NegSem_060204_enumerated_type_and_values_008.ttcn new file mode 100644 index 00000000..9cb22b06 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060204_enumerated_type_and_values/NegSem_060204_enumerated_type_and_values_008.ttcn @@ -0,0 +1,38 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:6.2.4, constant with the same name as one of enumerated values of the imported parent type + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// When a TTCN-3 module parameter, formal parameter, constant, variable, +// non-parameterized template or parameterized template with all formal +// parameters having default values of an imported enumerated type is defined, +// the name of that definition shall not be the same as any of the enumerated +// values of that type. + +module NegSem_060204_enumerated_type_and_values_008 { + + import from NegSem_060204_enumerated_type_and_values_008_import all; + + type component GeneralComp { + } + + const EDays Monday := Tuesday; + + testcase TC_NegSem_060204_enumerated_type_and_values_008() runs on GeneralComp { + log(Monday); + setverdict(pass); + } + + control { + execute(TC_NegSem_060204_enumerated_type_and_values_008()); + } +} + +module NegSem_060204_enumerated_type_and_values_008_import { + type enumerated EDays { + Monday, Tuesday, Wednesday, Thursday, Friday + }; +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060204_enumerated_type_and_values/NegSem_060204_enumerated_type_and_values_009.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060204_enumerated_type_and_values/NegSem_060204_enumerated_type_and_values_009.ttcn new file mode 100644 index 00000000..d4ff06b1 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060204_enumerated_type_and_values/NegSem_060204_enumerated_type_and_values_009.ttcn @@ -0,0 +1,37 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:6.2.4, variable with the same name as one of enumerated values of the imported parent type + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// When a TTCN-3 module parameter, formal parameter, constant, variable, +// non-parameterized template or parameterized template with all formal +// parameters having default values of an imported enumerated type is defined, +// the name of that definition shall not be the same as any of the enumerated +// values of that type. + +module NegSem_060204_enumerated_type_and_values_009 { + + import from NegSem_060204_enumerated_type_and_values_009_import all; + + type component GeneralComp { + } + + testcase TC_NegSem_060204_enumerated_type_and_values_009() runs on GeneralComp { + var EDays Monday := Tuesday; + log(Monday); + setverdict(pass); + } + + control { + execute(TC_NegSem_060204_enumerated_type_and_values_009()); + } +} + +module NegSem_060204_enumerated_type_and_values_009_import { + type enumerated EDays { + Monday, Tuesday, Wednesday, Thursday, Friday + }; +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060204_enumerated_type_and_values/NegSem_060204_enumerated_type_and_values_010.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060204_enumerated_type_and_values/NegSem_060204_enumerated_type_and_values_010.ttcn new file mode 100644 index 00000000..16738ea5 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060204_enumerated_type_and_values/NegSem_060204_enumerated_type_and_values_010.ttcn @@ -0,0 +1,38 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:6.2.4, template with the same name as one of enumerated values of the imported parent type + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// When a TTCN-3 module parameter, formal parameter, constant, variable, +// non-parameterized template or parameterized template with all formal +// parameters having default values of an imported enumerated type is defined, +// the name of that definition shall not be the same as any of the enumerated +// values of that type. + +module NegSem_060204_enumerated_type_and_values_010 { + + import from NegSem_060204_enumerated_type_and_values_010_import all; + + type component GeneralComp { + } + + template EDays Monday := Tuesday; + + testcase TC_NegSem_060204_enumerated_type_and_values_010() runs on GeneralComp { + log(Monday); + setverdict(pass); + } + + control { + execute(TC_NegSem_060204_enumerated_type_and_values_010()); + } +} + +module NegSem_060204_enumerated_type_and_values_010_import { + type enumerated EDays { + Monday, Tuesday, Wednesday, Thursday, Friday + }; +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060204_enumerated_type_and_values/NegSem_060204_enumerated_type_and_values_011.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060204_enumerated_type_and_values/NegSem_060204_enumerated_type_and_values_011.ttcn new file mode 100644 index 00000000..a1ed5f42 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060204_enumerated_type_and_values/NegSem_060204_enumerated_type_and_values_011.ttcn @@ -0,0 +1,38 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:6.2.4, parameterized template with default parameters and the same name as one of enumerated values of the imported parent type + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// When a TTCN-3 module parameter, formal parameter, constant, variable, +// non-parameterized template or parameterized template with all formal +// parameters having default values of an imported enumerated type is defined, +// the name of that definition shall not be the same as any of the enumerated +// values of that type. + +module NegSem_060204_enumerated_type_and_values_011 { + + import from NegSem_060204_enumerated_type_and_values_011_import all; + + type component GeneralComp { + } + + template EDays Monday(EDays p_par1 := Tuesday) := ( Friday, p_par1 ); + + testcase TC_NegSem_060204_enumerated_type_and_values_011() runs on GeneralComp { + log(Monday); + setverdict(pass); + } + + control { + execute(TC_NegSem_060204_enumerated_type_and_values_011()); + } +} + +module NegSem_060204_enumerated_type_and_values_011_import { + type enumerated EDays { + Monday, Tuesday, Wednesday, Thursday, Friday + }; +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060204_enumerated_type_and_values/NegSem_060204_enumerated_type_and_values_013.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060204_enumerated_type_and_values/NegSem_060204_enumerated_type_and_values_013.ttcn new file mode 100644 index 00000000..5197fd62 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060204_enumerated_type_and_values/NegSem_060204_enumerated_type_and_values_013.ttcn @@ -0,0 +1,33 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:6.2.4, using enumerated value number integer conversion + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// enumerated values with a specific integer value assigned shall not use the associated integer + +module NegSem_060204_enumerated_type_and_values_013 { + + type component GeneralComp { + } + + type enumerated EDays { + Monday(-1), Tuesday(1), Wednesday(2), Thursday(3), Friday(5) + }; + + testcase TC_NegSem_060204_enumerated_type_and_values_013() runs on GeneralComp { + var EDays v_enum := Friday(5); // error: shall not use the associated integer + + if (match(enum2int(v_enum),5)) { + setverdict(pass); + } else { + setverdict(fail); + } + } + + control { + execute(TC_NegSem_060204_enumerated_type_and_values_013()); + } +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060204_enumerated_type_and_values/NegSyn_060204_enumerated_type_and_values_001.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060204_enumerated_type_and_values/NegSyn_060204_enumerated_type_and_values_001.ttcn new file mode 100644 index 00000000..2b49c841 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060204_enumerated_type_and_values/NegSyn_060204_enumerated_type_and_values_001.ttcn @@ -0,0 +1,18 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:6.2.4, constant as user-assigned enumerated values + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Each enumerated value may optionally have a user-assigned integer value, which +// is defined after the name of the enumerated value in parenthesis. + +module NegSyn_060204_enumerated_type_and_values_002 { + + const integer c_int := 5; + type enumerated MyFirstEnumType { + Monday, Tuesday(c_int), Wednesday, Thursday, Friday + }; +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060204_enumerated_type_and_values/NegSyn_060204_enumerated_type_and_values_002.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060204_enumerated_type_and_values/NegSyn_060204_enumerated_type_and_values_002.ttcn new file mode 100644 index 00000000..671a3481 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060204_enumerated_type_and_values/NegSyn_060204_enumerated_type_and_values_002.ttcn @@ -0,0 +1,17 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:6.2.4, expression as user-assigned enumerated value + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Each enumerated value may optionally have a user-assigned integer value, which +// is defined after the name of the enumerated value in parenthesis. + +module NegSyn_060204_enumerated_type_and_values_003 { + + type enumerated MyFirstEnumType { + Monday, Tuesday(2+3), Thursday, Friday + }; +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060204_enumerated_type_and_values/NegSyn_060204_enumerated_type_and_values_004.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060204_enumerated_type_and_values/NegSyn_060204_enumerated_type_and_values_004.ttcn new file mode 100644 index 00000000..0fe6fc42 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060204_enumerated_type_and_values/NegSyn_060204_enumerated_type_and_values_004.ttcn @@ -0,0 +1,16 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:6.2.4, expression as user-assigned enumerated value + ** @verdict pass reject, noexecutino + ***************************************************/ + +// The following requirement is tested: +// ach enumerated value may optionally have a user-assigned integer value or non-empty list of integer literal values or ranges of integer literal values + +module NegSyn_060204_enumerated_type_and_values_004 { + + type enumerated MyFirstEnumType { + Monday, Tuesday(), Thursday, Friday + }; // error: non-empty integer literal required +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060204_enumerated_type_and_values/Sem_060204_enumerated_type_and_values_001.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060204_enumerated_type_and_values/Sem_060204_enumerated_type_and_values_001.ttcn new file mode 100644 index 00000000..cc26ec86 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060204_enumerated_type_and_values/Sem_060204_enumerated_type_and_values_001.ttcn @@ -0,0 +1,22 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:6.2.4, reusing enumerated value identifier in another enumerated type declaration + ** @verdict pass accept, noexecution + ***************************************************/ + +// The following requirement is tested: +// The identifiers of enumerated values shall only be reused within other structured +// type definitions and shall not be used for identifiers of local or global +// visibility at the same or a lower level of the same branch of the scope hierarchy +// (see scope hierarchy in clause 5.2). + +module Sem_060204_enumerated_type_and_values_001 { + + type enumerated MyFirstEnumType { + Monday, Tuesday, Wednesday, Thursday, Friday + }; + type enumerated MySecondEnumType { + Saturday, Sunday, Monday + }; +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060204_enumerated_type_and_values/Sem_060204_enumerated_type_and_values_002.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060204_enumerated_type_and_values/Sem_060204_enumerated_type_and_values_002.ttcn new file mode 100644 index 00000000..cd34876e --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060204_enumerated_type_and_values/Sem_060204_enumerated_type_and_values_002.ttcn @@ -0,0 +1,41 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:6.2.4, automatic numbering of enumerated items + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// For each enumerated value without an assigned integer value, the system +// successively associates an integer number in the textual order of the +// enumerated values, starting at the left-hand side, beginning with zero, by +// step 1 and skipping any number occupied by any of the enumerated values with +// a manually assigned value. These values are only used by the system to allow +// the use of relational operators. The user shall not directly use associated +// integer values but can access them and convert integer values into enumerated +// values by using the predefined functions enum2int and int2enum (see clauses +// 16.1.2, C.1.29 C.1.30 and C.1.4 C.1.4). + +module Sem_060204_enumerated_type_and_values_002 { + + type component GeneralComp { + } + + type enumerated EDays { + Monday, Tuesday, Wednesday, Thursday, Friday + }; + + testcase TC_Sem_060204_enumerated_type_and_values_002() runs on GeneralComp { + var EDays v_day0 := Monday, v_day2 := Wednesday, v_day4 := Friday; + + if (enum2int(v_day0) == 0 and enum2int(v_day2) == 2 and enum2int(v_day4) == 4) { + setverdict(pass); + } else { + setverdict(fail); + } + } + + control { + execute(TC_Sem_060204_enumerated_type_and_values_002()); + } +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060204_enumerated_type_and_values/Sem_060204_enumerated_type_and_values_003.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060204_enumerated_type_and_values/Sem_060204_enumerated_type_and_values_003.ttcn new file mode 100644 index 00000000..38852089 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060204_enumerated_type_and_values/Sem_060204_enumerated_type_and_values_003.ttcn @@ -0,0 +1,41 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:6.2.4, explicit numbering of enumerated items + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// For each enumerated value without an assigned integer value, the system +// successively associates an integer number in the textual order of the +// enumerated values, starting at the left-hand side, beginning with zero, by +// step 1 and skipping any number occupied by any of the enumerated values with +// a manually assigned value. These values are only used by the system to allow +// the use of relational operators. The user shall not directly use associated +// integer values but can access them and convert integer values into enumerated +// values by using the predefined functions enum2int and int2enum (see clauses +// 16.1.2, C.1.29 C.1.30 and C.1.4 C.1.4). + +module Sem_060204_enumerated_type_and_values_003 { + + type component GeneralComp { + } + + type enumerated EDays { + Monday(-1), Tuesday(4), Wednesday(0), Thursday(6), Friday(20) + }; + + testcase TC_Sem_060204_enumerated_type_and_values_003() runs on GeneralComp { + var EDays v_day0 := Monday, v_day2 := Wednesday, v_day4 := Friday; + + if (enum2int(v_day0) == -1 and enum2int(v_day2) == 0 and enum2int(v_day4) == 20) { + setverdict(pass); + } else { + setverdict(fail); + } + } + + control { + execute(TC_Sem_060204_enumerated_type_and_values_003()); + } +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060204_enumerated_type_and_values/Sem_060204_enumerated_type_and_values_004.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060204_enumerated_type_and_values/Sem_060204_enumerated_type_and_values_004.ttcn new file mode 100644 index 00000000..b6fce1bb --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060204_enumerated_type_and_values/Sem_060204_enumerated_type_and_values_004.ttcn @@ -0,0 +1,41 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:6.2.4, mixed automatic and explicit numbering of enumerated items + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// For each enumerated value without an assigned integer value, the system +// successively associates an integer number in the textual order of the +// enumerated values, starting at the left-hand side, beginning with zero, by +// step 1 and skipping any number occupied by any of the enumerated values with +// a manually assigned value. These values are only used by the system to allow +// the use of relational operators. The user shall not directly use associated +// integer values but can access them and convert integer values into enumerated +// values by using the predefined functions enum2int and int2enum (see clauses +// 16.1.2, C.1.29 C.1.30 and C.1.4 C.1.4). + +module Sem_060204_enumerated_type_and_values_004 { + + type component GeneralComp { + } + + type enumerated EDays { + Monday(1), Tuesday, Wednesday, Thursday(10), Friday + }; + + testcase TC_Sem_060204_enumerated_type_and_values_004() runs on GeneralComp { + var EDays v_day0 := Monday, v_day2 := Wednesday, v_day4 := Friday; + + if (enum2int(v_day0) == 1 and enum2int(v_day2) == 2 and enum2int(v_day4) == 3) { + setverdict(pass); + } else { + setverdict(fail); + } + } + + control { + execute(TC_Sem_060204_enumerated_type_and_values_004()); + } +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060204_enumerated_type_and_values/Sem_060204_enumerated_type_and_values_005.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060204_enumerated_type_and_values/Sem_060204_enumerated_type_and_values_005.ttcn new file mode 100644 index 00000000..70ce2497 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060204_enumerated_type_and_values/Sem_060204_enumerated_type_and_values_005.ttcn @@ -0,0 +1,33 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:6.2.4, using enumerated value with implicit type reference + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// For any instantiation or value reference of an enumerated type, the given +// type shall be implicitly or explicitly referenced. + +module Sem_060204_enumerated_type_and_values_005 { + + type component GeneralComp { + } + + type enumerated EDays { + Monday, Tuesday, Wednesday, Thursday, Friday + }; + + testcase TC_Sem_060204_enumerated_type_and_values_005() runs on GeneralComp { + var EDays v_day := Monday; + if (v_day == Monday) { //the type of variable v_day identifies the type context of EDays for the equality operator + setverdict(pass); + } else { + setverdict(fail); + } + } + + control { + execute(TC_Sem_060204_enumerated_type_and_values_005()); + } +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060204_enumerated_type_and_values/Sem_060204_enumerated_type_and_values_006.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060204_enumerated_type_and_values/Sem_060204_enumerated_type_and_values_006.ttcn new file mode 100644 index 00000000..b70b6da9 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060204_enumerated_type_and_values/Sem_060204_enumerated_type_and_values_006.ttcn @@ -0,0 +1,37 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:6.2.4, parameterized template without default parameters and with the same name as one of enumerated values of the imported parent type + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// When a TTCN-3 module parameter, formal parameter, constant, variable, +// non-parameterized template or parameterized template with all formal +// parameters having default values of an imported enumerated type is defined, +// the name of that definition shall not be the same as any of the enumerated +// values of that type. + +module Sem_060204_enumerated_type_and_values_006 { + + import from Sem_060204_enumerated_type_and_values_006_import all; + + type component GeneralComp { + } + + template EDays Monday(EDays p_par1) := ( Friday, p_par1 ); + + testcase TC_Sem_060204_enumerated_type_and_values_006() runs on GeneralComp { + setverdict(pass); + } + + control { + execute(TC_Sem_060204_enumerated_type_and_values_006()); + } +} + +module Sem_060204_enumerated_type_and_values_006_import { + type enumerated EDays { + Monday, Tuesday, Wednesday, Thursday, Friday + }; +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060204_enumerated_type_and_values/Sem_060204_enumerated_type_and_values_007.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060204_enumerated_type_and_values/Sem_060204_enumerated_type_and_values_007.ttcn new file mode 100644 index 00000000..06233ab3 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060204_enumerated_type_and_values/Sem_060204_enumerated_type_and_values_007.ttcn @@ -0,0 +1,37 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:6.2.4, mixed automatic and explicit numbering of enumerated items + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +/* For each enumerated value without an assigned integer value, + the system successively associates an integer number in the textual + order of the enumerated values, starting at the left-hand side, + beginning with zero, by step 1 and skipping any number occupied by any + of the enumerated values with a manually assigned value or value list. +*/ +module Sem_060204_enumerated_type_and_values_007 { + + type component GeneralComp { + } + + type enumerated EDays { + Monday(1), Tuesday, Wednesday, Thursday(10), Friday(11..30) + }; + + testcase TC_Sem_060204_enumerated_type_and_values_007() runs on GeneralComp { + var EDays v_day0 := Monday, v_day2 := Wednesday, v_day4 := Friday(15); + + if (enum2int(v_day0) == 1 and enum2int(v_day2) == 2 and enum2int(v_day4) == 15) { + setverdict(pass); + } else { + setverdict(fail); + } + } + + control { + execute(TC_Sem_060204_enumerated_type_and_values_007()); + } +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060204_enumerated_type_and_values/Syn_060204_enumerated_type_and_values_001.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060204_enumerated_type_and_values/Syn_060204_enumerated_type_and_values_001.ttcn new file mode 100644 index 00000000..233a4015 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060204_enumerated_type_and_values/Syn_060204_enumerated_type_and_values_001.ttcn @@ -0,0 +1,18 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:6.2.4, enumerated type declaration + ** @verdict pass accept, noexecution + ***************************************************/ + +// The following requirement is tested: +// TTCN 3 supports enumerated types. Enumerated types are used to model types +// that take only a distinct named set of values. Such distinct values are called +// enumerated values. Each enumerated value shall have an identifier. + +module Syn_060204_enumerated_type_and_values_001 { + + type enumerated MyFirstEnumType { + Monday, Tuesday, Wednesday, Thursday, Friday + }; +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060204_enumerated_type_and_values/Syn_060204_enumerated_type_and_values_002.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060204_enumerated_type_and_values/Syn_060204_enumerated_type_and_values_002.ttcn new file mode 100644 index 00000000..8d9c0dcc --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060204_enumerated_type_and_values/Syn_060204_enumerated_type_and_values_002.ttcn @@ -0,0 +1,17 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:6.2.4, enumerated type declaration with user-assigned values + ** @verdict pass accept, noexecution + ***************************************************/ + +// The following requirement is tested: +// Each enumerated value may optionally have a user-assigned integer value, which +// is defined after the name of the enumerated value in parenthesis. + +module Syn_060204_enumerated_type_and_values_002 { + + type enumerated MyFirstEnumType { + Monday, Tuesday(2), Wednesday(-1), Thursday, Friday + }; +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060205_unions/06020501_referencing_fields_of_union_type/NegSem_06020501_referencing_fields_of_union_type_001.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060205_unions/06020501_referencing_fields_of_union_type/NegSem_06020501_referencing_fields_of_union_type_001.ttcn new file mode 100644 index 00000000..aba47555 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060205_unions/06020501_referencing_fields_of_union_type/NegSem_06020501_referencing_fields_of_union_type_001.ttcn @@ -0,0 +1,34 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:6.2.5.1, unknown union alternative in value dot notation + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Alternatives of a union type shall be referenced by the dot notation +// TypeIdOrExpression.AlternativeId, where TypeIdOrExpression resolves to the name +// of a union type or an expression of a union type such as variable, formal +// parameter, module parameter, constant, template, or function invocation. +// AlternativeId shall resolve to the name of an alternative in the union type. + +module NegSem_06020501_referencing_fields_of_union_type_001 { + type component GeneralComp { + } + + type union U { + integer option1, + charstring option2 + } + + testcase TC_NegSem_06020501_referencing_fields_of_union_type_001() runs on GeneralComp { + var U v_union; + v_union.option3 := 1; + if (ischosen(v_union.option1) or ischosen(v_union.option2)) { setverdict(pass); } + else { setverdict(fail); } + } + + control{ + execute(TC_NegSem_06020501_referencing_fields_of_union_type_001()); + } +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060205_unions/06020501_referencing_fields_of_union_type/NegSem_06020501_referencing_fields_of_union_type_002.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060205_unions/06020501_referencing_fields_of_union_type/NegSem_06020501_referencing_fields_of_union_type_002.ttcn new file mode 100644 index 00000000..5463d9a3 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060205_unions/06020501_referencing_fields_of_union_type/NegSem_06020501_referencing_fields_of_union_type_002.ttcn @@ -0,0 +1,35 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:6.2.5.1, unknown union alternative in extended type reference + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Alternatives of a union type shall be referenced by the dot notation +// TypeIdOrExpression.AlternativeId, where TypeIdOrExpression resolves to the name +// of a union type or an expression of a union type such as variable, formal +// parameter, module parameter, constant, template, or function invocation. +// AlternativeId shall resolve to the name of an alternative in the union type. + +module NegSem_06020501_referencing_fields_of_union_type_002 { + type component GeneralComp { + } + + type union U { + integer option1, + charstring option2 + } + + type U.option3 UnionItem; + + testcase TC_NegSem_06020501_referencing_fields_of_union_type_002() runs on GeneralComp { + var UnionItem v_val := 1; + if (v_val == 1) { setverdict(pass); } + else { setverdict(fail); } + } + + control{ + execute(TC_NegSem_06020501_referencing_fields_of_union_type_002()); + } +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060205_unions/06020501_referencing_fields_of_union_type/NegSem_06020501_referencing_fields_of_union_type_003.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060205_unions/06020501_referencing_fields_of_union_type/NegSem_06020501_referencing_fields_of_union_type_003.ttcn new file mode 100644 index 00000000..7a482f88 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060205_unions/06020501_referencing_fields_of_union_type/NegSem_06020501_referencing_fields_of_union_type_003.ttcn @@ -0,0 +1,29 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:6.2.5.1, union alternative referencing itself + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Alternatives of union type definitions shall not reference themselves. + +module NegSem_06020501_referencing_fields_of_union_type_003 { + type component GeneralComp { + } + + type union U { + integer option1, + U.option2 option2 + } + + testcase TC_NegSem_06020501_referencing_fields_of_union_type_003() runs on GeneralComp { + var U v_union := { option1 := 1 }; + if (v_union == { option1 := 1}) { setverdict(pass); } + else { setverdict(fail); } + } + + control{ + execute(TC_NegSem_06020501_referencing_fields_of_union_type_003()); + } +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060205_unions/06020501_referencing_fields_of_union_type/NegSem_06020501_referencing_fields_of_union_type_004.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060205_unions/06020501_referencing_fields_of_union_type/NegSem_06020501_referencing_fields_of_union_type_004.ttcn new file mode 100644 index 00000000..3e64100c --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060205_unions/06020501_referencing_fields_of_union_type/NegSem_06020501_referencing_fields_of_union_type_004.ttcn @@ -0,0 +1,30 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:6.2.5.1, union alternative referencing indirectly itself + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Alternatives of union type definitions shall not reference themselves. + +module NegSem_06020501_referencing_fields_of_union_type_004 { + type component GeneralComp { + } + + type union U { + integer option1, + U.option3 option2, + U.option2 option3 + } + + testcase TC_NegSem_06020501_referencing_fields_of_union_type_004() runs on GeneralComp { + var U v_union := { option1 := 1 }; + if (v_union == { option1 := 1}) { setverdict(pass); } + else { setverdict(fail); } + } + + control{ + execute(TC_NegSem_06020501_referencing_fields_of_union_type_004()); + } +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060205_unions/06020501_referencing_fields_of_union_type/NegSem_06020501_referencing_fields_of_union_type_005.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060205_unions/06020501_referencing_fields_of_union_type/NegSem_06020501_referencing_fields_of_union_type_005.ttcn new file mode 100644 index 00000000..9b34f73f --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060205_unions/06020501_referencing_fields_of_union_type/NegSem_06020501_referencing_fields_of_union_type_005.ttcn @@ -0,0 +1,34 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:6.2.5.1, union alternative costraint passed through extended type reference + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If an alternative in a union type or a subtype of a union type is referenced by +// the dot notation, the resulting type is the set of values allowed for that +// alternative imposed by the constraints of the alternative declaration itself +// (i.e. any constraints applied to the union type itself are ignored). + +module NegSem_06020501_referencing_fields_of_union_type_005 { + type component GeneralComp { + } + + type union U { + integer option1 (1..10), + charstring option2 + } + + type U.option1 UnionItem; + + testcase TC_NegSem_06020501_referencing_fields_of_union_type_005() runs on GeneralComp { + var UnionItem v_val := 100; + if (v_val == 100) { setverdict(pass); } + else { setverdict(fail); } + } + + control{ + execute(TC_NegSem_06020501_referencing_fields_of_union_type_005()); + } +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060205_unions/06020501_referencing_fields_of_union_type/NegSem_06020501_referencing_fields_of_union_type_006.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060205_unions/06020501_referencing_fields_of_union_type/NegSem_06020501_referencing_fields_of_union_type_006.ttcn new file mode 100644 index 00000000..d5d6439b --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060205_unions/06020501_referencing_fields_of_union_type/NegSem_06020501_referencing_fields_of_union_type_006.ttcn @@ -0,0 +1,32 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:6.2.5.1, referencing not chosen alternative on right hand side of assignment + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// When an alternative of a union type is referenced on the right hand side of +// an assignment an error shall occur if the referenced alternative is not the +// currently chosen alternative or if the referenced union field or value is omitted +// or uninitialized. + +module NegSem_06020501_referencing_fields_of_union_type_006 { + type component GeneralComp { + } + + type union U { + integer option1, + charstring option2 + } + + testcase TC_NegSem_06020501_referencing_fields_of_union_type_006() runs on GeneralComp { + var U v_union := { option1 := 1 }; + if (v_union.option2 != "test") { setverdict(pass); } + else { setverdict(fail); } + } + + control{ + execute(TC_NegSem_06020501_referencing_fields_of_union_type_006()); + } +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060205_unions/06020501_referencing_fields_of_union_type/NegSem_06020501_referencing_fields_of_union_type_007.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060205_unions/06020501_referencing_fields_of_union_type/NegSem_06020501_referencing_fields_of_union_type_007.ttcn new file mode 100644 index 00000000..f5f15c92 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060205_unions/06020501_referencing_fields_of_union_type/NegSem_06020501_referencing_fields_of_union_type_007.ttcn @@ -0,0 +1,38 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:6.2.5.1, referencing alternative of uninitialized union on right hand side of assignment + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// When an alternative of a union type is referenced on the right hand side of +// an assignment an error shall occur if the referenced alternative is not the +// currently chosen alternative or if the referenced union field or value is omitted +// or uninitialized. + +module NegSem_06020501_referencing_fields_of_union_type_007 { + type component GeneralComp { + } + + type union U { + integer option1, + charstring option2 + } + + type record R { + integer field1, + U field2 + } + + testcase TC_NegSem_06020501_referencing_fields_of_union_type_007() runs on GeneralComp { + var R v_rec; + v_rec.field1 := 5; + if (v_rec.field2.option1 != 100) { setverdict(pass); } + else { setverdict(fail); } + } + + control{ + execute(TC_NegSem_06020501_referencing_fields_of_union_type_007()); + } +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060205_unions/06020501_referencing_fields_of_union_type/NegSem_06020501_referencing_fields_of_union_type_008.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060205_unions/06020501_referencing_fields_of_union_type/NegSem_06020501_referencing_fields_of_union_type_008.ttcn new file mode 100644 index 00000000..65e78d2d --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060205_unions/06020501_referencing_fields_of_union_type/NegSem_06020501_referencing_fields_of_union_type_008.ttcn @@ -0,0 +1,39 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:6.2.5.1, referencing alternative of omitted union on right hand side of assignment + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// When an alternative of a union type is referenced on the right hand side of +// an assignment an error shall occur if the referenced alternative is not the +// currently chosen alternative or if the referenced union field or value is omitted +// or uninitialized. + +module NegSem_06020501_referencing_fields_of_union_type_008 { + type component GeneralComp { + } + + type union U { + integer option1, + charstring option2 + } + + type record R { + integer field1, + U field2 optional + } + + testcase TC_NegSem_06020501_referencing_fields_of_union_type_008() runs on GeneralComp { + var R v_rec; + v_rec.field1 := 5; + v_rec.field2 := omit; + if (v_rec.field2.option1 != 100) { setverdict(pass); } + else { setverdict(fail); } + } + + control{ + execute(TC_NegSem_06020501_referencing_fields_of_union_type_008()); + } +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060205_unions/06020501_referencing_fields_of_union_type/Sem_06020501_referencing_fields_of_union_type_001.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060205_unions/06020501_referencing_fields_of_union_type/Sem_06020501_referencing_fields_of_union_type_001.ttcn new file mode 100644 index 00000000..15aae43c --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060205_unions/06020501_referencing_fields_of_union_type/Sem_06020501_referencing_fields_of_union_type_001.ttcn @@ -0,0 +1,34 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:6.5.2, Ensure that union is initialized by dot notation + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +module Sem_06020501_referencing_fields_of_union_type_001 { + type union MyUnionType + { + integer number, + charstring string + }; + + type component GeneralComp { + }; + + + testcase TC_Sem_06020501_referencing_fields_of_union_type_001 () runs on GeneralComp { + var MyUnionType v_mut ; + v_mut.number := 0; + + if (v_mut.number == 0) { + setverdict(pass); + } + else { + setverdict(fail); + } + } + + control { + execute(TC_Sem_06020501_referencing_fields_of_union_type_001()); + } +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060205_unions/06020501_referencing_fields_of_union_type/Sem_06020501_referencing_fields_of_union_type_002.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060205_unions/06020501_referencing_fields_of_union_type/Sem_06020501_referencing_fields_of_union_type_002.ttcn new file mode 100644 index 00000000..e328eb91 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060205_unions/06020501_referencing_fields_of_union_type/Sem_06020501_referencing_fields_of_union_type_002.ttcn @@ -0,0 +1,35 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:6.2.5.1, union alternative in extended type reference + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Alternatives of a union type shall be referenced by the dot notation +// TypeIdOrExpression.AlternativeId, where TypeIdOrExpression resolves to the name +// of a union type or an expression of a union type such as variable, formal +// parameter, module parameter, constant, template, or function invocation. +// AlternativeId shall resolve to the name of an alternative in the union type. + +module Sem_06020501_referencing_fields_of_union_type_002 { + type component GeneralComp { + } + + type union U { + integer option1, + charstring option2 + } + + type U.option1 UnionItem; + + testcase TC_Sem_06020501_referencing_fields_of_union_type_002() runs on GeneralComp { + var UnionItem v_val := 1; + if (v_val == 1) { setverdict(pass); } + else { setverdict(fail); } + } + + control{ + execute(TC_Sem_06020501_referencing_fields_of_union_type_002()); + } +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060205_unions/06020501_referencing_fields_of_union_type/Sem_06020501_referencing_fields_of_union_type_003.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060205_unions/06020501_referencing_fields_of_union_type/Sem_06020501_referencing_fields_of_union_type_003.ttcn new file mode 100644 index 00000000..801a1f76 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060205_unions/06020501_referencing_fields_of_union_type/Sem_06020501_referencing_fields_of_union_type_003.ttcn @@ -0,0 +1,35 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:6.2.5.1, union costraint not applied to extended type reference to its item + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// If an alternative in a union type or a subtype of a union type is referenced by +// the dot notation, the resulting type is the set of values allowed for that +// alternative imposed by the constraints of the alternative declaration itself +// (i.e. any constraints applied to the union type itself are ignored). + +module Sem_06020501_referencing_fields_of_union_type_003 { + type component GeneralComp { + } + + type union U { + integer option1, + charstring option2 + } + + type U ConstrainedU ( {option1 := 1 }, { option1 := 2}); + type ConstrainedU.option1 UnionItem; + + testcase TC_Sem_06020501_referencing_fields_of_union_type_003() runs on GeneralComp { + var UnionItem v_val := 100; + if (v_val == 100) { setverdict(pass); } + else { setverdict(fail); } + } + + control{ + execute(TC_Sem_06020501_referencing_fields_of_union_type_003()); + } +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060205_unions/06020501_referencing_fields_of_union_type/Sem_06020501_referencing_fields_of_union_type_004.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060205_unions/06020501_referencing_fields_of_union_type/Sem_06020501_referencing_fields_of_union_type_004.ttcn new file mode 100644 index 00000000..bf9f69b5 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060205_unions/06020501_referencing_fields_of_union_type/Sem_06020501_referencing_fields_of_union_type_004.ttcn @@ -0,0 +1,37 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:6.2.5.1, referencing alternative on left hand side of assignment + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// When referencing an alternative of a union type on the left hand side of +// an assignment, the referenced alternative shall become the chosen one. This rule +// shall apply recursively if the reference contains alternatives of nested unions, +// choosing all the referenced alternatives. + +module Sem_06020501_referencing_fields_of_union_type_004 { + type component GeneralComp { + } + + type union U { + integer option1, + charstring option2 + } + + testcase TC_Sem_06020501_referencing_fields_of_union_type_004() runs on GeneralComp { + var U v_union; + v_union.option1 := 1; + if (v_union.option1 == 1) { setverdict(pass); } + else { setverdict(fail); } + + v_union.option2 := "test"; + if (v_union.option2 == "test") { setverdict(pass); } + else { setverdict(fail); } + } + + control{ + execute(TC_Sem_06020501_referencing_fields_of_union_type_004()); + } +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060205_unions/06020501_referencing_fields_of_union_type/Sem_06020501_referencing_fields_of_union_type_005.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060205_unions/06020501_referencing_fields_of_union_type/Sem_06020501_referencing_fields_of_union_type_005.ttcn new file mode 100644 index 00000000..17917c72 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060205_unions/06020501_referencing_fields_of_union_type/Sem_06020501_referencing_fields_of_union_type_005.ttcn @@ -0,0 +1,42 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:6.2.5.1, referencing nested alternative on left hand side of assignment + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// When referencing an alternative of a union type on the left hand side of +// an assignment, the referenced alternative shall become the chosen one. This rule +// shall apply recursively if the reference contains alternatives of nested unions, +// choosing all the referenced alternatives. + +module Sem_06020501_referencing_fields_of_union_type_005 { + type component GeneralComp { + } + + type union SubU { + integer suboption1, + charstring suboption2 + } + + type union U { + integer option1, + SubU option2 + } + + testcase TC_Sem_06020501_referencing_fields_of_union_type_005() runs on GeneralComp { + var U v_union; + v_union.option1 := 1; + if (v_union.option1 == 1) { setverdict(pass); } + else { setverdict(fail); } + + v_union.option2.suboption2 := "test"; + if (v_union.option2.suboption2 == "test") { setverdict(pass); } + else { setverdict(fail); } + } + + control{ + execute(TC_Sem_06020501_referencing_fields_of_union_type_005()); + } +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060205_unions/06020501_referencing_fields_of_union_type/Sem_06020501_referencing_fields_of_union_type_006.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060205_unions/06020501_referencing_fields_of_union_type/Sem_06020501_referencing_fields_of_union_type_006.ttcn new file mode 100644 index 00000000..a2484182 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060205_unions/06020501_referencing_fields_of_union_type/Sem_06020501_referencing_fields_of_union_type_006.ttcn @@ -0,0 +1,50 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:6.2.5.1, referencing field of structured alternative on left hand side of assignment + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// When referencing an alternative of an uninitialized union value or field or +// omitted field (including omitting a field at a higher level of the embedding +// hierarchy) on the left hand side of an assignment, the reference shall +// recursively be expanded up to and including the depth of the referenced +// alternative as follows: +// a) When expanding a value or value field of union type, the alternative +// referenced in the dot notation becomes the chosen one. +// b) Expansion of record, record of, set, set of, and array values and intermediate +// fields shall follow the rules of item a) in clauses 6.2.1.1and 6.2.3, and clause +// 6.2.2.1 correspondingly. +// c) At the end of the expansion, the value at the right hand side of the assignment +// shall be assigned to the referenced alternative. + +module Sem_06020501_referencing_fields_of_union_type_006 { + type component GeneralComp { + } + + type record of integer RI; + type record R { + RI field1, + integer field2 + } + + type union U { + integer option1, + R option2 + } + + testcase TC_Sem_06020501_referencing_fields_of_union_type_006() runs on GeneralComp { + var U v_union; + v_union.option2.field1[1] := 10; + + if (ischosen(v_union.option2) and isbound(v_union.option2.field1) and + not isbound(v_union.option2.field2) and not isbound(v_union.option2.field1[0]) and + v_union.option2.field1[1] == 10) { setverdict(pass); } + else { setverdict(fail); } + } + + control{ + execute(TC_Sem_06020501_referencing_fields_of_union_type_006()); + } +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060205_unions/06020501_referencing_fields_of_union_type/Sem_06020501_referencing_fields_of_union_type_007.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060205_unions/06020501_referencing_fields_of_union_type/Sem_06020501_referencing_fields_of_union_type_007.ttcn new file mode 100644 index 00000000..c5a3cf68 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060205_unions/06020501_referencing_fields_of_union_type/Sem_06020501_referencing_fields_of_union_type_007.ttcn @@ -0,0 +1,39 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:6.5.2, Ensure that union is initialized by anytype dot notation + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +/*The following requirement is tested: + * AlternativeId shall resolve to the name of an alternative in the union type or + * in case of an anytype value or template AlternativeId shall resolve to a known type name + * or a known type name qualified with a module name. + */ + +module Sem_06020501_referencing_fields_of_union_type_007 { + type union MyUnionType + { + integer number, + anytype string + }; + + type component GeneralComp { + }; + + + testcase TC_Sem_06020501_referencing_fields_of_union_type_007 () runs on GeneralComp { + var MyUnionType v_mut ; + v_mut.string.integer := 3; // AlternativeID shall resolve type e.g. integer + + if (v_mut.string.integer == 3) { + setverdict(pass); + } + else { + setverdict(fail); + } + } + + control { + execute(TC_Sem_06020501_referencing_fields_of_union_type_007()); + } +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060205_unions/06020501_referencing_fields_of_union_type/Sem_06020501_referencing_fields_of_union_type_008.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060205_unions/06020501_referencing_fields_of_union_type/Sem_06020501_referencing_fields_of_union_type_008.ttcn new file mode 100644 index 00000000..8ea0c051 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060205_unions/06020501_referencing_fields_of_union_type/Sem_06020501_referencing_fields_of_union_type_008.ttcn @@ -0,0 +1,41 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:6.5.2, Ensure that union is initialized by anytype dot notation + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +/*The following requirement is tested: + * AlternativeId shall resolve to the name of an alternative in the union type or + * in case of an anytype value or template AlternativeId shall resolve to a known type name + * or a known type name qualified with a module name. + */ + +module Sem_06020501_referencing_fields_of_union_type_008 { + type union MyUnionType + { + integer number, + anytype string + }; + type integer My_Int; + + type component GeneralComp { + }; + + + testcase TC_Sem_06020501_referencing_fields_of_union_type_008 () runs on GeneralComp { + var MyUnionType v_mut ; + v_mut.string.My_Int := 3; // AlternativeID shall resolve type e.g. My_Int + + if (v_mut.string.My_Int == 3) { + setverdict(pass); + } + else { + setverdict(fail); + } + } + + control { + execute(TC_Sem_06020501_referencing_fields_of_union_type_008()); + } +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060205_unions/06020502_option_and_union/NegSyn_06020502_option_and_union_001.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060205_unions/06020502_option_and_union/NegSyn_06020502_option_and_union_001.ttcn new file mode 100644 index 00000000..b5967edb --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060205_unions/06020502_option_and_union/NegSyn_06020502_option_and_union_001.ttcn @@ -0,0 +1,17 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:6.2.5.2, referencing alternative on left hand side of assignment + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Optional fields are not allowed for the union type, which means that the optional +// keyword shall not be used with union types. + +module NegSyn_06020502_option_and_union_001 { + type union U { + integer option1, + charstring option2 optional + } +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060205_unions/06020503_nested_type_definition_for_field_types/Syn_06020503_nested_type_definition_for_field_types_001.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060205_unions/06020503_nested_type_definition_for_field_types/Syn_06020503_nested_type_definition_for_field_types_001.ttcn new file mode 100644 index 00000000..94445485 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060205_unions/06020503_nested_type_definition_for_field_types/Syn_06020503_nested_type_definition_for_field_types_001.ttcn @@ -0,0 +1,27 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:6.2.5, union type declaration + ** @verdict pass accept, noexecution + ***************************************************/ + +// The following requirement is tested: +// TTCN-3 supports the definition of types for union alternatives nested within +// the union definition, similar to the mechanism for record types described in +// clause 6.2.1.3. + +module Syn_06020503_nested_type_definition_for_field_types_001 { + + type union MyUnionType + { + record { + integer field1, + integer field2 optional + } option1, + record of integer option2, + union { + integer suboption1, + charstring suboption2 + } option3 + } +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060205_unions/060205_toplevel/NegSem_060205_top_level_001.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060205_unions/060205_toplevel/NegSem_060205_top_level_001.ttcn new file mode 100644 index 00000000..04c06ce2 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060205_unions/060205_toplevel/NegSem_060205_top_level_001.ttcn @@ -0,0 +1,30 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:6.2.5, assignment notation for union values with two items + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// The assignment notation shall be used for union-s, and the notation shall assign +// a value to one field only. This field becomes the chosen field. + +module NegSem_060205_top_level_001 { + type component GeneralComp { + } + + type union U { + integer option1, + charstring option2 + } + + testcase TC_NegSem_060205_top_level_001() runs on GeneralComp { + var U v_choice := { option1 := 1, option2 := "abc" }; + if (ischosen(v_choice.option1) or ischosen(v_choice.option2)) { setverdict(pass); } + else { setverdict(fail); } + } + + control{ + execute(TC_NegSem_060205_top_level_001()); + } +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060205_unions/060205_toplevel/NegSem_060205_top_level_002.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060205_unions/060205_toplevel/NegSem_060205_top_level_002.ttcn new file mode 100644 index 00000000..5bbb4d24 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060205_unions/060205_toplevel/NegSem_060205_top_level_002.ttcn @@ -0,0 +1,31 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:6.2.5, assignment notation for union values with unknown alternative + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// The assignment notation shall be used for union-s, and the notation shall assign +// a value to one field only. This field becomes the chosen field. + +module NegSem_060205_top_level_002 { + type component GeneralComp { + } + + type union U { + integer option1, + charstring option2 + } + + testcase TC_NegSem_060205_top_level_002() runs on GeneralComp { + var U v_choice := { option1 := 10 }; + v_choice := { option3 := true }; + if (ischosen(v_choice.option1)) { setverdict(pass); } + else { setverdict(fail); } + } + + control{ + execute(TC_NegSem_060205_top_level_002()); + } +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060205_unions/060205_toplevel/NegSem_060205_top_level_003.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060205_unions/060205_toplevel/NegSem_060205_top_level_003.ttcn new file mode 100644 index 00000000..7e6ea874 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060205_unions/060205_toplevel/NegSem_060205_top_level_003.ttcn @@ -0,0 +1,29 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:6.2.5, "not used" symbol in union value notations + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Neither the not used symbol "-" nor omit is allowed in union value notations. + +module NegSem_060205_top_level_003 { + type component GeneralComp { + } + + type union U { + integer option1, + charstring option2 + } + + testcase TC_NegSem_060205_top_level_003() runs on GeneralComp { + var U v_choice := { option1 := - }; + if (ischosen(v_choice.option1)) { setverdict(pass); } + else { setverdict(fail); } + } + + control{ + execute(TC_NegSem_060205_top_level_003()); + } +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060205_unions/060205_toplevel/NegSem_060205_top_level_004.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060205_unions/060205_toplevel/NegSem_060205_top_level_004.ttcn new file mode 100644 index 00000000..a314fd94 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060205_unions/060205_toplevel/NegSem_060205_top_level_004.ttcn @@ -0,0 +1,29 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:6.2.5, omit symbol in union value notations + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Neither the not used symbol "-" nor omit is allowed in union value notations. + +module NegSem_060205_top_level_004 { + type component GeneralComp { + } + + type union U { + integer option1, + charstring option2 + } + + testcase TC_NegSem_060205_top_level_004() runs on GeneralComp { + var U v_choice := { option1 := omit }; + if (ischosen(v_choice.option1) or ischosen(v_choice.option2)) { setverdict(pass); } + else { setverdict(fail); } + } + + control{ + execute(TC_NegSem_060205_top_level_004()); + } +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060205_unions/060205_toplevel/NegSem_060205_top_level_005.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060205_unions/060205_toplevel/NegSem_060205_top_level_005.ttcn new file mode 100644 index 00000000..4a81ce0f --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060205_unions/060205_toplevel/NegSem_060205_top_level_005.ttcn @@ -0,0 +1,28 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:6.2.5, value list notation used for union value definition + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// The value list notation shall not be used for setting values of union types. + +module NegSem_060205_top_level_005 { + type component GeneralComp { + } + + type union U { + integer option1 + } + + testcase TC_NegSem_060205_top_level_005() runs on GeneralComp { + var U v_choice := { 1 }; + if (ischosen(v_choice.option1)) { setverdict(pass); } + else { setverdict(fail); } + } + + control{ + execute(TC_NegSem_060205_top_level_005()); + } +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060205_unions/060205_toplevel/NegSyn_060205_top_level_001.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060205_unions/060205_toplevel/NegSyn_060205_top_level_001.ttcn new file mode 100644 index 00000000..cbd7091d --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060205_unions/060205_toplevel/NegSyn_060205_top_level_001.ttcn @@ -0,0 +1,20 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:6.2.5, union type declaration with two equal identifiers + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// TTCN-3 supports the union type. The union type is a collection of alternatives, +// each one identified by an identifier. Only one of the specified alternatives +// will ever be present in an actual union value. Union types are useful to model +// data which can take one of a finite number of known types. + +module NegSyn_060205_top_level_001 { + type union U { + integer option1, + charstring option2, + boolean option1 // error expected + } +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060205_unions/060205_toplevel/Sem_060205_top_level_001.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060205_unions/060205_toplevel/Sem_060205_top_level_001.ttcn new file mode 100644 index 00000000..49c2ea49 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060205_unions/060205_toplevel/Sem_060205_top_level_001.ttcn @@ -0,0 +1,30 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:6.2.5, assignment notation for union values + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// The assignment notation shall be used for union-s, and the notation shall assign +// a value to one field only. This field becomes the chosen field. + +module Sem_060205_top_level_001 { + type component GeneralComp { + } + + type union U { + integer option1, + charstring option2 + } + + testcase TC_Sem_060205_top_level_001() runs on GeneralComp { + var U v_choice := { option1 := 1 }; + if (ischosen(v_choice.option1) and v_choice.option1 == 1) { setverdict(pass); } + else { setverdict(fail); } + } + + control{ + execute(TC_Sem_060205_top_level_001()); + } +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060205_unions/060205_toplevel/Syn_060205_top_level_001.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060205_unions/060205_toplevel/Syn_060205_top_level_001.ttcn new file mode 100644 index 00000000..58eca5ff --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060205_unions/060205_toplevel/Syn_060205_top_level_001.ttcn @@ -0,0 +1,22 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:6.2.5, union type declaration + ** @verdict pass accept, noexecution + ***************************************************/ + +// The following requirement is tested: +// TTCN-3 supports the union type. The union type is a collection of alternatives, +// each one identified by an identifier. Only one of the specified alternatives +// will ever be present in an actual union value. Union types are useful to model +// data which can take one of a finite number of known types. + +module Syn_060205_top_level_001 { + const integer number := 4; // to test rules on uniqueness of identifiers + + type union MyUnionType + { + integer number, + charstring string + } +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060205_unions/060205_toplevel/Syn_060205_top_level_002.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060205_unions/060205_toplevel/Syn_060205_top_level_002.ttcn new file mode 100644 index 00000000..d2df8fc9 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060205_unions/060205_toplevel/Syn_060205_top_level_002.ttcn @@ -0,0 +1,18 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:6.2.5, union type declaration with single item + ** @verdict pass accept, noexecution + ***************************************************/ + +// The following requirement is tested: +// TTCN-3 supports the union type. The union type is a collection of alternatives, +// each one identified by an identifier. Only one of the specified alternatives +// will ever be present in an actual union value. Union types are useful to model +// data which can take one of a finite number of known types. + +module Syn_060205_top_level_002 { + type union U { + integer option1 + } +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060206_anytype/NegSem_060206_anytype_001.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060206_anytype/NegSem_060206_anytype_001.ttcn new file mode 100644 index 00000000..3097d765 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060206_anytype/NegSem_060206_anytype_001.ttcn @@ -0,0 +1,35 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:6.2.0.6, ensure that after redeclaration of an anytype value the old type and value are lost + ** @verdict pass reject + ***************************************************/ +module NegSem_060206_anytype_001 { + type component GeneralComp { + +var anytype Var1, Var2; + +} + +testcase TC_NegSem_060206_anytype_001() runs on GeneralComp { + +Var1.integer := 10; +Var2.float := 3.0E0; + +Var1.float := 5.5E0; +Var2.charstring := "abc"; // the new type of Var2 is charstring instead of float + + if ( match(Var1.integer, 10) and match(Var2.float, 3.0E0)) { + setverdict(pass); + } + else { + setverdict(fail); + } + +} + +control { + execute(TC_NegSem_060206_anytype_001()); +} + +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060206_anytype/NegSem_060206_anytype_002.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060206_anytype/NegSem_060206_anytype_002.ttcn new file mode 100644 index 00000000..03d32423 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060206_anytype/NegSem_060206_anytype_002.ttcn @@ -0,0 +1,33 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:6.2.0.6, Ensure that anytype can not be address type if not explicitly declareted in the module + ** @verdict pass reject + ***************************************************/ +module NegSem_060206_anytype_002 { + +type component GeneralComp { + + var anytype x; +} + + +testcase TC_NegSem_060206_anytype_002() runs on GeneralComp { + +x.address:=10; // error: address type is not declarated in the module explicitly + + + if (x.address==10) { + setverdict(pass); + } + else { + setverdict(fail); + } + +} + +control { + execute(TC_NegSem_060206_anytype_002()); +} + +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060206_anytype/NegSyn_060206_anytype_001.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060206_anytype/NegSyn_060206_anytype_001.ttcn new file mode 100644 index 00000000..6385af8e --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060206_anytype/NegSyn_060206_anytype_001.ttcn @@ -0,0 +1,38 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:6.2.0.6, ensure that anytype can not be a default type + ** @verdict pass reject + ***************************************************/ + +module NegSyn_060206_anytype_001 { + +type default Mydef; + +type component GeneralComp { + var Mydef y:= null; + var anytype x; + +} + + +testcase TC_NegSyn_060206_anytype_001() runs on GeneralComp { + +x.Mydef := y; // default type is not allowed with anytype + + + + if (x.Mydef == null) { + setverdict(pass); + } + else { + setverdict(fail); + } + +} + +control { + execute(TC_NegSyn_060206_anytype_001()); +} + +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060206_anytype/NegSyn_060206_anytype_002.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060206_anytype/NegSyn_060206_anytype_002.ttcn new file mode 100644 index 00000000..2daf3fc3 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060206_anytype/NegSyn_060206_anytype_002.ttcn @@ -0,0 +1,35 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:6.2.0.6, ensure that anytype cannot be port type + ** @verdict pass reject + ***************************************************/ + + +module NegSyn_060206_anytype_002 { + + +type port MyPort message{ + address integer; + inout integer; +}; + +type component GeneralComp { +var anytype x; +port MyPort PCO1; + +} + + +testcase TC_NegSyn_060206_anytype_002() runs on GeneralComp { + +x.MyPort:= PCO1; // port type is not allowed with anytype + + +} + +control { + execute(TC_NegSyn_060206_anytype_002()); +} + +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060206_anytype/NegSyn_060206_anytype_003.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060206_anytype/NegSyn_060206_anytype_003.ttcn new file mode 100644 index 00000000..19c11961 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060206_anytype/NegSyn_060206_anytype_003.ttcn @@ -0,0 +1,35 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:6.2.0.6, ensure that component type not allowed for anytype + ** @verdict pass reject + ***************************************************/ + +module NegSyn_060206_anytype_003 { + +type component MyComp{ +var integer b; +} + +type component GeneralComp extends MyComp { + + var anytype c; + +} + + +testcase TC_NegSyn_060206_anytype_003() runs on GeneralComp { + +b := 10; + +c.MyComp:= b; // Component type is not allowed with anytype + + + +} + +control { + execute(TC_NegSyn_060206_anytype_003()); +} + +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060206_anytype/Sem_060206_anytype_001.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060206_anytype/Sem_060206_anytype_001.ttcn new file mode 100644 index 00000000..1f5853a6 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060206_anytype/Sem_060206_anytype_001.ttcn @@ -0,0 +1,36 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:6.2.0.6, ensure that anytype comprise integer data type + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Sem_060206_anytype_001 { + + + type component GeneralComp { + +var anytype Var1, Var2; +var integer Var3; +} + + +testcase TC_Sem_060206_anytype_001() runs on GeneralComp { + +Var1.integer := 10; +Var2:= {integer := Var1.integer + 3}; +Var3 := Var2.integer * 2; + + if (Var3==26) { + setverdict(pass); + } + else { + setverdict(fail); + } + +} + +control { + execute(TC_Sem_060206_anytype_001()); +} + +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060206_anytype/Sem_060206_anytype_002.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060206_anytype/Sem_060206_anytype_002.ttcn new file mode 100644 index 00000000..9674c76c --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060206_anytype/Sem_060206_anytype_002.ttcn @@ -0,0 +1,34 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:6.2.0.6, ensure that anytype comprise float data type + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Sem_060206_anytype_002 { + type component GeneralComp { + +var anytype Var1, Var2; +var float Var3; + +} + +testcase TC_Sem_060206_anytype_002() runs on GeneralComp { + +Var1.float := 10.5; +Var2:= {float := Var1.float + 3.0}; +Var3 := Var2.float * 2.0; + + if (Var3==27.0) { + setverdict(pass); + } + else { + setverdict(fail); + } + +} + +control { + execute(TC_Sem_060206_anytype_002()); +} + +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060206_anytype/Sem_060206_anytype_003.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060206_anytype/Sem_060206_anytype_003.ttcn new file mode 100644 index 00000000..4d97f510 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060206_anytype/Sem_060206_anytype_003.ttcn @@ -0,0 +1,37 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:6.2.0.6, ensure that anytype comprise boolean data type + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Sem_060206_anytype_003 { + type component GeneralComp { + +var anytype Var1, Var2,Var3; +var boolean Var4, Var5; + +} + +testcase TC_Sem_060206_anytype_003() runs on GeneralComp { + +Var1.boolean := true; +Var2.boolean:=true; +Var3.boolean := not Var1.boolean; // not true = false + +Var4 := Var1.boolean and Var2.boolean; // true and true = true +Var5 := Var1.boolean and Var3.boolean; // true and false = false + + if (match(Var4, true) and match(Var5, false)) { + setverdict(pass); + } + else { + setverdict(fail); + } + +} + +control { + execute(TC_Sem_060206_anytype_003()); +} + +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060206_anytype/Sem_060206_anytype_004.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060206_anytype/Sem_060206_anytype_004.ttcn new file mode 100644 index 00000000..704dadd0 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060206_anytype/Sem_060206_anytype_004.ttcn @@ -0,0 +1,35 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:6.2.0.6, ensure that anytype comprise verdicttype data type + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Sem_060206_anytype_004 { + type component GeneralComp { + +var anytype Var1, Var2; +var verdicttype c; + +} + +testcase TC_Sem_060206_anytype_004() runs on GeneralComp { + +Var1.verdicttype := pass; +Var2.verdicttype:=fail; + +c :=Var1.verdicttype; + + if (match(c, pass) and match(Var2.verdicttype, fail)) { + setverdict(pass); + } + else { + setverdict(fail); + } + +} + +control { + execute(TC_Sem_060206_anytype_004()); +} + +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060206_anytype/Sem_060206_anytype_005.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060206_anytype/Sem_060206_anytype_005.ttcn new file mode 100644 index 00000000..bc17ade3 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060206_anytype/Sem_060206_anytype_005.ttcn @@ -0,0 +1,32 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:6.2.0.6, ensure that anytype comprise bitstring and hexstring data type + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Sem_060206_anytype_005 { + type component GeneralComp { + +var anytype Var1, Var2; +} + +testcase TC_Sem_060206_anytype_005() runs on GeneralComp { + +Var1.bitstring := '1010'B; +Var2.hexstring:='FE80'H; + + + if (match(Var1.bitstring, '1010'B) and match(Var2.hexstring, 'FE80'H)) { + setverdict(pass); + } + else { + setverdict(fail); + } + +} + +control { + execute(TC_Sem_060206_anytype_005()); +} + +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060206_anytype/Sem_060206_anytype_006.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060206_anytype/Sem_060206_anytype_006.ttcn new file mode 100644 index 00000000..357fde8c --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060206_anytype/Sem_060206_anytype_006.ttcn @@ -0,0 +1,37 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:6.2.0.6, ensure that ensure that anytype comprise octetstring and charstring + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Sem_060206_anytype_006 { + + type component GeneralComp { + +var anytype MyVarOne, MyVarTwo; +var octetstring MyVarThree; +var charstring MyString1; +} + +testcase TC_Sem_060206_anytype_006() runs on GeneralComp { + +MyVarOne.octetstring := 'FF70'O; //a float in anytype +MyVarTwo.charstring :="abc"; // a charstring in the same anytype + +MyVarThree:=MyVarOne.octetstring; +MyString1:=MyVarTwo.charstring&"def"; // "abc" & "def" =>"abcdef" + + if ( match(MyVarThree, 'FF70'O) and match(MyString1, "abcdef") ) { + setverdict(pass); + } + else { + setverdict(fail); + } + +} + +control { + execute(TC_Sem_060206_anytype_006()); +} + +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060206_anytype/Sem_060206_anytype_007.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060206_anytype/Sem_060206_anytype_007.ttcn new file mode 100644 index 00000000..2239d8af --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060206_anytype/Sem_060206_anytype_007.ttcn @@ -0,0 +1,34 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:6.2.0.6, ensure that ensure that anytype comprise universal charstring + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Sem_060206_anytype_007{ + + type component GeneralComp { + var anytype MyVarOne; + var universal charstring MyVarThree; + } + +testcase TC_Sem_060206_anytype_007() runs on GeneralComp { + + + MyVarOne.universal charstring := "FF80"; //a universal charstring in anytype + + MyVarThree:=MyVarOne.universal charstring; + + if (MyVarThree=="FF80") { + setverdict(pass); + } + else { + setverdict(fail); + } + +} + +control { + execute(TC_Sem_060206_anytype_007()); +} + +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060206_anytype/Sem_060206_anytype_008.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060206_anytype/Sem_060206_anytype_008.ttcn new file mode 100644 index 00000000..c99a1f48 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060206_anytype/Sem_060206_anytype_008.ttcn @@ -0,0 +1,35 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:6.2.0.6, ensure that anytype is a valid value inside an union + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Sem_060206_anytype_008 { + type component GeneralComp { + var anytype c; +} + +type union R + { + anytype cs1 //Union type R element is an anytype data + } + + +testcase TC_Sem_060206_anytype_008() runs on GeneralComp { + +c.R.cs1.charstring := "abc"; // The element of Uninon R becomes a charstring + + if (c.R.cs1.charstring =="abc") { + setverdict(pass); + } + else { + setverdict(fail); + } + +} + +control { + execute(TC_Sem_060206_anytype_008()); +} + +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060206_anytype/Sem_060206_anytype_009.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060206_anytype/Sem_060206_anytype_009.ttcn new file mode 100644 index 00000000..d8e108a6 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060206_anytype/Sem_060206_anytype_009.ttcn @@ -0,0 +1,45 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:6.2.0.6, ensure that record values can be anytype + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Sem_060206_anytype_009 { + + type record MyRec + { + anytype cs1 //Record type MyRec element is an anytype data + } + + type component GeneralComp { + var MyRec R; + var anytype c,d; +} + + + + +testcase TC_Sem_060206_anytype_009() runs on GeneralComp { + + +R.cs1.charstring:= "abc"; // cs1 in R record is now charstring +c.charstring :=R.cs1.charstring; // anytype c becomes a charstring + +R.cs1.integer:= 15; // cs1 in R record now integer +d.integer := R.cs1.integer; //anytype d becomes integer + + + if ( match(c.charstring, "abc") and match(d.integer, 15)) { + setverdict(pass); + } + else { + setverdict(fail); + } + +} + +control { + execute(TC_Sem_060206_anytype_009()); +} + +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060206_anytype/Sem_060206_anytype_010.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060206_anytype/Sem_060206_anytype_010.ttcn new file mode 100644 index 00000000..933583d1 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060206_anytype/Sem_060206_anytype_010.ttcn @@ -0,0 +1,35 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:6.2.0.6, ensure that anytype can be an enum type + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Sem_060206_anytype_010 { + type component GeneralComp { +} + +type enumerated Myenum +{ +FirstElement, +SecondElement +} + +testcase TC_Sem_060206_anytype_010() runs on GeneralComp { + +var anytype c; +c.Myenum:= FirstElement; // anytype c follows the type Myenum and the value of c should be FirstElement + + if (c.Myenum ==FirstElement) { + setverdict(pass); + } + else { + setverdict(fail); + } + +} + +control { + execute(TC_Sem_060206_anytype_010()); +} + +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060206_anytype/Sem_060206_anytype_011.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060206_anytype/Sem_060206_anytype_011.ttcn new file mode 100644 index 00000000..1f3d7ffc --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060206_anytype/Sem_060206_anytype_011.ttcn @@ -0,0 +1,40 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:6.2.0.6, ensure that anytype can have an set value and set value can be anytype + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Sem_060206_anytype_011 { + type component GeneralComp { +} + +type set MySet +{ +integer First, +charstring Second, +anytype Third //3rd element of this type of set is anytype +} + +testcase TC_Sem_060206_anytype_011() runs on GeneralComp { + +var anytype c; +var MySet S; // Set S from type MySet + +c.MySet.Second := "abc"; // anytype c becomes a charstring +S.Third.float:=15.5; // The 3rd element in set S is now becomes a float with value 15.5 + + + if ( match(c.MySet.Second, "abc") and match(S.Third.float, 15.5)) { + setverdict(pass); + } + else { + setverdict(fail); + } + +} + +control { + execute(TC_Sem_060206_anytype_011()); +} + +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060206_anytype/Sem_060206_anytype_012.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060206_anytype/Sem_060206_anytype_012.ttcn new file mode 100644 index 00000000..9ecbe987 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060206_anytype/Sem_060206_anytype_012.ttcn @@ -0,0 +1,48 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:6.2.0.6, ensure that redeclaration of an anytype value works properly + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Sem_060206_anytype_012 { + +type record R + { + anytype R1 // R Record type contains an anytype element. + }; + +type component GeneralComp { + +var anytype Var_1, Var_2,Var_3; +var R MyRec; + +} + +testcase TC_Sem_060206_anytype_012() runs on GeneralComp { + +Var_1.integer := 10; // Var_1 integer with value of 10 +Var_2.float := 3.0E0; // Var_2 float with value of 3.0 +MyRec.R1.float := 3.5E0; // record MyRec R1 element is now a float with value of 3.5 + +Var_3.float := MyRec.R1.float + Var_2.float; // Var_3 is float type = 3.5 + 3.0 + +// changing types: +Var_1.float := 5.5E0; // Var_1 float with value of 5.5 +Var_2.charstring := "abc"; // Var_2 charstring with value of "abc" +MyRec.R1.charstring := "def"; // record MyRec R1 element is now a charstring with value of "def" + + if (match(Var_1.float, 5.5E0) and match(Var_2.charstring, "abc") and match(Var_3.float, 6.5E0) + and match(MyRec.R1.charstring, "def")) { + setverdict(pass); + } + else { + setverdict(fail); + } + +} + +control { + execute(TC_Sem_060206_anytype_012()); +} + +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060206_anytype/Sem_060206_anytype_013.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060206_anytype/Sem_060206_anytype_013.ttcn new file mode 100644 index 00000000..f9df4f61 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060206_anytype/Sem_060206_anytype_013.ttcn @@ -0,0 +1,37 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:6.2.0.6, ensure that address type is included to anytype (if it has been explicitly defined within that module) + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Sem_060206_anytype_013 { + + +type integer address; // definition of address type globally + + +type component GeneralComp { + + var anytype x; +} + + +testcase TC_Sem_060206_anytype_013() runs on GeneralComp { + +x.address:=10; // anytype x now address type with value integer 10 + + + if (x.address==10) { + setverdict(pass); + } + else { + setverdict(fail); + } + +} + +control { + execute(TC_Sem_060206_anytype_013()); +} + +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060206_anytype/Sem_060206_anytype_014.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060206_anytype/Sem_060206_anytype_014.ttcn new file mode 100644 index 00000000..b3f8c9e2 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060206_anytype/Sem_060206_anytype_014.ttcn @@ -0,0 +1,43 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:6.2.0.6, ensure that anytype can be record type + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Sem_060206_anytype_014 { + +type record MyRec1{ + charstring field1, + boolean field2 }; + + +type component GeneralComp { + + var anytype x; // anytype x variable + + var MyRec1 y := { + field1:= "abc", + field2:= true }; // record y contains field1=abc and field2=true + +} + + +testcase TC_Sem_060206_anytype_014() runs on GeneralComp { + +x.MyRec1 := y; // anytype x now gets the type MyRec1 and the values given by y. + + + if (match(x.MyRec1.field1, "abc") and match(x.MyRec1.field2,true)) { + setverdict(pass); + } + else { + setverdict(fail); + } + +} + +control { + execute(TC_Sem_060206_anytype_014()); +} + +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060206_anytype/Sem_060206_anytype_015.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060206_anytype/Sem_060206_anytype_015.ttcn new file mode 100644 index 00000000..e00f6c58 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060206_anytype/Sem_060206_anytype_015.ttcn @@ -0,0 +1,43 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:6.2.0.6, ensure that anytype can act as a set type + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Sem_060206_anytype_015 { + +type set MySet{ + charstring field1, + boolean field2 }; + + +type component GeneralComp { + + var anytype x; // anytype x variable + + var MySet y := { + field1:= "abc", + field2:= true }; // Set y contains field1=abc and field2=true + +} + + +testcase TC_Sem_060206_anytype_015() runs on GeneralComp { + +x.MySet := y; // anytype x now gets the type MySet and the values given by y. + + + if ( match(x.MySet.field1, "abc") and match(x.MySet.field2, true)) { + setverdict(pass); + } + else { + setverdict(fail); + } + +} + +control { + execute(TC_Sem_060206_anytype_015()); +} + +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060206_anytype/Sem_060206_anytype_016.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060206_anytype/Sem_060206_anytype_016.ttcn new file mode 100644 index 00000000..f67cc62e --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060206_anytype/Sem_060206_anytype_016.ttcn @@ -0,0 +1,45 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:6.2.0.6, ensure that anytype can act as an union + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Sem_060206_anytype_016 { + +type union MyUnion1 { +integer number, +charstring string +}; + + +type component GeneralComp { + + var anytype x; // anytype x variable + var MyUnion1 y; + +} + + +testcase TC_Sem_060206_anytype_0016() runs on GeneralComp { + +y.number:=11; +y.string := "abc"; // Union y contains field1=abc and field2=true + + +x.MyUnion1:= y; // anytype x now gets the type MyUnion1 and the values given by y. + + if (valueof(x.MyUnion1)==valueof(y)) + { + setverdict(pass); + } + else { + setverdict(fail); + } + +} + +control { + execute(TC_Sem_060206_anytype_0016()); +} + +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060206_anytype/Sem_060206_anytype_017.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060206_anytype/Sem_060206_anytype_017.ttcn new file mode 100644 index 00000000..baca72b0 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060206_anytype/Sem_060206_anytype_017.ttcn @@ -0,0 +1,38 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:6.2.0.6, ensure that anytype can comprise array type + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Sem_060206_anytype_017 { + +type integer MyArray[1..3]; // MyArray type is an integer array with 3 elements + + +type component GeneralComp { + + var anytype x; // Anytype x variable + var MyArray y := {1,2,4}; // y array follows type MyArray with values 1,2,4 + +} + + +testcase TC_Sem_060206_anytype_0017() runs on GeneralComp { + +x.MyArray := y; // anytype x now follows type MyArray and gets the values of 1,2,4 as given in array y. + + + if (match(x.MyArray, {1,2,4})) { + setverdict(pass); + } + else { + setverdict(fail); + } + +} + +control { + execute(TC_Sem_060206_anytype_0017()); +} + +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060206_anytype/Sem_060206_anytype_018.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060206_anytype/Sem_060206_anytype_018.ttcn new file mode 100644 index 00000000..1bde4be5 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060206_anytype/Sem_060206_anytype_018.ttcn @@ -0,0 +1,43 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:6.2.0.6, ensure that anytype can comprise set of and record of types + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Sem_060206_anytype_018 { + +type record of integer FirstRecordOf; // record of integers +type set of boolean FirstSetOf; // set of booleans + + +type component GeneralComp { + + var anytype x; // Anytype x and y variables + var anytype y; + + var FirstRecordOf MyVar1 := { 0, 5, 2, -, 6 }; // MyVar1 follows type FirstRecordOf with values 0,5,2,-,6 + var FirstSetOf MyVar2 := { true, -,-, false, true}; // MyVar2 follows type FirstSetOf with values true,-,-,false,true + +} + + +testcase TC_Sem_060206_anytype_0018() runs on GeneralComp { + +x.FirstRecordOf := MyVar1; // anytype x is now a record of type with values of MyVar1 +y.FirstSetOf := MyVar2; // anytype x is now a set of type with values of MyVar2 + + if (match(x.FirstRecordOf[0], 0) and match(x.FirstRecordOf[4], 6) + and match(y.FirstSetOf[0], true) and match(y.FirstSetOf[3], false) ) { + setverdict(pass); + } + else { + setverdict(fail); + } + +} + +control { + execute(TC_Sem_060206_anytype_0018()); +} + +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060206_anytype/Sem_060206_anytype_019.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060206_anytype/Sem_060206_anytype_019.ttcn new file mode 100644 index 00000000..1a350a53 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060206_anytype/Sem_060206_anytype_019.ttcn @@ -0,0 +1,45 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:6.2.0.6, ensure that anytype (as a user defined type) can be imported from another module + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +module Sem_060206_anytype_019 { +import from Sem_060206_anytype_019_import all; // this contains a type (anytype) MyAnyType + +type component GeneralComp { +var MyAnyType x; // MyAnyType is an anytype defined in module Sem_060206_anytype_017_import +var MyAnyType y; +} + + +testcase TC_Sem_060206_anytype_019() runs on GeneralComp { + +x.float := 10.0E0; //anytype x is now a float with value 10.0 +y.bitstring := '1010'B; //anytype y is now a bitstring with value 1010 + + if (match(x.float, 10.0E0) and match(y.bitstring, '1010'B)) { + setverdict(pass); + } + else { + setverdict(fail); + } + +} + +control { + execute(TC_Sem_060206_anytype_019()); +} + +} + + +module Sem_060206_anytype_019_import +{ + + type anytype MyAnyType; + + + +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/NegSem_060207_arrays_001.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/NegSem_060207_arrays_001.ttcn new file mode 100644 index 00000000..96adc6da --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/NegSem_060207_arrays_001.ttcn @@ -0,0 +1,24 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:6.2.7, ensure that the value limitation is correctly handled within array + ** @verdict pass reject + ***************************************************/ +module NegSem_060207_arrays_001 { + + type component GeneralComp { + } + + type integer MyArrayType1[5] (1 .. 10); + +testcase TC_NegSem_060207_arrays_001() runs on GeneralComp { + + var MyArrayType1 v_array1 := { 8, 11, 2, 3, 4}; // syntax error expected, value shall be between 1..10 + +} + +control { + execute(TC_NegSem_060207_arrays_001()); +} + +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/NegSem_060207_arrays_002.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/NegSem_060207_arrays_002.ttcn new file mode 100644 index 00000000..8b8665b4 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/NegSem_060207_arrays_002.ttcn @@ -0,0 +1,24 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:6.2.7, ensure that the inner type referencing is correctly handled + ** @verdict pass reject + ***************************************************/ +module NegSem_060207_arrays_002 { + + type component GeneralComp { + } + + type integer MyArrayType1[5] (1 .. 10); + +testcase TC_NegSem_060207_arrays_002() runs on GeneralComp { + + var MyArrayType1 v_array1 := { 8, 9, 2, 3, 4, 5, 6}; // array is longer than the restricted length + +} + +control { + execute(TC_NegSem_060207_arrays_002()); +} + +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/NegSem_060207_arrays_003.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/NegSem_060207_arrays_003.ttcn new file mode 100644 index 00000000..98426ffe --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/NegSem_060207_arrays_003.ttcn @@ -0,0 +1,31 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:6.2.7, negative index applied to an array on the right hand side of an assignment + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Indexed value notation can be used on both the right-hand side and left-hand +// side of assignments. The index of the first element shall be zero or the lower +// bound if an index range has been given. + +module NegSem_060207_arrays_003 { + + type component GeneralComp { + } + + type integer MyArrayType1[5] (1 .. 10); + + testcase TC_NegSem_060207_arrays_003() runs on GeneralComp { + + var MyArrayType1 v_array1 := { 8, 9, 2, 3, 4}; + var integer i := v_array1[-1]; // error expected + setverdict(pass); + } + + control { + execute(TC_NegSem_060207_arrays_003()); + } + +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/NegSem_060207_arrays_004.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/NegSem_060207_arrays_004.ttcn new file mode 100644 index 00000000..5fb21495 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/NegSem_060207_arrays_004.ttcn @@ -0,0 +1,31 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:6.2.7, negative index applied to an array on the left hand side of an assignment + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Indexed value notation can be used on both the right-hand side and left-hand +// side of assignments. The index of the first element shall be zero or the lower +// bound if an index range has been given. + +module NegSem_060207_arrays_004 { + + type component GeneralComp { + } + + type integer MyArrayType1[5] (1 .. 10); + + testcase TC_NegSem_060207_arrays_004() runs on GeneralComp { + + var MyArrayType1 v_array1 := { 8, 9, 2, 3, 4}; + v_array1[-1] := 10; // error expected + setverdict(pass); + } + + control { + execute(TC_NegSem_060207_arrays_004()); + } + +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/NegSem_060207_arrays_005.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/NegSem_060207_arrays_005.ttcn new file mode 100644 index 00000000..2c702a41 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/NegSem_060207_arrays_005.ttcn @@ -0,0 +1,37 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:6.2.7, wrong index type applied to an array on the right hand side of an assignment + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Indexed value notation can be used on both the right-hand side and left-hand +// side of assignments. The index of the first element shall be zero or the lower +// bound if an index range has been given. +// [from 3.1] index notation: notation to access individual elements of record of, +// set of, array and string values or templates, where the element to be accessed +// is identified explicitly by an index value enclosed in square brackets ("[" and +// "]") which specifies the position of that element within the referenced value +// or template and the index value is either an integer value, array of integers +// or record of integers. + +module NegSem_060207_arrays_005 { + + type component GeneralComp { + } + + type integer MyArrayType1[5] (1 .. 10); + + testcase TC_NegSem_060207_arrays_005() runs on GeneralComp { + + var MyArrayType1 v_array1 := { 8, 9, 2, 3, 4}; + var integer i := v_array1["0"]; // error expected + setverdict(pass); + } + + control { + execute(TC_NegSem_060207_arrays_005()); + } + +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/NegSem_060207_arrays_006.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/NegSem_060207_arrays_006.ttcn new file mode 100644 index 00000000..fb8f57db --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/NegSem_060207_arrays_006.ttcn @@ -0,0 +1,37 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:6.2.7, wrong index type applied to an array on the left hand side of an assignment + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Indexed value notation can be used on both the right-hand side and left-hand +// side of assignments. The index of the first element shall be zero or the lower +// bound if an index range has been given. +// [from 3.1] index notation: notation to access individual elements of record of, +// set of, array and string values or templates, where the element to be accessed +// is identified explicitly by an index value enclosed in square brackets ("[" and +// "]") which specifies the position of that element within the referenced value +// or template and the index value is either an integer value, array of integers +// or record of integers. + +module NegSem_060207_arrays_006 { + + type component GeneralComp { + } + + type integer MyArrayType1[5] (1 .. 10); + + testcase TC_NegSem_060207_arrays_006() runs on GeneralComp { + + var MyArrayType1 v_array1 := { 8, 9, 2, 3, 4}; + v_array1["0"] := 10; // error expected + setverdict(pass); + } + + control { + execute(TC_NegSem_060207_arrays_006()); + } + +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/NegSem_060207_arrays_007.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/NegSem_060207_arrays_007.ttcn new file mode 100644 index 00000000..eac13e71 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/NegSem_060207_arrays_007.ttcn @@ -0,0 +1,30 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:6.2.7, array index greater than the upper bound (left-hand side) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// The index shall not exceed the limitations given by either the length or the +// upper bound of the index. + +module NegSem_060207_arrays_007 { + + type component GeneralComp { + } + + type integer MyArrayType1[5] (1 .. 10); + + testcase TC_NegSem_060207_arrays_007() runs on GeneralComp { + + var MyArrayType1 v_array1 := { 8, 9, 2, 3, 4}; + v_array1[5] := 3; // error expected + setverdict(pass); + } + + control { + execute(TC_NegSem_060207_arrays_007()); + } + +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/NegSem_060207_arrays_008.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/NegSem_060207_arrays_008.ttcn new file mode 100644 index 00000000..14a4da4b --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/NegSem_060207_arrays_008.ttcn @@ -0,0 +1,30 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:6.2.7, wrong index type applied to an array on the right hand side of an assignment + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// The index shall not exceed the limitations given by either the length or the +// upper bound of the index. + +module NegSem_060207_arrays_008 { + + type component GeneralComp { + } + + type integer MyArrayType1[5] (1 .. 10); + + testcase TC_NegSem_060207_arrays_008() runs on GeneralComp { + + var MyArrayType1 v_array1 := { 8, 9, 2, 3, 4}; + var integer i := v_array1[5]; // error expected + setverdict(pass); + } + + control { + execute(TC_NegSem_060207_arrays_008()); + } + +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/NegSem_060207_arrays_009.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/NegSem_060207_arrays_009.ttcn new file mode 100644 index 00000000..a650942c --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/NegSem_060207_arrays_009.ttcn @@ -0,0 +1,32 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:6.2.7, verify than an error is generated when sending a partially initialized array + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Sending an array value with undefined elements shall cause an error. + +module NegSem_060207_arrays_009 { + + type integer MyArrayType1[5] (1 .. 10); + + type port P message { + inout MyArrayType1 + } + + type component GeneralComp { + port P p + } + + testcase TC_NegSem_060207_arrays_009() runs on GeneralComp { + var template MyArrayType1 m_array1 := { 8, 9, -, 3, 4}; + p.send(m_array1); // error expected + setverdict(pass); + } + + control{ + execute(TC_NegSem_060207_arrays_009()); + } +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/NegSem_060207_arrays_010.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/NegSem_060207_arrays_010.ttcn new file mode 100644 index 00000000..5f1daa5b --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/NegSem_060207_arrays_010.ttcn @@ -0,0 +1,35 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:6.2.7, ensure that the value limitation is correctly handled within array + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// The values of array elements shall be compatible with the corresponding +// variable or type declaration. + +module NegSem_060207_arrays_010 { + + type component GeneralComp { + } + + type integer MyArrayType1[5] (1 .. 10); + +testcase TC_NegSem_060207_arrays_010() runs on GeneralComp { + + var MyArrayType1 v_array1 := { + [0] := 8, + [1] := 0,// error expected, value shall be between 1..10 + [2] := 2, + [2] := 3, + [2] := 4 + }; + +} + +control { + execute(TC_NegSem_060207_arrays_010()); +} + +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/NegSem_060207_arrays_011.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/NegSem_060207_arrays_011.ttcn new file mode 100644 index 00000000..72c1e2f4 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/NegSem_060207_arrays_011.ttcn @@ -0,0 +1,36 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:6.2.7, runtime resolved constant in array type declaration + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Array dimensions shall be specified using constant expressions, which shall +// evaluate to a positive integer values. Constants used in the constant +// expressions shall meet with the restrictions in clause 10. + +module NegSem_060207_arrays_011 { + + type component GeneralComp { + } + + function f() return integer { + if (rnd() < 0.5) { return 5; } + else { return 10; } + } + + const integer c_dimension := f(); + type integer Arr[c_dimension]; + + testcase TC_NegSem_060207_arrays_011() runs on GeneralComp { + var Arr v_arr; + v_arr[0] := 1; + setverdict(pass); + } + + control { + execute(TC_NegSem_060207_arrays_011()); + } + +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/NegSem_060207_arrays_012.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/NegSem_060207_arrays_012.ttcn new file mode 100644 index 00000000..c2629456 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/NegSem_060207_arrays_012.ttcn @@ -0,0 +1,35 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:6.2.7, runtime resolved constant in array variable declaration + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Array dimensions shall be specified using constant expressions, which shall +// evaluate to a positive integer values. Constants used in the constant +// expressions shall meet with the restrictions in clause 10. + +module NegSem_060207_arrays_012 { + + type component GeneralComp { + } + + function f() return integer { + if (rnd() < 0.5) { return 5; } + else { return 10; } + } + + const integer c_dimension := f(); + + testcase TC_NegSem_060207_arrays_012() runs on GeneralComp { + var integer v_arr[c_dimension]; + v_arr[0] := 1; + setverdict(pass); + } + + control { + execute(TC_NegSem_060207_arrays_012()); + } + +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/NegSem_060207_arrays_013.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/NegSem_060207_arrays_013.ttcn new file mode 100644 index 00000000..d3c3d28a --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/NegSem_060207_arrays_013.ttcn @@ -0,0 +1,34 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:6.2.7, variable in array variable declaration + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Array dimensions shall be specified using constant expressions, which shall +// evaluate to a positive integer values. Constants used in the constant +// expressions shall meet with the restrictions in clause 10. + +module NegSem_060207_arrays_013 { + + type component GeneralComp { + } + + function f() return integer { + if (rnd() < 0.5) { return 5; } + else { return 10; } + } + + testcase TC_NegSem_060207_arrays_013() runs on GeneralComp { + var integer v_dimension := f(); + var integer v_arr[v_dimension]; + v_arr[0] := 1; + setverdict(pass); + } + + control { + execute(TC_NegSem_060207_arrays_013()); + } + +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/NegSem_060207_arrays_014.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/NegSem_060207_arrays_014.ttcn new file mode 100644 index 00000000..38ab3d10 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/NegSem_060207_arrays_014.ttcn @@ -0,0 +1,35 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:6.2.7, modulepar in array variable declaration + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Array dimensions shall be specified using constant expressions, which shall +// evaluate to a positive integer values. Constants used in the constant +// expressions shall meet with the restrictions in clause 10. + +module NegSem_060207_arrays_014 { + + type component GeneralComp { + } + + function f() return integer { + if (rnd() < 0.5) { return 5; } + else { return 10; } + } + + modulepar integer PX_DIMENSION := 5; + + testcase TC_NegSem_060207_arrays_014() runs on GeneralComp { + var integer v_arr[PX_DIMENSION]; + v_arr[0] := 1; + setverdict(pass); + } + + control { + execute(TC_NegSem_060207_arrays_014()); + } + +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/NegSem_060207_arrays_015.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/NegSem_060207_arrays_015.ttcn new file mode 100644 index 00000000..34ce6065 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/NegSem_060207_arrays_015.ttcn @@ -0,0 +1,27 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:6.2.7, zero dimension array + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Array dimensions shall be specified using constant expressions, which shall +// evaluate to a positive integer values. Constants used in the constant +// expressions shall meet with the restrictions in clause 10. + +module NegSem_060207_arrays_015 { + + type component GeneralComp { + } + + testcase TC_NegSem_060207_arrays_015() runs on GeneralComp { + var integer v_arr[0] := {}; + setverdict(pass); + } + + control { + execute(TC_NegSem_060207_arrays_015()); + } + +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/NegSem_060207_arrays_016.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/NegSem_060207_arrays_016.ttcn new file mode 100644 index 00000000..431e84f3 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/NegSem_060207_arrays_016.ttcn @@ -0,0 +1,27 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:6.2.7, array with negative dimension + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Array dimensions shall be specified using constant expressions, which shall +// evaluate to a positive integer values. Constants used in the constant +// expressions shall meet with the restrictions in clause 10. + +module NegSem_060207_arrays_016 { + + type component GeneralComp { + } + + testcase TC_NegSem_060207_arrays_016() runs on GeneralComp { + var integer v_arr[3][-1]; + setverdict(pass); + } + + control { + execute(TC_NegSem_060207_arrays_016()); + } + +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/NegSem_060207_arrays_017.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/NegSem_060207_arrays_017.ttcn new file mode 100644 index 00000000..eb44e123 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/NegSem_060207_arrays_017.ttcn @@ -0,0 +1,27 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:6.2.7, zero in array dimension (range notation) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Array dimensions shall be specified using constant expressions, which shall +// evaluate to a positive integer values. Constants used in the constant +// expressions shall meet with the restrictions in clause 10. + +module NegSem_060207_arrays_017 { + + type component GeneralComp { + } + + testcase TC_NegSem_060207_arrays_017() runs on GeneralComp { + var integer v_arr[0..2] := { 2, 3, 4 }; + setverdict(pass); + } + + control { + execute(TC_NegSem_060207_arrays_017()); + } + +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/NegSem_060207_arrays_018.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/NegSem_060207_arrays_018.ttcn new file mode 100644 index 00000000..8b03475b --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/NegSem_060207_arrays_018.ttcn @@ -0,0 +1,28 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:6.2.7, negative value in array dimension (range notation) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Array dimensions shall be specified using constant expressions, which shall +// evaluate to a positive integer values. Constants used in the constant +// expressions shall meet with the restrictions in clause 10. + +module NegSem_060207_arrays_018 { + + type component GeneralComp { + } + + testcase TC_NegSem_060207_arrays_018() runs on GeneralComp { + const integer c_lower := 2 - 4; + var integer v_arr[c_lower .. 1]; + setverdict(pass); + } + + control { + execute(TC_NegSem_060207_arrays_018()); + } + +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/NegSem_060207_arrays_019.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/NegSem_060207_arrays_019.ttcn new file mode 100644 index 00000000..b3a97280 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/NegSem_060207_arrays_019.ttcn @@ -0,0 +1,27 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:6.2.7, float instead of integer in array dimension + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Array dimensions shall be specified using constant expressions, which shall +// evaluate to a positive integer values. Constants used in the constant +// expressions shall meet with the restrictions in clause 10. + +module NegSem_060207_arrays_019 { + + type component GeneralComp { + } + + testcase TC_NegSem_060207_arrays_019() runs on GeneralComp { + var integer v_arr[2.0]; + setverdict(pass); + } + + control { + execute(TC_NegSem_060207_arrays_019()); + } + +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/NegSem_060207_arrays_020.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/NegSem_060207_arrays_020.ttcn new file mode 100644 index 00000000..6713cce0 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/NegSem_060207_arrays_020.ttcn @@ -0,0 +1,30 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:6.2.7, integer array with too many items as multidimensional array index + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// An array or record of integer restricted to a single size can be used in the +// index notation as a short-hand for the repeated index notation. + +module NegSem_060207_arrays_020 { + + type component GeneralComp { + } + + testcase TC_NegSem_060207_arrays_020() runs on GeneralComp { + var integer v_rhindexes[3] := { 0, 1, 0 }, v_lhindexes[3] := { 1, 2, 0 } + var integer v_arr[2][3] := { { 1, 2, 3 }, { 4, 5, 6 } }; + // testing both RH and LH side: + v_arr[v_lhindexes] := v_arr[v_rhindexes]; + if (v_arr == { { 1, 2, 3 }, { 4, 5, 2} }) { setverdict(pass); } + else { setverdict(fail); } + } + + control { + execute(TC_NegSem_060207_arrays_020()); + } + +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/NegSem_060207_arrays_021.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/NegSem_060207_arrays_021.ttcn new file mode 100644 index 00000000..4da2e2cc --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/NegSem_060207_arrays_021.ttcn @@ -0,0 +1,32 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:6.2.7, variable-size record of integer as multidimensional array index + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// An array or record of integer restricted to a single size can be used in the +// index notation as a short-hand for the repeated index notation. + +module NegSem_060207_arrays_021 { + + type component GeneralComp { + } + + type record length(1..2) of integer RI; + + testcase TC_NegSem_060207_arrays_021() runs on GeneralComp { + var RI v_rhindexes := { 0, 1 }, v_lhindexes := { 1, 2 } + var integer v_arr[2][3] := { { 1, 2, 3 }, { 4, 5, 6 } }; + // testing both RH and LH side: + v_arr[v_lhindexes] := v_arr[v_rhindexes]; + if (v_arr == { { 1, 2, 3 }, { 4, 5, 2} }) { setverdict(pass); } + else { setverdict(fail); } + } + + control { + execute(TC_NegSem_060207_arrays_021()); + } + +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/NegSem_060207_arrays_022.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/NegSem_060207_arrays_022.ttcn new file mode 100644 index 00000000..572d2cdb --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/NegSem_060207_arrays_022.ttcn @@ -0,0 +1,28 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:6.2.7, using lower than allowed custom array index on the right hand side of assignments + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Indexed value notation can be used on both the right-hand side and left-hand +// side of assignments. The index of the first element shall be zero or the lower +// bound if an index range has been given. + +module NegSem_060207_arrays_022 { + + type component GeneralComp { + } + + testcase TC_NegSem_060207_arrays_022() runs on GeneralComp { + var integer v_arr[2..5] := { 2, 3, 4, 5 }; + var boolean v_bool := v_arr[0] == 0; + setverdict(pass); + } + + control { + execute(TC_NegSem_060207_arrays_022()); + } + +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/NegSem_060207_arrays_023.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/NegSem_060207_arrays_023.ttcn new file mode 100644 index 00000000..877bffde --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/NegSem_060207_arrays_023.ttcn @@ -0,0 +1,28 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:6.2.7, using lower than allowed custom array index on the left hand side of assignments + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Indexed value notation can be used on both the right-hand side and left-hand +// side of assignments. The index of the first element shall be zero or the lower +// bound if an index range has been given. + +module NegSem_060207_arrays_023 { + + type component GeneralComp { + } + + testcase TC_NegSem_060207_arrays_023() runs on GeneralComp { + var integer v_arr[2..5] := { 2, 3, 4, 5 }; + v_arr[0] := 0; + setverdict(pass); + } + + control { + execute(TC_NegSem_060207_arrays_023()); + } + +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/NegSem_060207_arrays_024.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/NegSem_060207_arrays_024.ttcn new file mode 100644 index 00000000..ae97a136 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/NegSem_060207_arrays_024.ttcn @@ -0,0 +1,27 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:6.2.7, using greater than allowed custom array index on the right hand side of assignments + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// The index shall not exceed the limitations given by either the length or the +// upper bound of the index. + +module NegSem_060207_arrays_024 { + + type component GeneralComp { + } + + testcase TC_NegSem_060207_arrays_024() runs on GeneralComp { + var integer v_arr[2..5] := { 2, 3, 4, 5 }; + var boolean v_bool := v_arr[6] == 6; + setverdict(pass); + } + + control { + execute(TC_NegSem_060207_arrays_024()); + } + +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/NegSem_060207_arrays_025.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/NegSem_060207_arrays_025.ttcn new file mode 100644 index 00000000..836eb4e8 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/NegSem_060207_arrays_025.ttcn @@ -0,0 +1,27 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:6.2.7, using greater than allowed custom array index on the left hand side of assignments + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// The index shall not exceed the limitations given by either the length or the +// upper bound of the index. + +module NegSem_060207_arrays_025 { + + type component GeneralComp { + } + + testcase TC_NegSem_060207_arrays_025() runs on GeneralComp { + var integer v_arr[2..5] := { 2, 3, 4, 5 }; + v_arr[6] := 6; + setverdict(pass); + } + + control { + execute(TC_NegSem_060207_arrays_025()); + } + +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/NegSem_060207_arrays_026.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/NegSem_060207_arrays_026.ttcn new file mode 100644 index 00000000..85abd5ff --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/NegSem_060207_arrays_026.ttcn @@ -0,0 +1,35 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:6.2.7, referencing uninitialized array element on the right hand side of assignments + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// : If the value of the element indicated by the index at the right hand of +// an assignment is undefined or if the index notation is applied to an uninitialized +// or omitted array value on the right hand side of an assignment, error shall be +// caused. + +module NegSem_060207_arrays_026 { + + type component GeneralComp { + } + + type record R { + integer field1[3], + boolean field2 + } + + testcase TC_NegSem_060207_arrays_026() runs on GeneralComp { + var integer v_arr[3], v_int; + v_arr[2] := 1; + v_int := v_arr[0]; + setverdict(pass); + } + + control { + execute(TC_NegSem_060207_arrays_026()); + } + +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/NegSem_060207_arrays_027.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/NegSem_060207_arrays_027.ttcn new file mode 100644 index 00000000..a754dd9d --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/NegSem_060207_arrays_027.ttcn @@ -0,0 +1,34 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:6.2.7, referencing element of uninitialized arrays on the right hand side of assignments + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// : If the value of the element indicated by the index at the right hand of +// an assignment is undefined or if the index notation is applied to an uninitialized +// or omitted array value on the right hand side of an assignment, error shall be +// caused. + +module NegSem_060207_arrays_027 { + + type component GeneralComp { + } + + type record R { + integer field1[3], + boolean field2 + } + + testcase TC_NegSem_060207_arrays_027() runs on GeneralComp { + var R v_rec := { -, true } + var integer v_int := v_rec.field1[0]; + setverdict(pass); + } + + control { + execute(TC_NegSem_060207_arrays_027()); + } + +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/NegSem_060207_arrays_028.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/NegSem_060207_arrays_028.ttcn new file mode 100644 index 00000000..57cea112 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/NegSem_060207_arrays_028.ttcn @@ -0,0 +1,34 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:6.2.7, referencing element of omitted arrays on the right hand side of assignments + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// : If the value of the element indicated by the index at the right hand of +// an assignment is undefined or if the index notation is applied to an uninitialized +// or omitted array value on the right hand side of an assignment, error shall be +// caused. + +module NegSem_060207_arrays_028 { + + type component GeneralComp { + } + + type record R { + integer field1[3] optional, + boolean field2 + } + + testcase TC_NegSem_060207_arrays_028() runs on GeneralComp { + var R v_rec := { omit, true } + var integer v_int := v_rec.field1[0]; + setverdict(pass); + } + + control { + execute(TC_NegSem_060207_arrays_028()); + } + +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/NegSyn_060207_arrays_001.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/NegSyn_060207_arrays_001.ttcn new file mode 100644 index 00000000..79ef24ce --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/NegSyn_060207_arrays_001.ttcn @@ -0,0 +1,25 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:6.2.7, ensure that array cannot contain an empty assignment + ** @verdict pass reject + ***************************************************/ + +module NegSyn_060207_arrays_001 { + + type component GeneralComp { + } + + type integer MyArrayType1[5] (1 .. 10); + + testcase TC_NegSyn_060207_arrays_001() runs on GeneralComp { + + var MyArrayType1 v_array1 := { 8, , 2, 3, 4}; // syntax error expected + + } + + control { + execute(TC_NegSyn_060207_arrays_001()); + } + +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/NegSyn_060207_arrays_002.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/NegSyn_060207_arrays_002.ttcn new file mode 100644 index 00000000..f8227f1b --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/NegSyn_060207_arrays_002.ttcn @@ -0,0 +1,25 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:6.2.7, ensure that array field cannot contain an empty index + ** @verdict pass reject + ***************************************************/ +module NegSyn_060207_arrays_002 { + + type component GeneralComp { + } + + + type integer MyArrayType1[5] (1 .. 10); + + testcase TC_NegSyn_060207_arrays_002() runs on GeneralComp { + + var MyArrayType1 v_array1 := { 8, 10, 2, 3, 4}; + v_array1[] := 10; // error expected - missing index + } + + control { + execute(TC_NegSyn_060207_arrays_002()); + } + +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/NegSyn_060207_arrays_003.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/NegSyn_060207_arrays_003.ttcn new file mode 100644 index 00000000..6de123d2 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/NegSyn_060207_arrays_003.ttcn @@ -0,0 +1,26 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:6.2.7, ensure that array field cannot contain an empty index + ** @verdict pass reject + ***************************************************/ +module NegSyn_060207_arrays_002 { + + type component GeneralComp { + } + + + type integer MyArrayType1[5] (1 .. 10); + + + testcase TC_NegSyn_060207_arrays_002() runs on GeneralComp { + + var MyArrayType1 v_array1 := { 8, 10, 2, 3, 4}; + var integer i :=v_array1[];// error expected - missing index + } + + control { + execute(TC_NegSyn_060207_arrays_002()); + } + +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/NegSyn_060207_arrays_004.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/NegSyn_060207_arrays_004.ttcn new file mode 100644 index 00000000..57ba6790 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/NegSyn_060207_arrays_004.ttcn @@ -0,0 +1,21 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:6.2.7, infinity in array variable dimension + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Array dimensions may also be specified using ranges (with inclusive +// boundaries only). In such cases, the lower and upper values of the range +// define the lower and upper index values. Such an array is corresponding to +// a record of with a fixed length restriction computed as the difference +// between upper and lower index bound plus 1 and indexing starting from the +// lower bound of the array definition. + +module NegSyn_060207_arrays_004 { + + control { + var integer v_arr[1..infinity]; + } +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/NegSyn_060207_arrays_005.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/NegSyn_060207_arrays_005.ttcn new file mode 100644 index 00000000..d1c18ec2 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/NegSyn_060207_arrays_005.ttcn @@ -0,0 +1,15 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:6.2.7, Ensur that arrays upper value shall not be lesser than the corresponding lower value + ** @verdict pass reject + ***************************************************/ +/*The following requirement is tested: + * The upper value shall not be lesser than the corresponding lower value. + */ +module NegSyn_060207_arrays_005 { + + control { + var integer v_arr[5..1]; // error: . The upper value shall not be lesser than the corresponding lower value + } +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/Sem_060207_arrays_001.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/Sem_060207_arrays_001.ttcn new file mode 100644 index 00000000..188d487a --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/Sem_060207_arrays_001.ttcn @@ -0,0 +1,35 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:6.2.7, verify that value list notation can be used for an array + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Sem_060207_arrays_001 { + +// The following requirement is tested: +// When the value list notation is used, the first value of the list is assigned to +// the first element of the array (the element with index 0 or the lower bound if +// an index range has been given), the second value to the next element, etc. + + type component GeneralComp { + } + + type integer MyArrayType1[3] (1 .. 10); + +testcase TC_Sem_060207_arrays_001() runs on GeneralComp { + + var MyArrayType1 v_array1 := { 8, 1, 2 }; + if (v_array1[2]==2) { + setverdict(pass); + } + else { + setverdict(fail); + } + +} + +control { + execute(TC_Sem_060207_arrays_001()); +} + +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/Sem_060207_arrays_002.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/Sem_060207_arrays_002.ttcn new file mode 100644 index 00000000..da43c9b8 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/Sem_060207_arrays_002.ttcn @@ -0,0 +1,43 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:6.2.7, verify assignment of explicitly identified elements to arrays + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Values may be assigned individually by a value list notation or indexed notation +// or more than one or all at once by a value list notation or index assignment +// notation. +// Elements to be left out from the assignment shall be explicitly skipped in the +// list by using dash. + +module Sem_060207_arrays_002 { + + type component GeneralComp { + } + + type integer MyArrayType1[3] (1 .. 10); + + testcase TC_Sem_060207_arrays_002() runs on GeneralComp { + + var MyArrayType1 v_array1 := { + [0] := 8, + [1] := 1, + [2] := - + }; + + if (match(v_array1[0], 8) and match(v_array1[1], 1) and not isbound(v_array1[2]) + and lengthof (v_array1 & {2}) == 4) { + setverdict(pass); + } + else { + setverdict(fail); + } + } + + control { + execute(TC_Sem_060207_arrays_002()); + } + +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/Sem_060207_arrays_003.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/Sem_060207_arrays_003.ttcn new file mode 100644 index 00000000..0ded539e --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/Sem_060207_arrays_003.ttcn @@ -0,0 +1,38 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:6.2.7, verify handling of missing elements in assignment notation for arrays + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// For using the assignment notation for arrays, the rules described in 6.2.3 are +// valid for arrays as well. + +module Sem_060207_arrays_003 { + + type component GeneralComp { + } + + type integer MyArrayType1[3] (1 .. 10); + + testcase TC_Sem_060207_arrays_003() runs on GeneralComp { + + var MyArrayType1 v_array1 := { + [1] := 1 + }; + + if (not isbound(v_array1[0]) and match(v_array1[1], 1)) { + setverdict(pass); + } + else { + setverdict(fail); + } + + } + + control { + execute(TC_Sem_060207_arrays_003()); + } + +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/Sem_060207_arrays_004.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/Sem_060207_arrays_004.ttcn new file mode 100644 index 00000000..eb413eb1 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/Sem_060207_arrays_004.ttcn @@ -0,0 +1,42 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:6.2.7, verify handling of missing and ignored elements during an array re-assignment + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Elements to be left out from the assignment shall be explicitly skipped in the +// list by using dash. + +module Sem_060207_arrays_004 { + + type component GeneralComp { + } + + type integer MyArrayType1[3] (1 .. 10); + + testcase TC_Sem_060207_arrays_004() runs on GeneralComp { + + var MyArrayType1 v_array1 := { + [0] := 8, + [1] := -, + [2] := 2 + } + + v_array1[1] := 1; + + if (v_array1 == { 8, 1, 2 }) { + setverdict(pass); + } + else { + setverdict(fail); + } + +} + +control { + execute(TC_Sem_060207_arrays_004()); +} + +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/Sem_060207_arrays_005.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/Sem_060207_arrays_005.ttcn new file mode 100644 index 00000000..8f3021a7 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/Sem_060207_arrays_005.ttcn @@ -0,0 +1,34 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:6.2.7, verify handling of value list assignment used for initialization of arrays + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Elements to be left out from the assignment shall be explicitly skipped in the +// list by using dash. + +module Sem_060207_arrays_005 { + + type component GeneralComp { + } + + type integer MyArrayType1[3] (1 .. 10); + + testcase TC_Sem_060207_arrays_005() runs on GeneralComp { + var MyArrayType1 v_array1 := {8, -, 2} + if (match(v_array1[0], 8) and match(v_array1[2], 2) and not isbound(v_array1[1]) + and lengthof (v_array1 & {2}) == 4) { + setverdict(pass); + } + else { + setverdict(fail); + } + } + + control { + execute(TC_Sem_060207_arrays_005()); + } + +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/Sem_060207_arrays_006.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/Sem_060207_arrays_006.ttcn new file mode 100644 index 00000000..5063f8c2 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/Sem_060207_arrays_006.ttcn @@ -0,0 +1,36 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:6.2.4, verify handling of value list assignment used for update of arrays + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// When the value list notation is used, the first value of the list is assigned to +// the first element of the array (the element with index 0 or the lower bound if +// an index range has been given), the second value to the next element, etc. + +module Sem_060207_arrays_006 { + + type component GeneralComp { + } + + type integer MyArrayType1[3] (1 .. 10); + + testcase TC_Sem_060207_arrays_006() runs on GeneralComp { + + var MyArrayType1 v_array1 := {8, -, 2} + v_array1 := {8, 1, 2}; + if (v_array1 == { 8, 1, 2} ) { + setverdict(pass); + } + else { + setverdict(fail); + } + } + + control { + execute(TC_Sem_060207_arrays_006()); + } + +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/Sem_060207_arrays_007.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/Sem_060207_arrays_007.ttcn new file mode 100644 index 00000000..6fff1a46 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/Sem_060207_arrays_007.ttcn @@ -0,0 +1,36 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:6.2.7, verify handling of index notation applied to array on right-hand side + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Indexed value notation can be used on both the right-hand side and left-hand side +// of assignments. The index of the first element shall be zero or the lower bound +// if an index range has been given. + +module Sem_060207_arrays_007 { + + type component GeneralComp { + } + + type integer MyArrayType1[3] (1 .. 10); + + testcase TC_Sem_060207_arrays_007() runs on GeneralComp { + + var MyArrayType1 v_array1 := {8, 1, 2} + var integer i := v_array1[1]; + if (i == 1 ) { + setverdict(pass); + } + else { + setverdict(fail); + } + } + + control { + execute(TC_Sem_060207_arrays_007()); + } + +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/Sem_060207_arrays_008.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/Sem_060207_arrays_008.ttcn new file mode 100644 index 00000000..e0c89742 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/Sem_060207_arrays_008.ttcn @@ -0,0 +1,35 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:6.2.7, verify handling of index notation applied to array on left-hand side + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// Indexed value notation can be used on both the right-hand side and left-hand side +// of assignments. The index of the first element shall be zero or the lower bound +// if an index range has been given. + +module Sem_060207_arrays_008 { + + type component GeneralComp { + } + + type integer MyArrayType1[3] (1 .. 10); + + testcase TC_Sem_060207_arrays_008() runs on GeneralComp { + + var MyArrayType1 v_array1 := {8, 1, 2} + v_array1[1] := 10; + if (v_array1 == { 8, 10, 2} ) { + setverdict(pass); + } + else { + setverdict(fail); + } + } + + control { + execute(TC_Sem_060207_arrays_008()); + } + +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/Sem_060207_arrays_009.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/Sem_060207_arrays_009.ttcn new file mode 100644 index 00000000..35952ee0 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/Sem_060207_arrays_009.ttcn @@ -0,0 +1,34 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:6.2.3.2, verify the first element of an array is accessible by an index notation + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// The index of the first element shall be zero. +module Sem_060207_arrays_009 { + + type component GeneralComp { + } + + type integer MyArrayType1[3] (1 .. 10); + + testcase TC_Sem_060207_arrays_009() runs on GeneralComp { + + var MyArrayType1 v_array1 := {10, 1, 2}; + v_array1[0] := 10; // first index on the left hand side + v_array1[1] := v_array1[0]; // first index on the right hand side + if (v_array1 == { 10, 10, 2} ) { + setverdict(pass); + } + else { + setverdict(fail); + } + } + + control { + execute(TC_Sem_060207_arrays_009()); + } + +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/Sem_060207_arrays_010.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/Sem_060207_arrays_010.ttcn new file mode 100644 index 00000000..19638447 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/Sem_060207_arrays_010.ttcn @@ -0,0 +1,36 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:6.2.7, verify that arrays can be used to specify record of type and they are compatible + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Arrays can be used in TTCN-3 as a shorthand notation to specify record of types. + +module Sem_060207_arrays_010 { + + type component GeneralComp { + } + + type integer MyArrayType1[3]; + type record length (3) of integer MyRecordOfType1; + + testcase TC_Sem_060207_arrays_010() runs on GeneralComp { + + var MyArrayType1 a1 := {7, 8, 9}; + var MyRecordOfType1 r1 := {7, 8, 9}; + + if (r1 == a1) { + setverdict(pass); + } + else { + setverdict(fail); + } + } + + control { + execute(TC_Sem_060207_arrays_010()); + } + +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/Sem_060207_arrays_011.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/Sem_060207_arrays_011.ttcn new file mode 100644 index 00000000..c06656d7 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/Sem_060207_arrays_011.ttcn @@ -0,0 +1,41 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:6.2.7, index notation applied to omitted array field on left hand side of assignment + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// All elements in an array value that are not set explicitly are undefined. +// When referencing an element of an uninitialized array value or field or +// omitted field on the left hand side of an assignment, the rules for record +// of values specified in 6.2.3 apply. + +module Sem_060207_arrays_011 { + + type component GeneralComp { + } + + type record R { + integer field1[3] optional + } + + testcase TC_Sem_060207_arrays_011() runs on GeneralComp { + + var R v_rec := { field1 := omit }; + v_rec.field1[2] := 3; + + if (not isbound(v_rec.field1[0]) and not isbound(v_rec.field1[1]) and + v_rec.field1[2] == 3) { + setverdict(pass); + } + else { + setverdict(fail); + } + } + + control { + execute(TC_Sem_060207_arrays_011()); + } + +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/Sem_060207_arrays_012.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/Sem_060207_arrays_012.ttcn new file mode 100644 index 00000000..27c2cc10 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/Sem_060207_arrays_012.ttcn @@ -0,0 +1,39 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:6.2.7, referencing element of uninitialized array (left-hand side) + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// All elements in an array value that are not set explicitly are undefined. When +// referencing an element of an uninitialized array value or field or omitted field +// on the left hand side of an assignment, the rules for record of values specified +// in 6.2.3 apply. + +module Sem_060207_arrays_012 { + + type component GeneralComp { + } + + type integer MyArrayType1[3] (1 .. 10); + + testcase TC_Sem_060207_arrays_012() runs on GeneralComp { + + var MyArrayType1 v_array1; + v_array1[2] := 2; // {-, -, 2} + if (not isbound(v_array1[0]) and + not isbound(v_array1[1]) and + match(v_array1[2], 2)) { + setverdict(pass); + } + else { + setverdict(fail); + } + } + + control { + execute(TC_Sem_060207_arrays_012()); + } + +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/Sem_060207_arrays_013.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/Sem_060207_arrays_013.ttcn new file mode 100644 index 00000000..1d036c3a --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/Sem_060207_arrays_013.ttcn @@ -0,0 +1,40 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:6.2.7, ensure that the two dimensional array type referencing is correctly handled + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Sem_060207_arrays_013 { + +// The following requirement is tested: +// Individual elements of multi-dimensional arrays can be accessed by repeated use of +// the index notation. +// For assigning values to multi-dimensional arrays, each dimension that is assigned +// shall resolve to a set of values enclosed in curly braces. + + type component GeneralComp { + } + + + type integer MyArrayType1[2][3] (1 .. 10); + + +testcase TC_Sem_060207_arrays_013() runs on GeneralComp { + + var MyArrayType1 v_array1 := {{8, 10, 9}, + {2, 3, 4}}; + + if (v_array1[1][1]==3) { + setverdict(pass); + } + else { + setverdict(fail); + } + +} + +control { + execute(TC_Sem_060207_arrays_013()); +} + +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/Sem_060207_arrays_014.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/Sem_060207_arrays_014.ttcn new file mode 100644 index 00000000..902bd044 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/Sem_060207_arrays_014.ttcn @@ -0,0 +1,47 @@ +/*************************************************** + ** @author STF 470 (updated by STF 521) + ** @version 0.0.2 + ** @purpose 1:6.2.7, verify assignment of explicitly identified elements to two dimensional array + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// When specifying values for multi-dimensional arrays, the leftmost dimension +// corresponds to the outermost structure of the value, and the rightmost dimension to +// the innermost structure. + +module Sem_060207_arrays_014 { + + type component GeneralComp { + } + + + type integer MyArrayType1[2][3] (1 .. 10); + + +testcase TC_Sem_060207_arrays_014() runs on GeneralComp { + + var MyArrayType1 v_array1; + v_array1[0][0] := 8; + v_array1[0][1] := 10; + v_array1[0][2] := 9; + v_array1[1][0] := 2; + v_array1[1][1] := 3; + //v_array1[1][2] := -; // NOT ALLOWED!!! + + if (match(v_array1[0][0], 8) and match(v_array1[1][0], 2) and not isbound(v_array1[1][2]) + and match(lengthof (v_array1), 2) and match(lengthof (v_array1[0]), 3)) + { + setverdict(pass); + } + else { + setverdict(fail); + } + +} + +control { + execute(TC_Sem_060207_arrays_014()); +} + +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/Sem_060207_arrays_015.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/Sem_060207_arrays_015.ttcn new file mode 100644 index 00000000..6ee7bf07 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/Sem_060207_arrays_015.ttcn @@ -0,0 +1,27 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:6.2.7, constant expression in array dimension + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Array dimensions shall be specified using constant expressions, which shall +// evaluate to a positive integer values. Constants used in the constant +// expressions shall meet with the restrictions in clause 10. + +module Sem_060207_arrays_015 { + + type component GeneralComp { + } + + testcase TC_Sem_060207_arrays_015() runs on GeneralComp { + var integer v_arr[9 - 3 * 2] := { 0, 1, 2 }; + setverdict(pass); + } + + control { + execute(TC_Sem_060207_arrays_015()); + } + +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/Sem_060207_arrays_016.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/Sem_060207_arrays_016.ttcn new file mode 100644 index 00000000..e4c62a61 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/Sem_060207_arrays_016.ttcn @@ -0,0 +1,28 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:6.2.7, predefined function in array dimension + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Array dimensions shall be specified using constant expressions, which shall +// evaluate to a positive integer values. Constants used in the constant +// expressions shall meet with the restrictions in clause 10. + +module Sem_060207_arrays_016 { + + type component GeneralComp { + } + + testcase TC_Sem_060207_arrays_016() runs on GeneralComp { + var integer v_arr[float2int(3.14159265359)] := { 0, 1, 2}; + log(v_arr); + setverdict(pass); + } + + control { + execute(TC_Sem_060207_arrays_016()); + } + +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/Sem_060207_arrays_017.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/Sem_060207_arrays_017.ttcn new file mode 100644 index 00000000..afbaf1c7 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/Sem_060207_arrays_017.ttcn @@ -0,0 +1,30 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:6.2.7, integer array as multidimensional array index + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// An array or record of integer restricted to a single size can be used in the +// index notation as a short-hand for the repeated index notation. + +module Sem_060207_arrays_017 { + + type component GeneralComp { + } + + testcase TC_Sem_060207_arrays_017() runs on GeneralComp { + var integer v_rhindexes[2] := { 0, 1 }, v_lhindexes[2] := { 1, 2 } + var integer v_arr[2][3] := { { 1, 2, 3 }, { 4, 5, 6 } }; + // testing both RH and LH side: + v_arr[v_lhindexes] := v_arr[v_rhindexes]; + if (v_arr == { { 1, 2, 3 }, { 4, 5, 2} }) { setverdict(pass); } + else { setverdict(fail); } + } + + control { + execute(TC_Sem_060207_arrays_017()); + } + +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/Sem_060207_arrays_018.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/Sem_060207_arrays_018.ttcn new file mode 100644 index 00000000..587dee7e --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/Sem_060207_arrays_018.ttcn @@ -0,0 +1,32 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:6.2.7, fixed-size record of integer as multidimensional array index + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// An array or record of integer restricted to a single size can be used in the +// index notation as a short-hand for the repeated index notation. + +module Sem_060207_arrays_018 { + + type component GeneralComp { + } + + type record length(2) of integer RI; + + testcase TC_Sem_060207_arrays_018() runs on GeneralComp { + var RI v_rhindexes := { 0, 1 }, v_lhindexes := { 1, 2 } + var integer v_arr[2][3] := { { 1, 2, 3 }, { 4, 5, 6 } }; + // testing both RH and LH side: + v_arr[v_lhindexes] := v_arr[v_rhindexes]; + if (v_arr == { { 1, 2, 3 }, { 4, 5, 2} }) { setverdict(pass); } + else { setverdict(fail); } + } + + control { + execute(TC_Sem_060207_arrays_018()); + } + +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/Sem_060207_arrays_019.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/Sem_060207_arrays_019.ttcn new file mode 100644 index 00000000..d34986cd --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/Sem_060207_arrays_019.ttcn @@ -0,0 +1,30 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:6.2.7, integer array as multidimensional array index (less items than dimension count) + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// An array or record of integer restricted to a single size can be used in the +// index notation as a short-hand for the repeated index notation. + +module Sem_060207_arrays_019 { + + type component GeneralComp { + } + + testcase TC_Sem_060207_arrays_019() runs on GeneralComp { + var integer v_rhindexes[2] := { 0, 1 }, v_lhindexes[2] := { 1, 0 } + var integer v_arr[2][2][3] := { { { 1, 2, 3 }, { 4, 5, 6 } }, { { 7, 8, 9 }, { 10, 11, 12 } } }; + // testing both RH and LH side: + v_arr[v_lhindexes] := v_arr[v_rhindexes]; + if (v_arr == { { { 1, 2, 3 }, { 4, 5, 6 } }, { { 4, 5, 6 }, { 10, 11, 12 } } }) { setverdict(pass); } + else { setverdict(fail); } + } + + control { + execute(TC_Sem_060207_arrays_019()); + } + +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/Sem_060207_arrays_020.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/Sem_060207_arrays_020.ttcn new file mode 100644 index 00000000..4727ed14 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/Sem_060207_arrays_020.ttcn @@ -0,0 +1,28 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:6.2.7, using custom array index on the right hand side of assignments + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Indexed value notation can be used on both the right-hand side and left-hand +// side of assignments. The index of the first element shall be zero or the lower +// bound if an index range has been given. + +module Sem_060207_arrays_020 { + + type component GeneralComp { + } + + testcase TC_Sem_060207_arrays_020() runs on GeneralComp { + var integer v_arr[2..5] := { 2, 3, 4, 5 }; + if (v_arr[2] == 2) { setverdict(pass); } + else { setverdict(fail); } + } + + control { + execute(TC_Sem_060207_arrays_020()); + } + +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/Sem_060207_arrays_021.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/Sem_060207_arrays_021.ttcn new file mode 100644 index 00000000..0d691d85 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/Sem_060207_arrays_021.ttcn @@ -0,0 +1,29 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:6.2.7, using custom array index on the left hand side of assignments + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Indexed value notation can be used on both the right-hand side and left-hand +// side of assignments. The index of the first element shall be zero or the lower +// bound if an index range has been given. + +module Sem_060207_arrays_021 { + + type component GeneralComp { + } + + testcase TC_Sem_060207_arrays_021() runs on GeneralComp { + var integer v_arr[2..5] := { 2, 3, 4, 5 }; + v_arr[2] := 200; + if (v_arr == { 200, 3, 4, 5 }) { setverdict(pass); } + else { setverdict(fail); } + } + + control { + execute(TC_Sem_060207_arrays_021()); + } + +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/Sem_060207_arrays_022.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/Sem_060207_arrays_022.ttcn new file mode 100644 index 00000000..1610415b --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/Sem_060207_arrays_022.ttcn @@ -0,0 +1,31 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:6.2.7, using less indexes than array dimensions on the right hand side of assignments + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// The use of array slices of multi-dimensional arrays, i.e. when the number of +// indexes of the array value is less than the number of dimensions in the +// corresponding array definition, is allowed. Indexes of array slices shall +// correspond to the dimensions of the array definition from left to right (i.e. +// the first index of the slice corresponds to the first dimension of the definition). +// Slice indexes shall conform to the related array definition dimensions. + +module Sem_060207_arrays_022 { + + type component GeneralComp { + } + + testcase TC_Sem_060207_arrays_022() runs on GeneralComp { + var integer v_arr[2][2][3] := { { { 1, 2, 3 }, { 4, 5, 6 } }, { { 7, 8, 9 }, { 10, 11, 12 } } }; + if (v_arr[0][1] == { 4, 5, 6 }) { setverdict(pass); } + else { setverdict(fail); } + } + + control { + execute(TC_Sem_060207_arrays_022()); + } + +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/Sem_060207_arrays_023.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/Sem_060207_arrays_023.ttcn new file mode 100644 index 00000000..62faa24a --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/Sem_060207_arrays_023.ttcn @@ -0,0 +1,32 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:6.2.7, using less indexes than array dimensions on the left hand side of assignments + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// The use of array slices of multi-dimensional arrays, i.e. when the number of +// indexes of the array value is less than the number of dimensions in the +// corresponding array definition, is allowed. Indexes of array slices shall +// correspond to the dimensions of the array definition from left to right (i.e. +// the first index of the slice corresponds to the first dimension of the definition). +// Slice indexes shall conform to the related array definition dimensions. + +module Sem_060207_arrays_023 { + + type component GeneralComp { + } + + testcase TC_Sem_060207_arrays_023() runs on GeneralComp { + var integer v_arr[2][2][3] := { { { 1, 2, 3 }, { 4, 5, 6 } }, { { 7, 8, 9 }, { 10, 11, 12 } } }; + v_arr[0][1] := { 400, 500, 600 }; + if (v_arr == { { { 1, 2, 3 }, { 400, 500, 600 } }, { { 7, 8, 9 }, { 10, 11, 12 } } }) { setverdict(pass); } + else { setverdict(fail); } + } + + control { + execute(TC_Sem_060207_arrays_023()); + } + +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/Syn_060207_arrays_001.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/Syn_060207_arrays_001.ttcn new file mode 100644 index 00000000..922819a9 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/Syn_060207_arrays_001.ttcn @@ -0,0 +1,20 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:6.2.7, array specified in variable declaration + ** @verdict pass accept, noexecution + ***************************************************/ + +// The following requirement is tested: +// They [arrays] may be specified also at the point of a variable declaration. + +module Syn_060207_arrays_001 { + + const integer c_arr[2] := {0, 1}; + modulepar integer PX_ARR[3]; + + control { + var integer v_arr[5], v_noarr, v_arr2[2]; + } + +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/Syn_060207_arrays_002.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/Syn_060207_arrays_002.ttcn new file mode 100644 index 00000000..c517f231 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/Syn_060207_arrays_002.ttcn @@ -0,0 +1,15 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:6.2.7, multidimensional array type declaration + ** @verdict pass accept, noexecution + ***************************************************/ + +// The following requirement is tested: +// Arrays may be declared as single or multi-dimensional. + +module Syn_060207_arrays_002 { + + type integer MultiArray[3][4][2][5]; + +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/Syn_060207_arrays_003.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/Syn_060207_arrays_003.ttcn new file mode 100644 index 00000000..16e62f0a --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/Syn_060207_arrays_003.ttcn @@ -0,0 +1,20 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:6.2.7, multidimensional array specified in variable declaration + ** @verdict pass accept, noexecution + ***************************************************/ + +// The following requirement is tested: +// Arrays may be declared as single or multi-dimensional. + +module Syn_060207_arrays_003 { + + const integer c_arr[2][3] := { { 0, 1, 2}, {3, 4, 5 }}; + modulepar integer PX_ARR[3][2][6]; + + control { + var integer v_arr[5][3], v_noarr, v_arr2[2][2][10]; + } + +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/Syn_060207_arrays_004.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/Syn_060207_arrays_004.ttcn new file mode 100644 index 00000000..63b4df96 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/Syn_060207_arrays_004.ttcn @@ -0,0 +1,20 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:6.2.7, array type dimension specified as a range + ** @verdict pass accept, noexecution + ***************************************************/ + +// The following requirement is tested: +// Array dimensions may also be specified using ranges (with inclusive +// boundaries only). In such cases, the lower and upper values of the range +// define the lower and upper index values. Such an array is corresponding to +// a record of with a fixed length restriction computed as the difference +// between upper and lower index bound plus 1 and indexing starting from the +// lower bound of the array definition. + +module Syn_060207_arrays_004 { + + type integer Arr[1..5]; + +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/Syn_060207_arrays_005.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/Syn_060207_arrays_005.ttcn new file mode 100644 index 00000000..654d45d2 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/Syn_060207_arrays_005.ttcn @@ -0,0 +1,20 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:6.2.7, multiple array type dimensions specified as a range + ** @verdict pass accept, noexecution + ***************************************************/ + +// The following requirement is tested: +// Array dimensions may also be specified using ranges (with inclusive +// boundaries only). In such cases, the lower and upper values of the range +// define the lower and upper index values. Such an array is corresponding to +// a record of with a fixed length restriction computed as the difference +// between upper and lower index bound plus 1 and indexing starting from the +// lower bound of the array definition. + +module Syn_060207_arrays_005 { + + type integer Arr[1..3][5][6 - 4 .. 2 * 3]; + +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/Syn_060207_arrays_006.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/Syn_060207_arrays_006.ttcn new file mode 100644 index 00000000..a5294fa3 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/Syn_060207_arrays_006.ttcn @@ -0,0 +1,21 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:6.2.7, array variable dimension specified as a range + ** @verdict pass accept, noexecution + ***************************************************/ + +// The following requirement is tested: +// Array dimensions may also be specified using ranges (with inclusive +// boundaries only). In such cases, the lower and upper values of the range +// define the lower and upper index values. Such an array is corresponding to +// a record of with a fixed length restriction computed as the difference +// between upper and lower index bound plus 1 and indexing starting from the +// lower bound of the array definition. + +module Syn_060207_arrays_006 { + + control { + var integer v_arr[1..3]; + } +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/Syn_060207_arrays_007.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/Syn_060207_arrays_007.ttcn new file mode 100644 index 00000000..669eb533 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060207_arrays/Syn_060207_arrays_007.ttcn @@ -0,0 +1,21 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:6.2.7, multiple array variable dimensions specified as a range + ** @verdict pass accept, noexecution + ***************************************************/ + +// The following requirement is tested: +// Array dimensions may also be specified using ranges (with inclusive +// boundaries only). In such cases, the lower and upper values of the range +// define the lower and upper index values. Such an array is corresponding to +// a record of with a fixed length restriction computed as the difference +// between upper and lower index bound plus 1 and indexing starting from the +// lower bound of the array definition. + +module Syn_060207_arrays_007 { + + control { + var integer v_arr[1..3][2][6 - 4 .. 2 * 3]; + } +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060208_default_type/NOTES b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060208_default_type/NOTES new file mode 100644 index 00000000..46d582a3 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060208_default_type/NOTES @@ -0,0 +1,25 @@ +There are no tests for the following rules: + +1. +Default references are used in deactivate operations (see clause 20.5.3) in order to +identify the default to be deactivated. + +Reason: No reason for a dedicated test, tested in 20.5.3. + +2. +Default references have meaning only within the test component instances they are +activated, i.e. a default reference assigned to a default variable in test component +instance "a1" of type "A" has no meaning in test component instance "a2" of type "A". + +Reason: No meaningful test for the rule. The most common way to use defaults is +deactivate operation specified in 20.5.3 which contains a dedicated test related +to this requirement. + +3. +The actual data representation of the default type shall be resolved externally by the +test system. This allows abstract test cases to be specified independently of any real +TTCN-3 runtime environment, in other words TTCN-3 does not restrict the implementation +of a test system with respect to the handling and identification of defaults. + +Reason: This rule is only declaratory and doesn't set any binding requirements which +could be verified. diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060208_default_type/Sem_060208_default_type_001.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060208_default_type/Sem_060208_default_type_001.ttcn new file mode 100644 index 00000000..2b8d1234 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060208_default_type/Sem_060208_default_type_001.ttcn @@ -0,0 +1,32 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:6.2.8, verify than a reference to an activated default can be assigned to a default variable + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Default references are unique references to activated defaults. Such a unique +// default reference is generated by a test component when an altstep is activated +// as a default, i.e. a default reference is the result of an activate operation. + +module Sem_060208_default_type_001 { + + type component GeneralComp { + } + + altstep a() runs on GeneralComp + { + [] any port.receive {} + } + + testcase TC_Sem_060208_default_type_001() runs on GeneralComp { + var default v_default := activate(a()); + if (v_default != null) { setverdict(pass) } + else { setverdict(fail) } + } + + control{ + execute(TC_Sem_060208_default_type_001()); + } +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060208_default_type/Sem_060208_default_type_002.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060208_default_type/Sem_060208_default_type_002.ttcn new file mode 100644 index 00000000..2b2821a1 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060208_default_type/Sem_060208_default_type_002.ttcn @@ -0,0 +1,26 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:6.2.8, verify than null value can be assigned to a default variable + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// The special value null represents an unspecific default reference, e.g. can be +// used for the initialization of variables of default type. + +module Sem_060208_default_type_002 { + + type component GeneralComp { + } + + testcase TC_Sem_060208_default_type_002() runs on GeneralComp { + var default v_default := null; + if (isbound(v_default)) { setverdict(pass) } + else { setverdict(fail) } + } + + control{ + execute(TC_Sem_060208_default_type_002()); + } +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060208_default_type/Sem_060208_default_type_003.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060208_default_type/Sem_060208_default_type_003.ttcn new file mode 100644 index 00000000..31016f2d --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060208_default_type/Sem_060208_default_type_003.ttcn @@ -0,0 +1,32 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:6.2.8, verify than existing default references can be assigned + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Default references have the special and predefined type default. +// + general type compatibility rules + +module Sem_060208_default_type_003 { + + type component GeneralComp { + } + + altstep a() runs on GeneralComp + { + [] any port.receive {} + } + + testcase TC_Sem_060208_default_type_001() runs on GeneralComp { + var default v_default := activate(a()), v_default2; + v_default2 := v_default; + if (v_default == v_default2) { setverdict(pass) } + else { setverdict(fail) } + } + + control{ + execute(TC_Sem_060208_default_type_001()); + } +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060209_comm_port_types/NOTES b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060209_comm_port_types/NOTES new file mode 100644 index 00000000..39ea0e68 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060209_comm_port_types/NOTES @@ -0,0 +1,5 @@ +- NOTE: rules involving message based communications are tested as part of section 22.2 +- NOTE: rules involving procedure based communications are tested as part of section 22.3 +- NOTE: rules for using addresses are tested as a part of the section 6.2.12 +- NOTE: rules for using map parameters are tested as a part of the section 21.1.1 +- NOTE: rules for using unmap parameters are tested as a part of the section 21.1.1 \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060209_comm_port_types/NegSem_060209_CommunicationPortTypes_001.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060209_comm_port_types/NegSem_060209_CommunicationPortTypes_001.ttcn new file mode 100644 index 00000000..2cc2a90d --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060209_comm_port_types/NegSem_060209_CommunicationPortTypes_001.ttcn @@ -0,0 +1,45 @@ +/***************************************************************** + ** @author STF 451 + ** @version 0.0.1 + ** @purpose 1:6.2.9, Ensure that restriction of port definitions are appropriately handles + ** @verdict pass reject + *****************************************************************/ + +module NegSem_060209_CommunicationPortTypes_001 { + + type record MyType1 { + integer f1, + charstring f2 + } + + type record MyType2 { + integer g1, + charstring g2 + } + + type record MyType3 { + boolean h1, + MyType3 h2 optional + } + + type port MyMessagePortTypeOne message { + address MyType1; + address MyType2; //more than one address type + inout integer; + map param (in integer p1, inout MyType2 p2); + unmap param (in MyType3 p1, out integer p2); + } + + type component GeneralComp { + port MyMessagePortTypeOne pt_myPort; + } + + testcase TC_NegSem_060209_CommunicationPortTypes_001() runs on GeneralComp system GeneralComp { + setverdict(fail); + } + + control{ + execute(TC_NegSem_060209_CommunicationPortTypes_001()); + } + +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060209_comm_port_types/NegSem_060209_CommunicationPortTypes_002.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060209_comm_port_types/NegSem_060209_CommunicationPortTypes_002.ttcn new file mode 100644 index 00000000..7c6cccee --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060209_comm_port_types/NegSem_060209_CommunicationPortTypes_002.ttcn @@ -0,0 +1,45 @@ +/***************************************************************** + ** @author STF 451 + ** @version 0.0.1 + ** @purpose 1:6.2.9, Ensure that restriction of port definitions are appropriately handles + ** @verdict pass reject + *****************************************************************/ + +module NegSem_060209_CommunicationPortTypes_002 { + + type record MyType1 { + integer f1, + charstring f2 + } + + type record MyType2 { + integer g1, + charstring g2 + } + + type record MyType3 { + boolean h1, + MyType3 h2 optional + } + + type port MyMessagePortTypeOne message { + address MyType1; + inout integer; + map param (in integer p1, inout MyType2 p2); + map param (in integer p1, out MyType2 p2); //more than one map parameter type + unmap param (in MyType3 p1, out integer p2); + } + + type component GeneralComp { + port MyMessagePortTypeOne pt_myPort; + } + + testcase TC_NegSem_060209_CommunicationPortTypes_002() runs on GeneralComp system GeneralComp { + setverdict(fail); + } + + control{ + execute(TC_NegSem_060209_CommunicationPortTypes_002()); + } + +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060209_comm_port_types/NegSem_060209_CommunicationPortTypes_003.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060209_comm_port_types/NegSem_060209_CommunicationPortTypes_003.ttcn new file mode 100644 index 00000000..3d75af87 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060209_comm_port_types/NegSem_060209_CommunicationPortTypes_003.ttcn @@ -0,0 +1,45 @@ +/***************************************************************** + ** @author STF 451 + ** @version 0.0.1 + ** @purpose 1:6.2.9, Ensure that restriction of port definitions are appropriately handles + ** @verdict pass reject + *****************************************************************/ + +module NegSem_060209_CommunicationPortTypes_003 { + + type record MyType1 { + integer f1, + charstring f2 + } + + type record MyType2 { + integer g1, + charstring g2 + } + + type record MyType3 { + boolean h1, + MyType3 h2 optional + } + + type port MyMessagePortTypeOne message { + address MyType1; + inout integer; + map param (in integer p1, inout MyType2 p2); + unmap param (in MyType3 p1, out integer p2); + unmap param (in MyType3 p1, inout integer p2); //more than one map parameter type + } + + type component GeneralComp { + port MyMessagePortTypeOne pt_myPort; + } + + testcase TC_NegSem_060209_CommunicationPortTypes_003() runs on GeneralComp system GeneralComp { + setverdict(fail); + } + + control{ + execute(TC_NegSem_060209_CommunicationPortTypes_003()); + } + +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060209_comm_port_types/NegSem_060209_CommunicationPortTypes_004.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060209_comm_port_types/NegSem_060209_CommunicationPortTypes_004.ttcn new file mode 100644 index 00000000..674c38dd --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060209_comm_port_types/NegSem_060209_CommunicationPortTypes_004.ttcn @@ -0,0 +1,35 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:6.2.9, Verify that an error is generated when a message port type definition contains no message types + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// Each port type definition shall have one or more lists indicating the allowed collection of +// (message) types ... with the allowed communication direction. + +module NegSem_060209_CommunicationPortTypes_004 { + + type record MyType1 { + integer f1, + charstring f2 + } + + type record MyType2 { + integer g1, + charstring g2 + } + + type record MyType3 { + boolean h1, + MyType3 h2 optional + } + + type port MyMessagePortTypeOne message { + address MyType1; + map param (in integer p1, inout MyType2 p2); + unmap param (in MyType3 p1, out integer p2); + } + +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060209_comm_port_types/NegSem_060209_CommunicationPortTypes_005.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060209_comm_port_types/NegSem_060209_CommunicationPortTypes_005.ttcn new file mode 100644 index 00000000..4eec50c5 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060209_comm_port_types/NegSem_060209_CommunicationPortTypes_005.ttcn @@ -0,0 +1,35 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:6.2.9, Verify that an error is generated when a procedure port type definition contains no signatures + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// Each port type definition shall have one or more lists indicating the allowed collection of +// ... procedure signatures with the allowed communication direction. + +module NegSem_060209_CommunicationPortTypes_005 { + + type record MyType1 { + integer f1, + charstring f2 + } + + type record MyType2 { + integer g1, + charstring g2 + } + + type record MyType3 { + boolean h1, + MyType3 h2 optional + } + + type port MyMessagePortTypeOne procedure { + address MyType1; + map param (in integer p1, inout MyType2 p2); + unmap param (in MyType3 p1, out integer p2); + } + +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060209_comm_port_types/NegSem_060209_CommunicationPortTypes_006.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060209_comm_port_types/NegSem_060209_CommunicationPortTypes_006.ttcn new file mode 100644 index 00000000..60beca4b --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060209_comm_port_types/NegSem_060209_CommunicationPortTypes_006.ttcn @@ -0,0 +1,51 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:6.2.9, Verify that an error is generated when a signature port definition contains multiple address clauses + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// Restriction a: +// At most one address type should be bound to a port type. + +module NegSem_060209_CommunicationPortTypes_006 { + + type record MyType1 { + integer f1, + charstring f2 + } + + type record MyType2 { + integer g1, + charstring g2 + } + + type record MyType3 { + boolean h1, + MyType3 h2 optional + } + + signature S() return integer; + + type port MyMessagePortTypeOne procedure { + address MyType1; + address MyType2; //more than one address type + in S; + map param (in integer p1, inout MyType2 p2); + unmap param (in MyType3 p1, out integer p2); + } + + type component GeneralComp { + port MyMessagePortTypeOne pt_myPort; + } + + testcase TC_NegSem_060209_CommunicationPortTypes_006() runs on GeneralComp system GeneralComp { + setverdict(fail); + } + + control{ + execute(TC_NegSem_060209_CommunicationPortTypes_006()); + } + +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060209_comm_port_types/NegSem_060209_CommunicationPortTypes_007.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060209_comm_port_types/NegSem_060209_CommunicationPortTypes_007.ttcn new file mode 100644 index 00000000..215b6ea7 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060209_comm_port_types/NegSem_060209_CommunicationPortTypes_007.ttcn @@ -0,0 +1,51 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:6.2.9, Verify that an error is generated when a signature port definition contains multiple map clauses + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// Restriction b: +// At most one map parameter list should be defined for a port type. + +module NegSem_060209_CommunicationPortTypes_007 { + + type record MyType1 { + integer f1, + charstring f2 + } + + type record MyType2 { + integer g1, + charstring g2 + } + + type record MyType3 { + boolean h1, + MyType3 h2 optional + } + + signature S() return integer; + + type port MyMessagePortTypeOne procedure { + address MyType1; + in S; + map param (in integer p1, inout MyType2 p2); + unmap param (in MyType3 p1, out integer p2); + map param (in integer p1, inout MyType2 p2); // more than 1 map clause + } + + type component GeneralComp { + port MyMessagePortTypeOne pt_myPort; + } + + testcase TC_NegSem_060209_CommunicationPortTypes_007() runs on GeneralComp system GeneralComp { + setverdict(fail); + } + + control{ + execute(TC_NegSem_060209_CommunicationPortTypes_007()); + } + +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060209_comm_port_types/NegSem_060209_CommunicationPortTypes_008.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060209_comm_port_types/NegSem_060209_CommunicationPortTypes_008.ttcn new file mode 100644 index 00000000..3907a1a1 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060209_comm_port_types/NegSem_060209_CommunicationPortTypes_008.ttcn @@ -0,0 +1,51 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:6.2.9, Verify that an error is generated when a signature port definition contains multiple unmap clauses + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// Restriction c: +// At most one unmap parameter list should be defined for a port type. + +module NegSem_060209_CommunicationPortTypes_008 { + + type record MyType1 { + integer f1, + charstring f2 + } + + type record MyType2 { + integer g1, + charstring g2 + } + + type record MyType3 { + boolean h1, + MyType3 h2 optional + } + + signature S() return integer; + + type port MyMessagePortTypeOne procedure { + unmap param (in MyType3 p1, out integer p2); + address MyType1; + in S; + map param (in integer p1, inout MyType2 p2); + unmap param (in MyType3 p1, out integer p2); // more than 1 unmap clause + } + + type component GeneralComp { + port MyMessagePortTypeOne pt_myPort; + } + + testcase TC_NegSem_060209_CommunicationPortTypes_008() runs on GeneralComp system GeneralComp { + setverdict(fail); + } + + control{ + execute(TC_NegSem_060209_CommunicationPortTypes_008()); + } + +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060209_comm_port_types/Sem_060209_CommunicationPortTypes_004.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060209_comm_port_types/Sem_060209_CommunicationPortTypes_004.ttcn new file mode 100644 index 00000000..1030a17c --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060209_comm_port_types/Sem_060209_CommunicationPortTypes_004.ttcn @@ -0,0 +1,74 @@ +/***************************************************************** + ** @author STF 451 + ** @version 0.0.1 + ** @purpose 1:6.2.9, Ensure that map and unmap param and local port address are allowed in a testcase block + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_060209_CommunicationPortTypes_004 { + + type component GeneralComp { + port MyMessagePortType pt_myPort; + } + + type record MyMessageType1 { + integer field1, + charstring field2, + boolean field3 + } + + type record MyMessageType2 { + integer g1, + charstring g2 + } + + type record MyMessageType3 { + boolean h1, + MyMessageType3 h2 optional + } + + type port MyMessagePortType message { + address MyMessageType1; + inout all; + map param (in integer p1, inout charstring p2); + unmap param (in MyMessageType3 p1, inout MyMessageType2 p2); + } + + const MyMessageType1 c_myTemplate1 := { + field1 := 2, + field2 := "foobar", + field3 := true + } + + const MyMessageType2 c_myTemplate2 := { + g1 := 2, + g2 := "foo" + } + + const MyMessageType3 c_myTemplate3 := { + h1 := false, + h2 := { + h1:= true, + h2 := omit + } + } + + testcase TC_Sem_060209_CommunicationPortTypes_004() runs on GeneralComp system GeneralComp { + var charstring v_varString := "foobar"; + var MyMessageType2 v_myTemplate2 := c_myTemplate2; + + map(mtc:pt_myPort, system:pt_myPort) param(5, v_varString); + + pt_myPort.send(13) to c_myTemplate1; + log("Map inout parameter", v_varString); + + unmap(mtc:pt_myPort, system:pt_myPort) param(c_myTemplate3, v_myTemplate2); + log("Unmap inout parameter", v_myTemplate2); + + setverdict(pass); + } + + control{ + execute(TC_Sem_060209_CommunicationPortTypes_004()); + } +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060209_comm_port_types/Sem_060209_CommunicationPortTypes_005.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060209_comm_port_types/Sem_060209_CommunicationPortTypes_005.ttcn new file mode 100644 index 00000000..d7caebac --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060209_comm_port_types/Sem_060209_CommunicationPortTypes_005.ttcn @@ -0,0 +1,241 @@ +/***************************************************************** + ** @author STF 487 (updated by STF 521) + ** @version 0.0.2 + ** @purpose 1:6.2.9, Ensure that parameter MessageType of the port shall be data type + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +/* The following requirements are tested: + * 6.2.9 Communication port types - Restriction e. MessageType shall be a data type as defined in clause 3.1. + */ + +module Sem_060209_CommunicationPortTypes_005 { + + type component GeneralComp { + port loopbackPort pt_myPort; + } + + type record MyRec{float field1}; + type set MySet{}; + type record of integer MyRoI; + type set of integer MySoI; + type enumerated MyEnumType {a,b,c}; + type union MyUnionType + { + integer number, + charstring string + }; + + type port loopbackPort message { + //allowed MessageTypes given in clause 3.1: + inout integer; + inout float; + inout boolean; + inout verdicttype; + inout bitstring; + inout octetstring; + inout hexstring; + inout charstring; + inout universal charstring; + inout anytype; + inout MyRec; + inout MyRoI; + inout MySet; + inout MySoI; + inout MyEnumType; + inout MyUnionType; + } + + + testcase TC_Sem_060209_CommunicationPortTypes_005() runs on GeneralComp { + + var anytype v_a; + var integer j := 100; + var boolean v_2 := true; + var verdicttype v_3 := pass; + var universal charstring v_4 := "\q{0,0,1,113}"; + var MyRec MyR :={field1 := 1.0}; + var MySet MyS :={}; + var MyRoI RoI := {1,2,3}; + var MySoI SoI := {1,2,3}; + var MyEnumType enu :=a; + var MyUnionType uni :={number:=1}; + v_a.integer :=1; + +//send integer via port + pt_myPort.send(j); + alt { + [] pt_myPort.receive(j) { + setverdict(pass,"Send success, received:", j); + } + [] pt_myPort.receive { + setverdict(fail,"integer sent failed",j); + } + } +//send float via port + pt_myPort.send(int2float(j)); + alt { + [] pt_myPort.receive(int2float(j)) { + setverdict(pass,"Send success,received:", int2float(j)); + } + [] pt_myPort.receive { + setverdict(fail,"float sent failed", int2float(j)); + } + } +//send character via port + pt_myPort.send(int2char(j)); + alt { + [] pt_myPort.receive(int2char(j)) { + setverdict(pass,"Send success,received:", int2char(j)); + } + [] pt_myPort.receive { + setverdict(fail,"character sent failed", int2char(j)); + } + } + //send bitstring via port + pt_myPort.send(int2bit(j,8)); + alt { + [] pt_myPort.receive(int2bit(j,8)) { + setverdict(pass,"Send success,received:", int2bit(j,8)); + } + [] pt_myPort.receive { + setverdict(fail,"bitstring sent failed", int2bit(j,8)); + } + } +//send octetstring via port + pt_myPort.send(int2oct(j,4)); + alt { + [] pt_myPort.receive(int2oct(j,4)) { + setverdict(pass,"Send success,received:", int2oct(j,4)); + } + [] pt_myPort.receive { + setverdict(fail,"octetstring sent failed", int2oct(j,4)); + } + } +//send hexstring via port + pt_myPort.send(int2hex(j,4)); + alt { + [] pt_myPort.receive(int2hex(j,4)) { + setverdict(pass,"Send success,received:",int2hex(j,4)); + } + [] pt_myPort.receive { + setverdict(fail,"octetstring sent failed",int2hex(j,4)); + } + } +//send charstring via port + pt_myPort.send(int2str(j)); + alt { + [] pt_myPort.receive(int2str(j)) { + setverdict(pass,"Send success,received:",int2str(j)); + } + [] pt_myPort.receive { + setverdict(fail,"charstring sent failed",int2str(j)); + } + } +//send boolean via port + pt_myPort.send(v_2); + alt { + [] pt_myPort.receive(v_2) { + setverdict(pass,"Send success,received:",v_2); + } + [] pt_myPort.receive { + setverdict(fail,"charstring sent failed", v_2); + } + } +//send verdicttype via port + pt_myPort.send(v_3); + alt { + [] pt_myPort.receive(v_3) { + setverdict(pass,"Send success,received:",v_3); + } + [] pt_myPort.receive { + setverdict(fail,"verdict type sent failed", v_3); + } + } +//send universal charstring via port + pt_myPort.send(v_4); + alt { + [] pt_myPort.receive(v_4) { + setverdict(pass,"Send success,received:",v_4); + } + [] pt_myPort.receive { + setverdict(fail,"universal charstring sent failed", v_4); + } + } +//send anytype via port + pt_myPort.send(v_a.integer); + alt { + [] pt_myPort.receive(v_a.integer) { + setverdict(pass,"Send success,received:",v_a.integer); + } + [] pt_myPort.receive { + setverdict(fail,"anytype sent failed", v_a.integer); + } + } +//send record via port + pt_myPort.send(MyR); + alt { + [] pt_myPort.receive(MyR) { + setverdict(pass,"Send success,received:",MyR); + } + [] pt_myPort.receive { + setverdict(fail,"Record sent failed", MyR); + } + } +//send set via port + pt_myPort.send(MyS); + alt { + [] pt_myPort.receive(MyS) { + setverdict(pass,"Send success,received:",MyS); + } + [] pt_myPort.receive { + setverdict(fail,"Set sent failed", MyS); + } + } +//send record of integers via port + pt_myPort.send(RoI); + alt { + [] pt_myPort.receive(RoI) { + setverdict(pass,"Send success,received:",RoI); + } + [] pt_myPort.receive { + setverdict(fail,"Record of integers sent failed", RoI); + } + } +//send set of integers via port + pt_myPort.send(SoI); + alt { + [] pt_myPort.receive(SoI) { + setverdict(pass,"Send success,received:",SoI); + } + [] pt_myPort.receive { + setverdict(fail,"Record of integers sent failed", SoI); + } + } +//send enum via port + pt_myPort.send(enu); + alt { + [] pt_myPort.receive(enu) { + setverdict(pass,"Send success,received:",enu); + } + [] pt_myPort.receive { + setverdict(fail,"Enum sent failed", enu); + } + } +//send union via port + pt_myPort.send(uni); + alt { + [] pt_myPort.receive(uni) { + setverdict(pass,"Send success,received:",uni); + } + [] pt_myPort.receive { + setverdict(fail,"Union sent failed", uni); + } + } + + } + + control{ + execute(TC_Sem_060209_CommunicationPortTypes_005()); + } +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060209_comm_port_types/Syn_060209_CommunicationPortTypes_001.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060209_comm_port_types/Syn_060209_CommunicationPortTypes_001.ttcn new file mode 100644 index 00000000..ee91bf75 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060209_comm_port_types/Syn_060209_CommunicationPortTypes_001.ttcn @@ -0,0 +1,27 @@ +/***************************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:6.2.9, Ensure that message-based ports are accepted. + ** @verdict pass accept, noexecution + *****************************************************************/ + +module Syn_060209_CommunicationPortTypes_001 { + + type record MsgType1 { + integer f1, + octetstring f2 + } + + type boolean MsgType2; + + type charstring MsgType3; + + // Message-based port which allows types MsgType1 and MsgType2 to be received at, MsgType3 to be + // sent via and any integer value to be send and received over the port + type port MyMessagePortTypeOne message { + in MsgType1, MsgType2; + out MsgType3; + inout integer + } + +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060209_comm_port_types/Syn_060209_CommunicationPortTypes_002.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060209_comm_port_types/Syn_060209_CommunicationPortTypes_002.ttcn new file mode 100644 index 00000000..3174efa4 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060209_comm_port_types/Syn_060209_CommunicationPortTypes_002.ttcn @@ -0,0 +1,17 @@ +/***************************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:6.2.9, Ensure that message-based ports with address are accepted. + ** @verdict pass accept, noexecution + *****************************************************************/ + +module Syn_060209_CommunicationPortTypes_002 { + + type port MyMessagePortTypeTwo message { + // if addressing is used on ports of type MyMessagePortTypeTwo + // the addresses have to be of type integer + address integer; + inout integer; + } + +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060209_comm_port_types/Syn_060209_CommunicationPortTypes_003.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060209_comm_port_types/Syn_060209_CommunicationPortTypes_003.ttcn new file mode 100644 index 00000000..191ef58d --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060209_comm_port_types/Syn_060209_CommunicationPortTypes_003.ttcn @@ -0,0 +1,25 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:6.2.9, Verify that it is possible to define procedute-based port types + ** @verdict pass accept, noexecution + *****************************************************************/ + +module Syn_060209_CommunicationPortTypes_003 { + + signature S1(); + signature S2(in integer p_par1); + signature S3(in charstring p_par1); + signature S4(in integer p_par1) return bitstring; + signature S5(in charstring p_par1, out charstring p_par2) return boolean; + + // Procedure-based port which allows to accept calls to procedures S1, S2 and S4, call + // procedure S3. S5 calls can be both accepted or dispatched. + type port MyMessagePortTypeOne procedure { + in S1, S2; + out S3; + in S4; + inout S5; + } + +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060209_comm_port_types/Syn_060209_CommunicationPortTypes_004.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060209_comm_port_types/Syn_060209_CommunicationPortTypes_004.ttcn new file mode 100644 index 00000000..2831a10b --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060209_comm_port_types/Syn_060209_CommunicationPortTypes_004.ttcn @@ -0,0 +1,19 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:6.2.9, Ensure that procedure-based ports with address are accepted + ** @verdict pass accept, noexecution + *****************************************************************/ + +module Syn_060209_CommunicationPortTypes_004 { + + signature S1(); + + type port MyMessagePortType procedure { + inout S1; + // if addressing is used on ports of type MyMessagePortType + // the addresses have to be of type integer + address integer; + } + +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060209_comm_port_types/Syn_060209_CommunicationPortTypes_005.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060209_comm_port_types/Syn_060209_CommunicationPortTypes_005.ttcn new file mode 100644 index 00000000..d3367c68 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060209_comm_port_types/Syn_060209_CommunicationPortTypes_005.ttcn @@ -0,0 +1,19 @@ +/***************************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:6.2.9, Ensure that map param is accepted by the port definition. + ** @verdict pass accept, noexecution + *****************************************************************/ + +module Syn_060209_CommunicationPortTypes_005 { + + type record MyType { + integer f1 + } + + type port MyMessagePortTypeOne message { + inout integer; + map param (in MyType p1, out integer p2); + } + +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060209_comm_port_types/Syn_060209_CommunicationPortTypes_006.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060209_comm_port_types/Syn_060209_CommunicationPortTypes_006.ttcn new file mode 100644 index 00000000..10c6a040 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060209_comm_port_types/Syn_060209_CommunicationPortTypes_006.ttcn @@ -0,0 +1,19 @@ +/***************************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:6.2.9, Ensure that unmap param is accepted by the port definition. + ** @verdict pass accept, noexecution + *****************************************************************/ + +module Syn_060209_CommunicationPortTypes_006 { + + type record MyType { + integer f1 + } + + type port MyMessagePortTypeOne message { + inout integer; + unmap param (in MyType p1, out integer p2); + } + +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060209_comm_port_types/Syn_060209_CommunicationPortTypes_007.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060209_comm_port_types/Syn_060209_CommunicationPortTypes_007.ttcn new file mode 100644 index 00000000..d39a49dc --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060209_comm_port_types/Syn_060209_CommunicationPortTypes_007.ttcn @@ -0,0 +1,32 @@ +/***************************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:6.2.9, Ensure that complex port definition are accepted. + ** @verdict pass accept, noexecution + *****************************************************************/ + +module Syn_060209_CommunicationPortTypes_007 { + + type record MyType1 { + integer f1, + charstring f2 + } + + type record MyType2 { + integer g1, + charstring g2 + } + + type record MyType3 { + boolean h1, + MyType3 h2 optional + } + + type port MyMessagePortTypeOne message { + address MyType1; + inout integer, charstring; + map param (in integer p1, inout MyType2 p2); + unmap param (in MyType3 p1, out integer p2); + } + +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060209_comm_port_types/Syn_060209_CommunicationPortTypes_008.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060209_comm_port_types/Syn_060209_CommunicationPortTypes_008.ttcn new file mode 100644 index 00000000..ac6e74ac --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060209_comm_port_types/Syn_060209_CommunicationPortTypes_008.ttcn @@ -0,0 +1,21 @@ +/***************************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:6.2.9, Ensure that procedure-base port type definition can contain map parameter definition + ** @verdict pass accept, noexecution + *****************************************************************/ + +module Syn_060209_CommunicationPortTypes_008 { + + signature S1(); + + type record MyType { + integer f1 + } + + type port MyMessagePortTypeOne procedure { + inout S1; + map param (in MyType p1, out integer p2); + } + +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060209_comm_port_types/Syn_060209_CommunicationPortTypes_009.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060209_comm_port_types/Syn_060209_CommunicationPortTypes_009.ttcn new file mode 100644 index 00000000..49073d7c --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060209_comm_port_types/Syn_060209_CommunicationPortTypes_009.ttcn @@ -0,0 +1,21 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:6.2.9, Ensure that procedure-base port type definition can contain unmap parameter definition + ** @verdict pass accept, noexecution + *****************************************************************/ + +module Syn_060209_CommunicationPortTypes_009 { + + signature S1(); + + type record MyType { + integer f1 + } + + type port MyMessagePortTypeOne procedure { + inout S1; + unmap param (in MyType p1, out integer p2); + } + +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060209_comm_port_types/Syn_060209_CommunicationPortTypes_010.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060209_comm_port_types/Syn_060209_CommunicationPortTypes_010.ttcn new file mode 100644 index 00000000..a576d84a --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060209_comm_port_types/Syn_060209_CommunicationPortTypes_010.ttcn @@ -0,0 +1,36 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:6.2.9, Ensure that complex procedure-based port type definition are accepted + ** @verdict pass accept, noexecution + *****************************************************************/ + +module Syn_060209_CommunicationPortTypes_010 { + + type record MyType1 { + integer f1, + charstring f2 + } + + type record MyType2 { + integer g1, + charstring g2 + } + + type record MyType3 { + boolean h1, + MyType3 h2 optional + } + + signature S1(); + signature S2(in integer p_par1); + signature S3(in charstring p_par1); + + type port MyMessagePortTypeOne procedure { + inout S1, S2, S3; + map param (in integer p1, inout MyType2 p2); + unmap param (in MyType3 p1, out integer p2); + address MyType1; + } + +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060210_component_types/06021002_reuse_component_type/NegSyn_060210_ReuseofComponentTypes_001.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060210_component_types/06021002_reuse_component_type/NegSyn_060210_ReuseofComponentTypes_001.ttcn new file mode 100644 index 00000000..e25e56a2 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060210_component_types/06021002_reuse_component_type/NegSyn_060210_ReuseofComponentTypes_001.ttcn @@ -0,0 +1,42 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:6.2.10, Ensure that cyclic extension is not allowed + ** @verdict pass reject, noexecution + *****************************************************************/ + +/* The following requirements are tested: + * Restriction c.: It is allowed to extend component types that are defined by means of extension, + * as long as no cyclic chain of definition is created. + */ + +module NegSyn_060210_ReuseofComponentTypes_001 { + + type port loopbackPort message { + inout integer; + inout float; + } + + type component MyCompA extends GeneralComp { + port loopbackPort pt_myPortA; + } + + + type component MyCompB extends MyCompA { + var integer MyInt; + } + + + type component GeneralComp extends MyCompB { //error: cyclic extension + port loopbackPort pt_myPortB; + } + + testcase TC_NegSyn_060210_ReuseofComponentTypes_001() runs on GeneralComp { + + pt_myPortB.send(2); + } + + control{ + execute(TC_NegSyn_060210_ReuseofComponentTypes_001()); + } +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060210_component_types/06021002_reuse_component_type/NegSyn_060210_ReuseofComponentTypes_002.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060210_component_types/06021002_reuse_component_type/NegSyn_060210_ReuseofComponentTypes_002.ttcn new file mode 100644 index 00000000..69f6e45f --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060210_component_types/06021002_reuse_component_type/NegSyn_060210_ReuseofComponentTypes_002.ttcn @@ -0,0 +1,44 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:6.2.10, Ensure that extending a component that occurs name clash is not allowed + ** @verdict pass reject, noexecution + *****************************************************************/ + +/* The following requirements are tested: + * Restriction b.: When defining component types by extending more than one parent type, + * there shall be no name clash between the definitions of the different parent types + */ + +module NegSyn_060210_ReuseofComponentTypes_002 { + + type port loopbackPort message { + inout integer; + inout float; + } + + type component MyCompA { + port loopbackPort pt_myPortA; + } + + + type component MyCompB { + var integer MyInt; + } + + + type component GeneralComp extends MyCompA, MyCompB { + port loopbackPort pt_myPortB; + var integer MyInt; //error: name clash + } + + testcase TC_NegSyn_060210_ReuseofComponentTypes_002() runs on GeneralComp { + + pt_myPortA.send(2); + pt_myPortB.send(2.0); + } + + control{ + execute(TC_NegSyn_060210_ReuseofComponentTypes_002()); + } +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060210_component_types/06021002_reuse_component_type/NegSyn_060210_ReuseofComponentTypes_003.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060210_component_types/06021002_reuse_component_type/NegSyn_060210_ReuseofComponentTypes_003.ttcn new file mode 100644 index 00000000..b77a8b4e --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060210_component_types/06021002_reuse_component_type/NegSyn_060210_ReuseofComponentTypes_003.ttcn @@ -0,0 +1,41 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:6.2.10, Ensure that extending a component that occurs name clash is not allowed + ** @verdict pass reject, noexecution + *****************************************************************/ + +/* The following requirements are tested: + * When defining component types by extension, there shall be + * no name clash between the definitions being taken from the parent type + * and the definitions being added in the extended type + */ + +module NegSyn_060210_ReuseofComponentTypes_003 { + + type port loopbackPort message { + inout integer; + inout float; + } + + type component MyCompA { + port loopbackPort pt_myPortA; + var integer MyInt; + } + + + type component GeneralComp extends MyCompA { + port loopbackPort pt_myPortB; + var integer MyInt; //error: name clash from parent type + } + + testcase TC_NegSyn_060210_ReuseofComponentTypes_003() runs on GeneralComp { + + pt_myPortA.send(2); + pt_myPortB.send(2.0); + } + + control{ + execute(TC_NegSyn_060210_ReuseofComponentTypes_003()); + } +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060210_component_types/06021002_reuse_component_type/Sem_060210_ReuseofComponentTypes_001.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060210_component_types/06021002_reuse_component_type/Sem_060210_ReuseofComponentTypes_001.ttcn new file mode 100644 index 00000000..516fcb96 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060210_component_types/06021002_reuse_component_type/Sem_060210_ReuseofComponentTypes_001.ttcn @@ -0,0 +1,50 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:6.2.10, Ensure that extending a component with another component works properly + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +/* The following requirements are tested: + * It is allowed to have one component type extending several parent types in one definition, + * which have to be specified as a comma-separated list of types in the definition. + * Any of the parent types may also be defined by means of extension. + */ + +module Sem_060210_ReuseofComponentTypes_001 { + + //MyComp has a port + type component MyComp { + port loopbackPort pt_myPort; + } + +//Component GeneralComp has a timer and a port extended from MyComp + type component GeneralComp extends MyComp { + timer t; + } + + type port loopbackPort message { + inout integer; + } + + + testcase TC_Sem_060210_ReuseofComponentTypes_001() runs on GeneralComp { + + //Send an integer: + pt_myPort.send(2); + + alt { + [] pt_myPort.receive(2) { + setverdict(pass, "Receive successful"); + } + [] pt_myPort.receive { + setverdict(fail, "Unexpected result"); + } + } + + } + + control{ + execute(TC_Sem_060210_ReuseofComponentTypes_001()); + } +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060210_component_types/06021002_reuse_component_type/Sem_060210_ReuseofComponentTypes_002.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060210_component_types/06021002_reuse_component_type/Sem_060210_ReuseofComponentTypes_002.ttcn new file mode 100644 index 00000000..b3d29bf5 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060210_component_types/06021002_reuse_component_type/Sem_060210_ReuseofComponentTypes_002.ttcn @@ -0,0 +1,86 @@ +/***************************************************************** + ** @author STF 487 (updated by STF 521) + ** @version 0.0.2 + ** @purpose 1:6.2.10, Ensure that extending a component with several other component works properly + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +/* The following requirements are tested: + * When defining component types by extending more than one parent type, + * there shall be no name clash between the definitions of the different parent types, + * i.e. there shall not be a port, variable, constant or timer identifier that is declared + * in any two of the parent types (directly or by means of extension). + */ + +module Sem_060210_ReuseofComponentTypes_002 { + + //MyCompA has a port pt_myPortA + type component MyCompA { + port loopbackPort pt_myPortA; + } + + //MyComp has a port pt_myPortB + type component MyCompB { + port loopbackPort pt_myPortB; + } + +//Component GeneralComp has a timer and inherit two ports from MyCompA and MyCompB + type component GeneralComp extends MyCompA, MyCompB { + timer t; + } + + type port loopbackPort message { + inout integer; + inout float; + } + + function loopback() runs on GeneralComp system GeneralComp { + var integer v_i; + var float v_f; + while (true) { + alt { + [] pt_myPortA.receive(integer:?) -> value v_i { pt_myPortA.send(v_i); } + [] pt_myPortA.receive(float:?) -> value v_f { pt_myPortA.send(v_f); } + [] pt_myPortB.receive(integer:?) -> value v_i { pt_myPortB.send(v_i); } + [] pt_myPortB.receive(float:?) -> value v_f { pt_myPortB.send(v_f); } + } + } + } + + testcase TC_Sem_060210_ReuseofComponentTypes_002() runs on GeneralComp system GeneralComp { + + var GeneralComp v_server := GeneralComp.create; + + connect(mtc:pt_myPortA, v_server:pt_myPortA); + connect(mtc:pt_myPortB, v_server:pt_myPortB); + + v_server.start(loopback()); + + //Send an integer from pt_myPortA: + pt_myPortA.send(2); + alt { + [] pt_myPortA.receive(2) { + setverdict(pass,"Receive successful"); + } + [] pt_myPortA.receive { + setverdict(fail,"Unexpected result"); + } + } + + //Send an integer from pt_myPortB: + pt_myPortB.send(1.0); + alt { + [] pt_myPortB.receive(1.0) { + setverdict(pass,"Receive successful"); + } + [] pt_myPortB.receive { + setverdict(fail,"Unexpected result"); + } + } + + } + + control{ + execute(TC_Sem_060210_ReuseofComponentTypes_002()); + } +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060210_component_types/06021002_reuse_component_type/Sem_060210_ReuseofComponentTypes_003.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060210_component_types/06021002_reuse_component_type/Sem_060210_ReuseofComponentTypes_003.ttcn new file mode 100644 index 00000000..4530a35e --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060210_component_types/06021002_reuse_component_type/Sem_060210_ReuseofComponentTypes_003.ttcn @@ -0,0 +1,90 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:6.2.10, Ensure that extending a component with and extended component works properly + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +/* The following requirements are tested: + * It is allowed to have one component type extending several parent types in one definition, + * which have to be specified as a comma-separated list of types in the definition. + * Any of the parent types may also be defined by means of extension. + */ + +module Sem_060210_ReuseofComponentTypes_003 { + + //MyCompA has a port pt_myPortA + type component MyCompA { + port loopbackPort pt_myPortA; + var integer MyInt; + } + + //MyComp has a port pt_myPortB and inherit a port (pt_myPortA) form MyCompA + type component MyCompB extends MyCompA { + port loopbackPort pt_myPortB; + } + +//Component GeneralComp has a timer and inherit two ports from MyCompB (pt_myPortA and pt_myPortB) + type component GeneralComp extends MyCompB { + timer t; + } + + type port loopbackPort message { + inout integer; + inout float; + } + + + function loopback() runs on GeneralComp { + var integer v_i; + var float v_f; + while (true) { + alt { + [] pt_myPortA.receive(integer:?) -> value v_i { pt_myPortA.send(v_i); } + [] pt_myPortA.receive(float:?) -> value v_f { pt_myPortA.send(v_f); } + [] pt_myPortB.receive(integer:?) -> value v_i { pt_myPortB.send(v_i); } + [] pt_myPortB.receive(float:?) -> value v_f { pt_myPortB.send(v_f); } + } + } + } + + testcase TC_Sem_060210_ReuseofComponentTypes_003() runs on GeneralComp system GeneralComp { + + var GeneralComp v_server := GeneralComp.create; + + connect(mtc:pt_myPortA, v_server:pt_myPortA); + connect(mtc:pt_myPortB, v_server:pt_myPortB); + + v_server.start(loopback()); + + //Set a value to MyInt: + MyInt := 10; + + //Send an integer from pt_myPortA: + pt_myPortA.send(2); + alt { + [] pt_myPortA.receive(2) { + setverdict(pass,"Receive successful"); + } + [] pt_myPortA.receive { + setverdict(fail,"Unexpected result"); + } + } + + //Send an integer from pt_myPortB: + pt_myPortB.send(1.0); + alt { + [] pt_myPortB.receive(1.0) { + setverdict(pass,"Receive successful"); + } + [] pt_myPortB.receive { + setverdict(fail,"Unexpected result"); + } + } + + } + + control{ + execute(TC_Sem_060210_ReuseofComponentTypes_003()); + } +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060212_addressing_entities_inside_sut/NegSem_060212_AddressingEntitiesInsideSut_001.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060212_addressing_entities_inside_sut/NegSem_060212_AddressingEntitiesInsideSut_001.ttcn new file mode 100644 index 00000000..9167b109 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060212_addressing_entities_inside_sut/NegSem_060212_AddressingEntitiesInsideSut_001.ttcn @@ -0,0 +1,37 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:6.2.12, Ensure right type checking for address types in ports + ** @verdict pass reject + ***************************************************/ +module NegSem_060212_AddressingEntitiesInsideSut_001 { + type integer address; + + type port PortType1 message { + address charstring; + inout all; + } + + type port PortType2 message { + inout all; + } + + type component TestCaseComp { + port PortType1 p1; + } + + testcase TC_NegSem_060212_AddressingEntitiesInsideSut_001() runs on TestCaseComp system TestCaseComp { + + var address v_int := 1; + var PortType1.address v_char := "test"; + + // port 1 has charstring address, should not be accepted + p1.send(5) to v_int; + + setverdict(fail); + } + + control { + execute(TC_NegSem_060212_AddressingEntitiesInsideSut_001()); + } +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060212_addressing_entities_inside_sut/NegSem_060212_AddressingEntitiesInsideSut_002.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060212_addressing_entities_inside_sut/NegSem_060212_AddressingEntitiesInsideSut_002.ttcn new file mode 100644 index 00000000..afdf2745 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060212_addressing_entities_inside_sut/NegSem_060212_AddressingEntitiesInsideSut_002.ttcn @@ -0,0 +1,56 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:6.2.12, Ensure that address type cannot be used in a from part of receive operation with connected ports + ** @verdict pass reject + ***************************************************/ + +/* The following requirements are tested: + * Restrictions c) The address data type shall not be used in the to, + * from and sender parts of receive and send operations of connected ports, + * i.e, ports used for the communication among test components.*/ + + +module NegSem_060212_AddressingEntitiesInsideSut_002 { + + type integer MyAddress; + type integer MyMessType; + + type port PortType message { + address MyAddress; + inout MyMessType; + } + + type component TestCaseComp { + port PortType p; + } + + function Sendmessage() runs on TestCaseComp + { + if(p.checkstate("Connected")) { + p.send(MyMessType: 1) to mtc; + } else { + setverdict(fail); + } + } + + + + testcase TC_NegSem_060212_AddressingEntitiesInsideSut_002() runs on TestCaseComp system TestCaseComp { + + var TestCaseComp v_ptcA := TestCaseComp.create alive; + + connect(mtc:p, v_ptcA:p); + + v_ptcA.start(Sendmessage()); + + + p.receive(MyMessType:1) from PortType.address:?; //error: address type is allowed in from part receive operation + + setverdict(pass); + } + + control { + execute(TC_NegSem_060212_AddressingEntitiesInsideSut_002()); + } +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060212_addressing_entities_inside_sut/NegSem_060212_AddressingEntitiesInsideSut_003.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060212_addressing_entities_inside_sut/NegSem_060212_AddressingEntitiesInsideSut_003.ttcn new file mode 100644 index 00000000..85bfaa04 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060212_addressing_entities_inside_sut/NegSem_060212_AddressingEntitiesInsideSut_003.ttcn @@ -0,0 +1,60 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:6.2.12, Ensure that address type cannot be used in a sender part of receive operation with connected ports + ** @verdict pass reject + ***************************************************/ + +/* The following requirements are tested: + * Restrictions c) The address data type shall not be used in the to, + * from and sender parts of receive and send operations of connected ports, + * i.e, ports used for the communication among test components.*/ + + +module NegSem_060212_AddressingEntitiesInsideSut_003 { + + type integer MyAddress; + type integer MyMessType; + type integer address; + + + type port PortType message { + address MyAddress; + inout MyMessType; + } + + type component TestCaseComp { + port PortType p; + } + + function Sendmessage() runs on TestCaseComp + { + if(p.checkstate("Connected")) { + p.send(MyMessType: 1) to mtc; + } else { + setverdict(fail,"Not connected"); + } + } + + + + testcase TC_NegSem_060212_AddressingEntitiesInsideSut_003() runs on TestCaseComp system TestCaseComp { + + var TestCaseComp v_ptcA := TestCaseComp.create alive; + + var address MyAddr := 1; + + connect(mtc:p, v_ptcA:p); + + v_ptcA.start(Sendmessage()); + + + p.receive(MyMessType:1) -> sender MyAddr; //error: address type is allowed in sender part receive operation + + setverdict(pass); + } + + control { + execute(TC_NegSem_060212_AddressingEntitiesInsideSut_003()); + } +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060212_addressing_entities_inside_sut/NegSem_060212_AddressingEntitiesInsideSut_004.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060212_addressing_entities_inside_sut/NegSem_060212_AddressingEntitiesInsideSut_004.ttcn new file mode 100644 index 00000000..46a7cefd --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060212_addressing_entities_inside_sut/NegSem_060212_AddressingEntitiesInsideSut_004.ttcn @@ -0,0 +1,55 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:6.2.12, Ensure that address type cannot be used in a to part of sender operation with connected ports + ** @verdict pass reject + ***************************************************/ + +/* The following requirements are tested: + * Restrictions c) The address data type shall not be used in the to, + * from and sender parts of receive and send operations of connected ports, + * i.e, ports used for the communication among test components.*/ + + +module NegSem_060212_AddressingEntitiesInsideSut_004 { + + type integer MyAddress; + type integer MyMessType; + type integer address; + + + type port PortType message { + address MyAddress; + inout MyMessType; + } + + type component TestCaseComp { + port PortType p1; + port PortType p2; + } + + function CheckConnected() runs on TestCaseComp + { + if(p1.checkstate("Connected")) { + setverdict(pass,"Connected"); + } else { + setverdict(fail,"Not connected"); + } + } + + testcase TC_NegSem_060212_AddressingEntitiesInsideSut_004() runs on TestCaseComp system TestCaseComp { + + var PortType.address MySUTentity := 1; + + + connect(mtc:p1, mtc:p2); + + p1.send(MyMessType: 1) to MySUTentity; //error: address type is allowed in to part send operation + + setverdict(pass); + } + + control { + execute(TC_NegSem_060212_AddressingEntitiesInsideSut_004()); + } +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060212_addressing_entities_inside_sut/Sem_060212_AddressingEntitiesInsideSut_001.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060212_addressing_entities_inside_sut/Sem_060212_AddressingEntitiesInsideSut_001.ttcn new file mode 100644 index 00000000..e855cc6f --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060212_addressing_entities_inside_sut/Sem_060212_AddressingEntitiesInsideSut_001.ttcn @@ -0,0 +1,23 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:6.2.12, Ensure null assignment is accepted for addresses + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Sem_060212_AddressingEntitiesInsideSut_001 { + type integer address; + + type component TestCaseComp { + } + + testcase TC_Sem_060212_AddressingEntitiesInsideSut_001() runs on TestCaseComp system TestCaseComp { + + var address v_int := null; // valid value for an address + + setverdict(pass); + } + + control { + execute(TC_Sem_060212_AddressingEntitiesInsideSut_001()); + } +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060212_addressing_entities_inside_sut/Sem_060212_AddressingEntitiesInsideSut_002.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060212_addressing_entities_inside_sut/Sem_060212_AddressingEntitiesInsideSut_002.ttcn new file mode 100644 index 00000000..92e2b7e8 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060212_addressing_entities_inside_sut/Sem_060212_AddressingEntitiesInsideSut_002.ttcn @@ -0,0 +1,45 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:6.2.12, Ensure that the right port address is used + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Sem_060212_AddressingEntitiesInsideSut_002 { + type integer address; + + type port PortType1 message { + address charstring; + inout all; + } + + type port PortType2 message { + inout all; + } + + type component TestCaseComp { + port PortType1 p1; + port PortType2 p2; + } + + testcase TC_Sem_060212_AddressingEntitiesInsideSut_002() runs on TestCaseComp system TestCaseComp { + + var address v_int := 1; + var PortType1.address v_char := "test"; + + map(mtc:p1, system:p1); + map(mtc:p2, system:p2); + + // port 1 has charstring address + p1.send(5) to v_char; + + // port 2 has integer address + p2.send(5) to v_int; + p2.send(5) to 5; + + setverdict(pass); + } + + control { + execute(TC_Sem_060212_AddressingEntitiesInsideSut_002()); + } +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060213_subtyping_of_structured_types/06021301_length_subtyping/NegSem_06021301_LengthSubtyping_001.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060213_subtyping_of_structured_types/06021301_length_subtyping/NegSem_06021301_LengthSubtyping_001.ttcn new file mode 100644 index 00000000..d0c4be32 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060213_subtyping_of_structured_types/06021301_length_subtyping/NegSem_06021301_LengthSubtyping_001.ttcn @@ -0,0 +1,13 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:6.2.13.1, The length subtyping check for 'record of' or 'set of' types + ** @verdict pass reject + ***************************************************/ +module NegSem_06021301_LengthSubtyping_001 { + type record length(0..10) of integer RecordOfLengthLessThan10; + + type RecordOfLengthLessThan10 RecordOfLength4To5 length(4..5); + type RecordOfLength4To5 RecordOfLength6 length(6); //length out of parent type range + +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060213_subtyping_of_structured_types/06021301_length_subtyping/NegSem_06021301_LengthSubtyping_002.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060213_subtyping_of_structured_types/06021301_length_subtyping/NegSem_06021301_LengthSubtyping_002.ttcn new file mode 100644 index 00000000..67795c5b --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060213_subtyping_of_structured_types/06021301_length_subtyping/NegSem_06021301_LengthSubtyping_002.ttcn @@ -0,0 +1,13 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:6.2.13.1, The length subtyping check for 'record of' or 'set of' types + ** @verdict pass reject + ***************************************************/ +module NegSem_06021301_LengthSubtyping_002 { + type set length(0..10) of integer SetOfLengthLessThan10; + + type SetOfLengthLessThan10 SetOfLength4To5 length(4..5); + type SetOfLength4To5 SetOfLength6 length(6); //length out of parent type range + +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060213_subtyping_of_structured_types/06021301_length_subtyping/NegSem_06021301_LengthSubtyping_003.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060213_subtyping_of_structured_types/06021301_length_subtyping/NegSem_06021301_LengthSubtyping_003.ttcn new file mode 100644 index 00000000..2d9a90ce --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060213_subtyping_of_structured_types/06021301_length_subtyping/NegSem_06021301_LengthSubtyping_003.ttcn @@ -0,0 +1,12 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:6.2.13.1, The length subtyping check for 'record of' or 'set of' types + ** @verdict pass reject + ***************************************************/ +module NegSem_06021301_LengthSubtyping_003 { + type record length(0..!10) of integer RecordOfLengthLessThan10; //only inclusive boundary is allowed + + type RecordOfLengthLessThan10 RecordOfLength4To5 length(4..5); + +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060213_subtyping_of_structured_types/06021301_length_subtyping/NegSem_06021301_LengthSubtyping_004.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060213_subtyping_of_structured_types/06021301_length_subtyping/NegSem_06021301_LengthSubtyping_004.ttcn new file mode 100644 index 00000000..dc383e77 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060213_subtyping_of_structured_types/06021301_length_subtyping/NegSem_06021301_LengthSubtyping_004.ttcn @@ -0,0 +1,12 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:6.2.13.1, The length subtyping check for 'record of' or 'set of' types + ** @verdict pass reject + ***************************************************/ +module NegSem_06021301_LengthSubtyping_004 { + type set length(0..10) of integer SetOfLengthLessThan10; + + type SetOfLengthLessThan10 SetOfLength5 length(!4..5); //only inclusive boundary is allowed + +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060213_subtyping_of_structured_types/06021301_length_subtyping/NegSem_06021301_LengthSubtyping_005.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060213_subtyping_of_structured_types/06021301_length_subtyping/NegSem_06021301_LengthSubtyping_005.ttcn new file mode 100644 index 00000000..8800b23c --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060213_subtyping_of_structured_types/06021301_length_subtyping/NegSem_06021301_LengthSubtyping_005.ttcn @@ -0,0 +1,15 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:6.2.13.1, The length subtyping check for 'record of' or 'set of' types + ** @verdict pass reject + ***************************************************/ +/*The following requirement is tested: + * In case of the range syntax the upper bound shall not be lesser than the lower bound value. + */ +module NegSem_06021301_LengthSubtyping_005 { + type set length(0..10) of integer SetOfLengthLessThan10; + + type SetOfLengthLessThan10 SetOfLength5 length(5..2); //Error: In case of the range syntax the upper bound shall not be lesser than the lower bound value. + +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060213_subtyping_of_structured_types/06021301_length_subtyping/NegSem_06021301_LengthSubtyping_006.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060213_subtyping_of_structured_types/06021301_length_subtyping/NegSem_06021301_LengthSubtyping_006.ttcn new file mode 100644 index 00000000..72743574 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060213_subtyping_of_structured_types/06021301_length_subtyping/NegSem_06021301_LengthSubtyping_006.ttcn @@ -0,0 +1,17 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:6.2.13.1, The length subtyping check for 'record of' or 'set of' types + ** @verdict pass reject + ***************************************************/ + +/*The following requirement is tested: + * In case of the range syntax the upper bound shall not be lesser than the lower bound value. +*/ + +module NegSem_06021301_LengthSubtyping_006 { + type record length(0..10) of integer RecordOfLengthLessThan10; + + type RecordOfLengthLessThan10 RecordOfLengthLessThan5 length(5..2); //Error: In case of the range syntax the upper bound shall not be lesser than the lower bound value. + +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060213_subtyping_of_structured_types/06021301_length_subtyping/Syn_06021301_LengthSubtyping_001.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060213_subtyping_of_structured_types/06021301_length_subtyping/Syn_06021301_LengthSubtyping_001.ttcn new file mode 100644 index 00000000..605dda68 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060213_subtyping_of_structured_types/06021301_length_subtyping/Syn_06021301_LengthSubtyping_001.ttcn @@ -0,0 +1,14 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:6.2.13.1, The length subtyping check for 'record of' or 'set of' types + ** @verdict pass accept, noexecution + ***************************************************/ +module Syn_06021301_LengthSubtyping_001 { + type record length(10) of integer RecordOfLength10; //direct subtyping + type record length(0..10) of integer RecordOfLengthLessThan10; //direct subtyping + + type RecordOfLengthLessThan10 RecordOfLength6 length(6); //referenced subtyping + type RecordOfLengthLessThan10 RecordOfLength4To5 length(4..5); //referenced subtyping + +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060213_subtyping_of_structured_types/06021301_length_subtyping/Syn_06021301_LengthSubtyping_002.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060213_subtyping_of_structured_types/06021301_length_subtyping/Syn_06021301_LengthSubtyping_002.ttcn new file mode 100644 index 00000000..67271c18 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060213_subtyping_of_structured_types/06021301_length_subtyping/Syn_06021301_LengthSubtyping_002.ttcn @@ -0,0 +1,14 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:6.2.13.1, The length subtyping check for 'record of' or 'set of' types + ** @verdict pass accept, noexecution + ***************************************************/ +module Syn_06021301_LengthSubtyping_002 { + type set length(10) of integer SetOfLength10; //direct subtyping + type set length(0..10) of integer SetOfLengthLessThan10; //direct subtyping + + type SetOfLengthLessThan10 SetOfLength6 length(6); //referenced subtyping + type SetOfLengthLessThan10 SetOfLength4To5 length(4..5); //referenced subtyping + +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060213_subtyping_of_structured_types/06021302_list_subtyping/NegSem_06021302_ListSubtyping_001.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060213_subtyping_of_structured_types/06021302_list_subtyping/NegSem_06021302_ListSubtyping_001.ttcn new file mode 100644 index 00000000..3f01bd4d --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060213_subtyping_of_structured_types/06021302_list_subtyping/NegSem_06021302_ListSubtyping_001.ttcn @@ -0,0 +1,24 @@ +/*************************************************** + ** @author STF 451 + ** @version 0.0.1 + ** @purpose 1:6.2.13.2, ensure that list subtyping check for record types is properly handled + ** @verdict pass reject + ***************************************************/ +module NegSem_06021302_ListSubtyping_001 { + type record MyRecord { + integer f1 optional, + charstring f2, + charstring f3 + } + + type MyRecord MyRecordSub1 ( + { f1 := omit, f2 := "user", f3 := "password" }, + { f1 := 1, f2 := "User", f3 := "Password" } + ); // a valid subtype of MyRecord containing 2 values + + type MyRecordSub1 MyRecordSub2 ( + { f1 := 1, f2 := "user", f3 := "password" }, + { f1 := 1, f2 := "User", f3 := "Password" } + ); //invalid subtype, the omitted element cannot be overwritten + +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060213_subtyping_of_structured_types/06021302_list_subtyping/NegSem_06021302_ListSubtyping_002.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060213_subtyping_of_structured_types/06021302_list_subtyping/NegSem_06021302_ListSubtyping_002.ttcn new file mode 100644 index 00000000..b157f751 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060213_subtyping_of_structured_types/06021302_list_subtyping/NegSem_06021302_ListSubtyping_002.ttcn @@ -0,0 +1,24 @@ +/*************************************************** + ** @author STF 451 + ** @version 0.0.1 + ** @purpose 1:6.2.13.2, ensure that list subtyping check for record types is properly handled + ** @verdict pass reject + ***************************************************/ +module NegSem_06021302_ListSubtyping_002 { + type record MyRecord { + integer f1 optional, + charstring f2, + charstring f3 + } + + type MyRecord MyRecordSub1 ( + { f2 := "user", f3 := "password" }, + { f2 := "User", f3 := "Password" } + ); // a valid subtype of MyRecord containing 2 values + + type MyRecordSub1 MyRecordSub2 ( + { f1 := 1, f2 := "user", f3 := "password" }, + { f1 := 2, f2 := "user", f3 := "Password" } + ); //invalid subtype, contains wrong combination of f2 and f3 + +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060213_subtyping_of_structured_types/06021302_list_subtyping/Sem_06021302_ListSubtyping_001.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060213_subtyping_of_structured_types/06021302_list_subtyping/Sem_06021302_ListSubtyping_001.ttcn new file mode 100644 index 00000000..1ec7567c --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060213_subtyping_of_structured_types/06021302_list_subtyping/Sem_06021302_ListSubtyping_001.ttcn @@ -0,0 +1,40 @@ +/*************************************************** + ** @author STF 451 + ** @version 0.0.1 + ** @purpose 1:6.2.13.2, ensure that list subtyping check for record types is properly handled + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Sem_06021302_ListSubtyping_001 { + + type component GeneralComp { + } + + type record MyRecord { + integer f1 optional, + charstring f2, + charstring f3 + } + + type MyRecord MyRecordSub1 ( + { f1 := omit, f2 := "user", f3 := "password" }, + { f1 := 1, f2 := "User", f3 := "Password" } + ); // a valid subtype of MyRecord containing 2 values + + +testcase TC_Sem_06021302_ListSubtyping_001() runs on GeneralComp { + var MyRecordSub1 v_record := { f1 := 1, f2 := "User", f3 := "Password" }; + + if ( match(v_record,{ 1, "User", "Password" }) ) { + setverdict(pass); + } + else { + setverdict(fail); + } + +} + +control { + execute(TC_Sem_06021302_ListSubtyping_001()); +} + +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060213_subtyping_of_structured_types/06021302_list_subtyping/Sem_06021302_ListSubtyping_002.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060213_subtyping_of_structured_types/06021302_list_subtyping/Sem_06021302_ListSubtyping_002.ttcn new file mode 100644 index 00000000..5b735263 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060213_subtyping_of_structured_types/06021302_list_subtyping/Sem_06021302_ListSubtyping_002.ttcn @@ -0,0 +1,40 @@ +/*************************************************** + ** @author STF 451 + ** @version 0.0.1 + ** @purpose 1:6.2.13.2, ensure that list subtyping check for record types is properly handled + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Sem_06021302_ListSubtyping_002 { + + type component GeneralComp { + } + + type record MyRecord { + integer f1 optional, + charstring f2, + charstring f3 + } + + type MyRecord MyRecordSub1 ( + { f1 := *, f2 := "user", f3 := "password" }, + { f1 := *, f2 := "User", f3 := "Password" } + ); // a valid subtype, f1 may contain any values + + +testcase TC_Sem_06021302_ListSubtyping_002() runs on GeneralComp { + var MyRecordSub1 v_record := { f1 := 8, f2 := "User", f3 := "Password" }; + + if ( match(v_record,{ 8, "User", "Password" }) ) { + setverdict(pass); + } + else { + setverdict(fail); + } + +} + +control { + execute(TC_Sem_06021302_ListSubtyping_002()); +} + +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060213_subtyping_of_structured_types/06021302_list_subtyping/Sem_06021302_ListSubtyping_003.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060213_subtyping_of_structured_types/06021302_list_subtyping/Sem_06021302_ListSubtyping_003.ttcn new file mode 100644 index 00000000..2d89956f --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060213_subtyping_of_structured_types/06021302_list_subtyping/Sem_06021302_ListSubtyping_003.ttcn @@ -0,0 +1,41 @@ +/*************************************************** + ** @author STF 451 + ** @version 0.0.1 + ** @purpose 1:6.2.13.2, ensure that list subtyping check for record types is properly handled + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Sem_06021302_ListSubtyping_003 { + + type component GeneralComp { + } + + type record MyRecord { + integer f1 optional, + charstring f2, + charstring f3 + } + + type MyRecord MyRecordSub1 ( + { f1 := *, f2 := "user", f3 := pattern "password|Password" }, + { f1 := (1 .. 10), f2 := "User", f3 := ? } + ); // a valid subtype + + +testcase TC_Sem_06021302_ListSubtyping_003() runs on GeneralComp { + var MyRecordSub1 v_record := { f1 := omit, f2 := "user", f3 := "Password" }; + var template MyRecordSub1 m_match := { *, "user", "Password" }; + + if ( match(v_record,m_match) ) { + setverdict(pass); + } + else { + setverdict(fail); + } + +} + +control { + execute(TC_Sem_06021302_ListSubtyping_003()); +} + +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/0602_toplevel/NegSem_0602_TopLevel_001.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/0602_toplevel/NegSem_0602_TopLevel_001.ttcn new file mode 100644 index 00000000..0c9f9371 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/0602_toplevel/NegSem_0602_TopLevel_001.ttcn @@ -0,0 +1,27 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:6.2, Ensure that value list notation can not be used for a union type. + ** @verdict pass reject + ***************************************************/ +module NegSem_0602_TopLevel_001 { + + type component GeneralComp { + } + + type union MyUnion { + integer field1, + charstring field2, + float field3 + } + + testcase TC_NegSem_0602_TopLevel_001() runs on GeneralComp { + + var MyUnion v_myUnion := {5}; //value list notation can not be used for a union type + + } + + control { + execute(TC_NegSem_0602_TopLevel_001()); + } +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/0602_toplevel/NegSem_0602_TopLevel_002.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/0602_toplevel/NegSem_0602_TopLevel_002.ttcn new file mode 100644 index 00000000..e083f216 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/0602_toplevel/NegSem_0602_TopLevel_002.ttcn @@ -0,0 +1,34 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:6.2, Ensure that indexed notation can not be used for a record type. + ** @verdict pass reject + ***************************************************/ +module NegSem_0602_TopLevel_002 { + + type component GeneralComp { + } + + type record MyRecord { + integer field1, + charstring field2, + float field3 + } + + testcase TC_NegSem_0602_TopLevel_002() runs on GeneralComp { + + var MyRecord v_myRecord := { + field1 := 5, + field2 := "hi", + field3 := 3.14 + }; + + var integer Integer1 :=3; + v_myRecord[0] := Integer1;//not possible to use index notation on a record type + + } + + control { + execute(TC_NegSem_0602_TopLevel_002()); + } +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/0602_toplevel/NegSem_0602_TopLevel_003.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/0602_toplevel/NegSem_0602_TopLevel_003.ttcn new file mode 100644 index 00000000..efccf887 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/0602_toplevel/NegSem_0602_TopLevel_003.ttcn @@ -0,0 +1,34 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:6.2, Ensure that indexed notation can not be used for a set type. + ** @verdict pass reject + ***************************************************/ +module NegSem_0602_TopLevel_003 { + + type component GeneralComp { + } + + type set MySet { + integer field1, + charstring field2, + float field3 + } + + testcase TC_NegSem_0602_TopLevel_003() runs on GeneralComp { + + var MySet v_mySet := { + field1 := 5, + field2 := "hi", + field3 := 3.14 + }; + + var integer Integer1 :=3; + v_mySet[0] := Integer1;//not possible to use index notation on a set type + + } + + control { + execute(TC_NegSem_0602_TopLevel_003()); + } +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/0602_toplevel/NegSem_0602_TopLevel_004.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/0602_toplevel/NegSem_0602_TopLevel_004.ttcn new file mode 100644 index 00000000..9efddf59 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/0602_toplevel/NegSem_0602_TopLevel_004.ttcn @@ -0,0 +1,32 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:6.2, Ensure that indexed notation can not be used for a union type. + ** @verdict pass reject + ***************************************************/ +module NegSem_0602_TopLevel_004 { + + type component GeneralComp { + } + + type union MyUnion { + integer field1, + charstring field2, + float field3 + } + + testcase TC_NegSem_0602_TopLevel_004() runs on GeneralComp { + + var MyUnion v_myUnion := { + field1 := 5 + }; + + var integer Integer1 :=3; + v_myUnion[0] := Integer1;//not possible to use index notation on a union type + + } + + control { + execute(TC_NegSem_0602_TopLevel_004()); + } +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/0602_toplevel/NegSyn_0602_TopLevel_001.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/0602_toplevel/NegSyn_0602_TopLevel_001.ttcn new file mode 100644 index 00000000..4eafc585 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/0602_toplevel/NegSyn_0602_TopLevel_001.ttcn @@ -0,0 +1,13 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:6.2, Invalid recursive union type definition causing an error + ** @verdict pass reject + ***************************************************/ +module NegSyn_0602_TopLevel_001 { + // In case of union types, to avoid infinite recursion, at least one of the alternatives shall not reference its own type. + type union MyUnion { + MyUnion choice1, + MyUnion choice2 + } +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/0602_toplevel/NegSyn_0602_TopLevel_002.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/0602_toplevel/NegSyn_0602_TopLevel_002.ttcn new file mode 100644 index 00000000..9b6d867d --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/0602_toplevel/NegSyn_0602_TopLevel_002.ttcn @@ -0,0 +1,14 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:6.2, Invalid recursive record type definition causing an error + ** @verdict pass reject + ***************************************************/ +module NegSyn_0602_TopLevel_002 { + // In case of record and set types, to avoid infinite recursion, fields referencing to its own type, shall be optional. + type record MyRecord { + integer field1, + MyRecord field2, + integer field3 + } +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/0602_toplevel/NegSyn_0602_TopLevel_003.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/0602_toplevel/NegSyn_0602_TopLevel_003.ttcn new file mode 100644 index 00000000..14bbeafe --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/0602_toplevel/NegSyn_0602_TopLevel_003.ttcn @@ -0,0 +1,18 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:6.2, Combined value list and assignment notation not allowed in the same (immediate) context. + ** @verdict pass reject + ***************************************************/ +module NegSyn_0602_TopLevel_003 { + type record MyRecord { + integer field1, + charstring field2 optional, + float field3 + } + const MyRecord c_rec := { + field1 := 5, + "hi", // combined value list and assignment notation not allowed in the same (immediate) context. + field3 := 3.14 + }; +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/0602_toplevel/NegSyn_0602_TopLevel_004.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/0602_toplevel/NegSyn_0602_TopLevel_004.ttcn new file mode 100644 index 00000000..3eab198d --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/0602_toplevel/NegSyn_0602_TopLevel_004.ttcn @@ -0,0 +1,23 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:6.2, Combined value list and assignment notation not allowed in the same (immediate) context. + ** @verdict pass reject + ***************************************************/ +/* The following requirements are tested: + *The assignment notation can be used for record, record of, set, setof and union value + * notations and for arrays. In this notation each field shall not appear more than once. +*/ + +module NegSyn_0602_TopLevel_004 { + type record MyRecord { + integer field1, + charstring field2 optional, + float field3 + } + const MyRecord c_rec := { + field1 := 5, + field1 := 6, // error: already appeared field + field3 := 3.14 + }; +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/0602_toplevel/NegSyn_0602_TopLevel_005.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/0602_toplevel/NegSyn_0602_TopLevel_005.ttcn new file mode 100644 index 00000000..234278aa --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/0602_toplevel/NegSyn_0602_TopLevel_005.ttcn @@ -0,0 +1,37 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:6.2, Combined value list and assignment notation not allowed in the same (immediate) context. + ** @verdict pass reject + ***************************************************/ +/* The following requirements are tested: + * The index notation can be used for record of and setof value notations and for arrays. + * In this notation each index shall not appear more than once and shall conform to the range of indices allowed by the type definition. +*/ + +module NegSyn_0602_TopLevel_005 { + + type set of integer MySetOfType; + type component GeneralComp { + } + +testcase TC_NegSyn_0602_TopLevel_005() runs on GeneralComp { + + var MySetOfType v_set := { + [0] := 1, + [1] := 2, + [1] := 3 // error already indexed + }; + + if ( match(v_set, {1,3})) { + setverdict(pass); + } + else { + setverdict(fail); + } + } + + control { + execute(TC_NegSyn_0602_TopLevel_005()); + } +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/0602_toplevel/NegSyn_0602_TopLevel_006.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/0602_toplevel/NegSyn_0602_TopLevel_006.ttcn new file mode 100644 index 00000000..a2695fc5 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/0602_toplevel/NegSyn_0602_TopLevel_006.ttcn @@ -0,0 +1,41 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:6.2, Combined value list and assignment notation not allowed in the same (immediate) context. + ** @verdict pass reject + ***************************************************/ +/* The following requirements are tested: + * The assignment notation can be used for record, record of, set, setof and union value + * notations and for arrays. In this notation each field shall not appear more than once. +*/ + +module NegSyn_0602_TopLevel_006 { + + type set MySetType{ + integer field1, + charstring field2 + } + + type component GeneralComp { + } + +testcase TC_NegSyn_0602_TopLevel_006() runs on GeneralComp { + + var MySetType v_set := { + field1 := 5, + field1 := 6, // error: already appeared field + field2 := "abc" + }; + + if ( match(v_set, {5,"abc"})) { + setverdict(pass); + } + else { + setverdict(fail); + } + } + + control { + execute(TC_NegSyn_0602_TopLevel_006()); + } +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/0602_toplevel/NegSyn_0602_TopLevel_007.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/0602_toplevel/NegSyn_0602_TopLevel_007.ttcn new file mode 100644 index 00000000..e6e0fc0c --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/0602_toplevel/NegSyn_0602_TopLevel_007.ttcn @@ -0,0 +1,37 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:6.2, Combined value list and assignment notation not allowed in the same (immediate) context. + ** @verdict pass reject + ***************************************************/ +/* The following requirements are tested: + * The assignment notation can be used for record, record of, set, setof and union value + * notations and for arrays. In this notation each field shall not appear more than once. +*/ + +module NegSyn_0602_TopLevel_007 { + + type record of integer MyRecordOfType; + type component GeneralComp { + } + +testcase TC_NegSyn_0602_TopLevel_007() runs on GeneralComp { + + var MyRecordOfType v_RoI := { + [0] := 1, + [1] := 2, + [1] := 3 // error already indexed + }; + + if ( match(v_RoI, {1,3})) { + setverdict(pass); + } + else { + setverdict(fail); + } + } + + control { + execute(TC_NegSyn_0602_TopLevel_007()); + } +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/0602_toplevel/Sem_0602_TopLevel_001.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/0602_toplevel/Sem_0602_TopLevel_001.ttcn new file mode 100644 index 00000000..3b21892f --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/0602_toplevel/Sem_0602_TopLevel_001.ttcn @@ -0,0 +1,37 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:6.2, Ensure that assignment notation can be used for a record type. + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Sem_0602_TopLevel_001 { + + type component GeneralComp { + } + + type record MyRecord { + integer field1, + charstring field2 optional, + float field3 + } + + testcase TC_Sem_0602_TopLevel_001() runs on GeneralComp { + + var MyRecord v_myRecord := { + field1 := 5, + field2 := "hi", + field3 := 3.14 + }; + + if (v_myRecord=={5,"hi",3.14}) { + setverdict(pass); + } + else { + setverdict(fail); + } + } + + control { + execute(TC_Sem_0602_TopLevel_001()); + } +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/0602_toplevel/Sem_0602_TopLevel_002.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/0602_toplevel/Sem_0602_TopLevel_002.ttcn new file mode 100644 index 00000000..702ad622 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/0602_toplevel/Sem_0602_TopLevel_002.ttcn @@ -0,0 +1,33 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:6.2, Ensure that assignment notation can be used for a record of type. + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Sem_0602_TopLevel_002 { + + type component GeneralComp { + } + + type record of integer MyRecordOf; + + testcase TC_Sem_0602_TopLevel_002() runs on GeneralComp { + + var MyRecordOf v_allRecords := { + [0] := 1, + [1] := 2, + [2] := 3 + }; + + if (v_allRecords=={1,2,3}) { + setverdict(pass); + } + else { + setverdict(fail); + } + } + + control { + execute(TC_Sem_0602_TopLevel_002()); + } +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/0602_toplevel/Sem_0602_TopLevel_003.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/0602_toplevel/Sem_0602_TopLevel_003.ttcn new file mode 100644 index 00000000..195e4948 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/0602_toplevel/Sem_0602_TopLevel_003.ttcn @@ -0,0 +1,39 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:6.2, Ensure that assignment notation can be used for a set type. + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Sem_0602_TopLevel_003 { + + type component GeneralComp { + } + + type set MySet { + integer field1, + charstring field2 optional, + float field3 + } + + testcase TC_Sem_0602_TopLevel_003() runs on GeneralComp { + + var MySet v_mySet := { + field1 := 5, + field2 := "hi", + field3 := 3.14 + }; + + if (v_mySet=={field1 := 5, + field2 := "hi", + field3 := 3.14}) { + setverdict(pass); + } + else { + setverdict(fail); + } + } + + control { + execute(TC_Sem_0602_TopLevel_003()); + } +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/0602_toplevel/Sem_0602_TopLevel_004.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/0602_toplevel/Sem_0602_TopLevel_004.ttcn new file mode 100644 index 00000000..ee4f6e6b --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/0602_toplevel/Sem_0602_TopLevel_004.ttcn @@ -0,0 +1,33 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:6.2, Ensure that assignment notation can be used for a set of type. + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Sem_0602_TopLevel_004 { + + type component GeneralComp { + } + + type set of integer MySetOf; + + testcase TC_Sem_0602_TopLevel_004() runs on GeneralComp { + + var MySetOf v_allSets := { + [0] := 1, + [1] := 2, + [2] := 3 + }; + + if (v_allSets=={1,2,3}) { + setverdict(pass); + } + else { + setverdict(fail); + } + } + + control { + execute(TC_Sem_0602_TopLevel_004()); + } +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/0602_toplevel/Sem_0602_TopLevel_005.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/0602_toplevel/Sem_0602_TopLevel_005.ttcn new file mode 100644 index 00000000..a88a393f --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/0602_toplevel/Sem_0602_TopLevel_005.ttcn @@ -0,0 +1,35 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:6.2, Ensure that assignment notation can be used for a union type. + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Sem_0602_TopLevel_005 { + + type component GeneralComp { + } + + type union MyUnion { + integer field1, + charstring field2, + float field3 + } + + testcase TC_Sem_0602_TopLevel_005() runs on GeneralComp { + + var MyUnion v_myUnion := { + field1 := 5 + }; + + if (v_myUnion.field1 == 5) { + setverdict(pass); + } + else { + setverdict(fail); + } + } + + control { + execute(TC_Sem_0602_TopLevel_005()); + } +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/0602_toplevel/Sem_0602_TopLevel_006.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/0602_toplevel/Sem_0602_TopLevel_006.ttcn new file mode 100644 index 00000000..c04ca645 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/0602_toplevel/Sem_0602_TopLevel_006.ttcn @@ -0,0 +1,32 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:6.2, Ensure that assignment notation can be used for an array. + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Sem_0602_TopLevel_006 { + + type component GeneralComp { + } + + type integer MyArray [3]; + + testcase TC_Sem_0602_TopLevel_006() runs on GeneralComp { + + var MyArray v_myArray; + v_myArray[0] := 1; + v_myArray[1] := 2; + v_myArray[2] := 3; + + if (v_myArray == {1,2,3}) { + setverdict(pass); + } + else { + setverdict(fail); + } + } + + control { + execute(TC_Sem_0602_TopLevel_006()); + } +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/0602_toplevel/Sem_0602_TopLevel_007.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/0602_toplevel/Sem_0602_TopLevel_007.ttcn new file mode 100644 index 00000000..f56ada62 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/0602_toplevel/Sem_0602_TopLevel_007.ttcn @@ -0,0 +1,33 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:6.2, Ensure that value list notation can be used for a record type. + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Sem_0602_TopLevel_007 { + + type component GeneralComp { + } + + type record MyRecord { + integer field1, + charstring field2 optional, + float field3 + } + + testcase TC_Sem_0602_TopLevel_007() runs on GeneralComp { + + var MyRecord v_myRecord := {5,"hi", 3.14}; + + if (v_myRecord=={5,"hi",3.14}) { + setverdict(pass); + } + else { + setverdict(fail); + } + } + + control { + execute(TC_Sem_0602_TopLevel_007()); + } +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/0602_toplevel/Sem_0602_TopLevel_008.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/0602_toplevel/Sem_0602_TopLevel_008.ttcn new file mode 100644 index 00000000..48aad93f --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/0602_toplevel/Sem_0602_TopLevel_008.ttcn @@ -0,0 +1,29 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:6.2, Ensure that value list notation can be used for a record of type. + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Sem_0602_TopLevel_008 { + + type component GeneralComp { + } + + type record of integer MyRecordOf; + + testcase TC_Sem_0602_TopLevel_008() runs on GeneralComp { + + var MyRecordOf v_allRecords := {1,2,3}; + + if (v_allRecords=={1,2,3}) { + setverdict(pass); + } + else { + setverdict(fail); + } + } + + control { + execute(TC_Sem_0602_TopLevel_008()); + } +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/0602_toplevel/Sem_0602_TopLevel_009.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/0602_toplevel/Sem_0602_TopLevel_009.ttcn new file mode 100644 index 00000000..46abd816 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/0602_toplevel/Sem_0602_TopLevel_009.ttcn @@ -0,0 +1,32 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:6.2, Ensure that indexed notation can be used for an arrays. + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Sem_0602_TopLevel_009 { + + type component GeneralComp { + } + + type integer MyArray [3]; + + testcase TC_Sem_0602_TopLevel_009() runs on GeneralComp { + + var MyArray v_myArray := {1,2,3}; + var integer Integer1 :=3; + v_myArray[0] := Integer1; + Integer1 := v_myArray[1]; + + if ( match(v_myArray, {3,2,3}) and match(Integer1, 2)) { + setverdict(pass); + } + else { + setverdict(fail); + } + } + + control { + execute(TC_Sem_0602_TopLevel_009()); + } +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/0602_toplevel/Sem_0602_TopLevel_010.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/0602_toplevel/Sem_0602_TopLevel_010.ttcn new file mode 100644 index 00000000..779ee3fb --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/0602_toplevel/Sem_0602_TopLevel_010.ttcn @@ -0,0 +1,29 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:6.2, Ensure that value list notation can be used for a set of type. + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Sem_0602_TopLevel_010 { + + type component GeneralComp { + } + + type set of integer MySetOf; + + testcase TC_Sem_0602_TopLevel_010() runs on GeneralComp { + + var MySetOf v_allSets := {1,2,3}; + + if (v_allSets=={1,2,3}) { + setverdict(pass); + } + else { + setverdict(fail); + } + } + + control { + execute(TC_Sem_0602_TopLevel_010()); + } +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/0602_toplevel/Sem_0602_TopLevel_011.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/0602_toplevel/Sem_0602_TopLevel_011.ttcn new file mode 100644 index 00000000..8ec2b6b9 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/0602_toplevel/Sem_0602_TopLevel_011.ttcn @@ -0,0 +1,29 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:6.2, Ensure that value list notation can be used for an array. + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Sem_0602_TopLevel_011 { + + type component GeneralComp { + } + + type integer MyArray [3]; + + testcase TC_Sem_0602_TopLevel_011() runs on GeneralComp { + + var MyArray v_myArray := {1,2,3}; + + if (v_myArray == {1,2,3}) { + setverdict(pass); + } + else { + setverdict(fail); + } + } + + control { + execute(TC_Sem_0602_TopLevel_011()); + } +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/0602_toplevel/Sem_0602_TopLevel_012.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/0602_toplevel/Sem_0602_TopLevel_012.ttcn new file mode 100644 index 00000000..5908e3db --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/0602_toplevel/Sem_0602_TopLevel_012.ttcn @@ -0,0 +1,32 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:6.2, Ensure that indexed notation can be used for a record of type. + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Sem_0602_TopLevel_012 { + + type component GeneralComp { + } + + type record of integer MyRecordOf; + + testcase TC_Sem_0602_TopLevel_012() runs on GeneralComp { + + var MyRecordOf v_allRecords := {1,2,3}; + var integer Integer1 :=3; + v_allRecords[0] := Integer1; + Integer1 := v_allRecords[1]; + + if ( match(v_allRecords, {3,2,3}) and match(Integer1, 2)) { + setverdict(pass); + } + else { + setverdict(fail); + } + } + + control { + execute(TC_Sem_0602_TopLevel_012()); + } +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/0602_toplevel/Sem_0602_TopLevel_013.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/0602_toplevel/Sem_0602_TopLevel_013.ttcn new file mode 100644 index 00000000..853db1da --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/0602_toplevel/Sem_0602_TopLevel_013.ttcn @@ -0,0 +1,32 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:6.2, Ensure that indexed notation can be used for a set of type. + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Sem_0602_TopLevel_013 { + + type component GeneralComp { + } + + type set of integer MySetOf; + + testcase TC_Sem_0602_TopLevel_013() runs on GeneralComp { + + var MySetOf v_allSets := {1,2,3}; + var integer Integer1 :=3; + v_allSets[0] := Integer1; + Integer1 := v_allSets[1]; + + if ( match(v_allSets, {3,2,3}) and match(Integer1, 2)) { + setverdict(pass); + } + else { + setverdict(fail); + } + } + + control { + execute(TC_Sem_0602_TopLevel_013()); + } +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/0602_toplevel/Sem_0602_TopLevel_014.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/0602_toplevel/Sem_0602_TopLevel_014.ttcn new file mode 100644 index 00000000..c426beb0 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/0602_toplevel/Sem_0602_TopLevel_014.ttcn @@ -0,0 +1,34 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:6.2, Ensure that value list notation can be used for a set type and the values + ** are assigned to the fields in the sequential order of the fields in the type definition. + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Sem_0602_TopLevel_014 { + + type component GeneralComp { + } + + type set MySet { + integer field1, + charstring field2 optional, + float field3 + } + + testcase TC_Sem_0602_TopLevel_014() runs on GeneralComp { + + var MySet v_mySet := {5,"hi",3.14};// SEE NOTE under 6.2.2 + + if (v_mySet=={5,"hi",3.14}) { + setverdict(pass); + } + else { + setverdict(fail); + } + } + + control { + execute(TC_Sem_0602_TopLevel_014()); + } +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/0602_toplevel/Syn_0602_TopLevel_001.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/0602_toplevel/Syn_0602_TopLevel_001.ttcn new file mode 100644 index 00000000..302b3f5c --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/0602_toplevel/Syn_0602_TopLevel_001.ttcn @@ -0,0 +1,13 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:6.2, Valid recursive union type definition + ** @verdict pass accept, noexecution + ***************************************************/ +module Syn_0602_TopLevel_001 { + // In case of union types, to avoid infinite recursion, at least one of the alternatives shall not reference its own type. + type union MyUnion { + MyUnion choice1, + charstring choice2 + } +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/0602_toplevel/Syn_0602_TopLevel_002.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/0602_toplevel/Syn_0602_TopLevel_002.ttcn new file mode 100644 index 00000000..031fb6f2 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/0602_toplevel/Syn_0602_TopLevel_002.ttcn @@ -0,0 +1,14 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:6.2, Valid recursive record type definition + ** @verdict pass accept, noexecution + ***************************************************/ +module Syn_0602_TopLevel_002 { + // In case of record and set types, to avoid infinite recursion, fields referencing to its own type, shall be optional. + type record MyRecord { + integer field1, + MyRecord field2 optional, + float field3 + } +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/0602_toplevel/Syn_0602_TopLevel_003.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/0602_toplevel/Syn_0602_TopLevel_003.ttcn new file mode 100644 index 00000000..1e0e0e15 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/0602_toplevel/Syn_0602_TopLevel_003.ttcn @@ -0,0 +1,18 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:6.2, Valid recursive record type definition + ** @verdict pass accept, noexecution + ***************************************************/ +module Syn_0602_TopLevel_003 { + type record MyRecord { + integer field1, + charstring field2 optional, + float field3 + } + const MyRecord c_rec := { + field1 := 5, + field2 := "hi", + field3 := 3.14 + }; +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/0602_toplevel/Syn_0602_TopLevel_004.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/0602_toplevel/Syn_0602_TopLevel_004.ttcn new file mode 100644 index 00000000..668801ca --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/0602_toplevel/Syn_0602_TopLevel_004.ttcn @@ -0,0 +1,14 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:6.2, constant definition of a record type. + ** @verdict pass accept, noexecution + ***************************************************/ +module Syn_0602_TopLevel_004 { + type record MyRecord { + integer field1, + charstring field2 optional, + float field3 + } + const MyRecord c_rec := { 5, "foo", 3.14 }; +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/0602_toplevel/Syn_0602_TopLevel_005.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/0602_toplevel/Syn_0602_TopLevel_005.ttcn new file mode 100644 index 00000000..6c0fae31 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/0602_toplevel/Syn_0602_TopLevel_005.ttcn @@ -0,0 +1,20 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:6.2, Fields not mentioned are implicitly left unspecified. + ** @verdict pass accept, noexecution + ***************************************************/ +module Syn_0602_TopLevel_005 { + type record MyRecord { + integer field1, + charstring field2 optional, + float field3 + } + const MyRecord c_rec := { + field1 := 5, + // field2 implicitly unspecified + field3 := 3.14 + } with { + optional "implicit omit" + } +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0603_type_compatibility/060301_non-structured_types/NegSem_060301_non_structured_types_001.ttcn b/ATS/core_language/06_types_and_values/0603_type_compatibility/060301_non-structured_types/NegSem_060301_non_structured_types_001.ttcn new file mode 100644 index 00000000..034d1e73 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0603_type_compatibility/060301_non-structured_types/NegSem_060301_non_structured_types_001.ttcn @@ -0,0 +1,28 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:6.3.1, Ensure that the IUT correctly handles assignments from incompatible type ranges + ** @verdict pass reject + ***************************************************/ + +module NegSem_060301_non_structured_types_001 { + type integer ConstrainedInt(1..10); + +type component GeneralComp { +} + +testcase TC_NegSem_060301_non_structured_types_001() runs on GeneralComp { + + var integer v_int:=15; + var ConstrainedInt v_constrainedInt; + + + v_constrainedInt:=v_int; // 15 not in range 1..10 + +} + +control{ + execute(TC_NegSem_060301_non_structured_types_001()); +} + +} diff --git a/ATS/core_language/06_types_and_values/0603_type_compatibility/060301_non-structured_types/NegSem_060301_non_structured_types_002.ttcn b/ATS/core_language/06_types_and_values/0603_type_compatibility/060301_non-structured_types/NegSem_060301_non_structured_types_002.ttcn new file mode 100644 index 00000000..a4a39237 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0603_type_compatibility/060301_non-structured_types/NegSem_060301_non_structured_types_002.ttcn @@ -0,0 +1,28 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:6.3.1, Ensure that the IUT correctly handles assignments from incompatible type ranges + ** @verdict pass reject + ***************************************************/ + +module NegSem_060301_non_structured_types_002 { + type float ConstrainedFloat(1.0 .. 1E1); + +type component GeneralComp { +} + +testcase TC_NegSem_060301_non_structured_types_002() runs on GeneralComp { + + var integer v_float:=15.0; + var ConstrainedFloat v_constrainedFloat; + + + v_constrainedFloat:=v_float; + +} + +control{ + execute(TC_NegSem_060301_non_structured_types_002()); +} + +} diff --git a/ATS/core_language/06_types_and_values/0603_type_compatibility/060301_non-structured_types/NegSem_060301_non_structured_types_003.ttcn b/ATS/core_language/06_types_and_values/0603_type_compatibility/060301_non-structured_types/NegSem_060301_non_structured_types_003.ttcn new file mode 100644 index 00000000..44ce7a45 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0603_type_compatibility/060301_non-structured_types/NegSem_060301_non_structured_types_003.ttcn @@ -0,0 +1,27 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:6.3.1, Ensure that the IUT correctly handles assignments from incompatible type ranges + ** @verdict pass reject + ***************************************************/ + +module NegSem_060301_non_structured_types_003 { + type charstring ConstrainedChar ("a" .. "z"); + +type component GeneralComp { +} + +testcase TC_NegSem_060301_non_structured_types_003() runs on GeneralComp { + + var charstring v_char := "j5l"; + var ConstrainedChar v_constrainedChar; + + v_constrainedChar:=v_char; // 5 not in dictionary + +} + +control{ + execute(TC_NegSem_060301_non_structured_types_003()); +} + +} diff --git a/ATS/core_language/06_types_and_values/0603_type_compatibility/060301_non-structured_types/NegSem_060301_non_structured_types_004.ttcn b/ATS/core_language/06_types_and_values/0603_type_compatibility/060301_non-structured_types/NegSem_060301_non_structured_types_004.ttcn new file mode 100644 index 00000000..076bd7f5 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0603_type_compatibility/060301_non-structured_types/NegSem_060301_non_structured_types_004.ttcn @@ -0,0 +1,28 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:6.3.1, Ensure that the IUT correctly handles assignments from incompatible type ranges + ** @verdict pass reject + ***************************************************/ + +module NegSem_060301_non_structured_types_004 { + type universal charstring ConstrainedUChar (char(0, 0, 1, 111) .. char(0, 0, 1, 113)); + +type component GeneralComp { +} + +testcase TC_NegSem_060301_non_structured_types_004() runs on GeneralComp { + + var universal charstring v_uChar := char(0, 0, 1, 122); + var ConstrainedUChar v_constrainedUChar; + + + v_constrainedUChar:=v_uChar; // char not in range + +} + +control{ + execute(TC_NegSem_060301_non_structured_types_004()); +} + +} diff --git a/ATS/core_language/06_types_and_values/0603_type_compatibility/060301_non-structured_types/NegSem_060301_non_structured_types_005.ttcn b/ATS/core_language/06_types_and_values/0603_type_compatibility/060301_non-structured_types/NegSem_060301_non_structured_types_005.ttcn new file mode 100644 index 00000000..01246e2a --- /dev/null +++ b/ATS/core_language/06_types_and_values/0603_type_compatibility/060301_non-structured_types/NegSem_060301_non_structured_types_005.ttcn @@ -0,0 +1,28 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:6.3.1, Ensure that the IUT correctly handles assignments from incompatible type ranges + ** @verdict pass reject + ***************************************************/ + +module NegSem_060301_non_structured_types_005 { + type bitstring ConstrainedBitString ('01'B, '10'B, '11'B); + +type component GeneralComp { +} + +testcase TC_NegSem_060301_non_structured_types_005() runs on GeneralComp { + + var bitstring v_bitstr := '00'B; + var ConstrainedBitString v_constrainedBitstr; + + + v_constrainedBitstr:=v_bitstr; // value '00'B not in ConstrainedBitString type + +} + +control{ + execute(TC_NegSem_060301_non_structured_types_005()); +} + +} diff --git a/ATS/core_language/06_types_and_values/0603_type_compatibility/060301_non-structured_types/NegSem_060301_non_structured_types_006.ttcn b/ATS/core_language/06_types_and_values/0603_type_compatibility/060301_non-structured_types/NegSem_060301_non_structured_types_006.ttcn new file mode 100644 index 00000000..283895d8 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0603_type_compatibility/060301_non-structured_types/NegSem_060301_non_structured_types_006.ttcn @@ -0,0 +1,27 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:6.3.1, Ensure that the IUT correctly handles assignments from incompatible type ranges + ** @verdict pass reject + ***************************************************/ + +module NegSem_060301_non_structured_types_006 { + type hexstring ConstrainedHexString ('1A'H, '1B'H, '1C'H); + +type component GeneralComp { +} + +testcase TC_NegSem_060301_non_structured_types_006() runs on GeneralComp { + + var hexstring v_hexstr := '2B'H; + var ConstrainedHexString v_constrainedHexstr; + + v_constrainedHexstr:=v_hexstr; // value '2B'H not in ConstrainedHexString type + +} + +control{ + execute(TC_NegSem_060301_non_structured_types_006()); +} + +} diff --git a/ATS/core_language/06_types_and_values/0603_type_compatibility/060301_non-structured_types/NegSem_060301_non_structured_types_007.ttcn b/ATS/core_language/06_types_and_values/0603_type_compatibility/060301_non-structured_types/NegSem_060301_non_structured_types_007.ttcn new file mode 100644 index 00000000..990aca27 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0603_type_compatibility/060301_non-structured_types/NegSem_060301_non_structured_types_007.ttcn @@ -0,0 +1,27 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:6.3.1, Ensure that the IUT correctly handles assignments from compatible size restrictions + ** @verdict pass reject + ***************************************************/ + +module NegSem_060301_non_structured_types_007 { + type integer ConstrainedInt[1]; + +type component GeneralComp { +} + +testcase TC_NegSem_060301_non_structured_types_007() runs on GeneralComp { + + var integer v_int[2]:={5,4}; + var ConstrainedInt v_constrainedInt; + + + v_constrainedInt:=v_int; // length 2 array assigned to length 1 array type +} + +control{ + execute(TC_NegSem_060301_non_structured_types_007()); +} + +} diff --git a/ATS/core_language/06_types_and_values/0603_type_compatibility/060301_non-structured_types/NegSem_060301_non_structured_types_008.ttcn b/ATS/core_language/06_types_and_values/0603_type_compatibility/060301_non-structured_types/NegSem_060301_non_structured_types_008.ttcn new file mode 100644 index 00000000..c40cca04 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0603_type_compatibility/060301_non-structured_types/NegSem_060301_non_structured_types_008.ttcn @@ -0,0 +1,27 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:6.3.1, Ensure that the IUT correctly handles assignments from compatible size restrictions + ** @verdict pass reject + ***************************************************/ + +module NegSem_060301_non_structured_types_008 { + type float ConstrainedFloat[1]; + +type component GeneralComp { +} + +testcase TC_NegSem_060301_non_structured_types_008() runs on GeneralComp { + + var integer v_float[2]:={5.0,4.0}; + var ConstrainedFloat v_constrainedFloat; + + + v_constrainedFloat:=v_float; // length 2 array assigned to length 1 array type +} + +control{ + execute(TC_NegSem_060301_non_structured_types_008()); +} + +} diff --git a/ATS/core_language/06_types_and_values/0603_type_compatibility/060301_non-structured_types/NegSem_060301_non_structured_types_009.ttcn b/ATS/core_language/06_types_and_values/0603_type_compatibility/060301_non-structured_types/NegSem_060301_non_structured_types_009.ttcn new file mode 100644 index 00000000..cb987046 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0603_type_compatibility/060301_non-structured_types/NegSem_060301_non_structured_types_009.ttcn @@ -0,0 +1,27 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:6.3.1, Ensure that the IUT correctly handles assignments from compatible size restrictions + ** @verdict pass reject + ***************************************************/ + +module NegSem_060301_non_structured_types_009 { + type charstring ConstrainedChar length (1); + +type component GeneralComp { +} + +testcase TC_NegSem_060301_non_structured_types_009() runs on GeneralComp { + + var charstring v_char := "jk"; + var ConstrainedChar v_constrainedChar; + + + v_constrainedChar:=v_char; // length 2 charstring assigned to length 1 type +} + +control{ + execute(TC_NegSem_060301_non_structured_types_009()); +} + +} diff --git a/ATS/core_language/06_types_and_values/0603_type_compatibility/060301_non-structured_types/NegSem_060301_non_structured_types_010.ttcn b/ATS/core_language/06_types_and_values/0603_type_compatibility/060301_non-structured_types/NegSem_060301_non_structured_types_010.ttcn new file mode 100644 index 00000000..009bb315 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0603_type_compatibility/060301_non-structured_types/NegSem_060301_non_structured_types_010.ttcn @@ -0,0 +1,27 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:6.3.1, Ensure that the IUT correctly handles assignments from compatible size restrictions + ** @verdict pass reject + ***************************************************/ + +module NegSem_060301_non_structured_types_010 { + type universal charstring ConstrainedUChar length (1); + +type component GeneralComp { +} + +testcase TC_NegSem_060301_non_structured_types_010() runs on GeneralComp { + + var universal charstring v_uChar := char(0, 0, 1, 112) & char(0, 0, 1, 112); + var ConstrainedUChar v_constrainedUChar; + + + v_constrainedUChar:=v_uChar; // length 2 charstring assigned to length 1 type +} + +control{ + execute(TC_NegSem_060301_non_structured_types_010()); +} + +} diff --git a/ATS/core_language/06_types_and_values/0603_type_compatibility/060301_non-structured_types/NegSem_060301_non_structured_types_011.ttcn b/ATS/core_language/06_types_and_values/0603_type_compatibility/060301_non-structured_types/NegSem_060301_non_structured_types_011.ttcn new file mode 100644 index 00000000..8a85688a --- /dev/null +++ b/ATS/core_language/06_types_and_values/0603_type_compatibility/060301_non-structured_types/NegSem_060301_non_structured_types_011.ttcn @@ -0,0 +1,27 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:6.3.1, Ensure that the IUT correctly handles assignments from compatible size restrictions + ** @verdict pass reject + ***************************************************/ + +module NegSem_060301_non_structured_types_011 { + type bitstring ConstrainedBitString length (1); + +type component GeneralComp { +} + +testcase TC_NegSem_060301_non_structured_types_011() runs on GeneralComp { + + var bitstring v_bitstr := '10'B; + var ConstrainedBitString v_constrainedBitstr; + + + v_constrainedBitstr:=v_bitstr; // length 2 string assigned to length 1 type +} + +control{ + execute(TC_NegSem_060301_non_structured_types_011()); +} + +} diff --git a/ATS/core_language/06_types_and_values/0603_type_compatibility/060301_non-structured_types/NegSem_060301_non_structured_types_012.ttcn b/ATS/core_language/06_types_and_values/0603_type_compatibility/060301_non-structured_types/NegSem_060301_non_structured_types_012.ttcn new file mode 100644 index 00000000..ce50bfc5 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0603_type_compatibility/060301_non-structured_types/NegSem_060301_non_structured_types_012.ttcn @@ -0,0 +1,26 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:6.3.1, Ensure that the IUT correctly handles assignments from compatible size restrictions + ** @verdict pass reject + ***************************************************/ + +module NegSem_060301_non_structured_types_012 { + type hexstring ConstrainedHexString length (1); + +type component GeneralComp { +} + +testcase TC_NegSem_060301_non_structured_types_012() runs on GeneralComp { + + var hexstring v_hexstr := '1B'H; + var ConstrainedHexString v_constrainedHexstr; + + v_constrainedHexstr:=v_hexstr; // length 2 string assigned to length 1 type +} + +control{ + execute(TC_NegSem_060301_non_structured_types_012()); +} + +} diff --git a/ATS/core_language/06_types_and_values/0603_type_compatibility/060301_non-structured_types/Sem_060301_non_structured_types_001.ttcn b/ATS/core_language/06_types_and_values/0603_type_compatibility/060301_non-structured_types/Sem_060301_non_structured_types_001.ttcn new file mode 100644 index 00000000..4482bc90 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0603_type_compatibility/060301_non-structured_types/Sem_060301_non_structured_types_001.ttcn @@ -0,0 +1,43 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.2 + ** @purpose 1:6.3.1, Ensure that the IUT correctly handles assignments from compatible type ranges + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +// integer and float assigments from compatible types. +module Sem_060301_non_structured_types_001 { + type integer ConstrainedInt(1..10); + type float ConstrainedFloat(1.0 .. 1E1); + +type component GeneralComp { +} + +testcase TC_Sem_060301_non_structured_types_001() runs on GeneralComp { + + var integer v_int:=5; + var ConstrainedInt v_constrainedInt; + var float v_float:=5.0; + var ConstrainedFloat v_constrainedFloat; + + + + v_constrainedInt:=v_int; + v_constrainedFloat:=v_float; + + + if ( + (v_constrainedInt==5) and + (v_constrainedFloat==5.0) + ) { + setverdict(pass); + } + else { + setverdict(fail); + } +} + +control{ + execute(TC_Sem_060301_non_structured_types_001()); +} + +} diff --git a/ATS/core_language/06_types_and_values/0603_type_compatibility/060301_non-structured_types/Sem_060301_non_structured_types_002.ttcn b/ATS/core_language/06_types_and_values/0603_type_compatibility/060301_non-structured_types/Sem_060301_non_structured_types_002.ttcn new file mode 100644 index 00000000..4fc0b3b4 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0603_type_compatibility/060301_non-structured_types/Sem_060301_non_structured_types_002.ttcn @@ -0,0 +1,74 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:6.3.1, Ensure that the IUT correctly handles assignments from compatible size restrictions + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +module Sem_060301_non_structured_types_002 { + type integer ConstrainedInt[1..2]; + type float ConstrainedFloat[1..2]; + type charstring ConstrainedChar length (1..2); + type universal charstring ConstrainedUChar length (1..2); + type bitstring ConstrainedBitString length (1..2); + type hexstring ConstrainedHexString length (1..2); + +type component GeneralComp { +} +/** + * @desc Equals method for floats + * @return true if abs(f1 - f2) < 1.E-6 + */ +function f_isFloatNear(in float f1, in float f2) return boolean { + var float delta := f1-f2; + if (delta < 0.0) { + delta := 0.0 - delta; + } + return delta < 1E-6; +} + +testcase TC_Sem_060301_non_structured_types_002() runs on GeneralComp { + + var integer v_int[2]:={5,4}; + var ConstrainedInt v_constrainedInt; + var float v_float[2]:={5.0,4.0}; + var ConstrainedFloat v_constrainedFloat; + var charstring v_char := "jk"; + var ConstrainedChar v_constrainedChar; + var universal charstring v_uChar := char(0, 0, 1, 112); + var ConstrainedUChar v_constrainedUChar; + var bitstring v_bitstr := '10'B; + var ConstrainedBitString v_constrainedBitstr; + var hexstring v_hexstr := '1B'H; + var ConstrainedHexString v_constrainedHexstr; + + + v_constrainedInt:=v_int; + v_constrainedFloat:=v_float; + v_constrainedChar:=v_char; + v_constrainedUChar:=v_uChar; + v_constrainedBitstr:=v_bitstr; + v_constrainedHexstr:=v_hexstr; + + if ( + (v_constrainedInt[1]==5) and + (v_constrainedInt[2]==4) and + (f_isFloatNear(v_constrainedFloat[1],5.0)) and + (f_isFloatNear(v_constrainedFloat[2],4.0)) and + (v_constrainedChar=="jk") and + (v_constrainedUChar==char(0, 0, 1, 112)) and + (v_constrainedBitstr=='10'B) and + (v_constrainedHexstr=='1B'H) + ) { + setverdict(pass); + } + else { + setverdict(fail); + } +} + +control{ + execute(TC_Sem_060301_non_structured_types_002()); +} + +} diff --git a/ATS/core_language/06_types_and_values/0603_type_compatibility/060301_non-structured_types/Sem_060301_non_structured_types_003.ttcn b/ATS/core_language/06_types_and_values/0603_type_compatibility/060301_non-structured_types/Sem_060301_non_structured_types_003.ttcn new file mode 100644 index 00000000..4fdd30ba --- /dev/null +++ b/ATS/core_language/06_types_and_values/0603_type_compatibility/060301_non-structured_types/Sem_060301_non_structured_types_003.ttcn @@ -0,0 +1,45 @@ +/*************************************************** + ** @author STF 451 + ** @version 0.0.1 + ** @purpose 1:6.3.1, Ensure that the IUT correctly handles assignments from compatible type ranges + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +// charstring and universal charstring assigments +module Sem_060301_non_structured_types_003 { + + type charstring ConstrainedChar ("a" .. "z"); + type universal charstring ConstrainedUChar (char(0, 0, 1, 111) .. char(0, 0, 1, 113)); + + +type component GeneralComp { +} + +testcase TC_Sem_060301_non_structured_types_003() runs on GeneralComp { + + + var charstring v_char := "jkl"; + var ConstrainedChar v_constrainedChar; + var universal charstring v_uChar := char(0, 0, 1, 112); + var ConstrainedUChar v_constrainedUChar; + + + + v_constrainedChar:=v_char; + v_constrainedUChar:=v_uChar; + + if ( + (v_constrainedChar=="jkl") and + (v_constrainedUChar==char(0, 0, 1, 112))) + { + setverdict(pass); + } + else { + setverdict(fail); + } +} + +control{ + execute(TC_Sem_060301_non_structured_types_003()); +} + +} diff --git a/ATS/core_language/06_types_and_values/0603_type_compatibility/060301_non-structured_types/Sem_060301_non_structured_types_004.ttcn b/ATS/core_language/06_types_and_values/0603_type_compatibility/060301_non-structured_types/Sem_060301_non_structured_types_004.ttcn new file mode 100644 index 00000000..7fbf05a2 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0603_type_compatibility/060301_non-structured_types/Sem_060301_non_structured_types_004.ttcn @@ -0,0 +1,42 @@ +/*************************************************** + ** @author STF 451 + ** @version 0.0.1 + ** @purpose 1:6.3.1, Ensure that the IUT correctly handles assignments from compatible type ranges + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +// bitstring and hexstring assignments + +module Sem_060301_non_structured_types_004 { + + type bitstring ConstrainedBitString ('01'B, '10'B, '11'B); + type hexstring ConstrainedHexString ('1A'H, '1B'H, '1C'H); + +type component GeneralComp { +} + +testcase TC_Sem_060301_non_structured_types_004() runs on GeneralComp { + + var bitstring v_bitstr := '10'B; + var ConstrainedBitString v_constrainedBitstr; + var hexstring v_hexstr := '1B'H; + var ConstrainedHexString v_constrainedHexstr; + + v_constrainedBitstr:=v_bitstr; + v_constrainedHexstr:=v_hexstr; + + if ( + (v_constrainedBitstr=='10'B) and + (v_constrainedHexstr=='1B'H) + ) { + setverdict(pass); + } + else { + setverdict(fail); + } +} + +control{ + execute(TC_Sem_060301_non_structured_types_004()); +} + +} diff --git a/ATS/core_language/06_types_and_values/0603_type_compatibility/060302_structured_types/NegSem_060302_structured_types_001.ttcn b/ATS/core_language/06_types_and_values/0603_type_compatibility/060302_structured_types/NegSem_060302_structured_types_001.ttcn new file mode 100644 index 00000000..0403c598 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0603_type_compatibility/060302_structured_types/NegSem_060302_structured_types_001.ttcn @@ -0,0 +1,31 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:6.3.2.1, Reject assignment of other enumerated types since they are only compatible to synonym types + ** @verdict pass reject + ***************************************************/ + +module NegSem_060302_structured_types_001 { + + type enumerated EnumeratedType {e_black, e_white}; + type enumerated EnumeratedRedefinition {e_black, e_white}; + + + +type component GeneralComp { +} + +testcase TC_NegSem_060302_structured_types_001() runs on GeneralComp { + + var EnumeratedType v_enum1:=e_black; + var EnumeratedRedefinition v_enum2; + + v_enum2:=v_enum1; // not a synonym type + setverdict(pass); +} + +control{ + execute(TC_NegSem_060302_structured_types_001()); +} + +} diff --git a/ATS/core_language/06_types_and_values/0603_type_compatibility/060302_structured_types/NegSem_060302_structured_types_002.ttcn b/ATS/core_language/06_types_and_values/0603_type_compatibility/060302_structured_types/NegSem_060302_structured_types_002.ttcn new file mode 100644 index 00000000..829778e0 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0603_type_compatibility/060302_structured_types/NegSem_060302_structured_types_002.ttcn @@ -0,0 +1,39 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:6.3.2, Ensure that the IUT rejects assignments from incompatible types or type ranges + ** @verdict pass reject + ***************************************************/ + +module NegSem_060302_structured_types_002 { + + type record RecordType1 { + integer a(0..10) optional, + integer b(0..5) optional, + boolean c + } + type record RecordType2 { + integer e optional, + integer f(0..10) , + boolean g + } + + + +type component GeneralComp { +} + +testcase TC_NegSem_060302_structured_types_002() runs on GeneralComp { + + var RecordType1 v_rec1:={a:=4,b:=omit,c:=false}; + var RecordType2 v_rec2; + + v_rec2:=v_rec1; // optionality mismatch (e.g. b is optional where f is mandatory) + setverdict(pass); +} + +control{ + execute(TC_NegSem_060302_structured_types_002()); +} + +} diff --git a/ATS/core_language/06_types_and_values/0603_type_compatibility/060302_structured_types/NegSem_060302_structured_types_003.ttcn b/ATS/core_language/06_types_and_values/0603_type_compatibility/060302_structured_types/NegSem_060302_structured_types_003.ttcn new file mode 100644 index 00000000..a044a7e6 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0603_type_compatibility/060302_structured_types/NegSem_060302_structured_types_003.ttcn @@ -0,0 +1,39 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:6.3.2, Ensure that the IUT rejects assignments from incompatible types or type ranges + ** @verdict pass reject + ***************************************************/ + +module NegSem_060302_structured_types_003 { + + type record RecordType { + integer a(0..10) optional, + integer b(0..10) optional, + boolean c + } + type record ModifiedRecord { + integer e optional, + integer f(0..5) optional, + boolean g + } + + +type component GeneralComp { +} + +testcase TC_NegSem_060302_structured_types_003() runs on GeneralComp { + + var ModifiedRecord v_rec1:={e:=15,f:=4,g:=false}; + var RecordType v_rec2; + + v_rec2:=v_rec1; //subtyping range mismatch + setverdict(pass); + +} + +control{ + execute(TC_NegSem_060302_structured_types_003()); +} + +} diff --git a/ATS/core_language/06_types_and_values/0603_type_compatibility/060302_structured_types/NegSem_060302_structured_types_004.ttcn b/ATS/core_language/06_types_and_values/0603_type_compatibility/060302_structured_types/NegSem_060302_structured_types_004.ttcn new file mode 100644 index 00000000..2726cdc8 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0603_type_compatibility/060302_structured_types/NegSem_060302_structured_types_004.ttcn @@ -0,0 +1,40 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:6.3.2, Ensure that the IUT rejects assignments from incompatible types or type ranges + ** @verdict pass reject + ***************************************************/ + +module NegSem_060302_structured_types_004 { + + type set SetType { + integer a(0..10) optional, + integer b(0..10) optional, + boolean c + } + type set ModifiedSet { + integer e optional, + integer f(0..5) , + boolean g + } + + + +type component GeneralComp { +} + +testcase TC_NegSem_060302_structured_types_004() runs on GeneralComp { + + var ModifiedSet v_set1:={f:=4,e:=8,g:=false}; + var SetType v_set2; + + v_set2:=v_set1; //optionality mismatch + setverdict(pass); + +} + +control{ + execute(TC_NegSem_060302_structured_types_004()); +} + +} diff --git a/ATS/core_language/06_types_and_values/0603_type_compatibility/060302_structured_types/NegSem_060302_structured_types_005.ttcn b/ATS/core_language/06_types_and_values/0603_type_compatibility/060302_structured_types/NegSem_060302_structured_types_005.ttcn new file mode 100644 index 00000000..1a5b860b --- /dev/null +++ b/ATS/core_language/06_types_and_values/0603_type_compatibility/060302_structured_types/NegSem_060302_structured_types_005.ttcn @@ -0,0 +1,41 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:6.3.2, Ensure that the IUT rejects assignments from incompatible types or type ranges + ** @verdict pass reject + ***************************************************/ + +module NegSem_060302_structured_types_005 { + + + type set SetType { + integer a(0..10) optional, + integer b(0..10) optional, + boolean c + } + type set ModifiedSet { + integer e optional, + integer f(0..5) optional, + boolean g + } + + + +type component GeneralComp { +} + +testcase TC_NegSem_060302_structured_types_005() runs on GeneralComp { + + var ModifiedSet v_set1:={f:=4,e:=15,g:=false}; + var SetType v_set2; + + v_set2:=v_set1; //subtyping range mismatch + setverdict(pass); + +} + +control{ + execute(TC_NegSem_060302_structured_types_005()); +} + +} diff --git a/ATS/core_language/06_types_and_values/0603_type_compatibility/060302_structured_types/NegSem_060302_structured_types_006.ttcn b/ATS/core_language/06_types_and_values/0603_type_compatibility/060302_structured_types/NegSem_060302_structured_types_006.ttcn new file mode 100644 index 00000000..ea61c9b2 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0603_type_compatibility/060302_structured_types/NegSem_060302_structured_types_006.ttcn @@ -0,0 +1,32 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:6.3.2, Ensure that the IUT rejects assignments from incompatible types or type ranges + ** @verdict pass reject + ***************************************************/ + +module NegSem_060302_structured_types_006 { + + + type record of integer IntegerList(0..10); + type record of integer ModifiedList; + + +type component GeneralComp { +} + +testcase TC_NegSem_060302_structured_types_006() runs on GeneralComp { + + var ModifiedList v_list1:={2,14,8}; + var IntegerList v_list2; + + v_list2:=v_list1; + setverdict(pass); + +} + +control{ + execute(TC_NegSem_060302_structured_types_006()); +} + +} diff --git a/ATS/core_language/06_types_and_values/0603_type_compatibility/060302_structured_types/NegSem_060302_structured_types_007.ttcn b/ATS/core_language/06_types_and_values/0603_type_compatibility/060302_structured_types/NegSem_060302_structured_types_007.ttcn new file mode 100644 index 00000000..fe9dd150 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0603_type_compatibility/060302_structured_types/NegSem_060302_structured_types_007.ttcn @@ -0,0 +1,32 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:6.3.2, Ensure that the IUT rejects assignments from incompatible types or type ranges + ** @verdict pass reject + ***************************************************/ + +module NegSem_060302_structured_types_007 { + + + type set of integer IntegerUnorderedList(0..10); + type set of integer ModifiedUnorderedList; + + +type component GeneralComp { +} + +testcase TC_NegSem_060302_structured_types_007() runs on GeneralComp { + + var ModifiedUnorderedList v_ulist1:={2,14,8}; + var IntegerUnorderedList v_ulist2; + + v_ulist2:=v_ulist1; + setverdict(pass); + +} + +control{ + execute(TC_NegSem_060302_structured_types_007()); +} + +} diff --git a/ATS/core_language/06_types_and_values/0603_type_compatibility/060302_structured_types/NegSem_060302_structured_types_008.ttcn b/ATS/core_language/06_types_and_values/0603_type_compatibility/060302_structured_types/NegSem_060302_structured_types_008.ttcn new file mode 100644 index 00000000..5c2fcd71 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0603_type_compatibility/060302_structured_types/NegSem_060302_structured_types_008.ttcn @@ -0,0 +1,42 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:6.3.2, Ensure that the IUT rejects assignments from incompatible types or type ranges + ** @verdict pass reject + ***************************************************/ + +module NegSem_060302_structured_types_008 { + + type enumerated EnumeratedType {e_black, e_white}; + type EnumeratedType EnumeratedSynonym; + + type union UnionType { + integer a(0..10), + EnumeratedType b, + boolean c + } + type union ModifiedUnion { + integer a, + boolean c, + EnumeratedSynonym b + } + + +type component GeneralComp { +} + +testcase TC_NegSem_060302_structured_types_008() runs on GeneralComp { + + var ModifiedUnion v_union1:={a:=12}; + var UnionType v_union2; + + v_union2:=v_union1; //subtyping range mismatch + setverdict(pass); + +} + +control{ + execute(TC_NegSem_060302_structured_types_008()); +} + +} diff --git a/ATS/core_language/06_types_and_values/0603_type_compatibility/060302_structured_types/NegSem_060302_structured_types_009.ttcn b/ATS/core_language/06_types_and_values/0603_type_compatibility/060302_structured_types/NegSem_060302_structured_types_009.ttcn new file mode 100644 index 00000000..60a8d855 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0603_type_compatibility/060302_structured_types/NegSem_060302_structured_types_009.ttcn @@ -0,0 +1,41 @@ +/*************************************************** + ** @author STF 409 (updated by STF 521) + ** @version 0.0.2 + ** @purpose 1:6.3.2, Ensure that the IUT rejects assignments from incompatible types or type ranges + ** @verdict pass reject + ***************************************************/ + +module NegSem_060302_structured_types_009 language "TTCN-3:2016"{ + + type enumerated EnumeratedType {e_black, e_white}; + type enumerated EnumeratedRedefinition {e_black, e_white}; + + type union UnionType { + integer a(0..10), + EnumeratedType b, + boolean c + } + type union ModifiedUnion { + integer a, + boolean c, + EnumeratedRedefinition b + } + + +type component GeneralComp { +} + +testcase TC_NegSem_060302_structured_types_009() runs on GeneralComp { + + var ModifiedUnion v_union1:={b:=e_black}; + var UnionType v_union2; + + v_union2:=v_union1; //enumerated type mismatch + setverdict(pass); +} + +control{ + execute(TC_NegSem_060302_structured_types_009()); +} + +} diff --git a/ATS/core_language/06_types_and_values/0603_type_compatibility/060302_structured_types/NegSem_060302_structured_types_010.ttcn b/ATS/core_language/06_types_and_values/0603_type_compatibility/060302_structured_types/NegSem_060302_structured_types_010.ttcn new file mode 100644 index 00000000..ab64fe87 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0603_type_compatibility/060302_structured_types/NegSem_060302_structured_types_010.ttcn @@ -0,0 +1,42 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:6.3.2, Ensure that the IUT rejects assignments from incompatible types or type ranges + ** @verdict pass reject + ***************************************************/ + +module NegSem_060302_structured_types_010 { + + type enumerated EnumeratedType {e_black, e_white}; + type EnumeratedType EnumeratedSynonym; + + type union UnionType { + integer a, + EnumeratedType b, + boolean c + } + type union ModifiedUnion { + integer aa, + boolean cc, + EnumeratedSynonym bb + } + + +type component GeneralComp { +} + +testcase TC_NegSem_060302_structured_types_010() runs on GeneralComp { + + var ModifiedUnion v_union1:={aa:=1}; + var UnionType v_union2; + + v_union2:=v_union1; //element naming mismatch + setverdict(pass); + +} + +control{ + execute(TC_NegSem_060302_structured_types_010()); +} + +} diff --git a/ATS/core_language/06_types_and_values/0603_type_compatibility/060302_structured_types/NegSem_060302_structured_types_011.ttcn b/ATS/core_language/06_types_and_values/0603_type_compatibility/060302_structured_types/NegSem_060302_structured_types_011.ttcn new file mode 100644 index 00000000..c2762508 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0603_type_compatibility/060302_structured_types/NegSem_060302_structured_types_011.ttcn @@ -0,0 +1,49 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:6.3.2, Ensure that the IUT rejects assignments from structures having incompatible anytypes + ** @verdict pass reject + ***************************************************/ +module NegSem_060302_structured_types_011 { + + import from NegSem_060302_structured_types_011_importA all; + import from NegSem_060302_structured_types_011_importB all; + + +type component GeneralComp { +} + +testcase TC_NegSem_060302_structured_types_011() runs on GeneralComp { + + var NegSem_060302_structured_types_011_importA.Atype v_a; + var NegSem_060302_structured_types_011_importB.Atype v_b := { F := 1 } + + v_a:=v_b; //v_a's type does not contain the selected alternative + + if ( v_a==1 ) { + setverdict(pass); + } + else { + setverdict(fail); + } +} + +control{ + execute(TC_NegSem_060302_structured_types_011()); +} + +} + + +module NegSem_060302_structured_types_011_importA { + type integer I (0..2); + type anytype Atype; + } + + +module NegSem_060302_structured_types_011_importB { + type integer I (0..2); + type integer F; + type anytype Atype; +} + diff --git a/ATS/core_language/06_types_and_values/0603_type_compatibility/060302_structured_types/NegSem_060302_structured_types_012.ttcn b/ATS/core_language/06_types_and_values/0603_type_compatibility/060302_structured_types/NegSem_060302_structured_types_012.ttcn new file mode 100644 index 00000000..6fcb1abd --- /dev/null +++ b/ATS/core_language/06_types_and_values/0603_type_compatibility/060302_structured_types/NegSem_060302_structured_types_012.ttcn @@ -0,0 +1,57 @@ +/*************************************************** + ** @author STF 451 + ** @version 0.0.1 + ** @purpose 1:6.3.2, Ensure that the IUT rejects assignments having mismatch between undefined and omitted elements + ** @verdict pass reject + ***************************************************/ + +module NegSem_060302_structured_types_012 { + + type record RecordType { + integer a, + integer b optional + } + + type set SetType { + integer a, + integer b optional + } + + type record length (1..2) of integer ShortIntegerList; + type record of integer IntegerList; + + type set length (1..2) of integer ShortUnorderedIntegerList; + type set of integer UnorderedIntegerList; + + + type component GeneralComp { + } + + testcase TC_NegSem_060302_structured_types_012() runs on GeneralComp { + + + var IntegerList v_list1:={1,-}; + var ShortIntegerList v_list2; + var RecordType v_rec1; + var UnorderedIntegerList v_ulist1:={1,-}; + var ShortUnorderedIntegerList v_ulist2; + var SetType v_set1; + + var integer v_matcher[2] := {1,-}; + + var boolean v_check1; + + v_list2:=v_list1; + v_rec1:=v_list2; + v_ulist2:=v_ulist1; + v_set1:=v_ulist2; + + v_check1 := match(v_rec1, v_matcher); //mismatch between undefined and omitted elements + + } + + control{ + execute(TC_NegSem_060302_structured_types_012()); + } + +} diff --git a/ATS/core_language/06_types_and_values/0603_type_compatibility/060302_structured_types/NegSem_060302_structured_types_013.ttcn b/ATS/core_language/06_types_and_values/0603_type_compatibility/060302_structured_types/NegSem_060302_structured_types_013.ttcn new file mode 100644 index 00000000..559c93d3 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0603_type_compatibility/060302_structured_types/NegSem_060302_structured_types_013.ttcn @@ -0,0 +1,57 @@ +/*************************************************** + ** @author STF 451 + ** @version 0.0.1 + ** @purpose 1:6.3.2, Ensure that the IUT rejects assignments having mismatch between undefined and omitted elements + ** @verdict pass reject + ***************************************************/ + +module NegSem_060302_structured_types_013 { + + type record RecordType { + integer a, + integer b optional + } + + type set SetType { + integer a, + integer b optional + } + + type record length (1..2) of integer ShortIntegerList; + type record of integer IntegerList; + + type set length (1..2) of integer ShortUnorderedIntegerList; + type set of integer UnorderedIntegerList; + + + type component GeneralComp { + } + + testcase TC_NegSem_060302_structured_types_013() runs on GeneralComp { + + + var IntegerList v_list1:={1,-}; + var ShortIntegerList v_list2; + var RecordType v_rec1; + var UnorderedIntegerList v_ulist1:={1,-}; + var ShortUnorderedIntegerList v_ulist2; + var SetType v_set1; + + var integer v_matcher[2] := {1,-}; + + var boolean v_check1; + + v_list2:=v_list1; + v_rec1:=v_list2; + v_ulist2:=v_ulist1; + v_set1:=v_ulist2; + + v_check1 := match(v_set1,{1,-}); //mismatch between undefined and omitted elements + + } + + control{ + execute(TC_NegSem_060302_structured_types_013()); + } + +} diff --git a/ATS/core_language/06_types_and_values/0603_type_compatibility/060302_structured_types/NegSem_060302_structured_types_014.ttcn b/ATS/core_language/06_types_and_values/0603_type_compatibility/060302_structured_types/NegSem_060302_structured_types_014.ttcn new file mode 100644 index 00000000..78dcf29b --- /dev/null +++ b/ATS/core_language/06_types_and_values/0603_type_compatibility/060302_structured_types/NegSem_060302_structured_types_014.ttcn @@ -0,0 +1,36 @@ +/*************************************************** + ** @author STF 451 + ** @version 0.0.1 + ** @purpose 1:6.3.2, Ensure that the IUT rejects assignments between incompatible structures + ** @verdict pass reject + ***************************************************/ + +module NegSem_060302_structured_types_014 { + + type record RecordType { + integer a, + integer b optional, + integer c + } + + type record of integer IntegerList; + + + type component GeneralComp { + } + + testcase TC_NegSem_060302_structured_types_014() runs on GeneralComp { + + var RecordType v_record := { 1, omit, 2}; + var IntegerList v_IntList; + var integer v_array[2]; + + v_array:=v_record; //assignment between incompatible types + + } + + control{ + execute(TC_NegSem_060302_structured_types_014()); + } + +} diff --git a/ATS/core_language/06_types_and_values/0603_type_compatibility/060302_structured_types/NegSem_060302_structured_types_015.ttcn b/ATS/core_language/06_types_and_values/0603_type_compatibility/060302_structured_types/NegSem_060302_structured_types_015.ttcn new file mode 100644 index 00000000..76840a5a --- /dev/null +++ b/ATS/core_language/06_types_and_values/0603_type_compatibility/060302_structured_types/NegSem_060302_structured_types_015.ttcn @@ -0,0 +1,36 @@ +/*************************************************** + ** @author STF 451 + ** @version 0.0.1 + ** @purpose 1:6.3.2, Ensure that the IUT rejects assignments between incompatible structures + ** @verdict pass reject + ***************************************************/ + +module NegSem_060302_structured_types_015 { + + type record RecordType { + integer a, + integer b optional, + integer c + } + + type record of integer IntegerList; + + + type component GeneralComp { + } + + testcase TC_NegSem_060302_structured_types_015() runs on GeneralComp { + + var RecordType v_record := { 1, omit, 2}; + var IntegerList v_IntList; + var integer v_array[2]; + + v_IntList:=v_record; //assignment between incompatible types + + } + + control{ + execute(TC_NegSem_060302_structured_types_015()); + } + +} diff --git a/ATS/core_language/06_types_and_values/0603_type_compatibility/060302_structured_types/NegSem_060302_structured_types_016.ttcn b/ATS/core_language/06_types_and_values/0603_type_compatibility/060302_structured_types/NegSem_060302_structured_types_016.ttcn new file mode 100644 index 00000000..f07bdfc3 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0603_type_compatibility/060302_structured_types/NegSem_060302_structured_types_016.ttcn @@ -0,0 +1,36 @@ +/*************************************************** + ** @author STF 451 + ** @version 0.0.1 + ** @purpose 1:6.3.2, Ensure that the IUT rejects assignments between incompatible structures + ** @verdict pass reject + ***************************************************/ + +module NegSem_060302_structured_types_016 { + + type set SetType { + integer a, + integer b optional, + integer c + } + + type set of integer IntegerList; + + + type component GeneralComp { + } + + testcase TC_NegSem_060302_structured_types_016() runs on GeneralComp { + + var SetType v_set := { 1, omit, 2}; + var IntegerList v_IntList; + var integer v_array[2]; + + v_array:=v_set; //assignment between incompatible types + + } + + control{ + execute(TC_NegSem_060302_structured_types_016()); + } + +} diff --git a/ATS/core_language/06_types_and_values/0603_type_compatibility/060302_structured_types/NegSem_060302_structured_types_017.ttcn b/ATS/core_language/06_types_and_values/0603_type_compatibility/060302_structured_types/NegSem_060302_structured_types_017.ttcn new file mode 100644 index 00000000..786dfa57 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0603_type_compatibility/060302_structured_types/NegSem_060302_structured_types_017.ttcn @@ -0,0 +1,36 @@ +/*************************************************** + ** @author STF 451 + ** @version 0.0.1 + ** @purpose 1:6.3.2, Ensure that the IUT rejects assignments between incompatible structures + ** @verdict pass reject + ***************************************************/ + +module NegSem_060302_structured_types_017 { + + type set SetType { + integer a, + integer b optional, + integer c + } + + type set of integer IntegerList; + + + type component GeneralComp { + } + + testcase TC_NegSem_060302_structured_types_017() runs on GeneralComp { + + var SetType v_set := { 1, omit, 2}; + var IntegerList v_IntList; + var integer v_array[2]; + + v_IntList:=v_set; //assignment between incompatible types + + } + + control{ + execute(TC_NegSem_060302_structured_types_017()); + } + +} diff --git a/ATS/core_language/06_types_and_values/0603_type_compatibility/060302_structured_types/NegSem_060302_structured_types_018.ttcn b/ATS/core_language/06_types_and_values/0603_type_compatibility/060302_structured_types/NegSem_060302_structured_types_018.ttcn new file mode 100644 index 00000000..d08044a8 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0603_type_compatibility/060302_structured_types/NegSem_060302_structured_types_018.ttcn @@ -0,0 +1,32 @@ +/*************************************************** + ** @author STF 451 + ** @version 0.0.1 + ** @purpose 1:6.3.2, Ensure that the IUT rejects assignments between incompatible structures + ** @verdict pass reject + ***************************************************/ + +module NegSem_060302_structured_types_018 { + + type set SetType { + integer a, + integer b, + integer c + } + + type component GeneralComp { + } + + testcase TC_NegSem_060302_structured_types_018() runs on GeneralComp { + + var SetType v_set := { 1, 2, 3}; + var integer v_array[3]; + + v_array:=v_set; //assignment between incompatible types, see clause G.9 compatibility rules + + } + + control{ + execute(TC_NegSem_060302_structured_types_018()); + } + +} diff --git a/ATS/core_language/06_types_and_values/0603_type_compatibility/060302_structured_types/NegSem_060302_structured_types_019.ttcn b/ATS/core_language/06_types_and_values/0603_type_compatibility/060302_structured_types/NegSem_060302_structured_types_019.ttcn new file mode 100644 index 00000000..6425c550 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0603_type_compatibility/060302_structured_types/NegSem_060302_structured_types_019.ttcn @@ -0,0 +1,64 @@ +/*************************************************** + ** @author STF 451 + ** @version 0.0.1 + ** @purpose 1:6.3.2, Ensure that the IUT correctly handles assignments from structures having compatible types and lengths + ** @verdict pass reject + ***************************************************/ + +module NegSem_060302_structured_types_019 { + + type record RecordType { + integer a, + integer b optional + } + + type set SetType { + integer a, + integer b optional + } + + type record length (1..2) of integer ShortIntegerList; + type record of integer IntegerList; + + type set length (1..2) of integer ShortUnorderedIntegerList; + type set of integer UnorderedIntegerList; + + + type component GeneralComp { + } + + testcase TC_NegSem_060302_structured_types_019() runs on GeneralComp { + + var IntegerList v_list1:={1,-}; + var ShortIntegerList v_list2; + var RecordType v_rec1; + var UnorderedIntegerList v_ulist1:={1,-}; + var ShortUnorderedIntegerList v_ulist2; + var SetType v_set1; + + var integer v_matcher[2] := {1,-}; + + var boolean v_check1; + + v_list2:=v_list1; + v_rec1:=v_list2; //incompatible assignment according to TTCN-3:2012 + v_ulist2:=v_ulist1; + v_set1:=v_ulist2; //incompatible assignment according to TTCN-3:2012 + + v_check1 := (v_list2[0]==1); + + + if ( v_check1 ) + { + setverdict(pass); + } + else { + setverdict(fail); + } + } + + control{ + execute(TC_NegSem_060302_structured_types_019()); + } + +} diff --git a/ATS/core_language/06_types_and_values/0603_type_compatibility/060302_structured_types/Sem_060302_structured_types_001.ttcn b/ATS/core_language/06_types_and_values/0603_type_compatibility/060302_structured_types/Sem_060302_structured_types_001.ttcn new file mode 100644 index 00000000..3ec1cb89 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0603_type_compatibility/060302_structured_types/Sem_060302_structured_types_001.ttcn @@ -0,0 +1,97 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:6.3.2, Ensure that the IUT correctly handles assignments from structures having compatible types and type ranges + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +module Sem_060302_structured_types_001 { + + type enumerated EnumeratedType {e_black, e_white}; + type EnumeratedType EnumeratedSynonym; + + type record RecordType { + integer a(0..10) optional, + integer b(0..10) optional, + boolean c + } + type record ModifiedRecord { + integer e optional, + integer f(0..5) optional, + boolean g + } + + type set SetType { + integer a(0..10) optional, + integer b(0..10) optional, + boolean c + } + type set ModifiedSet { + integer e optional, + integer f(0..5) optional, + boolean g + } + + type record of integer IntegerList(0..10); + type record of integer ModifiedList; + + type set of integer IntegerUnorderedList(0..10); + type set of integer ModifiedUnorderedList; + + type union UnionType { + integer a(0..10), + EnumeratedType b, + boolean c + } + type union ModifiedUnion { + integer a, + boolean c, + EnumeratedSynonym b + } + + +type component GeneralComp { +} + +testcase TC_Sem_060302_structured_types_001() runs on GeneralComp { + + var EnumeratedType v_enum1:=e_black; + var EnumeratedSynonym v_enum2; + var ModifiedRecord v_rec1:={f:=4,e:=8,g:=false}; + var RecordType v_rec2; + var ModifiedSet v_set1:={f:=4,e:=8,g:=false}; + var SetType v_set2; + var ModifiedList v_list1:={2,4,8}; + var IntegerList v_list2; + var ModifiedUnorderedList v_ulist1:={2,4,8}; + var IntegerUnorderedList v_ulist2; + var ModifiedUnion v_union1:={a:=2}; + var UnionType v_union2; + + v_enum2:=v_enum1; + v_rec2:=v_rec1; + v_set2:=v_set1; + v_list2:=v_list1; + v_ulist2:=v_ulist1; + v_union2:=v_union1; + + if ( + (v_enum2==e_black) and + (v_rec2.a==8 and v_rec2.b==4 and v_rec2.c==false) and + (v_set2.a==8 and v_set2.b==4 and v_set2.c==false) and + (v_list2[0]==2 and v_list2[1]==4 and v_list2[2]==8) and + (v_ulist2[0]==2 and v_ulist2[1]==4 and v_ulist2[2]==8) and + (v_union2.a==2) + ) { + setverdict(pass); + } + else { + setverdict(fail); + } +} + +control{ + execute(TC_Sem_060302_structured_types_001()); +} + +} diff --git a/ATS/core_language/06_types_and_values/0603_type_compatibility/060302_structured_types/Sem_060302_structured_types_002.ttcn b/ATS/core_language/06_types_and_values/0603_type_compatibility/060302_structured_types/Sem_060302_structured_types_002.ttcn new file mode 100644 index 00000000..0fcbfb21 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0603_type_compatibility/060302_structured_types/Sem_060302_structured_types_002.ttcn @@ -0,0 +1,60 @@ +/*************************************************** + ** @author STF 409 (updated by STF 521) + ** @version 0.0.2 + ** @purpose 1:6.3.2, Ensure that the IUT correctly handles assignments from structures having compatible types and lengths + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +module Sem_060302_structured_types_002 { + + type record RecordType { + integer a, + integer b optional + } + + type set SetType { + integer a, + integer b optional + } + + type record length (1..2) of integer ShortIntegerList; + type record of integer IntegerList; + + type set length (1..2) of integer ShortUnorderedIntegerList; + type set of integer UnorderedIntegerList; + + + type component GeneralComp { + } + + testcase TC_Sem_060302_structured_types_002() runs on GeneralComp { + + var IntegerList v_list1:={1,-}; + var ShortIntegerList v_list2; + var UnorderedIntegerList v_ulist1:={1,-}; + var ShortUnorderedIntegerList v_ulist2; + + var integer v_matcher[2] := {1,-}; + + var boolean v_check; + + v_list2:=v_list1; + v_ulist2:=v_ulist1; + + v_check := (v_list2[0]==1); + + + if ( v_check ) + { + setverdict(pass); + } + else { + setverdict(fail); + } + } + + control{ + execute(TC_Sem_060302_structured_types_002()); + } + +} diff --git a/ATS/core_language/06_types_and_values/0603_type_compatibility/060302_structured_types/Sem_060302_structured_types_003.ttcn b/ATS/core_language/06_types_and_values/0603_type_compatibility/060302_structured_types/Sem_060302_structured_types_003.ttcn new file mode 100644 index 00000000..f3726071 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0603_type_compatibility/060302_structured_types/Sem_060302_structured_types_003.ttcn @@ -0,0 +1,51 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:6.3.2, Ensure that the IUT correctly handles assignments from structures having compatible types and type ranges + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +module Sem_060302_structured_types_003 { + + + type record RecordType { + integer a(0..10) optional, + integer b(0..10) optional, + boolean c + } + + type set SetType { + integer a(0..10) optional, + integer b(0..10) optional, + boolean c + } + + + +type component GeneralComp { +} + +testcase TC_Sem_060302_structured_types_003() runs on GeneralComp { + + var RecordType v_rec1:={a:=4,b:=8,c:=false}; + var SetType v_set1; + + v_set1.a:=v_rec1.a; + v_set1.b:=v_rec1.b; + v_set1.c:=v_rec1.c; + + if ( + v_set1.a==4 and v_set1.b==8 and v_set1.c==false + ) { + setverdict(pass); + } + else { + setverdict(fail); + } +} + +control{ + execute(TC_Sem_060302_structured_types_003()); +} + +} diff --git a/ATS/core_language/06_types_and_values/0603_type_compatibility/060302_structured_types/Sem_060302_structured_types_004.ttcn b/ATS/core_language/06_types_and_values/0603_type_compatibility/060302_structured_types/Sem_060302_structured_types_004.ttcn new file mode 100644 index 00000000..9e5590f7 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0603_type_compatibility/060302_structured_types/Sem_060302_structured_types_004.ttcn @@ -0,0 +1,50 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:6.3.2, Ensure that the IUT correctly handles assignments from structures having compatible anytypes + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +module Sem_060302_structured_types_004 { + + import from Sem_060302_structured_types_004_importA all; + import from Sem_060302_structured_types_004_importB all; + + +type component GeneralComp { +} + +testcase TC_Sem_060302_structured_types_004() runs on GeneralComp { + + var Sem_060302_structured_types_004_importA.Atype v_a; + var Sem_060302_structured_types_004_importB.Atype v_b := { integer := 1 } + + v_a:=v_b; + + if ( match(v_a.integer, 1) ) { + setverdict(pass); + } + else { + setverdict(fail); + } +} + +control{ + execute(TC_Sem_060302_structured_types_004()); +} + +} + + +module Sem_060302_structured_types_004_importA { + type integer I (0..2); + type float F; + type anytype Atype; + } + + +module Sem_060302_structured_types_004_importB { + type integer I (0..2); + type anytype Atype; +} + diff --git a/ATS/core_language/06_types_and_values/0603_type_compatibility/060302_structured_types/Sem_060302_structured_types_005.ttcn b/ATS/core_language/06_types_and_values/0603_type_compatibility/060302_structured_types/Sem_060302_structured_types_005.ttcn new file mode 100644 index 00000000..a94bb3f5 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0603_type_compatibility/060302_structured_types/Sem_060302_structured_types_005.ttcn @@ -0,0 +1,46 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:6.3.2, Ensure that the IUT correctly handles assignments from structures having compatible types and type ranges + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +module Sem_060302_structured_types_005 { + + + type record RecordType { + integer a(0..10) optional, + integer b(0..10) optional, + boolean c + } + + type record of RecordType RecordList; + + + +type component GeneralComp { +} + +testcase TC_Sem_060302_structured_types_005() runs on GeneralComp { + + var RecordList v_list; + var RecordType v_record:={a:=1,b:=2,c:=false}; + var integer v_int; + + + v_list:= {v_record,v_record}; + v_int:=v_list[1].b; + + if ( v_int==2 ) { + setverdict(pass); + } + else { + setverdict(fail); + } +} + +control{ + execute(TC_Sem_060302_structured_types_005()); +} + +} diff --git a/ATS/core_language/06_types_and_values/0603_type_compatibility/060302_structured_types/Sem_060302_structured_types_006.ttcn b/ATS/core_language/06_types_and_values/0603_type_compatibility/060302_structured_types/Sem_060302_structured_types_006.ttcn new file mode 100644 index 00000000..b9395986 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0603_type_compatibility/060302_structured_types/Sem_060302_structured_types_006.ttcn @@ -0,0 +1,62 @@ +/*************************************************** + ** @author STF 451 + ** @version 0.0.1 + ** @purpose 1:6.3.2, Ensure that the IUT correctly handles assignments from structures having compatible types and lengths + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +module Sem_060302_structured_types_006 { + + type record RecordType { + integer a, + integer b optional + } + + type set SetType { + integer a, + integer b optional + } + + type record length (1..2) of integer ShortIntegerList; + type record of integer IntegerList; + + type set length (1..2) of integer ShortUnorderedIntegerList; + type set of integer UnorderedIntegerList; + + + type component GeneralComp { + } + + testcase TC_Sem_060302_structured_types_006() runs on GeneralComp { + + var IntegerList v_list1:={0,-}; + var ShortIntegerList v_list2; + var RecordType v_rec1; + var UnorderedIntegerList v_ulist1:={1,-}; + var ShortUnorderedIntegerList v_ulist2; + var SetType v_set1; + + var integer v_matcher[2] := {1,-}; + + var boolean v_check1; + + v_list1:=v_matcher; + v_list2:=v_list1; + + + v_check1 := (v_list2[0]==1); + + if ( v_check1 ) + { + setverdict(pass); + } + else { + setverdict(fail); + } + } + + control{ + execute(TC_Sem_060302_structured_types_006()); + } + +} diff --git a/ATS/core_language/06_types_and_values/0603_type_compatibility/060303_component_types/NegSem_060303_component_types_001.ttcn b/ATS/core_language/06_types_and_values/0603_type_compatibility/060303_component_types/NegSem_060303_component_types_001.ttcn new file mode 100644 index 00000000..07ff5ecb --- /dev/null +++ b/ATS/core_language/06_types_and_values/0603_type_compatibility/060303_component_types/NegSem_060303_component_types_001.ttcn @@ -0,0 +1,43 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:6.3.3, Ensure that the IUT correctly handles component incompatibility due to differing list of constant definitions + ** @verdict pass reject + ***************************************************/ + +module NegSem_060303_component_types_001 { + + type integer ConstrainedInteger(0..10); + + type component TestCaseComp { + const integer c_integer:=2; + } + + type component FunctionComp { + const integer c_integer:=2; + const ConstrainedInteger c_constrained:=2; + } + + function f_testFunction(integer p_arg) runs on FunctionComp return integer { + + var integer v_result; + v_result:=p_arg*c_integer; + return v_result; + } + + testcase TC_NegSem_060303_component_types_001() runs on TestCaseComp { + + var integer v_int:=1; + + v_int := f_testFunction(v_int); + // runs on mtc with type TestCaseComp + // f_testFunction needs to run on FunctionComp + // which has 2 variables not 1 as TestCaseComp + setverdict (fail, "ERROR expected: function runs on mtc with type TestCaseComp f_testFunction needs to run on FunctionComp which has 2 variables not 1 as TestCaseComp"); + } + + control { + execute(TC_NegSem_060303_component_types_001()); + } + +} diff --git a/ATS/core_language/06_types_and_values/0603_type_compatibility/060303_component_types/NegSem_060303_component_types_002.ttcn b/ATS/core_language/06_types_and_values/0603_type_compatibility/060303_component_types/NegSem_060303_component_types_002.ttcn new file mode 100644 index 00000000..f2916452 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0603_type_compatibility/060303_component_types/NegSem_060303_component_types_002.ttcn @@ -0,0 +1,42 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:6.3.3, Ensure that the IUT correctly handles component incompatibility due to differing constant types having same name + ** @verdict pass reject + ***************************************************/ + +module NegSem_060303_component_types_002 { + + type integer ConstrainedInteger(0..10); + + type component TestCaseComp { + const integer c_integer:=2; + const integer c_constrained:=2; + } + + type component FunctionComp { + const integer c_integer:=2; + const ConstrainedInteger c_constrained:=2; + } + + function f_testFunction(integer p_arg) runs on FunctionComp return integer { + + var integer v_result; + v_result:=p_arg*c_integer; + return v_result; + } + + testcase TC_NegSem_060303_component_types_002() runs on TestCaseComp { + + var integer v_int:=1; + + f_testFunction(v_int); + + setverdict(fail, "Error expected: as component types are not compatible since their definitions are not identical."); + } + + control { + execute(TC_NegSem_060303_component_types_002()); + } + +} diff --git a/ATS/core_language/06_types_and_values/0603_type_compatibility/060303_component_types/Sem_060303_component_types_001.ttcn b/ATS/core_language/06_types_and_values/0603_type_compatibility/060303_component_types/Sem_060303_component_types_001.ttcn new file mode 100644 index 00000000..853a71cf --- /dev/null +++ b/ATS/core_language/06_types_and_values/0603_type_compatibility/060303_component_types/Sem_060303_component_types_001.ttcn @@ -0,0 +1,45 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:6.3.3, Ensure that the IUT correctly handles assignments from structures having compatible components + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +module Sem_060303_component_types_001 { + + type integer ConstrainedInteger(0..10); + + type component TestCaseComp { + const integer c_integer:=2; + const ConstrainedInteger c_constrained:=2; + } + + type component FunctionComp { + const integer c_integer:=2; + const ConstrainedInteger c_constrained:=2; + } + + function f_testFunction(integer p_arg) runs on FunctionComp return integer { + + var integer v_result; + v_result:=p_arg*c_integer*c_constrained; + return v_result; + } + + testcase TC_Sem_060303_component_types_001() runs on TestCaseComp { + + var integer v_int:=1; + + if ( f_testFunction(v_int)==4 ) { + setverdict(pass); + } + else { + setverdict(fail); + } + } + + control { + execute(TC_Sem_060303_component_types_001()); + } + +} diff --git a/ATS/core_language/06_types_and_values/0603_type_compatibility/060303_component_types/Sem_060303_component_types_002.ttcn b/ATS/core_language/06_types_and_values/0603_type_compatibility/060303_component_types/Sem_060303_component_types_002.ttcn new file mode 100644 index 00000000..87ba200b --- /dev/null +++ b/ATS/core_language/06_types_and_values/0603_type_compatibility/060303_component_types/Sem_060303_component_types_002.ttcn @@ -0,0 +1,44 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:6.3.3, Ensure that the IUT correctly handles assignments from structures having compatible components + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +module Sem_060303_component_types_002 { + + type integer ConstrainedInteger(0..10); + + type component TestCaseComp { + const integer c_integer:=2; + const ConstrainedInteger c_constrained:=2; + } + + type component FunctionComp { + const integer c_integer:=2; + } + + function f_testFunction(integer p_arg) runs on FunctionComp return integer { + + var integer v_result; + v_result:=p_arg*c_integer; + return v_result; + } + + testcase TC_Sem_060303_component_types_002() runs on TestCaseComp { + + var integer v_int:=2; + + if ( f_testFunction(v_int)==4 ) { + setverdict(pass); + } + else { + setverdict(fail); + } + } + + control { + execute(TC_Sem_060303_component_types_002()); + } + +} diff --git a/ATS/core_language/06_types_and_values/0603_type_compatibility/060304_compatibility_of_communication_operations/NegSem_060304_compatibility_of_communication_operations_001.ttcn b/ATS/core_language/06_types_and_values/0603_type_compatibility/060304_compatibility_of_communication_operations/NegSem_060304_compatibility_of_communication_operations_001.ttcn new file mode 100644 index 00000000..b9f29231 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0603_type_compatibility/060304_compatibility_of_communication_operations/NegSem_060304_compatibility_of_communication_operations_001.ttcn @@ -0,0 +1,36 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:6.3.4, compatible but not strongly typed value in send operation + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// The communication operations (see clause 22) send, receive, trigger, call, getcall, +// reply, getreply and raise and connection operations connect, map, disconnect and +// unmap (see clause 21.1) are exceptions to the weaker rule of type compatibility +// and require strong typing. The types of values or templates directly used as +// parameters to these operations shall also be explicitly defined in the associated +// port type definition. + +module NegSem_060304_compatibility_of_communication_operations_001 +{ + type port P message { + inout charstring; + } + + type component GeneralComp { + port P p; + } + + type charstring MyString; // synonym + + testcase TC_NegSem_060304_compatibility_of_communication_operations_001() runs on GeneralComp { + p.send(MyString:"abc"); + setverdict(pass); + } + + control { + execute(TC_NegSem_060304_compatibility_of_communication_operations_001()); + } +} diff --git a/ATS/core_language/06_types_and_values/0603_type_compatibility/060304_compatibility_of_communication_operations/NegSem_060304_compatibility_of_communication_operations_002.ttcn b/ATS/core_language/06_types_and_values/0603_type_compatibility/060304_compatibility_of_communication_operations/NegSem_060304_compatibility_of_communication_operations_002.ttcn new file mode 100644 index 00000000..c3d1e718 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0603_type_compatibility/060304_compatibility_of_communication_operations/NegSem_060304_compatibility_of_communication_operations_002.ttcn @@ -0,0 +1,40 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:6.3.4, compatible but not strongly typed value in receive operation + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// The communication operations (see clause 22) send, receive, trigger, call, getcall, +// reply, getreply and raise and connection operations connect, map, disconnect and +// unmap (see clause 21.1) are exceptions to the weaker rule of type compatibility +// and require strong typing. The types of values or templates directly used as +// parameters to these operations shall also be explicitly defined in the associated +// port type definition. + +module NegSem_060304_compatibility_of_communication_operations_002 +{ + type port P message { + inout charstring; + } + + type component GeneralComp { + port P p; + } + + type charstring MyString; // synonym + + testcase TC_NegSem_060304_compatibility_of_communication_operations_002() runs on GeneralComp { + p.send(charstring:"abc"); + alt { + []p.receive(MyString:?) {} + []p.receive {} // to avoid alt error in case the previous statement is incorrectly accepted + } + setverdict(pass); + } + + control { + execute(TC_NegSem_060304_compatibility_of_communication_operations_002()); + } +} diff --git a/ATS/core_language/06_types_and_values/0603_type_compatibility/060304_compatibility_of_communication_operations/NegSem_060304_compatibility_of_communication_operations_003.ttcn b/ATS/core_language/06_types_and_values/0603_type_compatibility/060304_compatibility_of_communication_operations/NegSem_060304_compatibility_of_communication_operations_003.ttcn new file mode 100644 index 00000000..6674350a --- /dev/null +++ b/ATS/core_language/06_types_and_values/0603_type_compatibility/060304_compatibility_of_communication_operations/NegSem_060304_compatibility_of_communication_operations_003.ttcn @@ -0,0 +1,48 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:6.3.4, compatible but not strongly typed value in raise operation + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// The communication operations (see clause 22) send, receive, trigger, call, getcall, +// reply, getreply and raise and connection operations connect, map, disconnect and +// unmap (see clause 21.1) are exceptions to the weaker rule of type compatibility +// and require strong typing. The types of values or templates directly used as +// parameters to these operations shall also be explicitly defined in the associated +// port type definition. + +module NegSem_060304_compatibility_of_communication_operations_003 +{ + signature S() exception (charstring); + + type port P procedure { + inout S; + } + + type component GeneralComp { + port P p; + } + + type charstring MyString; // synonym + + function f_mirror() runs on GeneralComp { + p.getcall(S:?); + p.raise(S, MyString:"abc"); + } + + testcase TC_NegSem_060304_compatibility_of_communication_operations_003() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create("PTC"); + connect(self:p, v_ptc:p); + v_ptc.start(f_mirror()); + p.call(S:{}) { + [] p.catch {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_060304_compatibility_of_communication_operations_003()); + } +} diff --git a/ATS/core_language/06_types_and_values/0603_type_compatibility/060304_compatibility_of_communication_operations/NegSem_060304_compatibility_of_communication_operations_004.ttcn b/ATS/core_language/06_types_and_values/0603_type_compatibility/060304_compatibility_of_communication_operations/NegSem_060304_compatibility_of_communication_operations_004.ttcn new file mode 100644 index 00000000..337039d3 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0603_type_compatibility/060304_compatibility_of_communication_operations/NegSem_060304_compatibility_of_communication_operations_004.ttcn @@ -0,0 +1,48 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:6.3.4, compatible but not strongly typed value in raise operation + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// The communication operations (see clause 22) send, receive, trigger, call, getcall, +// reply, getreply and raise and connection operations connect, map, disconnect and +// unmap (see clause 21.1) are exceptions to the weaker rule of type compatibility +// and require strong typing. The types of values or templates directly used as +// parameters to these operations shall also be explicitly defined in the associated +// port type definition. + +module NegSem_060304_compatibility_of_communication_operations_004 +{ + signature S() exception (charstring); + + type port P procedure { + inout S; + } + + type component GeneralComp { + port P p; + } + + type charstring MyString; // synonym + + function f_mirror() runs on GeneralComp { + p.getcall(S:?); + p.raise(S, "abc"); + } + + testcase TC_NegSem_060304_compatibility_of_communication_operations_003() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create("PTC"); + connect(self:p, v_ptc:p); + v_ptc.start(f_mirror()); + p.call(S:{}) { + [] p.catch(S, MyString:?) {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_060304_compatibility_of_communication_operations_003()); + } +} diff --git a/ATS/core_language/06_types_and_values/0603_type_compatibility/060304_compatibility_of_communication_operations/NegSem_060304_compatibility_of_communication_operations_005.ttcn b/ATS/core_language/06_types_and_values/0603_type_compatibility/060304_compatibility_of_communication_operations/NegSem_060304_compatibility_of_communication_operations_005.ttcn new file mode 100644 index 00000000..9fe30e06 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0603_type_compatibility/060304_compatibility_of_communication_operations/NegSem_060304_compatibility_of_communication_operations_005.ttcn @@ -0,0 +1,42 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:6.3.4, compatible but not strongly typed value in trigger operation + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// The communication operations (see clause 22) send, receive, trigger, call, getcall, +// reply, getreply and raise and connection operations connect, map, disconnect and +// unmap (see clause 21.1) are exceptions to the weaker rule of type compatibility +// and require strong typing. The types of values or templates directly used as +// parameters to these operations shall also be explicitly defined in the associated +// port type definition. + +module NegSem_060304_compatibility_of_communication_operations_005 +{ + type port P message { + inout charstring; + } + + type component GeneralComp { + port P p; + } + + type charstring MyString; // synonym + + testcase TC_NegSem_060304_compatibility_of_communication_operations_005() runs on GeneralComp { + timer t := 2.0; + t.start; + p.send(charstring:"abc"); + alt { + []p.trigger(MyString:?) {} + []t.timeout {} // to avoid endless blocking in case the previous statement is incorrectly accepted + } + setverdict(pass); + } + + control { + execute(TC_NegSem_060304_compatibility_of_communication_operations_005()); + } +} diff --git a/ATS/core_language/06_types_and_values/0603_type_compatibility/060305_compatibility_of_anytype_types/NegSem_060305_compatibility_of_anytype_types_001.ttcn b/ATS/core_language/06_types_and_values/0603_type_compatibility/060305_compatibility_of_anytype_types/NegSem_060305_compatibility_of_anytype_types_001.ttcn new file mode 100644 index 00000000..dca199ab --- /dev/null +++ b/ATS/core_language/06_types_and_values/0603_type_compatibility/060305_compatibility_of_anytype_types/NegSem_060305_compatibility_of_anytype_types_001.ttcn @@ -0,0 +1,52 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:5.3.0.6, ensure that anytype types are only compatible with other anytype types. + ** @verdict pass reject + ***************************************************/ + +/*The following requirement is tested: + * Only anytype types that are constrained to a fixed set of types via list subtyping + * can be a potential cause for anytype incompatibility, i.e. if the set of types contained + * in type "B" does not contain the type selected in "a". +*/ + +module NegSem_060305_compatibility_of_anytype_types_001 { + + import from NegSem_060305_compatibility_of_anytype_types_001_importB all; + import from NegSem_060305_compatibility_of_anytype_types_001_importC all; + + type integer I (0..9); + type charstring C; + type anytype Btype ({float:=?},{integer:=?}); + + type component GeneralComp { +} + + +testcase TC_NegSem_060305_compatibility_of_anytype_types_001() runs on GeneralComp { + + var NegSem_060305_compatibility_of_anytype_types_001_importB.Atype v_aa; + var Atype v_baI := { NegSem_060305_compatibility_of_anytype_types_001_importC.I := 1 }; + + v_aa := v_baI; // incorrect + setverdict(pass); +} + +control { + execute(TC_NegSem_060305_compatibility_of_anytype_types_001()); +} + +} + + +module NegSem_060305_compatibility_of_anytype_types_001_importB { + type integer I (0..2); + type anytype Atype ({I:=?},{integer:=?},{float:=?}); +} + +module NegSem_060305_compatibility_of_anytype_types_001_importC { + type integer I (0..2); + type float F; + type anytype Atype ({I:=?},{F:=?},{integer:=?}); + } \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0603_type_compatibility/060305_compatibility_of_anytype_types/Sem_060305_compatibility_of_anytype_types_001.ttcn b/ATS/core_language/06_types_and_values/0603_type_compatibility/060305_compatibility_of_anytype_types/Sem_060305_compatibility_of_anytype_types_001.ttcn new file mode 100644 index 00000000..caaa9845 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0603_type_compatibility/060305_compatibility_of_anytype_types/Sem_060305_compatibility_of_anytype_types_001.ttcn @@ -0,0 +1,43 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:5.3.0.6, ensure that anytype types are only compatible with other anytype types. + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +/*The following requirement is tested: + * An anytype value "a" of anytype type "A" is compatible with anytype type "B" + * if the alternative selected in "a"is also contained in "B". +*/ + +module Sem_060305_compatibility_of_anytype_types_001 { + type integer I (0..9); + type charstring C; + type anytype Atype ({I:=?},{C:=?},{integer:=?}); + type anytype Btype ({float:=?},{I:=?}); + + type component GeneralComp { +} + + +testcase TC_Sem_060305_compatibility_of_anytype_types_001() runs on GeneralComp { + var Atype v_x; + var Btype v_y; + v_x.I := 8; + v_y.I := 8; + + + if (match(v_x,v_y)) { + setverdict(pass); + } + else { + setverdict(fail,v_x,v_y); + } + +} + +control { + execute(TC_Sem_060305_compatibility_of_anytype_types_001()); +} + +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0603_type_compatibility/060305_compatibility_of_anytype_types/Sem_060305_compatibility_of_anytype_types_002.ttcn b/ATS/core_language/06_types_and_values/0603_type_compatibility/060305_compatibility_of_anytype_types/Sem_060305_compatibility_of_anytype_types_002.ttcn new file mode 100644 index 00000000..71f40aa7 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0603_type_compatibility/060305_compatibility_of_anytype_types/Sem_060305_compatibility_of_anytype_types_002.ttcn @@ -0,0 +1,43 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:5.3.0.6, ensure that anytype types are only compatible with other anytype types. + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +/*The following requirement is tested: + * An anytype value "a" of anytype type "A" is compatible with anytype type "B" + * if the alternative selected in "a"is also contained in "B". +*/ + +module Sem_060305_compatibility_of_anytype_types_002 { + type integer I (0..9); + type charstring C; + type anytype Atype ({I:=?},{C:=?},{integer:=?}); + type anytype Btype ({float:=?},{integer:=?}); + + type component GeneralComp { +} + + +testcase TC_Sem_060305_compatibility_of_anytype_types_002() runs on GeneralComp { + var Atype v_x; + var Btype v_y; + v_x.I := 8; + v_y.integer := 8; + + + if (match(v_x.I,8) and match(v_y.integer,8) and v_x != v_y) { + setverdict(pass); + } + else { + setverdict(fail,v_x,v_y); + } + +} + +control { + execute(TC_Sem_060305_compatibility_of_anytype_types_002()); +} + +} \ No newline at end of file diff --git a/ATS/core_language/06_types_and_values/0604_type_synonym/NOTES b/ATS/core_language/06_types_and_values/0604_type_synonym/NOTES new file mode 100644 index 00000000..2273c725 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0604_type_synonym/NOTES @@ -0,0 +1 @@ +- NOTE: rules involving synonyms have already been tested as part of section 6.3. \ No newline at end of file diff --git a/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/NOTES b/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/NOTES new file mode 100644 index 00000000..41d4a644 --- /dev/null +++ b/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/NOTES @@ -0,0 +1,2 @@ +- TODO: operator precedence not yet part of the tests. +- TODO: no negative tests. \ No newline at end of file diff --git a/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/NegSem_070101_ArithmeticOperators_001.ttcn b/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/NegSem_070101_ArithmeticOperators_001.ttcn new file mode 100644 index 00000000..f8eb4a28 --- /dev/null +++ b/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/NegSem_070101_ArithmeticOperators_001.ttcn @@ -0,0 +1,27 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:7.1.1, Ensure that Arithmetic operators are for integer and float values + ** @verdict pass reject + *****************************************************************/ + +module NegSem_070101_ArithmeticOperators_001 { + +type component GeneralComp { +} + +testcase TC_NegSem_070101_ArithmeticOperators_001() runs on GeneralComp { + var integer v_i := 20; + var boolean v_k :=true; + + var integer v_result := v_i*v_k; // not allowed int*boolean + + setverdict(pass); + + +} +control{ + execute(TC_NegSem_070101_ArithmeticOperators_001()); +} + +} diff --git a/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/NegSem_070101_ArithmeticOperators_002.ttcn b/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/NegSem_070101_ArithmeticOperators_002.ttcn new file mode 100644 index 00000000..d504b5bd --- /dev/null +++ b/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/NegSem_070101_ArithmeticOperators_002.ttcn @@ -0,0 +1,26 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:7.1.1, Ensure that arithmetic operators can handle same type of variables + ** @verdict pass reject + *****************************************************************/ + +module NegSem_070101_ArithmeticOperators_002 { + +type component GeneralComp { +} + +testcase TC_NegSem_070101_ArithmeticOperators_002() runs on GeneralComp { + var integer v_i := 20; + var float v_k :=2.0E0; + + var integer v_result := v_i*v_k; // not allowed int*float + + setverdict(pass); + +} +control{ + execute(TC_NegSem_070101_ArithmeticOperators_002()); +} + +} diff --git a/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/NegSem_070101_ArithmeticOperators_003.ttcn b/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/NegSem_070101_ArithmeticOperators_003.ttcn new file mode 100644 index 00000000..389a0de3 --- /dev/null +++ b/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/NegSem_070101_ArithmeticOperators_003.ttcn @@ -0,0 +1,25 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:7.1.1, Ensure that mod arithmetic operator can handle integer variables + ** @verdict pass reject + *****************************************************************/ + +module NegSem_070101_ArithmeticOperators_003 { + +type component GeneralComp { +} + +testcase TC_NegSem_070101_ArithmeticOperators_003() runs on GeneralComp { + var float v_i := 2.0E1; + var float v_k :=2.0E0; + + var integer v_result := v_i mod v_k; // mod operator is only for integer type + + setverdict(pass); +} +control{ + execute(TC_NegSem_070101_ArithmeticOperators_003()); +} + +} diff --git a/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/NegSem_070101_ArithmeticOperators_004.ttcn b/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/NegSem_070101_ArithmeticOperators_004.ttcn new file mode 100644 index 00000000..dc6ce581 --- /dev/null +++ b/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/NegSem_070101_ArithmeticOperators_004.ttcn @@ -0,0 +1,25 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:7.1.1, Ensure that rem arithmetic operator can handle integer variables + ** @verdict pass reject + *****************************************************************/ + +module NegSem_070101_ArithmeticOperators_004 { + +type component GeneralComp { +} + +testcase TC_NegSem_070101_ArithmeticOperators_004() runs on GeneralComp { + var float v_i := 2.0E1; + var float v_k :=2.0E0; + + var integer v_result := v_i rem v_k; // rem operator is only for integer type + + setverdict(pass); +} +control{ + execute(TC_NegSem_070101_ArithmeticOperators_004()); +} + +} diff --git a/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/NegSem_070101_ArithmeticOperators_008.ttcn b/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/NegSem_070101_ArithmeticOperators_008.ttcn new file mode 100644 index 00000000..de2525ff --- /dev/null +++ b/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/NegSem_070101_ArithmeticOperators_008.ttcn @@ -0,0 +1,26 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:7.1.1, Ensure that in x mod y arithmetic operator y is non-zero positive number + ** @verdict pass reject + *****************************************************************/ + +module NegSem_070101_ArithmeticOperators_008 { + +type component GeneralComp { +} + +testcase TC_NegSem_070101_ArithmeticOperators_008() runs on GeneralComp { + var integer v_i := 20; + var integer v_k :=0; + + var integer v_result := v_i mod v_k; // arithmetic operator mod with 0 is not allowed + + setverdict(pass); + +} +control{ + execute(TC_NegSem_070101_ArithmeticOperators_008()); +} + +} diff --git a/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/NegSem_070101_ArithmeticOperators_009.ttcn b/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/NegSem_070101_ArithmeticOperators_009.ttcn new file mode 100644 index 00000000..08b71b0c --- /dev/null +++ b/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/NegSem_070101_ArithmeticOperators_009.ttcn @@ -0,0 +1,26 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:7.1.1, Ensure that in x rem y arithmetic operator y is non-zero positive number + ** @verdict pass reject + *****************************************************************/ + +module NegSem_070101_ArithmeticOperators_009 { + +type component GeneralComp { +} + +testcase TC_NegSem_070101_ArithmeticOperators_009() runs on GeneralComp { + var integer v_i := 20; + var integer v_k :=0; + + var integer v_result := v_i rem v_k; // arithmetic operator rem with 0 is not allowed + + setverdict(pass); + +} +control{ + execute(TC_NegSem_070101_ArithmeticOperators_009()); +} + +} diff --git a/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/NegSem_070101_ArithmeticOperators_010.ttcn b/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/NegSem_070101_ArithmeticOperators_010.ttcn new file mode 100644 index 00000000..ab811790 --- /dev/null +++ b/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/NegSem_070101_ArithmeticOperators_010.ttcn @@ -0,0 +1,27 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:7.1.1, Ensure that in x rem y arithmetic operator y is non-zero positive number + ** @verdict pass reject + *****************************************************************/ + +module NegSem_070101_ArithmeticOperators_010 { + +type component GeneralComp { +} + +testcase TC_NegSem_070101_ArithmeticOperators_010() runs on GeneralComp { + var integer v_i := 20; + var integer v_k :=4; + var integer v_l :=2; + + var integer v_result := v_i rem (v_k mod v_l); // arithmetic operator rem with 0 is not allowed + + setverdict(pass); + +} +control{ + execute(TC_NegSem_070101_ArithmeticOperators_010()); +} + +} diff --git a/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_001.ttcn b/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_001.ttcn new file mode 100644 index 00000000..f8579ce7 --- /dev/null +++ b/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_001.ttcn @@ -0,0 +1,29 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:7.1.1, Ensure that the addition of two integer variables is evaluated correctly. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_070101_ArithmeticOperators_001 { + +type component GeneralComp { +} + +testcase TC_Sem_070101_ArithmeticOperators_001() runs on GeneralComp { + var integer v_i := 10; + var integer v_j := 2; + var integer v_result := v_i + v_j; + + if (v_result == 12) { + setverdict(pass); + } else { + setverdict(fail); + } +} + +control{ + execute(TC_Sem_070101_ArithmeticOperators_001()); +} + +} diff --git a/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_002.ttcn b/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_002.ttcn new file mode 100644 index 00000000..f56db469 --- /dev/null +++ b/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_002.ttcn @@ -0,0 +1,31 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:7.1.1, Ensure that the addition of multiple integer variables is evaluated correctly. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_070101_ArithmeticOperators_002 { + +type component GeneralComp { +} + +testcase TC_Sem_070101_ArithmeticOperators_002() runs on GeneralComp { + var integer v_i := 10; + var integer v_j := 2; + var integer v_k := 4; + var integer v_l := 6; + var integer v_result := v_i + v_j + v_k + v_l; + + if (v_result == 22) { + setverdict(pass); + } else { + setverdict(fail); + } +} + +control{ + execute(TC_Sem_070101_ArithmeticOperators_002()); +} + +} diff --git a/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_003.ttcn b/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_003.ttcn new file mode 100644 index 00000000..ab9cdd5d --- /dev/null +++ b/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_003.ttcn @@ -0,0 +1,29 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:7.1.1, Ensure that the addition of two integer variables is evaluated correctly when the expression contains a negative value. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_070101_ArithmeticOperators_003 { + +type component GeneralComp { +} + +testcase TC_Sem_070101_ArithmeticOperators_003() runs on GeneralComp { + var integer v_i := -10; + var integer v_j := 2; + var integer v_result := v_i + v_j; + + if (v_result == -8) { + setverdict(pass); + } else { + setverdict(fail); + } +} + +control{ + execute(TC_Sem_070101_ArithmeticOperators_003()); +} + +} diff --git a/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_004.ttcn b/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_004.ttcn new file mode 100644 index 00000000..dd09e72d --- /dev/null +++ b/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_004.ttcn @@ -0,0 +1,29 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:7.1.1, Ensure that the substraction of two integer variables is evaluated correctly. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_070101_ArithmeticOperators_004 { + +type component GeneralComp { +} + +testcase TC_Sem_070101_ArithmeticOperators_004() runs on GeneralComp { + var integer v_i := 10; + var integer v_j := 2; + var integer v_result := v_i - v_j; + + if (v_result == 8) { + setverdict(pass); + } else { + setverdict(fail); + } +} + +control{ + execute(TC_Sem_070101_ArithmeticOperators_004()); +} + +} diff --git a/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_005.ttcn b/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_005.ttcn new file mode 100644 index 00000000..39cbe4cf --- /dev/null +++ b/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_005.ttcn @@ -0,0 +1,30 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:7.1.1, Ensure that the substraction of multiple integer variables is evaluated correctly. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_070101_ArithmeticOperators_005 { + +type component GeneralComp { +} + +testcase TC_Sem_070101_ArithmeticOperators_005() runs on GeneralComp { + var integer v_i := 10; + var integer v_j := 2; + var integer v_k := 12; + var integer v_result := v_i - v_j - v_k; + + if (v_result == -4) { + setverdict(pass); + } else { + setverdict(fail); + } +} + +control{ + execute(TC_Sem_070101_ArithmeticOperators_005()); +} + +} diff --git a/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_006.ttcn b/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_006.ttcn new file mode 100644 index 00000000..dd8e7949 --- /dev/null +++ b/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_006.ttcn @@ -0,0 +1,29 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:7.1.1, Ensure that the multiplication of two integer variables is evaluated correctly. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_070101_ArithmeticOperators_006 { + +type component GeneralComp { +} + +testcase TC_Sem_070101_ArithmeticOperators_006() runs on GeneralComp { + var integer v_i := 10; + var integer v_j := 2; + var integer v_result := v_i * v_j; + + if (v_result == 20) { + setverdict(pass); + } else { + setverdict(fail); + } +} + +control{ + execute(TC_Sem_070101_ArithmeticOperators_006()); +} + +} diff --git a/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_007.ttcn b/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_007.ttcn new file mode 100644 index 00000000..36826b96 --- /dev/null +++ b/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_007.ttcn @@ -0,0 +1,31 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:7.1.1, Ensure that the multiplication of multiple integer variables is evaluated correctly. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_070101_ArithmeticOperators_007 { + +type component GeneralComp { +} + +testcase TC_Sem_070101_ArithmeticOperators_007() runs on GeneralComp { + var integer v_i := 10; + var integer v_j := 2; + var integer v_k := 4; + var integer v_l := 3; + var integer v_result := v_i * v_j * v_k * v_l; + + if (v_result == 240) { + setverdict(pass); + } else { + setverdict(fail); + } +} + +control{ + execute(TC_Sem_070101_ArithmeticOperators_007()); +} + +} diff --git a/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_008.ttcn b/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_008.ttcn new file mode 100644 index 00000000..e3d113a3 --- /dev/null +++ b/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_008.ttcn @@ -0,0 +1,29 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:7.1.1, Ensure that the division of two integer variables is evaluated correctly. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_070101_ArithmeticOperators_008 { + +type component GeneralComp { +} + +testcase TC_Sem_070101_ArithmeticOperators_008() runs on GeneralComp { + var integer v_i := 10; + var integer v_j := 2; + var integer v_result := v_i / v_j; + + if (v_result == 5) { + setverdict(pass); + } else { + setverdict(fail); + } +} + +control{ + execute(TC_Sem_070101_ArithmeticOperators_008()); +} + +} diff --git a/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_009.ttcn b/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_009.ttcn new file mode 100644 index 00000000..12a12b8b --- /dev/null +++ b/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_009.ttcn @@ -0,0 +1,30 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:7.1.1, Ensure that the division of multiple integer variables is evaluated correctly. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_070101_ArithmeticOperators_009 { + +type component GeneralComp { +} + +testcase TC_Sem_070101_ArithmeticOperators_009() runs on GeneralComp { + var integer v_i := 100; + var integer v_j := 4; + var integer v_k := 5; + var integer v_result := v_i / v_j / v_k; + + if (v_result == 5) { + setverdict(pass); + } else { + setverdict(fail); + } +} + +control{ + execute(TC_Sem_070101_ArithmeticOperators_009()); +} + +} diff --git a/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_010.ttcn b/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_010.ttcn new file mode 100644 index 00000000..b1e703f5 --- /dev/null +++ b/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_010.ttcn @@ -0,0 +1,28 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:7.1.1, Ensure that the application of the modulo operator on integer variables is evaluated correctly when the remainder is zero. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_070101_ArithmeticOperators_010 { + +type component GeneralComp { +} + +testcase TC_Sem_070101_ArithmeticOperators_010() runs on GeneralComp { + var integer v_i := 4; + var integer v_result := v_i mod 2; + + if (v_result == 0) { + setverdict(pass); + } else { + setverdict(fail); + } +} + +control{ + execute(TC_Sem_070101_ArithmeticOperators_010()); +} + +} diff --git a/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_011.ttcn b/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_011.ttcn new file mode 100644 index 00000000..17c5e31c --- /dev/null +++ b/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_011.ttcn @@ -0,0 +1,28 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:7.1.1, Ensure that the application of the modulo operator on integer variables is evaluated correctly when the integer value is smaller than the modulo value. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_070101_ArithmeticOperators_011 { + +type component GeneralComp { +} + +testcase TC_Sem_070101_ArithmeticOperators_011() runs on GeneralComp { + var integer v_i := 8; + var integer v_result := v_i mod 10; + + if (v_result == 8) { + setverdict(pass); + } else { + setverdict(fail); + } +} + +control{ + execute(TC_Sem_070101_ArithmeticOperators_011()); +} + +} diff --git a/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_012.ttcn b/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_012.ttcn new file mode 100644 index 00000000..80b5d0f5 --- /dev/null +++ b/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_012.ttcn @@ -0,0 +1,28 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:7.1.1, Ensure that the application of the modulo operator on integer variables is evaluated correctly when the integer value greater than the modulo value. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_070101_ArithmeticOperators_012 { + +type component GeneralComp { +} + +testcase TC_Sem_070101_ArithmeticOperators_012() runs on GeneralComp { + var integer v_i := 12; + var integer v_result := v_i mod 10; + + if (v_result == 2) { + setverdict(pass); + } else { + setverdict(fail); + } +} + +control{ + execute(TC_Sem_070101_ArithmeticOperators_012()); +} + +} diff --git a/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_013.ttcn b/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_013.ttcn new file mode 100644 index 00000000..06675311 --- /dev/null +++ b/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_013.ttcn @@ -0,0 +1,28 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:7.1.1, Ensure that the application of the modulo operator on integer variables is evaluated correctly when two consecutive modulo operators are applied. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_070101_ArithmeticOperators_013 { + +type component GeneralComp { +} + +testcase TC_Sem_070101_ArithmeticOperators_013() runs on GeneralComp { + var integer v_i := 11; + var integer v_result := (v_i mod 6) mod 3; + + if (v_result == 2) { + setverdict(pass); + } else { + setverdict(fail); + } +} + +control{ + execute(TC_Sem_070101_ArithmeticOperators_013()); +} + +} diff --git a/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_014.ttcn b/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_014.ttcn new file mode 100644 index 00000000..a617b2ae --- /dev/null +++ b/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_014.ttcn @@ -0,0 +1,28 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:7.1.1, Ensure that the application of the modulo operator on integer variables is evaluated correctly when the operand is a negative integer. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_070101_ArithmeticOperators_014 { + +type component GeneralComp { +} + +testcase TC_Sem_070101_ArithmeticOperators_014() runs on GeneralComp { + var integer v_i := -2; + var integer v_result := (v_i mod 3); + + if (v_result == 1) { + setverdict(pass); + } else { + setverdict(fail); + } +} + +control{ + execute(TC_Sem_070101_ArithmeticOperators_014()); +} + +} diff --git a/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_015.ttcn b/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_015.ttcn new file mode 100644 index 00000000..27cf6dae --- /dev/null +++ b/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_015.ttcn @@ -0,0 +1,28 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:7.1.1, Ensure that the application of the remainder operator on integer variables is evaluated correctly when the operand is a negative integer. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_070101_ArithmeticOperators_015 { + +type component GeneralComp { +} + +testcase TC_Sem_070101_ArithmeticOperators_015() runs on GeneralComp { + var integer v_i := -2; + var integer v_result := (v_i rem 3); + + if (v_result == -2) { + setverdict(pass); + } else { + setverdict(fail); + } +} + +control{ + execute(TC_Sem_070101_ArithmeticOperators_015()); +} + +} diff --git a/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_016.ttcn b/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_016.ttcn new file mode 100644 index 00000000..0d6a9270 --- /dev/null +++ b/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_016.ttcn @@ -0,0 +1,28 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:7.1.1, Ensure that the application of the remainder operator on integer variables is evaluated correctly when the operand is a negative integer. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_070101_ArithmeticOperators_016 { + +type component GeneralComp { +} + +testcase TC_Sem_070101_ArithmeticOperators_016() runs on GeneralComp { + var integer v_i := 2; + var integer v_result := (v_i rem 3); + + if (v_result == 2) { + setverdict(pass); + } else { + setverdict(fail); + } +} + +control{ + execute(TC_Sem_070101_ArithmeticOperators_016()); +} + +} diff --git a/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_017.ttcn b/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_017.ttcn new file mode 100644 index 00000000..135d0657 --- /dev/null +++ b/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_017.ttcn @@ -0,0 +1,28 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:7.1.1, Ensure that the consecutive application of the remainder operator and the modulo operator on integer variables is evaluated correctly. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_070101_ArithmeticOperators_017 { + +type component GeneralComp { +} + +testcase TC_Sem_070101_ArithmeticOperators_017() runs on GeneralComp { + var integer v_i := -2; + var integer v_result := (v_i rem 3) mod 3; + + if (v_result == 1) { + setverdict(pass); + } else { + setverdict(fail); + } +} + +control{ + execute(TC_Sem_070101_ArithmeticOperators_017()); +} + +} diff --git a/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_018.ttcn b/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_018.ttcn new file mode 100644 index 00000000..bce54ac3 --- /dev/null +++ b/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_018.ttcn @@ -0,0 +1,28 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:7.1.1, Ensure that operator combinations and the modulo operator on integer variables is evaluated correctly. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_070101_ArithmeticOperators_018 { + +type component GeneralComp { +} + +testcase TC_Sem_070101_ArithmeticOperators_018() runs on GeneralComp { + var integer v_i := 100; + var integer v_result := (((((v_i mod 75)/5)*2)+10)-22) rem 3; + + if (v_result == -2) { + setverdict(pass); + } else { + setverdict(fail); + } +} + +control{ + execute(TC_Sem_070101_ArithmeticOperators_018()); +} + +} diff --git a/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_019.ttcn b/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_019.ttcn new file mode 100644 index 00000000..f59d8be3 --- /dev/null +++ b/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_019.ttcn @@ -0,0 +1,41 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:7.1.1, Ensure that the addition operator works on float variables. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_070101_ArithmeticOperators_019 { + +type component GeneralComp { +} + +/** + * @desc Equals method for floats + * @return true if abs(f1 - f2) < 1.E-6 + */ +function f_isFloatNear(in float f1, in float f2) return boolean { + var float delta := f1-f2; + if (delta < 0.0) { + delta := 0.0 - delta; + } + return delta < 1E-6; +} + +testcase TC_Sem_070101_ArithmeticOperators_019() runs on GeneralComp { + var float v_i := 10.2; + var float v_j := 0.4; + var float v_result := v_i + v_j; + + if ( f_isFloatNear(v_result,10.6) ) { + setverdict(pass); + } else { + setverdict(fail); + } +} + +control{ + execute(TC_Sem_070101_ArithmeticOperators_019()); +} + +} diff --git a/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_020.ttcn b/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_020.ttcn new file mode 100644 index 00000000..027c3ac0 --- /dev/null +++ b/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_020.ttcn @@ -0,0 +1,41 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:7.1.1, Ensure that the substraction operator works on float variables. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_070101_ArithmeticOperators_020 { + +type component GeneralComp { +} + +/** + * @desc Equals method for floats + * @return true if abs(f1 - f2) < 1.E-6 + */ +function f_isFloatNear(in float f1, in float f2) return boolean { + var float delta := f1-f2; + if (delta < 0.0) { + delta := 0.0 - delta; + } + return delta < 1E-6; +} + +testcase TC_Sem_070101_ArithmeticOperators_020() runs on GeneralComp { + var float v_i := 10.2; + var float v_j := 0.4; + var float v_result := v_i - v_j; + + if ( f_isFloatNear(v_result,9.8) ) { + setverdict(pass); + } else { + setverdict(fail); + } +} + +control{ + execute(TC_Sem_070101_ArithmeticOperators_020()); +} + +} diff --git a/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_021.ttcn b/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_021.ttcn new file mode 100644 index 00000000..d9216eef --- /dev/null +++ b/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_021.ttcn @@ -0,0 +1,41 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:7.1.1, Ensure that the multiplication operator works on float variables. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_070101_ArithmeticOperators_021 { + +type component GeneralComp { +} + +/** + * @desc Equals method for floats + * @return true if abs(f1 - f2) < 1.E-6 + */ +function f_isFloatNear(in float f1, in float f2) return boolean { + var float delta := f1-f2; + if (delta < 0.0) { + delta := 0.0 - delta; + } + return delta < 1E-6; +} + +testcase TC_Sem_070101_ArithmeticOperators_021() runs on GeneralComp { + var float v_i := 10.2; + var float v_j := 0.4; + var float v_result := v_i * v_j; + + if ( f_isFloatNear(v_result,4.08) ) { + setverdict(pass); + } else { + setverdict(fail); + } +} + +control{ + execute(TC_Sem_070101_ArithmeticOperators_021()); +} + +} diff --git a/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_022.ttcn b/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_022.ttcn new file mode 100644 index 00000000..28c8b417 --- /dev/null +++ b/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_022.ttcn @@ -0,0 +1,41 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:7.1.1, Ensure that the division operator works on float variables. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_070101_ArithmeticOperators_022 { + +type component GeneralComp { +} + +/** + * @desc Equals method for floats + * @return true if abs(f1 - f2) < 1.E-6 + */ +function f_isFloatNear(in float f1, in float f2) return boolean { + var float delta := f1-f2; + if (delta < 0.0) { + delta := 0.0 - delta; + } + return delta < 1E-6; +} + +testcase TC_Sem_070101_ArithmeticOperators_022() runs on GeneralComp { + var float v_i := 10.2; + var float v_j := 0.4; + var float v_result := v_i / v_j; + + if ( f_isFloatNear(v_result,25.5) ) { + setverdict(pass); + } else { + setverdict(fail); + } +} + +control{ + execute(TC_Sem_070101_ArithmeticOperators_022()); +} + +} diff --git a/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_023.ttcn b/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_023.ttcn new file mode 100644 index 00000000..ab96edb0 --- /dev/null +++ b/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_023.ttcn @@ -0,0 +1,40 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:7.1.1, Ensure that the combination of different operators works on float variables. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_070101_ArithmeticOperators_023 { + +type component GeneralComp { +} + +/** + * @desc Equals method for floats + * @return true if abs(f1 - f2) < 1.E-6 + */ +function f_isFloatNear(in float f1, in float f2) return boolean { + var float delta := f1-f2; + if (delta < 0.0) { + delta := 0.0 - delta; + } + return delta < 1E-6; +} + +testcase TC_Sem_070101_ArithmeticOperators_023() runs on GeneralComp { + var float v_i := 10.2; + var float v_result := (((v_i * 2.3) / 0.4)+0.45)-0.1; + + if ( f_isFloatNear(v_result,59.0) ) { + setverdict(pass); + } else { + setverdict(fail); + } +} + +control{ + execute(TC_Sem_070101_ArithmeticOperators_023()); +} + +} diff --git a/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_024.ttcn b/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_024.ttcn new file mode 100644 index 00000000..5913cd7d --- /dev/null +++ b/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_024.ttcn @@ -0,0 +1,32 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:7.1.1, Ensure that the operator precedence is evaluated correctly. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_070101_ArithmeticOperators_024 { + +type component GeneralComp { +} + +testcase TC_Sem_070101_ArithmeticOperators_024() runs on GeneralComp { + var integer v_i := 4; + var integer v_j := 12; + var integer v_k := 18; + var integer v_l := 3; + + var integer v_result := v_i+v_j-v_k / v_l; + + if (v_result == 10) { + setverdict(pass); + } else { + setverdict(fail); + } +} + +control{ + execute(TC_Sem_070101_ArithmeticOperators_024()); +} + +} diff --git a/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_025.ttcn b/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_025.ttcn new file mode 100644 index 00000000..ed4331ce --- /dev/null +++ b/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_025.ttcn @@ -0,0 +1,32 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:7.1.1, Ensure that the operator precedence is evaluated correctly. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_070101_ArithmeticOperators_025 { + +type component GeneralComp { +} + +testcase TC_Sem_070101_ArithmeticOperators_025() runs on GeneralComp { + var integer v_i0 := 20; + var integer v_i1 := 16; + var integer v_i2 := 2; + var integer v_j := 4; + var integer v_k := 8; + + var integer v_result := v_i0 rem 3-v_j+v_i1/v_i2 mod 3*v_k; + + if (v_result == 14) { + setverdict(pass); + } else { + setverdict(fail); + } +} +control{ + execute(TC_Sem_070101_ArithmeticOperators_025()); +} + +} diff --git a/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_026.ttcn b/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_026.ttcn new file mode 100644 index 00000000..23634622 --- /dev/null +++ b/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_026.ttcn @@ -0,0 +1,30 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:7.1.1, Ensure that the operator precedence is evaluated correctly. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_070101_ArithmeticOperators_026 { + +type component GeneralComp { +} + +testcase TC_Sem_070101_ArithmeticOperators_026() runs on GeneralComp { + var integer v_i0 := 40; + var integer v_i1 := 6; + var integer v_i2 := 3; + + var integer v_result := v_i0 rem v_i1 mod v_i2; // equal precendence, then left-right evalution + + if (v_result == 1) { + setverdict(pass); + } else { + setverdict(fail); + } +} +control{ + execute(TC_Sem_070101_ArithmeticOperators_026()); +} + +} diff --git a/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_027.ttcn b/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_027.ttcn new file mode 100644 index 00000000..e0346ea7 --- /dev/null +++ b/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_027.ttcn @@ -0,0 +1,28 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:7.1.1, Ensure that arithmetic operators can handle special float values + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_070101_ArithmeticOperators_027 { + +type component GeneralComp { +} + +testcase TC_Sem_070101_ArithmeticOperators_027() runs on GeneralComp { + var float v_i := infinity; + var float v_k :=2.0E0; + + var float v_result := v_i + v_k; // "+" arithmetic operator with infinity + + if (v_result == infinity) { setverdict(pass,"match") } + else { setverdict(fail,v_result) } + + +} +control{ + execute(TC_Sem_070101_ArithmeticOperators_027()); +} + +} diff --git a/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_028.ttcn b/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_028.ttcn new file mode 100644 index 00000000..cf350fd9 --- /dev/null +++ b/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_028.ttcn @@ -0,0 +1,28 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:7.1.1, Ensure that arithmetic operators can handle special float values + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_070101_ArithmeticOperators_028 { + +type component GeneralComp { +} + +testcase TC_Sem_070101_ArithmeticOperators_028() runs on GeneralComp { + var float v_i := infinity; + var float v_k :=2.0E0; + + var float v_result := v_i - v_k; // "-" arithmetic operator with infinity + + if (v_result == infinity) { setverdict(pass,"match") } + else { setverdict(fail,v_result) } + + +} +control{ + execute(TC_Sem_070101_ArithmeticOperators_028()); +} + +} diff --git a/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_029.ttcn b/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_029.ttcn new file mode 100644 index 00000000..045a95aa --- /dev/null +++ b/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_029.ttcn @@ -0,0 +1,28 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:7.1.1, Ensure that arithmetic operators can handle special float values + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_070101_ArithmeticOperators_029 { + +type component GeneralComp { +} + +testcase TC_Sem_070101_ArithmeticOperators_029() runs on GeneralComp { + var float v_i := infinity; + var float v_k :=2.0E0; + + var float v_result := v_i * v_k; // "*" arithmetic operator with infinity + + if (v_result == infinity) { setverdict(pass,"match") } + else { setverdict(fail,v_result) } + + +} +control{ + execute(TC_Sem_070101_ArithmeticOperators_029()); +} + +} diff --git a/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_030.ttcn b/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_030.ttcn new file mode 100644 index 00000000..160b6214 --- /dev/null +++ b/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_030.ttcn @@ -0,0 +1,28 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:7.1.1, Ensure that arithmetic operators can handle special float values + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_070101_ArithmeticOperators_030 { + +type component GeneralComp { +} + +testcase TC_Sem_070101_ArithmeticOperators_030() runs on GeneralComp { + var float v_i := infinity; + var float v_k :=2.0E0; + + var float v_result := v_i / v_k; // "/" arithmetic operator with infinity + + if (v_result == infinity) { setverdict(pass,"match") } + else { setverdict(fail,v_result) } + + +} +control{ + execute(TC_Sem_070101_ArithmeticOperators_030()); +} + +} diff --git a/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_031.ttcn b/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_031.ttcn new file mode 100644 index 00000000..8a5dfc22 --- /dev/null +++ b/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_031.ttcn @@ -0,0 +1,28 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:7.1.1, Ensure that arithmetic operators can handle special float values + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_070101_ArithmeticOperators_031 { + +type component GeneralComp { +} + +testcase TC_Sem_070101_ArithmeticOperators_031() runs on GeneralComp { + var float v_i := -infinity; + var float v_k :=2.0E0; + + var float v_result := v_i + v_k; // "+" arithmetic operator with -infinity + + if (v_result == -infinity) { setverdict(pass,"match") } + else { setverdict(fail,v_result) } + + +} +control{ + execute(TC_Sem_070101_ArithmeticOperators_031()); +} + +} diff --git a/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_032.ttcn b/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_032.ttcn new file mode 100644 index 00000000..814d1be7 --- /dev/null +++ b/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_032.ttcn @@ -0,0 +1,28 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:7.1.1, Ensure that arithmetic operators can handle special float values + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_070101_ArithmeticOperators_032 { + +type component GeneralComp { +} + +testcase TC_Sem_070101_ArithmeticOperators_032() runs on GeneralComp { + var float v_i := -infinity; + var float v_k :=2.0E0; + + var float v_result := v_i - v_k; // "-" arithmetic operator with -infinity + + if (v_result == -infinity) { setverdict(pass,"match") } + else { setverdict(fail, v_result) } + + +} +control{ + execute(TC_Sem_070101_ArithmeticOperators_032()); +} + +} diff --git a/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_033.ttcn b/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_033.ttcn new file mode 100644 index 00000000..dad688a4 --- /dev/null +++ b/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_033.ttcn @@ -0,0 +1,28 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:7.1.1, Ensure that arithmetic operators can handle special float values + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_070101_ArithmeticOperators_033 { + +type component GeneralComp { +} + +testcase TC_Sem_070101_ArithmeticOperators_033() runs on GeneralComp { + var float v_i := -infinity; + var float v_k :=2.0E0; + + var float v_result := v_i * v_k; // "*" arithmetic operator with -infinity + + if (v_result == -infinity) { setverdict(pass,"match") } + else { setverdict(fail,v_result) } + + +} +control{ + execute(TC_Sem_070101_ArithmeticOperators_033()); +} + +} \ No newline at end of file diff --git a/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_034.ttcn b/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_034.ttcn new file mode 100644 index 00000000..a6d19498 --- /dev/null +++ b/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_034.ttcn @@ -0,0 +1,28 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:7.1.1, Ensure that arithmetic operators can handle special float values + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_070101_ArithmeticOperators_034 { + +type component GeneralComp { +} + +testcase TC_Sem_070101_ArithmeticOperators_034() runs on GeneralComp { + var float v_i := -infinity; + var float v_k :=2.0E0; + + var float v_result := v_i / v_k; // "/" arithmetic operator with -infinity + + if (v_result == -infinity) { setverdict(pass,"match") } + else { setverdict(fail,v_result) } + + +} +control{ + execute(TC_Sem_070101_ArithmeticOperators_034()); +} + +} diff --git a/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_035.ttcn b/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_035.ttcn new file mode 100644 index 00000000..c0927721 --- /dev/null +++ b/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_035.ttcn @@ -0,0 +1,28 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:7.1.1, Ensure that arithmetic operators can handle special float values + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_070101_ArithmeticOperators_035 { + +type component GeneralComp { +} + +testcase TC_Sem_070101_ArithmeticOperators_035() runs on GeneralComp { + var float v_i := not_a_number; + var float v_k :=2.0E0; + + var float v_result := v_i + v_k; // "+" arithmetic operator with NaN + + if (v_result == not_a_number) { setverdict(pass,"match") } + else { setverdict(fail,v_result) } + + +} +control{ + execute(TC_Sem_070101_ArithmeticOperators_035()); +} + +} diff --git a/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_036.ttcn b/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_036.ttcn new file mode 100644 index 00000000..726bf9ba --- /dev/null +++ b/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_036.ttcn @@ -0,0 +1,28 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:7.1.1, Ensure that arithmetic operators can handle special float values + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_070101_ArithmeticOperators_036 { + +type component GeneralComp { +} + +testcase TC_Sem_070101_ArithmeticOperators_036() runs on GeneralComp { + var float v_i := not_a_number; + var float v_k :=2.0E0; + + var float v_result := v_i - v_k; // "-" arithmetic operator with NaN + + if (v_result == not_a_number) { setverdict(pass,"match") } + else { setverdict(fail,v_result) } + + +} +control{ + execute(TC_Sem_070101_ArithmeticOperators_036()); +} + +} diff --git a/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_037.ttcn b/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_037.ttcn new file mode 100644 index 00000000..75d7939c --- /dev/null +++ b/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_037.ttcn @@ -0,0 +1,28 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:7.1.1, Ensure that arithmetic operators can handle special float values + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_070101_ArithmeticOperators_037 { + +type component GeneralComp { +} + +testcase TC_Sem_070101_ArithmeticOperators_037() runs on GeneralComp { + var float v_i := not_a_number; + var float v_k :=2.0E0; + + var float v_result := v_i * v_k; // "*" arithmetic operator with NaN + + if (v_result == not_a_number) { setverdict(pass,"match") } + else { setverdict(fail,v_result) } + + +} +control{ + execute(TC_Sem_070101_ArithmeticOperators_037()); +} + +} diff --git a/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_038.ttcn b/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_038.ttcn new file mode 100644 index 00000000..9a332d30 --- /dev/null +++ b/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_038.ttcn @@ -0,0 +1,28 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:7.1.1, Ensure that arithmetic operators can handle special float values + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_070101_ArithmeticOperators_038 { + +type component GeneralComp { +} + +testcase TC_Sem_070101_ArithmeticOperators_038() runs on GeneralComp { + var float v_i := not_a_number; + var float v_k :=2.0E0; + + var float v_result := v_i / v_k; // "/" arithmetic operator with NaN + + if (v_result == not_a_number) { setverdict(pass,"match") } + else { setverdict(fail,v_result) } + + +} +control{ + execute(TC_Sem_070101_ArithmeticOperators_038()); +} + +} diff --git a/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_039.ttcn b/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_039.ttcn new file mode 100644 index 00000000..d2fb0a72 --- /dev/null +++ b/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_039.ttcn @@ -0,0 +1,30 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:7.1.1, Ensure that arithmetic operators can handle special float values + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + + + +module Sem_070101_ArithmeticOperators_039 { + +type component GeneralComp { +} + +testcase TC_Sem_070101_ArithmeticOperators_039() runs on GeneralComp { + var float v_i := infinity; + var float v_k :=2.0E0; + + var float v_result := v_k / v_i; // Infinity special float as denominator + + if (v_result == 0.0) { setverdict(pass,"match") } + else { setverdict(fail,v_result) } + + +} +control{ + execute(TC_Sem_070101_ArithmeticOperators_039()); +} + +} diff --git a/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_040.ttcn b/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_040.ttcn new file mode 100644 index 00000000..ede1b135 --- /dev/null +++ b/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_040.ttcn @@ -0,0 +1,30 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:7.1.1, Ensure that arithmetic operators can handle special float values + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + + + +module Sem_070101_ArithmeticOperators_040 { + +type component GeneralComp { +} + +testcase TC_Sem_070101_ArithmeticOperators_040() runs on GeneralComp { + var float v_i := -infinity; + var float v_k :=2.0E0; + + var float v_result := v_k / v_i; // -Infinity special float as denominator + + if (v_result == 0.0) { setverdict(pass,"match") } + else { setverdict(fail,v_result) } + + +} +control{ + execute(TC_Sem_070101_ArithmeticOperators_040()); +} + +} diff --git a/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_041.ttcn b/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_041.ttcn new file mode 100644 index 00000000..58c5e996 --- /dev/null +++ b/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_041.ttcn @@ -0,0 +1,29 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:7.1.1, Ensure that arithmetic operators can handle special float values + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + + +module Sem_070101_ArithmeticOperators_041 { + +type component GeneralComp { +} + +testcase TC_Sem_070101_ArithmeticOperators_041() runs on GeneralComp { + var float v_i := not_a_number; + var float v_k :=2.0E0; + + var float v_result := v_k / v_i; // NaN special float as denominator + + if (v_result == not_a_number) { setverdict(pass,"match") } + else { setverdict(fail,v_result) } + + +} +control{ + execute(TC_Sem_070101_ArithmeticOperators_041()); +} + +} diff --git a/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_042.ttcn b/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_042.ttcn new file mode 100644 index 00000000..b16c375a --- /dev/null +++ b/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_042.ttcn @@ -0,0 +1,29 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:7.1.1, Ensure that arithmetic operators can handle special float values + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + + +module Sem_070101_ArithmeticOperators_042 { + +type component GeneralComp { +} + +testcase TC_Sem_070101_ArithmeticOperators_042() runs on GeneralComp { + var float v_i := not_a_number; + var float v_k :=not_a_number; + + var float v_result := v_k / v_i; // NaN special float as nominator and denominator + + if (v_result == not_a_number) { setverdict(pass,"match") } + else { setverdict(fail,v_result) } + + +} +control{ + execute(TC_Sem_070101_ArithmeticOperators_042()); +} + +} diff --git a/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_043.ttcn b/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_043.ttcn new file mode 100644 index 00000000..c0377bc1 --- /dev/null +++ b/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_043.ttcn @@ -0,0 +1,29 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:7.1.1, Ensure that arithmetic operators can handle special float values + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + + +module Sem_070101_ArithmeticOperators_043 { + +type component GeneralComp { +} + +testcase TC_Sem_070101_ArithmeticOperators_043() runs on GeneralComp { + var float v_i := infinity; + var float v_k := infinity; + + var float v_result := v_k / v_i; // infinity special float as nominator and denominator + + if (v_result == not_a_number) { setverdict(pass,"match") } + else { setverdict(fail,v_result) } + + +} +control{ + execute(TC_Sem_070101_ArithmeticOperators_043()); +} + +} diff --git a/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_044.ttcn b/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_044.ttcn new file mode 100644 index 00000000..1013b3c2 --- /dev/null +++ b/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_044.ttcn @@ -0,0 +1,29 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:7.1.1, Ensure that arithmetic operators can handle special float values + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + + +module Sem_070101_ArithmeticOperators_044 { + +type component GeneralComp { +} + +testcase TC_Sem_070101_ArithmeticOperators_044() runs on GeneralComp { + var float v_i := -infinity; + var float v_k := -infinity; + + var float v_result := v_k / v_i; // -infinity special float as nominator and denominator + + if (v_result == not_a_number) { setverdict(pass,"match") } + else { setverdict(fail,v_result) } + + +} +control{ + execute(TC_Sem_070101_ArithmeticOperators_044()); +} + +} diff --git a/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_045.ttcn b/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_045.ttcn new file mode 100644 index 00000000..968ab694 --- /dev/null +++ b/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_045.ttcn @@ -0,0 +1,29 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:7.1.1, Ensure that arithmetic operators can handle special float values + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + + +module Sem_070101_ArithmeticOperators_045 { + +type component GeneralComp { +} + +testcase TC_Sem_070101_ArithmeticOperators_045() runs on GeneralComp { + var float v_i := infinity; + var float v_k := -infinity; + + var float v_result := v_k / v_i; // -infinity special float as nominator and infinity special float as denominator + + if (v_result == not_a_number) { setverdict(pass,"match") } + else { setverdict(fail,v_result) } + + +} +control{ + execute(TC_Sem_070101_ArithmeticOperators_045()); +} + +} diff --git a/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_046.ttcn b/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_046.ttcn new file mode 100644 index 00000000..911e4181 --- /dev/null +++ b/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_046.ttcn @@ -0,0 +1,29 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:7.1.1, Ensure that arithmetic operators can handle special float values + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + + +module Sem_070101_ArithmeticOperators_046 { + +type component GeneralComp { +} + +testcase TC_Sem_070101_ArithmeticOperators_046() runs on GeneralComp { + var float v_i := -infinity; + var float v_k := infinity; + + var float v_result := v_k / v_i; // infinity special float as nominator and -infinity special float as denominator + + if (v_result == not_a_number) { setverdict(pass,"match") } + else { setverdict(fail,v_result) } + + +} +control{ + execute(TC_Sem_070101_ArithmeticOperators_046()); +} + +} diff --git a/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_047.ttcn b/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_047.ttcn new file mode 100644 index 00000000..98fafc8e --- /dev/null +++ b/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_047.ttcn @@ -0,0 +1,29 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:7.1.1, Ensure that arithmetic operators can handle special float values + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + + +module Sem_070101_ArithmeticOperators_047 { + +type component GeneralComp { +} + +testcase TC_Sem_070101_ArithmeticOperators_047() runs on GeneralComp { + var float v_i := not_a_number; + var float v_k := infinity; + + var float v_result := v_k / v_i; // infinity special float as nominator and NaN special float as denominator + + if (v_result == not_a_number) { setverdict(pass,"match") } + else { setverdict(fail,v_result) } + + +} +control{ + execute(TC_Sem_070101_ArithmeticOperators_047()); +} + +} diff --git a/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_048.ttcn b/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_048.ttcn new file mode 100644 index 00000000..8e78fa3c --- /dev/null +++ b/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_048.ttcn @@ -0,0 +1,29 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:7.1.1, Ensure that arithmetic operators can handle special float values + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + + +module Sem_070101_ArithmeticOperators_048 { + +type component GeneralComp { +} + +testcase TC_Sem_070101_ArithmeticOperators_048() runs on GeneralComp { + var float v_i := not_a_number; + var float v_k := -infinity; + + var float v_result := v_k / v_i; // -infinity special float as nominator and NaN special float as denominator + + if (v_result == not_a_number) { setverdict(pass,"match") } + else { setverdict(fail,v_result) } + + +} +control{ + execute(TC_Sem_070101_ArithmeticOperators_048()); +} + +} diff --git a/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_049.ttcn b/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_049.ttcn new file mode 100644 index 00000000..f230efd6 --- /dev/null +++ b/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_049.ttcn @@ -0,0 +1,29 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:7.1.1, Ensure that arithmetic operators can handle special float values + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + + +module Sem_070101_ArithmeticOperators_049 { + +type component GeneralComp { +} + +testcase TC_Sem_070101_ArithmeticOperators_049() runs on GeneralComp { + var float v_i := not_a_number; + var float v_k := infinity; + + var float v_result := v_i / v_k; // infinity special float as denominator and NaN special float as nominator + + if (v_result == not_a_number) { setverdict(pass,"match") } + else { setverdict(fail,v_result) } + + +} +control{ + execute(TC_Sem_070101_ArithmeticOperators_049()); +} + +} diff --git a/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_050.ttcn b/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_050.ttcn new file mode 100644 index 00000000..0fbc9700 --- /dev/null +++ b/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_050.ttcn @@ -0,0 +1,30 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:7.1.1, Ensure that arithmetic operators can handle special float values + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +/* Restriction c) With the exception of the equality and non-equality operators, the special value null shall not be used as an operand of expressions (see clause 7.1.3).*/ + +module Sem_070101_ArithmeticOperators_050 { + +type component GeneralComp { +} + +testcase TC_Sem_070101_ArithmeticOperators_050() runs on GeneralComp { + var float v_i := not_a_number; + var float v_k := -infinity; + + var float v_result := v_i / v_k; // -infinity special float as denominator and NaN special float as nominator + + if (v_result == not_a_number) { setverdict(pass,"match") } + else { setverdict(fail,v_result) } + + +} +control{ + execute(TC_Sem_070101_ArithmeticOperators_050()); +} + +} diff --git a/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_051.ttcn b/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_051.ttcn new file mode 100644 index 00000000..37e4d506 --- /dev/null +++ b/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_051.ttcn @@ -0,0 +1,32 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:7.1.3, Ensure that the equal to operator on address with value null is evaulated correctly + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_070101_ArithmeticOperators_051 { + +type component GeneralComp { +} + +type integer address; + +testcase TC_Sem_070101_ArithmeticOperators_051() runs on GeneralComp { + + var address My_address := null; + + + if (My_address == null) + { + setverdict(pass, My_address); + } else { + setverdict(fail,My_address); + } +} + +control{ + execute(TC_Sem_070101_ArithmeticOperators_051()); +} + +} diff --git a/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_052.ttcn b/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_052.ttcn new file mode 100644 index 00000000..dd595157 --- /dev/null +++ b/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_052.ttcn @@ -0,0 +1,35 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:7.1.3, Ensure that the not equal to operator on address with value null is evaulated correctly + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +/* Restriction c) With the exception of the equality and non-equality operators, the special value null shall not be used as an operand of expressions (see clause 7.1.3).*/ + + +module Sem_070101_ArithmeticOperators_052 { + +type component GeneralComp { +} + +type integer address; + +testcase TC_Sem_070101_ArithmeticOperators_052() runs on GeneralComp { + + var address My_address := 1; + + + if (My_address != null) + { + setverdict(pass, My_address); + } else { + setverdict(fail,My_address); + } +} + +control{ + execute(TC_Sem_070101_ArithmeticOperators_052()); +} + +} diff --git a/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_053.ttcn b/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_053.ttcn new file mode 100644 index 00000000..e4e8db7a --- /dev/null +++ b/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_053.ttcn @@ -0,0 +1,26 @@ +/***************************************************************** + ** @author STF 470 (updated by 521) + ** @version 0.0.1 + ** @purpose 1:7.1.1, verify that arithmetic operators can handle special float values according to the rules of IEEE 754 + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_070101_ArithmeticOperators_053 { + +type component GeneralComp { +} + +testcase TC_Sem_070101_ArithmeticOperators_053() runs on GeneralComp { + var float v_i := -infinity; + var float v_k :=2.0E0; + + var float v_result := v_i * v_k; // arithmetic operator with -infinity is allowed by IEEE 754 + + if (v_result == -infinity) { setverdict(pass); } + else { setverdict(fail); } +} +control{ + execute(TC_Sem_070101_ArithmeticOperators_053()); +} + +} diff --git a/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Syn_070101_ArithmeticOperators_001.ttcn b/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Syn_070101_ArithmeticOperators_001.ttcn new file mode 100644 index 00000000..db5a44cd --- /dev/null +++ b/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Syn_070101_ArithmeticOperators_001.ttcn @@ -0,0 +1,12 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:7.1.1, Ensure that the addition of two integers in a constant is accepted. + ** @verdict pass accept, noexecution + *****************************************************************/ + +module Syn_070101_ArithmeticOperators_001 { + +const integer c_result := 10 + 2; + +} diff --git a/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Syn_070101_ArithmeticOperators_002.ttcn b/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Syn_070101_ArithmeticOperators_002.ttcn new file mode 100644 index 00000000..e9ea11c3 --- /dev/null +++ b/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Syn_070101_ArithmeticOperators_002.ttcn @@ -0,0 +1,12 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:7.1.1, Ensure that the substraction of two integers in a constant is accepted. + ** @verdict pass accept, noexecution + *****************************************************************/ + +module Syn_070101_ArithmeticOperators_002 { + +const integer c_result := 10 - 2; + +} diff --git a/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Syn_070101_ArithmeticOperators_003.ttcn b/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Syn_070101_ArithmeticOperators_003.ttcn new file mode 100644 index 00000000..e995a63a --- /dev/null +++ b/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Syn_070101_ArithmeticOperators_003.ttcn @@ -0,0 +1,12 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:7.1.1, Ensure that the multiplication of two integers in a constant is accepted. + ** @verdict pass accept, noexecution + *****************************************************************/ + +module Syn_070101_ArithmeticOperators_003 { + +const integer c_result := 10 * 2; + +} diff --git a/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Syn_070101_ArithmeticOperators_004.ttcn b/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Syn_070101_ArithmeticOperators_004.ttcn new file mode 100644 index 00000000..57de7882 --- /dev/null +++ b/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Syn_070101_ArithmeticOperators_004.ttcn @@ -0,0 +1,12 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:7.1.1, Ensure that the division of two integers in a constant is accepted. + ** @verdict pass accept, noexecution + *****************************************************************/ + +module Syn_070101_ArithmeticOperators_004 { + +const integer c_result := 10 / 3; + +} diff --git a/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Syn_070101_ArithmeticOperators_005.ttcn b/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Syn_070101_ArithmeticOperators_005.ttcn new file mode 100644 index 00000000..7842643f --- /dev/null +++ b/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Syn_070101_ArithmeticOperators_005.ttcn @@ -0,0 +1,12 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:7.1.1, Ensure that the modulo operator on two integers is accepted. + ** @verdict pass accept, noexecution + *****************************************************************/ + +module Syn_070101_ArithmeticOperators_005 { + +const integer c_result := 10 mod 3; + +} diff --git a/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Syn_070101_ArithmeticOperators_006.ttcn b/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Syn_070101_ArithmeticOperators_006.ttcn new file mode 100644 index 00000000..8478acf6 --- /dev/null +++ b/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Syn_070101_ArithmeticOperators_006.ttcn @@ -0,0 +1,12 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:7.1.1, Ensure that the remainder operator on two integers is accepted. + ** @verdict pass accept, noexecution + *****************************************************************/ + +module Syn_070101_ArithmeticOperators_006 { + +const integer c_result := -2 rem 3; + +} diff --git a/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Syn_070101_ArithmeticOperators_007.ttcn b/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Syn_070101_ArithmeticOperators_007.ttcn new file mode 100644 index 00000000..93d33e12 --- /dev/null +++ b/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Syn_070101_ArithmeticOperators_007.ttcn @@ -0,0 +1,12 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:7.1.1, Ensure that operator combinations on integers is accepted. + ** @verdict pass accept, noexecution + *****************************************************************/ + +module Syn_070101_ArithmeticOperators_007 { + +const integer c_result := (((((100 mod 75)/5)*2)+10)-22) rem 3; + +} diff --git a/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Syn_070101_ArithmeticOperators_008.ttcn b/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Syn_070101_ArithmeticOperators_008.ttcn new file mode 100644 index 00000000..bd3e90f0 --- /dev/null +++ b/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Syn_070101_ArithmeticOperators_008.ttcn @@ -0,0 +1,12 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:7.1.1, Ensure that the addition operator on float constants is accepted. + ** @verdict pass accept, noexecution + *****************************************************************/ + +module Syn_070101_ArithmeticOperators_008 { + +const float c_result := 10.2 + 0.4; + +} diff --git a/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Syn_070101_ArithmeticOperators_009.ttcn b/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Syn_070101_ArithmeticOperators_009.ttcn new file mode 100644 index 00000000..245665a5 --- /dev/null +++ b/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Syn_070101_ArithmeticOperators_009.ttcn @@ -0,0 +1,12 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:7.1.1, Ensure that the substraction operator on float constants is accepted. + ** @verdict pass accept, noexecution + *****************************************************************/ + +module Syn_070101_ArithmeticOperators_009 { + +const float c_result := 10.2 - 0.4; + +} diff --git a/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Syn_070101_ArithmeticOperators_010.ttcn b/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Syn_070101_ArithmeticOperators_010.ttcn new file mode 100644 index 00000000..5430cabb --- /dev/null +++ b/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Syn_070101_ArithmeticOperators_010.ttcn @@ -0,0 +1,12 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:7.1.1, Ensure that the multiplication operator on float constants is accepted. + ** @verdict pass accept, noexecution + *****************************************************************/ + +module Syn_070101_ArithmeticOperators_010 { + +const float c_result := 10.2 * 0.4; + +} diff --git a/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Syn_070101_ArithmeticOperators_011.ttcn b/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Syn_070101_ArithmeticOperators_011.ttcn new file mode 100644 index 00000000..c5b5d8c9 --- /dev/null +++ b/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Syn_070101_ArithmeticOperators_011.ttcn @@ -0,0 +1,12 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:7.1.1, Ensure that the division operator on float constants is accepted. + ** @verdict pass accept, noexecution + *****************************************************************/ + +module Syn_070101_ArithmeticOperators_011 { + +const float c_result := 10.2 / 0.4; + +} diff --git a/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Syn_070101_ArithmeticOperators_012.ttcn b/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Syn_070101_ArithmeticOperators_012.ttcn new file mode 100644 index 00000000..0ef56076 --- /dev/null +++ b/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Syn_070101_ArithmeticOperators_012.ttcn @@ -0,0 +1,12 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:7.1.1, Ensure that a combination of operators on float constants is accepted. + ** @verdict pass accept, noexecution + *****************************************************************/ + +module Syn_070101_ArithmeticOperators_012 { + const float c_i := 1.5; + const float c_result := (((c_i * 2.3) / 0.4)+0.45)-0.1; + +} diff --git a/ATS/core_language/07_expressions/0701_operators/070102_list_operator/Sem_070102_ListOperator_001.ttcn b/ATS/core_language/07_expressions/0701_operators/070102_list_operator/Sem_070102_ListOperator_001.ttcn new file mode 100644 index 00000000..ce1b5985 --- /dev/null +++ b/ATS/core_language/07_expressions/0701_operators/070102_list_operator/Sem_070102_ListOperator_001.ttcn @@ -0,0 +1,26 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:7.1.2, Ensure that the list operator on bitstrings is evaluated correctly. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_070102_ListOperator_001 { + +type component GeneralComp { +} + +testcase TC_Sem_070102_ListOperator_001() runs on GeneralComp { + var bitstring v_result := '1111'B & '0000'B & '1111'B; + if (v_result == '111100001111'B) { + setverdict(pass); + } else { + setverdict(fail); + } +} + +control{ + execute(TC_Sem_070102_ListOperator_001()); +} + +} diff --git a/ATS/core_language/07_expressions/0701_operators/070102_list_operator/Sem_070102_ListOperator_002.ttcn b/ATS/core_language/07_expressions/0701_operators/070102_list_operator/Sem_070102_ListOperator_002.ttcn new file mode 100644 index 00000000..68c3f98a --- /dev/null +++ b/ATS/core_language/07_expressions/0701_operators/070102_list_operator/Sem_070102_ListOperator_002.ttcn @@ -0,0 +1,26 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:7.1.2, Ensure that the list operator on charstrings is evaluated correctly. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_070102_ListOperator_002 { + +type component GeneralComp { +} + +testcase TC_Sem_070102_ListOperator_002() runs on GeneralComp { + var charstring v_result := "Hello" & " " & "World!"; + if (v_result == "Hello World!") { + setverdict(pass); + } else { + setverdict(fail); + } +} + +control{ + execute(TC_Sem_070102_ListOperator_002()); +} + +} \ No newline at end of file diff --git a/ATS/core_language/07_expressions/0701_operators/070102_list_operator/Sem_070102_ListOperator_003.ttcn b/ATS/core_language/07_expressions/0701_operators/070102_list_operator/Sem_070102_ListOperator_003.ttcn new file mode 100644 index 00000000..e386da20 --- /dev/null +++ b/ATS/core_language/07_expressions/0701_operators/070102_list_operator/Sem_070102_ListOperator_003.ttcn @@ -0,0 +1,31 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:7.1.2, Ensure that the list operator on record of is evaluated correctly. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +module Sem_070102_ListOperator_003 { + +type component GeneralComp { +} + +type record of integer IntegerArray; + +testcase TC_Sem_070102_ListOperator_003() runs on GeneralComp { + var IntegerArray v_i := {0, 1, 2}; + var IntegerArray v_j := {3, 4, 5}; + + var IntegerArray v_result := v_i & v_j; + var IntegerArray v_reference := {0, 1, 2, 3, 4, 5}; + if (v_result == v_reference) { + setverdict(pass); + } else { + setverdict(fail); + } +} + +control{ + execute(TC_Sem_070102_ListOperator_003()); +} + +} diff --git a/ATS/core_language/07_expressions/0701_operators/070102_list_operator/Sem_070102_ListOperator_004.ttcn b/ATS/core_language/07_expressions/0701_operators/070102_list_operator/Sem_070102_ListOperator_004.ttcn new file mode 100644 index 00000000..232d2d15 --- /dev/null +++ b/ATS/core_language/07_expressions/0701_operators/070102_list_operator/Sem_070102_ListOperator_004.ttcn @@ -0,0 +1,31 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:7.1.2, Ensure that the list operator on set of is evaluated correctly. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +module Sem_070102_ListOperator_004 { + +type component GeneralComp { +} + +type set of integer IntegerSet; + +testcase TC_Sem_070102_ListOperator_004() runs on GeneralComp { + var IntegerSet v_i := {0, 1, 6}; + var IntegerSet v_j := {2, 4, 7}; + + var IntegerSet v_result := v_i & v_j; + var IntegerSet v_reference := {0, 1, 6, 2, 4, 7}; + if (v_result == v_reference) { + setverdict(pass); + } else { + setverdict(fail); + } +} + +control{ + execute(TC_Sem_070102_ListOperator_004()); +} + +} diff --git a/ATS/core_language/07_expressions/0701_operators/070102_list_operator/Sem_070102_ListOperator_005.ttcn b/ATS/core_language/07_expressions/0701_operators/070102_list_operator/Sem_070102_ListOperator_005.ttcn new file mode 100644 index 00000000..60bb13e9 --- /dev/null +++ b/ATS/core_language/07_expressions/0701_operators/070102_list_operator/Sem_070102_ListOperator_005.ttcn @@ -0,0 +1,33 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:7.1.2, Ensure that the list operator on arrays is evaluated correctly. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_070102_ListOperator_005 { + +type component GeneralComp { +} + +type integer MyArrayType[3]; +type integer MyArrayTypeSix[6]; + +testcase TC_Sem_070102_ListOperator_005() runs on GeneralComp { + var MyArrayType v_i := {0, 1, 6}; + var MyArrayType v_j := {2, 4, 7}; + + var MyArrayTypeSix v_result := v_i & v_j; + var MyArrayTypeSix v_reference := {0, 1, 6, 2, 4, 7}; //order of elements is concatenated order + if (v_result == v_reference) { + setverdict(pass); + } else { + setverdict(fail); + } +} + +control{ + execute(TC_Sem_070102_ListOperator_005()); +} + +} diff --git a/ATS/core_language/07_expressions/0701_operators/070102_list_operator/Sem_070102_ListOperator_006.ttcn b/ATS/core_language/07_expressions/0701_operators/070102_list_operator/Sem_070102_ListOperator_006.ttcn new file mode 100644 index 00000000..e778f8bb --- /dev/null +++ b/ATS/core_language/07_expressions/0701_operators/070102_list_operator/Sem_070102_ListOperator_006.ttcn @@ -0,0 +1,30 @@ +/***************************************************************** + ** @author STF 451 + ** @version 0.0.1 + ** @purpose 1:7.1.2, Ensure that the list operator on record of is evaluated correctly. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +module Sem_070102_ListOperator_006 { + +type component GeneralComp { +} + +type record of integer IntegerArray; + +testcase TC_Sem_070102_ListOperator_006() runs on GeneralComp { + var IntegerArray v_i := {0, 1, 2} & {3, 4, 5} & {6}; + + var IntegerArray v_reference := {0, 1, 2, 3, 4, 5, 6}; + + if (v_i == v_reference) { + setverdict(pass); + } else { + setverdict(fail); + } +} + +control{ + execute(TC_Sem_070102_ListOperator_006()); +} + +} diff --git a/ATS/core_language/07_expressions/0701_operators/070103_relational_operators/NOTES b/ATS/core_language/07_expressions/0701_operators/070103_relational_operators/NOTES new file mode 100644 index 00000000..923ef02d --- /dev/null +++ b/ATS/core_language/07_expressions/0701_operators/070103_relational_operators/NOTES @@ -0,0 +1,4 @@ +TODO: add == and != tests for default (altstep activation variables). Try the following varieties, +based on 20.5 test cases: + if (v_def == null) ... + if (v_def1 == v_def2) ... \ No newline at end of file diff --git a/ATS/core_language/07_expressions/0701_operators/070103_relational_operators/NegSem_070103_RelationalOperators_001.ttcn b/ATS/core_language/07_expressions/0701_operators/070103_relational_operators/NegSem_070103_RelationalOperators_001.ttcn new file mode 100644 index 00000000..f3fbcd88 --- /dev/null +++ b/ATS/core_language/07_expressions/0701_operators/070103_relational_operators/NegSem_070103_RelationalOperators_001.ttcn @@ -0,0 +1,33 @@ +/***************************************************************** + ** @author STF 451 + ** @version 0.0.1 + ** @purpose 1:7.1.3, Ensure that the equals operator on records is evaluated correctly. + ** @verdict pass reject + *****************************************************************/ + +module NegSem_070103_RelationalOperators_001 { + +type component GeneralComp { +} + + type set IntegerSet { + integer a1 optional, + integer a2 optional, + integer a3 optional + }; + +testcase TC_NegSem_070103_RelationalOperators_001() runs on GeneralComp { + const IntegerSet c_set := {a1:=omit,a2:=2,a3:=omit}; + + if ( c_set.a1 == omit ) { //omit is neither a value nor a field reference + setverdict(pass); + } else { + setverdict(fail); + } +} + +control{ + execute(TC_NegSem_070103_RelationalOperators_001()); +} + +} diff --git a/ATS/core_language/07_expressions/0701_operators/070103_relational_operators/NegSem_070103_RelationalOperators_002.ttcn b/ATS/core_language/07_expressions/0701_operators/070103_relational_operators/NegSem_070103_RelationalOperators_002.ttcn new file mode 100644 index 00000000..57d86529 --- /dev/null +++ b/ATS/core_language/07_expressions/0701_operators/070103_relational_operators/NegSem_070103_RelationalOperators_002.ttcn @@ -0,0 +1,50 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:7.1.3, Ensure that the equals operator on records is evaluated correctly. + ** @verdict pass reject + *****************************************************************/ + +module NegSem_070103_RelationalOperators_002 { + +type component GeneralComp { +} + + type set IntegerSet1 { + integer a1 optional, + integer a2 optional, + integer a3 optional + }; + + type set IntegerSet2 { + integer a4 optional, + integer a5 optional, + integer a6 optional + }; + + type set LargeSet { + integer a1 optional, + integer a2 optional, + integer a3 optional, + integer a4 optional, + integer a5 optional, + integer a6 optional + }; + + +testcase TC_NegSem_070103_RelationalOperators_002() runs on GeneralComp { + const IntegerSet1 c_set1 := {a1:=0,a2:=omit,a3:=2}; + const IntegerSet2 c_set2 := {a4:=3,a5:=5,a6:=omit}; + const LargeSet c_large := {a1:=0,a2:=omit,a3:=2,a4:=3,a5:=5,a6:=omit}; + + if ( c_set1 & c_set2 == c_large ) { //It is intentionally forbidden to concatenate record and set values + setverdict(pass); + } + +} + +control{ + execute(TC_NegSem_070103_RelationalOperators_002()); +} + +} diff --git a/ATS/core_language/07_expressions/0701_operators/070103_relational_operators/NegSem_070103_RelationalOperators_003.ttcn b/ATS/core_language/07_expressions/0701_operators/070103_relational_operators/NegSem_070103_RelationalOperators_003.ttcn new file mode 100644 index 00000000..a43a4615 --- /dev/null +++ b/ATS/core_language/07_expressions/0701_operators/070103_relational_operators/NegSem_070103_RelationalOperators_003.ttcn @@ -0,0 +1,51 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:7.1.3, Ensure that the equals operator on records is evaluated correctly. + ** @verdict pass reject + *****************************************************************/ +//on hold till resolution of CR6707 + +module NegSem_070103_RelationalOperators_003 { + +type component GeneralComp { +} + + type set IntegerSet1 { + integer a1 optional, + integer a2 optional, + integer a3 optional + }; + + type set IntegerSet2 { + integer a4 optional, + integer a5 optional, + integer a6 optional + }; + + type set LargeSet { + integer a1 optional, + integer a2 optional, + integer a3 optional, + integer a4 optional, + integer a5 optional, + integer a6 optional + }; + + +testcase TC_NegSem_070103_RelationalOperators_003() runs on GeneralComp { + const IntegerSet1 c_set1 := {a1:=0,a2:=omit,a3:=2}; + const IntegerSet2 c_set2 := {a4:=3,a5:=5,a6:=omit}; + const LargeSet c_large := {a1:=0,a2:=omit,a3:=2,a4:=3,a5:=5,a6:=6}; + + if ( c_set1 & c_set2 != c_large ) { //It is intentionally forbidden to concatenate record and set values + setverdict(pass); + } + +} + +control{ + execute(TC_NegSem_070103_RelationalOperators_003()); +} + +} diff --git a/ATS/core_language/07_expressions/0701_operators/070103_relational_operators/NegSem_070103_RelationalOperators_004.ttcn b/ATS/core_language/07_expressions/0701_operators/070103_relational_operators/NegSem_070103_RelationalOperators_004.ttcn new file mode 100644 index 00000000..ba0621b6 --- /dev/null +++ b/ATS/core_language/07_expressions/0701_operators/070103_relational_operators/NegSem_070103_RelationalOperators_004.ttcn @@ -0,0 +1,50 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:7.1.3, Ensure that the equals operator on records is evaluated correctly. + ** @verdict pass reject + *****************************************************************/ +//on hold till resolution of CR6707 + +module NegSem_070103_RelationalOperators_004 { + +type component GeneralComp { +} + + type set IntegerSet1 { + integer a1 optional, + integer a2 optional, + integer a3 optional + }; + + type set IntegerSet2 { + integer a4 optional, + integer a5 optional, + integer a6 optional + }; + + type set LargeSet { + integer a1 optional, + integer a2 optional, + integer a3 optional, + integer a4 optional, + integer a5 optional + }; + + +testcase TC_NegSem_070103_RelationalOperators_004() runs on GeneralComp { + const IntegerSet1 c_set1 := {a1:=0,a2:=omit,a3:=2}; + const IntegerSet2 c_set2 := {a4:=3,a5:=5,a6:=omit}; + const LargeSet c_large := {a1:=0,a2:=omit,a3:=2,a4:=3,a5:=5}; + + if ( c_set1 & c_set2 != c_large ) { //It is intentionally forbidden to concatenate record and set values + setverdict(pass); + } + +} + +control{ + execute(TC_NegSem_070103_RelationalOperators_004()); +} + +} diff --git a/ATS/core_language/07_expressions/0701_operators/070103_relational_operators/NegSem_070103_RelationalOperators_005.ttcn b/ATS/core_language/07_expressions/0701_operators/070103_relational_operators/NegSem_070103_RelationalOperators_005.ttcn new file mode 100644 index 00000000..78bd48ca --- /dev/null +++ b/ATS/core_language/07_expressions/0701_operators/070103_relational_operators/NegSem_070103_RelationalOperators_005.ttcn @@ -0,0 +1,32 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:7.1.3, Ensure that the not equal to operator on address can not be evaluated if value is uninitialized. + ** @verdict pass reject + *****************************************************************/ + +module NegSem_070103_RelationalOperators_005 { + +type component GeneralComp { +} + +type integer address; + +testcase TC_NegSem_070103_RelationalOperators_005() runs on GeneralComp { + + var address My_address; //uninitialized address type value + + + if (My_address != null) //error + { + setverdict(pass, My_address); + } else { + setverdict(fail,My_address); + } +} + +control{ + execute(TC_NegSem_070103_RelationalOperators_005()); +} + +} diff --git a/ATS/core_language/07_expressions/0701_operators/070103_relational_operators/NegSem_070103_RelationalOperators_006.ttcn b/ATS/core_language/07_expressions/0701_operators/070103_relational_operators/NegSem_070103_RelationalOperators_006.ttcn new file mode 100644 index 00000000..78cc9883 --- /dev/null +++ b/ATS/core_language/07_expressions/0701_operators/070103_relational_operators/NegSem_070103_RelationalOperators_006.ttcn @@ -0,0 +1,51 @@ +/***************************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:7.1.3, Ensure that concatenation mismatch is evaluated correctly. + ** @verdict pass reject + *****************************************************************/ + +module NegSem_070103_RelationalOperators_006 { + +type component GeneralComp { +} + + type set IntegerSet1 { + integer a1 optional, + integer a2 optional, + integer a3 optional + }; + + type set IntegerSet2 { + integer a4 optional, + integer a5 optional, + integer a6 optional + }; + + type set LargeSet { + integer a1 optional, + integer a2 optional, + integer a3 optional, + integer a4 optional, + integer a5 optional, + integer a6 optional + }; + + +testcase TC_NegSem_070103_RelationalOperators_006() runs on GeneralComp { + const IntegerSet1 c_set1 := {a1:=0,a2:=omit,a3:=2}; + const IntegerSet2 c_set2 := {a4:=3,a5:=5,a6:=omit}; + const LargeSet c_large := {a1:=0,a2:=omit,a3:=2,a4:=3,a5:=5,a6:=omit}; + + if ( c_set1 & c_set2 == c_large ) { + setverdict(fail); + } else { + setverdict(fail); + } +} + +control{ + execute(TC_NegSem_070103_RelationalOperators_006()); +} + +} diff --git a/ATS/core_language/07_expressions/0701_operators/070103_relational_operators/NegSem_070103_RelationalOperators_007.ttcn b/ATS/core_language/07_expressions/0701_operators/070103_relational_operators/NegSem_070103_RelationalOperators_007.ttcn new file mode 100644 index 00000000..38724d35 --- /dev/null +++ b/ATS/core_language/07_expressions/0701_operators/070103_relational_operators/NegSem_070103_RelationalOperators_007.ttcn @@ -0,0 +1,51 @@ +/***************************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:7.1.3, Ensure that concatenation mismatch is evaluated correctly. + ** @verdict pass reject + *****************************************************************/ + +module NegSem_070103_RelationalOperators_007 { + +type component GeneralComp { +} + + type set IntegerSet1 { + integer a1 optional, + integer a2 optional, + integer a3 optional + }; + + type set IntegerSet2 { + integer a4 optional, + integer a5 optional, + integer a6 optional + }; + + type set LargeSet { + integer a1 optional, + integer a2 optional, + integer a3 optional, + integer a4 optional, + integer a5 optional, + integer a6 optional + }; + + +testcase TC_NegSem_070103_RelationalOperators_007() runs on GeneralComp { + const IntegerSet1 c_set1 := {a1:=0,a2:=omit,a3:=2}; + const IntegerSet2 c_set2 := {a4:=3,a5:=5,a6:=omit}; + const LargeSet c_large := {a1:=0,a2:=omit,a3:=2,a4:=3,a5:=5,a6:=6}; + + if ( c_set1 & c_set2 != c_large ) { //mismatching in a6 + setverdict(fail); + } else { + setverdict(fail); + } +} + +control{ + execute(TC_NegSem_070103_RelationalOperators_007()); +} + +} diff --git a/ATS/core_language/07_expressions/0701_operators/070103_relational_operators/NegSem_070103_RelationalOperators_008.ttcn b/ATS/core_language/07_expressions/0701_operators/070103_relational_operators/NegSem_070103_RelationalOperators_008.ttcn new file mode 100644 index 00000000..2e171877 --- /dev/null +++ b/ATS/core_language/07_expressions/0701_operators/070103_relational_operators/NegSem_070103_RelationalOperators_008.ttcn @@ -0,0 +1,50 @@ +/***************************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:7.1.3, Ensure that the equals operator on records is evaluated correctly. + ** @verdict pass reject + *****************************************************************/ + +module NegSem_070103_RelationalOperators_008 { + +type component GeneralComp { +} + + type set IntegerSet1 { + integer a1 optional, + integer a2 optional, + integer a3 optional + }; + + type set IntegerSet2 { + integer a4 optional, + integer a5 optional, + integer a6 optional + }; + + type set LargeSet { + integer a1 optional, + integer a2 optional, + integer a3 optional, + integer a4 optional, + integer a5 optional + }; + + +testcase TC_NegSem_070103_RelationalOperators_008() runs on GeneralComp { + const IntegerSet1 c_set1 := {a1:=0,a2:=omit,a3:=2}; + const IntegerSet2 c_set2 := {a4:=3,a5:=5,a6:=omit}; + const LargeSet c_large := {a1:=0,a2:=omit,a3:=2,a4:=3,a5:=5}; + + if ( c_set1 & c_set2 != c_large ) { //the two expressions are not equal because of mismatching lengths + setverdict(fail); + } else { + setverdict(fail); + } +} + +control{ + execute(TC_NegSem_070103_RelationalOperators_008()); +} + +} diff --git a/ATS/core_language/07_expressions/0701_operators/070103_relational_operators/NegSyn_070103_RelationalOperators_001.ttcn b/ATS/core_language/07_expressions/0701_operators/070103_relational_operators/NegSyn_070103_RelationalOperators_001.ttcn new file mode 100644 index 00000000..fc4f288a --- /dev/null +++ b/ATS/core_language/07_expressions/0701_operators/070103_relational_operators/NegSyn_070103_RelationalOperators_001.ttcn @@ -0,0 +1,32 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:7.1.3, Ensure that the greater operator on address can not be evaluated. + ** @verdict pass reject, noexecution + *****************************************************************/ + +module NegSyn_070103_RelationalOperators_001 { + +type component GeneralComp { +} + +type integer address; + +testcase TC_NegSyn_070103_RelationalOperators_001() runs on GeneralComp { + + var address My_address :=-1; + + + if (My_address > null) //error, not allowed + { + setverdict(pass, My_address); + } else { + setverdict(fail,My_address); + } +} + +control{ + execute(TC_NegSyn_070103_RelationalOperators_001()); +} + +} diff --git a/ATS/core_language/07_expressions/0701_operators/070103_relational_operators/NegSyn_070103_RelationalOperators_002.ttcn b/ATS/core_language/07_expressions/0701_operators/070103_relational_operators/NegSyn_070103_RelationalOperators_002.ttcn new file mode 100644 index 00000000..41df82c1 --- /dev/null +++ b/ATS/core_language/07_expressions/0701_operators/070103_relational_operators/NegSyn_070103_RelationalOperators_002.ttcn @@ -0,0 +1,32 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:7.1.3, Ensure that the less operator on address can not be evaluated. + ** @verdict pass reject, noexecution + *****************************************************************/ + +module NegSyn_070103_RelationalOperators_002 { + +type component GeneralComp { +} + +type integer address; + +testcase TC_NegSyn_070103_RelationalOperators_002() runs on GeneralComp { + + var address My_address :=-1; + + //error, not allowed + if (My_address < null) + { + setverdict(pass, My_address); + } else { + setverdict(fail,My_address); + } +} + +control{ + execute(TC_NegSyn_070103_RelationalOperators_002()); +} + +} diff --git a/ATS/core_language/07_expressions/0701_operators/070103_relational_operators/NegSyn_070103_RelationalOperators_003.ttcn b/ATS/core_language/07_expressions/0701_operators/070103_relational_operators/NegSyn_070103_RelationalOperators_003.ttcn new file mode 100644 index 00000000..d66a71a7 --- /dev/null +++ b/ATS/core_language/07_expressions/0701_operators/070103_relational_operators/NegSyn_070103_RelationalOperators_003.ttcn @@ -0,0 +1,32 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:7.1.3, Ensure that the less or equal to operator on address can not be evaluated. + ** @verdict pass reject, noexecution + *****************************************************************/ + +module NegSyn_070103_RelationalOperators_003 { + +type component GeneralComp { +} + +type integer address; + +testcase TC_NegSyn_070103_RelationalOperators_003() runs on GeneralComp { + + var address My_address :=-1; + + //error, not allowed + if (My_address <= null) + { + setverdict(pass, My_address); + } else { + setverdict(fail,My_address); + } +} + +control{ + execute(TC_NegSyn_070103_RelationalOperators_003()); +} + +} diff --git a/ATS/core_language/07_expressions/0701_operators/070103_relational_operators/NegSyn_070103_RelationalOperators_004.ttcn b/ATS/core_language/07_expressions/0701_operators/070103_relational_operators/NegSyn_070103_RelationalOperators_004.ttcn new file mode 100644 index 00000000..28993462 --- /dev/null +++ b/ATS/core_language/07_expressions/0701_operators/070103_relational_operators/NegSyn_070103_RelationalOperators_004.ttcn @@ -0,0 +1,32 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:7.1.3, Ensure that the greater or equal to operator on address can not be evaluated. + ** @verdict pass reject, noexecution + *****************************************************************/ + +module NegSyn_070103_RelationalOperators_004 { + +type component GeneralComp { +} + +type integer address; + +testcase TC_NegSyn_070103_RelationalOperators_004() runs on GeneralComp { + + var address My_address :=-1; + + //error, not allowed + if (My_address >= null) + { + setverdict(pass, My_address); + } else { + setverdict(fail,My_address); + } +} + +control{ + execute(TC_NegSyn_070103_RelationalOperators_004()); +} + +} diff --git a/ATS/core_language/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_001.ttcn b/ATS/core_language/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_001.ttcn new file mode 100644 index 00000000..0ca49e36 --- /dev/null +++ b/ATS/core_language/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_001.ttcn @@ -0,0 +1,25 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:7.1.3, Ensure that the equals operator on integers is evaluated correctly. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_070103_RelationalOperators_001 { + +type component GeneralComp { +} + +testcase TC_Sem_070103_RelationalOperators_001() runs on GeneralComp { + if (2 == 2) { + setverdict(pass); + } else { + setverdict(fail); + } +} + +control{ + execute(TC_Sem_070103_RelationalOperators_001()); +} + +} diff --git a/ATS/core_language/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_002.ttcn b/ATS/core_language/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_002.ttcn new file mode 100644 index 00000000..508d69b4 --- /dev/null +++ b/ATS/core_language/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_002.ttcn @@ -0,0 +1,25 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:7.1.3, Ensure that the equals operator on floats is evaluated correctly. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_070103_RelationalOperators_002 { + +type component GeneralComp { +} + +testcase TC_Sem_070103_RelationalOperators_002() runs on GeneralComp { + if (2.0 == 2.0) { + setverdict(pass); + } else { + setverdict(fail); + } +} + +control{ + execute(TC_Sem_070103_RelationalOperators_002()); +} + +} diff --git a/ATS/core_language/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_003.ttcn b/ATS/core_language/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_003.ttcn new file mode 100644 index 00000000..c92651c0 --- /dev/null +++ b/ATS/core_language/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_003.ttcn @@ -0,0 +1,32 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:7.1.3, Ensure that the equals operator on enumerations is evaluated correctly. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_070103_RelationalOperators_003 { + +type component GeneralComp { +} + +type enumerated MyEnumType { + e_monday, e_tuesday, e_wednesday, e_thursday, e_friday +}; + +testcase TC_Sem_070103_RelationalOperators_003() runs on GeneralComp { + var MyEnumType v_first := e_monday; + var MyEnumType v_reference := e_monday; + + if (v_first == v_reference) { + setverdict(pass); + } else { + setverdict(fail); + } +} + +control{ + execute(TC_Sem_070103_RelationalOperators_003()); +} + +} diff --git a/ATS/core_language/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_004.ttcn b/ATS/core_language/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_004.ttcn new file mode 100644 index 00000000..91f1c628 --- /dev/null +++ b/ATS/core_language/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_004.ttcn @@ -0,0 +1,25 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:7.1.3, Ensure that the less than operator on integers is evaluated correctly. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_070103_RelationalOperators_004 { + +type component GeneralComp { +} + +testcase TC_Sem_070103_RelationalOperators_004() runs on GeneralComp { + if (2 < 3) { + setverdict(pass); + } else { + setverdict(fail); + } +} + +control{ + execute(TC_Sem_070103_RelationalOperators_004()); +} + +} diff --git a/ATS/core_language/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_005.ttcn b/ATS/core_language/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_005.ttcn new file mode 100644 index 00000000..fd910640 --- /dev/null +++ b/ATS/core_language/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_005.ttcn @@ -0,0 +1,25 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:7.1.3, Ensure that the less than operator on floats is evaluated correctly. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_070103_RelationalOperators_005 { + +type component GeneralComp { +} + +testcase TC_Sem_070103_RelationalOperators_005() runs on GeneralComp { + if (2.3 < 2.452) { + setverdict(pass); + } else { + setverdict(fail); + } +} + +control{ + execute(TC_Sem_070103_RelationalOperators_005()); +} + +} diff --git a/ATS/core_language/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_006.ttcn b/ATS/core_language/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_006.ttcn new file mode 100644 index 00000000..54efbe3e --- /dev/null +++ b/ATS/core_language/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_006.ttcn @@ -0,0 +1,32 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:7.1.3, Ensure that the less than operator on enumerations is evaluated correctly. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_070103_RelationalOperators_006 { + +type component GeneralComp { +} + +type enumerated MyEnumType { + e_monday, e_tuesday, e_wednesday, e_thursday, e_friday +}; + +testcase TC_Sem_070103_RelationalOperators_006() runs on GeneralComp { + var MyEnumType v_first := e_monday; + var MyEnumType v_second := e_tuesday; + + if (v_first < v_second) { + setverdict(pass); + } else { + setverdict(fail); + } +} + +control{ + execute(TC_Sem_070103_RelationalOperators_006()); +} + +} diff --git a/ATS/core_language/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_007.ttcn b/ATS/core_language/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_007.ttcn new file mode 100644 index 00000000..facb563f --- /dev/null +++ b/ATS/core_language/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_007.ttcn @@ -0,0 +1,25 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:7.1.3, Ensure that the less than or equal to operator on integers is evaluated correctly with differing values. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_070103_RelationalOperators_007 { + +type component GeneralComp { +} + +testcase TC_Sem_070103_RelationalOperators_007() runs on GeneralComp { + if (2 <= 3) { + setverdict(pass); + } else { + setverdict(fail); + } +} + +control{ + execute(TC_Sem_070103_RelationalOperators_007()); +} + +} diff --git a/ATS/core_language/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_008.ttcn b/ATS/core_language/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_008.ttcn new file mode 100644 index 00000000..8f572604 --- /dev/null +++ b/ATS/core_language/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_008.ttcn @@ -0,0 +1,25 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:7.1.3, Ensure that the less than or equal to operator on integers is evaluated correctly with equal values. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_070103_RelationalOperators_008 { + +type component GeneralComp { +} + +testcase TC_Sem_070103_RelationalOperators_008() runs on GeneralComp { + if (2 <= 2) { + setverdict(pass); + } else { + setverdict(fail); + } +} + +control{ + execute(TC_Sem_070103_RelationalOperators_008()); +} + +} diff --git a/ATS/core_language/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_009.ttcn b/ATS/core_language/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_009.ttcn new file mode 100644 index 00000000..71854fd3 --- /dev/null +++ b/ATS/core_language/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_009.ttcn @@ -0,0 +1,25 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:7.1.3, Ensure that the less than or equal to operator on floats is evaluated correctly with differing values. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_070103_RelationalOperators_009 { + +type component GeneralComp { +} + +testcase TC_Sem_070103_RelationalOperators_009() runs on GeneralComp { + if (2.3 <= 3.2) { + setverdict(pass); + } else { + setverdict(fail); + } +} + +control{ + execute(TC_Sem_070103_RelationalOperators_009()); +} + +} diff --git a/ATS/core_language/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_010.ttcn b/ATS/core_language/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_010.ttcn new file mode 100644 index 00000000..20eb756b --- /dev/null +++ b/ATS/core_language/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_010.ttcn @@ -0,0 +1,25 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:7.1.3, Ensure that the less than or equal to operator on floats is evaluated correctly with equal values. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_070103_RelationalOperators_010 { + +type component GeneralComp { +} + +testcase TC_Sem_070103_RelationalOperators_010() runs on GeneralComp { + if (2.3 <= 2.3) { + setverdict(pass); + } else { + setverdict(fail); + } +} + +control{ + execute(TC_Sem_070103_RelationalOperators_010()); +} + +} diff --git a/ATS/core_language/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_011.ttcn b/ATS/core_language/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_011.ttcn new file mode 100644 index 00000000..275e1f07 --- /dev/null +++ b/ATS/core_language/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_011.ttcn @@ -0,0 +1,32 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:7.1.3, Ensure that the less than or equal to operator on enumerations is evaluated correctly with differing values. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_070103_RelationalOperators_011 { + +type component GeneralComp { +} + +type enumerated MyEnumType { + e_monday, e_tuesday, e_wednesday, e_thursday, e_friday +}; + +testcase TC_Sem_070103_RelationalOperators_011() runs on GeneralComp { + var MyEnumType v_first := e_monday; + var MyEnumType v_second := e_tuesday; + + if (v_first <= v_second) { + setverdict(pass); + } else { + setverdict(fail); + } +} + +control{ + execute(TC_Sem_070103_RelationalOperators_011()); +} + +} diff --git a/ATS/core_language/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_012.ttcn b/ATS/core_language/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_012.ttcn new file mode 100644 index 00000000..b46bce0b --- /dev/null +++ b/ATS/core_language/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_012.ttcn @@ -0,0 +1,32 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:7.1.3, Ensure that the less than or equal to operator on enumerations is evaluated correctly with equal values. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_070103_RelationalOperators_012 { + +type component GeneralComp { +} + +type enumerated MyEnumType { + e_monday, e_tuesday, e_wednesday, e_thursday, e_friday +}; + +testcase TC_Sem_070103_RelationalOperators_012() runs on GeneralComp { + var MyEnumType v_first := e_monday; + var MyEnumType v_second := e_monday; + + if (v_first <= v_second) { + setverdict(pass); + } else { + setverdict(fail); + } +} + +control{ + execute(TC_Sem_070103_RelationalOperators_012()); +} + +} diff --git a/ATS/core_language/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_013.ttcn b/ATS/core_language/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_013.ttcn new file mode 100644 index 00000000..37b22311 --- /dev/null +++ b/ATS/core_language/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_013.ttcn @@ -0,0 +1,25 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:7.1.3, Ensure that the greater than operator on integers is evaluated correctly. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_070103_RelationalOperators_013 { + +type component GeneralComp { +} + +testcase TC_Sem_070103_RelationalOperators_013() runs on GeneralComp { + if (3 > 2) { + setverdict(pass); + } else { + setverdict(fail); + } +} + +control{ + execute(TC_Sem_070103_RelationalOperators_013()); +} + +} diff --git a/ATS/core_language/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_014.ttcn b/ATS/core_language/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_014.ttcn new file mode 100644 index 00000000..1bace9c9 --- /dev/null +++ b/ATS/core_language/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_014.ttcn @@ -0,0 +1,25 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:7.1.3, Ensure that the less than operator on floats is evaluated correctly. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_070103_RelationalOperators_014 { + +type component GeneralComp { +} + +testcase TC_Sem_070103_RelationalOperators_014() runs on GeneralComp { + if (2.452 > 2.3) { + setverdict(pass); + } else { + setverdict(fail); + } +} + +control{ + execute(TC_Sem_070103_RelationalOperators_014()); +} + +} diff --git a/ATS/core_language/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_015.ttcn b/ATS/core_language/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_015.ttcn new file mode 100644 index 00000000..143ecc96 --- /dev/null +++ b/ATS/core_language/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_015.ttcn @@ -0,0 +1,32 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:7.1.3, Ensure that the less than operator on enumerations is evaluated correctly. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_070103_RelationalOperators_015 { + +type component GeneralComp { +} + +type enumerated MyEnumType { + e_monday, e_tuesday, e_wednesday, e_thursday, e_friday +}; + +testcase TC_Sem_070103_RelationalOperators_015() runs on GeneralComp { + var MyEnumType v_first := e_monday; + var MyEnumType v_second := e_tuesday; + + if (v_second > v_first) { + setverdict(pass); + } else { + setverdict(fail); + } +} + +control{ + execute(TC_Sem_070103_RelationalOperators_015()); +} + +} diff --git a/ATS/core_language/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_016.ttcn b/ATS/core_language/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_016.ttcn new file mode 100644 index 00000000..a3a5db35 --- /dev/null +++ b/ATS/core_language/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_016.ttcn @@ -0,0 +1,25 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:7.1.3, Ensure that the greater than or equal to operator on integers is evaluated correctly with differing values. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_070103_RelationalOperators_016 { + +type component GeneralComp { +} + +testcase TC_Sem_070103_RelationalOperators_016() runs on GeneralComp { + if (3 >= 2) { + setverdict(pass); + } else { + setverdict(fail); + } +} + +control{ + execute(TC_Sem_070103_RelationalOperators_016()); +} + +} diff --git a/ATS/core_language/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_017.ttcn b/ATS/core_language/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_017.ttcn new file mode 100644 index 00000000..9851d6bf --- /dev/null +++ b/ATS/core_language/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_017.ttcn @@ -0,0 +1,25 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:7.1.3, Ensure that the greater than or equal to operator on integers is evaluated correctly with equal values. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_070103_RelationalOperators_017 { + +type component GeneralComp { +} + +testcase TC_Sem_070103_RelationalOperators_017() runs on GeneralComp { + if (2 >= 2) { + setverdict(pass); + } else { + setverdict(fail); + } +} + +control{ + execute(TC_Sem_070103_RelationalOperators_017()); +} + +} diff --git a/ATS/core_language/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_018.ttcn b/ATS/core_language/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_018.ttcn new file mode 100644 index 00000000..5555b942 --- /dev/null +++ b/ATS/core_language/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_018.ttcn @@ -0,0 +1,25 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:7.1.3, Ensure that the greater than or equal to operator on floats is evaluated correctly with differing values. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_070103_RelationalOperators_018 { + +type component GeneralComp { +} + +testcase TC_Sem_070103_RelationalOperators_018() runs on GeneralComp { + if (3.2 >= 2.3) { + setverdict(pass); + } else { + setverdict(fail); + } +} + +control{ + execute(TC_Sem_070103_RelationalOperators_018()); +} + +} diff --git a/ATS/core_language/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_019.ttcn b/ATS/core_language/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_019.ttcn new file mode 100644 index 00000000..53d02bfe --- /dev/null +++ b/ATS/core_language/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_019.ttcn @@ -0,0 +1,25 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:7.1.3, Ensure that the greater than or equal to operator on floats is evaluated correctly with equal values. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_070103_RelationalOperators_019 { + +type component GeneralComp { +} + +testcase TC_Sem_070103_RelationalOperators_019() runs on GeneralComp { + if (2.3 >= 2.3) { + setverdict(pass); + } else { + setverdict(fail); + } +} + +control{ + execute(TC_Sem_070103_RelationalOperators_019()); +} + +} diff --git a/ATS/core_language/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_020.ttcn b/ATS/core_language/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_020.ttcn new file mode 100644 index 00000000..13d3459b --- /dev/null +++ b/ATS/core_language/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_020.ttcn @@ -0,0 +1,32 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:7.1.3, Ensure that the less than or equal to operator on enumerations is evaluated correctly with differing values. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_070103_RelationalOperators_020 { + +type component GeneralComp { +} + +type enumerated MyEnumType { + e_monday, e_tuesday, e_wednesday, e_thursday, e_friday +}; + +testcase TC_Sem_070103_RelationalOperators_020() runs on GeneralComp { + var MyEnumType v_first := e_monday; + var MyEnumType v_second := e_tuesday; + + if (v_second >= v_first) { + setverdict(pass); + } else { + setverdict(fail); + } +} + +control{ + execute(TC_Sem_070103_RelationalOperators_020()); +} + +} diff --git a/ATS/core_language/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_021.ttcn b/ATS/core_language/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_021.ttcn new file mode 100644 index 00000000..f8f2577f --- /dev/null +++ b/ATS/core_language/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_021.ttcn @@ -0,0 +1,32 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:7.1.3, Ensure that the greater than or equal to operator on enumerations is evaluated correctly with equal values. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_070103_RelationalOperators_021 { + +type component GeneralComp { +} + +type enumerated MyEnumType { + e_monday, e_tuesday, e_wednesday, e_thursday, e_friday +}; + +testcase TC_Sem_070103_RelationalOperators_021() runs on GeneralComp { + var MyEnumType v_first := e_monday; + var MyEnumType v_second := e_monday; + + if (v_first >= v_second) { + setverdict(pass); + } else { + setverdict(fail); + } +} + +control{ + execute(TC_Sem_070103_RelationalOperators_021()); +} + +} diff --git a/ATS/core_language/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_022.ttcn b/ATS/core_language/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_022.ttcn new file mode 100644 index 00000000..54bf4e6c --- /dev/null +++ b/ATS/core_language/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_022.ttcn @@ -0,0 +1,25 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:7.1.3, Ensure that the not equals operator on integers is evaluated correctly. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_070103_RelationalOperators_022 { + +type component GeneralComp { +} + +testcase TC_Sem_070103_RelationalOperators_022() runs on GeneralComp { + if (2 != 3) { + setverdict(pass); + } else { + setverdict(fail); + } +} + +control{ + execute(TC_Sem_070103_RelationalOperators_022()); +} + +} diff --git a/ATS/core_language/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_023.ttcn b/ATS/core_language/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_023.ttcn new file mode 100644 index 00000000..c16df330 --- /dev/null +++ b/ATS/core_language/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_023.ttcn @@ -0,0 +1,25 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:7.1.3, Ensure that the not equals operator on floats is evaluated correctly. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_070103_RelationalOperators_023 { + +type component GeneralComp { +} + +testcase TC_Sem_070103_RelationalOperators_023() runs on GeneralComp { + if (2.12 != 2.3) { + setverdict(pass); + } else { + setverdict(fail); + } +} + +control{ + execute(TC_Sem_070103_RelationalOperators_023()); +} + +} diff --git a/ATS/core_language/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_024.ttcn b/ATS/core_language/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_024.ttcn new file mode 100644 index 00000000..2b723e69 --- /dev/null +++ b/ATS/core_language/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_024.ttcn @@ -0,0 +1,32 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:7.1.3, Ensure that the not equals operator on enumerations is evaluated correctly. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_070103_RelationalOperators_024 { + +type component GeneralComp { +} + +type enumerated MyEnumType { + e_monday, e_tuesday, e_wednesday, e_thursday, e_friday +}; + +testcase TC_Sem_070103_RelationalOperators_024() runs on GeneralComp { + var MyEnumType v_first := e_monday; + var MyEnumType v_reference := e_tuesday; + + if (v_first != v_reference) { + setverdict(pass); + } else { + setverdict(fail); + } +} + +control{ + execute(TC_Sem_070103_RelationalOperators_024()); +} + +} diff --git a/ATS/core_language/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_025.ttcn b/ATS/core_language/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_025.ttcn new file mode 100644 index 00000000..2ba05b44 --- /dev/null +++ b/ATS/core_language/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_025.ttcn @@ -0,0 +1,33 @@ +/***************************************************************** + ** @author STF 451 + ** @version 0.0.1 + ** @purpose 1:7.1.3, Ensure that the equals operator on sets is evaluated correctly. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_070103_RelationalOperators_025 { + +type component GeneralComp { +} + + type set IntegerSet { + integer a1 optional, + integer a2 optional, + integer a3 optional + }; + +testcase TC_Sem_070103_RelationalOperators_025() runs on GeneralComp { + const IntegerSet c_set := {a1:=0,a2:=omit,a3:=2}; + + if ( { a3:=2, a2:=omit, a1:=0 } == c_set ) { + setverdict(pass); + } else { + setverdict(fail); + } +} + +control{ + execute(TC_Sem_070103_RelationalOperators_025()); +} + +} diff --git a/ATS/core_language/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_026.ttcn b/ATS/core_language/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_026.ttcn new file mode 100644 index 00000000..0fd2967c --- /dev/null +++ b/ATS/core_language/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_026.ttcn @@ -0,0 +1,33 @@ +/***************************************************************** + ** @author STF 451 + ** @version 0.0.1 + ** @purpose 1:7.1.3, Ensure that the equals operator on records is evaluated correctly. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_070103_RelationalOperators_026 { + +type component GeneralComp { +} + + type set IntegerSet { + integer a1 optional, + integer a2 optional, + integer a3 optional + }; + +testcase TC_Sem_070103_RelationalOperators_026() runs on GeneralComp { + var IntegerSet v_set := {a1:=0,a2:=omit,a3:=2}; + + if ( v_set == { a1:=0, a2:=omit, a3:=2 } ) { + setverdict(pass); + } else { + setverdict(fail); + } +} + +control{ + execute(TC_Sem_070103_RelationalOperators_026()); +} + +} diff --git a/ATS/core_language/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_030.ttcn b/ATS/core_language/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_030.ttcn new file mode 100644 index 00000000..29360c47 --- /dev/null +++ b/ATS/core_language/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_030.ttcn @@ -0,0 +1,33 @@ +/***************************************************************** + ** @author STF 451 + ** @version 0.0.1 + ** @purpose 1:7.1.3, Ensure that the equals operator on records is evaluated correctly. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_070103_RelationalOperators_030 { + +type component GeneralComp { +} + + type set IntegerSet { + integer a1 optional, + integer a2 optional, + integer a3 optional + }; + +testcase TC_Sem_070103_RelationalOperators_030() runs on GeneralComp { + const IntegerSet c_set := {a1:=1,a2:=omit,a3:=1}; + + if ( c_set.a1 == c_set.a3 ) { + setverdict(pass); + } else { + setverdict(fail); + } +} + +control{ + execute(TC_Sem_070103_RelationalOperators_030()); +} + +} diff --git a/ATS/core_language/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_031.ttcn b/ATS/core_language/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_031.ttcn new file mode 100644 index 00000000..6751539a --- /dev/null +++ b/ATS/core_language/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_031.ttcn @@ -0,0 +1,33 @@ +/***************************************************************** + ** @author STF 451 + ** @version 0.0.1 + ** @purpose 1:7.1.3, Ensure that the equals operator on records is evaluated correctly. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_070103_RelationalOperators_031 { + +type component GeneralComp { +} + + type set IntegerSet { + integer a1 optional, + integer a2 optional, + integer a3 optional + }; + +testcase TC_Sem_070103_RelationalOperators_031() runs on GeneralComp { + const IntegerSet c_set := {a1:=omit,a2:=2,a3:=omit}; + + if ( c_set.a1 == c_set.a3 ) { + setverdict(pass); + } else { + setverdict(fail); + } +} + +control{ + execute(TC_Sem_070103_RelationalOperators_031()); +} + +} diff --git a/ATS/core_language/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_032.ttcn b/ATS/core_language/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_032.ttcn new file mode 100644 index 00000000..7c689461 --- /dev/null +++ b/ATS/core_language/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_032.ttcn @@ -0,0 +1,33 @@ +/***************************************************************** + ** @author STF 451 + ** @version 0.0.1 + ** @purpose 1:7.1.3, Ensure that the equals operator on records is evaluated correctly. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_070103_RelationalOperators_032 { + +type component GeneralComp { +} + + type set IntegerSet { + integer a1 optional, + integer a2 optional, + integer a3 optional + }; + +testcase TC_Sem_070103_RelationalOperators_032() runs on GeneralComp { + const IntegerSet c_set := {a1:=omit,a2:=2,a3:=omit}; + + if ( c_set.a2 == 2 ) { + setverdict(pass); + } else { + setverdict(fail); + } +} + +control{ + execute(TC_Sem_070103_RelationalOperators_032()); +} + +} diff --git a/ATS/core_language/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_033.ttcn b/ATS/core_language/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_033.ttcn new file mode 100644 index 00000000..8e063403 --- /dev/null +++ b/ATS/core_language/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_033.ttcn @@ -0,0 +1,33 @@ +/***************************************************************** + ** @author STF 451 + ** @version 0.0.1 + ** @purpose 1:7.1.3, Ensure that the equals operator on records is evaluated correctly. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_070103_RelationalOperators_033 { + +type component GeneralComp { +} + + type set IntegerSet { + integer a1 optional, + integer a2 optional, + integer a3 optional + }; + +testcase TC_Sem_070103_RelationalOperators_033() runs on GeneralComp { + const IntegerSet c_set := {a1:=omit,a2:=2,a3:=omit}; + + if ( c_set.a2 != c_set.a3 ) { + setverdict(pass); + } else { + setverdict(fail); + } +} + +control{ + execute(TC_Sem_070103_RelationalOperators_033()); +} + +} diff --git a/ATS/core_language/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_034.ttcn b/ATS/core_language/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_034.ttcn new file mode 100644 index 00000000..0ebc5bbf --- /dev/null +++ b/ATS/core_language/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_034.ttcn @@ -0,0 +1,33 @@ +/***************************************************************** + ** @author STF 451 + ** @version 0.0.1 + ** @purpose 1:7.1.3, Ensure that the equals operator on records is evaluated correctly. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_070103_RelationalOperators_034 { + +type component GeneralComp { +} + + type set IntegerSet { + integer a1 optional, + integer a2 optional, + integer a3 optional + }; + +testcase TC_Sem_070103_RelationalOperators_034() runs on GeneralComp { + const IntegerSet c_set := {a1:=omit,a2:=2,a3:=omit}; + + if ( c_set.a2 == 1 ) { + setverdict(fail); + } else { + setverdict(pass); + } +} + +control{ + execute(TC_Sem_070103_RelationalOperators_034()); +} + +} diff --git a/ATS/core_language/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_035.ttcn b/ATS/core_language/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_035.ttcn new file mode 100644 index 00000000..62120cd6 --- /dev/null +++ b/ATS/core_language/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_035.ttcn @@ -0,0 +1,34 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:7.1.3, Ensure that the eqaul to operator on address is evaluated correctly with equal values. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +/*The address type is allowed for the equality (==) and non-equality (!=) operators, +independent of its actual type, but when its actual type differs from the types specified above, it can be compared to the literal special value null only. +*/ + +module Sem_070103_RelationalOperators_035 { + +type component GeneralComp { +} + +type integer address; + +testcase TC_Sem_070103_RelationalOperators_035() runs on GeneralComp { + + var address My_address:=null; + + + if (My_address == null) { + setverdict(pass,My_address); + } else { + setverdict(fail,My_address); + } +} + +control{ + execute(TC_Sem_070103_RelationalOperators_035()); +} + +} diff --git a/ATS/core_language/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_036.ttcn b/ATS/core_language/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_036.ttcn new file mode 100644 index 00000000..3c791b77 --- /dev/null +++ b/ATS/core_language/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_036.ttcn @@ -0,0 +1,33 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:7.1.3, Ensure that the eqaul to operator on address is evaluated correctly with equal values. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +/*The address type is allowed for the equality (==) and non-equality (!=) operators, independent of its actual type, but when its actual type differs from the types specified above, it can be compared to the literal special value null only.*/ + +module Sem_070103_RelationalOperators_036 { + +type component GeneralComp { +} + +type integer address; + +testcase TC_Sem_070103_RelationalOperators_036() runs on GeneralComp { + + var address My_address:=2; + + + if (My_address == 2) { + setverdict(pass,My_address); + } else { + setverdict(fail,My_address); + } +} + +control{ + execute(TC_Sem_070103_RelationalOperators_036()); +} + +} diff --git a/ATS/core_language/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_037.ttcn b/ATS/core_language/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_037.ttcn new file mode 100644 index 00000000..042cb068 --- /dev/null +++ b/ATS/core_language/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_037.ttcn @@ -0,0 +1,38 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:7.1.3, Ensure that the not eqaul to operator on record type address is evaluated correctly. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +/*The address type is allowed for the equality (==) and non-equality (!=) operators, independent of its actual type, but when its actual type differs from the types specified above, it can be compared to the literal special value null only.*/ + +module Sem_070103_RelationalOperators_037 { + +type component GeneralComp { +} + +type record Myaddress_type { + integer field1, + float field2 +} + +type Myaddress_type address; + +testcase TC_Sem_070103_RelationalOperators_037() runs on GeneralComp { + + var address My_address:=null; + + + if (My_address == null) { + setverdict(pass, My_address); + } else { + setverdict(fail,My_address); + } +} + +control{ + execute(TC_Sem_070103_RelationalOperators_037()); +} + +} diff --git a/ATS/core_language/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_038.ttcn b/ATS/core_language/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_038.ttcn new file mode 100644 index 00000000..5c0621f4 --- /dev/null +++ b/ATS/core_language/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_038.ttcn @@ -0,0 +1,31 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:7.1.3, Ensure that less than operator evaulates correctly infinity special float + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_070103_RelationalOperators_038 { + +type component GeneralComp { +} + + + +testcase TC_Sem_070103_RelationalOperators_038() runs on GeneralComp { + + var float My_val:= 100.0; + + + if (My_val < infinity) { + setverdict(pass); + } else { + setverdict(fail); + } +} + +control{ + execute(TC_Sem_070103_RelationalOperators_038()); +} + +} diff --git a/ATS/core_language/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_039.ttcn b/ATS/core_language/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_039.ttcn new file mode 100644 index 00000000..3db450ec --- /dev/null +++ b/ATS/core_language/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_039.ttcn @@ -0,0 +1,31 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:7.1.3, Ensure that less than or equal to operator evaulates correctly infinity special float + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_070103_RelationalOperators_039 { + +type component GeneralComp { +} + + + +testcase TC_Sem_070103_RelationalOperators_039() runs on GeneralComp { + + var float My_val:= 100.0; + + + if (My_val <= infinity) { + setverdict(pass); + } else { + setverdict(fail); + } +} + +control{ + execute(TC_Sem_070103_RelationalOperators_039()); +} + +} diff --git a/ATS/core_language/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_040.ttcn b/ATS/core_language/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_040.ttcn new file mode 100644 index 00000000..99052ec8 --- /dev/null +++ b/ATS/core_language/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_040.ttcn @@ -0,0 +1,31 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:7.1.3, Ensure that greather than operator evaulates correctly -infinity special float + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_070103_RelationalOperators_040 { + +type component GeneralComp { +} + + + +testcase TC_Sem_070103_RelationalOperators_040() runs on GeneralComp { + + var float My_val:= 1.0; + + + if (-infinity < My_val) { + setverdict(pass); + } else { + setverdict(fail); + } +} + +control{ + execute(TC_Sem_070103_RelationalOperators_040()); +} + +} diff --git a/ATS/core_language/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_041.ttcn b/ATS/core_language/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_041.ttcn new file mode 100644 index 00000000..4760b95d --- /dev/null +++ b/ATS/core_language/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_041.ttcn @@ -0,0 +1,31 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:7.1.3, Ensure that greather than or equal to operator evaulates correctly -infinity special float + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_070103_RelationalOperators_041 { + +type component GeneralComp { +} + + + +testcase TC_Sem_070103_RelationalOperators_041() runs on GeneralComp { + + var float My_val:= 1.0; + + + if (-infinity <= My_val) { + setverdict(pass); + } else { + setverdict(fail); + } +} + +control{ + execute(TC_Sem_070103_RelationalOperators_041()); +} + +} diff --git a/ATS/core_language/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_042.ttcn b/ATS/core_language/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_042.ttcn new file mode 100644 index 00000000..d84288b3 --- /dev/null +++ b/ATS/core_language/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_042.ttcn @@ -0,0 +1,30 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:7.1.3, Ensure that equal to operator evaulates correctly -infinity special float + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_070103_RelationalOperators_042 { + +type component GeneralComp { +} + + + +testcase TC_Sem_070103_RelationalOperators_042() runs on GeneralComp { + + var float My_val := -1.0 * infinity; // My_val= -infinity + + if (-infinity == My_val) { + setverdict(pass); + } else { + setverdict(fail); + } +} + +control{ + execute(TC_Sem_070103_RelationalOperators_042()); +} + +} diff --git a/ATS/core_language/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_043.ttcn b/ATS/core_language/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_043.ttcn new file mode 100644 index 00000000..8f14299d --- /dev/null +++ b/ATS/core_language/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_043.ttcn @@ -0,0 +1,30 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:7.1.3, Ensure that equal to operator evaulates correctly infinity special float + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_070103_RelationalOperators_043 { + +type component GeneralComp { +} + + + +testcase TC_Sem_070103_RelationalOperators_043() runs on GeneralComp { + + var float My_val := -1.0 * -infinity; // My_val= infinity + + if (infinity == My_val) { + setverdict(pass); + } else { + setverdict(fail); + } +} + +control{ + execute(TC_Sem_070103_RelationalOperators_043()); +} + +} diff --git a/ATS/core_language/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_044.ttcn b/ATS/core_language/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_044.ttcn new file mode 100644 index 00000000..2ba47f59 --- /dev/null +++ b/ATS/core_language/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_044.ttcn @@ -0,0 +1,30 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:7.1.3, Ensure that not equal to operator evaulates correctly infinity special float + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_070103_RelationalOperators_044 { + +type component GeneralComp { +} + + + +testcase TC_Sem_070103_RelationalOperators_044() runs on GeneralComp { + + var float My_val := 1.0 * -infinity; // My_val= -infinity + + if (infinity != My_val) { + setverdict(pass, My_val); + } else { + setverdict(fail, My_val); + } +} + +control{ + execute(TC_Sem_070103_RelationalOperators_044()); +} + +} diff --git a/ATS/core_language/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_045.ttcn b/ATS/core_language/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_045.ttcn new file mode 100644 index 00000000..d57127b0 --- /dev/null +++ b/ATS/core_language/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_045.ttcn @@ -0,0 +1,30 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:7.1.3, Ensure that NaN special float is evaulated correctly in a relation. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_070103_RelationalOperators_045 { + +type component GeneralComp { +} + + + +testcase TC_Sem_070103_RelationalOperators_045() runs on GeneralComp { + + var float My_val := 1.0; + + if (My_val < not_a_number) { + setverdict(pass, My_val); + } else { + setverdict(fail, My_val); + } +} + +control{ + execute(TC_Sem_070103_RelationalOperators_045()); +} + +} diff --git a/ATS/core_language/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_046.ttcn b/ATS/core_language/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_046.ttcn new file mode 100644 index 00000000..5dd8836c --- /dev/null +++ b/ATS/core_language/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_046.ttcn @@ -0,0 +1,29 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:7.1.3, Ensure that NaN special float is evaulated correctly in a relation. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_070103_RelationalOperators_046 { + +type component GeneralComp { +} + + + +testcase TC_Sem_070103_RelationalOperators_046() runs on GeneralComp { + + + if (infinity < not_a_number) { + setverdict(pass); + } else { + setverdict(fail); + } +} + +control{ + execute(TC_Sem_070103_RelationalOperators_046()); +} + +} diff --git a/ATS/core_language/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_047.ttcn b/ATS/core_language/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_047.ttcn new file mode 100644 index 00000000..24bc1fa0 --- /dev/null +++ b/ATS/core_language/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_047.ttcn @@ -0,0 +1,27 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:7.1.3, Ensure that infinity special float is evaulated correctly in a relation. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_070103_RelationalOperators_047 { + +type component GeneralComp { +} + +testcase TC_Sem_070103_RelationalOperators_047() runs on GeneralComp { + + + if (-infinity < infinity) { + setverdict(pass); + } else { + setverdict(fail); + } +} + +control{ + execute(TC_Sem_070103_RelationalOperators_047()); +} + +} diff --git a/ATS/core_language/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_048.ttcn b/ATS/core_language/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_048.ttcn new file mode 100644 index 00000000..bdaa717c --- /dev/null +++ b/ATS/core_language/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_048.ttcn @@ -0,0 +1,40 @@ +/***************************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:7.1.3, Ensure that anytypes can be compared + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirement is tested: +// Values of the same or any two anytype types can be compared. +// For anytype values the same rule apply as to union values, with the addition that names of user-defined types defined with the same name in different modules do not denote the same type name of the selected alternatives. + +module Sem_070103_RelationalOperators_048 { + +type component GeneralComp { +} + +type anytype Atype_1; + +type anytype Atype_2; + +testcase TC_Sem_070103_RelationalOperators_048() runs on GeneralComp { + + var Atype_1 v_any1; + var Atype_2 v_any2; + + v_any1.integer := 2; + v_any2.integer := 4; + + if (v_any1.integer < v_any2.integer) { + setverdict(pass); + } else { + setverdict(fail); + } +} + +control{ + execute(TC_Sem_070103_RelationalOperators_048()); +} + +} diff --git a/ATS/core_language/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_049.ttcn b/ATS/core_language/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_049.ttcn new file mode 100644 index 00000000..530ae6eb --- /dev/null +++ b/ATS/core_language/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_049.ttcn @@ -0,0 +1,39 @@ +/***************************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:7.1.3, Ensure that anytypes can be compared + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirement is tested: +// Values of the same or any two anytype types can be compared. +// For anytype values the same rule apply as to union values, with the addition that names of user-defined types defined with the same name in different modules do not denote the same type name of the selected alternatives. + + +module Sem_070103_RelationalOperators_049 { + +type component GeneralComp { +} + +type anytype Atype; + +testcase TC_Sem_070103_RelationalOperators_049() runs on GeneralComp { + + var Atype v_any1; + var Atype v_any2; + + v_any1.float := 2.4; + v_any2.float := 4.2; + + if (v_any1.float < v_any2.float) { + setverdict(pass); + } else { + setverdict(fail); + } +} + +control{ + execute(TC_Sem_070103_RelationalOperators_049()); +} + +} diff --git a/ATS/core_language/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_050.ttcn b/ATS/core_language/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_050.ttcn new file mode 100644 index 00000000..0a1d9cb8 --- /dev/null +++ b/ATS/core_language/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_050.ttcn @@ -0,0 +1,41 @@ +/***************************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:7.1.3, Ensure that the less than or equal to operator on enumerations is evaluated correctly with differing values. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +// The following requirements are tested: +/* Two enumerated values are equal if and only if they are associated + * with the same integer value. Otherwise, they are ordered using the + * mathematical order on the associated integer values.*/ + + +module Sem_070103_RelationalOperators_050 { + +type component GeneralComp { +} + +type enumerated MyEnumType1 { + e_monday(2), e_tuesday, e_wednesday, e_thursday, e_friday +}; + +type enumerated MyEnumType2 { + e_monday(1..8), e_tuesday, e_wednesday, e_thursday, e_friday +}; + +testcase TC_Sem_070103_RelationalOperators_050() runs on GeneralComp { + var MyEnumType1 v_first := e_monday; + var MyEnumType2 v_second := e_monday(2); + + if (match(enum2int(v_first),enum2int(v_second))) { + setverdict(pass); + } else { + setverdict(fail); + } +} + +control{ + execute(TC_Sem_070103_RelationalOperators_050()); +} + +} diff --git a/ATS/core_language/07_expressions/0701_operators/070104_logical_operators/Sem_070104_LogicalOperators_001.ttcn b/ATS/core_language/07_expressions/0701_operators/070104_logical_operators/Sem_070104_LogicalOperators_001.ttcn new file mode 100644 index 00000000..93279cec --- /dev/null +++ b/ATS/core_language/07_expressions/0701_operators/070104_logical_operators/Sem_070104_LogicalOperators_001.ttcn @@ -0,0 +1,28 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:7.1.4, Ensure that the boolean operator supports negation. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_070104_LogicalOperators_001 { + +type component GeneralComp { +} + +testcase TC_Sem_070104_LogicalOperators_001() runs on GeneralComp { + var boolean v_test := true; + v_test := not v_test; + + if (v_test == false) { + setverdict(pass); + } else { + setverdict(fail); + } +} + +control{ + execute(TC_Sem_070104_LogicalOperators_001()); +} + +} diff --git a/ATS/core_language/07_expressions/0701_operators/070104_logical_operators/Sem_070104_LogicalOperators_002.ttcn b/ATS/core_language/07_expressions/0701_operators/070104_logical_operators/Sem_070104_LogicalOperators_002.ttcn new file mode 100644 index 00000000..5d1a5f06 --- /dev/null +++ b/ATS/core_language/07_expressions/0701_operators/070104_logical_operators/Sem_070104_LogicalOperators_002.ttcn @@ -0,0 +1,30 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:7.1.4, Ensure that the the and operator with true and false as operands work on boolean variables. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_070104_LogicalOperators_002 { + +type component GeneralComp { +} + +testcase TC_Sem_070104_LogicalOperators_002() runs on GeneralComp { + var boolean v_first := true; + var boolean v_second := false; + + var boolean v_result := v_first and v_second; + + if (v_result == false) { + setverdict(pass); + } else { + setverdict(fail); + } +} + +control{ + execute(TC_Sem_070104_LogicalOperators_002()); +} + +} diff --git a/ATS/core_language/07_expressions/0701_operators/070105_bitwise_operators/Sem_070105_BitwiseOperators_001.ttcn b/ATS/core_language/07_expressions/0701_operators/070105_bitwise_operators/Sem_070105_BitwiseOperators_001.ttcn new file mode 100644 index 00000000..87e532f6 --- /dev/null +++ b/ATS/core_language/07_expressions/0701_operators/070105_bitwise_operators/Sem_070105_BitwiseOperators_001.ttcn @@ -0,0 +1,28 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:7.1.5, Ensure that the bitwise negation operator works as expected. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_070105_BitwiseOperators_001 { + +type component GeneralComp { +} + +testcase TC_Sem_070105_BitwiseOperators_001() runs on GeneralComp { + var bitstring v_test := '1'B; + var bitstring v_result := not4b v_test; + + if (v_result == '0'B) { + setverdict(pass); + } else { + setverdict(fail); + } +} + +control{ + execute(TC_Sem_070105_BitwiseOperators_001()); +} + +} diff --git a/ATS/core_language/07_expressions/0701_operators/070105_bitwise_operators/Sem_070105_BitwiseOperators_002.ttcn b/ATS/core_language/07_expressions/0701_operators/070105_bitwise_operators/Sem_070105_BitwiseOperators_002.ttcn new file mode 100644 index 00000000..6f82b480 --- /dev/null +++ b/ATS/core_language/07_expressions/0701_operators/070105_bitwise_operators/Sem_070105_BitwiseOperators_002.ttcn @@ -0,0 +1,28 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:7.1.5, Ensure that the bitwise negation operator works as expected on hexstrings. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_070105_BitwiseOperators_002 { + +type component GeneralComp { +} + +testcase TC_Sem_070105_BitwiseOperators_002() runs on GeneralComp { + var hexstring v_test := '1A5'H; + var hexstring v_result := not4b v_test; + + if (v_result == 'E5A'H) { + setverdict(pass); + } else { + setverdict(fail); + } +} + +control{ + execute(TC_Sem_070105_BitwiseOperators_002()); +} + +} diff --git a/ATS/core_language/07_expressions/0701_operators/070106_shift_operators/Sem_070106_ShiftOperators_001.ttcn b/ATS/core_language/07_expressions/0701_operators/070106_shift_operators/Sem_070106_ShiftOperators_001.ttcn new file mode 100644 index 00000000..a3db32f1 --- /dev/null +++ b/ATS/core_language/07_expressions/0701_operators/070106_shift_operators/Sem_070106_ShiftOperators_001.ttcn @@ -0,0 +1,28 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:7.1.6, Ensure that the shift left operator works as expected on bitstrings. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_070106_ShiftOperators_001 { + +type component GeneralComp { +} + +testcase TC_Sem_070106_ShiftOperators_001() runs on GeneralComp { + var bitstring v_test := '111001'B; + var bitstring v_result := v_test << 2; + + if (v_result == '100100'B) { + setverdict(pass); + } else { + setverdict(fail); + } +} + +control{ + execute(TC_Sem_070106_ShiftOperators_001()); +} + +} diff --git a/ATS/core_language/07_expressions/0701_operators/070106_shift_operators/Sem_070106_ShiftOperators_002.ttcn b/ATS/core_language/07_expressions/0701_operators/070106_shift_operators/Sem_070106_ShiftOperators_002.ttcn new file mode 100644 index 00000000..b557cef0 --- /dev/null +++ b/ATS/core_language/07_expressions/0701_operators/070106_shift_operators/Sem_070106_ShiftOperators_002.ttcn @@ -0,0 +1,28 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:7.1.6, Ensure that the shift left operator works as expected on hexstrings. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_070106_ShiftOperators_002 { + +type component GeneralComp { +} + +testcase TC_Sem_070106_ShiftOperators_002() runs on GeneralComp { + var hexstring v_test := '12345'H; + var hexstring v_result := v_test << 2; + + if (v_result == '34500'H) { + setverdict(pass); + } else { + setverdict(fail); + } +} + +control{ + execute(TC_Sem_070106_ShiftOperators_002()); +} + +} diff --git a/ATS/core_language/07_expressions/0701_operators/070106_shift_operators/Sem_070106_ShiftOperators_003.ttcn b/ATS/core_language/07_expressions/0701_operators/070106_shift_operators/Sem_070106_ShiftOperators_003.ttcn new file mode 100644 index 00000000..dfb21f44 --- /dev/null +++ b/ATS/core_language/07_expressions/0701_operators/070106_shift_operators/Sem_070106_ShiftOperators_003.ttcn @@ -0,0 +1,28 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:7.1.6, Ensure that the shift right operator works as expected on bitstrings. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_070106_ShiftOperators_003 { + +type component GeneralComp { +} + +testcase TC_Sem_070106_ShiftOperators_003() runs on GeneralComp { + var bitstring v_test := '111001'B; + var bitstring v_result := v_test >> 2; + + if (v_result == '001110'B) { + setverdict(pass); + } else { + setverdict(fail); + } +} + +control{ + execute(TC_Sem_070106_ShiftOperators_003()); +} + +} diff --git a/ATS/core_language/07_expressions/0701_operators/070106_shift_operators/Sem_070106_ShiftOperators_004.ttcn b/ATS/core_language/07_expressions/0701_operators/070106_shift_operators/Sem_070106_ShiftOperators_004.ttcn new file mode 100644 index 00000000..ef855568 --- /dev/null +++ b/ATS/core_language/07_expressions/0701_operators/070106_shift_operators/Sem_070106_ShiftOperators_004.ttcn @@ -0,0 +1,28 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:7.1.6, Ensure that the shift right operator works as expected on hexstrings. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_070106_ShiftOperators_004 { + +type component GeneralComp { +} + +testcase TC_Sem_070106_ShiftOperators_004() runs on GeneralComp { + var hexstring v_test := '12345'H; + var hexstring v_result := v_test >> 2; + + if (v_result == '00123'H) { + setverdict(pass); + } else { + setverdict(fail); + } +} + +control{ + execute(TC_Sem_070106_ShiftOperators_004()); +} + +} diff --git a/ATS/core_language/07_expressions/0701_operators/070107_rotate_operators/Sem_070107_RotateOperators_001.ttcn b/ATS/core_language/07_expressions/0701_operators/070107_rotate_operators/Sem_070107_RotateOperators_001.ttcn new file mode 100644 index 00000000..92e95952 --- /dev/null +++ b/ATS/core_language/07_expressions/0701_operators/070107_rotate_operators/Sem_070107_RotateOperators_001.ttcn @@ -0,0 +1,28 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:7.1.7, Ensure that the rotate left operator works as expected on bitstrings. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_070107_RotateOperators_001 { + +type component GeneralComp { +} + +testcase TC_Sem_070107_RotateOperators_001() runs on GeneralComp { + var bitstring v_test := '101001'B; + var bitstring v_result := v_test <@ 2; + + if (v_result == '100110'B) { + setverdict(pass); + } else { + setverdict(fail); + } +} + +control{ + execute(TC_Sem_070107_RotateOperators_001()); +} + +} diff --git a/ATS/core_language/07_expressions/0701_operators/070107_rotate_operators/Sem_070107_RotateOperators_002.ttcn b/ATS/core_language/07_expressions/0701_operators/070107_rotate_operators/Sem_070107_RotateOperators_002.ttcn new file mode 100644 index 00000000..bdba31bd --- /dev/null +++ b/ATS/core_language/07_expressions/0701_operators/070107_rotate_operators/Sem_070107_RotateOperators_002.ttcn @@ -0,0 +1,28 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:7.1.7, Ensure that the rotate left operator works as expected on hexstrings. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_070107_RotateOperators_002 { + +type component GeneralComp { +} + +testcase TC_Sem_070107_RotateOperators_002() runs on GeneralComp { + var hexstring v_test := '12345'H; + var hexstring v_result := v_test <@ 2; + + if (v_result == '34512'H) { + setverdict(pass); + } else { + setverdict(fail); + } +} + +control{ + execute(TC_Sem_070107_RotateOperators_002()); +} + +} diff --git a/ATS/core_language/07_expressions/0701_operators/070107_rotate_operators/Sem_070107_RotateOperators_003.ttcn b/ATS/core_language/07_expressions/0701_operators/070107_rotate_operators/Sem_070107_RotateOperators_003.ttcn new file mode 100644 index 00000000..1ef11e9d --- /dev/null +++ b/ATS/core_language/07_expressions/0701_operators/070107_rotate_operators/Sem_070107_RotateOperators_003.ttcn @@ -0,0 +1,28 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:7.1.7, Ensure that the rotate right operator works as expected on bitstrings. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_070107_RotateOperators_003 { + +type component GeneralComp { +} + +testcase TC_Sem_070107_RotateOperators_003() runs on GeneralComp { + var bitstring v_test := '100001'B; + var bitstring v_result := v_test @> 2; + + if (v_result == '011000'B) { + setverdict(pass); + } else { + setverdict(fail); + } +} + +control{ + execute(TC_Sem_070107_RotateOperators_003()); +} + +} diff --git a/ATS/core_language/07_expressions/0701_operators/070107_rotate_operators/Sem_070107_RotateOperators_004.ttcn b/ATS/core_language/07_expressions/0701_operators/070107_rotate_operators/Sem_070107_RotateOperators_004.ttcn new file mode 100644 index 00000000..afd5a73e --- /dev/null +++ b/ATS/core_language/07_expressions/0701_operators/070107_rotate_operators/Sem_070107_RotateOperators_004.ttcn @@ -0,0 +1,28 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:7.1.7, Ensure that the rotate right operator works as expected on hexstrings. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_070107_RotateOperators_004 { + +type component GeneralComp { +} + +testcase TC_Sem_070107_RotateOperators_004() runs on GeneralComp { + var hexstring v_test := '12345'H; + var hexstring v_result := v_test @> 2; + + if (v_result == '45123'H) { + setverdict(pass); + } else { + setverdict(fail); + } +} + +control{ + execute(TC_Sem_070107_RotateOperators_004()); +} + +} diff --git a/ATS/core_language/07_expressions/0702_field_references_and_list_elements/Sem_0702_FieldReferencesAndListElements_001.ttcn b/ATS/core_language/07_expressions/0702_field_references_and_list_elements/Sem_0702_FieldReferencesAndListElements_001.ttcn new file mode 100644 index 00000000..f2790d5d --- /dev/null +++ b/ATS/core_language/07_expressions/0702_field_references_and_list_elements/Sem_0702_FieldReferencesAndListElements_001.ttcn @@ -0,0 +1,32 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:7.2, Ensure that the IUT correctly handles field referencing + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_0702_FieldReferencesAndListElements_001 { + +type component GeneralComp { +} + +type record MyRecord1 { + integer field1, + charstring field2 +} + +testcase TC_Sem_0702_FieldReferencesAndListElements_001() runs on GeneralComp { + var MyRecord1 v_test := {1, "Hello World!"}; + + if ( match(v_test, {1, "Hello World!"})) { + setverdict(pass); + } else { + setverdict(fail); + } +} + +control{ + execute(TC_Sem_0702_FieldReferencesAndListElements_001()); +} + +} diff --git a/ATS/core_language/07_expressions/0702_field_references_and_list_elements/Sem_0702_FieldReferencesAndListElements_002.ttcn b/ATS/core_language/07_expressions/0702_field_references_and_list_elements/Sem_0702_FieldReferencesAndListElements_002.ttcn new file mode 100644 index 00000000..ed4c7b2d --- /dev/null +++ b/ATS/core_language/07_expressions/0702_field_references_and_list_elements/Sem_0702_FieldReferencesAndListElements_002.ttcn @@ -0,0 +1,29 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:7.2, Ensure that the IUT correctly handles field referencing + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_0702_FieldReferencesAndListElements_002 { + +type component GeneralComp { +} + +type record of integer IntegerArray; + +testcase TC_Sem_0702_FieldReferencesAndListElements_002() runs on GeneralComp { + var IntegerArray v_test := {20, 41, 12}; + + if ( match(v_test, {20, 41, 12}) ) { + setverdict(pass); + } else { + setverdict(fail); + } +} + +control{ + execute(TC_Sem_0702_FieldReferencesAndListElements_002()); +} + +} diff --git a/ATS/core_language/07_expressions/07_toplevel/NegSem_07_toplevel_001.ttcn b/ATS/core_language/07_expressions/07_toplevel/NegSem_07_toplevel_001.ttcn new file mode 100644 index 00000000..ec872c3a --- /dev/null +++ b/ATS/core_language/07_expressions/07_toplevel/NegSem_07_toplevel_001.ttcn @@ -0,0 +1,29 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:7, function without return clause in expression + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Functions used in expressions shall have a return clause. + +module NegSem_07_toplevel_001 +{ + type component GeneralComp { + } + + function f() + { + var integer v_num := 1; + } + + testcase TC_NegSem_07_toplevel_001() runs on GeneralComp { + var integer v_num := 3 * f(); + setverdict(pass); + } + + control { + execute(TC_NegSem_07_toplevel_001()); + } +} diff --git a/ATS/core_language/07_expressions/07_toplevel/NegSem_07_toplevel_002.ttcn b/ATS/core_language/07_expressions/07_toplevel/NegSem_07_toplevel_002.ttcn new file mode 100644 index 00000000..15fdb4a7 --- /dev/null +++ b/ATS/core_language/07_expressions/07_toplevel/NegSem_07_toplevel_002.ttcn @@ -0,0 +1,32 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:7, template used as expression operand + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// The operands of the operators used in an expression shall be values and their root +// types shall be the types specified for the appropriate operator in the subsequent +// clauses. + +module NegSem_07_toplevel_002 +{ + type component GeneralComp { + } + + function f() + { + var integer p_num := 1; + } + + testcase TC_NegSem_07_toplevel_002() runs on GeneralComp { + var template(value) integer vm_num := 3; + var integer p_num := 3 * vm_num; + setverdict(pass); + } + + control { + execute(TC_NegSem_07_toplevel_002()); + } +} diff --git a/ATS/core_language/07_expressions/07_toplevel/NegSem_07_toplevel_003.ttcn b/ATS/core_language/07_expressions/07_toplevel/NegSem_07_toplevel_003.ttcn new file mode 100644 index 00000000..69d5ff2f --- /dev/null +++ b/ATS/core_language/07_expressions/07_toplevel/NegSem_07_toplevel_003.ttcn @@ -0,0 +1,33 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:7, uninitialized value in an expression + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// At the point, when an expression is evaluated, the evaluated values of the +// operands used in expressions shall be completely initialized except where +// explicitly stated otherwise in the specific clause of the operator. + +module NegSem_07_toplevel_003 +{ + type component GeneralComp { + } + + type record R { + integer field1, + integer field2 optional + } + + testcase TC_NegSem_07_toplevel_003() runs on GeneralComp { + var R v_rec; + v_rec.field1 := 1; + if (10 + v_rec.field2 != -1) { setverdict(pass); } + else { setverdict(fail); } + } + + control { + execute(TC_NegSem_07_toplevel_003()); + } +} diff --git a/ATS/core_language/07_expressions/07_toplevel/NegSem_07_toplevel_004.ttcn b/ATS/core_language/07_expressions/07_toplevel/NegSem_07_toplevel_004.ttcn new file mode 100644 index 00000000..20b660ec --- /dev/null +++ b/ATS/core_language/07_expressions/07_toplevel/NegSem_07_toplevel_004.ttcn @@ -0,0 +1,33 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:7, partially initialized value in an expression + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// At the point, when an expression is evaluated, the evaluated values of the +// operands used in expressions shall be completely initialized except where +// explicitly stated otherwise in the specific clause of the operator. + +module NegSem_07_toplevel_004 +{ + type component GeneralComp { + } + + type record R { + integer field1, + integer field2 optional + } + + testcase TC_NegSem_07_toplevel_004() runs on GeneralComp { + var R v_rec; + v_rec.field1 := 1; + if (not match(v_rec, { 20, 6 })) { setverdict(pass); } + else { setverdict(fail); } + } + + control { + execute(TC_NegSem_07_toplevel_004()); + } +} diff --git a/ATS/core_language/07_expressions/07_toplevel/NegSem_07_toplevel_005.ttcn b/ATS/core_language/07_expressions/07_toplevel/NegSem_07_toplevel_005.ttcn new file mode 100644 index 00000000..e8d7181d --- /dev/null +++ b/ATS/core_language/07_expressions/07_toplevel/NegSem_07_toplevel_005.ttcn @@ -0,0 +1,28 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:7, null value in an expression + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// With the exception of the equality and non-equality operators, the special +// value null shall not be used as an operand of expressions (see clause 7.1.3). + +module NegSem_07_toplevel_005 +{ + type component GeneralComp { + } + + type integer address; + + testcase TC_NegSem_07_toplevel_005() runs on GeneralComp { + var address v_addr := null; + if (10 + v_addr != -1) { setverdict(pass); } + else { setverdict(fail); } + } + + control { + execute(TC_NegSem_07_toplevel_005()); + } +} diff --git a/ATS/core_language/07_expressions/07_toplevel/Sem_07_toplevel_001.ttcn b/ATS/core_language/07_expressions/07_toplevel/Sem_07_toplevel_001.ttcn new file mode 100644 index 00000000..ca2bff1b --- /dev/null +++ b/ATS/core_language/07_expressions/07_toplevel/Sem_07_toplevel_001.ttcn @@ -0,0 +1,31 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:7, expression composed of several expressions + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Expressions may be built from other (simple) expressions. + +module Sem_07_toplevel_001 +{ + type component GeneralComp { + } + + function f() return integer + { + return 5; + } + + testcase TC_Sem_07_toplevel_001() runs on GeneralComp { + var integer v_num := 3; + var integer v_res := -v_num + f() * 2 - 3; + if (v_res == 4) { setverdict(pass); } + else { setverdict(fail); } + } + + control { + execute(TC_Sem_07_toplevel_001()); + } +} diff --git a/ATS/core_language/07_expressions/07_toplevel/Sem_07_toplevel_002.ttcn b/ATS/core_language/07_expressions/07_toplevel/Sem_07_toplevel_002.ttcn new file mode 100644 index 00000000..1c47f080 --- /dev/null +++ b/ATS/core_language/07_expressions/07_toplevel/Sem_07_toplevel_002.ttcn @@ -0,0 +1,28 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:7, compound expression as an operand of array type + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Compound expressions are used for expressions of array, record, record of and +// set of types. + +module Sem_07_toplevel_002 +{ + type component GeneralComp { + } + + testcase TC_Sem_07_toplevel_002() runs on GeneralComp { + var integer v_arr[2]; + v_arr[0] := 1; + v_arr[1] := 2; + if (v_arr == { 1, 2 }) { setverdict(pass); } + else { setverdict(fail); } + } + + control { + execute(TC_Sem_07_toplevel_002()); + } +} diff --git a/ATS/core_language/07_expressions/07_toplevel/Sem_07_toplevel_003.ttcn b/ATS/core_language/07_expressions/07_toplevel/Sem_07_toplevel_003.ttcn new file mode 100644 index 00000000..70eca318 --- /dev/null +++ b/ATS/core_language/07_expressions/07_toplevel/Sem_07_toplevel_003.ttcn @@ -0,0 +1,33 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:7, compound expression as an operand of record type + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Compound expressions are used for expressions of array, record, record of and +// set of types. + +module Sem_07_toplevel_003 +{ + type component GeneralComp { + } + + type record R { + integer field1, + charstring field2 optional + } + + testcase TC_Sem_07_toplevel_003() runs on GeneralComp { + var R v_rec; + v_rec.field1 := 1; + v_rec.field2 := omit; + if (v_rec == { field1 := 1, field2 := omit }) { setverdict(pass); } + else { setverdict(fail); } + } + + control { + execute(TC_Sem_07_toplevel_003()); + } +} diff --git a/ATS/core_language/07_expressions/07_toplevel/Sem_07_toplevel_004.ttcn b/ATS/core_language/07_expressions/07_toplevel/Sem_07_toplevel_004.ttcn new file mode 100644 index 00000000..8d348c7b --- /dev/null +++ b/ATS/core_language/07_expressions/07_toplevel/Sem_07_toplevel_004.ttcn @@ -0,0 +1,30 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:7, compound expression as an operand of record-of type + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Compound expressions are used for expressions of array, record, record of and +// set of types. + +module Sem_07_toplevel_004 +{ + type component GeneralComp { + } + + type record of integer RI; + + testcase TC_Sem_07_toplevel_004() runs on GeneralComp { + var RI v_rec; + v_rec[0] := 1; + v_rec[1] := 2; + if (v_rec == { 1, 2 }) { setverdict(pass); } + else { setverdict(fail); } + } + + control { + execute(TC_Sem_07_toplevel_004()); + } +} diff --git a/ATS/core_language/07_expressions/07_toplevel/Sem_07_toplevel_005.ttcn b/ATS/core_language/07_expressions/07_toplevel/Sem_07_toplevel_005.ttcn new file mode 100644 index 00000000..a7d5adb7 --- /dev/null +++ b/ATS/core_language/07_expressions/07_toplevel/Sem_07_toplevel_005.ttcn @@ -0,0 +1,30 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:7, compound expression as an operand of set-of type + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Compound expressions are used for expressions of array, record, record of and +// set of types. + +module Sem_07_toplevel_005 +{ + type component GeneralComp { + } + + type set of integer SI; + + testcase TC_Sem_07_toplevel_005() runs on GeneralComp { + var SI v_set; + v_set[0] := 1; + v_set[1] := 2; + if (v_set == { [0] := 1, [1] := 2 }) { setverdict(pass); } + else { setverdict(fail); } + } + + control { + execute(TC_Sem_07_toplevel_005()); + } +} diff --git a/ATS/core_language/07_expressions/07_toplevel/Sem_07_toplevel_006.ttcn b/ATS/core_language/07_expressions/07_toplevel/Sem_07_toplevel_006.ttcn new file mode 100644 index 00000000..c1843b1f --- /dev/null +++ b/ATS/core_language/07_expressions/07_toplevel/Sem_07_toplevel_006.ttcn @@ -0,0 +1,34 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:7, element of partially initialized structured value + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// This means also that all fields and elements of structured types referenced +// in an expression shall contain completely initialized values, while other +// fields and elements, not used in the expression, may be uninitialized or +// contain omit. + +module Sem_07_toplevel_006 +{ + type component GeneralComp { + } + + type record R { + integer field1, + integer field2 optional + } + + testcase TC_Sem_07_toplevel_006() runs on GeneralComp { + var R v_rec; + v_rec.field1 := 1; + if (10 + v_rec.field1 == 11) { setverdict(pass); } + else { setverdict(fail); } + } + + control { + execute(TC_Sem_07_toplevel_006()); + } +} diff --git a/ATS/core_language/07_expressions/07_toplevel/Sem_07_toplevel_007.ttcn b/ATS/core_language/07_expressions/07_toplevel/Sem_07_toplevel_007.ttcn new file mode 100644 index 00000000..15657870 --- /dev/null +++ b/ATS/core_language/07_expressions/07_toplevel/Sem_07_toplevel_007.ttcn @@ -0,0 +1,34 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:7, compound expression as an operand of set-of type + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Assignment or list notations are used for expressions of record, set, record of, set of, array, union and anytype types. + +module Sem_07_toplevel_007 +{ + type component GeneralComp { + } + + type anytype Atype; + + type record R { + integer field1, + charstring field2 optional + } + + testcase TC_Sem_07_toplevel_007() runs on GeneralComp { + var Atype v_any; + v_any.R.field1 := 1; + v_any.R.field2 := omit; + if (v_any.R == { field1 := 1, field2 := omit }) { setverdict(pass); } + else { setverdict(fail); } + } + + control { + execute(TC_Sem_07_toplevel_007()); + } +} \ No newline at end of file diff --git a/ATS/core_language/07_expressions/07_toplevel/Sem_07_toplevel_008.ttcn b/ATS/core_language/07_expressions/07_toplevel/Sem_07_toplevel_008.ttcn new file mode 100644 index 00000000..bfcebc7d --- /dev/null +++ b/ATS/core_language/07_expressions/07_toplevel/Sem_07_toplevel_008.ttcn @@ -0,0 +1,31 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:7, compound expression as an operand of set-of type + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Assignment or list notations are used for expressions of record, set, record of, set of, array, union and anytype types. + +module Sem_07_toplevel_008 +{ + type component GeneralComp { + } + + type union U { + integer field1, + charstring field2 + } + + testcase TC_Sem_07_toplevel_008() runs on GeneralComp { + var U v_union := { field2 := "abc" }; + + if (v_union == {field2 := "abc" }) { setverdict(pass); } + else { setverdict(fail,v_union); } + } + + control { + execute(TC_Sem_07_toplevel_008()); + } +} \ No newline at end of file diff --git a/ATS/core_language/07_expressions/07_toplevel/Sem_07_toplevel_009.ttcn b/ATS/core_language/07_expressions/07_toplevel/Sem_07_toplevel_009.ttcn new file mode 100644 index 00000000..91ea30fb --- /dev/null +++ b/ATS/core_language/07_expressions/07_toplevel/Sem_07_toplevel_009.ttcn @@ -0,0 +1,34 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:7, compound expression as an operand of set type + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Compound expressions are used for expressions of array, record, record of and +// set of types. + +module Sem_07_toplevel_009 +{ + type component GeneralComp { + } + + type set SI + { + integer field1, + integer field2 + }; + + testcase TC_Sem_07_toplevel_009() runs on GeneralComp { + var SI v_set; + v_set.field1 := 1; + v_set.field2 := 2; + if (match(v_set,{ field1 := 1, field2 := 2 })) { setverdict(pass); } + else { setverdict(fail); } + } + + control { + execute(TC_Sem_07_toplevel_009()); + } +} diff --git a/ATS/core_language/07_expressions/NOTES b/ATS/core_language/07_expressions/NOTES new file mode 100644 index 00000000..d4f1fe19 --- /dev/null +++ b/ATS/core_language/07_expressions/NOTES @@ -0,0 +1,2 @@ +- TODO: add some operator precedence tests... +- TODO: add more tests in general \ No newline at end of file diff --git a/ATS/core_language/08_modules/0801_definition_of_a_module/NegSyn_0801_DefinitionOfAModule_001.ttcn b/ATS/core_language/08_modules/0801_definition_of_a_module/NegSyn_0801_DefinitionOfAModule_001.ttcn new file mode 100644 index 00000000..3df0af6a --- /dev/null +++ b/ATS/core_language/08_modules/0801_definition_of_a_module/NegSyn_0801_DefinitionOfAModule_001.ttcn @@ -0,0 +1,10 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:8.1, Ensure that a module definition with multiple language specifications is rejected. + ** @verdict pass reject + *****************************************************************/ +// list of languages is not allowed +module NegSyn_0801_DefinitionOfAModule_001 language "TTCN-3:2005", "TTCN-3:2009", "TTCN-3:2010" { + +} diff --git a/ATS/core_language/08_modules/0801_definition_of_a_module/Syn_0801_DefinitionOfAModule_001.ttcn b/ATS/core_language/08_modules/0801_definition_of_a_module/Syn_0801_DefinitionOfAModule_001.ttcn new file mode 100644 index 00000000..a77b0476 --- /dev/null +++ b/ATS/core_language/08_modules/0801_definition_of_a_module/Syn_0801_DefinitionOfAModule_001.ttcn @@ -0,0 +1,10 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:8.1, Ensure that a "plain" module definition is accepted. + ** @verdict pass accept, noexecution + *****************************************************************/ + +module Syn_0801_DefinitionOfAModule_001 { + +} diff --git a/ATS/core_language/08_modules/0801_definition_of_a_module/Syn_0801_DefinitionOfAModule_002.ttcn b/ATS/core_language/08_modules/0801_definition_of_a_module/Syn_0801_DefinitionOfAModule_002.ttcn new file mode 100644 index 00000000..fc097462 --- /dev/null +++ b/ATS/core_language/08_modules/0801_definition_of_a_module/Syn_0801_DefinitionOfAModule_002.ttcn @@ -0,0 +1,10 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:8.1, Ensure that a module definition with language specification is accepted. + ** @verdict pass accept, noexecution + *****************************************************************/ + +module Syn_0801_DefinitionOfAModule_002 language "TTCN-3:2005" { + +} diff --git a/ATS/core_language/08_modules/0801_definition_of_a_module/Syn_0801_DefinitionOfAModule_003.ttcn b/ATS/core_language/08_modules/0801_definition_of_a_module/Syn_0801_DefinitionOfAModule_003.ttcn new file mode 100644 index 00000000..dd203976 --- /dev/null +++ b/ATS/core_language/08_modules/0801_definition_of_a_module/Syn_0801_DefinitionOfAModule_003.ttcn @@ -0,0 +1,10 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:8.1, Ensure that a module definition with language and package is accepted. + ** @verdict pass accept, noexecution + *****************************************************************/ + +module Syn_0801_DefinitionOfAModule_003 language "TTCN-3:2010", "TTCN-3:2010 Advanced Parameterization" { + +} diff --git a/ATS/core_language/08_modules/0801_definition_of_a_module/Syn_0801_DefinitionOfAModule_004.ttcn b/ATS/core_language/08_modules/0801_definition_of_a_module/Syn_0801_DefinitionOfAModule_004.ttcn new file mode 100644 index 00000000..8d0bc2c1 --- /dev/null +++ b/ATS/core_language/08_modules/0801_definition_of_a_module/Syn_0801_DefinitionOfAModule_004.ttcn @@ -0,0 +1,10 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:8.1, Ensure that a module definition with package and without language is accepted. + ** @verdict pass accept, noexecution + *****************************************************************/ + +module Syn_0801_DefinitionOfAModule_004 language "TTCN-3:2010 Advanced Parameterization" { + +} diff --git a/ATS/core_language/08_modules/0801_definition_of_a_module/Syn_0801_DefinitionOfAModule_005.ttcn b/ATS/core_language/08_modules/0801_definition_of_a_module/Syn_0801_DefinitionOfAModule_005.ttcn new file mode 100644 index 00000000..ed60d3a0 --- /dev/null +++ b/ATS/core_language/08_modules/0801_definition_of_a_module/Syn_0801_DefinitionOfAModule_005.ttcn @@ -0,0 +1,10 @@ +/***************************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:8.1, Ensure that a module definition with ed4.3.1 language and package is accepted. + ** @verdict pass accept, noexecution + *****************************************************************/ + +module Syn_0801_DefinitionOfAModule_005 language "TTCN-3:2011", "TTCN-3:2010 Advanced Parameterization" { + +} diff --git a/ATS/core_language/08_modules/0801_definition_of_a_module/Syn_0801_DefinitionOfAModule_006.ttcn b/ATS/core_language/08_modules/0801_definition_of_a_module/Syn_0801_DefinitionOfAModule_006.ttcn new file mode 100644 index 00000000..507e644b --- /dev/null +++ b/ATS/core_language/08_modules/0801_definition_of_a_module/Syn_0801_DefinitionOfAModule_006.ttcn @@ -0,0 +1,10 @@ +/***************************************************************** + ** @author STF 451 + ** @version 0.0.1 + ** @purpose 1:8.1, Ensure that a module definition with ed4.4.1 language and package is accepted. + ** @verdict pass accept, noexecution + *****************************************************************/ + +module Syn_0801_DefinitionOfAModule_006 language "TTCN-3:2012" { + +} diff --git a/ATS/core_language/08_modules/0801_definition_of_a_module/Syn_0801_DefinitionOfAModule_007.ttcn b/ATS/core_language/08_modules/0801_definition_of_a_module/Syn_0801_DefinitionOfAModule_007.ttcn new file mode 100644 index 00000000..543d40eb --- /dev/null +++ b/ATS/core_language/08_modules/0801_definition_of_a_module/Syn_0801_DefinitionOfAModule_007.ttcn @@ -0,0 +1,10 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:8.1, Ensure that a module definition with ed4.5.1 language and package is accepted. + ** @verdict pass accept, noexecution + *****************************************************************/ + +module Syn_0801_DefinitionOfAModule_007 language "TTCN-3:2013" { + +} diff --git a/ATS/core_language/08_modules/0801_definition_of_a_module/Syn_0801_DefinitionOfAModule_008.ttcn b/ATS/core_language/08_modules/0801_definition_of_a_module/Syn_0801_DefinitionOfAModule_008.ttcn new file mode 100644 index 00000000..70d20b43 --- /dev/null +++ b/ATS/core_language/08_modules/0801_definition_of_a_module/Syn_0801_DefinitionOfAModule_008.ttcn @@ -0,0 +1,10 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:8.1, Ensure that a module definition with ed4.6.1 language and package is accepted. + ** @verdict pass accept, noexecution + *****************************************************************/ + +module Syn_0801_DefinitionOfAModule_008 language "TTCN-3:2014" { + +} diff --git a/ATS/core_language/08_modules/0801_definition_of_a_module/Syn_0801_DefinitionOfAModule_009.ttcn b/ATS/core_language/08_modules/0801_definition_of_a_module/Syn_0801_DefinitionOfAModule_009.ttcn new file mode 100644 index 00000000..b19520be --- /dev/null +++ b/ATS/core_language/08_modules/0801_definition_of_a_module/Syn_0801_DefinitionOfAModule_009.ttcn @@ -0,0 +1,10 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:8.1, Ensure that a module definition with ed4.7.1 language and package is accepted. + ** @verdict pass accept, noexecution + *****************************************************************/ + +module Syn_0801_DefinitionOfAModule_009 language "TTCN-3:2015" { + +} diff --git a/ATS/core_language/08_modules/0801_definition_of_a_module/Syn_0801_DefinitionOfAModule_010.ttcn b/ATS/core_language/08_modules/0801_definition_of_a_module/Syn_0801_DefinitionOfAModule_010.ttcn new file mode 100644 index 00000000..23a8db2d --- /dev/null +++ b/ATS/core_language/08_modules/0801_definition_of_a_module/Syn_0801_DefinitionOfAModule_010.ttcn @@ -0,0 +1,10 @@ +/***************************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:8.1, Ensure that a module definition with ed4.8.1 language and package is accepted. + ** @verdict pass accept, noexecution + *****************************************************************/ + +module Syn_0801_DefinitionOfAModule_010 language "TTCN-3:2016" { + +} diff --git a/ATS/core_language/08_modules/0802_module_definitions_part/080201_module_parameters/NegSem_080201_ModuleParameters_001.ttcn b/ATS/core_language/08_modules/0802_module_definitions_part/080201_module_parameters/NegSem_080201_ModuleParameters_001.ttcn new file mode 100644 index 00000000..34c8f610 --- /dev/null +++ b/ATS/core_language/08_modules/0802_module_definitions_part/080201_module_parameters/NegSem_080201_ModuleParameters_001.ttcn @@ -0,0 +1,38 @@ +/***************************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:8.2.1, Ensure that a port, default or component types cannot be module parameters. + ** @verdict pass reject + *****************************************************************/ +// The following requirements are tested: +/* Restriction B: Module parameters shall not be of port type, + * default type or component type and shall not be of a structured type that contains a sub-element of + * port type at any level of nesting.*/ + +module NegSem_080201_ModuleParameters_001 { + + type port MyMessagePortType message + { + in integer; + out integer; + inout integer + } + +modulepar MyMessagePortType MY_PORT; // not allowed + +type component GeneralComp { +} + +testcase TC_NegSem_080201_ModuleParameters_001() runs on GeneralComp { + if (MY_PORT) { + setverdict(pass); + } else { + setverdict(fail); + } +} + +control{ + execute(TC_NegSem_080201_ModuleParameters_001()); +} + +} diff --git a/ATS/core_language/08_modules/0802_module_definitions_part/080201_module_parameters/NegSem_080201_ModuleParameters_002.ttcn b/ATS/core_language/08_modules/0802_module_definitions_part/080201_module_parameters/NegSem_080201_ModuleParameters_002.ttcn new file mode 100644 index 00000000..5020c75a --- /dev/null +++ b/ATS/core_language/08_modules/0802_module_definitions_part/080201_module_parameters/NegSem_080201_ModuleParameters_002.ttcn @@ -0,0 +1,46 @@ +/***************************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:8.2.1, Ensure that a port, default or component types cannot be module parameters. + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +/* Restriction B: Module parameters shall not be of port type, + * default type or component type and shall not be of a structured type that contains a sub-element of + * port type at any level of nesting.*/ + +module NegSem_080201_ModuleParameters_002 { + + type port MyMessagePortType message + { + in integer; + out integer; + inout integer + } + + type component My_component_type{ + port MyMessagePortType pCO1; + + } + + +modulepar My_component_type MY_COMP; // not allowed + +type component GeneralComp { +} + +testcase TC_NegSem_080201_ModuleParameters_002() runs on GeneralComp { + + if (MY_COMP.running) { + setverdict(pass); + } else { + setverdict(fail); + } +} + +control{ + execute(TC_NegSem_080201_ModuleParameters_002()); +} + +} diff --git a/ATS/core_language/08_modules/0802_module_definitions_part/080201_module_parameters/NegSem_080201_ModuleParameters_003.ttcn b/ATS/core_language/08_modules/0802_module_definitions_part/080201_module_parameters/NegSem_080201_ModuleParameters_003.ttcn new file mode 100644 index 00000000..1a1628d7 --- /dev/null +++ b/ATS/core_language/08_modules/0802_module_definitions_part/080201_module_parameters/NegSem_080201_ModuleParameters_003.ttcn @@ -0,0 +1,34 @@ +/***************************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:8.2.1, Ensure that a port, default or component types cannot be module parameters. + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +/* Restriction B: Module parameters shall not be of port type, + * default type or component type and shall not be of a structured type that contains a sub-element of + * port type at any level of nesting.*/ + +module NegSem_080201_ModuleParameters_003 { + + +modulepar default MY_DEF := null; // not allowed + +type component GeneralComp { +} + +testcase TC_NegSem_080201_ModuleParameters_003() runs on GeneralComp { + + if (MY_DEF == null) { + setverdict(pass); + } else { + setverdict(fail); + } +} + +control{ + execute(TC_NegSem_080201_ModuleParameters_003()); +} + +} diff --git a/ATS/core_language/08_modules/0802_module_definitions_part/080201_module_parameters/NegSem_080201_ModuleParameters_004.ttcn b/ATS/core_language/08_modules/0802_module_definitions_part/080201_module_parameters/NegSem_080201_ModuleParameters_004.ttcn new file mode 100644 index 00000000..c8576132 --- /dev/null +++ b/ATS/core_language/08_modules/0802_module_definitions_part/080201_module_parameters/NegSem_080201_ModuleParameters_004.ttcn @@ -0,0 +1,34 @@ +/***************************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:8.2.1, Ensure that module parameters remain constant. + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +/* Restriction B: Module parameters shall not be of port type, + * default type or component type and shall not be of a structured type that contains a sub-element of + * port type at any level of nesting.*/ + +module NegSem_080201_ModuleParameters_004 { + + +modulepar integer MY_INT := 2; + +type component GeneralComp { +} + +testcase TC_NegSem_080201_ModuleParameters_004() runs on GeneralComp { + MY_INT := 3; // not allowed to change module parameter + if (MY_INT == 2) { + setverdict(pass); + } else { + setverdict(fail); + } +} + +control{ + execute(TC_NegSem_080201_ModuleParameters_004()); +} + +} diff --git a/ATS/core_language/08_modules/0802_module_definitions_part/080201_module_parameters/NegSem_080201_ModuleParameters_005.ttcn b/ATS/core_language/08_modules/0802_module_definitions_part/080201_module_parameters/NegSem_080201_ModuleParameters_005.ttcn new file mode 100644 index 00000000..27d7b265 --- /dev/null +++ b/ATS/core_language/08_modules/0802_module_definitions_part/080201_module_parameters/NegSem_080201_ModuleParameters_005.ttcn @@ -0,0 +1,28 @@ +/***************************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:8.2.1, Ensure that a reference to plain module parameter with a default value delivers the default value unless it is overwritten. + ** @verdict pass reject + *****************************************************************/ +// A module parameter shall only be of type address if the address type is explicitly defined within the associated module + +module NegSem_080201_ModuleParameters_005 { + +modulepar address MY_ADDRESS_MODULE_PARAMETER := 2; // error: address type not defined + +type component GeneralComp { +} + +testcase TC_NegSem_080201_ModuleParameters_005() runs on GeneralComp { + if (MY_ADDRESS_MODULE_PARAMETER == 2) { + setverdict(pass); + } else { + setverdict(fail); + } +} + +control{ + execute(TC_NegSem_080201_ModuleParameters_005()); +} + +} diff --git a/ATS/core_language/08_modules/0802_module_definitions_part/080201_module_parameters/NegSem_080201_ModuleParameters_006.ttcn b/ATS/core_language/08_modules/0802_module_definitions_part/080201_module_parameters/NegSem_080201_ModuleParameters_006.ttcn new file mode 100644 index 00000000..e64dca80 --- /dev/null +++ b/ATS/core_language/08_modules/0802_module_definitions_part/080201_module_parameters/NegSem_080201_ModuleParameters_006.ttcn @@ -0,0 +1,30 @@ +/***************************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:8.2.1, Ensure that a reference to plain module parameter with a default value delivers the default value unless it is overwritten. + ** @verdict pass reject + *****************************************************************/ +//Module parameters shall not be used in type or array definitions. + +module NegSem_080201_ModuleParameters_006 { + +modulepar integer MY_INT_MODULE_PARAMETER := 2; + +type component GeneralComp { +} + +testcase TC_NegSem_080201_ModuleParameters_006() runs on GeneralComp { + + var integer my_int_array[1] := MY_INT_MODULE_PARAMETER; // error: Module parameters shall not be used in type or array definitions. + if (my_int_array[2] == 2) { + setverdict(pass); + } else { + setverdict(fail); + } +} + +control{ + execute(TC_NegSem_080201_ModuleParameters_006()); +} + +} diff --git a/ATS/core_language/08_modules/0802_module_definitions_part/080201_module_parameters/NegSyn_080201_ModuleParameters_001.ttcn b/ATS/core_language/08_modules/0802_module_definitions_part/080201_module_parameters/NegSyn_080201_ModuleParameters_001.ttcn new file mode 100644 index 00000000..9cdcac62 --- /dev/null +++ b/ATS/core_language/08_modules/0802_module_definitions_part/080201_module_parameters/NegSyn_080201_ModuleParameters_001.ttcn @@ -0,0 +1,17 @@ +/***************************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:8.2.1, Ensure that module parameter can be declared within the module definition part only. + ** @verdict pass reject, noexecution + *****************************************************************/ +module NegSyn_080201_ModuleParameters_001 { + + +type component GeneralComp { +} + +testcase TC_NegSyn_080201_ModuleParameters_001() runs on GeneralComp { + +modulepar integer MY_MODULE_PAR := 1; // not allowed to declared here + +} diff --git a/ATS/core_language/08_modules/0802_module_definitions_part/080201_module_parameters/NegSyn_080201_ModuleParameters_002.ttcn b/ATS/core_language/08_modules/0802_module_definitions_part/080201_module_parameters/NegSyn_080201_ModuleParameters_002.ttcn new file mode 100644 index 00000000..e9ad4ee0 --- /dev/null +++ b/ATS/core_language/08_modules/0802_module_definitions_part/080201_module_parameters/NegSyn_080201_ModuleParameters_002.ttcn @@ -0,0 +1,11 @@ +/***************************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:8.2.1, Ensure that module parameter can be declared within the module definition part only. + ** @verdict pass reject, noexecution + *****************************************************************/ +module NegSyn_080201_ModuleParameters_002 { +modulepar integer MY_MODULE_PAR := 1; +modulepar integer MY_MODULE_PAR := 2; //error: not allowed to redeclare + +} diff --git a/ATS/core_language/08_modules/0802_module_definitions_part/080201_module_parameters/Sem_080201_ModuleParameters_001.ttcn b/ATS/core_language/08_modules/0802_module_definitions_part/080201_module_parameters/Sem_080201_ModuleParameters_001.ttcn new file mode 100644 index 00000000..d9aac35f --- /dev/null +++ b/ATS/core_language/08_modules/0802_module_definitions_part/080201_module_parameters/Sem_080201_ModuleParameters_001.ttcn @@ -0,0 +1,27 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:8.2.1, Ensure that a reference to plain module parameter with a default value delivers the default value unless it is overwritten. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_080201_ModuleParameters_001 { + +modulepar integer MY_INTEGER_MODULE_PARAMETER := 2; + +type component GeneralComp { +} + +testcase TC_Sem_080201_ModuleParameters_001() runs on GeneralComp { + if (MY_INTEGER_MODULE_PARAMETER == 2) { + setverdict(pass); + } else { + setverdict(fail); + } +} + +control{ + execute(TC_Sem_080201_ModuleParameters_001()); +} + +} diff --git a/ATS/core_language/08_modules/0802_module_definitions_part/080201_module_parameters/Sem_080201_ModuleParameters_002.ttcn b/ATS/core_language/08_modules/0802_module_definitions_part/080201_module_parameters/Sem_080201_ModuleParameters_002.ttcn new file mode 100644 index 00000000..3e96f47c --- /dev/null +++ b/ATS/core_language/08_modules/0802_module_definitions_part/080201_module_parameters/Sem_080201_ModuleParameters_002.ttcn @@ -0,0 +1,29 @@ +/***************************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:8.2.1, Ensure that a reference to plain module parameter with a default value delivers the default value unless it is overwritten. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +// A module parameter shall only be of type address if the address type is explicitly defined within the associated module +module Sem_080201_ModuleParameters_002 { + +type integer address; + +modulepar address MY_ADDRESS_MODULE_PARAMETER := 2; + +type component GeneralComp { +} + +testcase TC_Sem_080201_ModuleParameters_002() runs on GeneralComp { + if (MY_ADDRESS_MODULE_PARAMETER == 2) { + setverdict(pass); + } else { + setverdict(fail); + } +} + +control{ + execute(TC_Sem_080201_ModuleParameters_002()); +} + +} diff --git a/ATS/core_language/08_modules/0802_module_definitions_part/080201_module_parameters/Sem_080201_ModuleParameters_003.ttcn b/ATS/core_language/08_modules/0802_module_definitions_part/080201_module_parameters/Sem_080201_ModuleParameters_003.ttcn new file mode 100644 index 00000000..e5dda8c7 --- /dev/null +++ b/ATS/core_language/08_modules/0802_module_definitions_part/080201_module_parameters/Sem_080201_ModuleParameters_003.ttcn @@ -0,0 +1,29 @@ +/***************************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:8.2.1, Ensure that a reference to plain module parameter with a default value delivers the default value unless it is overwritten. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +//More than one occurrence of module parameters declaration is allowed but each parameter shall be declared only once (i.e. redefinition of the module parameter is not allowed). + +module Sem_080201_ModuleParameters_003 { + +modulepar integer MY_INTEGER_MODULE_PARAMETER := 2; +modulepar float MY_FLOAT_MODULE_PARAMETER := 1.23; + +type component GeneralComp { +} + +testcase TC_Sem_080201_ModuleParameters_003() runs on GeneralComp { + if (MY_INTEGER_MODULE_PARAMETER == 2 and MY_FLOAT_MODULE_PARAMETER == 1.23) { + setverdict(pass); + } else { + setverdict(fail); + } +} + +control{ + execute(TC_Sem_080201_ModuleParameters_003()); +} + +} diff --git a/ATS/core_language/08_modules/0802_module_definitions_part/080201_module_parameters/Syn_080201_ModuleParameters_001.ttcn b/ATS/core_language/08_modules/0802_module_definitions_part/080201_module_parameters/Syn_080201_ModuleParameters_001.ttcn new file mode 100644 index 00000000..43811f1f --- /dev/null +++ b/ATS/core_language/08_modules/0802_module_definitions_part/080201_module_parameters/Syn_080201_ModuleParameters_001.ttcn @@ -0,0 +1,10 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:8.2.1, Ensure that plain module parameters are accepted. + ** @verdict pass accept, noexecution + *****************************************************************/ + +module Syn_080201_ModuleParameters_001 { + modulepar integer MY_INTEGER_MODULE_PARAMETER; +} diff --git a/ATS/core_language/08_modules/0802_module_definitions_part/080201_module_parameters/Syn_080201_ModuleParameters_002.ttcn b/ATS/core_language/08_modules/0802_module_definitions_part/080201_module_parameters/Syn_080201_ModuleParameters_002.ttcn new file mode 100644 index 00000000..a02dfff3 --- /dev/null +++ b/ATS/core_language/08_modules/0802_module_definitions_part/080201_module_parameters/Syn_080201_ModuleParameters_002.ttcn @@ -0,0 +1,10 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:8.2.1, Ensure that plain module parameters with default values are accepted. + ** @verdict pass accept, noexecution + *****************************************************************/ + +module Syn_080201_ModuleParameters_002 { + modulepar integer MY_INTEGER_MODULE_PARAMETER := 2; +} diff --git a/ATS/core_language/08_modules/0802_module_definitions_part/080201_module_parameters/Syn_080201_ModuleParameters_003.ttcn b/ATS/core_language/08_modules/0802_module_definitions_part/080201_module_parameters/Syn_080201_ModuleParameters_003.ttcn new file mode 100644 index 00000000..b442a2ec --- /dev/null +++ b/ATS/core_language/08_modules/0802_module_definitions_part/080201_module_parameters/Syn_080201_ModuleParameters_003.ttcn @@ -0,0 +1,10 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:8.2.1, Ensure that plain module parameters with default values and visibility modifiers are accepted. + ** @verdict pass accept, noexecution + *****************************************************************/ + +module Syn_080201_ModuleParameters_003 { + private modulepar integer MY_INTEGER_MODULE_PARAMETER := 2; +} diff --git a/ATS/core_language/08_modules/0802_module_definitions_part/080202_groups_of_definitions/Syn_080202_GroupOfDefinitions_001.ttcn b/ATS/core_language/08_modules/0802_module_definitions_part/080202_groups_of_definitions/Syn_080202_GroupOfDefinitions_001.ttcn new file mode 100644 index 00000000..e5706515 --- /dev/null +++ b/ATS/core_language/08_modules/0802_module_definitions_part/080202_groups_of_definitions/Syn_080202_GroupOfDefinitions_001.ttcn @@ -0,0 +1,18 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:8.2.2, Ensure that a definition within a group is accepted. + ** @verdict pass accept, noexecution + *****************************************************************/ + + +module Syn_080202_GroupOfDefinitions_001 { + group TYPEDEF_GROUP { + group RECORDS_GROUP { + public type record MyRecord1 { + integer field1, + charstring field2 + } + } + } +} diff --git a/ATS/core_language/08_modules/0802_module_definitions_part/080202_groups_of_definitions/Syn_080202_GroupOfDefinitions_002.ttcn b/ATS/core_language/08_modules/0802_module_definitions_part/080202_groups_of_definitions/Syn_080202_GroupOfDefinitions_002.ttcn new file mode 100644 index 00000000..6f3f1adc --- /dev/null +++ b/ATS/core_language/08_modules/0802_module_definitions_part/080202_groups_of_definitions/Syn_080202_GroupOfDefinitions_002.ttcn @@ -0,0 +1,17 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:8.2.2, Ensure that a definition within a nested group is accepted. + ** @verdict pass accept, noexecution + *****************************************************************/ + + +module Syn_080202_GroupOfDefinitions_002 { + group MY_TYPEDEF_GROUP { + + public type record MyRecord1 { + integer field1, + charstring field2 + } + } +} diff --git a/ATS/core_language/08_modules/0802_module_definitions_part/080202_groups_of_definitions/Syn_080202_GroupOfDefinitions_003.ttcn b/ATS/core_language/08_modules/0802_module_definitions_part/080202_groups_of_definitions/Syn_080202_GroupOfDefinitions_003.ttcn new file mode 100644 index 00000000..6e1fdc86 --- /dev/null +++ b/ATS/core_language/08_modules/0802_module_definitions_part/080202_groups_of_definitions/Syn_080202_GroupOfDefinitions_003.ttcn @@ -0,0 +1,16 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:8.2.2, Ensure that a definition within a group with public visibility modifier is accepted. + ** @verdict pass accept, noexecution + *****************************************************************/ + + +module Syn_080202_GroupOfDefinitions_003 { + public group TYPEDEF_GROUP { + public type record MyRecord1 { + integer field1, + charstring field2 + } + } +} diff --git a/ATS/core_language/08_modules/0802_module_definitions_part/080202_groups_of_definitions/Syn_080202_GroupOfDefinitions_004.ttcn b/ATS/core_language/08_modules/0802_module_definitions_part/080202_groups_of_definitions/Syn_080202_GroupOfDefinitions_004.ttcn new file mode 100644 index 00000000..81023c0b --- /dev/null +++ b/ATS/core_language/08_modules/0802_module_definitions_part/080202_groups_of_definitions/Syn_080202_GroupOfDefinitions_004.ttcn @@ -0,0 +1,18 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:8.2.2, Ensure that a definition within a group with public visibility modifier and attributes is accepted. + ** @verdict pass accept, noexecution + *****************************************************************/ + + +module Syn_080202_GroupOfDefinitions_004 { + public group TYPEDEF_GROUP { + public type record MyRecord1 { + integer field1, + charstring field2 + } + } with { + encode "Encoding 3"; + } +} diff --git a/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/NegSem_08020301_GeneralFormatOfImport_001.ttcn b/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/NegSem_08020301_GeneralFormatOfImport_001.ttcn new file mode 100644 index 00000000..ff684a36 --- /dev/null +++ b/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/NegSem_08020301_GeneralFormatOfImport_001.ttcn @@ -0,0 +1,23 @@ +/***************************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:8.2.3.1, Ensure that name handling of imported enumerations is properly handled + ** @verdict pass reject + *****************************************************************/ + + +module NegSem_08020301_GeneralFormatOfImport_001 { + import from NegSem_08020301_GeneralFormatOfImport_001_import all; + + + //according to CR5607 the following definitions are not allowed, name conflict must be detected + const EnumType2 enumX := enumX; + const EnumType enumY := enumX; + +} + +module NegSem_08020301_GeneralFormatOfImport_001_import { + type enumerated EnumType {enumX, enumY, enumZ}; + type enumerated EnumType2 {enumX, enumY, enumZ}; + +} diff --git a/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/NegSem_08020301_GeneralFormatOfImport_002.ttcn b/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/NegSem_08020301_GeneralFormatOfImport_002.ttcn new file mode 100644 index 00000000..31f3c270 --- /dev/null +++ b/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/NegSem_08020301_GeneralFormatOfImport_002.ttcn @@ -0,0 +1,21 @@ +/***************************************************************** + ** @author STF 433 (updated by STF 521) + ** @version 0.0.2 + ** @purpose 1:8.2.3.1, Ensure that name handling of imported enumerations is properly handled + ** @verdict pass reject + *****************************************************************/ + + +module NegSem_08020301_GeneralFormatOfImport_002 language "TTCN-3:2016"{ + import from NegSem_08020301_GeneralFormatOfImport_002_import all; + + const EnumType2 c_enum := enumX; + + modulepar EnumType px_ModulePar := NegSem_08020301_GeneralFormatOfImport_002.c_enum; //type mismatch +} + +module NegSem_08020301_GeneralFormatOfImport_002_import { + type enumerated EnumType {enumX, enumY, enumZ}; + type enumerated EnumType2 {enumX, enumY, enumZ}; + +} diff --git a/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/NegSem_08020301_GeneralFormatOfImport_003.ttcn b/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/NegSem_08020301_GeneralFormatOfImport_003.ttcn new file mode 100644 index 00000000..882e926c --- /dev/null +++ b/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/NegSem_08020301_GeneralFormatOfImport_003.ttcn @@ -0,0 +1,37 @@ +/***************************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:8.2.3.4, Ensure that transitive import rules are properly handled + ** @verdict pass reject + *****************************************************************/ + + +module NegSem_08020301_GeneralFormatOfImport_003 { + +import from NegSem_08020301_GeneralFormatOfImport_003_import { + const all; +}; + +type component GeneralComp {} + +testcase TC_NegSem_08020301_GeneralFormatOfImport_003() runs on GeneralComp { + if (c_myconst == 43532) { + setverdict(pass); + } else { + setverdict(fail); + } +} + +control{ + execute(TC_NegSem_08020301_GeneralFormatOfImport_003()); +} +} + +module NegSem_08020301_GeneralFormatOfImport_003_import { + public import from NegSem_08020301_GeneralFormatOfImport_003_import_2 all; +} + + +module NegSem_08020301_GeneralFormatOfImport_003_import_2 { + const integer c_myconst := 43532; +} diff --git a/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/NegSem_08020301_GeneralFormatOfImport_004.ttcn b/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/NegSem_08020301_GeneralFormatOfImport_004.ttcn new file mode 100644 index 00000000..59c9c8c2 --- /dev/null +++ b/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/NegSem_08020301_GeneralFormatOfImport_004.ttcn @@ -0,0 +1,35 @@ +/***************************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:8.2.3.4, Ensure that transitive import rules are properly handled + ** @verdict pass reject + *****************************************************************/ + + +module NegSem_08020301_GeneralFormatOfImport_004 { + +import from NegSem_08020301_GeneralFormatOfImport_004_import all; + +type component GeneralComp {} + +testcase TC_NegSem_08020301_GeneralFormatOfImport_004() runs on GeneralComp { + if (c_myconst == 43532) { + setverdict(pass); + } else { + setverdict(fail); + } +} + +control{ + execute(TC_NegSem_08020301_GeneralFormatOfImport_004()); +} +} + +module NegSem_08020301_GeneralFormatOfImport_004_import { + import from NegSem_08020301_GeneralFormatOfImport_004_import_2 all; +} + + +module NegSem_08020301_GeneralFormatOfImport_004_import_2 { + const integer c_myconst := 43532; +} diff --git a/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/NegSem_08020301_GeneralFormatOfImport_005.ttcn b/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/NegSem_08020301_GeneralFormatOfImport_005.ttcn new file mode 100644 index 00000000..906b7260 --- /dev/null +++ b/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/NegSem_08020301_GeneralFormatOfImport_005.ttcn @@ -0,0 +1,33 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:8.2.3.1, Make sure that the identifier of the current module cannot be used for prefixing imported entities + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// Name clashes shall be resolved using qualified name(s) for the imported definition(s), +// i.e. prefixing the imported definition by the identifier of the module in which it has +// been defined; the prefix and the identifier shall be separated by a dot ("."). +// In cases where there are no ambiguities the prefixing need not (but may) be present +// when the imported definitions are used. + +module NegSem_08020301_GeneralFormatOfImport_005 { + +import from NegSem_08020301_GeneralFormatOfImport_005_import all; + +type component GeneralComp {} + +testcase TC_NegSem_08020301_GeneralFormatOfImport_005() runs on GeneralComp { + log(NegSem_08020301_GeneralFormatOfImport_005.c_test); + setverdict(pass); +} + +control{ + execute(TC_NegSem_08020301_GeneralFormatOfImport_005()); +} +} + +module NegSem_08020301_GeneralFormatOfImport_005_import { + const integer c_test := 5; +} \ No newline at end of file diff --git a/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/NegSem_08020301_GeneralFormatOfImport_006.ttcn b/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/NegSem_08020301_GeneralFormatOfImport_006.ttcn new file mode 100644 index 00000000..82b357ac --- /dev/null +++ b/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/NegSem_08020301_GeneralFormatOfImport_006.ttcn @@ -0,0 +1,33 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:8.2.3.1, Ensure that the only top-level visible definitions of a module may be imported. + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// Restriction b: +// Only top-level visible definitions of a module may be imported. Definitions which +// are top-level but invisible to the importing module or which occur at a lower scope +// (e.g. local constants defined in a function) shall not be imported. + +module NegSem_08020301_GeneralFormatOfImport_006 { +import from NegSem_08020301_GeneralFormatOfImport_006_import { const c_test }; + +type component GeneralComp {} + +testcase TC_NegSem_08020301_GeneralFormatOfImport_006() runs on GeneralComp { + log(c_test); + setverdict(pass); +} + +control{ + execute(TC_NegSem_08020301_GeneralFormatOfImport_006()); +} +} + +module NegSem_08020301_GeneralFormatOfImport_006_import { + control { + const integer c_test := 5; + } +} diff --git a/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/NegSem_08020301_GeneralFormatOfImport_007.ttcn b/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/NegSem_08020301_GeneralFormatOfImport_007.ttcn new file mode 100644 index 00000000..ed075236 --- /dev/null +++ b/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/NegSem_08020301_GeneralFormatOfImport_007.ttcn @@ -0,0 +1,40 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:8.2.3.1, Verify that information about message types is imported together with port type + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// Restriction d: +// A definition is imported together with all information of referenced definitions that +// are necessary for the usage of the imported definition, independent of the visibility +// of the referenced definitions. +// Table 8: +// User defined type, port type + +module NegSem_08020301_GeneralFormatOfImport_007 { +import from NegSem_08020301_GeneralFormatOfImport_007_import { type P }; + +type component GeneralComp { + port P p1; +} + +testcase TC_NegSem_08020301_GeneralFormatOfImport_007() runs on GeneralComp { + // Since the type of the sent message is not compatible with the allowed types of the imported + // port type, a type compatibility error shall be generated. This proves that the type information + // has been properly imported. + p1.send(charstring:"abc"); + setverdict(pass); +} + +control{ + execute(TC_NegSem_08020301_GeneralFormatOfImport_007()); +} +} + +module NegSem_08020301_GeneralFormatOfImport_007_import { + type port P message { + inout integer; + } +} \ No newline at end of file diff --git a/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/NegSem_08020301_GeneralFormatOfImport_008.ttcn b/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/NegSem_08020301_GeneralFormatOfImport_008.ttcn new file mode 100644 index 00000000..d18815f7 --- /dev/null +++ b/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/NegSem_08020301_GeneralFormatOfImport_008.ttcn @@ -0,0 +1,24 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:8.2.3.1, Verify that identifiers of module parameter types are not imported together with module parameters + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// The TTCN-3 import mechanism distinguishes between the identifier of a referenced +// definition and the information necessary for the usage of a referenced definition +// within the imported definition. For the usage, the identifier of a referenced +// definition is not required and therefore not imported automatically. +// Table 8: +// Possible referenced definitions for a module parameter: module parameter type + +module NegSem_08020301_GeneralFormatOfImport_008 { +import from NegSem_08020301_GeneralFormatOfImport_008_import { modulepar PX_TEST }; + const MyType c_test := 1; // MyType should be undefined, because it is not automatically imported +} + +module NegSem_08020301_GeneralFormatOfImport_008_import { + type integer MyType; + modulepar MyType PX_TEST; +} \ No newline at end of file diff --git a/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/NegSem_08020301_GeneralFormatOfImport_009.ttcn b/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/NegSem_08020301_GeneralFormatOfImport_009.ttcn new file mode 100644 index 00000000..50ae2153 --- /dev/null +++ b/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/NegSem_08020301_GeneralFormatOfImport_009.ttcn @@ -0,0 +1,24 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:8.2.3.1, Verify that identifiers of constant types are not imported together with constants + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// The TTCN-3 import mechanism distinguishes between the identifier of a referenced +// definition and the information necessary for the usage of a referenced definition +// within the imported definition. For the usage, the identifier of a referenced +// definition is not required and therefore not imported automatically. +// Table 8: +// Possible referenced definitions for a constant: constant type + +module NegSem_08020301_GeneralFormatOfImport_009 { +import from NegSem_08020301_GeneralFormatOfImport_009_import { const c_test }; + const MyType c_test := 1; // MyType should be undefined, because it is not automatically imported +} + +module NegSem_08020301_GeneralFormatOfImport_009_import { + type integer MyType; + const MyType c_test := 0; +} \ No newline at end of file diff --git a/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/NegSem_08020301_GeneralFormatOfImport_010.ttcn b/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/NegSem_08020301_GeneralFormatOfImport_010.ttcn new file mode 100644 index 00000000..f4207940 --- /dev/null +++ b/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/NegSem_08020301_GeneralFormatOfImport_010.ttcn @@ -0,0 +1,26 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:8.2.3.1, Verify that identifiers of field types are not imported together with structured types + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// The TTCN-3 import mechanism distinguishes between the identifier of a referenced +// definition and the information necessary for the usage of a referenced definition +// within the imported definition. For the usage, the identifier of a referenced +// definition is not required and therefore not imported automatically. +// Table 8: +// Possible referenced definitions for a structured type: field types + +module NegSem_08020301_GeneralFormatOfImport_010 { +import from NegSem_08020301_GeneralFormatOfImport_010_import { type R }; + const MyType c_test := 1; // MyType should be undefined, because it is not automatically imported +} + +module NegSem_08020301_GeneralFormatOfImport_010_import { + type integer MyType; + type record R { + MyType field1 + } +} diff --git a/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/NegSem_08020301_GeneralFormatOfImport_011.ttcn b/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/NegSem_08020301_GeneralFormatOfImport_011.ttcn new file mode 100644 index 00000000..9694d94e --- /dev/null +++ b/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/NegSem_08020301_GeneralFormatOfImport_011.ttcn @@ -0,0 +1,26 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:8.2.3.1, Verify that identifiers of message types are not imported together with port types + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// The TTCN-3 import mechanism distinguishes between the identifier of a referenced +// definition and the information necessary for the usage of a referenced definition +// within the imported definition. For the usage, the identifier of a referenced +// definition is not required and therefore not imported automatically. +// Table 8: +// Possible referenced definitions for a port type: message types + +module NegSem_08020301_GeneralFormatOfImport_011 { +import from NegSem_08020301_GeneralFormatOfImport_011_import { type P }; + const MyType c_test := 1; // MyType should be undefined, because it is not automatically imported +} + +module NegSem_08020301_GeneralFormatOfImport_011_import { + type integer MyType; + type port P message { + inout MyType + } +} diff --git a/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/NegSem_08020301_GeneralFormatOfImport_012.ttcn b/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/NegSem_08020301_GeneralFormatOfImport_012.ttcn new file mode 100644 index 00000000..1f426d94 --- /dev/null +++ b/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/NegSem_08020301_GeneralFormatOfImport_012.ttcn @@ -0,0 +1,28 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:8.2.3.1, Verify that identifiers of signatures are not imported together with port types + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// The TTCN-3 import mechanism distinguishes between the identifier of a referenced +// definition and the information necessary for the usage of a referenced definition +// within the imported definition. For the usage, the identifier of a referenced +// definition is not required and therefore not imported automatically. +// Table 8: +// Possible referenced definitions for a port type: signatures + +module NegSem_08020301_GeneralFormatOfImport_012 { +import from NegSem_08020301_GeneralFormatOfImport_012_import { type P }; + // MySignature should be undefined, because it is not automatically imported + template MySignature s_test := { p_par1 := 1 }; +} + +module NegSem_08020301_GeneralFormatOfImport_012_import { + //type integer MyType; + signature MySignature (in integer p_par1) return integer; + type port P procedure { + inout MySignature + } +} \ No newline at end of file diff --git a/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/NegSem_08020301_GeneralFormatOfImport_013.ttcn b/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/NegSem_08020301_GeneralFormatOfImport_013.ttcn new file mode 100644 index 00000000..08757ea6 --- /dev/null +++ b/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/NegSem_08020301_GeneralFormatOfImport_013.ttcn @@ -0,0 +1,27 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:8.2.3.1, Verify that identifiers of constant types are not imported together with component types + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// The TTCN-3 import mechanism distinguishes between the identifier of a referenced +// definition and the information necessary for the usage of a referenced definition +// within the imported definition. For the usage, the identifier of a referenced +// definition is not required and therefore not imported automatically. +// Table 8: +// Possible referenced definitions for a component type: constant types + +module NegSem_08020301_GeneralFormatOfImport_013 { +import from NegSem_08020301_GeneralFormatOfImport_013_import { type C }; + // MyType should be undefined, because it is not automatically imported + template MyType s_test := 1; +} + +module NegSem_08020301_GeneralFormatOfImport_013_import { + type integer MyType; + type component C { + const MyType cc_test := 0; + } +} \ No newline at end of file diff --git a/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/NegSem_08020301_GeneralFormatOfImport_014.ttcn b/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/NegSem_08020301_GeneralFormatOfImport_014.ttcn new file mode 100644 index 00000000..8da9e44d --- /dev/null +++ b/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/NegSem_08020301_GeneralFormatOfImport_014.ttcn @@ -0,0 +1,27 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:8.2.3.1, Verify that identifiers of variable types are not imported together with component types + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// The TTCN-3 import mechanism distinguishes between the identifier of a referenced +// definition and the information necessary for the usage of a referenced definition +// within the imported definition. For the usage, the identifier of a referenced +// definition is not required and therefore not imported automatically. +// Table 8: +// Possible referenced definitions for a component type: variable types + +module NegSem_08020301_GeneralFormatOfImport_014 { +import from NegSem_08020301_GeneralFormatOfImport_014_import { type C }; + // MyType should be undefined, because it is not automatically imported + template MyType s_test := 1; +} + +module NegSem_08020301_GeneralFormatOfImport_014_import { + type integer MyType; + type component C { + var MyType vc_test := 0; + } +} \ No newline at end of file diff --git a/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/NegSem_08020301_GeneralFormatOfImport_015.ttcn b/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/NegSem_08020301_GeneralFormatOfImport_015.ttcn new file mode 100644 index 00000000..e617bf3a --- /dev/null +++ b/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/NegSem_08020301_GeneralFormatOfImport_015.ttcn @@ -0,0 +1,31 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:8.2.3.1, Verify that identifiers of port types are not imported together with component types + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// The TTCN-3 import mechanism distinguishes between the identifier of a referenced +// definition and the information necessary for the usage of a referenced definition +// within the imported definition. For the usage, the identifier of a referenced +// definition is not required and therefore not imported automatically. +// Table 8: +// Possible referenced definitions for a component type: port types + +module NegSem_08020301_GeneralFormatOfImport_015 { +import from NegSem_08020301_GeneralFormatOfImport_015_import { type C }; + // P should be undefined, because it is not automatically imported + type component GeneralComponent { + port P p2; + } +} + +module NegSem_08020301_GeneralFormatOfImport_015_import { + type port P message { + inout integer + } + type component C { + port P p1; + } +} \ No newline at end of file diff --git a/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/NegSem_08020301_GeneralFormatOfImport_016.ttcn b/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/NegSem_08020301_GeneralFormatOfImport_016.ttcn new file mode 100644 index 00000000..9bc47899 --- /dev/null +++ b/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/NegSem_08020301_GeneralFormatOfImport_016.ttcn @@ -0,0 +1,23 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:8.2.3.1, Verify that identifiers of parameter types are not imported together with signatures + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// The TTCN-3 import mechanism distinguishes between the identifier of a referenced +// definition and the information necessary for the usage of a referenced definition +// within the imported definition. For the usage, the identifier of a referenced +// definition is not required and therefore not imported automatically. + +module NegSem_08020301_GeneralFormatOfImport_016 { +import from NegSem_08020301_GeneralFormatOfImport_016_import { signature S }; + // MyType should be undefined, because it is not automatically imported + const MyType c_test := 1; +} + +module NegSem_08020301_GeneralFormatOfImport_016_import { + type integer MyType; + signature S(in MyType p1); +} \ No newline at end of file diff --git a/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/NegSem_08020301_GeneralFormatOfImport_017.ttcn b/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/NegSem_08020301_GeneralFormatOfImport_017.ttcn new file mode 100644 index 00000000..1d9d9049 --- /dev/null +++ b/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/NegSem_08020301_GeneralFormatOfImport_017.ttcn @@ -0,0 +1,25 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:8.2.3.1, Verify that identifiers of return types are not imported together with signatures + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// The TTCN-3 import mechanism distinguishes between the identifier of a referenced +// definition and the information necessary for the usage of a referenced definition +// within the imported definition. For the usage, the identifier of a referenced +// definition is not required and therefore not imported automatically. +// Table 8: +// Possible referenced definitions for a signature: return type + +module NegSem_08020301_GeneralFormatOfImport_017 { +import from NegSem_08020301_GeneralFormatOfImport_017_import { signature S }; + // MyType should be undefined, because it is not automatically imported + const MyType c_test := 1; +} + +module NegSem_08020301_GeneralFormatOfImport_017_import { + type integer MyType; + signature S() return MyType; +} \ No newline at end of file diff --git a/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/NegSem_08020301_GeneralFormatOfImport_018.ttcn b/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/NegSem_08020301_GeneralFormatOfImport_018.ttcn new file mode 100644 index 00000000..31e6f687 --- /dev/null +++ b/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/NegSem_08020301_GeneralFormatOfImport_018.ttcn @@ -0,0 +1,25 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:8.2.3.1, Verify that identifiers of exception types are not imported together with signatures + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// The TTCN-3 import mechanism distinguishes between the identifier of a referenced +// definition and the information necessary for the usage of a referenced definition +// within the imported definition. For the usage, the identifier of a referenced +// definition is not required and therefore not imported automatically. +// Table 8: +// Possible referenced definitions for a signature: types of exceptions + +module NegSem_08020301_GeneralFormatOfImport_018 { +import from NegSem_08020301_GeneralFormatOfImport_018_import { signature S }; + // MyType should be undefined, because it is not automatically imported + const MyType c_test := 1; +} + +module NegSem_08020301_GeneralFormatOfImport_018_import { + type integer MyType; + signature S() exception (MyType); +} diff --git a/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/NegSem_08020301_GeneralFormatOfImport_019.ttcn b/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/NegSem_08020301_GeneralFormatOfImport_019.ttcn new file mode 100644 index 00000000..6a3aa58b --- /dev/null +++ b/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/NegSem_08020301_GeneralFormatOfImport_019.ttcn @@ -0,0 +1,25 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:8.2.3.1, Verify that identifiers of template types are not imported together with data templates + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// The TTCN-3 import mechanism distinguishes between the identifier of a referenced +// definition and the information necessary for the usage of a referenced definition +// within the imported definition. For the usage, the identifier of a referenced +// definition is not required and therefore not imported automatically. +// Table 8: +// Possible referenced definitions for a data template: template type + +module NegSem_08020301_GeneralFormatOfImport_019 { +import from NegSem_08020301_GeneralFormatOfImport_019_import { template m_test }; + // MyType should be undefined, because it is not automatically imported + const MyType c_test := 1; +} + +module NegSem_08020301_GeneralFormatOfImport_019_import { + type integer MyType; + template MyType m_test := ?; +} \ No newline at end of file diff --git a/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/NegSem_08020301_GeneralFormatOfImport_020.ttcn b/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/NegSem_08020301_GeneralFormatOfImport_020.ttcn new file mode 100644 index 00000000..45fda006 --- /dev/null +++ b/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/NegSem_08020301_GeneralFormatOfImport_020.ttcn @@ -0,0 +1,25 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:8.2.3.1, Verify that identifiers of parameter types are not imported together with data templates + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// The TTCN-3 import mechanism distinguishes between the identifier of a referenced +// definition and the information necessary for the usage of a referenced definition +// within the imported definition. For the usage, the identifier of a referenced +// definition is not required and therefore not imported automatically. +// Table 8: +// Possible referenced definitions for a data template: parameter types + +module NegSem_08020301_GeneralFormatOfImport_020 { +import from NegSem_08020301_GeneralFormatOfImport_020_import { template m_test }; + // MyType should be undefined, because it is not automatically imported + const MyType c_test := 1; +} + +module NegSem_08020301_GeneralFormatOfImport_020_import { + type integer MyType; + template integer m_test (MyType p1) := (0..p1); +} diff --git a/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/NegSem_08020301_GeneralFormatOfImport_021.ttcn b/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/NegSem_08020301_GeneralFormatOfImport_021.ttcn new file mode 100644 index 00000000..6ce09fe1 --- /dev/null +++ b/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/NegSem_08020301_GeneralFormatOfImport_021.ttcn @@ -0,0 +1,25 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:8.2.3.1, Verify that identifiers of constants are not imported together with data templates + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// The TTCN-3 import mechanism distinguishes between the identifier of a referenced +// definition and the information necessary for the usage of a referenced definition +// within the imported definition. For the usage, the identifier of a referenced +// definition is not required and therefore not imported automatically. +// Table 8: +// Possible referenced definitions for a data template: constants + +module NegSem_08020301_GeneralFormatOfImport_021 { +import from NegSem_08020301_GeneralFormatOfImport_021_import { template m_test }; + // c_test should be undefined, because it is not automatically imported + const integer c_test2 := c_test; +} + +module NegSem_08020301_GeneralFormatOfImport_021_import { + const integer c_test := 1; + template integer m_test := c_test; +} \ No newline at end of file diff --git a/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/NegSem_08020301_GeneralFormatOfImport_022.ttcn b/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/NegSem_08020301_GeneralFormatOfImport_022.ttcn new file mode 100644 index 00000000..d0fb9b84 --- /dev/null +++ b/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/NegSem_08020301_GeneralFormatOfImport_022.ttcn @@ -0,0 +1,25 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:8.2.3.1, Verify that identifiers of module parameters are not imported together with data templates + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// The TTCN-3 import mechanism distinguishes between the identifier of a referenced +// definition and the information necessary for the usage of a referenced definition +// within the imported definition. For the usage, the identifier of a referenced +// definition is not required and therefore not imported automatically. +// Table 8: +// Possible referenced definitions for a data template: module parameters + +module NegSem_08020301_GeneralFormatOfImport_022 { +import from NegSem_08020301_GeneralFormatOfImport_022_import { template m_test }; + // PX_TEST should be undefined, because it is not automatically imported + const integer c_test := PX_TEST; +} + +module NegSem_08020301_GeneralFormatOfImport_022_import { + modulepar integer PX_TEST := 1; + template integer m_test := PX_TEST; +} \ No newline at end of file diff --git a/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/NegSem_08020301_GeneralFormatOfImport_023.ttcn b/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/NegSem_08020301_GeneralFormatOfImport_023.ttcn new file mode 100644 index 00000000..cf724e12 --- /dev/null +++ b/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/NegSem_08020301_GeneralFormatOfImport_023.ttcn @@ -0,0 +1,27 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:8.2.3.1, Verify that identifiers of functions are not imported together with data templates + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// The TTCN-3 import mechanism distinguishes between the identifier of a referenced +// definition and the information necessary for the usage of a referenced definition +// within the imported definition. For the usage, the identifier of a referenced +// definition is not required and therefore not imported automatically. +// Table 8: +// Possible referenced definitions for a data template: functions + +module NegSem_08020301_GeneralFormatOfImport_023 { +import from NegSem_08020301_GeneralFormatOfImport_023_import { template m_test }; + // f_test should be undefined, because it is not automatically imported + const integer c_test := f_test(); +} + +module NegSem_08020301_GeneralFormatOfImport_023_import { + function f_test() return integer { + return 1; + } + template integer m_test := f_test(); +} \ No newline at end of file diff --git a/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/NegSem_08020301_GeneralFormatOfImport_024.ttcn b/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/NegSem_08020301_GeneralFormatOfImport_024.ttcn new file mode 100644 index 00000000..f2eaafd1 --- /dev/null +++ b/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/NegSem_08020301_GeneralFormatOfImport_024.ttcn @@ -0,0 +1,25 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:8.2.3.1, Verify that identifiers of signatures are not imported together with signature templates + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// The TTCN-3 import mechanism distinguishes between the identifier of a referenced +// definition and the information necessary for the usage of a referenced definition +// within the imported definition. For the usage, the identifier of a referenced +// definition is not required and therefore not imported automatically. +// Table 8: +// Possible referenced definitions for a signature template: signatures + +module NegSem_08020301_GeneralFormatOfImport_024 { +import from NegSem_08020301_GeneralFormatOfImport_024_import { template s_test }; + // f_test should be undefined, because it is not automatically imported + template S s_test2 := { p := ? } +} + +module NegSem_08020301_GeneralFormatOfImport_024_import { + signature S(integer p); + template S s_test := { p := 3 } +} \ No newline at end of file diff --git a/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/NegSem_08020301_GeneralFormatOfImport_025.ttcn b/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/NegSem_08020301_GeneralFormatOfImport_025.ttcn new file mode 100644 index 00000000..313c2080 --- /dev/null +++ b/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/NegSem_08020301_GeneralFormatOfImport_025.ttcn @@ -0,0 +1,26 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:8.2.3.1, Verify that identifiers of constants are not imported together with signature templates + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// The TTCN-3 import mechanism distinguishes between the identifier of a referenced +// definition and the information necessary for the usage of a referenced definition +// within the imported definition. For the usage, the identifier of a referenced +// definition is not required and therefore not imported automatically. +// Table 8: +// Possible referenced definitions for a signature template: constants + +module NegSem_08020301_GeneralFormatOfImport_025 { +import from NegSem_08020301_GeneralFormatOfImport_025_import { template s_test }; + // c_test should be undefined, because it is not automatically imported + const integer c_test2 := c_test; +} + +module NegSem_08020301_GeneralFormatOfImport_025_import { + const integer c_test := 1; + signature S(integer p); + template S s_test := { p := c_test } +} \ No newline at end of file diff --git a/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/NegSem_08020301_GeneralFormatOfImport_026.ttcn b/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/NegSem_08020301_GeneralFormatOfImport_026.ttcn new file mode 100644 index 00000000..8938027b --- /dev/null +++ b/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/NegSem_08020301_GeneralFormatOfImport_026.ttcn @@ -0,0 +1,26 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:8.2.3.1, Verify that identifiers of module parameters are not imported together with signature templates + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// The TTCN-3 import mechanism distinguishes between the identifier of a referenced +// definition and the information necessary for the usage of a referenced definition +// within the imported definition. For the usage, the identifier of a referenced +// definition is not required and therefore not imported automatically. +// Table 8: +// Possible referenced definitions for a signature template: module parameters + +module NegSem_08020301_GeneralFormatOfImport_026 { +import from NegSem_08020301_GeneralFormatOfImport_026_import { template s_test }; + // PX_TEST should be undefined, because it is not automatically imported + const integer c_test := PX_TEST; +} + +module NegSem_08020301_GeneralFormatOfImport_026_import { + modulepar integer PX_TEST := 1; + signature S(integer p); + template S s_test := { p := PX_TEST }; +} \ No newline at end of file diff --git a/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/NegSem_08020301_GeneralFormatOfImport_027.ttcn b/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/NegSem_08020301_GeneralFormatOfImport_027.ttcn new file mode 100644 index 00000000..3333465a --- /dev/null +++ b/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/NegSem_08020301_GeneralFormatOfImport_027.ttcn @@ -0,0 +1,28 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:8.2.3.1, Verify that identifiers of functions are not imported together with signature templates + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// The TTCN-3 import mechanism distinguishes between the identifier of a referenced +// definition and the information necessary for the usage of a referenced definition +// within the imported definition. For the usage, the identifier of a referenced +// definition is not required and therefore not imported automatically. +// Table 8: +// Possible referenced definitions for a signature template: functions + +module NegSem_08020301_GeneralFormatOfImport_027 { +import from NegSem_08020301_GeneralFormatOfImport_027_import { template s_test }; + // f_test should be undefined, because it is not automatically imported + const integer c_test := f_test(); +} + +module NegSem_08020301_GeneralFormatOfImport_027_import { + function f_test() return integer { + return 1; + } + signature S(integer p); + template S s_test := { p := f_test() } +} \ No newline at end of file diff --git a/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/NegSem_08020301_GeneralFormatOfImport_028.ttcn b/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/NegSem_08020301_GeneralFormatOfImport_028.ttcn new file mode 100644 index 00000000..719c1d18 --- /dev/null +++ b/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/NegSem_08020301_GeneralFormatOfImport_028.ttcn @@ -0,0 +1,26 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:8.2.3.1, Verify that identifiers of parameter types are not imported together with functions + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// The TTCN-3 import mechanism distinguishes between the identifier of a referenced +// definition and the information necessary for the usage of a referenced definition +// within the imported definition. For the usage, the identifier of a referenced +// definition is not required and therefore not imported automatically. +// Table 8: +// Possible referenced definitions for a function: parameter types + +module NegSem_08020301_GeneralFormatOfImport_028 { +import from NegSem_08020301_GeneralFormatOfImport_028_import { function f_test }; + // MyType should be undefined, because it is not automatically imported + const MyType c_test := 1; +} + +module NegSem_08020301_GeneralFormatOfImport_028_import { + type integer MyType; + function f_test(MyType p) { + } +} \ No newline at end of file diff --git a/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/NegSem_08020301_GeneralFormatOfImport_029.ttcn b/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/NegSem_08020301_GeneralFormatOfImport_029.ttcn new file mode 100644 index 00000000..bb7beb0b --- /dev/null +++ b/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/NegSem_08020301_GeneralFormatOfImport_029.ttcn @@ -0,0 +1,27 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:8.2.3.1, Verify that identifiers of return type are not imported together with functions + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// The TTCN-3 import mechanism distinguishes between the identifier of a referenced +// definition and the information necessary for the usage of a referenced definition +// within the imported definition. For the usage, the identifier of a referenced +// definition is not required and therefore not imported automatically. +// Table 8: +// Possible referenced definitions for a function: return type + +module NegSem_08020301_GeneralFormatOfImport_029 { +import from NegSem_08020301_GeneralFormatOfImport_029_import { function f_test }; + // MyType should be undefined, because it is not automatically imported + const MyType c_test := f_test(); +} + +module NegSem_08020301_GeneralFormatOfImport_029_import { + type integer MyType; + function f_test() return MyType { + return 1; + } +} \ No newline at end of file diff --git a/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/NegSem_08020301_GeneralFormatOfImport_030.ttcn b/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/NegSem_08020301_GeneralFormatOfImport_030.ttcn new file mode 100644 index 00000000..94f6fdd5 --- /dev/null +++ b/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/NegSem_08020301_GeneralFormatOfImport_030.ttcn @@ -0,0 +1,26 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:8.2.3.1, Verify that identifiers of component types are not imported together with functions + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// The TTCN-3 import mechanism distinguishes between the identifier of a referenced +// definition and the information necessary for the usage of a referenced definition +// within the imported definition. For the usage, the identifier of a referenced +// definition is not required and therefore not imported automatically. +// Table 8: +// Possible referenced definitions for a function: component types (runs on) + +module NegSem_08020301_GeneralFormatOfImport_030 { +import from NegSem_08020301_GeneralFormatOfImport_030_import { function f_test }; + // C should be undefined, because it is not automatically imported + testcase TC_01() runs on C { } +} + +module NegSem_08020301_GeneralFormatOfImport_030_import { + type component C {}; + function f_test() runs on C { + } +} \ No newline at end of file diff --git a/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/NegSem_08020301_GeneralFormatOfImport_031.ttcn b/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/NegSem_08020301_GeneralFormatOfImport_031.ttcn new file mode 100644 index 00000000..f4f7f1fa --- /dev/null +++ b/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/NegSem_08020301_GeneralFormatOfImport_031.ttcn @@ -0,0 +1,25 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:8.2.3.1, Verify that identifiers of parameter types are not imported together with external functions + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// The TTCN-3 import mechanism distinguishes between the identifier of a referenced +// definition and the information necessary for the usage of a referenced definition +// within the imported definition. For the usage, the identifier of a referenced +// definition is not required and therefore not imported automatically. +// Table 8: +// Possible referenced definitions for an external function: parameter types + +module NegSem_08020301_GeneralFormatOfImport_031 { +import from NegSem_08020301_GeneralFormatOfImport_031_import { function f_test }; + // MyType should be undefined, because it is not automatically imported + const MyType c_test := 1; +} + +module NegSem_08020301_GeneralFormatOfImport_031_import { + type integer MyType; + external function f_test(MyType p); +} \ No newline at end of file diff --git a/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/NegSem_08020301_GeneralFormatOfImport_032.ttcn b/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/NegSem_08020301_GeneralFormatOfImport_032.ttcn new file mode 100644 index 00000000..ef8e5351 --- /dev/null +++ b/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/NegSem_08020301_GeneralFormatOfImport_032.ttcn @@ -0,0 +1,25 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:8.2.3.1, Verify that identifiers of return type are not imported together with external functions + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// The TTCN-3 import mechanism distinguishes between the identifier of a referenced +// definition and the information necessary for the usage of a referenced definition +// within the imported definition. For the usage, the identifier of a referenced +// definition is not required and therefore not imported automatically. +// Table 8: +// Possible referenced definitions for an external function: return type + +module NegSem_08020301_GeneralFormatOfImport_032 { +import from NegSem_08020301_GeneralFormatOfImport_032_import { function f_test }; + // MyType should be undefined, because it is not automatically imported + const MyType c_test := f_test(); +} + +module NegSem_08020301_GeneralFormatOfImport_032_import { + type integer MyType; + external function f_test() return MyType; +} \ No newline at end of file diff --git a/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/NegSem_08020301_GeneralFormatOfImport_033.ttcn b/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/NegSem_08020301_GeneralFormatOfImport_033.ttcn new file mode 100644 index 00000000..aad8cf7f --- /dev/null +++ b/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/NegSem_08020301_GeneralFormatOfImport_033.ttcn @@ -0,0 +1,27 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:8.2.3.1, Verify that identifiers of parameter types are not imported together with altsteps + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// The TTCN-3 import mechanism distinguishes between the identifier of a referenced +// definition and the information necessary for the usage of a referenced definition +// within the imported definition. For the usage, the identifier of a referenced +// definition is not required and therefore not imported automatically. +// Table 8: +// Possible referenced definitions for an altstep: parameter types + +module NegSem_08020301_GeneralFormatOfImport_033 { +import from NegSem_08020301_GeneralFormatOfImport_033_import { altstep a_test }; + // MyType should be undefined, because it is not automatically imported + const MyType c_test := 1; +} + +module NegSem_08020301_GeneralFormatOfImport_033_import { + type integer MyType; + altstep a_test(MyType p) { + [] any port.receive{} + } +} \ No newline at end of file diff --git a/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/NegSem_08020301_GeneralFormatOfImport_034.ttcn b/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/NegSem_08020301_GeneralFormatOfImport_034.ttcn new file mode 100644 index 00000000..664267d8 --- /dev/null +++ b/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/NegSem_08020301_GeneralFormatOfImport_034.ttcn @@ -0,0 +1,27 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:8.2.3.1, Verify that identifiers of component types are not imported together with altsteps + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// The TTCN-3 import mechanism distinguishes between the identifier of a referenced +// definition and the information necessary for the usage of a referenced definition +// within the imported definition. For the usage, the identifier of a referenced +// definition is not required and therefore not imported automatically. +// Table 8: +// Possible referenced definitions for an altstep: component types (runs on) + +module NegSem_08020301_GeneralFormatOfImport_034 { +import from NegSem_08020301_GeneralFormatOfImport_034_import { altstep a_test }; + // C should be undefined, because it is not automatically imported + testcase TC_01() runs on C { } +} + +module NegSem_08020301_GeneralFormatOfImport_034_import { + type component C {}; + altstep a_test() runs on C { + [] any port.receive {} + } +} \ No newline at end of file diff --git a/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/NegSem_08020301_GeneralFormatOfImport_035.ttcn b/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/NegSem_08020301_GeneralFormatOfImport_035.ttcn new file mode 100644 index 00000000..cba89c9a --- /dev/null +++ b/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/NegSem_08020301_GeneralFormatOfImport_035.ttcn @@ -0,0 +1,27 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:8.2.3.1, Verify that identifiers of parameter types are not imported together with test cases + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// The TTCN-3 import mechanism distinguishes between the identifier of a referenced +// definition and the information necessary for the usage of a referenced definition +// within the imported definition. For the usage, the identifier of a referenced +// definition is not required and therefore not imported automatically. +// Table 8: +// Possible referenced definitions for a test case: parameter types + +module NegSem_08020301_GeneralFormatOfImport_035 { + import from NegSem_08020301_GeneralFormatOfImport_035_import { testcase TC_01 }; + // MyType should be undefined, because it is not automatically imported + const MyType c_test := 1; +} + +module NegSem_08020301_GeneralFormatOfImport_035_import { + type integer MyType; + type component C {}; + testcase TC_01(MyType p) runs on C { + } +} \ No newline at end of file diff --git a/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/NegSem_08020301_GeneralFormatOfImport_036.ttcn b/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/NegSem_08020301_GeneralFormatOfImport_036.ttcn new file mode 100644 index 00000000..c2f70bd2 --- /dev/null +++ b/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/NegSem_08020301_GeneralFormatOfImport_036.ttcn @@ -0,0 +1,26 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:8.2.3.1, Verify that identifiers of component types (runs on) are not imported together with test cases + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// The TTCN-3 import mechanism distinguishes between the identifier of a referenced +// definition and the information necessary for the usage of a referenced definition +// within the imported definition. For the usage, the identifier of a referenced +// definition is not required and therefore not imported automatically. +// Table 8: +// Possible referenced definitions for a test case: component types (runs on) + +module NegSem_08020301_GeneralFormatOfImport_036 { +import from NegSem_08020301_GeneralFormatOfImport_036_import { testcase TC_01 }; + // C should be undefined, because it is not automatically imported + testcase TC_02() runs on C { } +} + +module NegSem_08020301_GeneralFormatOfImport_036_import { + type component C {}; + testcase TC_01() runs on C { + } +} \ No newline at end of file diff --git a/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/NegSem_08020301_GeneralFormatOfImport_037.ttcn b/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/NegSem_08020301_GeneralFormatOfImport_037.ttcn new file mode 100644 index 00000000..fb9362ab --- /dev/null +++ b/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/NegSem_08020301_GeneralFormatOfImport_037.ttcn @@ -0,0 +1,27 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:8.2.3.1, Verify that identifiers of component types (system) are not imported together with test cases + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// The TTCN-3 import mechanism distinguishes between the identifier of a referenced +// definition and the information necessary for the usage of a referenced definition +// within the imported definition. For the usage, the identifier of a referenced +// definition is not required and therefore not imported automatically. +// Table 8: +// Possible referenced definitions for a test case: component types (system) + +module NegSem_08020301_GeneralFormatOfImport_037 { +import from NegSem_08020301_GeneralFormatOfImport_037_import { testcase TC_01 }; + // C2 should be undefined, because it is not automatically imported + testcase TC_02() runs on C2 { } +} + +module NegSem_08020301_GeneralFormatOfImport_037_import { + type component C1 {}; + type component C2 {}; + testcase TC_01() runs on C1 system C2 { + } +} \ No newline at end of file diff --git a/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/NegSem_08020301_GeneralFormatOfImport_038.ttcn b/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/NegSem_08020301_GeneralFormatOfImport_038.ttcn new file mode 100644 index 00000000..cb5aff56 --- /dev/null +++ b/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/NegSem_08020301_GeneralFormatOfImport_038.ttcn @@ -0,0 +1,24 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:8.2.3.1, Verify that definition from inside an imported function cannot be referenced + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// Restriction f: +// When importing a function, altstep or test case the corresponding behaviour +// specifications and all definitions used inside the behaviour specifications +// remain invisible for the importing module. + +module NegSem_08020301_GeneralFormatOfImport_038 { +import from NegSem_08020301_GeneralFormatOfImport_038_import { function f_test }; + // c_test should be undefined, because it is invisible for the importing module + const integer c_test2 := c_test; +} + +module NegSem_08020301_GeneralFormatOfImport_038_import { + function f_test() { + const integer c_test := 1; + } +} \ No newline at end of file diff --git a/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/NegSem_08020301_GeneralFormatOfImport_039.ttcn b/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/NegSem_08020301_GeneralFormatOfImport_039.ttcn new file mode 100644 index 00000000..ca61a3de --- /dev/null +++ b/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/NegSem_08020301_GeneralFormatOfImport_039.ttcn @@ -0,0 +1,34 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:8.2.3.1, Verify that import clause cannot override language tag of imported module + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// Restriction g: +// The language specification of the import statement shall not override the language +// specification of the importing module. +// Restriction h: +// The language specification of the import statement shall be identical to the language +// specification of the source module from which definitions are imported provided +// a language specification is defined in the source module. + +module NegSem_08020301_GeneralFormatOfImport_039 { +import from NegSem_08020301_GeneralFormatOfImport_039_import language "TTCN-3:2013" all; + type component GeneralComp {} + + testcase TC_Sem_08020301_GeneralFormatOfImport_039() runs on GeneralComp { + if (c_test == 0) { setverdict(pass); } + else { setverdict(fail); } + } + + control{ + // testing if parameter names are imported + execute(TC_Sem_08020301_GeneralFormatOfImport_039()); + } +} + +module NegSem_08020301_GeneralFormatOfImport_039_import language "TTCN-3:2012" { + const integer c_test := 0; +} \ No newline at end of file diff --git a/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/NegSem_08020301_GeneralFormatOfImport_040.ttcn b/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/NegSem_08020301_GeneralFormatOfImport_040.ttcn new file mode 100644 index 00000000..605fd540 --- /dev/null +++ b/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/NegSem_08020301_GeneralFormatOfImport_040.ttcn @@ -0,0 +1,37 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:8.2.3.1, Verify that unsupported language concepts cannot be used when language is set by import clause + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// Restriction h: +// If no [language specification is defined in the source module], the language +// specification in the import statement is taken as the language specification +// of the source module. If the source module uses however language concepts not +// being part of that language specification, this causes an error for the import +// statement. + +module NegSem_08020301_GeneralFormatOfImport_040 { +import from NegSem_08020301_GeneralFormatOfImport_040_import language "TTCN-3:2012" all; + type component GeneralComp {} + + testcase TC_Sem_08020301_GeneralFormatOfImport_040() runs on GeneralComp { + if (c_test == 0) { setverdict(pass); } + else { setverdict(fail); } + } + + control{ + // testing if parameter names are imported + execute(TC_Sem_08020301_GeneralFormatOfImport_040()); + } +} + +module NegSem_08020301_GeneralFormatOfImport_040_import { + type set of integer SoI; + template SoI m_src := {1, 2, 3}; + // all from is a TTCN-3:2013 feature: it shall cause an import error + template integer m_test := ( 10, all from m_src ); + const integer c_test := 0; +} \ No newline at end of file diff --git a/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/NegSyn_08020301_GeneralFormatOfImport_001.ttcn b/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/NegSyn_08020301_GeneralFormatOfImport_001.ttcn new file mode 100644 index 00000000..c163c06e --- /dev/null +++ b/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/NegSyn_08020301_GeneralFormatOfImport_001.ttcn @@ -0,0 +1,31 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:8.2.3.1, Ensure that import statement cannot be used in test case blocks + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// Restriction a: +// An import statement shall only be used in the module definitions part and not be used +// within a control part, function definition, and alike. + +module NegSyn_08020301_GeneralFormatOfImport_001 { + + +type component GeneralComp {} + +testcase TC_NegSyn_08020301_GeneralFormatOfImport_001() runs on GeneralComp { + import from NegSyn_08020301_GeneralFormatOfImport_001_import all; + log(c_test); + setverdict(pass); +} + +control{ + execute(TC_NegSyn_08020301_GeneralFormatOfImport_001()); +} +} + +module NegSyn_08020301_GeneralFormatOfImport_001_import { + const integer c_test := 5; +} diff --git a/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/NegSyn_08020301_GeneralFormatOfImport_002.ttcn b/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/NegSyn_08020301_GeneralFormatOfImport_002.ttcn new file mode 100644 index 00000000..24fbb106 --- /dev/null +++ b/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/NegSyn_08020301_GeneralFormatOfImport_002.ttcn @@ -0,0 +1,32 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:8.2.3.1, Ensure that import statement cannot be used in module control part + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// Restriction a: +// An import statement shall only be used in the module definitions part and not be used +// within a control part, function definition, and alike. + +module NegSyn_08020301_GeneralFormatOfImport_002 { + + +type component GeneralComp {} + +testcase TC_NegSyn_08020301_GeneralFormatOfImport_002() runs on GeneralComp { + setverdict(pass); +} + +control{ + import from NegSyn_08020301_GeneralFormatOfImport_002_import all; + log(c_test); + execute(TC_NegSyn_08020301_GeneralFormatOfImport_002()); +} + +} + +module NegSyn_08020301_GeneralFormatOfImport_002_import { + const integer c_test := 5; +} diff --git a/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/Sem_08020301_GeneralFormatOfImport_001.ttcn b/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/Sem_08020301_GeneralFormatOfImport_001.ttcn new file mode 100644 index 00000000..3094f9ed --- /dev/null +++ b/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/Sem_08020301_GeneralFormatOfImport_001.ttcn @@ -0,0 +1,35 @@ +/***************************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:8.2.3.4, Ensure that transitive imports are properly handled + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + + +module Sem_08020301_GeneralFormatOfImport_001 { + +import from Sem_08020301_GeneralFormatOfImport_001_import { import all }; + +type component GeneralComp {} + +testcase TC_Sem_08020301_GeneralFormatOfImport_001() runs on GeneralComp { + if (c_myconst == 43532) { + setverdict(pass); + } else { + setverdict(fail); + } +} + +control{ + execute(TC_Sem_08020301_GeneralFormatOfImport_001()); +} +} + +module Sem_08020301_GeneralFormatOfImport_001_import { + public import from Sem_08020301_GeneralFormatOfImport_001_import_2 all; +} + + +module Sem_08020301_GeneralFormatOfImport_001_import_2 { + const integer c_myconst := 43532; +} diff --git a/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/Sem_08020301_GeneralFormatOfImport_002.ttcn b/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/Sem_08020301_GeneralFormatOfImport_002.ttcn new file mode 100644 index 00000000..4e23ecd3 --- /dev/null +++ b/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/Sem_08020301_GeneralFormatOfImport_002.ttcn @@ -0,0 +1,40 @@ +/***************************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:8.2.3.4, Ensure that enumerated type definitions are automatically imported when needed + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + + +module Sem_08020301_GeneralFormatOfImport_002 { + +import from Sem_08020301_GeneralFormatOfImport_002_import { + modulepar px_enum; +}; + +type component GeneralComp {} + +testcase TC_Sem_08020301_GeneralFormatOfImport_002() runs on GeneralComp { + + if (px_enum == enumX) { //this must be a recognized enum value + setverdict(pass); + } else { + setverdict(fail); + } +} + +control{ + execute(TC_Sem_08020301_GeneralFormatOfImport_002()); +} +} + +module Sem_08020301_GeneralFormatOfImport_002_import { + import from Sem_08020301_GeneralFormatOfImport_002_import_2 all; + + modulepar EnumType px_enum:=enumX; +} + + +module Sem_08020301_GeneralFormatOfImport_002_import_2 { + type enumerated EnumType {enumX, enumY, enumZ}; +} diff --git a/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/Sem_08020301_GeneralFormatOfImport_003.ttcn b/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/Sem_08020301_GeneralFormatOfImport_003.ttcn new file mode 100644 index 00000000..58d86ae3 --- /dev/null +++ b/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/Sem_08020301_GeneralFormatOfImport_003.ttcn @@ -0,0 +1,38 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:8.2.3.1, Make sure that local definition takes precedence over imported one when their identifiers are equal + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirements are tested: +// Name clashes may occur due to import, e.g. import from different modules. Name clashes +// shall be resolved using qualified name(s) for the imported definition(s), i.e. prefixing +// the imported definition (which causes the name clash) by the identifier of the module in +// which it has been defined; the prefix and the identifier shall be separated by a dot ("."). + +module Sem_08020301_GeneralFormatOfImport_003 { + +import from Sem_08020301_GeneralFormatOfImport_003_import all; + +type component GeneralComp {} + +testcase TC_Sem_08020301_GeneralFormatOfImport_003() runs on GeneralComp { + if (c_myconst == -1) { + setverdict(pass); + } else { + setverdict(fail); + } +} + +const integer c_myconst := -1; + +control{ + execute(TC_Sem_08020301_GeneralFormatOfImport_003()); +} +} + +module Sem_08020301_GeneralFormatOfImport_003_import +{ + const integer c_myconst := 43532; +} \ No newline at end of file diff --git a/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/Sem_08020301_GeneralFormatOfImport_004.ttcn b/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/Sem_08020301_GeneralFormatOfImport_004.ttcn new file mode 100644 index 00000000..71aefcce --- /dev/null +++ b/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/Sem_08020301_GeneralFormatOfImport_004.ttcn @@ -0,0 +1,38 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:8.2.3.1, Make sure that imported enumeration values take precedence over local definition + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirements are tested: +// There is one exception to this rule: when in the context of an enumerated type +// (see clause 6.2.4), an enumerated value is clashing with the name of a definition in +// the importing module, the enumerated value shall take precedence and the definition +// in the importing module shall be referenced by using its qualified name. + +module Sem_08020301_GeneralFormatOfImport_004 { + +import from Sem_08020301_GeneralFormatOfImport_004_import all; + +type component GeneralComp {} + +testcase TC_Sem_08020301_GeneralFormatOfImport_004() runs on GeneralComp { + var integer enumX := 1; + if (c_enumVal == enumX) { + setverdict(pass); + } else { + setverdict(fail); + } +} + +control{ + execute(TC_Sem_08020301_GeneralFormatOfImport_004()); +} +} + +module Sem_08020301_GeneralFormatOfImport_004_import +{ + type enumerated EnumType {enumX, enumY, enumZ}; + const EnumType c_enumVal := enumX; +} \ No newline at end of file diff --git a/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/Sem_08020301_GeneralFormatOfImport_005.ttcn b/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/Sem_08020301_GeneralFormatOfImport_005.ttcn new file mode 100644 index 00000000..658df9f6 --- /dev/null +++ b/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/Sem_08020301_GeneralFormatOfImport_005.ttcn @@ -0,0 +1,26 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:8.2.3.1, Make sure that it is possible to use module prefix for local definitions + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirements are tested: +// When the definition is referenced in the same module where it is defined, the +// module identifier of the module (the current module) also may be used for prefixing +// the identifier of the definition. + +module Sem_08020301_GeneralFormatOfImport_005 { + +type component GeneralComp {} +const integer c_test := 5; + +testcase TC_Sem_08020301_GeneralFormatOfImport_005() runs on GeneralComp { + log(Sem_08020301_GeneralFormatOfImport_005.c_test); + setverdict(pass); +} + +control{ + execute(TC_Sem_08020301_GeneralFormatOfImport_005()); +} +} \ No newline at end of file diff --git a/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/Sem_08020301_GeneralFormatOfImport_006.ttcn b/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/Sem_08020301_GeneralFormatOfImport_006.ttcn new file mode 100644 index 00000000..b4e53ec3 --- /dev/null +++ b/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/Sem_08020301_GeneralFormatOfImport_006.ttcn @@ -0,0 +1,26 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:8.2.3.1, Make sure that it is possible to use module prefix for local definitions + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirements are tested: +// When the definition is referenced in the same module where it is defined, the +// module identifier of the module (the current module) also may be used for prefixing +// the identifier of the definition. + +module Sem_08020301_GeneralFormatOfImport_006 { + +type component GeneralComp {} + +testcase TC_Sem_08020301_GeneralFormatOfImport_006() runs on GeneralComp { + var integer c_test := 5; + log(Sem_08020301_GeneralFormatOfImport_006.c_test); + setverdict(pass); +} + +control{ + execute(TC_Sem_08020301_GeneralFormatOfImport_006()); +} +} \ No newline at end of file diff --git a/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/Sem_08020301_GeneralFormatOfImport_007.ttcn b/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/Sem_08020301_GeneralFormatOfImport_007.ttcn new file mode 100644 index 00000000..6b2cc07f --- /dev/null +++ b/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/Sem_08020301_GeneralFormatOfImport_007.ttcn @@ -0,0 +1,34 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:8.2.3.1, Make sure that it is possible to use module prefix for imported definitions + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirements are tested: +// Name clashes shall be resolved using qualified name(s) for the imported definition(s), +// i.e. prefixing the imported definition by the identifier of the module in which it has +// been defined; the prefix and the identifier shall be separated by a dot ("."). +// In cases where there are no ambiguities the prefixing need not (but may) be present +// when the imported definitions are used. + +module Sem_08020301_GeneralFormatOfImport_007 { + +import from Sem_08020301_GeneralFormatOfImport_007_import all; + +type component GeneralComp {} + +testcase TC_Sem_08020301_GeneralFormatOfImport_007() runs on GeneralComp { + log(Sem_08020301_GeneralFormatOfImport_007_import.c_test); + setverdict(pass); +} + +control{ + execute(TC_Sem_08020301_GeneralFormatOfImport_007()); +} +} + +module Sem_08020301_GeneralFormatOfImport_007_import +{ + const integer c_test := 5; +} \ No newline at end of file diff --git a/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/Sem_08020301_GeneralFormatOfImport_008.ttcn b/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/Sem_08020301_GeneralFormatOfImport_008.ttcn new file mode 100644 index 00000000..516989cf --- /dev/null +++ b/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/Sem_08020301_GeneralFormatOfImport_008.ttcn @@ -0,0 +1,57 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:8.2.3.1, Verify that structured type is imported together with its field names and nested type definitions + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirements are tested: +// Restriction c: +// A definition is imported together with its name and all local definitions. +// Restriction d: +// A definition is imported together with all information of referenced definitions that +// are necessary for the usage of the imported definition, independent of the visibility +// of the referenced definitions. +// Table 8: +// User-defined type, structured type + +module Sem_08020301_GeneralFormatOfImport_008 { + +import from Sem_08020301_GeneralFormatOfImport_008_import { type R, U }; + +type component GeneralComp {} + +type U.variant1 Test; // test if nested type is imported + +testcase TC_Sem_08020301_GeneralFormatOfImport_008() runs on GeneralComp { + var Test v_test1 := { subfield1 := 1, subfield2 := 2 } + var R v_test2; + // test if field names are imported and type information is avaiable (necessary for + // compatibility check during assignment + v_test2.field1 := 1; + v_test2.field2 := 2; + log (v_test1); + log (v_test2); + setverdict(pass); +} + +control{ + execute(TC_Sem_08020301_GeneralFormatOfImport_008()); +} +} + +module Sem_08020301_GeneralFormatOfImport_008_import +{ + type record R { + integer field1, + integer field2 + } + + type union U { + set { + integer subfield1, + integer subfield2 + } variant1, + integer variant2 + } +} \ No newline at end of file diff --git a/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/Sem_08020301_GeneralFormatOfImport_009.ttcn b/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/Sem_08020301_GeneralFormatOfImport_009.ttcn new file mode 100644 index 00000000..13046d39 --- /dev/null +++ b/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/Sem_08020301_GeneralFormatOfImport_009.ttcn @@ -0,0 +1,53 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:8.2.3.1, Verify that component type is imported together with constant, variable, timer and port names + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirements are tested: +// Restriction c: +// A definition is imported together with its name and all local definitions. +// Restriction d: +// A definition is imported together with all information of referenced definitions that +// are necessary for the usage of the imported definition, independent of the visibility +// of the referenced definitions. +// Table 8: +// User-defined type, component type + +module Sem_08020301_GeneralFormatOfImport_009 { + +import from Sem_08020301_GeneralFormatOfImport_009_import { type GeneralComp }; + +testcase TC_Sem_08020301_GeneralFormatOfImport_009() runs on GeneralComp { + // type compatibility is checked during assignment: + // for this check, type information for constant and variable types + // should be available at this point to compile the script correctly + var integer v_test; + v_test := cc_test; // testing constant reference + log(v_test); + v_test := vc_test; // testing variable reference + log(v_test); + tc_test.start; // testing timer reference + p1.start; // testing port reference + setverdict(pass); +} + +control{ + execute(TC_Sem_08020301_GeneralFormatOfImport_009()); +} +} + +module Sem_08020301_GeneralFormatOfImport_009_import +{ + type port P message { + inout integer; + } + type component GeneralComp + { + const integer cc_test := 0; + var integer vc_test := 1; + timer tc_test := 1.0; + port P p1; + } +} \ No newline at end of file diff --git a/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/Sem_08020301_GeneralFormatOfImport_010.ttcn b/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/Sem_08020301_GeneralFormatOfImport_010.ttcn new file mode 100644 index 00000000..7cf5629b --- /dev/null +++ b/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/Sem_08020301_GeneralFormatOfImport_010.ttcn @@ -0,0 +1,44 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:8.2.3.1, Verify that signature is imported together with parameter names + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirements are tested: +// Restriction c: +// A definition is imported together with its name and all local definitions. +// Restriction d: +// A definition is imported together with all information of referenced definitions that +// are necessary for the usage of the imported definition, independent of the visibility +// of the referenced definitions. +// Table 8: +// Signature + +module Sem_08020301_GeneralFormatOfImport_010 { + +import from Sem_08020301_GeneralFormatOfImport_010_import { signature Signature1 }; + +type component GeneralComp {} + +// type compatibility is checked during parameter passing: for this check, type +// information for the signature parameters should be available at this point +// to compile the script correctly +template Signature1 s_test := { + p_param1 := 1 // testing signature parameter name +} + +testcase TC_Sem_08020301_GeneralFormatOfImport_010() runs on GeneralComp { + log (s_test); + setverdict(pass); +} + +control{ + execute(TC_Sem_08020301_GeneralFormatOfImport_010()); +} +} + +module Sem_08020301_GeneralFormatOfImport_010_import +{ + signature Signature1 (in integer p_param1); +} \ No newline at end of file diff --git a/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/Sem_08020301_GeneralFormatOfImport_011.ttcn b/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/Sem_08020301_GeneralFormatOfImport_011.ttcn new file mode 100644 index 00000000..42fa3288 --- /dev/null +++ b/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/Sem_08020301_GeneralFormatOfImport_011.ttcn @@ -0,0 +1,54 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:8.2.3.1, Verify that parameterized template is imported together with parameter names + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirements are tested: +// Restriction c: +// A definition is imported together with its name and all local definitions. +// Restriction d: +// A definition is imported together with all information of referenced definitions that +// are necessary for the usage of the imported definition, independent of the visibility +// of the referenced definitions. +// Table 8: +// Data template + +module Sem_08020301_GeneralFormatOfImport_011 { + +import from Sem_08020301_GeneralFormatOfImport_011_import { type R; template m_test1 }; + +type component GeneralComp {} + +type record RLocal { // compatible type with Sem_08020301_GeneralFormatOfImport_011_import.R + integer field1, + integer field2 +} +testcase TC_Sem_08020301_GeneralFormatOfImport_011() runs on GeneralComp { + + // type compatibility is checked during parameter passing and template assignment: + // for this check, type information for the template parameters and template type + // should be available at this point to compile the script correctly + template RLocal m_res := m_test1(p_param2 := 10); + if (match({1, 10}, m_res)) // testing if parameter name is imported + { setverdict(pass); } + else + { setverdict(fail); } +} + +control{ + execute(TC_Sem_08020301_GeneralFormatOfImport_011()); +} +} + +module Sem_08020301_GeneralFormatOfImport_011_import { + type record R { + integer field1, + integer field2 + } + template R m_test1(integer p_param1 := 1 , integer p_param2 := 2) := { + field1 := p_param1, + field2 := p_param2 + } +} \ No newline at end of file diff --git a/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/Sem_08020301_GeneralFormatOfImport_012.ttcn b/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/Sem_08020301_GeneralFormatOfImport_012.ttcn new file mode 100644 index 00000000..8d4fb824 --- /dev/null +++ b/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/Sem_08020301_GeneralFormatOfImport_012.ttcn @@ -0,0 +1,46 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:8.2.3.1, Verify that function is imported together with parameter names + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirements are tested: +// Restriction c: +// A definition is imported together with its name and all local definitions. +// Restriction d: +// A definition is imported together with all information of referenced definitions that +// are necessary for the usage of the imported definition, independent of the visibility +// of the referenced definitions. +// Table 8: +// Function + +module Sem_08020301_GeneralFormatOfImport_012 { + +import from Sem_08020301_GeneralFormatOfImport_012_import { function f_div }; + +type component GeneralComp {} + +testcase TC_Sem_08020301_GeneralFormatOfImport_012() runs on GeneralComp { + + // testing if function parameter names were imported + // type compatibility is checked during parameter passing and return value assignment: for + // this check, the type information for the function parameters and return values should be + // available at this point to compile the script correctly + var integer v_res := f_div(p_param1 := 10, p_param2 := 5); + if (v_res == 2) + { setverdict(pass); } + else + { setverdict(fail); } +} + +control{ + execute(TC_Sem_08020301_GeneralFormatOfImport_012()); +} +} + +module Sem_08020301_GeneralFormatOfImport_012_import { + function f_div(integer p_param1, integer p_param2) return integer { + return p_param1 / p_param2; + } +} \ No newline at end of file diff --git a/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/Sem_08020301_GeneralFormatOfImport_013.ttcn b/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/Sem_08020301_GeneralFormatOfImport_013.ttcn new file mode 100644 index 00000000..9d21f8bf --- /dev/null +++ b/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/Sem_08020301_GeneralFormatOfImport_013.ttcn @@ -0,0 +1,44 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:8.2.3.1, Verify that altstep is imported together with parameter names + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirements are tested: +// Restriction c: +// A definition is imported together with its name and all local definitions. +// Restriction d: +// A definition is imported together with all information of referenced definitions that +// are necessary for the usage of the imported definition, independent of the visibility +// of the referenced definitions. +// Table 8: +// Altstep + +module Sem_08020301_GeneralFormatOfImport_013 { + +import from Sem_08020301_GeneralFormatOfImport_013_import { altstep a_test }; + +type component GeneralComp {} + +testcase TC_Sem_08020301_GeneralFormatOfImport_013() runs on GeneralComp { + // testing if parameter names are imported + // type compatibility is checked during parameter passing: for this check, the type information for + // the altstep parameters should be available at this point to compile the script correctly + a_test(p_param2 := 2, p_param1 := 1); +} + +control{ + execute(TC_Sem_08020301_GeneralFormatOfImport_013()); +} +} + +module Sem_08020301_GeneralFormatOfImport_013_import { + altstep a_test(integer p_param1, integer p_param2) { + [] any timer.timeout {} + [else] { + if ( match(p_param1, 1) and match(p_param2, 2) ) { setverdict(pass); } + else { setverdict(fail); } + } + } +} \ No newline at end of file diff --git a/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/Sem_08020301_GeneralFormatOfImport_014.ttcn b/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/Sem_08020301_GeneralFormatOfImport_014.ttcn new file mode 100644 index 00000000..2af3bbf5 --- /dev/null +++ b/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/Sem_08020301_GeneralFormatOfImport_014.ttcn @@ -0,0 +1,36 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:8.2.3.1, Verify that test case is imported together with parameter names + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirements are tested: +// Restriction c: +// A definition is imported together with its name and all local definitions. +// Restriction d: +// A definition is imported together with all information of referenced definitions that +// are necessary for the usage of the imported definition, independent of the visibility +// of the referenced definitions. +// Table 8: +// Test case + +module Sem_08020301_GeneralFormatOfImport_014 { + +import from Sem_08020301_GeneralFormatOfImport_014_import { testcase TC_Sem_08020301_GeneralFormatOfImport_014 }; + +control{ + // testing if parameter names are imported + // type compatibility is checked during parameter passing: for this check, the type information for + // the test case parameters should be available at this point to compile the script correctly + execute(TC_Sem_08020301_GeneralFormatOfImport_014(p_param2 := 2, p_param1 := 1)); +} +} + +module Sem_08020301_GeneralFormatOfImport_014_import { + type component GeneralComp {} + testcase TC_Sem_08020301_GeneralFormatOfImport_014(integer p_param1, integer p_param2) runs on GeneralComp { + if ( match(p_param1, 1) and match(p_param2, 2)) { setverdict(pass); } + else { setverdict(fail); } + } +} \ No newline at end of file diff --git a/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/Sem_08020301_GeneralFormatOfImport_015.ttcn b/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/Sem_08020301_GeneralFormatOfImport_015.ttcn new file mode 100644 index 00000000..c8540b49 --- /dev/null +++ b/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/Sem_08020301_GeneralFormatOfImport_015.ttcn @@ -0,0 +1,38 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:8.2.3.1, Verify that information about module parameter type is imported together with module parameter + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirements are tested: +// Restriction d: +// A definition is imported together with all information of referenced definitions that +// are necessary for the usage of the imported definition, independent of the visibility +// of the referenced definitions. +// Table 8: +// Module parameter + +module Sem_08020301_GeneralFormatOfImport_015 { + +import from Sem_08020301_GeneralFormatOfImport_015_import { modulepar PX_TEST }; + +type component GeneralComp {} + +testcase TC_Sem_08020301_GeneralFormatOfImport_015() runs on GeneralComp { + // type compatibility is checked during assignment: for this check, the type information for PX_TEST + // should be available at this point to compile the script correctly + var integer v_test := PX_TEST; + if (v_test == 0) { setverdict(pass); } + else { setverdict(fail); } +} + +control{ + // testing if parameter names are imported + execute(TC_Sem_08020301_GeneralFormatOfImport_015()); +} +} + +module Sem_08020301_GeneralFormatOfImport_015_import { + modulepar integer PX_TEST := 0; +} \ No newline at end of file diff --git a/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/Sem_08020301_GeneralFormatOfImport_016.ttcn b/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/Sem_08020301_GeneralFormatOfImport_016.ttcn new file mode 100644 index 00000000..f8de7863 --- /dev/null +++ b/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/Sem_08020301_GeneralFormatOfImport_016.ttcn @@ -0,0 +1,38 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:8.2.3.1, Verify that information about type of constant is imported together with constant + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirements are tested: +// Restriction d: +// A definition is imported together with all information of referenced definitions that +// are necessary for the usage of the imported definition, independent of the visibility +// of the referenced definitions. +// Table 8: +// Possible referenced definitions for a signature: parameter types + +module Sem_08020301_GeneralFormatOfImport_016 { + +import from Sem_08020301_GeneralFormatOfImport_016_import { const c_test }; + +type component GeneralComp {} + +testcase TC_Sem_08020301_GeneralFormatOfImport_016() runs on GeneralComp { + // type compatibility is checked during assignment: for this check, the type information for c_test + // should be available at this point to compile the script correctly + var integer v_test := c_test; + if (v_test == 0) { setverdict(pass); } + else { setverdict(fail); } +} + +control{ + // testing if parameter names are imported + execute(TC_Sem_08020301_GeneralFormatOfImport_016()); +} +} + +module Sem_08020301_GeneralFormatOfImport_016_import { + const integer c_test := 0; +} \ No newline at end of file diff --git a/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/Sem_08020301_GeneralFormatOfImport_017.ttcn b/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/Sem_08020301_GeneralFormatOfImport_017.ttcn new file mode 100644 index 00000000..0b1ffdb8 --- /dev/null +++ b/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/Sem_08020301_GeneralFormatOfImport_017.ttcn @@ -0,0 +1,33 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:8.2.3.1, Verify using of import clause with language tag for impoting module having identical language tag + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirements are tested: +// Restriction h: +// The language specification of the import statement shall be identical to the language +// specification of the source module from which definitions are imported provided +// a language specification is defined in the source module. + +module Sem_08020301_GeneralFormatOfImport_017 { + +import from Sem_08020301_GeneralFormatOfImport_017_import language "TTCN-3:2013" all; + +type component GeneralComp {} + +testcase TC_Sem_08020301_GeneralFormatOfImport_017() runs on GeneralComp { + if (c_test == 0) { setverdict(pass); } + else { setverdict(fail); } +} + +control{ + // testing if parameter names are imported + execute(TC_Sem_08020301_GeneralFormatOfImport_017()); +} +} + +module Sem_08020301_GeneralFormatOfImport_017_import language "TTCN-3:2013" { + const integer c_test := 0; +} \ No newline at end of file diff --git a/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/Sem_08020301_GeneralFormatOfImport_018.ttcn b/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/Sem_08020301_GeneralFormatOfImport_018.ttcn new file mode 100644 index 00000000..c9c5d50a --- /dev/null +++ b/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/Sem_08020301_GeneralFormatOfImport_018.ttcn @@ -0,0 +1,33 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:8.2.3.1, Verify using of import clause with language tag for impoting module with no language tag + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirements are tested: +// Restriction h: +// The language specification of the import statement shall be identical to the language +// specification of the source module from which definitions are imported provided +// a language specification is defined in the source module. + +module Sem_08020301_GeneralFormatOfImport_018 { + +import from Sem_08020301_GeneralFormatOfImport_018_import language "TTCN-3:2013" all; + +type component GeneralComp {} + +testcase TC_Sem_08020301_GeneralFormatOfImport_018() runs on GeneralComp { + if (c_test == 0) { setverdict(pass); } + else { setverdict(fail); } +} + +control{ + // testing if parameter names are imported + execute(TC_Sem_08020301_GeneralFormatOfImport_018()); +} +} + +module Sem_08020301_GeneralFormatOfImport_018_import { + const integer c_test := 0; +} \ No newline at end of file diff --git a/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/Sem_08020301_GeneralFormatOfImport_019.ttcn b/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/Sem_08020301_GeneralFormatOfImport_019.ttcn new file mode 100644 index 00000000..8de3c5ce --- /dev/null +++ b/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/Sem_08020301_GeneralFormatOfImport_019.ttcn @@ -0,0 +1,46 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:8.2.3.1, Verify that type of port is imported from a module as expected + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirements are tested: +/*If the type of the component referenced in a connection operation is known (either when the component reference is a +variable or value returned from a function or the type is defined the runs on, mtc or system clause of the calling +function), the referenced port declaration shall be present in this component type.*/ + +module Sem_08020301_GeneralFormatOfImport_019 { + +import from Sem_08020301_GeneralFormatOfImport_019_import all; + + type component GeneralComp { + port loopbackPort messagePort + } + +testcase TC_Sem_08020301_GeneralFormatOfImport_019() runs on GeneralComp { + + var My_int v_int := 2; //type reference from other module + messagePort.send(v_int); //send message + + alt { + [] messagePort.receive(v_int) { + setverdict(pass); + } + [] messagePort.receive { + setverdict(fail); + } + } +} + +control{ + // testing if parameter names are imported + execute(TC_Sem_08020301_GeneralFormatOfImport_019()); +} +} + +module Sem_08020301_GeneralFormatOfImport_019_import { + type integer My_int; + type port loopbackPort message{inout My_int}; + +} \ No newline at end of file diff --git a/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/Sem_08020301_GeneralFormatOfImport_020.ttcn b/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/Sem_08020301_GeneralFormatOfImport_020.ttcn new file mode 100644 index 00000000..c8271452 --- /dev/null +++ b/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/Sem_08020301_GeneralFormatOfImport_020.ttcn @@ -0,0 +1,44 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:8.2.3.1, Verify that prefixed type is evaluated as expected + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirements are tested: +/*In cases where there are no ambiguities the prefixing need not (but may) be present when the imported definitions are +used. When the definition is referenced in the same module where it is defined, the module identifier of the module (the +current module) also may be used for prefixing the identifier of the definition.*/ + +module Sem_08020301_GeneralFormatOfImport_020 { + + import from Sem_08020301_GeneralFormatOfImport_020_import {type My_type}; + + type float My_type; //float type + + type component GeneralComp {} + +testcase TC_Sem_08020301_GeneralFormatOfImport_020() runs on GeneralComp { + + var My_type v_1 := 2.5; //prefixed type + var Sem_08020301_GeneralFormatOfImport_020_import.My_type v_2 := 1; //prefix and the identifier + + if( (match(v_1,2.5)) and (match(v_2,1))) + { + setverdict(pass); + } else { + setverdict(fail); + } + +} + +control{ + // testing if parameter names are imported + execute(TC_Sem_08020301_GeneralFormatOfImport_020()); +} +} + +module Sem_08020301_GeneralFormatOfImport_020_import { + type integer My_type; //integer type + +} \ No newline at end of file diff --git a/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/Syn_08020301_GeneralFormatOfImport_001.ttcn b/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/Syn_08020301_GeneralFormatOfImport_001.ttcn new file mode 100644 index 00000000..f1aac38f --- /dev/null +++ b/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/Syn_08020301_GeneralFormatOfImport_001.ttcn @@ -0,0 +1,15 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:8.2.3.1, Ensure that import all is accepted. + ** @verdict pass accept, noexecution + *****************************************************************/ + + +module Syn_08020301_GeneralFormatOfImport_001 { + import from Syn_08020301_GeneralFormatOfImport_001_import all; +} + +module Syn_08020301_GeneralFormatOfImport_001_import { + const integer c_myconst := 1; +} diff --git a/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/Syn_08020301_GeneralFormatOfImport_002.ttcn b/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/Syn_08020301_GeneralFormatOfImport_002.ttcn new file mode 100644 index 00000000..2052793d --- /dev/null +++ b/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/Syn_08020301_GeneralFormatOfImport_002.ttcn @@ -0,0 +1,24 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:8.2.3.1, Ensure that import of specific types is accepted. + ** @verdict pass accept, noexecution + *****************************************************************/ + +module Syn_08020301_GeneralFormatOfImport_002 { + import from Syn_08020301_GeneralFormatOfImport_002_import { + type all; + template all; + const c_myconst; + testcase all; + altstep all; + function all; + signature all; + modulepar all; + }; + +} + +module Syn_08020301_GeneralFormatOfImport_002_import { + const integer c_myconst := 1; +} diff --git a/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020302_importing_single_definitions/Sem_08020302_ImportingSingleDefinitions_001.ttcn b/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020302_importing_single_definitions/Sem_08020302_ImportingSingleDefinitions_001.ttcn new file mode 100644 index 00000000..7e40aac8 --- /dev/null +++ b/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020302_importing_single_definitions/Sem_08020302_ImportingSingleDefinitions_001.ttcn @@ -0,0 +1,32 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:8.2.3.2, Ensure that the value of an explicitly imported constant can be read and carries the same value. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + + +module Sem_08020302_ImportingSingleDefinitions_001 { + +import from Sem_08020302_ImportingSingleDefinitions_001_import { + const c_myconst; +}; + +type component GeneralComp {} + +testcase TC_Sem_08020302_ImportingSingleDefinitions_001() runs on GeneralComp { + if (c_myconst == 43532) { + setverdict(pass); + } else { + setverdict(fail); + } +} + +control{ + execute(TC_Sem_08020302_ImportingSingleDefinitions_001()); +} +} + +module Sem_08020302_ImportingSingleDefinitions_001_import { + const integer c_myconst := 43532; +} diff --git a/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020302_importing_single_definitions/Sem_08020302_ImportingSingleDefinitions_002.ttcn b/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020302_importing_single_definitions/Sem_08020302_ImportingSingleDefinitions_002.ttcn new file mode 100644 index 00000000..838a3df4 --- /dev/null +++ b/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020302_importing_single_definitions/Sem_08020302_ImportingSingleDefinitions_002.ttcn @@ -0,0 +1,49 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:8.2.3.2, Ensure that the value of an explicitly imported template can be read and carries the same value. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + + +module Sem_08020302_ImportingSingleDefinitions_002 { + + import from Sem_08020302_ImportingSingleDefinitions_002_import { + template m_myTemplate; + }; + + type component GeneralComp {} + type record MyMessageType2 { + integer field1, + charstring field2, + boolean field3 + } + + testcase TC_Sem_08020302_ImportingSingleDefinitions_002() runs on GeneralComp { + var MyMessageType2 v_value:={23521, "My String", true}; + + if (match(v_value, m_myTemplate)) { + setverdict(pass); + } else { + setverdict(fail); + } + } + + control{ + execute(TC_Sem_08020302_ImportingSingleDefinitions_002()); + } +} + +module Sem_08020302_ImportingSingleDefinitions_002_import { + type record MyMessageType { + integer field1, + charstring field2, + boolean field3 + } + + template MyMessageType m_myTemplate := { + field1 := 23521, + field2 := "My String", + field3 := true + } +} diff --git a/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020303_importing_groups/NegSem_08020303_ImportingGroups_001.ttcn b/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020303_importing_groups/NegSem_08020303_ImportingGroups_001.ttcn new file mode 100644 index 00000000..de180b97 --- /dev/null +++ b/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020303_importing_groups/NegSem_08020303_ImportingGroups_001.ttcn @@ -0,0 +1,34 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:8.2.3.3, Ensure that constants listed as exceptions in imported groups are not accessible. + ** @verdict pass reject + *****************************************************************/ + +module NegSem_08020303_ImportingGroups_001 { + +import from NegSem_08020303_ImportingGroups_001 { + group CONST_GROUP except { + const c_myotherconst; + } +}; +type component GeneralComp {} +testcase TC_NegSem_08020303_ImportingGroups_001() runs on GeneralComp { + if ( match(c_myotherconst, 123456) ) { // c_myotherconst is excluded and shall not be accessible + setverdict(fail); + } else { + setverdict(pass); + } +} + +control{ + execute(TC_NegSem_08020303_ImportingGroups_001()); +} +} + +module NegSem_08020303_ImportingGroups_001_import { + group CONST_GROUP { + const integer c_myconst := 43532; + const integer c_myotherconst := 123456; + } +} diff --git a/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020303_importing_groups/Sem_08020303_ImportingGroups_001.ttcn b/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020303_importing_groups/Sem_08020303_ImportingGroups_001.ttcn new file mode 100644 index 00000000..49869c72 --- /dev/null +++ b/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020303_importing_groups/Sem_08020303_ImportingGroups_001.ttcn @@ -0,0 +1,34 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:8.2.3.3, Ensure that a const defined in a group can be accessed if the group is imported. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + + +module Sem_08020303_ImportingGroups_001 { + +import from Sem_08020303_ImportingGroups_001_import { + group CONST_GROUP; +}; + +type component GeneralComp {} + +testcase TC_Sem_08020303_ImportingGroups_001() runs on GeneralComp { + if (c_myconst == 43532) { + setverdict(pass); + } else { + setverdict(fail); + } +} + +control{ + execute(TC_Sem_08020303_ImportingGroups_001()); +} +} + +module Sem_08020303_ImportingGroups_001_import { + group CONST_GROUP { + const integer c_myconst := 43532; + } +} diff --git a/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020303_importing_groups/Sem_08020303_ImportingGroups_002.ttcn b/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020303_importing_groups/Sem_08020303_ImportingGroups_002.ttcn new file mode 100644 index 00000000..fa5bff34 --- /dev/null +++ b/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020303_importing_groups/Sem_08020303_ImportingGroups_002.ttcn @@ -0,0 +1,41 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:8.2.3.3, Ensure that the IUT properly handles 'except' clause in group import definitions + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_08020303_ImportingGroups_002 { + +import from Sem_08020303_ImportingGroups_002_import { + group CONST_GROUP except { + const c_myconst; + }; + const all; + group CONST_INNER_GROUP except { + const c_myconst; + }; +} + +type component GeneralComp {} + +testcase TC_Sem_08020303_ImportingGroups_002() runs on GeneralComp { + if (c_myconst == 43532) { // c_myconst shall be imported from const all;, the exception must not removed it from the imports. + setverdict(pass); + } else { + setverdict(fail); + } +} + +control{ + execute(TC_Sem_08020303_ImportingGroups_002()); +} +} + +module Sem_08020303_ImportingGroups_002_import { + group CONST_GROUP { + group CONST_INNER_GROUP { + const integer c_myconst := 43532; + } + } +} diff --git a/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020303_importing_groups/Sem_08020303_ImportingGroups_003.ttcn b/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020303_importing_groups/Sem_08020303_ImportingGroups_003.ttcn new file mode 100644 index 00000000..5d80362f --- /dev/null +++ b/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020303_importing_groups/Sem_08020303_ImportingGroups_003.ttcn @@ -0,0 +1,38 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:8.2.3.3, but that it is in fact a shortcut notation for explicit imports. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_08020303_ImportingGroups_003 { + + import from Sem_08020303_ImportingGroups_003_import { + group CONST_GROUP.CONST_INNER_GROUP except { + const c_myconst; + }; + const all; + } + + type component GeneralComp {} + + testcase TC_Sem_08020303_ImportingGroups_003() runs on GeneralComp { + if (c_myconst == 43532) { // c_myconst shall be imported from const all;, the exception must not removed it from the imports. + setverdict(pass); + } else { + setverdict(fail); + } + } + + control{ + execute(TC_Sem_08020303_ImportingGroups_003()); + } +} + +module Sem_08020303_ImportingGroups_003_import { + group CONST_GROUP { + group CONST_INNER_GROUP { + const integer c_myconst := 43532; + } + } +} diff --git a/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020304_importing_definitions_of_the_same_kind/Sem_08020304_ImportingDefinitionsOfTheSameKind_001.ttcn b/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020304_importing_definitions_of_the_same_kind/Sem_08020304_ImportingDefinitionsOfTheSameKind_001.ttcn new file mode 100644 index 00000000..7ee050cc --- /dev/null +++ b/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020304_importing_definitions_of_the_same_kind/Sem_08020304_ImportingDefinitionsOfTheSameKind_001.ttcn @@ -0,0 +1,32 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:8.2.3.4, Ensure that an import of all constants allows access to a sample constant. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + + +module Sem_08020304_ImportingDefinitionsOfTheSameKind_001 { + +import from Sem_08020304_ImportingDefinitionsOfTheSameKind_001_import { + const all; +}; + +type component GeneralComp {} + +testcase TC_Sem_08020304_ImportingDefinitionsOfTheSameKind_001() runs on GeneralComp { + if (c_myconst == 43532) { + setverdict(pass); + } else { + setverdict(fail); + } +} + +control{ + execute(TC_Sem_08020304_ImportingDefinitionsOfTheSameKind_001()); +} +} + +module Sem_08020304_ImportingDefinitionsOfTheSameKind_001_import { + const integer c_myconst := 43532; +} diff --git a/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020304_importing_definitions_of_the_same_kind/Sem_08020304_ImportingDefinitionsOfTheSameKind_002.ttcn b/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020304_importing_definitions_of_the_same_kind/Sem_08020304_ImportingDefinitionsOfTheSameKind_002.ttcn new file mode 100644 index 00000000..58c8d3b7 --- /dev/null +++ b/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020304_importing_definitions_of_the_same_kind/Sem_08020304_ImportingDefinitionsOfTheSameKind_002.ttcn @@ -0,0 +1,33 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:8.2.3.4, Ensure that a previously valid const import is not removed by an import covering the same definition with an except. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + + +module Sem_08020304_ImportingDefinitionsOfTheSameKind_002 { + +import from Sem_08020304_ImportingDefinitionsOfTheSameKind_002_import { + const all; + const all except c_myconst; +}; + +type component GeneralComp {} + +testcase TC_Sem_08020304_ImportingDefinitionsOfTheSameKind_002() runs on GeneralComp { + if (c_myconst == 43532) { + setverdict(pass); + } else { + setverdict(fail); + } +} + +control{ + execute(TC_Sem_08020304_ImportingDefinitionsOfTheSameKind_002()); +} +} + +module Sem_08020304_ImportingDefinitionsOfTheSameKind_002_import { + const integer c_myconst := 43532; +} diff --git a/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020304_importing_definitions_of_the_same_kind/Sem_08020304_ImportingDefinitionsOfTheSameKind_003.ttcn b/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020304_importing_definitions_of_the_same_kind/Sem_08020304_ImportingDefinitionsOfTheSameKind_003.ttcn new file mode 100644 index 00000000..1b1768fc --- /dev/null +++ b/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020304_importing_definitions_of_the_same_kind/Sem_08020304_ImportingDefinitionsOfTheSameKind_003.ttcn @@ -0,0 +1,33 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:8.2.3.4, Ensure that a previously valid const import is not removed by a second import statement excluding the same definition. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + + +module Sem_08020304_ImportingDefinitionsOfTheSameKind_003 { + +import from Sem_08020304_ImportingDefinitionsOfTheSameKind_003_import all; +import from Sem_08020304_ImportingDefinitionsOfTheSameKind_003_import { + const all except c_myconst; +}; + +type component GeneralComp {} + +testcase TC_Sem_08020304_ImportingDefinitionsOfTheSameKind_003() runs on GeneralComp { + if (c_myconst == 43532) { + setverdict(pass); + } else { + setverdict(fail); + } +} + +control{ + execute(TC_Sem_08020304_ImportingDefinitionsOfTheSameKind_003()); +} +} + +module Sem_08020304_ImportingDefinitionsOfTheSameKind_003_import { + const integer c_myconst := 43532; +} diff --git a/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020305_importing_all_definitions_of_a_module/NegSem_08020305_ImportingAllDefinitionsOfAModule_001.ttcn b/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020305_importing_all_definitions_of_a_module/NegSem_08020305_ImportingAllDefinitionsOfAModule_001.ttcn new file mode 100644 index 00000000..5a729bea --- /dev/null +++ b/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020305_importing_all_definitions_of_a_module/NegSem_08020305_ImportingAllDefinitionsOfAModule_001.ttcn @@ -0,0 +1,40 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:8.2.3.5, Ensure that the constant is not visible after import with except. + ** @verdict pass reject + *****************************************************************/ + +module NegSem_08020305_ImportingAllDefinitionsOfAModule_001 { + +import from NegSem_08020305_ImportingAllDefinitionsOfAModule_001_import all except { +// everything is excluded again + group all; + type all; + template all; + const all; + testcase all; + altstep all; + function all; + signature all; + modulepar all; +}; + +type component GeneralComp {} + +testcase TC_NegSem_08020305_ImportingAllDefinitionsOfAModule_001() runs on GeneralComp { + if (c_myconst == 43532) { // should not be visible due to the const all exception + setverdict(fail); + } else { + setverdict(pass); + } +} + +control{ + execute(TC_NegSem_08020305_ImportingAllDefinitionsOfAModule_001()); +} +} + +module NegSem_08020305_ImportingAllDefinitionsOfAModule_001_import { + const integer c_myconst := 43532; +} diff --git a/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020305_importing_all_definitions_of_a_module/NegSem_08020305_ImportingAllDefinitionsOfAModule_002.ttcn b/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020305_importing_all_definitions_of_a_module/NegSem_08020305_ImportingAllDefinitionsOfAModule_002.ttcn new file mode 100644 index 00000000..76cf2372 --- /dev/null +++ b/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020305_importing_all_definitions_of_a_module/NegSem_08020305_ImportingAllDefinitionsOfAModule_002.ttcn @@ -0,0 +1,48 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:8.2.3.5, Ensure that the constant is not visible after import with except. + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// Restriction b +// In the set of except statements for an all import, only one except statement per +// kind of definition (i.e. for a group, type, etc.) is allowed. + +module NegSem_08020305_ImportingAllDefinitionsOfAModule_002 { + +import from NegSem_08020305_ImportingAllDefinitionsOfAModule_002_import all except { +// everything is excluded again + group all; + type all; + template all; + const c_test1; + testcase all; + altstep all; + function all; + signature all; + modulepar all; + const c_test2; // error: const present more than once in the except part +}; + +type component GeneralComp {} + +testcase TC_NegSem_08020305_ImportingAllDefinitionsOfAModule_002() runs on GeneralComp { + if (c_myconst == 43532) { + setverdict(fail); + } else { + setverdict(pass); + } +} + +control{ + execute(TC_NegSem_08020305_ImportingAllDefinitionsOfAModule_002()); +} +} + +module NegSem_08020305_ImportingAllDefinitionsOfAModule_002_import { + const integer c_myconst := 43532; + const integer c_test1 := 0; + const integer c_test2 := 1; +} diff --git a/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020305_importing_all_definitions_of_a_module/Sem_08020305_ImportingAllDefinitionsOfAModule_001.ttcn b/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020305_importing_all_definitions_of_a_module/Sem_08020305_ImportingAllDefinitionsOfAModule_001.ttcn new file mode 100644 index 00000000..eafacfe1 --- /dev/null +++ b/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020305_importing_all_definitions_of_a_module/Sem_08020305_ImportingAllDefinitionsOfAModule_001.ttcn @@ -0,0 +1,29 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:8.2.3.5, Ensure that the constant is be visible after multiple imports. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_08020305_ImportingAllDefinitionsOfAModule_001 { + +import from Sem_08020305_ImportingAllDefinitionsOfAModule_001_import all; + +type component GeneralComp {} + +testcase TC_Sem_08020305_ImportingAllDefinitionsOfAModule_001() runs on GeneralComp { + if (c_myconst == 43532) { + setverdict(pass); + } else { + setverdict(fail); + } +} + +control{ + execute(TC_Sem_08020305_ImportingAllDefinitionsOfAModule_001()); +} +} + +module Sem_08020305_ImportingAllDefinitionsOfAModule_001_import { + const integer c_myconst := 43532; +} diff --git a/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020305_importing_all_definitions_of_a_module/Sem_08020305_ImportingAllDefinitionsOfAModule_002.ttcn b/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020305_importing_all_definitions_of_a_module/Sem_08020305_ImportingAllDefinitionsOfAModule_002.ttcn new file mode 100644 index 00000000..1230132e --- /dev/null +++ b/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020305_importing_all_definitions_of_a_module/Sem_08020305_ImportingAllDefinitionsOfAModule_002.ttcn @@ -0,0 +1,32 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:8.2.3.5, Ensure that the constant is be visible after multiple imports. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_08020305_ImportingAllDefinitionsOfAModule_002 { + +import from Sem_08020305_ImportingAllDefinitionsOfAModule_002_import all except { + const all; +}; +import from Sem_08020305_ImportingAllDefinitionsOfAModule_002_import all; // second import overrides the first + +type component GeneralComp {} + +testcase TC_Sem_08020305_ImportingAllDefinitionsOfAModule_002() runs on GeneralComp { + if (c_myconst == 43532) { + setverdict(pass); + } else { + setverdict(fail); + } +} + +control{ + execute(TC_Sem_08020305_ImportingAllDefinitionsOfAModule_002()); +} +} + +module Sem_08020305_ImportingAllDefinitionsOfAModule_002_import { + const integer c_myconst := 43532; +} diff --git a/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020306_importing_definitions_from_other_t3_editions_and_non_t3_modules/Sem_08020306_ImportingDefinitionsFromOtherT3EditionsAndFromNonT3Modules_001.ttcn b/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020306_importing_definitions_from_other_t3_editions_and_non_t3_modules/Sem_08020306_ImportingDefinitionsFromOtherT3EditionsAndFromNonT3Modules_001.ttcn new file mode 100644 index 00000000..799c513e --- /dev/null +++ b/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020306_importing_definitions_from_other_t3_editions_and_non_t3_modules/Sem_08020306_ImportingDefinitionsFromOtherT3EditionsAndFromNonT3Modules_001.ttcn @@ -0,0 +1,16 @@ +/***************************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:8.2.3.6, Ensure that it is possible to import from previous language versions. + ** @verdict pass accept, noexecution + *****************************************************************/ + +module Sem_08020306_ImportingDefinitionsFromOtherT3EditionsAndFromNonT3Modules_001 language "TTCN-3:2010" { + import from Sem_08020306_ImportingDefinitionsFromOtherT3EditionsAndFromNonT3Modules_001_import language "TTCN-3:2003" { + const all; + } +} + +module Sem_08020306_ImportingDefinitionsFromOtherT3EditionsAndFromNonT3Modules_001_import { + const integer c_myconst := 1; +} diff --git a/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020306_importing_definitions_from_other_t3_editions_and_non_t3_modules/Syn_08020306_ImportingDefinitionsFromOtherT3EditionsAndFromNonT3Modules_001.ttcn b/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020306_importing_definitions_from_other_t3_editions_and_non_t3_modules/Syn_08020306_ImportingDefinitionsFromOtherT3EditionsAndFromNonT3Modules_001.ttcn new file mode 100644 index 00000000..6c89b2dc --- /dev/null +++ b/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020306_importing_definitions_from_other_t3_editions_and_non_t3_modules/Syn_08020306_ImportingDefinitionsFromOtherT3EditionsAndFromNonT3Modules_001.ttcn @@ -0,0 +1,16 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:8.2.3.6, Ensure that imports work with language references when importing definitions of the same kinds (in this case constants) is accepted. + ** @verdict pass accept, noexecution + *****************************************************************/ + +module Syn_08020306_ImportingDefinitionsFromOtherT3EditionsAndFromNonT3Modules_001 { + import from Syn_08020306_ImportingDefinitionsFromOtherT3EditionsAndFromNonT3Modules_001_import language "TTCN-3:2003" { + const all; + } +} + +module Syn_08020306_ImportingDefinitionsFromOtherT3EditionsAndFromNonT3Modules_001_import { + const integer c_myconst := 1; +} diff --git a/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020306_importing_definitions_from_other_t3_editions_and_non_t3_modules/Syn_08020306_ImportingDefinitionsFromOtherT3EditionsAndFromNonT3Modules_002.ttcn b/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020306_importing_definitions_from_other_t3_editions_and_non_t3_modules/Syn_08020306_ImportingDefinitionsFromOtherT3EditionsAndFromNonT3Modules_002.ttcn new file mode 100644 index 00000000..79084c2b --- /dev/null +++ b/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020306_importing_definitions_from_other_t3_editions_and_non_t3_modules/Syn_08020306_ImportingDefinitionsFromOtherT3EditionsAndFromNonT3Modules_002.ttcn @@ -0,0 +1,14 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:8.2.3.6, Ensure that imports work with language references when importing all definitions of another module is accepted. + ** @verdict pass accept, noexecution + *****************************************************************/ + +module Syn_08020306_ImportingDefinitionsFromOtherT3EditionsAndFromNonT3Modules_002 { + import from Syn_08020306_ImportingDefinitionsFromOtherT3EditionsAndFromNonT3Modules_002_import language "TTCN-3:2003" all ; +} + +module Syn_08020306_ImportingDefinitionsFromOtherT3EditionsAndFromNonT3Modules_002_import { + const integer c_myconst := 1; +} diff --git a/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020307_importing_of_import_statements_from_t3_modules/NegSem_08020307_ImportingOfImportStatementsFromT3Modules_001.ttcn b/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020307_importing_of_import_statements_from_t3_modules/NegSem_08020307_ImportingOfImportStatementsFromT3Modules_001.ttcn new file mode 100644 index 00000000..1db3ec13 --- /dev/null +++ b/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020307_importing_of_import_statements_from_t3_modules/NegSem_08020307_ImportingOfImportStatementsFromT3Modules_001.ttcn @@ -0,0 +1,35 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:8.2.3.7, Ensure that the import of import statements works for import all. + ** @verdict pass reject + *****************************************************************/ + +module NegSem_08020307_ImportingOfImportStatementsFromT3Modules_001 { + +import from NegSem_08020307_ImportingOfImportStatementsFromT3Modules_001_importA { + import all; +}; + +type component GeneralComp {} + +testcase TC_NegSem_08020307_ImportingOfImportStatementsFromT3Modules_001() runs on GeneralComp { + if (c_myconst == 43532) { // c_myconst shall not be accessible as the import in the importA module is private. + setverdict(fail); + } else { + setverdict(pass); + } +} + +control{ + execute(TC_NegSem_08020307_ImportingOfImportStatementsFromT3Modules_001()); +} +} + +module NegSem_08020307_ImportingOfImportStatementsFromT3Modules_001_importA { + private import from NegSem_08020307_ImportingOfImportStatementsFromT3Modules_001_importB all; +} + +module NegSem_08020307_ImportingOfImportStatementsFromT3Modules_001_importB { + const integer c_myconst := 43532; +} diff --git a/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020307_importing_of_import_statements_from_t3_modules/NegSem_08020307_ImportingOfImportStatementsFromT3Modules_002.ttcn b/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020307_importing_of_import_statements_from_t3_modules/NegSem_08020307_ImportingOfImportStatementsFromT3Modules_002.ttcn new file mode 100644 index 00000000..3d2b50e9 --- /dev/null +++ b/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020307_importing_of_import_statements_from_t3_modules/NegSem_08020307_ImportingOfImportStatementsFromT3Modules_002.ttcn @@ -0,0 +1,36 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:8.2.3.7, Ensure that the import of import statements works for import all. + ** @verdict pass reject + *****************************************************************/ + +module NegSem_08020307_ImportingOfImportStatementsFromT3Modules_002 { + +import from Sem_08020307_ImportingOfImportStatementsFromT3Modules_002_importA { + import all; +}; + +type component GeneralComp {} + +testcase TC_NegSem_08020307_ImportingOfImportStatementsFromT3Modules_002() runs on GeneralComp { + if (c_myconst == 43532) { // c_myconst shall not be accessible as the import in the importA module is private. + setverdict(fail); + } else { + setverdict(pass); + } +} + +control{ + execute(TC_NegSem_08020307_ImportingOfImportStatementsFromT3Modules_002()); +} +} + +module Sem_08020307_ImportingOfImportStatementsFromT3Modules_002_importA { + // imports are private by default + import from NegSem_08020307_ImportingOfImportStatementsFromT3Modules_002_importB all; +} + +module NegSem_08020307_ImportingOfImportStatementsFromT3Modules_002_importB { + const integer c_myconst := 43532; +} diff --git a/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020307_importing_of_import_statements_from_t3_modules/Sem_08020307_ImportingOfImportStatementsFromT3Modules_001.ttcn b/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020307_importing_of_import_statements_from_t3_modules/Sem_08020307_ImportingOfImportStatementsFromT3Modules_001.ttcn new file mode 100644 index 00000000..125a9dc0 --- /dev/null +++ b/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020307_importing_of_import_statements_from_t3_modules/Sem_08020307_ImportingOfImportStatementsFromT3Modules_001.ttcn @@ -0,0 +1,35 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:8.2.3.7, Ensure that the import of import statements works for import all. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_08020307_ImportingOfImportStatementsFromT3Modules_001 { + +import from Sem_08020307_ImportingOfImportStatementsFromT3Modules_001_importA { + import all; +}; + +type component GeneralComp {} + +testcase TC_Sem_08020307_ImportingOfImportStatementsFromT3Modules_001() runs on GeneralComp { + if (c_myconst == 43532) { + setverdict(pass); + } else { + setverdict(fail); + } +} + +control{ + execute(TC_Sem_08020307_ImportingOfImportStatementsFromT3Modules_001()); +} +} + +module Sem_08020307_ImportingOfImportStatementsFromT3Modules_001_importA { + public import from Sem_08020307_ImportingOfImportStatementsFromT3Modules_001_importB all; +} + +module Sem_08020307_ImportingOfImportStatementsFromT3Modules_001_importB { + const integer c_myconst := 43532; +} diff --git a/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020308_compatibility_of_language_specifications_in_imports/NOTES b/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020308_compatibility_of_language_specifications_in_imports/NOTES new file mode 100644 index 00000000..a452036a --- /dev/null +++ b/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020308_compatibility_of_language_specifications_in_imports/NOTES @@ -0,0 +1,3 @@ +- NOTE: imports of compatible external definitions is not easily possible with TTCN-3 alone. + Therefore, the amount of tests possible in this section is highly limited. +- Restriction b is tested as a part of 8.2.3.1 \ No newline at end of file diff --git a/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020308_compatibility_of_language_specifications_in_imports/NegSem_08020308_CompatibilityOfLanguageSpecificationsInImports_001.ttcn b/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020308_compatibility_of_language_specifications_in_imports/NegSem_08020308_CompatibilityOfLanguageSpecificationsInImports_001.ttcn new file mode 100644 index 00000000..22f6d56b --- /dev/null +++ b/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020308_compatibility_of_language_specifications_in_imports/NegSem_08020308_CompatibilityOfLanguageSpecificationsInImports_001.ttcn @@ -0,0 +1,14 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:8.2.3.8, Ensure that imports referring to future TTCN-3 versions are rejected. + ** @verdict pass reject + *****************************************************************/ + +module NegSem_08020308_CompatibilityOfLanguageSpecificationsInImports_001 { + +import from NegSem_08020308_CompatibilityOfLanguageSpecificationsInImports_001_import_A language "TTCN-3:9000" all; // shall be rejected as the cited TTCN-3 version is obviously in the future +} + +module NegSem_08020308_CompatibilityOfLanguageSpecificationsInImports_001_import_A { +} \ No newline at end of file diff --git a/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020308_compatibility_of_language_specifications_in_imports/NegSem_08020308_CompatibilityOfLanguageSpecificationsInImports_002.ttcn b/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020308_compatibility_of_language_specifications_in_imports/NegSem_08020308_CompatibilityOfLanguageSpecificationsInImports_002.ttcn new file mode 100644 index 00000000..91fdea68 --- /dev/null +++ b/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020308_compatibility_of_language_specifications_in_imports/NegSem_08020308_CompatibilityOfLanguageSpecificationsInImports_002.ttcn @@ -0,0 +1,33 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:8.2.3.8, Verify that modules with explicit language tag cannot import from newer TTCN-3 versions + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// Restriction c: +// The TTCN-3 language specification in an import statement shall be lower or equal +// to the TTCN-3 language specification of the importing module, i.e. a TTCN-3 module +// can only import from earlier or same editions of TTCN-3 but not from later editions. + +module NegSem_08020308_CompatibilityOfLanguageSpecificationsInImports_002 language "TTCN-3:2012" { + +import from NegSem_08020308_CompatibilityOfLanguageSpecificationsInImports_002_import language "TTCN-3:2013" all; + +type component GeneralComp {} + +testcase TC_NegSem_08020308_CompatibilityOfLanguageSpecificationsInImports_002() runs on GeneralComp { + if (c_test == 0) { setverdict(pass); } + else { setverdict(fail); } +} + +control{ + // testing if parameter names are imported + execute(TC_NegSem_08020308_CompatibilityOfLanguageSpecificationsInImports_002()); +} +} + +module NegSem_08020308_CompatibilityOfLanguageSpecificationsInImports_002_import { + const integer c_test := 0; +} \ No newline at end of file diff --git a/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020308_compatibility_of_language_specifications_in_imports/NegSem_08020308_CompatibilityOfLanguageSpecificationsInImports_003.ttcn b/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020308_compatibility_of_language_specifications_in_imports/NegSem_08020308_CompatibilityOfLanguageSpecificationsInImports_003.ttcn new file mode 100644 index 00000000..54f3072d --- /dev/null +++ b/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020308_compatibility_of_language_specifications_in_imports/NegSem_08020308_CompatibilityOfLanguageSpecificationsInImports_003.ttcn @@ -0,0 +1,33 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:8.2.3.8, Verify that modules with explicit language tag cannot import from newer TTCN-3 versions + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// Restriction c: +// The TTCN-3 language specification in an import statement shall be lower or equal +// to the TTCN-3 language specification of the importing module, i.e. a TTCN-3 module +// can only import from earlier or same editions of TTCN-3 but not from later editions. + +module NegSem_08020308_CompatibilityOfLanguageSpecificationsInImports_003 language "TTCN-3:2012" { + +import from NegSem_08020308_CompatibilityOfLanguageSpecificationsInImports_003_import all; + +type component GeneralComp {} + +testcase TC_NegSem_08020308_CompatibilityOfLanguageSpecificationsInImports_003() runs on GeneralComp { + if (c_test == 0) { setverdict(pass); } + else { setverdict(fail); } +} + +control{ + // testing if parameter names are imported + execute(TC_NegSem_08020308_CompatibilityOfLanguageSpecificationsInImports_003()); +} +} + +module NegSem_08020308_CompatibilityOfLanguageSpecificationsInImports_003_import language "TTCN-3:2013" { + const integer c_test := 0; +} \ No newline at end of file diff --git a/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020308_compatibility_of_language_specifications_in_imports/Sem_08020308_CompatibilityOfLanguageSpecificationsInImports_001.ttcn b/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020308_compatibility_of_language_specifications_in_imports/Sem_08020308_CompatibilityOfLanguageSpecificationsInImports_001.ttcn new file mode 100644 index 00000000..e46b593a --- /dev/null +++ b/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020308_compatibility_of_language_specifications_in_imports/Sem_08020308_CompatibilityOfLanguageSpecificationsInImports_001.ttcn @@ -0,0 +1,33 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:8.2.3.8, Verify that modules with explicit language tag can import from older TTCN-3 versions + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirements are tested: +// Restriction c: +// The TTCN-3 language specification in an import statement shall be lower or equal +// to the TTCN-3 language specification of the importing module, i.e. a TTCN-3 module +// can only import from earlier or same editions of TTCN-3 but not from later editions. + +module Sem_08020308_CompatibilityOfLanguageSpecificationsInImports_001 language "TTCN-3:2013" { + +import from Sem_08020308_CompatibilityOfLanguageSpecificationsInImports_001_import language "TTCN-3:2012" all; + +type component GeneralComp {} + +testcase TC_Sem_08020308_CompatibilityOfLanguageSpecificationsInImports_001() runs on GeneralComp { + if (c_test == 0) { setverdict(pass); } + else { setverdict(fail); } +} + +control{ + // testing if parameter names are imported + execute(TC_Sem_08020308_CompatibilityOfLanguageSpecificationsInImports_001()); +} +} + +module Sem_08020308_CompatibilityOfLanguageSpecificationsInImports_001_import { + const integer c_test := 0; +} \ No newline at end of file diff --git a/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020308_compatibility_of_language_specifications_in_imports/Sem_08020308_CompatibilityOfLanguageSpecificationsInImports_002.ttcn b/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020308_compatibility_of_language_specifications_in_imports/Sem_08020308_CompatibilityOfLanguageSpecificationsInImports_002.ttcn new file mode 100644 index 00000000..4d7d387d --- /dev/null +++ b/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020308_compatibility_of_language_specifications_in_imports/Sem_08020308_CompatibilityOfLanguageSpecificationsInImports_002.ttcn @@ -0,0 +1,33 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:8.2.3.8, Verify that modules with explicit language tag can import from older TTCN-3 versions + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirements are tested: +// Restriction c: +// The TTCN-3 language specification in an import statement shall be lower or equal +// to the TTCN-3 language specification of the importing module, i.e. a TTCN-3 module +// can only import from earlier or same editions of TTCN-3 but not from later editions. + +module Sem_08020308_CompatibilityOfLanguageSpecificationsInImports_002 language "TTCN-3:2013" { + +import from Sem_08020308_CompatibilityOfLanguageSpecificationsInImports_002_import all; + +type component GeneralComp {} + +testcase TC_Sem_08020308_CompatibilityOfLanguageSpecificationsInImports_002() runs on GeneralComp { + if (c_test == 0) { setverdict(pass); } + else { setverdict(fail); } +} + +control{ + // testing if parameter names are imported + execute(TC_Sem_08020308_CompatibilityOfLanguageSpecificationsInImports_002()); +} +} + +module Sem_08020308_CompatibilityOfLanguageSpecificationsInImports_002_import language "TTCN-3:2012" { + const integer c_test := 0; +} \ No newline at end of file diff --git a/ATS/core_language/08_modules/0802_module_definitions_part/080204_definition_of_friend_modules/NegSem_080204_DefinitionOfFriendModules_001.ttcn b/ATS/core_language/08_modules/0802_module_definitions_part/080204_definition_of_friend_modules/NegSem_080204_DefinitionOfFriendModules_001.ttcn new file mode 100644 index 00000000..861ca5b0 --- /dev/null +++ b/ATS/core_language/08_modules/0802_module_definitions_part/080204_definition_of_friend_modules/NegSem_080204_DefinitionOfFriendModules_001.ttcn @@ -0,0 +1,29 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:8.2.4, Ensure that friend visibility works for a sample constant. + ** @verdict pass reject + *****************************************************************/ + +module NegSem_080204_DefinitionOfFriendModules_001 { + +import from NegSem_080204_DefinitionOfFriendModules_001_import all; + +type component GeneralComp {} + +testcase TC_NegSem_080204_DefinitionOfFriendModules_001() runs on GeneralComp { + if (c_myconst == 32532) { // c_myconst shall not be visible. A friend module statement is missing in NegSem_080204_DefinitionOfFriendModules_001_import. + setverdict(fail); + } else { + setverdict(pass); + } +} + +control{ + execute(TC_NegSem_080204_DefinitionOfFriendModules_001()); +} +} + +module NegSem_080204_DefinitionOfFriendModules_001_import { + friend const integer c_myconst := 32532; +} \ No newline at end of file diff --git a/ATS/core_language/08_modules/0802_module_definitions_part/080204_definition_of_friend_modules/NegSem_080204_DefinitionOfFriendModules_002.ttcn b/ATS/core_language/08_modules/0802_module_definitions_part/080204_definition_of_friend_modules/NegSem_080204_DefinitionOfFriendModules_002.ttcn new file mode 100644 index 00000000..31df53a8 --- /dev/null +++ b/ATS/core_language/08_modules/0802_module_definitions_part/080204_definition_of_friend_modules/NegSem_080204_DefinitionOfFriendModules_002.ttcn @@ -0,0 +1,31 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:8.2.4, Ensure that private definitions are not made visible by friend declarations (for a constant sample definition). + ** @verdict pass reject + *****************************************************************/ + +module NegSem_080204_DefinitionOfFriendModules_002 { + +import from NegSem_080204_DefinitionOfFriendModules_002_import all; + +type component GeneralComp {} + +testcase TC_NegSem_080204_DefinitionOfFriendModules_002() runs on GeneralComp { + if (c_myconst == 32532) { // c_myconst shall not be visible. The definition is private even though the module is a friend. + setverdict(fail); + } else { + setverdict(pass); + } +} + +control{ + execute(TC_NegSem_080204_DefinitionOfFriendModules_002()); +} +} + +module NegSem_080204_DefinitionOfFriendModules_002_import { + friend module NegSem_080204_DefinitionOfFriendModules_001; + + private const integer c_myconst := 32532; +} \ No newline at end of file diff --git a/ATS/core_language/08_modules/0802_module_definitions_part/080204_definition_of_friend_modules/Sem_080204_DefinitionOfFriendModules_001.ttcn b/ATS/core_language/08_modules/0802_module_definitions_part/080204_definition_of_friend_modules/Sem_080204_DefinitionOfFriendModules_001.ttcn new file mode 100644 index 00000000..d96e48ed --- /dev/null +++ b/ATS/core_language/08_modules/0802_module_definitions_part/080204_definition_of_friend_modules/Sem_080204_DefinitionOfFriendModules_001.ttcn @@ -0,0 +1,31 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:8.2.4, Ensure that friend visibility works for a sample constant. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_080204_DefinitionOfFriendModules_001 { + +import from Sem_080204_DefinitionOfFriendModules_001_import all; + +type component GeneralComp {} + +testcase TC_Sem_080204_DefinitionOfFriendModules_001() runs on GeneralComp { + if (c_myconst == 32532) { + setverdict(pass); + } else { + setverdict(fail); + } +} + +control{ + execute(TC_Sem_080204_DefinitionOfFriendModules_001()); +} +} + +module Sem_080204_DefinitionOfFriendModules_001_import { + friend module Sem_080204_DefinitionOfFriendModules_001; + + friend const integer c_myconst := 32532; +} \ No newline at end of file diff --git a/ATS/core_language/08_modules/0802_module_definitions_part/080205_visibility_of_definitions/NegSem_080205_VisibilityOfDefinitions_001.ttcn b/ATS/core_language/08_modules/0802_module_definitions_part/080205_visibility_of_definitions/NegSem_080205_VisibilityOfDefinitions_001.ttcn new file mode 100644 index 00000000..d7ea8efe --- /dev/null +++ b/ATS/core_language/08_modules/0802_module_definitions_part/080205_visibility_of_definitions/NegSem_080205_VisibilityOfDefinitions_001.ttcn @@ -0,0 +1,29 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:8.2.5, Ensure that private definition (in this case a sample constant) is not visible using a normal import. + ** @verdict pass reject + *****************************************************************/ + +module NegSem_080205_VisibilityOfDefinitions_001 { + +import from NegSem_080205_VisibilityOfDefinitions_001_import all; + +type component GeneralComp {} + +testcase TC_NegSem_080205_VisibilityOfDefinitions_001() runs on GeneralComp { + if (c_myconst == 32532) { // c_myconst shall not be visible on import as the definition is private. + setverdict(fail); + } else { + setverdict(pass); + } +} + +control{ + execute(TC_NegSem_080205_VisibilityOfDefinitions_001()); +} +} + +module NegSem_080205_VisibilityOfDefinitions_001_import { + private const integer c_myconst := 32532; +} \ No newline at end of file diff --git a/ATS/core_language/08_modules/0802_module_definitions_part/080205_visibility_of_definitions/NegSem_080205_VisibilityOfDefinitions_002.ttcn b/ATS/core_language/08_modules/0802_module_definitions_part/080205_visibility_of_definitions/NegSem_080205_VisibilityOfDefinitions_002.ttcn new file mode 100644 index 00000000..26823e27 --- /dev/null +++ b/ATS/core_language/08_modules/0802_module_definitions_part/080205_visibility_of_definitions/NegSem_080205_VisibilityOfDefinitions_002.ttcn @@ -0,0 +1,31 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:8.2.5, Ensure that private definition (in this case a sample constant) is not visible using an import of a friend module. + ** @verdict pass reject + *****************************************************************/ + +module NegSem_080205_VisibilityOfDefinitions_002 { + +import from NegSem_080205_VisibilityOfDefinitions_002_import all; + +type component GeneralComp {} + +testcase TC_NegSem_080205_VisibilityOfDefinitions_002() runs on GeneralComp { + if (c_myconst == 32532) { // c_myconst shall not be visible on import as the definition is private. + setverdict(fail); + } else { + setverdict(pass); + } +} + +control{ + execute(TC_NegSem_080205_VisibilityOfDefinitions_002()); +} +} + +module NegSem_080205_VisibilityOfDefinitions_002_import { + friend module NegSem_080205_VisibilityOfDefinitions_002; + + private const integer c_myconst := 32532; +} \ No newline at end of file diff --git a/ATS/core_language/08_modules/0802_module_definitions_part/080205_visibility_of_definitions/NegSem_080205_VisibilityOfDefinitions_003.ttcn b/ATS/core_language/08_modules/0802_module_definitions_part/080205_visibility_of_definitions/NegSem_080205_VisibilityOfDefinitions_003.ttcn new file mode 100644 index 00000000..3aebd033 --- /dev/null +++ b/ATS/core_language/08_modules/0802_module_definitions_part/080205_visibility_of_definitions/NegSem_080205_VisibilityOfDefinitions_003.ttcn @@ -0,0 +1,33 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:8.2.5, Ensure that friend definition (in this case a sample constant) is not visible using a group import of a non-friend module. + ** @verdict pass reject + *****************************************************************/ + +module NegSem_080205_VisibilityOfDefinitions_003 { + +import from NegSem_080205_VisibilityOfDefinitions_003_import { + group CONST_GROUP; +} + +type component GeneralComp {} + +testcase TC_NegSem_080205_VisibilityOfDefinitions_003() runs on GeneralComp { + if (c_myconst == 32532) { // c_myconst shall not be visible on import as the definition is private. + setverdict(fail); + } else { + setverdict(pass); + } +} + +control{ + execute(TC_NegSem_080205_VisibilityOfDefinitions_003()); +} +} + +module NegSem_080205_VisibilityOfDefinitions_003_import { + group CONST_GROUP { + friend const integer c_myconst := 32532; + } +} \ No newline at end of file diff --git a/ATS/core_language/08_modules/0802_module_definitions_part/080205_visibility_of_definitions/NegSem_080205_VisibilityOfDefinitions_004.ttcn b/ATS/core_language/08_modules/0802_module_definitions_part/080205_visibility_of_definitions/NegSem_080205_VisibilityOfDefinitions_004.ttcn new file mode 100644 index 00000000..b0ac887e --- /dev/null +++ b/ATS/core_language/08_modules/0802_module_definitions_part/080205_visibility_of_definitions/NegSem_080205_VisibilityOfDefinitions_004.ttcn @@ -0,0 +1,33 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:8.2.5, Ensure that private definition (in this case a sample constant) is not visible using a group import of a non-friend module. + ** @verdict pass reject + *****************************************************************/ + +module NegSem_080205_VisibilityOfDefinitions_004 { + +import from NegSem_080205_VisibilityOfDefinitions_004_import { + group CONST_GROUP; +} + +type component GeneralComp {} + +testcase TC_NegSem_080205_VisibilityOfDefinitions_004() runs on GeneralComp { + if (c_myconst == 32532) { // c_myconst shall not be visible on import as the definition is private. + setverdict(fail); + } else { + setverdict(pass); + } +} + +control{ + execute(TC_NegSem_080205_VisibilityOfDefinitions_004()); +} +} + +module NegSem_080205_VisibilityOfDefinitions_004_import { + group CONST_GROUP { + private const integer c_myconst := 32532; + } +} \ No newline at end of file diff --git a/ATS/core_language/08_modules/0802_module_definitions_part/080205_visibility_of_definitions/NegSem_080205_VisibilityOfDefinitions_005.ttcn b/ATS/core_language/08_modules/0802_module_definitions_part/080205_visibility_of_definitions/NegSem_080205_VisibilityOfDefinitions_005.ttcn new file mode 100644 index 00000000..31638a02 --- /dev/null +++ b/ATS/core_language/08_modules/0802_module_definitions_part/080205_visibility_of_definitions/NegSem_080205_VisibilityOfDefinitions_005.ttcn @@ -0,0 +1,35 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:8.2.5, Ensure that private definition (in this case a sample constant) is not visible using a group import of a friend module. + ** @verdict pass reject + *****************************************************************/ + +module NegSem_080205_VisibilityOfDefinitions_005 { + +import from NegSem_080205_VisibilityOfDefinitions_005_import { + group CONST_GROUP; +} + +type component GeneralComp {} + +testcase TC_NegSem_080205_VisibilityOfDefinitions_005() runs on GeneralComp { + if (c_myconst == 32532) { // c_myconst shall not be visible on import as the definition is private. + setverdict(fail); + } else { + setverdict(pass); + } +} + +control{ + execute(TC_NegSem_080205_VisibilityOfDefinitions_005()); +} +} + +module NegSem_080205_VisibilityOfDefinitions_005_import { + friend module NegSem_080205_VisibilityOfDefinitions_005; + + group CONST_GROUP { + private const integer c_myconst := 32532; + } +} \ No newline at end of file diff --git a/ATS/core_language/08_modules/0802_module_definitions_part/080205_visibility_of_definitions/Sem_080205_VisibilityOfDefinitions_001.ttcn b/ATS/core_language/08_modules/0802_module_definitions_part/080205_visibility_of_definitions/Sem_080205_VisibilityOfDefinitions_001.ttcn new file mode 100644 index 00000000..99afaef1 --- /dev/null +++ b/ATS/core_language/08_modules/0802_module_definitions_part/080205_visibility_of_definitions/Sem_080205_VisibilityOfDefinitions_001.ttcn @@ -0,0 +1,29 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:8.2.5, Ensure that explicitly defined public definitions (in this case a sample constant) are visible when imported. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_080205_VisibilityOfDefinitions_001 { + +import from Sem_080205_VisibilityOfDefinitions_001_import all; + +type component GeneralComp {} + +testcase TC_Sem_080205_VisibilityOfDefinitions_001() runs on GeneralComp { + if (c_myconst == 32532) { // c_myconst shall be visible on import when it is explicitly set to public. + setverdict(pass); + } else { + setverdict(fail); + } +} + +control{ + execute(TC_Sem_080205_VisibilityOfDefinitions_001()); +} +} + +module Sem_080205_VisibilityOfDefinitions_001_import { + public const integer c_myconst := 32532; +} \ No newline at end of file diff --git a/ATS/core_language/08_modules/0802_module_definitions_part/080205_visibility_of_definitions/Sem_080205_VisibilityOfDefinitions_002.ttcn b/ATS/core_language/08_modules/0802_module_definitions_part/080205_visibility_of_definitions/Sem_080205_VisibilityOfDefinitions_002.ttcn new file mode 100644 index 00000000..0471b107 --- /dev/null +++ b/ATS/core_language/08_modules/0802_module_definitions_part/080205_visibility_of_definitions/Sem_080205_VisibilityOfDefinitions_002.ttcn @@ -0,0 +1,31 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:8.2.5, Ensure that explicitly defined public definitions (in this case a sample constant) are visible when imported by a friend module. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_080205_VisibilityOfDefinitions_002 { + +import from Sem_080205_VisibilityOfDefinitions_002_import all; + +type component GeneralComp {} + +testcase TC_Sem_080205_VisibilityOfDefinitions_002() runs on GeneralComp { + if (c_myconst == 32532) { // c_myconst shall be visible on import when it is explicitly set to public. + setverdict(pass); + } else { + setverdict(fail); + } +} + +control{ + execute(TC_Sem_080205_VisibilityOfDefinitions_002()); +} +} + +module Sem_080205_VisibilityOfDefinitions_002_import { + friend module Sem_080205_VisibilityOfDefinitions_002; + + public const integer c_myconst := 32532; +} \ No newline at end of file diff --git a/ATS/core_language/08_modules/0802_module_definitions_part/080205_visibility_of_definitions/Sem_080205_VisibilityOfDefinitions_003.ttcn b/ATS/core_language/08_modules/0802_module_definitions_part/080205_visibility_of_definitions/Sem_080205_VisibilityOfDefinitions_003.ttcn new file mode 100644 index 00000000..9f249252 --- /dev/null +++ b/ATS/core_language/08_modules/0802_module_definitions_part/080205_visibility_of_definitions/Sem_080205_VisibilityOfDefinitions_003.ttcn @@ -0,0 +1,33 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:8.2.5, Ensure that explicitly defined public definitions (in this case a sample constant) are visible when imported through a group. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_080205_VisibilityOfDefinitions_003 { + +import from Sem_080205_VisibilityOfDefinitions_003_import { + group CONST_GROUP; +}; + +type component GeneralComp {} + +testcase TC_Sem_080205_VisibilityOfDefinitions_003() runs on GeneralComp { + if (c_myconst == 32532) { // c_myconst shall be visible on import when it is explicitly set to public. + setverdict(pass); + } else { + setverdict(fail); + } +} + +control{ + execute(TC_Sem_080205_VisibilityOfDefinitions_003()); +} +} + +module Sem_080205_VisibilityOfDefinitions_003_import { + group CONST_GROUP { + public const integer c_myconst := 32532; + } +} \ No newline at end of file diff --git a/ATS/core_language/08_modules/0802_module_definitions_part/080205_visibility_of_definitions/Sem_080205_VisibilityOfDefinitions_004.ttcn b/ATS/core_language/08_modules/0802_module_definitions_part/080205_visibility_of_definitions/Sem_080205_VisibilityOfDefinitions_004.ttcn new file mode 100644 index 00000000..4744520f --- /dev/null +++ b/ATS/core_language/08_modules/0802_module_definitions_part/080205_visibility_of_definitions/Sem_080205_VisibilityOfDefinitions_004.ttcn @@ -0,0 +1,35 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:8.2.5, Ensure that explicitly defined public definitions (in this case a sample constant) are visible when imported through a group of a friend module. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_080205_VisibilityOfDefinitions_004 { + +import from Sem_080205_VisibilityOfDefinitions_004_import { + group CONST_GROUP; +}; + +type component GeneralComp {} + +testcase TC_Sem_080205_VisibilityOfDefinitions_004() runs on GeneralComp { + if (c_myconst == 32532) { // c_myconst shall be visible on import when it is explicitly set to public. + setverdict(pass); + } else { + setverdict(fail); + } +} + +control{ + execute(TC_Sem_080205_VisibilityOfDefinitions_004()); +} +} + +module Sem_080205_VisibilityOfDefinitions_004_import { + friend module Sem_080205_VisibilityOfDefinitions_004; + + group CONST_GROUP { + public const integer c_myconst := 32532; + } +} \ No newline at end of file diff --git a/ATS/core_language/08_modules/0802_module_definitions_part/080205_visibility_of_definitions/Sem_080205_VisibilityOfDefinitions_005.ttcn b/ATS/core_language/08_modules/0802_module_definitions_part/080205_visibility_of_definitions/Sem_080205_VisibilityOfDefinitions_005.ttcn new file mode 100644 index 00000000..1b301054 --- /dev/null +++ b/ATS/core_language/08_modules/0802_module_definitions_part/080205_visibility_of_definitions/Sem_080205_VisibilityOfDefinitions_005.ttcn @@ -0,0 +1,35 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:8.2.5, Ensure that friend definitions (in this case a sample constant) are visible when imported through a group of a friend module. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_080205_VisibilityOfDefinitions_005 { + +import from Sem_080205_VisibilityOfDefinitions_005_import { + group CONST_GROUP; +}; + +type component GeneralComp {} + +testcase TC_Sem_080205_VisibilityOfDefinitions_005() runs on GeneralComp { + if (c_myconst == 32532) { // c_myconst shall be visible on import when it is explicitly set to public. + setverdict(pass); + } else { + setverdict(fail); + } +} + +control{ + execute(TC_Sem_080205_VisibilityOfDefinitions_005()); +} +} + +module Sem_080205_VisibilityOfDefinitions_005_import { + friend module Sem_080205_VisibilityOfDefinitions_005; + + group CONST_GROUP { + friend const integer c_myconst := 32532; + } +} \ No newline at end of file diff --git a/ATS/core_language/08_modules/0802_module_definitions_part/0802_toplevel/Syn_0802_ModuleDefinitionsPart_001.ttcn b/ATS/core_language/08_modules/0802_module_definitions_part/0802_toplevel/Syn_0802_ModuleDefinitionsPart_001.ttcn new file mode 100644 index 00000000..08750d35 --- /dev/null +++ b/ATS/core_language/08_modules/0802_module_definitions_part/0802_toplevel/Syn_0802_ModuleDefinitionsPart_001.ttcn @@ -0,0 +1,15 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:8.2, Ensure that a TypeDef module definition with public visibility is accepted. + ** @verdict pass accept, noexecution + *****************************************************************/ + + +module Syn_0802_ModuleDefinitionsPart_001 { + public type record MyRecord1 { + integer field1, + charstring field2 + } + +} diff --git a/ATS/core_language/08_modules/0802_module_definitions_part/0802_toplevel/Syn_0802_ModuleDefinitionsPart_002.ttcn b/ATS/core_language/08_modules/0802_module_definitions_part/0802_toplevel/Syn_0802_ModuleDefinitionsPart_002.ttcn new file mode 100644 index 00000000..4d54609b --- /dev/null +++ b/ATS/core_language/08_modules/0802_module_definitions_part/0802_toplevel/Syn_0802_ModuleDefinitionsPart_002.ttcn @@ -0,0 +1,15 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:8.2, Ensure that a TypeDef module definition with private visibility is accepted. + ** @verdict pass accept, noexecution + *****************************************************************/ + + +module Syn_0802_ModuleDefinitionsPart_002 { + private type record MyRecord1 { + integer field1, + charstring field2 + } + +} diff --git a/ATS/core_language/08_modules/0803_module_control_part/NegSyn_0803_ModuleControlPart_001.ttcn b/ATS/core_language/08_modules/0803_module_control_part/NegSyn_0803_ModuleControlPart_001.ttcn new file mode 100644 index 00000000..e5ac7a40 --- /dev/null +++ b/ATS/core_language/08_modules/0803_module_control_part/NegSyn_0803_ModuleControlPart_001.ttcn @@ -0,0 +1,18 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:8.3, Ensure that there is not more than one control part. + ** @verdict pass reject + *****************************************************************/ + +module NegSyn_0803_ModuleControlPart_001 { + +control { + var integer count := 0; +} + +control { + var integer count := 0; +} + +} \ No newline at end of file diff --git a/ATS/core_language/08_modules/0803_module_control_part/Sem_0803_ModuleControlPart_001.ttcn b/ATS/core_language/08_modules/0803_module_control_part/Sem_0803_ModuleControlPart_001.ttcn new file mode 100644 index 00000000..a57a7e62 --- /dev/null +++ b/ATS/core_language/08_modules/0803_module_control_part/Sem_0803_ModuleControlPart_001.ttcn @@ -0,0 +1,31 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:8.3, Ensure that the verdict returned from a test case to the control-part does not influence the execution of a second test case. The result of the last test case execution corresponds to the overall test verdict. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_0803_ModuleControlPart_001 { + +type component GeneralComp {} + +testcase TC_Sem_0803_ModuleControlPart_001() runs on GeneralComp { + setverdict(pass); +} + +testcase TC_Sem_0803_ModuleControlPart_001_second(verdicttype p_passthroughVerdict) runs on GeneralComp { + if (match(p_passthroughVerdict, getverdict) and match(getverdict, none) ) { // verdict should be none. + setverdict(fail); + } else { + setverdict(pass); + } +} + + +control { + var verdicttype v_myverdict; + v_myverdict := execute(TC_Sem_0803_ModuleControlPart_001()); + execute(TC_Sem_0803_ModuleControlPart_001_second(v_myverdict)); +} + +} \ No newline at end of file diff --git a/ATS/core_language/08_modules/0803_module_control_part/Syn_0803_ModuleControlPart_001.ttcn b/ATS/core_language/08_modules/0803_module_control_part/Syn_0803_ModuleControlPart_001.ttcn new file mode 100644 index 00000000..76c83aa4 --- /dev/null +++ b/ATS/core_language/08_modules/0803_module_control_part/Syn_0803_ModuleControlPart_001.ttcn @@ -0,0 +1,20 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:8.3, Ensure that the module control is able to accept execute statements. + ** @verdict pass accept, noexecution + *****************************************************************/ + +module Syn_0803_ModuleControlPart_001 { + +type component GeneralComp {} + +testcase TC_Syn_0803_ModuleControlPart_001() runs on GeneralComp { + setverdict(pass); +} + +control { + execute(TC_Syn_0803_ModuleControlPart_001()); +} + +} \ No newline at end of file diff --git a/ATS/core_language/08_modules/0803_module_control_part/Syn_0803_ModuleControlPart_002.ttcn b/ATS/core_language/08_modules/0803_module_control_part/Syn_0803_ModuleControlPart_002.ttcn new file mode 100644 index 00000000..7cfc2ca6 --- /dev/null +++ b/ATS/core_language/08_modules/0803_module_control_part/Syn_0803_ModuleControlPart_002.ttcn @@ -0,0 +1,34 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:8.3, Ensure that the module control part with a few commonly used stateents is accepted. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Syn_0803_ModuleControlPart_002 { + +type component GeneralComp {} + +type record MyRecordType { + integer field1, + charstring field2 +} + +testcase TC_Syn_0803_ModuleControlPart_002() runs on GeneralComp { + setverdict(pass); +} + +control { + var integer v_i := 1; + const charstring v_hello := "Hello World"; + timer t_mytimer; + t_mytimer.start(1.0); + if (v_i == 1) { + execute(TC_Syn_0803_ModuleControlPart_002(), 5.0); + } else { + log("something went wrong"); + } + t_mytimer.stop; +} + +} \ No newline at end of file diff --git a/ATS/core_language/08_modules/0803_module_control_part/Syn_0803_ModuleControlPart_003.ttcn b/ATS/core_language/08_modules/0803_module_control_part/Syn_0803_ModuleControlPart_003.ttcn new file mode 100644 index 00000000..83000c02 --- /dev/null +++ b/ATS/core_language/08_modules/0803_module_control_part/Syn_0803_ModuleControlPart_003.ttcn @@ -0,0 +1,14 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:8.3, Ensure that an empty control part is accepted. + ** @verdict pass accept, noexecution + *****************************************************************/ + +module Syn_0803_ModuleControlPart_003 { + +control { + +} + +} \ No newline at end of file diff --git a/ATS/core_language/08_modules/NOTES b/ATS/core_language/08_modules/NOTES new file mode 100644 index 00000000..1658e9e6 --- /dev/null +++ b/ATS/core_language/08_modules/NOTES @@ -0,0 +1 @@ +- TODO: add more tests. Pretty basic currently. \ No newline at end of file diff --git a/ATS/core_language/09_test_configurations/0901_communication_ports/NegSem_0901_Communication_ports_001.ttcn b/ATS/core_language/09_test_configurations/0901_communication_ports/NegSem_0901_Communication_ports_001.ttcn new file mode 100644 index 00000000..75ab8ef7 --- /dev/null +++ b/ATS/core_language/09_test_configurations/0901_communication_ports/NegSem_0901_Communication_ports_001.ttcn @@ -0,0 +1,42 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:9.1, Ensure that a port owned by a component cannot be connected with two other ports + ** @verdict pass reject + ** @configuration port:broadcast + ***************************************************/ + +/*NOTE: see Figure 7(c): Two components (A and B with two ports). + * ERROR: Port A connects to port B1 and port B2, this is not allowed + * */ + +module NegSem_0901_Communication_ports_001{ + + + type component GeneralComp{ + port IntegerInputPortType messagePortA,messagePortB; + }; + + type port IntegerInputPortType message { + inout integer + } + + + +testcase TC_NegSem_0901_Communication_ports_001() runs on GeneralComp system GeneralComp { + +// generate test components + var GeneralComp MycompA; + var GeneralComp MycompB; + MycompA := GeneralComp.create; + MycompB := GeneralComp.create; + +// make the connections between ports + connect(MycompA:messagePortA,MycompB:messagePortA); + connect(MycompA:messagePortA,MycompB:messagePortB); //Error: not allowed, MycompA messagePortA is already connected to MycompB messagePortA +} +control{ + execute(TC_NegSem_0901_Communication_ports_001()); +} +} + diff --git a/ATS/core_language/09_test_configurations/0901_communication_ports/NegSem_0901_Communication_ports_002.ttcn b/ATS/core_language/09_test_configurations/0901_communication_ports/NegSem_0901_Communication_ports_002.ttcn new file mode 100644 index 00000000..a39bc556 --- /dev/null +++ b/ATS/core_language/09_test_configurations/0901_communication_ports/NegSem_0901_Communication_ports_002.ttcn @@ -0,0 +1,37 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:9, Ensure that it is not possible to connect a mapped port + ** @verdict pass reject + ***************************************************/ + +/*NOTE: see Figure 7(f): connection of two TSI ports is not allowed + * */ + +module NegSem_0901_Communication_ports_002{ + + + type port loopbackPort message { + inout integer + } + type port MyPort message { + inout integer + } + +type component GeneralComp { + port loopbackPort messagePort; + port MyPort messagePortB; + +} + +testcase TC_NegSem_0901_Communication_ports_002() runs on GeneralComp { + +connect(mtc:messagePort,mtc:messagePortB); // not allowed + +} + +control{ + execute(TC_NegSem_0901_Communication_ports_002()); +} + +} diff --git a/ATS/core_language/09_test_configurations/0901_communication_ports/NegSem_0901_Communication_ports_003.ttcn b/ATS/core_language/09_test_configurations/0901_communication_ports/NegSem_0901_Communication_ports_003.ttcn new file mode 100644 index 00000000..7ff8f803 --- /dev/null +++ b/ATS/core_language/09_test_configurations/0901_communication_ports/NegSem_0901_Communication_ports_003.ttcn @@ -0,0 +1,33 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:9, Ensure that it is not possible to connect a port with two other ports owned by the same component + ** @verdict pass reject + ** @configuration port:broadcast + ***************************************************/ + +/*NOTE: see Figure 7(a): MyCompA has 3 ports and A2 shall not be connected to A1 and A3 both + * */ + +module NegSem_0901_Communication_ports_003{ + + type charstring address; + type port IntegerInputPortType message { + inout integer + } + +type component MycompA { // MyCompA has 3 ports + port IntegerInputPortType messagePortA1,messagePortA2,messagePortA3 +} + +testcase TC_NegSem_0901_Communication_ports_003() runs on MycompA { + +connect(mtc:messagePortA1,mtc:messagePortA2); +connect(mtc:messagePortA2,mtc:messagePortA3); // Error: this is not allowed + } + +control{ + execute(TC_NegSem_0901_Communication_ports_003()); +} + +} diff --git a/ATS/core_language/09_test_configurations/0901_communication_ports/NegSem_0901_Communication_ports_004.ttcn b/ATS/core_language/09_test_configurations/0901_communication_ports/NegSem_0901_Communication_ports_004.ttcn new file mode 100644 index 00000000..ed4692a8 --- /dev/null +++ b/ATS/core_language/09_test_configurations/0901_communication_ports/NegSem_0901_Communication_ports_004.ttcn @@ -0,0 +1,44 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:9.1, Verify that it is not possible to map a connected port + ** @verdict pass reject + ***************************************************/ + +/*NOTE: see Figure 7(b): GeneralComp port p1 is mapped to a TSI port P1. + * Therefore mapping GeneralComp port p2 with TSI port P1 gives an error. + * */ + + + +module NegSem_0901_Communication_ports_004 { + + type port MyPort message { + inout integer + } + + type component GeneralComp + { + port MyPort p1; + port MyPort p2; + } + + type component SystemComp + { + port MyPort p1; + } + + testcase TC_NegSem_0901_Communication_ports_004() runs on GeneralComp system SystemComp { + +//create a test component + var GeneralComp v_ptc := GeneralComp.create; + connect(self:p1, v_ptc:p1); + map(self:p1, system:p1); // error: v_ptc.p1 is already mapped to SystemComp.p1 + setverdict(pass); + } + + control{ + execute(TC_NegSem_0901_Communication_ports_004()); + } +} + diff --git a/ATS/core_language/09_test_configurations/0901_communication_ports/NegSem_0901_Communication_ports_005.ttcn b/ATS/core_language/09_test_configurations/0901_communication_ports/NegSem_0901_Communication_ports_005.ttcn new file mode 100644 index 00000000..39e99204 --- /dev/null +++ b/ATS/core_language/09_test_configurations/0901_communication_ports/NegSem_0901_Communication_ports_005.ttcn @@ -0,0 +1,35 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:9.1, Verify that it is not possible to connect a port with a port owned by the same component + ** @verdict pass reject + ***************************************************/ + +/*NOTE: see Figure 7(e): GeneralComp have two ports (p1 and p2). + * ERROR: Port p1 is connected to p1 (self), therefore connection between p1 and p2 gives an error + * */ + + +module NegSem_0901_Communication_ports_005 { + + type port P message { + inout integer + } + + type component GeneralComp + { + port P p1, p2; + } + + testcase TC_NegSem_0901_Communication_ports_005() runs on GeneralComp system GeneralComp { + + connect(self:p1, self:p1); + connect(self:p1, self:p2); // error expected here, since p1 is already connected to p1. + setverdict(pass); + } + + control{ + execute(TC_NegSem_0901_Communication_ports_005()); + } +} + diff --git a/ATS/core_language/09_test_configurations/0901_communication_ports/NegSem_0901_Communication_ports_006.ttcn b/ATS/core_language/09_test_configurations/0901_communication_ports/NegSem_0901_Communication_ports_006.ttcn new file mode 100644 index 00000000..9fcb6e52 --- /dev/null +++ b/ATS/core_language/09_test_configurations/0901_communication_ports/NegSem_0901_Communication_ports_006.ttcn @@ -0,0 +1,45 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:9.1, Verify that only 1:1 connection between component port and TSI are allowed + ** @verdict pass reject + ***************************************************/ + +/*NOTE: see Figure 7(d): MyCompA has a port (p1). + * ERROR: TSI have two ports p1 and p2. GeneralComp port S1 can not be connected to both p1 and p2. + * */ + +module NegSem_0901_Communication_ports_006 { + + type port P message { + inout integer + } + + type component GeneralComp + { + port P S1; + } + + type component MyComp + { + port P p1, p2; + } + + testcase TC_NegSem_0901_Communication_ports_006() runs on GeneralComp system GeneralComp { + +// Creating test component: + var MyComp MycompA; + MycompA := MyComp.create; + +// make the connections between ports: + connect(self:S1,MycompA:p1); + connect(self:S1,MycompA:p2); //not allowed, since p1 is already connected to S1 + + setverdict(pass); + } + + control{ + execute(TC_NegSem_0901_Communication_ports_006()); + } +} + diff --git a/ATS/core_language/09_test_configurations/0901_communication_ports/NegSem_0901_Communication_ports_007.ttcn b/ATS/core_language/09_test_configurations/0901_communication_ports/NegSem_0901_Communication_ports_007.ttcn new file mode 100644 index 00000000..fda45eb7 --- /dev/null +++ b/ATS/core_language/09_test_configurations/0901_communication_ports/NegSem_0901_Communication_ports_007.ttcn @@ -0,0 +1,33 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:9.1, Verify that a two TSI port cannot be connected + ** @verdict pass reject + ***************************************************/ + +/*NOTE: see Figure 7(f): Two TSI port cannot be connected + * */ + +module NegSem_0901_Communication_ports_007 { + + type port P message { + inout integer + } + + type component GeneralComp + { + port P p1, p2; + } + + testcase TC_NegSem_0901_Communication_ports_007() runs on GeneralComp system GeneralComp { + var GeneralComp s := system; + map(s:p2, system:p1); // error: p1 and p2 cannot be connected + + setverdict(pass); + } + + control{ + execute(TC_NegSem_0901_Communication_ports_007()); + } +} + diff --git a/ATS/core_language/09_test_configurations/0901_communication_ports/NegSem_0901_Communication_ports_008.ttcn b/ATS/core_language/09_test_configurations/0901_communication_ports/NegSem_0901_Communication_ports_008.ttcn new file mode 100644 index 00000000..b14806fd --- /dev/null +++ b/ATS/core_language/09_test_configurations/0901_communication_ports/NegSem_0901_Communication_ports_008.ttcn @@ -0,0 +1,41 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:9.1, Verify that mapping an already connected port is not allowed + ** @verdict pass reject + ***************************************************/ + +/*NOTE: see Figure 7(g): Two components (A and B). MycompA:p1 is connected to MycompB:p1. + * Therefore mapping MycompB to TSI port p1 is not allowed + * */ + +module NegSem_0901_Communication_ports_008 { + + type port P message { + inout integer + } + + type component GeneralComp + { + port P p1; + } + + testcase TC_NegSem_0901_Communication_ports_008() runs on GeneralComp system GeneralComp { + + // generate test components + var GeneralComp MycompA; + var GeneralComp MycompB; + MycompA := GeneralComp.create; + MycompB := GeneralComp.create; + + connect(MycompA:p1,MycompB:p1); + map(MycompB:p1,system:p1); // not allowed, since MyCompB:p1 is already connected to MyCompA:p1 + + setverdict(pass); + } + + control{ + execute(TC_NegSem_0901_Communication_ports_008()); + } +} + diff --git a/ATS/core_language/09_test_configurations/0901_communication_ports/NegSem_0901_Communication_ports_009.ttcn b/ATS/core_language/09_test_configurations/0901_communication_ports/NegSem_0901_Communication_ports_009.ttcn new file mode 100644 index 00000000..57782ef4 --- /dev/null +++ b/ATS/core_language/09_test_configurations/0901_communication_ports/NegSem_0901_Communication_ports_009.ttcn @@ -0,0 +1,31 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:9.1, Verify that connections within the test system interface are not allowed + ** @verdict pass reject + ***************************************************/ + +// The following requirements are tested: +// Restriction a): Connections within the test system interface are not allowed. + +module NegSem_0901_Communication_ports_008 { + + type port P message { + inout integer + } + + type component GeneralComp + { + port P p1, p2; + } + + testcase TC_NegSem_0901_Communication_ports_008() runs on GeneralComp system GeneralComp { + map(system:p1, system:p1); // mapping system port to itself: error expected + setverdict(pass); + } + + control{ + execute(TC_NegSem_0901_Communication_ports_008()); + } +} + diff --git a/ATS/core_language/09_test_configurations/0901_communication_ports/NegSem_0901_Communication_ports_010.ttcn b/ATS/core_language/09_test_configurations/0901_communication_ports/NegSem_0901_Communication_ports_010.ttcn new file mode 100644 index 00000000..72cd4ead --- /dev/null +++ b/ATS/core_language/09_test_configurations/0901_communication_ports/NegSem_0901_Communication_ports_010.ttcn @@ -0,0 +1,39 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:9.1, Verify that a two TSI port cannot be connected + ** @verdict pass reject + ***************************************************/ + +/*NOTE: see Figure 7(f): Two TSI port cannot be connected + * */ + +module NegSem_0901_Communication_ports_010 { + + type port P message { + inout integer + } + + type component GeneralComp + { + port P p1, p2; + } + + type component General_System_Comp + { + port P p_system_1, p_system_2; + } + + testcase TC_NegSem_0901_Communication_ports_010() runs on GeneralComp system General_System_Comp { + + + connect(system:p_system_1, system:p_system_2); // error: p_system_1 and p_system_2 cannot be connected + + setverdict(pass); + } + + control{ + execute(TC_NegSem_0901_Communication_ports_010()); + } +} + diff --git a/ATS/core_language/09_test_configurations/0901_communication_ports/Sem_0901_Communication_ports_001.ttcn b/ATS/core_language/09_test_configurations/0901_communication_ports/Sem_0901_Communication_ports_001.ttcn new file mode 100644 index 00000000..f2e2825c --- /dev/null +++ b/ATS/core_language/09_test_configurations/0901_communication_ports/Sem_0901_Communication_ports_001.ttcn @@ -0,0 +1,40 @@ +/*************************************************** + ** @author STF 451 + ** @version 0.0.1 + ** @purpose 1:9, Ensure that the IUT correctly handles loopback message + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// Loopback test: messagePort is a loopback port and sends (2). If receives(2) pass, else failed. +module Sem_0901_Communication_ports_001{ + + + type port loopbackPort message { + inout integer + } + + +type component GeneralComp { + port loopbackPort messagePort +} + +testcase TC_Sem_0901_Communication_ports_001() runs on GeneralComp { + + + messagePort.send(2); //can send also in-line template + + alt { + [] messagePort.receive(2) { + setverdict(pass); + } + [] messagePort.receive { + setverdict(fail); + } + } +} + +control{ + execute(TC_Sem_0901_Communication_ports_001()); +} + +} diff --git a/ATS/core_language/09_test_configurations/0901_communication_ports/Sem_0901_Communication_ports_002.ttcn b/ATS/core_language/09_test_configurations/0901_communication_ports/Sem_0901_Communication_ports_002.ttcn new file mode 100644 index 00000000..c6d6783c --- /dev/null +++ b/ATS/core_language/09_test_configurations/0901_communication_ports/Sem_0901_Communication_ports_002.ttcn @@ -0,0 +1,79 @@ +/*************************************************** + ** @author STF 451 + ** @version 0.0.1 + ** @purpose 1:9, Ensure that the the IUT receives the message sent by mycompA + ** @verdict pass accept, ttcn3verdict:pass + ** @configuration port:broadcast + ***************************************************/ + +// Two component mycompA and B message exchange +module Sem_0901_Communication_ports_002{ + + type port myport message { + inout integer + } + + +type component Mysystem + { + timer t_rec,t_rec2; + port myport messagePort; + } +function fsend() runs on Mysystem { +messagePort.send(2); + t_rec2.start(20.0); + alt { + [] messagePort.receive(3) { + setverdict(pass); + } + [] messagePort.receive { + setverdict(fail); + } + [] t_rec2.timeout { + setverdict( inconc ); + } + } +t_rec2.stop; +} +function frec() runs on Mysystem { + t_rec.start( 20.0 ); + alt { + [] messagePort.receive(2) { + messagePort.send(3); + setverdict( pass ); + } + [] messagePort.receive { + setverdict( fail ); + } + [] t_rec.timeout { + setverdict( inconc ); + } + } +t_rec.stop; +} + +testcase TC_Sem_0901_Communication_ports_002() runs on Mysystem system Mysystem { + var Mysystem MyCompA; + var Mysystem MyCompB; + +MyCompA:=Mysystem.create; +MyCompB:=Mysystem.create; +connect(MyCompA:messagePort,MyCompB:messagePort); +connect(MyCompB:messagePort,MyCompA:messagePort); + + +MyCompB.start(frec()); +MyCompA.start(fsend()); + +//MyCompB.stop; +//MyCompA.stop; + + MyCompB.done; + MyCompA.done; + +} +control{ + execute(TC_Sem_0901_Communication_ports_002()); +} +} + diff --git a/ATS/core_language/09_test_configurations/0901_communication_ports/Sem_0901_Communication_ports_003.ttcn b/ATS/core_language/09_test_configurations/0901_communication_ports/Sem_0901_Communication_ports_003.ttcn new file mode 100644 index 00000000..98f207fc --- /dev/null +++ b/ATS/core_language/09_test_configurations/0901_communication_ports/Sem_0901_Communication_ports_003.ttcn @@ -0,0 +1,97 @@ +/*************************************************** + ** @author STF 451 + ** @version 0.0.1 + ** @purpose 1:9, Ensure that the the IUT receives the message sent by mycompB and mycompC + ** @verdict pass accept, ttcn3verdict:pass + ** @configuration port:broadcast + ***************************************************/ + +// 3 component message exchange +module Sem_0901_Communication_ports_003{ + + type port myport message { + inout integer + } + + +type component Mysystem + { + timer t_rec,t_rec2; + port myport messagePort; + } +function fsend() runs on Mysystem { + messagePort.send(2) to all component; + t_rec2.start(30.0); + alt { + [] messagePort.receive(3) { + setverdict(pass); + t_rec2.stop; + } + [] messagePort.receive { + setverdict(fail); + } + [] t_rec2.timeout { + setverdict( inconc ); + } + } +t_rec2.stop; +} +function frec() runs on Mysystem { + t_rec.start( 10.0 ); + alt { + [] messagePort.receive(2) { + messagePort.send(3); + setverdict( pass ); + } + [] messagePort.receive { + setverdict( fail ); + } + [] t_rec.timeout { + setverdict( inconc ); + } + } +t_rec.stop; +} + +testcase TC_Sem_0901_Communication_ports_003() runs on Mysystem system Mysystem { + var Mysystem MyCompA; + var Mysystem MyCompB; + var Mysystem MyCompC; + +MyCompA:=Mysystem.create; +MyCompB:=Mysystem.create; +MyCompC:=Mysystem.create; +connect(MyCompA:messagePort,MyCompB:messagePort); +connect(MyCompB:messagePort,MyCompA:messagePort); +connect(MyCompA:messagePort,MyCompC:messagePort); +connect(MyCompC:messagePort,MyCompA:messagePort); + + +MyCompB.start(frec()); +MyCompC.start(frec()); +MyCompA.start(fsend()); + +/* alt { + [] messagePort.receive(3) { + setverdict(pass); + } + [] messagePort.receive { + setverdict(fail); + } + }*/ + +// wait until all components finish +MyCompB.done; +MyCompC.done; +MyCompA.done; + +MyCompB.stop; +MyCompC.stop; +MyCompA.stop; + +} +control{ + execute(TC_Sem_0901_Communication_ports_003()); +} +} + diff --git a/ATS/core_language/09_test_configurations/0901_communication_ports/Sem_0901_Communication_ports_004.ttcn b/ATS/core_language/09_test_configurations/0901_communication_ports/Sem_0901_Communication_ports_004.ttcn new file mode 100644 index 00000000..87f9e036 --- /dev/null +++ b/ATS/core_language/09_test_configurations/0901_communication_ports/Sem_0901_Communication_ports_004.ttcn @@ -0,0 +1,41 @@ +/*************************************************** + ** @author STF 451 + ** @version 0.0.1 + ** @purpose 1:9, Ensure that the IUT correctly handles message exch. between ports + ** @verdict pass accept, ttcn3verdict:pass + ** @configuration port:broadcast + ***************************************************/ + +// GeneralComp has two ports. mess.portA sends a message to messageportB. +module Sem_0901_Communication_ports_004{ + + + type port IntegerPortType message { + inout integer + } + + +type component GeneralComp { + port IntegerPortType messagePortA,messagePortB +} + +testcase TC_Sem_0901_Communication_ports_004() runs on GeneralComp { + + + messagePortA.send(2); //can send also in-line template + + alt { + [] messagePortB.receive(2) { + setverdict(pass); + } + [] messagePortB.receive { + setverdict(fail); + } + } +} + +control{ + execute(TC_Sem_0901_Communication_ports_004()); +} + +} diff --git a/ATS/core_language/09_test_configurations/0901_communication_ports/Sem_0901_Communication_ports_005.ttcn b/ATS/core_language/09_test_configurations/0901_communication_ports/Sem_0901_Communication_ports_005.ttcn new file mode 100644 index 00000000..8fa6aa0d --- /dev/null +++ b/ATS/core_language/09_test_configurations/0901_communication_ports/Sem_0901_Communication_ports_005.ttcn @@ -0,0 +1,100 @@ +/*************************************************** + ** @author STF 451 + ** @version 0.0.1 + ** @purpose 1:9, Ensure that the the IUT receives the message sent by mycompA + ** @verdict pass accept, ttcn3verdict:pass + ** @configuration port:broadcast + ***************************************************/ + +//Mycomp A has two ports and MycompB has two ports. +module Sem_0901_Communication_ports_005{ + + type port myport message { + inout integer + } + + +type component Mysystem + { + timer t_rec,t_rec2; + port myport messagePort1,messagePort2; + } +function fsend() runs on Mysystem { +messagePort1.send(1); +messagePort2.send(2); + t_rec2.start(20.0); + alt { + [] messagePort1.receive(3) { + setverdict(pass); + } + [] messagePort1.receive { + setverdict(fail); + } + [] t_rec2.timeout { + setverdict( inconc ); + } + } + alt { + [] messagePort2.receive(4) { + setverdict(pass); + } + [] messagePort2.receive { + setverdict(fail); + } + [] t_rec2.timeout { + setverdict( inconc ); + } + } +t_rec2.stop; +} +function frec() runs on Mysystem { + t_rec.start( 20.0 ); + alt { + [] messagePort1.receive(1) { + messagePort1.send(3); + setverdict( pass ); + } + [] messagePort1.receive { + setverdict( fail ); + } + [] t_rec.timeout { + setverdict( inconc ); + } + } + alt { + [] messagePort2.receive(2) { + messagePort2.send(4); + setverdict( pass ); + } + [] messagePort2.receive { + setverdict( fail ); + } + [] t_rec.timeout { + setverdict( inconc ); + } + } +t_rec.stop; +} + +testcase TC_Sem_0901_Communication_ports_005() runs on Mysystem system Mysystem { + var Mysystem MyCompA; + var Mysystem MyCompB; + +MyCompA:=Mysystem.create; +MyCompB:=Mysystem.create; +connect(MyCompA:messagePort1,MyCompB:messagePort1); +connect(MyCompB:messagePort2,MyCompA:messagePort2); + + +MyCompB.start(frec()); +MyCompA.start(fsend()); + +// MyCompB.stop; +// MyCompA.stop; +MyCompB.done; +MyCompA.done; +} +control{ + execute(TC_Sem_0901_Communication_ports_005()); +} +} diff --git a/ATS/core_language/09_test_configurations/0901_communication_ports/Sem_0901_Communication_ports_006.ttcn b/ATS/core_language/09_test_configurations/0901_communication_ports/Sem_0901_Communication_ports_006.ttcn new file mode 100644 index 00000000..3d9a3b65 --- /dev/null +++ b/ATS/core_language/09_test_configurations/0901_communication_ports/Sem_0901_Communication_ports_006.ttcn @@ -0,0 +1,35 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:9.1, Verify that a port can connect to itself + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirements are tested: +// Figure 6: Allowed connections, connection scheme e) + +module Sem_0901_Communication_ports_006 { + + type port P message { + inout integer + } + + type component GeneralComp + { + port P p; + } + + testcase TC_Sem_0901_Communication_ports_006() runs on GeneralComp system GeneralComp { + connect(self:p, self:p); + if(p.checkstate("Connected")) { + setverdict(pass); + } else { + setverdict(fail); + } + } + + control{ + execute(TC_Sem_0901_Communication_ports_006()); + } +} + diff --git a/ATS/core_language/09_test_configurations/0901_communication_ports/Sem_0901_Communication_ports_007.ttcn b/ATS/core_language/09_test_configurations/0901_communication_ports/Sem_0901_Communication_ports_007.ttcn new file mode 100644 index 00000000..026b6eff --- /dev/null +++ b/ATS/core_language/09_test_configurations/0901_communication_ports/Sem_0901_Communication_ports_007.ttcn @@ -0,0 +1,35 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:9.1, Verify that a port can connect to another port of the same component + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirements are tested: +// Figure 6: Allowed connections, connection scheme f) + +module Sem_0901_Communication_ports_007 { + + type port P message { + inout integer + } + + type component GeneralComp + { + port P p1, p2; + } + + testcase TC_Sem_0901_Communication_ports_007() runs on GeneralComp system GeneralComp { + connect(self:p1, self:p2); + if(p1.checkstate("Connected")) { + setverdict(pass); + } else { + setverdict(fail); + } + } + + control{ + execute(TC_Sem_0901_Communication_ports_007()); + } +} + diff --git a/ATS/core_language/09_test_configurations/0901_communication_ports/Sem_0901_Communication_ports_008.ttcn b/ATS/core_language/09_test_configurations/0901_communication_ports/Sem_0901_Communication_ports_008.ttcn new file mode 100644 index 00000000..6aed9f85 --- /dev/null +++ b/ATS/core_language/09_test_configurations/0901_communication_ports/Sem_0901_Communication_ports_008.ttcn @@ -0,0 +1,48 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:9.1, Verify that more than one component port can mapped to a single system port + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirements are tested: +// Figure 6: Allowed connections, connection scheme h) + +module Sem_0901_Communication_ports_008 { + + type port P message { + inout integer + } + + type component GeneralComp + { + port P p; + } + + function checkMapped() runs on GeneralComp + { + if(p.checkstate("Mapped")) { + setverdict(pass); + } else { + setverdict(fail); + } + } + + testcase TC_Sem_0901_Communication_ports_007() runs on GeneralComp system GeneralComp { + // components are created alive so that their mappings are not destroyed when behaviour stops + var GeneralComp v_ptc1 := GeneralComp.create alive, + v_ptc2 := GeneralComp.create alive; + map(self:p, system:p); + map(v_ptc1:p, system:p); + map(v_ptc2:p, system:p); + v_ptc1.start(checkMapped()); + v_ptc2.start(checkMapped()); + checkMapped(); + all component.done; + } + + control{ + execute(TC_Sem_0901_Communication_ports_007()); + } +} + diff --git a/ATS/core_language/09_test_configurations/0901_communication_ports/Sem_0901_Communication_ports_009.ttcn b/ATS/core_language/09_test_configurations/0901_communication_ports/Sem_0901_Communication_ports_009.ttcn new file mode 100644 index 00000000..8a4668a0 --- /dev/null +++ b/ATS/core_language/09_test_configurations/0901_communication_ports/Sem_0901_Communication_ports_009.ttcn @@ -0,0 +1,49 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:9.1, Verify that a component port can be connected to two other component ports + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +/*NOTE: figure 6(g): A component port can be connected to two other component ports */ + +module Sem_0901_Communication_ports_009 { + + type port MyPort message { + inout integer + } + + type component GeneralComp + { + port MyPort p; + } + + function checkConnected() runs on GeneralComp + { + if(p.checkstate("Connected")) { + setverdict(pass,"Connected"); + } else { + setverdict(fail,"Not Connected"); + } + } + + testcase TC_Sem_0901_Communication_ports_009() runs on GeneralComp system GeneralComp { + +//creating 3 components: + var GeneralComp v_ptcA := GeneralComp.create; + var GeneralComp v_ptcB := GeneralComp.create; + var GeneralComp v_ptcC := GeneralComp.create; + + + connect(v_ptcA:p, v_ptcB:p); + connect(v_ptcA:p, v_ptcC:p); + + v_ptcB.start(checkConnected()); + v_ptcC.start(checkConnected()); + + } + + control{ + execute(TC_Sem_0901_Communication_ports_009()); + } +} \ No newline at end of file diff --git a/ATS/core_language/09_test_configurations/0901_communication_ports/Sem_0901_Communication_ports_010.ttcn b/ATS/core_language/09_test_configurations/0901_communication_ports/Sem_0901_Communication_ports_010.ttcn new file mode 100644 index 00000000..d46e01a4 --- /dev/null +++ b/ATS/core_language/09_test_configurations/0901_communication_ports/Sem_0901_Communication_ports_010.ttcn @@ -0,0 +1,44 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:9.1, Verify that a component port can be mapped to TSI port + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +/* NOTE: figure 6(b): Ensure that a component port can be mapped to a TSI port */ + +module Sem_0901_Communication_ports_010 { + + type port MyPort message { + inout integer + } + + type component GeneralComp + { + port MyPort p; + } + + type component MyCompA + { + port MyPort p; + } + + function checkMapped() runs on MyCompA + { + if(p.checkstate("Mapped")) { + setverdict(pass,"Mapped"); + } else { + setverdict(fail,"Not Mapped"); + } + } + + testcase TC_Sem_0901_Communication_ports_010() runs on MyCompA system GeneralComp { + + map(self:p,system:p); + checkMapped(); + } + + control{ + execute(TC_Sem_0901_Communication_ports_010()); + } +} \ No newline at end of file diff --git a/ATS/core_language/09_test_configurations/0901_communication_ports/Sem_0901_Communication_ports_011.ttcn b/ATS/core_language/09_test_configurations/0901_communication_ports/Sem_0901_Communication_ports_011.ttcn new file mode 100644 index 00000000..67a89dbd --- /dev/null +++ b/ATS/core_language/09_test_configurations/0901_communication_ports/Sem_0901_Communication_ports_011.ttcn @@ -0,0 +1,45 @@ +/*************************************************** + ** @author STF 478 + ** @version 0.0.1 + ** @purpose 1:9.1, Verify that a component ports can be mapped to TSI ports + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +/* NOTE: figure 6(d): Ensure that component ports can be mapped to a TSI ports */ + +module Sem_0901_Communication_ports_011 { + + type port MyPort message { + inout integer + } + + type component GeneralComp + { + port MyPort p1,p2; + } + + type component MyComp + { + port MyPort p1,p2; + } + function checkMapped() runs on MyComp + { + if(p1.checkstate("Mapped") and p2.checkstate("Mapped")) { + setverdict(pass,"Mapped"); + } else { + setverdict(fail,"Mapped"); + } + } + + testcase TC_Sem_0901_Communication_ports_011() runs on MyComp system GeneralComp { + + map(self:p1, system:p1); + map(self:p2, system:p2); + + checkMapped(); + } + + control{ + execute(TC_Sem_0901_Communication_ports_011()); + } +} \ No newline at end of file diff --git a/ATS/core_language/09_test_configurations/0902_test_system_interface/NegSem_0902_Communication_ports_001.ttcn b/ATS/core_language/09_test_configurations/0902_test_system_interface/NegSem_0902_Communication_ports_001.ttcn new file mode 100644 index 00000000..8c81983e --- /dev/null +++ b/ATS/core_language/09_test_configurations/0902_test_system_interface/NegSem_0902_Communication_ports_001.ttcn @@ -0,0 +1,38 @@ +/*************************************************** + ** @author STF 451 + ** @version 0.0.1 + ** @purpose 1:9, Ensure that the IUT correctly handles the assoc. of two port to the same system interface + ** @verdict pass reject + ***************************************************/ +//Two comp. ports are connected to the same system interface port (not allowed). +module NegSem_0902_Communication_ports_001{ + + type port loopbackPort message { + inout integer + } + + type port MyMessagePortType message { + inout integer + } + + +type component GeneralComp + { + port MyMessagePortType MycomportA, MycomportB + } + +type component MyTestSystemInterface + { + port loopbackPort messagePort + } +// MyTestSystemInterface is the test system interface +testcase TC_NegSem_0902_Communication_ports_001() runs on GeneralComp system MyTestSystemInterface { +// establishing the port connections +map(mtc:MycomportA, system:messagePort); +map(mtc:MycomportB, system:messagePort); // not allowed + +} +control{ + execute(TC_NegSem_0902_Communication_ports_001()); +} +} \ No newline at end of file diff --git a/ATS/core_language/09_test_configurations/0902_test_system_interface/NegSem_0902_Communication_ports_002.ttcn b/ATS/core_language/09_test_configurations/0902_test_system_interface/NegSem_0902_Communication_ports_002.ttcn new file mode 100644 index 00000000..f1bc3ed9 --- /dev/null +++ b/ATS/core_language/09_test_configurations/0902_test_system_interface/NegSem_0902_Communication_ports_002.ttcn @@ -0,0 +1,39 @@ +/*************************************************** + ** @author STF 451 + ** @version 0.0.1 + ** @purpose 1:9, Ensure that the mycomp is connected to two system interface port. + ** @verdict pass reject + ***************************************************/ + +//It is not allowed to connect one port connect to two system interface port. +module NegSem_0902_Communication_ports_002{ + + type port loopbackPort message { + inout integer + } + type port MyMessagePortType message { + inout integer + } + +type component GeneralComp + { + port MyMessagePortType Mycomport + } + +type component MyTestSystemInterface + { + port loopbackPort messagePortA,messagePortB + } +// MyTestSystemInterface is the test system interface +testcase TC_NegSem_0902_Communication_ports_002() runs on GeneralComp system MyTestSystemInterface { +// establishing the port connections +map(mtc:Mycomport, system:messagePortA); +map(mtc:Mycomport, system:messagePortB); // not allowed + +setverdict(fail); + +} +control{ + execute(TC_NegSem_0902_Communication_ports_002()); +} +} \ No newline at end of file diff --git a/ATS/core_language/09_test_configurations/0902_test_system_interface/NegSem_0902_Communication_ports_003.ttcn b/ATS/core_language/09_test_configurations/0902_test_system_interface/NegSem_0902_Communication_ports_003.ttcn new file mode 100644 index 00000000..d3b53373 --- /dev/null +++ b/ATS/core_language/09_test_configurations/0902_test_system_interface/NegSem_0902_Communication_ports_003.ttcn @@ -0,0 +1,30 @@ +/*************************************************** + ** @author STF 451 + ** @version 0.0.1 + ** @purpose 1:9, Ensure that the two system interf. port cannot connect + ** @verdict pass reject + ***************************************************/ + +//Two system interface ports are not allowed to connect +module NegSem_0902_Communication_ports_003{ + + type port loopbackPort message { + inout integer + } +type component MyTestSystemInterface + { + port loopbackPort messagePortA,messagePortB + } +// MyTestSystemInterface is the test system interface + +testcase TC_NegSem_0902_Communication_ports_003() runs on MyTestSystemInterface { +// establishing the port connections +map(system:messagePortA, system:messagePortB); // not allowed + +setverdict(fail); + +} +control{ + execute(TC_NegSem_0902_Communication_ports_003()); +} +} \ No newline at end of file diff --git a/ATS/core_language/09_test_configurations/0902_test_system_interface/NegSem_0902_Communication_ports_004.ttcn b/ATS/core_language/09_test_configurations/0902_test_system_interface/NegSem_0902_Communication_ports_004.ttcn new file mode 100644 index 00000000..495208ed --- /dev/null +++ b/ATS/core_language/09_test_configurations/0902_test_system_interface/NegSem_0902_Communication_ports_004.ttcn @@ -0,0 +1,38 @@ +/*************************************************** + ** @author STF 451 + ** @version 0.0.1 + ** @purpose 1:9, Ensure that the a connected port cannot be mapped + ** @verdict pass reject + ***************************************************/ + +// A connected port cannot be mapped with a system interface port +module NegSem_0902_Communication_ports_004{ + + type port loopbackPort message { + inout integer + } +type port IntegerOutputPortType message { + inout integer + } + + +type component MyTestSystemInterface + { + port IntegerOutputPortType messagePort + } +// MyTestSystemInterface is the test system interface +testcase TC_NegSem_0902_Communication_ports_004() runs on MyTestSystemInterface system MyTestSystemInterface { +// establishing the port connections + var MyTestSystemInterface MycompA; + var MyTestSystemInterface MycompB; +MycompA := MyTestSystemInterface.create; +MycompB := MyTestSystemInterface.create; + +connect(MycompA:messagePort,MycompB:messagePort); +map(MycompB:messagePort, system:messagePort); // not allowed this type of connection + +} +control{ + execute(TC_NegSem_0902_Communication_ports_004()); +} +} \ No newline at end of file diff --git a/ATS/core_language/09_test_configurations/0902_test_system_interface/Sem_0902_Communication_ports_001.ttcn b/ATS/core_language/09_test_configurations/0902_test_system_interface/Sem_0902_Communication_ports_001.ttcn new file mode 100644 index 00000000..1a3db5b4 --- /dev/null +++ b/ATS/core_language/09_test_configurations/0902_test_system_interface/Sem_0902_Communication_ports_001.ttcn @@ -0,0 +1,48 @@ +/*************************************************** + ** @author STF 451 + ** @version 0.0.1 + ** @purpose 1:9, Ensure that the IUT port correctly mapped with a system interface + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// Mycompport A is mapped with a system interface +module Sem_0902_Communication_ports_001{ + + type port loopbackPort message { + inout integer + } +type port IntegerOutputPortType message { + inout integer + } + +type component GeneralComp + { + + port IntegerOutputPortType MycomportA + } + +type component MyTestSystemInterface + { + port loopbackPort messagePort + } +// MyTestSystemInterface is the test system interface +testcase TC_Sem_0902_Communication_ports_001() runs on GeneralComp system MyTestSystemInterface { +// establishing the port connections +map(mtc:MycomportA, system:messagePort); + + + MycomportA.send(2); //can send also in-line template + + alt { + [] MycomportA.receive(2) { + setverdict(pass); + } + [] MycomportA.receive { + setverdict(fail); + } + } +} +control{ + execute(TC_Sem_0902_Communication_ports_001()); +} +} \ No newline at end of file diff --git a/ATS/core_language/09_test_configurations/0902_test_system_interface/Sem_0902_Communication_ports_002.ttcn b/ATS/core_language/09_test_configurations/0902_test_system_interface/Sem_0902_Communication_ports_002.ttcn new file mode 100644 index 00000000..c6f48d95 --- /dev/null +++ b/ATS/core_language/09_test_configurations/0902_test_system_interface/Sem_0902_Communication_ports_002.ttcn @@ -0,0 +1,57 @@ +/*************************************************** + ** @author STF 451 + ** @version 0.0.1 + ** @purpose 1:9, Ensure that the IUTs two ports are mapped correctly to system interfaces + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +//Two ports are mapped to two system interface +module Sem_0902_Communication_ports_002{ + + type port loopbackPort message { + inout integer + } + type port MyMessagePortType message { + inout integer + } + +type component GeneralComp +{ +var integer v_received1:=0; +var integer v_received2:=0; +port MyMessagePortType myPortA,myPortB +} + +type component MyTestSystemInterface + { + port loopbackPort messagePortA,messagePortB + } + +// MyTestSystemInterface is the test system interface +testcase TC_Sem_0902_Communication_ports_002() runs on GeneralComp system MyTestSystemInterface { +// establishing the port connections +map(mtc:myPortA, system:messagePortA); +map(mtc:myPortB, system:messagePortB); + + + myPortA.send(2); //can send also in-line template + myPortB.send(3); + + myPortA.receive(integer:?) -> value v_received1 ; + myPortB.receive(integer:?) -> value v_received2 ; + + if ((v_received1+v_received2)==5) + { + setverdict(pass); + } + else + { + setverdict(fail); + } +} + +control{ + execute(TC_Sem_0902_Communication_ports_002()); +} + +} diff --git a/ATS/core_language/09_test_configurations/0902_test_system_interface/Syn_0902_Communication_ports_001.ttcn b/ATS/core_language/09_test_configurations/0902_test_system_interface/Syn_0902_Communication_ports_001.ttcn new file mode 100644 index 00000000..7e2c440d --- /dev/null +++ b/ATS/core_language/09_test_configurations/0902_test_system_interface/Syn_0902_Communication_ports_001.ttcn @@ -0,0 +1,35 @@ +/*************************************************** + ** @author STF 451 + ** @version 0.0.1 + ** @purpose 1:9, Ensure that two component can be mapped by one system interface +** @verdict pass accept, noexecution + ***************************************************/ + //Two components are mapped to the same system interface +module Syn_0902_Communication_ports_001{ + + type port myPort message { + inout integer + } + + +type component MyTestSystemInterface + { + port myPort messagePort; + } + +// MyTestSystemInterface is the test system interface +testcase TC_Syn_0902_Communication_ports_001() runs on MyTestSystemInterface system MyTestSystemInterface { +// establishing the port connections + var MyTestSystemInterface MycompA; + var MyTestSystemInterface MycompB; +MycompA := MyTestSystemInterface.create; +MycompB := MyTestSystemInterface.create; + +map(MycompA:messagePort, system:messagePort); +map(MycompB:messagePort, system:messagePort); + +} +control{ + execute(TC_Syn_0902_Communication_ports_001()); +} +} \ No newline at end of file diff --git a/ATS/core_language/10_constants/NOTES b/ATS/core_language/10_constants/NOTES new file mode 100644 index 00000000..e293a841 --- /dev/null +++ b/ATS/core_language/10_constants/NOTES @@ -0,0 +1,3 @@ +- TODO: missing test for init with functions +- TODO: missing test for init with expressions +- TODO: missing test for init structured types with optional fields diff --git a/ATS/core_language/10_constants/NegSem_10_Constants_001.ttcn b/ATS/core_language/10_constants/NegSem_10_Constants_001.ttcn new file mode 100644 index 00000000..327fbc87 --- /dev/null +++ b/ATS/core_language/10_constants/NegSem_10_Constants_001.ttcn @@ -0,0 +1,23 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:10, Assign rnd to constant used in type, not allowed since constant expressions used in types have to be known at compile-time. + ** @verdict pass reject + ***************************************************/ +module NegSem_10_Constants_001 { + + const float c_i := rnd(314E-2); // not allowed by standard + type float MyFloat (c_i); + + type component GeneralComp {} + + testcase TC_NegSem_10_Constants_001() runs on GeneralComp { + var MyFloat v_f := c_i; + log(v_f); + setverdict(pass); + } + + control{ + execute(TC_NegSem_10_Constants_001()); + } +} \ No newline at end of file diff --git a/ATS/core_language/10_constants/NegSem_10_Constants_002.ttcn b/ATS/core_language/10_constants/NegSem_10_Constants_002.ttcn new file mode 100644 index 00000000..79a20dbf --- /dev/null +++ b/ATS/core_language/10_constants/NegSem_10_Constants_002.ttcn @@ -0,0 +1,21 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:10, A value is assigned only once to a constant + ** @verdict pass reject + ***************************************************/ +module NegSem_10_Constants_002 { + + const float c_i := 3.14; + + + type component GeneralComp {} + + testcase TC_NegSem_10_Constants_002() runs on GeneralComp { + c_i := 3.15; //error because value is assigned only once to the constant + } + + control{ + execute(TC_NegSem_10_Constants_002()); + } +} \ No newline at end of file diff --git a/ATS/core_language/10_constants/NegSem_10_Constants_003.ttcn b/ATS/core_language/10_constants/NegSem_10_Constants_003.ttcn new file mode 100644 index 00000000..769e1bc0 --- /dev/null +++ b/ATS/core_language/10_constants/NegSem_10_Constants_003.ttcn @@ -0,0 +1,26 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:10, Constant shall not be of port type + ** @verdict pass reject + ***************************************************/ +module NegSem_10_Constants_003 { + + //only for negSyn constant shall not be of port type + type port MyMessagePortType message + { + inout integer + } + + + type component GeneralComp { + } + + testcase TC_NegSem_10_Constants_003() runs on GeneralComp { + const MyMessagePortType c_port:= 5;//error - constant shall not be of port type + }//end testcase + + control{ + execute(TC_NegSem_10_Constants_003()); + } +} \ No newline at end of file diff --git a/ATS/core_language/10_constants/NegSem_10_Constants_004.ttcn b/ATS/core_language/10_constants/NegSem_10_Constants_004.ttcn new file mode 100644 index 00000000..1ecc74ed --- /dev/null +++ b/ATS/core_language/10_constants/NegSem_10_Constants_004.ttcn @@ -0,0 +1,39 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:10, Ensure that dot notation of a field in a record, which actual value is null shall cause an error + ** @verdict pass reject + ***************************************************/ + +/* The following requirements are tested: +Using the dot notation and index notation for referencing a field, alternative or element of an address value, which actual value is null shall cause an +error. +*/ + +module NegSem_10_Constants_004 { + + type integer address; + type record MyRecordType + { + address field1, + integer field2 optional + }; + + type component GeneralComp { + } + + testcase TC_NegSem_10_Constants_004() runs on GeneralComp { + + var MyRecordType R1:= {field1 := null, + field2 := 2}; + + const integer C1 := R1.field1; //error + + if (match(C1, R1.field1)) { setverdict(pass,"match") } + else { setverdict(fail) } + } + + control{ + execute(TC_NegSem_10_Constants_004()); + } +} diff --git a/ATS/core_language/10_constants/NegSem_10_Constants_005.ttcn b/ATS/core_language/10_constants/NegSem_10_Constants_005.ttcn new file mode 100644 index 00000000..895791b1 --- /dev/null +++ b/ATS/core_language/10_constants/NegSem_10_Constants_005.ttcn @@ -0,0 +1,37 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:10, Ensure that index notation of a field in a set of type, which actual value is null shall cause an error + ** @verdict pass reject + ***************************************************/ + +/* The following requirements are tested: +Using the dot notation and index notation for referencing a field, alternative or element of an address value, which actual value is null shall cause an +error. +*/ + +module NegSem_10_Constants_005 { + + type integer address; + type default MyDef; + type set of address MySetofInt; + + type component GeneralComp { + } + + testcase TC_NegSem_10_Constants_005() runs on GeneralComp { + + var MySetofInt R1:= {[0] := null}; + var MyDef R2:= null; + + const default C2 := R2; //allowed + const integer C1 := R1[0]; //error + + if (match(C1,R1[0])) { setverdict(pass,"match") } + else { setverdict(fail) } + } + + control{ + execute(TC_NegSem_10_Constants_005()); + } +} diff --git a/ATS/core_language/10_constants/Sem_10_Constants_001.ttcn b/ATS/core_language/10_constants/Sem_10_Constants_001.ttcn new file mode 100644 index 00000000..dd47b266 --- /dev/null +++ b/ATS/core_language/10_constants/Sem_10_Constants_001.ttcn @@ -0,0 +1,27 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:10, Assign and read constants + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Sem_10_Constants_001 { + + const integer c_i := 5; + + type component GeneralComp {} + + testcase TC_Sem_10_Constants_001() runs on GeneralComp { + const integer c_j := 5; + + if (c_i == c_j){ + setverdict(pass); + } + else { + setverdict(fail); + } + } + + control{ + execute(TC_Sem_10_Constants_001()); + } +} \ No newline at end of file diff --git a/ATS/core_language/10_constants/Sem_10_Constants_002.ttcn b/ATS/core_language/10_constants/Sem_10_Constants_002.ttcn new file mode 100644 index 00000000..dcfc3d76 --- /dev/null +++ b/ATS/core_language/10_constants/Sem_10_Constants_002.ttcn @@ -0,0 +1,27 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:10, Assign and read constants values + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Sem_10_Constants_002 { + + const integer c_ai[3] := {1, 3, 5}; + + type component GeneralComp {} + + testcase TC_Sem_10_Constants_002() runs on GeneralComp { + const integer c_j := 5; + + if (c_ai[2] == c_j){ + setverdict(pass); + } + else { + setverdict(fail); + } + } + + control{ + execute(TC_Sem_10_Constants_002()); + } +} \ No newline at end of file diff --git a/ATS/core_language/10_constants/Sem_10_Constants_003.ttcn b/ATS/core_language/10_constants/Sem_10_Constants_003.ttcn new file mode 100644 index 00000000..01c330f8 --- /dev/null +++ b/ATS/core_language/10_constants/Sem_10_Constants_003.ttcn @@ -0,0 +1,30 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:10, Single expression and constant values + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Sem_10_Constants_003 { + + const float c_p :=3.0; + const float c_i :=0.14; + + type component GeneralComp { + } + + testcase TC_Sem_10_Constants_003() runs on GeneralComp { + + const float c_pi := (c_p+c_i); + + if (c_pi == 3.14){ + setverdict(pass); + } + else { + setverdict(fail); + } + }//end testcase + + control{ + execute(TC_Sem_10_Constants_003()); + } +} \ No newline at end of file diff --git a/ATS/core_language/10_constants/Sem_10_Constants_004.ttcn b/ATS/core_language/10_constants/Sem_10_Constants_004.ttcn new file mode 100644 index 00000000..80734c92 --- /dev/null +++ b/ATS/core_language/10_constants/Sem_10_Constants_004.ttcn @@ -0,0 +1,38 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:10, Constant used within invoke function with return + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Sem_10_Constants_004 { + + type component GeneralComp { + } + //2 + function f_Sem_10_Constants_004(integer p_int) runs on GeneralComp return integer{ + const integer c_i := 2; + if(p_int==0) + { + return c_i; + } + else + { + return 0; + } + } + + testcase TC_Sem_10_Constants_004() runs on GeneralComp { + const integer c_int := 2; + if (f_Sem_10_Constants_004(0)==c_int) + { + setverdict(pass); + } + else { + setverdict(fail); + } + } //end testcase + + control{ + execute(TC_Sem_10_Constants_004()); + } +} \ No newline at end of file diff --git a/ATS/core_language/10_constants/Sem_10_Constants_005.ttcn b/ATS/core_language/10_constants/Sem_10_Constants_005.ttcn new file mode 100644 index 00000000..0f37aad3 --- /dev/null +++ b/ATS/core_language/10_constants/Sem_10_Constants_005.ttcn @@ -0,0 +1,28 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:10, Constant used within predefined function + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Sem_10_Constants_005 { + + type component GeneralComp { + } + + testcase TC_Sem_10_Constants_005() runs on GeneralComp { + + const integer c_j := 5; + const charstring c_str_j := int2str(c_j); + + if (c_str_j=="5"){ + setverdict(pass); + } + else { + setverdict(fail); + } + }//end testcase + + control{ + execute(TC_Sem_10_Constants_005()); + } +} \ No newline at end of file diff --git a/ATS/core_language/10_constants/Sem_10_Constants_006.ttcn b/ATS/core_language/10_constants/Sem_10_Constants_006.ttcn new file mode 100644 index 00000000..98a325da --- /dev/null +++ b/ATS/core_language/10_constants/Sem_10_Constants_006.ttcn @@ -0,0 +1,37 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:10, Record type used as a constant + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Sem_10_Constants_006 { + + type record MyRecordType + { + bitstring field1, + boolean field2, + charstring field3 + }; + + type component GeneralComp { + } + + testcase TC_Sem_10_Constants_006() runs on GeneralComp { + const MyRecordType c_mRT1 := {'1010'B,true,"string"}; + const MyRecordType c_mRT2 := {field1 := '1010'B, + field2 := true, + field3 := "string"}; + + if (c_mRT1==c_mRT2) + { + setverdict(pass); + } + else { + setverdict(fail); + } + }// end testcase + + control{ + execute(TC_Sem_10_Constants_006()); + } +} \ No newline at end of file diff --git a/ATS/core_language/10_constants/Sem_10_Constants_007.ttcn b/ATS/core_language/10_constants/Sem_10_Constants_007.ttcn new file mode 100644 index 00000000..ef4accae --- /dev/null +++ b/ATS/core_language/10_constants/Sem_10_Constants_007.ttcn @@ -0,0 +1,39 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:10, Record type used as a constant with optional fields + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Sem_10_Constants_007 { + + type record MyRecordType + { + bitstring field1, + boolean field2 optional, + charstring field3 optional + + }; + + type component GeneralComp { + } + + testcase TC_Sem_10_Constants_007() runs on GeneralComp { + const MyRecordType c_mRT3 := {field1 := '1010'B, + field2 := -, + field3 := -}; + + if (not isbound(c_mRT3.field2) and + not isbound(c_mRT3.field3) and + match(c_mRT3.field1, '1010'B)) + { + setverdict(pass); + } + else { + setverdict(fail); + } + } + + control{ + execute(TC_Sem_10_Constants_007()); + } +} \ No newline at end of file diff --git a/ATS/core_language/10_constants/Sem_10_Constants_008.ttcn b/ATS/core_language/10_constants/Sem_10_Constants_008.ttcn new file mode 100644 index 00000000..297dba39 --- /dev/null +++ b/ATS/core_language/10_constants/Sem_10_Constants_008.ttcn @@ -0,0 +1,37 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:10, Set type used as a constant + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Sem_10_Constants_008 { + + type set MySetType + { + bitstring field1, + boolean field2, + charstring field3 + }; + + type component GeneralComp { + } + + testcase TC_Sem_10_Constants_008() runs on GeneralComp { + const MySetType c_mST1 := {'1010'B,true,"string"}; + const MySetType c_mST2 := {field1 := '1010'B, + field2 := true, + field3 := "string"}; + + if (c_mST1==c_mST2) + { + setverdict(pass); + } + else { + setverdict(fail); + } + }// end testcase + + control{ + execute(TC_Sem_10_Constants_008()); + } +} \ No newline at end of file diff --git a/ATS/core_language/10_constants/Sem_10_Constants_009.ttcn b/ATS/core_language/10_constants/Sem_10_Constants_009.ttcn new file mode 100644 index 00000000..d741f7c9 --- /dev/null +++ b/ATS/core_language/10_constants/Sem_10_Constants_009.ttcn @@ -0,0 +1,39 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:10, Set type used as a constant with optional fields + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Sem_10_Constants_009 { + + type record MySetType + { + bitstring field1, + boolean field2 optional, + charstring field3 optional + + }; + + type component GeneralComp { + } + + testcase TC_Sem_10_Constants_009() runs on GeneralComp { + const MySetType c_mST3 := {field1 := '1010'B, + field2 := -, + field3 := -}; + + if (not isbound(c_mST3.field2) and + not isbound(c_mST3.field3) and + match(c_mST3.field1, '1010'B)) + { + setverdict(pass); + } + else { + setverdict(fail); + } + } + + control{ + execute(TC_Sem_10_Constants_009()); + } +} \ No newline at end of file diff --git a/ATS/core_language/10_constants/Syn_10_Constants_001.ttcn b/ATS/core_language/10_constants/Syn_10_Constants_001.ttcn new file mode 100644 index 00000000..dd9acae1 --- /dev/null +++ b/ATS/core_language/10_constants/Syn_10_Constants_001.ttcn @@ -0,0 +1,12 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:10, Create constants + ** @verdict pass accept, noexecution + ***************************************************/ +module Syn_10_Constants_001 { + const integer c_i1 := 5, c_i2 := 3; + const float c_f := 3.14E-4; + const boolean c_b := true, c_b2 := false; + const bitstring c_bs := '1011'B; +} \ No newline at end of file diff --git a/ATS/core_language/10_constants/Syn_10_Constants_002.ttcn b/ATS/core_language/10_constants/Syn_10_Constants_002.ttcn new file mode 100644 index 00000000..cf62e4f6 --- /dev/null +++ b/ATS/core_language/10_constants/Syn_10_Constants_002.ttcn @@ -0,0 +1,9 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:10, Assign default constants values + ** @verdict pass accept, noexecution + ***************************************************/ +module Syn_10_Constants_002 { + const default c_d := null; +} \ No newline at end of file diff --git a/ATS/core_language/10_constants/Syn_10_Constants_003.ttcn b/ATS/core_language/10_constants/Syn_10_Constants_003.ttcn new file mode 100644 index 00000000..f12665f6 --- /dev/null +++ b/ATS/core_language/10_constants/Syn_10_Constants_003.ttcn @@ -0,0 +1,11 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:10, Assign component constants values + ** @verdict pass accept, noexecution + ***************************************************/ +module Syn_10_Constants_003 { + type component GeneralComp {} + + const GeneralComp c_c := null; +} \ No newline at end of file diff --git a/ATS/core_language/10_constants/Syn_10_Constants_004.ttcn b/ATS/core_language/10_constants/Syn_10_Constants_004.ttcn new file mode 100644 index 00000000..05eac7e9 --- /dev/null +++ b/ATS/core_language/10_constants/Syn_10_Constants_004.ttcn @@ -0,0 +1,33 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:10, Define constants in different scopes + ** @verdict pass accept, noexecution + ***************************************************/ +module Syn_10_Constants_004 { + type component GeneralComp { + timer t; + const integer cv_i1 := 10; + } + + const integer c_i1 := 5; + + altstep a_Syn_10_Constants_004() runs on GeneralComp { + const integer cl_j := 12; + [] t.timeout { + const integer cl_k := 13; + } + } + + function f_Syn_10_Constants_004() runs on GeneralComp { + const integer cl_i := 2; + } + + testcase TC_Syn_10_Constants_004() runs on GeneralComp { + const integer cl_i := 3; + } + + control { + const integer cl_i := 1; + } +} \ No newline at end of file diff --git a/ATS/core_language/11_variables/1101_value_variables/NOTES b/ATS/core_language/11_variables/1101_value_variables/NOTES new file mode 100644 index 00000000..d88dd440 --- /dev/null +++ b/ATS/core_language/11_variables/1101_value_variables/NOTES @@ -0,0 +1,4 @@ +- TODO: other types as integer are used +- TODO: init with functions +- TODO: init with expressions +- TODO: init structured types with optional fields diff --git a/ATS/core_language/11_variables/1101_value_variables/NegSem_1101_ValueVars_001.ttcn b/ATS/core_language/11_variables/1101_value_variables/NegSem_1101_ValueVars_001.ttcn new file mode 100644 index 00000000..8445484a --- /dev/null +++ b/ATS/core_language/11_variables/1101_value_variables/NegSem_1101_ValueVars_001.ttcn @@ -0,0 +1,18 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:11.1, Variables should be assigned only by values + ** @verdict pass reject + ***************************************************/ +module NegSem_1101_ValueVars_001 { + type component GeneralComp {} + + testcase TC_NegSem_1101_ValueVars_001() runs on GeneralComp { + var integer v_i := ?; // ? is not a value + setverdict(pass); + } + + control { + execute(TC_NegSem_1101_ValueVars_001()); + } +} \ No newline at end of file diff --git a/ATS/core_language/11_variables/1101_value_variables/NegSem_1101_ValueVars_002.ttcn b/ATS/core_language/11_variables/1101_value_variables/NegSem_1101_ValueVars_002.ttcn new file mode 100644 index 00000000..a0c9f766 --- /dev/null +++ b/ATS/core_language/11_variables/1101_value_variables/NegSem_1101_ValueVars_002.ttcn @@ -0,0 +1,33 @@ +/***************************************************************** + ** @author STF 451 + ** @version 0.0.1 + ** @purpose 1:11.1, Ensure that partially initialized variables are evaluated correctly. + ** @verdict pass reject + *****************************************************************/ + +module NegSem_1101_ValueVars_002 { + +type component GeneralComp { +} + + type set IntegerSet { + integer a1 optional, + integer a2 optional, + integer a3 optional + }; + +testcase TC_NegSem_1101_ValueVars_002() runs on GeneralComp { + var IntegerSet v_set := {a1:=1,a2:=omit}; + + if ( v_set == {a1:=1,a2:=omit,a3:=3} ) { //attempted use of partially initialized variable + setverdict(pass); + } else { + setverdict(fail); + } +} + +control{ + execute(TC_NegSem_1101_ValueVars_002()); +} + +} diff --git a/ATS/core_language/11_variables/1101_value_variables/NegSem_1101_ValueVars_003.ttcn b/ATS/core_language/11_variables/1101_value_variables/NegSem_1101_ValueVars_003.ttcn new file mode 100644 index 00000000..db3dae91 --- /dev/null +++ b/ATS/core_language/11_variables/1101_value_variables/NegSem_1101_ValueVars_003.ttcn @@ -0,0 +1,41 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:11.1, Ensure that dot notation referencing to a field, which actual value is null shall cause an error. + ** @verdict pass reject + *****************************************************************/ + +/* The following requirements are tested: +Restriction h. : Using the dot notation and index notation for referencing a field, alternative or element of an address value, which actual value is null shall cause an +error. +*/ + +module NegSem_1101_ValueVars_003 { + +type component GeneralComp { +} + + type integer address; + type record MyRecordType + { + address field1, + integer field2 optional + }; + + +testcase TC_NegSem_1101_ValueVars_003() runs on GeneralComp { + var MyRecordType R1:= {field1 := null, + field2 := -}; + + var integer Myvar := R1.field1; //error + + if (match(Myvar, R1.field1)) { setverdict(pass,"match") } + else { setverdict(fail) } + } + + +control{ + execute(TC_NegSem_1101_ValueVars_003()); +} + +} diff --git a/ATS/core_language/11_variables/1101_value_variables/NegSem_1101_ValueVars_004.ttcn b/ATS/core_language/11_variables/1101_value_variables/NegSem_1101_ValueVars_004.ttcn new file mode 100644 index 00000000..82ea722a --- /dev/null +++ b/ATS/core_language/11_variables/1101_value_variables/NegSem_1101_ValueVars_004.ttcn @@ -0,0 +1,36 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:11.1, Ensure that index notation referencing to a "set of", which actual value is null shall cause an error. + ** @verdict pass reject + *****************************************************************/ + +/* The following requirements are tested: +Restriction h. : Using the dot notation and index notation for referencing a field, alternative or element of an address value, which actual value is null shall cause an +error. +*/ + +module NegSem_1101_ValueVars_004 { + +type component GeneralComp { +} + + type integer address; + type set of address MySetofInt; + +testcase TC_NegSem_1101_ValueVars_004() runs on GeneralComp { + + var MySetofInt R1:= {[0] := null}; + + var integer Myvar := R1[0]; //error + + if (match(Myvar,R1[0])) { setverdict(pass,"match") } + else { setverdict(fail) } + } + + +control{ + execute(TC_NegSem_1101_ValueVars_004()); +} + +} diff --git a/ATS/core_language/11_variables/1101_value_variables/NegSem_1101_ValueVars_005.ttcn b/ATS/core_language/11_variables/1101_value_variables/NegSem_1101_ValueVars_005.ttcn new file mode 100644 index 00000000..d64eb087 --- /dev/null +++ b/ATS/core_language/11_variables/1101_value_variables/NegSem_1101_ValueVars_005.ttcn @@ -0,0 +1,23 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:11.1, Variables should be assigned only by values + ** @verdict pass reject + ***************************************************/ + +// The expression shall evaluate to a value, which is at least partially initialized. + +module NegSem_1101_ValueVars_005 { + type component GeneralComp {} + + testcase TC_NegSem_1101_ValueVars_005() runs on GeneralComp { + var integer v_i; + var integer v_j := v_i + 2; // error: v_i is uninitialized + + setverdict(pass); + } + + control { + execute(TC_NegSem_1101_ValueVars_005()); + } +} \ No newline at end of file diff --git a/ATS/core_language/11_variables/1101_value_variables/NegSyn_1101_ValueVars_001.ttcn b/ATS/core_language/11_variables/1101_value_variables/NegSyn_1101_ValueVars_001.ttcn new file mode 100644 index 00000000..cbf0a88e --- /dev/null +++ b/ATS/core_language/11_variables/1101_value_variables/NegSyn_1101_ValueVars_001.ttcn @@ -0,0 +1,9 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:11.1, Define variables in module scope + ** @verdict pass reject + ***************************************************/ +module NegSyn_1101_ValueVars_001 { + var integer v_i1 := 5; +} \ No newline at end of file diff --git a/ATS/core_language/11_variables/1101_value_variables/Sem_1101_ValueVars_001.ttcn b/ATS/core_language/11_variables/1101_value_variables/Sem_1101_ValueVars_001.ttcn new file mode 100644 index 00000000..adcf1243 --- /dev/null +++ b/ATS/core_language/11_variables/1101_value_variables/Sem_1101_ValueVars_001.ttcn @@ -0,0 +1,40 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:11.1, Define variables in different scopes + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Sem_1101_ValueVars_001 { + type component GeneralComp { + timer t; + var integer vc_i1 := 10; + } + + altstep a_Sem_1101_ValueVars_001() runs on GeneralComp { + var integer v_j := 12; + [] t.timeout { + var integer v_k := 13; + } + } + + function f_Sem_1101_ValueVars_001() runs on GeneralComp { + var integer v_i := 2; + } + + testcase TC_Sem_1101_ValueVars_001() runs on GeneralComp { + var integer v_i := 3; + f_Sem_1101_ValueVars_001(); + + t.start(1.0); + alt { + [] a_Sem_1101_ValueVars_001(); + } + + setverdict(pass); + } + + control { + var integer v_i := 1; + execute(TC_Sem_1101_ValueVars_001()); + } +} \ No newline at end of file diff --git a/ATS/core_language/11_variables/1101_value_variables/Sem_1101_ValueVars_002.ttcn b/ATS/core_language/11_variables/1101_value_variables/Sem_1101_ValueVars_002.ttcn new file mode 100644 index 00000000..6c4b7cb2 --- /dev/null +++ b/ATS/core_language/11_variables/1101_value_variables/Sem_1101_ValueVars_002.ttcn @@ -0,0 +1,30 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:11.1, Define variables in different scopes + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Sem_1101_ValueVars_002 { + type component GeneralComp {} + + testcase TC_Sem_1101_ValueVars_002() runs on GeneralComp { + var boolean v_b := true; + if (v_b){ + setverdict(pass); + } + else { + setverdict(fail); + } + v_b := false; + if (not v_b){ + setverdict(pass); + } + else { + setverdict(fail); + } + } + + control { + execute(TC_Sem_1101_ValueVars_002()); + } +} \ No newline at end of file diff --git a/ATS/core_language/11_variables/1101_value_variables/Sem_1101_ValueVars_003.ttcn b/ATS/core_language/11_variables/1101_value_variables/Sem_1101_ValueVars_003.ttcn new file mode 100644 index 00000000..4d929ffa --- /dev/null +++ b/ATS/core_language/11_variables/1101_value_variables/Sem_1101_ValueVars_003.ttcn @@ -0,0 +1,29 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:11.1, Read and write variables + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Sem_1101_ValueVars_003 { + type component GeneralComp { + timer t; + var integer vc_ai[3] := {1, 3, 5}; + } + + testcase TC_Sem_1101_ValueVars_003() runs on GeneralComp { + var integer v_i := 3; + v_i := 5; + vc_ai[1] := 5; + + if (vc_ai[1] == v_i){ + setverdict(pass); + } + else { + setverdict(fail); + } + } + + control { + execute(TC_Sem_1101_ValueVars_003()); + } +} \ No newline at end of file diff --git a/ATS/core_language/11_variables/1101_value_variables/Sem_1101_ValueVars_004.ttcn b/ATS/core_language/11_variables/1101_value_variables/Sem_1101_ValueVars_004.ttcn new file mode 100644 index 00000000..69c66ae1 --- /dev/null +++ b/ATS/core_language/11_variables/1101_value_variables/Sem_1101_ValueVars_004.ttcn @@ -0,0 +1,34 @@ +/***************************************************************** + ** @author STF 451 + ** @version 0.0.1 + ** @purpose 1:11.1, Ensure that partially initialized variables are evaluated correctly. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_1101_ValueVars_004 { + +type component GeneralComp { +} + + type set IntegerSet { + integer a1 optional, + integer a2 optional, + integer a3 optional + }; + +testcase TC_Sem_1101_ValueVars_004() runs on GeneralComp { + var IntegerSet v_set := {a1:=1,a2:=omit}; + v_set.a3 := 3; + + if ( match(v_set, {a1:=1,a2:=omit,a3:=3}) ) { + setverdict(pass); + } else { + setverdict(fail); + } +} + +control{ + execute(TC_Sem_1101_ValueVars_004()); +} + +} diff --git a/ATS/core_language/11_variables/1101_value_variables/Sem_1101_ValueVars_005.ttcn b/ATS/core_language/11_variables/1101_value_variables/Sem_1101_ValueVars_005.ttcn new file mode 100644 index 00000000..1949a027 --- /dev/null +++ b/ATS/core_language/11_variables/1101_value_variables/Sem_1101_ValueVars_005.ttcn @@ -0,0 +1,38 @@ +/***************************************************************** + ** @author STF 451 + ** @version 0.0.1 + ** @purpose 1:11.1, Ensure that partially initialized variables are evaluated correctly. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_1101_ValueVars_005 { + +type component GeneralComp { +} + + type set IntegerSet { + integer a1 optional, + integer a2 optional, + integer a3 optional + }; + +function f_partial () runs on GeneralComp return IntegerSet { + return {a1:=1,a2:=omit}; +} + +testcase TC_Sem_1101_ValueVars_005() runs on GeneralComp { + var IntegerSet v_set := f_partial(); + v_set.a3 := 3; + + if ( match(v_set, {a1:=1,a2:=omit,a3:=3}) ) { + setverdict(pass); + } else { + setverdict(fail); + } +} + +control{ + execute(TC_Sem_1101_ValueVars_005()); +} + +} diff --git a/ATS/core_language/11_variables/1101_value_variables/Sem_1101_ValueVars_006.ttcn b/ATS/core_language/11_variables/1101_value_variables/Sem_1101_ValueVars_006.ttcn new file mode 100644 index 00000000..b8c4bd3e --- /dev/null +++ b/ATS/core_language/11_variables/1101_value_variables/Sem_1101_ValueVars_006.ttcn @@ -0,0 +1,31 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:11.1, Variables should be assigned only by values + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +//formerly: NegSem_1101_ValueVars_006 + +module Sem_1101_ValueVars_006 { + type component GeneralComp {} + + testcase TC_Sem_1101_ValueVars_006() runs on GeneralComp { + var integer v_i := 1; + var @lazy integer v_j := v_i + 2; + + v_i := v_j; + if(v_i == 3){ + setverdict(pass); + } + else{ + setverdict(fail); + } + + + } + + control { + execute(TC_Sem_1101_ValueVars_006()); + } +} \ No newline at end of file diff --git a/ATS/core_language/11_variables/1101_value_variables/Syn_1101_ValueVars_001.ttcn b/ATS/core_language/11_variables/1101_value_variables/Syn_1101_ValueVars_001.ttcn new file mode 100644 index 00000000..e50d3211 --- /dev/null +++ b/ATS/core_language/11_variables/1101_value_variables/Syn_1101_ValueVars_001.ttcn @@ -0,0 +1,30 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:11.1, Define variables in different scopes + ** @verdict pass accept, noexecution + ***************************************************/ +module Syn_1101_ValueVars_001 { + type component GeneralComp { + var integer vc_i1 := 10; + } + + altstep a_Syn_1101_ValueVars_001() runs on GeneralComp { + var integer v_j := 12; + [] any timer.timeout { + var integer v_k := 13; + } + } + + function f_Syn_1101_ValueVars_001() runs on GeneralComp { + var integer v_i := 2; + } + + testcase TC_Syn_1101_ValueVars_001() runs on GeneralComp { + var integer v_i := 3; + } + + control { + var integer v_i := 1; + } +} \ No newline at end of file diff --git a/ATS/core_language/11_variables/1102_template_variables/NOTES b/ATS/core_language/11_variables/1102_template_variables/NOTES new file mode 100644 index 00000000..b3161e54 --- /dev/null +++ b/ATS/core_language/11_variables/1102_template_variables/NOTES @@ -0,0 +1,4 @@ +- TODO: use other types as integer +- TODO: init with functions +- TODO: init with expressions +- TODO: init structured types with optional fields diff --git a/ATS/core_language/11_variables/1102_template_variables/NegSem_1102_TemplateVars_001.ttcn b/ATS/core_language/11_variables/1102_template_variables/NegSem_1102_TemplateVars_001.ttcn new file mode 100644 index 00000000..c5a56764 --- /dev/null +++ b/ATS/core_language/11_variables/1102_template_variables/NegSem_1102_TemplateVars_001.ttcn @@ -0,0 +1,20 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:11.2, Template variables should be assigned with unitialized variables + ** @verdict pass reject + ***************************************************/ +module NegSem_1102_TemplateVars_001 { + type component GeneralComp {} + + testcase TC_NegSem_1102_TemplateVars_001() runs on GeneralComp { + var template integer v_i1; + var template integer v_i2 := v_i1; // v_i1 is not initialized + + setverdict(pass); + } + + control { + execute(TC_NegSem_1102_TemplateVars_001()); + } +} \ No newline at end of file diff --git a/ATS/core_language/11_variables/1102_template_variables/NegSem_1102_TemplateVars_002.ttcn b/ATS/core_language/11_variables/1102_template_variables/NegSem_1102_TemplateVars_002.ttcn new file mode 100644 index 00000000..381bf304 --- /dev/null +++ b/ATS/core_language/11_variables/1102_template_variables/NegSem_1102_TemplateVars_002.ttcn @@ -0,0 +1,46 @@ +/***************************************************************** + ** @author STF 451 + ** @version 0.0.1 + ** @purpose 1:11.2, Ensure that partially initialized templates are evaluated correctly. + ** @verdict pass reject + *****************************************************************/ + +module NegSem_1102_TemplateVars_002 { + + type set IntegerSet { + integer a1 optional, + integer a2 optional, + integer a3 optional + }; + + type port loopbackPort message { + inout IntegerSet + } + + +type component GeneralComp { + port loopbackPort messagePort +} + +testcase TC_NegSem_1102_TemplateVars_002() runs on GeneralComp { + var template IntegerSet mw_pattern := {a1:=1,a2:=*}; + var IntegerSet v_set := {a1:=1,a2:=2,a3:=3} + + messagePort.send(v_set); + + alt { + [] messagePort.receive(mw_pattern) { //attempted matching of partially initialized template + setverdict(pass); + } + [] messagePort.receive { + setverdict(fail); + } + } + +} + +control{ + execute(TC_NegSem_1102_TemplateVars_002()); +} + +} diff --git a/ATS/core_language/11_variables/1102_template_variables/NegSem_1102_TemplateVars_003.ttcn b/ATS/core_language/11_variables/1102_template_variables/NegSem_1102_TemplateVars_003.ttcn new file mode 100644 index 00000000..511e62c7 --- /dev/null +++ b/ATS/core_language/11_variables/1102_template_variables/NegSem_1102_TemplateVars_003.ttcn @@ -0,0 +1,55 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:11.2, Ensure that dot notation referencing to a field, which actual value is null shall cause an error. + ** @verdict pass reject + *****************************************************************/ + +/* The following requirements are tested: +Restriction k.: Using the dot notation and index notation for referencing a field, alternative or element of an address value, which actual value is null shall cause an +error. +*/ + + +module NegSem_1102_TemplateVars_003 { + + type integer address; + type record MyRecordType + { + address field1, + integer field2 optional + }; + + type port loopbackPort message { + inout integer, address + } + + type component GeneralComp { + port loopbackPort messagePort + } + + + +testcase TC_NegSem_1102_TemplateVars_003() runs on GeneralComp { + + var MyRecordType R1:= {field1 := null, + field2 := -}; + + var template integer v_set := R1.field1; //error + + messagePort.send(R1.field1); + + alt { + [] messagePort.receive(v_set) { + setverdict(pass,v_set); + } + [] messagePort.receive { + setverdict(fail,v_set); + } + } +} +control{ + execute(TC_NegSem_1102_TemplateVars_003()); +} + +} diff --git a/ATS/core_language/11_variables/1102_template_variables/NegSem_1102_TemplateVars_004.ttcn b/ATS/core_language/11_variables/1102_template_variables/NegSem_1102_TemplateVars_004.ttcn new file mode 100644 index 00000000..b16e22f6 --- /dev/null +++ b/ATS/core_language/11_variables/1102_template_variables/NegSem_1102_TemplateVars_004.ttcn @@ -0,0 +1,49 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:11.2, Ensure that index notation referencing to a set of, which actual value is null shall cause an error. + ** @verdict pass reject + *****************************************************************/ + +/* The following requirements are tested: +Restriction k. : Using the dot notation and index notation for referencing a field, alternative or element of an address value, which actual value is null shall cause an +error. +*/ + +module NegSem_1102_TemplateVars_004 { + + type integer address; + type set of address MySet; + + type port loopbackPort message { + inout integer + } + + type component GeneralComp { + port loopbackPort messagePort + } + + + +testcase TC_NegSem_1102_TemplateVars_004() runs on GeneralComp { + + var MySet R1:= {[0] := null}; + + var template integer v_set := R1[0]; //error + + messagePort.send(R1[0]); + + alt { + [] messagePort.receive(v_set) { + setverdict(pass,v_set); + } + [] messagePort.receive { + setverdict(fail,v_set); + } + } +} +control{ + execute(TC_NegSem_1102_TemplateVars_004()); +} + +} diff --git a/ATS/core_language/11_variables/1102_template_variables/NegSyn_1102_TemplateVars_001.ttcn b/ATS/core_language/11_variables/1102_template_variables/NegSyn_1102_TemplateVars_001.ttcn new file mode 100644 index 00000000..382df4bc --- /dev/null +++ b/ATS/core_language/11_variables/1102_template_variables/NegSyn_1102_TemplateVars_001.ttcn @@ -0,0 +1,9 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:11.2, Define template variables in module scope + ** @verdict pass reject + ***************************************************/ +module NegSyn_1102_TemplateVars_001 { + var template integer v_i1 := 5; +} \ No newline at end of file diff --git a/ATS/core_language/11_variables/1102_template_variables/NegSyn_1102_TemplateVars_002.ttcn b/ATS/core_language/11_variables/1102_template_variables/NegSyn_1102_TemplateVars_002.ttcn new file mode 100644 index 00000000..8bfceb74 --- /dev/null +++ b/ATS/core_language/11_variables/1102_template_variables/NegSyn_1102_TemplateVars_002.ttcn @@ -0,0 +1,26 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:11.2, Template variables should be assigned with unitialized variables + ** @verdict pass reject + ***************************************************/ + +/* The following requirements are tested: +Restriction l) The template body at the right-hand side of the assignment symbol shall evaluate to a value or template, which is type compatible with the variable being declared. +*/ + + +module NegSyn_1102_TemplateVars_002 { + type component GeneralComp {} + + testcase TC_NegSyn_1102_TemplateVars_002() runs on GeneralComp { + var integer v_i1 := 1; + var template float v_i2 := v_i1; // error: v_i1 is integer, meanwhile template type is float + + setverdict(pass); + } + + control { + execute(TC_NegSyn_1102_TemplateVars_002()); + } +} \ No newline at end of file diff --git a/ATS/core_language/11_variables/1102_template_variables/Sem_1102_TemplateVars_001.ttcn b/ATS/core_language/11_variables/1102_template_variables/Sem_1102_TemplateVars_001.ttcn new file mode 100644 index 00000000..e72e0652 --- /dev/null +++ b/ATS/core_language/11_variables/1102_template_variables/Sem_1102_TemplateVars_001.ttcn @@ -0,0 +1,40 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:11.2, Define variables in different scopes + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Sem_1102_TemplateVars_001 { + type component GeneralComp { + timer t; + var template integer vc_i1 := omit; + } + + altstep a_Sem_1102_TemplateVars_001() runs on GeneralComp { + var integer v_j := 12; + [] t.timeout { + var template integer v_k := ?; + } + } + + function f_Sem_1102_TemplateVars_001() runs on GeneralComp { + var template integer v_i := *; + } + + testcase TC_Sem_1102_TemplateVars_001() runs on GeneralComp { + var template integer v_i := (1, 2, 3); + f_Sem_1102_TemplateVars_001(); + + t.start(1.0); + alt { + [] a_Sem_1102_TemplateVars_001(); + } + + setverdict(pass); + } + + control { + var template integer v_i := (1..2); + execute(TC_Sem_1102_TemplateVars_001()); + } +} \ No newline at end of file diff --git a/ATS/core_language/11_variables/1102_template_variables/Sem_1102_TemplateVars_002.ttcn b/ATS/core_language/11_variables/1102_template_variables/Sem_1102_TemplateVars_002.ttcn new file mode 100644 index 00000000..11949f9d --- /dev/null +++ b/ATS/core_language/11_variables/1102_template_variables/Sem_1102_TemplateVars_002.ttcn @@ -0,0 +1,47 @@ +/***************************************************************** + ** @author STF 451 + ** @version 0.0.1 + ** @purpose 1:11.2, Ensure that partially initialized templates are evaluated correctly. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_1102_TemplateVars_002 { + + type set IntegerSet { + integer a1 optional, + integer a2 optional, + integer a3 optional + }; + + type port loopbackPort message { + inout IntegerSet + } + + +type component GeneralComp { + port loopbackPort messagePort +} + +testcase TC_Sem_1102_TemplateVars_002() runs on GeneralComp { + var template IntegerSet mw_pattern := {a1:=1,a2:=*}; + var IntegerSet v_set := {a1:=1,a2:=2,a3:=3} + mw_pattern.a3 := 3; + + messagePort.send(v_set); + + alt { + [] messagePort.receive(mw_pattern) { + setverdict(pass); + } + [] messagePort.receive { + setverdict(fail); + } + } + +} + +control{ + execute(TC_Sem_1102_TemplateVars_002()); +} + +} diff --git a/ATS/core_language/11_variables/1102_template_variables/Sem_1102_TemplateVars_003.ttcn b/ATS/core_language/11_variables/1102_template_variables/Sem_1102_TemplateVars_003.ttcn new file mode 100644 index 00000000..2a4ec706 --- /dev/null +++ b/ATS/core_language/11_variables/1102_template_variables/Sem_1102_TemplateVars_003.ttcn @@ -0,0 +1,53 @@ +/***************************************************************** + ** @author STF 451 + ** @version 0.0.1 + ** @purpose 1:11.2, Ensure that partially initialized templates are evaluated correctly. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_1102_TemplateVars_003 { + + type set IntegerSet { + integer a1 optional, + integer a2 optional, + integer a3 optional + }; + + type port loopbackPort message { + inout IntegerSet + } + + +type component GeneralComp { + port loopbackPort messagePort +} + +function f_partial () runs on GeneralComp return template IntegerSet { + var template IntegerSet mw_return := {a1:=1,a2:=*}; + + return mw_return; +} + +testcase TC_Sem_1102_TemplateVars_003() runs on GeneralComp { + var template IntegerSet mw_pattern := f_partial(); + var IntegerSet v_set := {a1:=1,a2:=2,a3:=3} + mw_pattern.a3 := 3; + + messagePort.send(v_set); + + alt { + [] messagePort.receive(mw_pattern) { + setverdict(pass); + } + [] messagePort.receive { + setverdict(fail); + } + } + +} + +control{ + execute(TC_Sem_1102_TemplateVars_003()); +} + +} diff --git a/ATS/core_language/11_variables/1102_template_variables/Syn_1102_TemplateVars_001.ttcn b/ATS/core_language/11_variables/1102_template_variables/Syn_1102_TemplateVars_001.ttcn new file mode 100644 index 00000000..37d541e0 --- /dev/null +++ b/ATS/core_language/11_variables/1102_template_variables/Syn_1102_TemplateVars_001.ttcn @@ -0,0 +1,30 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:11.2, Define template variables in different scopes + ** @verdict pass accept, noexecution + ***************************************************/ +module Syn_1102_TemplateVars_001 { + type component GeneralComp { + var template integer vc_i1 := omit; + } + + altstep a_Syn_1102_TemplateVars_001() runs on GeneralComp { + var integer v_j := 12; + [] any timer.timeout { + var template integer v_k := ?; + } + } + + function f_Syn_1102_TemplateVars_001() runs on GeneralComp { + var template integer v_i := *; + } + + testcase TC_Syn_1102_TemplateVars_001() runs on GeneralComp { + var template integer v_i := (1, 2, 3); + } + + control { + var template integer v_i := (1..2); + } +} \ No newline at end of file diff --git a/ATS/core_language/12_timers/12_toplevel/NegSem_12_toplevel_timer_001.ttcn b/ATS/core_language/12_timers/12_toplevel/NegSem_12_toplevel_timer_001.ttcn new file mode 100644 index 00000000..da1cdd11 --- /dev/null +++ b/ATS/core_language/12_timers/12_toplevel/NegSem_12_toplevel_timer_001.ttcn @@ -0,0 +1,25 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:12, Ensure timer can not be initialized with negative duration + ** @verdict pass reject + ***************************************************/ +/* + * #reqname /Requirements/12 Declaring timers/Timer value is non-neg float + **/ + + +module NegSem_12_toplevel_timer_001 { + type component TComp{ + timer t_timer := -1.0; // not allowed + } + testcase TC_NegSem_12_toplevel_timer_001() runs on TComp{ + t_timer.start; + } + control{ + + execute(TC_NegSem_12_toplevel_timer_001()) + + + } +} \ No newline at end of file diff --git a/ATS/core_language/12_timers/12_toplevel/NegSem_12_toplevel_timer_002.ttcn b/ATS/core_language/12_timers/12_toplevel/NegSem_12_toplevel_timer_002.ttcn new file mode 100644 index 00000000..483f426c --- /dev/null +++ b/ATS/core_language/12_timers/12_toplevel/NegSem_12_toplevel_timer_002.ttcn @@ -0,0 +1,25 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:12, Ensure timer in array can not be initialized with negative duration + ** @verdict pass reject + ***************************************************/ +/* + * #reqname /Requirements/12 Declaring timers/Timer value is non-neg float + **/ + + +module NegSem_12_toplevel_timer_002 { + type component TComp{ + timer t_timer[2] := {-1.0, 1.0}; + } + testcase TC_NegSem_12_toplevel_timer_002() runs on TComp{ + t_timer[0].start; + } + control{ + + execute(TC_NegSem_12_toplevel_timer_002()) + + + } +} \ No newline at end of file diff --git a/ATS/core_language/12_timers/12_toplevel/NegSem_12_toplevel_timer_003.ttcn b/ATS/core_language/12_timers/12_toplevel/NegSem_12_toplevel_timer_003.ttcn new file mode 100644 index 00000000..50b51395 --- /dev/null +++ b/ATS/core_language/12_timers/12_toplevel/NegSem_12_toplevel_timer_003.ttcn @@ -0,0 +1,25 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:12, Ensure uninitialized timer can't be started + ** @verdict pass reject + ***************************************************/ +/* + * #reqname /Requirements/12 Declaring timers/Timer declaration syntax + **/ + + +module NegSem_12_toplevel_timer_003 { + type component TComp{ + timer t_timer; + } + testcase TC_NegSem_12_toplevel_timer_003() runs on TComp{ + t_timer.start; + } + control{ + + execute(TC_NegSem_12_toplevel_timer_003()) + + + } +} \ No newline at end of file diff --git a/ATS/core_language/12_timers/12_toplevel/NegSem_12_toplevel_timer_004.ttcn b/ATS/core_language/12_timers/12_toplevel/NegSem_12_toplevel_timer_004.ttcn new file mode 100644 index 00000000..2e5564c8 --- /dev/null +++ b/ATS/core_language/12_timers/12_toplevel/NegSem_12_toplevel_timer_004.ttcn @@ -0,0 +1,25 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:12, Ensure uninitialized timer in array can't be started + ** @verdict pass reject + ***************************************************/ +/* + * #reqname /Requirements/12 Declaring timers/Timer declaration syntax + **/ + + +module NegSem_12_toplevel_timer_004 { + type component TComp{ + timer t_timer[2] := {-, 1.0}; + } + testcase TC_NegSem_12_toplevel_timer_004() runs on TComp{ + t_timer[0].start; + } + control{ + + execute(TC_NegSem_12_toplevel_timer_004()) + + + } +} \ No newline at end of file diff --git a/ATS/core_language/12_timers/12_toplevel/NegSem_12_toplevel_timer_005.ttcn b/ATS/core_language/12_timers/12_toplevel/NegSem_12_toplevel_timer_005.ttcn new file mode 100644 index 00000000..46be91bc --- /dev/null +++ b/ATS/core_language/12_timers/12_toplevel/NegSem_12_toplevel_timer_005.ttcn @@ -0,0 +1,25 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:12, Ensure uninitialized timer in array can't be started + ** @verdict pass reject + ***************************************************/ +/* + * #reqname /Requirements/12 Declaring timers/Timer declaration syntax + **/ + + +module NegSem_12_toplevel_timer_005 { + type component TComp{ + timer t_timer[2]; + } + testcase TC_NegSem_12_toplevel_timer_005() runs on TComp{ + t_timer[0].start; + } + control{ + + execute(TC_NegSem_12_toplevel_timer_005()) + + + } +} \ No newline at end of file diff --git a/ATS/core_language/12_timers/12_toplevel/NegSem_12_toplevel_timer_006.ttcn b/ATS/core_language/12_timers/12_toplevel/NegSem_12_toplevel_timer_006.ttcn new file mode 100644 index 00000000..c3180d4b --- /dev/null +++ b/ATS/core_language/12_timers/12_toplevel/NegSem_12_toplevel_timer_006.ttcn @@ -0,0 +1,25 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:12, Ensure timer declaration syntax - reject single timer instance initialized with array + ** @verdict pass reject + ***************************************************/ +/* + * #reqname /Requirements/12 Declaring timers/Timer declaration syntax + **/ + + +module NegSem_12_toplevel_timer_006 { + type component TComp{ + timer t_timer := {1.0, 1.0, 1.0}; + } + testcase TC_NegSem_12_toplevel_timer_006() runs on TComp{ + t_timer[0].start; + } + control{ + + execute(TC_NegSem_12_toplevel_timer_006()) + + + } +} \ No newline at end of file diff --git a/ATS/core_language/12_timers/12_toplevel/NegSem_12_toplevel_timer_007.ttcn b/ATS/core_language/12_timers/12_toplevel/NegSem_12_toplevel_timer_007.ttcn new file mode 100644 index 00000000..3efac6fe --- /dev/null +++ b/ATS/core_language/12_timers/12_toplevel/NegSem_12_toplevel_timer_007.ttcn @@ -0,0 +1,25 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:12, Ensure timer declaration syntax -- reject array initialization with wrong number of initializers + ** @verdict pass reject + ***************************************************/ +/* + * #reqname /Requirements/12 Declaring timers/Timer declaration syntax + **/ + + +module NegSem_12_toplevel_timer_007 { + type component TComp{ + timer t_timer[4] := {1.0, 1.0, 1.0}; + } + testcase TC_NegSem_12_toplevel_timer_007() runs on TComp{ + t_timer[0].start; + } + control{ + + execute(TC_NegSem_12_toplevel_timer_007()) + + + } +} \ No newline at end of file diff --git a/ATS/core_language/12_timers/12_toplevel/NegSem_12_toplevel_timer_008.ttcn b/ATS/core_language/12_timers/12_toplevel/NegSem_12_toplevel_timer_008.ttcn new file mode 100644 index 00000000..be433abc --- /dev/null +++ b/ATS/core_language/12_timers/12_toplevel/NegSem_12_toplevel_timer_008.ttcn @@ -0,0 +1,25 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:12, Ensure timer declaration syntax -- reject array of timers initizlized with a single float value + ** @verdict pass reject + ***************************************************/ +/* + * #reqname /Requirements/12 Declaring timers/Timer declaration syntax + **/ + + +module NegSyn_12_toplevel_timer_008 { + type component TComp{ + timer t_timer[4] := 1.0; + } + testcase TC_NegSyn_12_toplevel_timer_008() runs on TComp{ + t_timer[0].start; + } + control{ + + execute(TC_NegSyn_12_toplevel_timer_008()) + + + } +} \ No newline at end of file diff --git a/ATS/core_language/12_timers/12_toplevel/NegSyn_12_toplevel_timer_001.ttcn b/ATS/core_language/12_timers/12_toplevel/NegSyn_12_toplevel_timer_001.ttcn new file mode 100644 index 00000000..3699c298 --- /dev/null +++ b/ATS/core_language/12_timers/12_toplevel/NegSyn_12_toplevel_timer_001.ttcn @@ -0,0 +1,35 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:12, Ensure timer can`t be used in module control parts when declared in components + ** @verdict pass reject + ***************************************************/ +/* + * #reqname /Requirements/12 Declaring timers/Timers can be declared in component and used in test cases, functions, altsteps on this component + **/ + + +module NegSyn_12_toplevel_timer_001 { + type component TComp{ + timer t_timer:=01.0; + } + testcase TC_NegSyn_12_toplevel_timer_001(integer f) runs on TComp{ + if (f==0){ + setverdict(fail); + } + else{ + setverdict(pass); + } + } + control{ + + t_timer.start; + if (t_timer.running){ + execute(TC_NegSyn_12_toplevel_timer_001(0)) + } + else{ + execute(TC_NegSyn_12_toplevel_timer_001(1)) + } + + } +} \ No newline at end of file diff --git a/ATS/core_language/12_timers/12_toplevel/NegSyn_12_toplevel_timer_002.ttcn b/ATS/core_language/12_timers/12_toplevel/NegSyn_12_toplevel_timer_002.ttcn new file mode 100644 index 00000000..e93b2608 --- /dev/null +++ b/ATS/core_language/12_timers/12_toplevel/NegSyn_12_toplevel_timer_002.ttcn @@ -0,0 +1,25 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:12, Ensure timer declaration syntax + ** @verdict pass reject + ***************************************************/ +/* + * #reqname /Requirements/12 Declaring timers/Timer declaration syntax + **/ + + +module NegSyn_12_toplevel_timer_002 { + type component TComp{ + timer :=10.0; + } + testcase TC_NegSyn_12_toplevel_timer_002() runs on TComp{ + + } + control{ + + execute(TC_NegSyn_12_toplevel_timer_002()) + + + } +} \ No newline at end of file diff --git a/ATS/core_language/12_timers/12_toplevel/NegSyn_12_toplevel_timer_003.ttcn b/ATS/core_language/12_timers/12_toplevel/NegSyn_12_toplevel_timer_003.ttcn new file mode 100644 index 00000000..1c5a82a0 --- /dev/null +++ b/ATS/core_language/12_timers/12_toplevel/NegSyn_12_toplevel_timer_003.ttcn @@ -0,0 +1,25 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:12, Ensure timer declaration syntax + ** @verdict pass reject + ***************************************************/ +/* + * #reqname /Requirements/12 Declaring timers/Timer declaration syntax + **/ + + +module NegSyn_12_toplevel_timer_003 { + type component TComp{ + timer t_timer :=; + } + testcase TC_NegSyn_12_toplevel_timer_003() runs on TComp{ + + } + control{ + + execute(TC_NegSyn_12_toplevel_timer_003()) + + + } +} \ No newline at end of file diff --git a/ATS/core_language/12_timers/12_toplevel/NegSyn_12_toplevel_timer_004.ttcn b/ATS/core_language/12_timers/12_toplevel/NegSyn_12_toplevel_timer_004.ttcn new file mode 100644 index 00000000..deb70c3b --- /dev/null +++ b/ATS/core_language/12_timers/12_toplevel/NegSyn_12_toplevel_timer_004.ttcn @@ -0,0 +1,25 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:04, Ensure timer declaration syntax + ** @verdict pass reject + ***************************************************/ +/* + * #reqname /Requirements/12 Declaring timers/Timer declaration syntax + **/ + + +module NegSyn_04_toplevel_timer_004 { + type component TComp{ + timer t_timer 0.0; + } + testcase TC_NegSyn_04_toplevel_timer_004() runs on TComp{ + + } + control{ + + execute(TC_NegSyn_04_toplevel_timer_004()) + + + } +} \ No newline at end of file diff --git a/ATS/core_language/12_timers/12_toplevel/NegSyn_12_toplevel_timer_005.ttcn b/ATS/core_language/12_timers/12_toplevel/NegSyn_12_toplevel_timer_005.ttcn new file mode 100644 index 00000000..8dbfd619 --- /dev/null +++ b/ATS/core_language/12_timers/12_toplevel/NegSyn_12_toplevel_timer_005.ttcn @@ -0,0 +1,25 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:12, Ensure timer declaration syntax + ** @verdict pass reject + ***************************************************/ +/* + * #reqname /Requirements/12 Declaring timers/Timer declaration syntax + **/ + + +module NegSyn_12_toplevel_timer_005 { + type component TComp{ + timer t_timer := 1; + } + testcase TC_NegSyn_12_toplevel_timer_005() runs on TComp{ + + } + control{ + + execute(TC_NegSyn_12_toplevel_timer_005()) + + + } +} \ No newline at end of file diff --git a/ATS/core_language/12_timers/12_toplevel/NegSyn_12_toplevel_timer_006.ttcn b/ATS/core_language/12_timers/12_toplevel/NegSyn_12_toplevel_timer_006.ttcn new file mode 100644 index 00000000..1ff1af29 --- /dev/null +++ b/ATS/core_language/12_timers/12_toplevel/NegSyn_12_toplevel_timer_006.ttcn @@ -0,0 +1,25 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:12, Ensure timer array declaration syntax + ** @verdict pass reject + ***************************************************/ +/* + * #reqname /Requirements/12 Declaring timers/Timer declaration syntax + **/ + + +module NegSyn_12_toplevel_timer_006 { + type component TComp{ + timer t_timer[5] := 1.0, 1.0, 1.0, 1.0, 1.0}; + } + testcase TC_NegSyn_12_toplevel_timer_006() runs on TComp{ + + } + control{ + + execute(TC_NegSyn_12_toplevel_timer_006()) + + + } +} \ No newline at end of file diff --git a/ATS/core_language/12_timers/12_toplevel/NegSyn_12_toplevel_timer_007.ttcn b/ATS/core_language/12_timers/12_toplevel/NegSyn_12_toplevel_timer_007.ttcn new file mode 100644 index 00000000..c6918468 --- /dev/null +++ b/ATS/core_language/12_timers/12_toplevel/NegSyn_12_toplevel_timer_007.ttcn @@ -0,0 +1,25 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:12, Ensure timer array declaration syntax + ** @verdict pass reject + ***************************************************/ +/* + * #reqname /Requirements/12 Declaring timers/Timer declaration syntax + **/ + + +module NegSyn_12_toplevel_timer_007 { + type component TComp{ + timer t_timer[5] := {1.0 1.0, 1.0, 1.0, 1.0}; + } + testcase TC_NegSyn_12_toplevel_timer_007() runs on TComp{ + + } + control{ + + execute(TC_NegSyn_12_toplevel_timer_007()) + + + } +} \ No newline at end of file diff --git a/ATS/core_language/12_timers/12_toplevel/Sem_12_toplevel_timer_001.ttcn b/ATS/core_language/12_timers/12_toplevel/Sem_12_toplevel_timer_001.ttcn new file mode 100644 index 00000000..9875624c --- /dev/null +++ b/ATS/core_language/12_timers/12_toplevel/Sem_12_toplevel_timer_001.ttcn @@ -0,0 +1,28 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:12, Ensure timer can be declared in components + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +/* + * #reqname /Requirements/12 Declaring timers/Timers can be declared in component type + **/ + + +module Sem_12_toplevel_timer_001 { + type component TComp{ + timer t_timer:=10.0; + } + testcase TC_Sem_12_toplevel_timer_001() runs on TComp{ + t_timer.start; + if (t_timer.running){ + setverdict(pass) + } + else { + setverdict(fail) + } + } + control{ + execute(TC_Sem_12_toplevel_timer_001()) + } +} \ No newline at end of file diff --git a/ATS/core_language/12_timers/12_toplevel/Sem_12_toplevel_timer_002.ttcn b/ATS/core_language/12_timers/12_toplevel/Sem_12_toplevel_timer_002.ttcn new file mode 100644 index 00000000..981e386d --- /dev/null +++ b/ATS/core_language/12_timers/12_toplevel/Sem_12_toplevel_timer_002.ttcn @@ -0,0 +1,29 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:12, Ensure timer can be declared in module control parts + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +/* + * #reqname /Requirements/12 Declaring timers/Timer can be declared in module control, test cases, functions, altsteps + **/ + + +module Sem_12_toplevel_timer_002 { + type component TComp{ + } + testcase TC_Sem_12_toplevel_timer_002(verdicttype v_verdict) runs on TComp{ + setverdict(v_verdict); + } + control{ + timer t_timer:=10.0; + t_timer.start; + if (t_timer.running){ + execute(TC_Sem_12_toplevel_timer_002(pass)) + } + else{ + execute(TC_Sem_12_toplevel_timer_002(fail)) + } + + } +} \ No newline at end of file diff --git a/ATS/core_language/12_timers/12_toplevel/Sem_12_toplevel_timer_003.ttcn b/ATS/core_language/12_timers/12_toplevel/Sem_12_toplevel_timer_003.ttcn new file mode 100644 index 00000000..41000545 --- /dev/null +++ b/ATS/core_language/12_timers/12_toplevel/Sem_12_toplevel_timer_003.ttcn @@ -0,0 +1,39 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:12, Ensure timer can be declared in altsteps + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +/* + * #reqname /Requirements/12 Declaring timers/Timer can be declared in module control, test cases, functions, altsteps + **/ + + +module Sem_12_toplevel_timer_003 { + type component TComp{ + timer aux_t; + } + altstep a_step () runs on TComp{ + timer t_timer:=3.0; + [] aux_t.timeout{ + t_timer.start; + if (t_timer.running){ + setverdict(pass); + stop; + } + else{ + setverdict(fail); + stop; + } + t_timer.stop; + } + + }; + testcase TC_Sem_12_toplevel_timer_003() runs on TComp{ + aux_t.start(0.0); + a_step(); + } + control{ + execute(TC_Sem_12_toplevel_timer_003()) + } +} \ No newline at end of file diff --git a/ATS/core_language/12_timers/12_toplevel/Sem_12_toplevel_timer_004.ttcn b/ATS/core_language/12_timers/12_toplevel/Sem_12_toplevel_timer_004.ttcn new file mode 100644 index 00000000..fa54de52 --- /dev/null +++ b/ATS/core_language/12_timers/12_toplevel/Sem_12_toplevel_timer_004.ttcn @@ -0,0 +1,33 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:12, Ensure timer can be declared in functions + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +/* + * #reqname /Requirements/12 Declaring timers/Timer can be declared in module control, test cases, functions, altsteps + **/ + + +module Sem_12_toplevel_timer_004 { + type component TComp{ + } + function func() + { + timer t_timer:=10.0; + t_timer.start; + if (t_timer.running){ + setverdict(pass); + } + else { + setverdict(fail); + } + + } + testcase TC_Sem_12_toplevel_timer_004() runs on TComp{ + func(); + } + control{ + execute(TC_Sem_12_toplevel_timer_004()) + } +} \ No newline at end of file diff --git a/ATS/core_language/12_timers/12_toplevel/Sem_12_toplevel_timer_005.ttcn b/ATS/core_language/12_timers/12_toplevel/Sem_12_toplevel_timer_005.ttcn new file mode 100644 index 00000000..cd2e2fcb --- /dev/null +++ b/ATS/core_language/12_timers/12_toplevel/Sem_12_toplevel_timer_005.ttcn @@ -0,0 +1,28 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:12, Ensure timer can be declared in test cases + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +/* + * #reqname /Requirements/12 Declaring timers/Timer can be declared in module control, test cases, functions, altsteps + **/ + + +module Sem_12_toplevel_timer_005 { + type component TComp{ + } + testcase TC_Sem_12_toplevel_timer_005() runs on TComp{ + timer t_timer:=10.0; + t_timer.start; + if (t_timer.running){ + setverdict(pass); + } + else{ + setverdict(fail); + } + } + control{ + execute(TC_Sem_12_toplevel_timer_005()) + } +} \ No newline at end of file diff --git a/ATS/core_language/12_timers/12_toplevel/Sem_12_toplevel_timer_006.ttcn b/ATS/core_language/12_timers/12_toplevel/Sem_12_toplevel_timer_006.ttcn new file mode 100644 index 00000000..dd4446e8 --- /dev/null +++ b/ATS/core_language/12_timers/12_toplevel/Sem_12_toplevel_timer_006.ttcn @@ -0,0 +1,42 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:12, Ensure timer`s elapsed time is plausible + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +/* + * #reqname /Requirements/12 Declaring timers/Timer value is non-neg float + **/ + + +module Sem_12_toplevel_timer_006 { + type component TComp{ + timer t_timer1:=1.05; + timer t_timer2:=1.0; + timer t_timer3:=0.95; + } + altstep a_step() runs on TComp{ + []t_timer2.timeout{ + if (match(t_timer3.running, false) and t_timer1.running){ + setverdict(pass); + } + else { + setverdict(fail); + } + } + []t_timer1.timeout{ + setverdict(fail); + } + } + testcase TC_Sem_12_toplevel_timer_006() runs on TComp{ + + t_timer1.start; + t_timer2.start; + t_timer3.start; + a_step(); + + } + control{ + execute(TC_Sem_12_toplevel_timer_006()) + } +} \ No newline at end of file diff --git a/ATS/core_language/12_timers/12_toplevel/Sem_12_toplevel_timer_007.ttcn b/ATS/core_language/12_timers/12_toplevel/Sem_12_toplevel_timer_007.ttcn new file mode 100644 index 00000000..afe39d70 --- /dev/null +++ b/ATS/core_language/12_timers/12_toplevel/Sem_12_toplevel_timer_007.ttcn @@ -0,0 +1,29 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:12, Ensure timer can be declared in components but used in test cases + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +/* + * #reqname /Requirements/12 Declaring timers/Timers can be declared in component and used in test cases, functions, altsteps on this component + **/ + + +module Sem_12_toplevel_timer_007 { + type component TComp{ + timer t_timer:=10.0; + } + testcase TC_Sem_12_toplevel_timer_007() runs on TComp{ + + t_timer.start; + if (t_timer.running){ + setverdict(pass); + } + else{ + setverdict(fail); + } + } + control{ + execute(TC_Sem_12_toplevel_timer_007()) + } +} \ No newline at end of file diff --git a/ATS/core_language/12_timers/12_toplevel/Sem_12_toplevel_timer_008.ttcn b/ATS/core_language/12_timers/12_toplevel/Sem_12_toplevel_timer_008.ttcn new file mode 100644 index 00000000..86f36250 --- /dev/null +++ b/ATS/core_language/12_timers/12_toplevel/Sem_12_toplevel_timer_008.ttcn @@ -0,0 +1,34 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:12, Ensure timer can be declared in components but used in functions + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +/* + * #reqname /Requirements/12 Declaring timers/Timers can be declared in component and used in test cases, functions, altsteps on this component + **/ + + +module Sem_12_toplevel_timer_008 { + type component TComp{ + timer t_timer:=10.0; + } + function func() runs on TComp + { + + t_timer.start; + if (t_timer.running){ + setverdict( pass ); + } + else { + setverdict( fail ); + } + + } + testcase TC_Sem_12_toplevel_timer_008() runs on TComp{ + func(); + } + control{ + execute(TC_Sem_12_toplevel_timer_008()) + } +} \ No newline at end of file diff --git a/ATS/core_language/12_timers/12_toplevel/Sem_12_toplevel_timer_009.ttcn b/ATS/core_language/12_timers/12_toplevel/Sem_12_toplevel_timer_009.ttcn new file mode 100644 index 00000000..2e4b8ba2 --- /dev/null +++ b/ATS/core_language/12_timers/12_toplevel/Sem_12_toplevel_timer_009.ttcn @@ -0,0 +1,37 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:12, Ensure timer can be declared in components but used in altsteps + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +/* + * #reqname /Requirements/12 Declaring timers/Timers can be declared in component and used in test cases, functions, altsteps on this component + **/ + + +module Sem_12_toplevel_timer_009 { + type component TComp{ + timer aux_t; + timer t_timer:=10.0; + } + altstep a_step () runs on TComp{ + + [] aux_t.timeout{ + t_timer.start; + if (t_timer.running){ + setverdict(pass); + } + else{ + setverdict(fail); + } + } + + }; + testcase TC_Sem_12_toplevel_timer_009() runs on TComp{ + aux_t.start(0.0); + a_step(); + } + control{ + execute(TC_Sem_12_toplevel_timer_009()) + } +} \ No newline at end of file diff --git a/ATS/core_language/12_timers/12_toplevel/Syn_12_toplevel_timer_001.ttcn b/ATS/core_language/12_timers/12_toplevel/Syn_12_toplevel_timer_001.ttcn new file mode 100644 index 00000000..15423ab0 --- /dev/null +++ b/ATS/core_language/12_timers/12_toplevel/Syn_12_toplevel_timer_001.ttcn @@ -0,0 +1,16 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:12, Ensure non-initialized timer declaration syntax + ** @verdict pass accept, noexecution + ***************************************************/ +/* + * #reqname /Requirements/12 Declaring timers/Timer declaration syntax + **/ + + +module Syn_12_toplevel_timer_001 { + type component TComp{ + timer t_timer; + } +} \ No newline at end of file diff --git a/ATS/core_language/12_timers/12_toplevel/Syn_12_toplevel_timer_002.ttcn b/ATS/core_language/12_timers/12_toplevel/Syn_12_toplevel_timer_002.ttcn new file mode 100644 index 00000000..ab6ee4cd --- /dev/null +++ b/ATS/core_language/12_timers/12_toplevel/Syn_12_toplevel_timer_002.ttcn @@ -0,0 +1,16 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:12, Ensure timer array declaration syntax + ** @verdict pass accept, noexecution + ***************************************************/ +/* + * #reqname /Requirements/12 Declaring timers/Timer declaration syntax + **/ + + +module Syn_12_toplevel_timer_002 { + type component TComp{ + timer t_timer[5]; + } +} \ No newline at end of file diff --git a/ATS/core_language/12_timers/12_toplevel/Syn_12_toplevel_timer_003.ttcn b/ATS/core_language/12_timers/12_toplevel/Syn_12_toplevel_timer_003.ttcn new file mode 100644 index 00000000..4bda5a47 --- /dev/null +++ b/ATS/core_language/12_timers/12_toplevel/Syn_12_toplevel_timer_003.ttcn @@ -0,0 +1,16 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:12, Ensure definition of a list of timers is allowed as a single declaration + ** @verdict pass accept, noexecution + ***************************************************/ +/* + * #reqname /Requirements/12 Declaring timers/Timer declaration syntax + **/ + + +module Syn_12_toplevel_timer_003 { + type component TComp{ + timer t_timer1, t_timer2 := 2.0, t_timer_array1[5], t_timer_array2[3] := {0.0, 1.0, 2.0}; + } +} \ No newline at end of file diff --git a/ATS/core_language/12_timers/12_toplevel/Syn_12_toplevel_timer_004.ttcn b/ATS/core_language/12_timers/12_toplevel/Syn_12_toplevel_timer_004.ttcn new file mode 100644 index 00000000..587df8cd --- /dev/null +++ b/ATS/core_language/12_timers/12_toplevel/Syn_12_toplevel_timer_004.ttcn @@ -0,0 +1,16 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:12, Ensure timer array initialization syntax + ** @verdict pass accept, noexecution + ***************************************************/ +/* + * #reqname /Requirements/12 Declaring timers/timer array values are non-neg float or minus + **/ + + +module Syn_12_toplevel_timer_004 { + type component TComp{ + timer t_timer[5] := {1.0, -, 1.0, 1.0, 1.0}; + } +} \ No newline at end of file diff --git a/ATS/core_language/12_timers/12_toplevel/Syn_12_toplevel_timer_005.ttcn b/ATS/core_language/12_timers/12_toplevel/Syn_12_toplevel_timer_005.ttcn new file mode 100644 index 00000000..e36389ee --- /dev/null +++ b/ATS/core_language/12_timers/12_toplevel/Syn_12_toplevel_timer_005.ttcn @@ -0,0 +1,17 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:12, Ensure timer declaration with expression + ** @verdict pass accept, noexecution + ***************************************************/ +/* + * #reqname /Requirements/12 Declaring timers/Timer declaration syntax + **/ + + +module Syn_12_toplevel_timer_006 { + control { + var anytype v_any := { float := 1.0 }; + timer t_timer := v_any.float; + } +} \ No newline at end of file diff --git a/ATS/core_language/12_timers/12_toplevel/Syn_12_toplevel_timer_006.ttcn b/ATS/core_language/12_timers/12_toplevel/Syn_12_toplevel_timer_006.ttcn new file mode 100644 index 00000000..038d46c6 --- /dev/null +++ b/ATS/core_language/12_timers/12_toplevel/Syn_12_toplevel_timer_006.ttcn @@ -0,0 +1,20 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:12, Ensure timer declaration with expression + ** @verdict pass accept, noexecution + ***************************************************/ +/* + * #reqname /Requirements/12 Declaring timers/Timer declaration syntax + **/ + + +module Syn_12_toplevel_timer_005 { + function one() return float + { + return 1.0; + } + control { + timer t_timer := one(); + } +} \ No newline at end of file diff --git a/ATS/core_language/13_messages/13_toplevel/Sem_13_declaring_msg_001.ttcn b/ATS/core_language/13_messages/13_toplevel/Sem_13_declaring_msg_001.ttcn new file mode 100644 index 00000000..c22572b4 --- /dev/null +++ b/ATS/core_language/13_messages/13_toplevel/Sem_13_declaring_msg_001.ttcn @@ -0,0 +1,146 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:12, Ensure received messages can be a combination of value and matching mechanism + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +/* + * #reqname /Requirements/13 Declaring messages/Messages are instances of types declared in the in-out-inout clauses of message port type definition + **/ +/* + * #reqname /Requirements/13 Declaring messages/Received messages can also be declared as a combination of value and matching mechanisms + **/ +/* + * #reqname /Requirements/13 Declaring messages/Sorts of message insances/Variable as a message + **/ + + +module Sem_13_declaring_msg_001 { + type record CompositeType{ + integer i + } + type set MySet{ + integer int1, + charstring str1 + } + type enumerated MyEnum{ + Perl,Bash,Python + } + type integer MyArray[3]; + type union MyUnion{ + integer int, + float real + } + type record MsgType1{ + integer i, + float k, + boolean b, + verdicttype v, + bitstring bs, + hexstring hs, + octetstring os, + charstring cs, + universal charstring ucs, + CompositeType rec1, + MySet set1, + MyUnion union1, + MyEnum enum1, + MyArray arr1 + } + type record MsgType2{ + integer j + } + + type port MyPort1 message{ + out MsgType1; + in MsgType2; + } + type port MyPort2 message{ + out MsgType2; + in MsgType1; + } + type component Sender{ + port MyPort1 src; + } + + type component Receiver{ + port MyPort2 dst; + } + type component MTC {} + + function make_union() return MyUnion + { + var MyUnion result; + result.int := 1; + return result; + } + + const MsgType1 c_message := { + i := 1, + k := 1.0, + b := true, + v := pass, + bs := '0101'B, + hs := '123ABD'H, + os := 'FF96'O, + cs := """ab""", + ucs := "the", + rec1 := {i:=1}, + set1 := {int1:=1, str1:="the"}, + union1 := make_union(), + enum1 := Bash, + arr1 := {1,2,3} + }; + + function f_sender() runs on Sender + { + var MsgType1 msg1 := c_message; + src.send(msg1); + } + + function f_receiver() runs on Receiver + { + template MsgType1 t_msg := { + i := 1, + k:=1.0, + b:=true, + v:=pass, + bs:='0101'B, + hs:='123ABD'H, + os:='FF96'O, + cs:="""ab""", + ucs:="the", + rec1:={i:=1}, + set1:={int1:=1, str1:="the"}, + union1:=make_union(), + enum1:=Bash, + arr1:={1,2,3}}; + + var MsgType1 v_message; + + timer t_timer := 3.0; + t_timer.start; + alt + { + [] dst.receive(t_msg) -> value v_message { setverdict(pass); } + [] t_timer.timeout { setverdict(fail, "The template failed to match the message"); } + } + } + + testcase TC_Sem_13_declaring_msg_001() runs on MTC system MTC + { + var Sender c_sender := Sender.create; + var Receiver c_receiver := Receiver.create; + connect(c_sender:src, c_receiver:dst); + c_sender.start(f_sender()); + c_receiver.start(f_receiver()); + c_sender.done; + c_receiver.done; + } + control{ + + execute(TC_Sem_13_declaring_msg_001()) + + + } +} \ No newline at end of file diff --git a/ATS/core_language/13_messages/13_toplevel/Sem_13_declaring_msg_002.ttcn b/ATS/core_language/13_messages/13_toplevel/Sem_13_declaring_msg_002.ttcn new file mode 100644 index 00000000..bfb5b106 --- /dev/null +++ b/ATS/core_language/13_messages/13_toplevel/Sem_13_declaring_msg_002.ttcn @@ -0,0 +1,127 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:24, Ensure received messages can`t be matched with wrong template + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +/* + * #reqname /Requirements/13 Declaring messages/Received messages can also be declared as a combination of value and matching mechanisms + **/ + + +module Sem_13_declaring_msg_002 { + type record CompositeType{ + integer i + } + type set MySet{ + integer int1, + charstring str1 + } + type enumerated MyEnum{ + Perl,Bash,Python + } + type integer MyArray[3]; + type union MyUnion{ + integer int, + float real + } + type record MsgType1{ + integer i, + float k, + boolean b, + verdicttype v, + bitstring bs, + hexstring hs, + octetstring os, + charstring cs, + universal charstring ucs, + CompositeType rec1, + MySet set1, + MyUnion union1, + MyEnum enum1, + MyArray arr1 + } + type record MsgType2{ + integer j + } + + type port MyPort1 message{ + out MsgType1; + in MsgType2; + } + type port MyPort2 message{ + out MsgType2; + in MsgType1; + } + type component Sender{ + port MyPort1 src; + } + + type component Receiver{ + port MyPort2 dst; + } + type component MTC {} + + function make_union() return MyUnion + { + var MyUnion result; + result.int := 1; + return result; + } + + const MsgType1 c_message := { + i := 1, + k := 1.0, + b := true, + v := pass, + bs := '0101'B, + hs := '123ABD'H, + os := 'FF96'O, + cs := """ab""", + ucs := "the", + rec1 := {i:=1}, + set1 := {int1:=1, str1:="the"}, + union1 := make_union(), + enum1 := Bash, + arr1 := {1,2,3} + }; + + function f_sender() runs on Sender + { + var MsgType1 msg1 := c_message; + src.send(msg1); + } + + function f_receiver() runs on Receiver + { + // Mismatch in fields i and k + template MsgType1 t_msg := {i := 2, k:=1.3, b:=true, v:=pass, bs:='0101'B, hs:='123ABD'H, + os:='FF96'O, cs:="""ab""", ucs:="the", rec1:={i:=1}, set1:={int1:=1, str1:="the"}, + enum1:=Bash, union1 := ?, arr1:={1,2,3}}; + var MsgType1 v_message; + timer t_timer := 3.0; + t_timer.start; + alt + { + [] dst.receive(t_msg) -> value v_message { setverdict(fail, "The template must not match the message"); } + [] t_timer.timeout { setverdict(pass); } + } + } + + testcase TC_Sem_13_declaring_msg_002() runs on MTC system MTC + { + var Sender c_sender := Sender.create; + var Receiver c_receiver := Receiver.create; + connect(c_sender:src, c_receiver:dst); + c_sender.start(f_sender()); + c_receiver.start(f_receiver()); + c_sender.done; + c_receiver.done; + } + control{ + + execute(TC_Sem_13_declaring_msg_002()) + + + } +} \ No newline at end of file diff --git a/ATS/core_language/13_messages/13_toplevel/Sem_13_declaring_msg_003.ttcn b/ATS/core_language/13_messages/13_toplevel/Sem_13_declaring_msg_003.ttcn new file mode 100644 index 00000000..34cea590 --- /dev/null +++ b/ATS/core_language/13_messages/13_toplevel/Sem_13_declaring_msg_003.ttcn @@ -0,0 +1,128 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:24, Ensure instances of messages can be declared by in-line templates + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +/* + * #reqname /Requirements/13 Declaring messages/Sorts of message insances/Variable as a message + **/ + + +module Sem_13_declaring_msg_003 { + type record CompositeType{ + integer i + } + type set MySet{ + integer int1, + charstring str1 + } + type enumerated MyEnum{ + Perl,Bash,Python + } + type integer MyArray[3]; + type union MyUnion{ + integer int, + float real + } + type record MsgType1{ + integer i, + float k, + boolean b, + verdicttype v, + bitstring bs, + hexstring hs, + octetstring os, + charstring cs, + universal charstring ucs, + CompositeType rec1, + MySet set1, + MyUnion union1, + MyEnum enum1, + MyArray arr1 + } + type record MsgType2{ + integer j + } + + type port MyPort1 message{ + out MsgType1; + in MsgType2; + } + type port MyPort2 message{ + out MsgType2; + in MsgType1; + } + type component Sender{ + port MyPort1 src; + } + + type component Receiver{ + port MyPort2 dst; + } + type component MTC {} + + function make_union() return MyUnion + { + var MyUnion result; + result.int := 1; + return result; + } + + const MsgType1 c_message := { + i := 1, + k := 1.0, + b := true, + v := pass, + bs := '0101'B, + hs := '123ABD'H, + os := 'FF96'O, + cs := """ab""", + ucs := "the", + rec1 := {i:=1}, + set1 := {int1:=1, str1:="the"}, + union1 := make_union(), + enum1 := Bash, + arr1 := {1,2,3} + }; + + function f_sender() runs on Sender + { + var MsgType1 msg1 := c_message; + src.send(msg1); + } + + function f_receiver() runs on Receiver + { + var MsgType1 v_message; + timer t_timer := 3.0; + t_timer.start; + alt + { + [] dst.receive(MsgType1: {1, 1.0, true, pass, '0101'B, '123ABD'H, 'FF96'O, + """ab""", "the", {i:=1}, {int1:=1, str1:="the"}, make_union(), Bash, {1,2,3}}) + -> value v_message + { + setverdict(pass); + } + [] t_timer.timeout { setverdict(fail, "The template failed to match the message"); } + } + } + + testcase TC_Sem_13_declaring_msg_003() runs on MTC system MTC + { + var Sender c_sender := Sender.create; + var Receiver c_receiver := Receiver.create; + connect(c_sender:src, c_receiver:dst); + c_sender.start(f_sender()); + c_receiver.start(f_receiver()); + c_sender.done; + c_receiver.done; + } + control{ + + execute(TC_Sem_13_declaring_msg_003()) + + + } +} \ No newline at end of file diff --git a/ATS/core_language/13_messages/13_toplevel/Sem_13_declaring_msg_004.ttcn b/ATS/core_language/13_messages/13_toplevel/Sem_13_declaring_msg_004.ttcn new file mode 100644 index 00000000..d2fb42c3 --- /dev/null +++ b/ATS/core_language/13_messages/13_toplevel/Sem_13_declaring_msg_004.ttcn @@ -0,0 +1,131 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:24, Ensure instances of messages can be declared by global templates + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +/* + * #reqname /Requirements/13 Declaring messages/Sorts of message insances/Global template as a message + **/ + + +module Sem_13_declaring_msg_004 { + type record CompositeType{ + integer i + } + type set MySet{ + integer int1, + charstring str1 + } + type enumerated MyEnum{ + Perl,Bash,Python + } + type integer MyArray[3]; + type union MyUnion{ + integer int, + float real + } + type record MsgType1{ + integer i, + float k, + boolean b, + verdicttype v, + bitstring bs, + hexstring hs, + octetstring os, + charstring cs, + universal charstring ucs, + CompositeType rec1, + MySet set1, + MyUnion union1, + MyEnum enum1, + MyArray arr1 + } + type record MsgType2{ + integer j + } + + type port MyPort1 message{ + out MsgType1; + in MsgType2; + } + type port MyPort2 message{ + out MsgType2; + in MsgType1; + } + type component Sender{ + port MyPort1 src; + } + + type component Receiver{ + port MyPort2 dst; + } + type component MTC {} + + function make_union() return MyUnion + { + var MyUnion result; + result.int := 1; + return result; + } + + const MsgType1 c_message := { + i := 1, + k := 1.0, + b := true, + v := pass, + bs := '0101'B, + hs := '123ABD'H, + os := 'FF96'O, + cs := """ab""", + ucs := "the", + rec1 := {i:=1}, + set1 := {int1:=1, str1:="the"}, + union1 := make_union(), + enum1 := Bash, + arr1 := {1,2,3} + }; + + template MsgType1 global:= {i := 1, k:=1.0, b:=true, v:=pass, bs:='0101'B, hs:='123ABD'H, + os:='FF96'O, cs:="""ab""", ucs:="the", union1 := make_union(), rec1:={i:=1}, set1:={int1:=1, str1:="the"}, + enum1:=Bash, arr1:={1,2,3} + }; + + + function f_sender() runs on Sender + { + src.send(global); + } + + function f_receiver() runs on Receiver + { + template MsgType1 local:= {i := 1, k:=1.0, b:=true, v:=pass, bs:='0101'B, hs:='123ABD'H, + os:='FF96'O, cs:="""ab""", ucs:="the", union1 := ?, rec1:={i:=1}, set1:={int1:=1, str1:="the"}, + enum1:=Bash, arr1:={1,2,3} + }; + timer t_timer := 3.0; + t_timer.start; + alt + { + [] dst.receive(local) { setverdict(pass); } + [] t_timer.timeout { setverdict(fail, "Failed to match global template"); } + } + } + + testcase TC_Sem_13_declaring_msg_004() runs on MTC system MTC + { + var Sender c_sender := Sender.create; + var Receiver c_receiver := Receiver.create; + connect(c_sender:src, c_receiver:dst); + c_sender.start(f_sender()); + c_receiver.start(f_receiver()); + c_sender.done; + c_receiver.done; + } + control{ + + execute(TC_Sem_13_declaring_msg_004()) + + + } +} \ No newline at end of file diff --git a/ATS/core_language/13_messages/13_toplevel/Sem_13_declaring_msg_005.ttcn b/ATS/core_language/13_messages/13_toplevel/Sem_13_declaring_msg_005.ttcn new file mode 100644 index 00000000..f334e7df --- /dev/null +++ b/ATS/core_language/13_messages/13_toplevel/Sem_13_declaring_msg_005.ttcn @@ -0,0 +1,137 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:24, Ensure instances of messages can be declared and passed via template variables + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +/* + * #reqname /Requirements/13 Declaring messages/Sorts of message insances/Template variable as a message + **/ + + +module Sem_13_declaring_msg_005 { + type record CompositeType{ + integer i + } + type set MySet{ + integer int1, + charstring str1 + } + type enumerated MyEnum{ + Perl,Bash,Python + } + type integer MyArray[3]; + type union MyUnion{ + integer int, + float real + } + type record MsgType1{ + integer i, + float k, + boolean b, + verdicttype v, + bitstring bs, + hexstring hs, + octetstring os, + charstring cs, + universal charstring ucs, + CompositeType rec1, + MySet set1, + MyUnion union1, + MyEnum enum1, + MyArray arr1 + } + type record MsgType2{ + integer j + } + + type port MyPort1 message{ + out MsgType1; + in MsgType2; + } + type port MyPort2 message{ + out MsgType2; + in MsgType1; + } + type component Sender{ + port MyPort1 src; + } + + type component Receiver{ + port MyPort2 dst; + } + type component MTC {} + + function make_union() return MyUnion + { + var MyUnion result; + result.int := 1; + return result; + } + + const MsgType1 c_message := { + i := 1, + k := 1.0, + b := true, + v := pass, + bs := '0101'B, + hs := '123ABD'H, + os := 'FF96'O, + cs := """ab""", + ucs := "the", + rec1 := {i:=1}, + set1 := {int1:=1, str1:="the"}, + union1 := make_union(), + enum1 := Bash, + arr1 := {1,2,3} + }; + + template MsgType1 global:= {i := 1, k:=1.0, b:=true, v:=pass, bs:='0101'B, hs:='123ABD'H, + os:='FF96'O, cs:="""ab""", ucs:="the", union1 := make_union(), + rec1:={i:=1}, set1:={int1:=1, str1:="the"}, + enum1:=Bash, arr1:={1,2,3} + }; + + function f_sender() runs on Sender + { + var template MsgType1 template_var:= { + i := 1, k:=1.0, b:=true, v:=pass, + bs:='0101'B, hs:='123ABD'H, + os:='FF96'O, cs:="""ab""", ucs:="the", + union1 := make_union(), + rec1:={i:=1}, set1:={int1:=1, str1:="the"}, + enum1:=Bash, arr1:={1,2,3} + }; + + src.send(template_var); + } + + function f_receiver() runs on Receiver + { + var MsgType1 v_message; + timer t_timer := 3.0; + t_timer.start; + alt + { + [] dst.receive(global) -> value v_message { setverdict(pass); } + [] t_timer.timeout { setverdict(fail); } + } + } + + testcase TC_Sem_13_declaring_msg_005() runs on MTC system MTC + { + var Sender c_sender := Sender.create; + var Receiver c_receiver := Receiver.create; + connect(c_sender:src, c_receiver:dst); + c_sender.start(f_sender()); + c_receiver.start(f_receiver()); + c_sender.done; + c_receiver.done; + } + control{ + + execute(TC_Sem_13_declaring_msg_005()) + + + } +} \ No newline at end of file diff --git a/ATS/core_language/13_messages/13_toplevel/Sem_13_declaring_msg_006.ttcn b/ATS/core_language/13_messages/13_toplevel/Sem_13_declaring_msg_006.ttcn new file mode 100644 index 00000000..ce10a402 --- /dev/null +++ b/ATS/core_language/13_messages/13_toplevel/Sem_13_declaring_msg_006.ttcn @@ -0,0 +1,135 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:24, Ensure instances of messages can be declared and passed via inline template + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +/* + * #reqname /Requirements/13 Declaring messages/Sorts of message insances/Inline template as a message + **/ + + +module Sem_13_declaring_msg_006 { + type record CompositeType{ + integer i + } + type set MySet{ + integer int1, + charstring str1 + } + type enumerated MyEnum{ + Perl,Bash,Python + } + type integer MyArray[3]; + type union MyUnion{ + integer int, + float real + } + type record MsgType1{ + integer i, + float k, + boolean b, + verdicttype v, + bitstring bs, + hexstring hs, + octetstring os, + charstring cs, + universal charstring ucs, + CompositeType rec1, + MySet set1, + MyUnion union1, + MyEnum enum1, + MyArray arr1 + } + type record MsgType2{ + integer j + } + + type port MyPort1 message{ + out MsgType1; + in MsgType2; + } + type port MyPort2 message{ + out MsgType2; + in MsgType1; + } + type component Sender{ + port MyPort1 src; + } + + type component Receiver{ + port MyPort2 dst; + } + type component MTC {} + + function make_union() return MyUnion + { + var MyUnion result; + result.int := 1; + return result; + } + + const MsgType1 c_message := { + i := 1, + k := 1.0, + b := true, + v := pass, + bs := '0101'B, + hs := '123ABD'H, + os := 'FF96'O, + cs := """ab""", + ucs := "the", + rec1 := {i:=1}, + set1 := {int1:=1, str1:="the"}, + union1 := make_union(), + enum1 := Bash, + arr1 := {1,2,3} + }; + + template MsgType1 global:= {i := 1, k:=1.0, b:=true, v:=pass, bs:='0101'B, hs:='123ABD'H, + os:='FF96'O, cs:="""ab""", ucs:="the", union1 := make_union(), + rec1:={i:=1}, set1:={int1:=1, str1:="the"}, + enum1:=Bash, arr1:={1,2,3} + }; + + function f_sender() runs on Sender + { + src.send(MsgType1:{ + i := 1, k:=1.0, b:=true, v:=pass, + bs:='0101'B, hs:='123ABD'H, + os:='FF96'O, cs:="""ab""", ucs:="the", + union1 := make_union(), + rec1:={i:=1}, set1:={int1:=1, str1:="the"}, + enum1:=Bash, arr1:={1,2,3} + }); + } + + function f_receiver() runs on Receiver + { + var MsgType1 v_message; + timer t_timer := 3.0; + t_timer.start; + alt + { + [] dst.receive(global) -> value v_message { setverdict(pass); } + [] t_timer.timeout { setverdict(fail); } + } + } + + testcase TC_Sem_13_declaring_msg_006() runs on MTC system MTC + { + var Sender c_sender := Sender.create; + var Receiver c_receiver := Receiver.create; + connect(c_sender:src, c_receiver:dst); + c_sender.start(f_sender()); + c_receiver.start(f_receiver()); + c_sender.done; + c_receiver.done; + } + control{ + + execute(TC_Sem_13_declaring_msg_006()) + + + } +} \ No newline at end of file diff --git a/ATS/core_language/13_messages/13_toplevel/Sem_13_declaring_msg_007.ttcn b/ATS/core_language/13_messages/13_toplevel/Sem_13_declaring_msg_007.ttcn new file mode 100644 index 00000000..f242a2ca --- /dev/null +++ b/ATS/core_language/13_messages/13_toplevel/Sem_13_declaring_msg_007.ttcn @@ -0,0 +1,136 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:24, Ensure instances of messages can be declared and passed via parameter + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +/* + * #reqname /Requirements/13 Declaring messages/Sorts of message insances/Parameter as a message + **/ + + +module Sem_13_declaring_msg_007 { + type record CompositeType{ + integer i + } + type set MySet{ + integer int1, + charstring str1 + } + type enumerated MyEnum{ + Perl,Bash,Python + } + type integer MyArray[3]; + type union MyUnion{ + integer int, + float real + } + type record MsgType1{ + integer i, + float k, + boolean b, + verdicttype v, + bitstring bs, + hexstring hs, + octetstring os, + charstring cs, + universal charstring ucs, + CompositeType rec1, + MySet set1, + MyUnion union1, + MyEnum enum1, + MyArray arr1 + } + type record MsgType2{ + integer j + } + + type port MyPort1 message{ + out MsgType1; + in MsgType2; + } + type port MyPort2 message{ + out MsgType2; + in MsgType1; + } + type component Sender{ + port MyPort1 src; + } + + type component Receiver{ + port MyPort2 dst; + } + type component MTC {} + + function make_union() return MyUnion + { + var MyUnion result; + result.int := 1; + return result; + } + + const MsgType1 c_message := { + i := 1, + k := 1.0, + b := true, + v := pass, + bs := '0101'B, + hs := '123ABD'H, + os := 'FF96'O, + cs := """ab""", + ucs := "the", + rec1 := {i:=1}, + set1 := {int1:=1, str1:="the"}, + union1 := make_union(), + enum1 := Bash, + arr1 := {1,2,3} + }; + + template MsgType1 global:= {i := 1, k:=1.0, b:=true, v:=pass, bs:='0101'B, hs:='123ABD'H, + os:='FF96'O, cs:="""ab""", ucs:="the", union1 := make_union(), + rec1:={i:=1}, set1:={int1:=1, str1:="the"}, + enum1:=Bash, arr1:={1,2,3} + }; + + function f_sender(in MsgType1 v_message) runs on Sender + { + src.send(v_message); + } + + function f_receiver() runs on Receiver + { + var MsgType1 v_message; + timer t_timer := 3.0; + t_timer.start; + alt + { + [] dst.receive(global) -> value v_message { setverdict(pass); } + [] t_timer.timeout { setverdict(fail); } + } + } + + testcase TC_Sem_13_declaring_msg_007() runs on MTC system MTC + { + var MsgType1 v_message := { + i := 1, k:=1.0, b:=true, v:=pass, + bs:='0101'B, hs:='123ABD'H, + os:='FF96'O, cs:="""ab""", ucs:="the", + union1 := make_union(), + rec1:={i:=1}, set1:={int1:=1, str1:="the"}, + enum1:=Bash, arr1:={1,2,3} + }; + var Sender c_sender := Sender.create; + var Receiver c_receiver := Receiver.create; + connect(c_sender:src, c_receiver:dst); + c_sender.start(f_sender(v_message)); + c_receiver.start(f_receiver()); + c_sender.done; + c_receiver.done; + } + control{ + + execute(TC_Sem_13_declaring_msg_007()) + + + } +} \ No newline at end of file diff --git a/ATS/core_language/13_messages/13_toplevel/Sem_13_declaring_msg_008.ttcn b/ATS/core_language/13_messages/13_toplevel/Sem_13_declaring_msg_008.ttcn new file mode 100644 index 00000000..2dd5dc8d --- /dev/null +++ b/ATS/core_language/13_messages/13_toplevel/Sem_13_declaring_msg_008.ttcn @@ -0,0 +1,136 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:24, Ensure instances of messages can be declared and passed via template parameter + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +/* + * #reqname /Requirements/13 Declaring messages/Sorts of message insances/Template parameter as a message + **/ + + +module Sem_13_declaring_msg_008 { + type record CompositeType{ + integer i + } + type set MySet{ + integer int1, + charstring str1 + } + type enumerated MyEnum{ + Perl,Bash,Python + } + type integer MyArray[3]; + type union MyUnion{ + integer int, + float real + } + type record MsgType1{ + integer i, + float k, + boolean b, + verdicttype v, + bitstring bs, + hexstring hs, + octetstring os, + charstring cs, + universal charstring ucs, + CompositeType rec1, + MySet set1, + MyUnion union1, + MyEnum enum1, + MyArray arr1 + } + type record MsgType2{ + integer j + } + + type port MyPort1 message{ + out MsgType1; + in MsgType2; + } + type port MyPort2 message{ + out MsgType2; + in MsgType1; + } + type component Sender{ + port MyPort1 src; + } + + type component Receiver{ + port MyPort2 dst; + } + type component MTC {} + + function make_union() return MyUnion + { + var MyUnion result; + result.int := 1; + return result; + } + + const MsgType1 c_message := { + i := 1, + k := 1.0, + b := true, + v := pass, + bs := '0101'B, + hs := '123ABD'H, + os := 'FF96'O, + cs := """ab""", + ucs := "the", + rec1 := {i:=1}, + set1 := {int1:=1, str1:="the"}, + union1 := make_union(), + enum1 := Bash, + arr1 := {1,2,3} + }; + + template MsgType1 global:= {i := 1, k:=1.0, b:=true, v:=pass, bs:='0101'B, hs:='123ABD'H, + os:='FF96'O, cs:="""ab""", ucs:="the", union1 := make_union(), + rec1:={i:=1}, set1:={int1:=1, str1:="the"}, + enum1:=Bash, arr1:={1,2,3} + }; + + function f_sender(template MsgType1 v_template_message) runs on Sender + { + src.send(v_template_message); + } + + function f_receiver() runs on Receiver + { + var MsgType1 v_message; + timer t_timer := 3.0; + t_timer.start; + alt + { + [] dst.receive(global) -> value v_message { setverdict(pass); } + [] t_timer.timeout { setverdict(fail); } + } + } + + testcase TC_Sem_13_declaring_msg_008() runs on MTC system MTC + { + var template MsgType1 v_template_message := { + i := 1, k:=1.0, b:=true, v:=pass, + bs:='0101'B, hs:='123ABD'H, + os:='FF96'O, cs:="""ab""", ucs:="the", + union1 := make_union(), + rec1:={i:=1}, set1:={int1:=1, str1:="the"}, + enum1:=Bash, arr1:={1,2,3} + }; + var Sender c_sender := Sender.create; + var Receiver c_receiver := Receiver.create; + connect(c_sender:src, c_receiver:dst); + c_sender.start(f_sender(v_template_message)); + c_receiver.start(f_receiver()); + c_sender.done; + c_receiver.done; + } + control{ + + execute(TC_Sem_13_declaring_msg_008()) + + + } +} \ No newline at end of file diff --git a/ATS/core_language/13_messages/13_toplevel/Sem_13_declaring_msg_009.ttcn b/ATS/core_language/13_messages/13_toplevel/Sem_13_declaring_msg_009.ttcn new file mode 100644 index 00000000..3cd6ac72 --- /dev/null +++ b/ATS/core_language/13_messages/13_toplevel/Sem_13_declaring_msg_009.ttcn @@ -0,0 +1,133 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:24, Ensure instances of messages can be declared and passed via template parameter + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +/* + * #reqname /Requirements/13 Declaring messages/Sorts of message insances/Local template as a message + **/ + + +module Sem_13_declaring_msg_009 { + type record CompositeType{ + integer i + } + type set MySet{ + integer int1, + charstring str1 + } + type enumerated MyEnum{ + Perl,Bash,Python + } + type integer MyArray[3]; + type union MyUnion{ + integer int, + float real + } + type record MsgType1{ + integer i, + float k, + boolean b, + verdicttype v, + bitstring bs, + hexstring hs, + octetstring os, + charstring cs, + universal charstring ucs, + CompositeType rec1, + MySet set1, + MyUnion union1, + MyEnum enum1, + MyArray arr1 + } + type record MsgType2{ + integer j + } + + type port MyPort1 message{ + out MsgType1; + in MsgType2; + } + type port MyPort2 message{ + out MsgType2; + in MsgType1; + } + type component Sender{ + port MyPort1 src; + } + + type component Receiver{ + port MyPort2 dst; + } + type component MTC {} + + function make_union() return MyUnion + { + var MyUnion result; + result.int := 1; + return result; + } + + const MsgType1 c_message := { + i := 1, + k := 1.0, + b := true, + v := pass, + bs := '0101'B, + hs := '123ABD'H, + os := 'FF96'O, + cs := """ab""", + ucs := "the", + rec1 := {i:=1}, + set1 := {int1:=1, str1:="the"}, + union1 := make_union(), + enum1 := Bash, + arr1 := {1,2,3} + }; + + template MsgType1 global:= {i := 1, k:=1.0, b:=true, v:=pass, bs:='0101'B, hs:='123ABD'H, + os:='FF96'O, cs:="""ab""", ucs:="the", union1 := make_union(), + rec1:={i:=1}, set1:={int1:=1, str1:="the"}, + enum1:=Bash, arr1:={1,2,3} + }; + + function f_sender() runs on Sender + { + template MsgType1 v_template_message := { + i := 1, k:=1.0, b:=true, v:=pass, + bs:='0101'B, hs:='123ABD'H, + os:='FF96'O, cs:="""ab""", ucs:="the", + union1 := make_union(), + rec1:={i:=1}, set1:={int1:=1, str1:="the"}, + enum1:=Bash, arr1:={1,2,3} + }; + src.send(v_template_message); + } + + function f_receiver() runs on Receiver + { + var MsgType1 v_message; + timer t_timer := 3.0; + t_timer.start; + alt + { + [] dst.receive(global) -> value v_message { setverdict(pass); } + [] t_timer.timeout { setverdict(fail); } + } + } + + testcase TC_Sem_13_declaring_msg_009() runs on MTC system MTC + { + var Sender c_sender := Sender.create; + var Receiver c_receiver := Receiver.create; + connect(c_sender:src, c_receiver:dst); + c_sender.start(f_sender()); + c_receiver.start(f_receiver()); + c_sender.done; + c_receiver.done; + } + control { + execute(TC_Sem_13_declaring_msg_009()) + } +} \ No newline at end of file diff --git a/ATS/core_language/13_messages/13_toplevel/Sem_13_toplevel_declaring_msg_various_types_001.ttcn b/ATS/core_language/13_messages/13_toplevel/Sem_13_toplevel_declaring_msg_various_types_001.ttcn new file mode 100644 index 00000000..423f8603 --- /dev/null +++ b/ATS/core_language/13_messages/13_toplevel/Sem_13_toplevel_declaring_msg_various_types_001.ttcn @@ -0,0 +1,142 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:13, Port with type anytype can send and receive messages of any basic or structured type: 'record' type. + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// #reqname /Requirements/13 Declaring messages/Any type can be declared as type of message in a message port type + + +module Sem_13_toplevel_declaring_msg_various_types_001{ + type record CompositeType{ + integer i + } + type set MySet{ + integer int1, + charstring str1 + } + type enumerated MyEnum{ + Perl,Bash,Python + } + type integer MyArray[3]; + type union MyUnion{ + integer int, + float real + } + type record MsgType1{ + integer i, + float k, + boolean b, + verdicttype v, + bitstring bs, + hexstring hs, + octetstring os, + charstring cs, + universal charstring ucs, + CompositeType rec1, + MySet set1, + MyUnion union1, + MyEnum enum1, + MyArray arr1 + } + type record MsgType2{ + integer j + } + + type port MyPort message{ + inout integer; + inout float; + inout boolean; + inout verdicttype; + inout bitstring; + inout hexstring; + inout octetstring; + inout charstring; + inout universal charstring; + inout CompositeType; + inout MySet; + inout MyUnion; + inout MyEnum; + inout MyArray; + } + + type component Sender{ + timer t_timer := 2.0; + port MyPort src; + } + + type component Receiver{ + port MyPort dst; + } + type component MTC {} + + function make_union() return MyUnion + { + var MyUnion result; + result.int := 1; + return result; + } + + const MsgType1 c_values := { + i := 1, + k := 1.0, + b := true, + v := pass, + bs := '0101'B, + hs := '123ABD'H, + os := 'FF96'O, + cs := "ab", + ucs := "the", + rec1 := {1}, + set1 := {int1:=1, str1:="the"}, + union1 := make_union(), + enum1 := Bash, + arr1 := {1,2,3} + }; + + function f_sender() runs on Sender + { + // CompositeType + t_timer.start; + src.send(c_values.rec1); + alt { + [] src.receive(c_values.rec1) { setverdict(pass); } + [] src.receive { + setverdict(fail, "Unexpected data, expected CompositeType ", c_values.rec1); + stop; + } + [] t_timer.timeout { + setverdict(fail, "No response from echo service"); + stop; + } + } + } + + function f_receiver() runs on Receiver + { + timer t_timer := 30.0; + t_timer.start; + alt + { + [] dst.receive(c_values.rec1) { setverdict(pass); dst.send(c_values.rec1); } + + [] dst.receive { setverdict(fail, "Unexpected messagem expected CompositeType", c_values.rec1); stop; } + [] t_timer.timeout { setverdict(fail, "No more messages"); stop; } + } + } + + testcase TC_Sem_13_toplevel_declaring_msg_various_types_001() runs on MTC system MTC + { + var Sender c_sender := Sender.create; + var Receiver c_receiver := Receiver.create; + connect(c_sender:src, c_receiver:dst); + c_sender.start(f_sender()); + c_receiver.start(f_receiver()); + c_sender.done; + c_receiver.kill; + } + control { + execute(TC_Sem_13_toplevel_declaring_msg_various_types_001()) + } +} diff --git a/ATS/core_language/13_messages/13_toplevel/Sem_13_toplevel_declaring_msg_various_types_002.ttcn b/ATS/core_language/13_messages/13_toplevel/Sem_13_toplevel_declaring_msg_various_types_002.ttcn new file mode 100644 index 00000000..77da73c7 --- /dev/null +++ b/ATS/core_language/13_messages/13_toplevel/Sem_13_toplevel_declaring_msg_various_types_002.ttcn @@ -0,0 +1,142 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:13, Port with type anytype can send and receive messages of any basic or structured type: 'record of' type. + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// #reqname /Requirements/13 Declaring messages/Any type can be declared as type of message in a message port type + + +module Sem_13_toplevel_declaring_msg_various_types_002{ + type record CompositeType{ + integer i + } + type set MySet{ + integer int1, + charstring str1 + } + type enumerated MyEnum{ + Perl,Bash,Python + } + type integer MyArray[3]; + type union MyUnion{ + integer int, + float real + } + type record MsgType1{ + integer i, + float k, + boolean b, + verdicttype v, + bitstring bs, + hexstring hs, + octetstring os, + charstring cs, + universal charstring ucs, + CompositeType rec1, + MySet set1, + MyUnion union1, + MyEnum enum1, + MyArray arr1 + } + type record MsgType2{ + integer j + } + + type port MyPort message{ + inout integer; + inout float; + inout boolean; + inout verdicttype; + inout bitstring; + inout hexstring; + inout octetstring; + inout charstring; + inout universal charstring; + inout CompositeType; + inout MySet; + inout MyUnion; + inout MyEnum; + inout MyArray; + } + + type component Sender{ + timer t_timer := 2.0; + port MyPort src; + } + + type component Receiver{ + port MyPort dst; + } + type component MTC {} + + function make_union() return MyUnion + { + var MyUnion result; + result.int := 1; + return result; + } + + const MsgType1 c_values := { + i := 1, + k := 1.0, + b := true, + v := pass, + bs := '0101'B, + hs := '123ABD'H, + os := 'FF96'O, + cs := "ab", + ucs := "the", + rec1 := {1}, + set1 := {int1:=1, str1:="the"}, + union1 := make_union(), + enum1 := Bash, + arr1 := {1,2,3} + }; + + function f_sender() runs on Sender + { + // MyArray + t_timer.start; + src.send(c_values.arr1); + alt { + [] src.receive(c_values.arr1) { setverdict(pass); } + [] src.receive { + setverdict(fail, "Unexpected data, expected MyArray ", c_values.arr1); + stop; + } + [] t_timer.timeout { + setverdict(fail, "No response from echo service"); + stop; + } + } + } + + function f_receiver() runs on Receiver + { + timer t_timer := 30.0; + t_timer.start; + alt + { + [] dst.receive(c_values.arr1) { setverdict(pass); dst.send(c_values.arr1); } + + [] dst.receive { setverdict(fail, "Unexpected messagem expected MyArray", c_values.arr1); stop; } + [] t_timer.timeout { setverdict(fail, "No more messages"); stop; } + } + } + + testcase TC_Sem_13_toplevel_declaring_msg_various_types_002() runs on MTC system MTC + { + var Sender c_sender := Sender.create; + var Receiver c_receiver := Receiver.create; + connect(c_sender:src, c_receiver:dst); + c_sender.start(f_sender()); + c_receiver.start(f_receiver()); + c_sender.done; + c_receiver.kill; + } + control { + execute(TC_Sem_13_toplevel_declaring_msg_various_types_002()) + } +} diff --git a/ATS/core_language/13_messages/13_toplevel/Sem_13_toplevel_declaring_msg_various_types_003.ttcn b/ATS/core_language/13_messages/13_toplevel/Sem_13_toplevel_declaring_msg_various_types_003.ttcn new file mode 100644 index 00000000..e9695fa8 --- /dev/null +++ b/ATS/core_language/13_messages/13_toplevel/Sem_13_toplevel_declaring_msg_various_types_003.ttcn @@ -0,0 +1,142 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:13, Port with type anytype can send and receive messages of any basic or structured type: 'enum' type. + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// #reqname /Requirements/13 Declaring messages/Any type can be declared as type of message in a message port type + + +module Sem_13_toplevel_declaring_msg_various_types_003{ + type record CompositeType{ + integer i + } + type set MySet{ + integer int1, + charstring str1 + } + type enumerated MyEnum{ + Perl,Bash,Python + } + type integer MyArray[3]; + type union MyUnion{ + integer int, + float real + } + type record MsgType1{ + integer i, + float k, + boolean b, + verdicttype v, + bitstring bs, + hexstring hs, + octetstring os, + charstring cs, + universal charstring ucs, + CompositeType rec1, + MySet set1, + MyUnion union1, + MyEnum enum1, + MyArray arr1 + } + type record MsgType2{ + integer j + } + + type port MyPort message{ + inout integer; + inout float; + inout boolean; + inout verdicttype; + inout bitstring; + inout hexstring; + inout octetstring; + inout charstring; + inout universal charstring; + inout CompositeType; + inout MySet; + inout MyUnion; + inout MyEnum; + inout MyArray; + } + + type component Sender{ + timer t_timer := 2.0; + port MyPort src; + } + + type component Receiver{ + port MyPort dst; + } + type component MTC {} + + function make_union() return MyUnion + { + var MyUnion result; + result.int := 1; + return result; + } + + const MsgType1 c_values := { + i := 1, + k := 1.0, + b := true, + v := pass, + bs := '0101'B, + hs := '123ABD'H, + os := 'FF96'O, + cs := "ab", + ucs := "the", + rec1 := {1}, + set1 := {int1:=1, str1:="the"}, + union1 := make_union(), + enum1 := Bash, + arr1 := {1,2,3} + }; + + function f_sender() runs on Sender + { + // MyEnum + t_timer.start; + src.send(c_values.enum1); + alt { + [] src.receive(c_values.enum1) { setverdict(pass); } + [] src.receive { + setverdict(fail, "Unexpected data, expected MyEnum ", c_values.enum1); + stop; + } + [] t_timer.timeout { + setverdict(fail, "No response from echo service"); + stop; + } + } + } + + function f_receiver() runs on Receiver + { + timer t_timer := 30.0; + t_timer.start; + alt + { + [] dst.receive(c_values.enum1) { setverdict(pass); dst.send(c_values.enum1); } + + [] dst.receive { setverdict(fail, "Unexpected messagem expected MyEnum", c_values.enum1); stop; } + [] t_timer.timeout { setverdict(fail, "No more messages"); stop; } + } + } + + testcase TC_Sem_13_toplevel_declaring_msg_various_types_003() runs on MTC system MTC + { + var Sender c_sender := Sender.create; + var Receiver c_receiver := Receiver.create; + connect(c_sender:src, c_receiver:dst); + c_sender.start(f_sender()); + c_receiver.start(f_receiver()); + c_sender.done; + c_receiver.kill; + } + control { + execute(TC_Sem_13_toplevel_declaring_msg_various_types_003()) + } +} diff --git a/ATS/core_language/13_messages/13_toplevel/Sem_13_toplevel_declaring_msg_various_types_004.ttcn b/ATS/core_language/13_messages/13_toplevel/Sem_13_toplevel_declaring_msg_various_types_004.ttcn new file mode 100644 index 00000000..47627c67 --- /dev/null +++ b/ATS/core_language/13_messages/13_toplevel/Sem_13_toplevel_declaring_msg_various_types_004.ttcn @@ -0,0 +1,142 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:13, Port with type anytype can send and receive messages of any basic or structured type: 'set' type. + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// #reqname /Requirements/13 Declaring messages/Any type can be declared as type of message in a message port type + + +module Sem_13_toplevel_declaring_msg_various_types_004{ + type record CompositeType{ + integer i + } + type set MySet{ + integer int1, + charstring str1 + } + type enumerated MyEnum{ + Perl,Bash,Python + } + type integer MyArray[3]; + type union MyUnion{ + integer int, + float real + } + type record MsgType1{ + integer i, + float k, + boolean b, + verdicttype v, + bitstring bs, + hexstring hs, + octetstring os, + charstring cs, + universal charstring ucs, + CompositeType rec1, + MySet set1, + MyUnion union1, + MyEnum enum1, + MyArray arr1 + } + type record MsgType2{ + integer j + } + + type port MyPort message{ + inout integer; + inout float; + inout boolean; + inout verdicttype; + inout bitstring; + inout hexstring; + inout octetstring; + inout charstring; + inout universal charstring; + inout CompositeType; + inout MySet; + inout MyUnion; + inout MyEnum; + inout MyArray; + } + + type component Sender{ + timer t_timer := 2.0; + port MyPort src; + } + + type component Receiver{ + port MyPort dst; + } + type component MTC {} + + function make_union() return MyUnion + { + var MyUnion result; + result.int := 1; + return result; + } + + const MsgType1 c_values := { + i := 1, + k := 1.0, + b := true, + v := pass, + bs := '0101'B, + hs := '123ABD'H, + os := 'FF96'O, + cs := "ab", + ucs := "the", + rec1 := {1}, + set1 := {int1:=1, str1:="the"}, + union1 := make_union(), + enum1 := Bash, + arr1 := {1,2,3} + }; + + function f_sender() runs on Sender + { + // MySet + t_timer.start; + src.send(c_values.set1); + alt { + [] src.receive(c_values.set1) { setverdict(pass); } + [] src.receive { + setverdict(fail, "Unexpected data, expected MySet ", c_values.set1); + stop; + } + [] t_timer.timeout { + setverdict(fail, "No response from echo service"); + stop; + } + } + } + + function f_receiver() runs on Receiver + { + timer t_timer := 30.0; + t_timer.start; + alt + { + [] dst.receive(c_values.set1) { setverdict(pass); dst.send(c_values.set1); } + + [] dst.receive { setverdict(fail, "Unexpected messagem expected MySet", c_values.set1); stop; } + [] t_timer.timeout { setverdict(fail, "No more messages"); stop; } + } + } + + testcase TC_Sem_13_toplevel_declaring_msg_various_types_004() runs on MTC system MTC + { + var Sender c_sender := Sender.create; + var Receiver c_receiver := Receiver.create; + connect(c_sender:src, c_receiver:dst); + c_sender.start(f_sender()); + c_receiver.start(f_receiver()); + c_sender.done; + c_receiver.kill; + } + control { + execute(TC_Sem_13_toplevel_declaring_msg_various_types_004()) + } +} diff --git a/ATS/core_language/13_messages/13_toplevel/Sem_13_toplevel_declaring_msg_various_types_005.ttcn b/ATS/core_language/13_messages/13_toplevel/Sem_13_toplevel_declaring_msg_various_types_005.ttcn new file mode 100644 index 00000000..a2bf711a --- /dev/null +++ b/ATS/core_language/13_messages/13_toplevel/Sem_13_toplevel_declaring_msg_various_types_005.ttcn @@ -0,0 +1,142 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:13, Port with type anytype can send and receive messages of any basic or structured type: 'union' type. + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// #reqname /Requirements/13 Declaring messages/Any type can be declared as type of message in a message port type + + +module Sem_13_toplevel_declaring_msg_various_types_005{ + type record CompositeType{ + integer i + } + type set MySet{ + integer int1, + charstring str1 + } + type enumerated MyEnum{ + Perl,Bash,Python + } + type integer MyArray[3]; + type union MyUnion{ + integer int, + float real + } + type record MsgType1{ + integer i, + float k, + boolean b, + verdicttype v, + bitstring bs, + hexstring hs, + octetstring os, + charstring cs, + universal charstring ucs, + CompositeType rec1, + MySet set1, + MyUnion union1, + MyEnum enum1, + MyArray arr1 + } + type record MsgType2{ + integer j + } + + type port MyPort message{ + inout integer; + inout float; + inout boolean; + inout verdicttype; + inout bitstring; + inout hexstring; + inout octetstring; + inout charstring; + inout universal charstring; + inout CompositeType; + inout MySet; + inout MyUnion; + inout MyEnum; + inout MyArray; + } + + type component Sender{ + timer t_timer := 2.0; + port MyPort src; + } + + type component Receiver{ + port MyPort dst; + } + type component MTC {} + + function make_union() return MyUnion + { + var MyUnion result; + result.int := 1; + return result; + } + + const MsgType1 c_values := { + i := 1, + k := 1.0, + b := true, + v := pass, + bs := '0101'B, + hs := '123ABD'H, + os := 'FF96'O, + cs := "ab", + ucs := "the", + rec1 := {1}, + set1 := {int1:=1, str1:="the"}, + union1 := make_union(), + enum1 := Bash, + arr1 := {1,2,3} + }; + + function f_sender() runs on Sender + { + // MyUnion + t_timer.start; + src.send(c_values.union1); + alt { + [] src.receive(c_values.union1) { setverdict(pass); } + [] src.receive { + setverdict(fail, "Unexpected data, expected MyUnion ", c_values.union1); + stop; + } + [] t_timer.timeout { + setverdict(fail, "No response from echo service"); + stop; + } + } + } + + function f_receiver() runs on Receiver + { + timer t_timer := 30.0; + t_timer.start; + alt + { + [] dst.receive(c_values.union1) { setverdict(pass); dst.send(c_values.union1); } + + [] dst.receive { setverdict(fail, "Unexpected messagem expected MyUnion", c_values.union1); stop; } + [] t_timer.timeout { setverdict(fail, "No more messages"); stop; } + } + } + + testcase TC_Sem_13_toplevel_declaring_msg_various_types_005() runs on MTC system MTC + { + var Sender c_sender := Sender.create; + var Receiver c_receiver := Receiver.create; + connect(c_sender:src, c_receiver:dst); + c_sender.start(f_sender()); + c_receiver.start(f_receiver()); + c_sender.done; + c_receiver.kill; + } + control { + execute(TC_Sem_13_toplevel_declaring_msg_various_types_005()) + } +} diff --git a/ATS/core_language/13_messages/13_toplevel/Sem_13_toplevel_declaring_msg_various_types_006.ttcn b/ATS/core_language/13_messages/13_toplevel/Sem_13_toplevel_declaring_msg_various_types_006.ttcn new file mode 100644 index 00000000..01dc5d2b --- /dev/null +++ b/ATS/core_language/13_messages/13_toplevel/Sem_13_toplevel_declaring_msg_various_types_006.ttcn @@ -0,0 +1,142 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:13, Port with type anytype can send and receive messages of any basic or structured type: 'bitstring' type. + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// #reqname /Requirements/13 Declaring messages/Any type can be declared as type of message in a message port type + + +module Sem_13_toplevel_declaring_msg_various_types_006{ + type record CompositeType{ + integer i + } + type set MySet{ + integer int1, + charstring str1 + } + type enumerated MyEnum{ + Perl,Bash,Python + } + type integer MyArray[3]; + type union MyUnion{ + integer int, + float real + } + type record MsgType1{ + integer i, + float k, + boolean b, + verdicttype v, + bitstring bs, + hexstring hs, + octetstring os, + charstring cs, + universal charstring ucs, + CompositeType rec1, + MySet set1, + MyUnion union1, + MyEnum enum1, + MyArray arr1 + } + type record MsgType2{ + integer j + } + + type port MyPort message{ + inout integer; + inout float; + inout boolean; + inout verdicttype; + inout bitstring; + inout hexstring; + inout octetstring; + inout charstring; + inout universal charstring; + inout CompositeType; + inout MySet; + inout MyUnion; + inout MyEnum; + inout MyArray; + } + + type component Sender{ + timer t_timer := 2.0; + port MyPort src; + } + + type component Receiver{ + port MyPort dst; + } + type component MTC {} + + function make_union() return MyUnion + { + var MyUnion result; + result.int := 1; + return result; + } + + const MsgType1 c_values := { + i := 1, + k := 1.0, + b := true, + v := pass, + bs := '0101'B, + hs := '123ABD'H, + os := 'FF96'O, + cs := "ab", + ucs := "the", + rec1 := {1}, + set1 := {int1:=1, str1:="the"}, + union1 := make_union(), + enum1 := Bash, + arr1 := {1,2,3} + }; + + function f_sender() runs on Sender + { + // bitstring + t_timer.start; + src.send(c_values.bs); + alt { + [] src.receive(c_values.bs) { setverdict(pass); } + [] src.receive { + setverdict(fail, "Unexpected data, expected bitstring ", c_values.bs); + stop; + } + [] t_timer.timeout { + setverdict(fail, "No response from echo service"); + stop; + } + } + } + + function f_receiver() runs on Receiver + { + timer t_timer := 30.0; + t_timer.start; + alt + { + [] dst.receive(c_values.bs) { setverdict(pass); dst.send(c_values.bs); } + + [] dst.receive { setverdict(fail, "Unexpected messagem expected bitstring", c_values.bs); stop; } + [] t_timer.timeout { setverdict(fail, "No more messages"); stop; } + } + } + + testcase TC_Sem_13_toplevel_declaring_msg_various_types_006() runs on MTC system MTC + { + var Sender c_sender := Sender.create; + var Receiver c_receiver := Receiver.create; + connect(c_sender:src, c_receiver:dst); + c_sender.start(f_sender()); + c_receiver.start(f_receiver()); + c_sender.done; + c_receiver.kill; + } + control { + execute(TC_Sem_13_toplevel_declaring_msg_various_types_006()) + } +} diff --git a/ATS/core_language/13_messages/13_toplevel/Sem_13_toplevel_declaring_msg_various_types_007.ttcn b/ATS/core_language/13_messages/13_toplevel/Sem_13_toplevel_declaring_msg_various_types_007.ttcn new file mode 100644 index 00000000..ed17724e --- /dev/null +++ b/ATS/core_language/13_messages/13_toplevel/Sem_13_toplevel_declaring_msg_various_types_007.ttcn @@ -0,0 +1,142 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:13, Port with type anytype can send and receive messages of any basic or structured type: 'boolean' type. + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// #reqname /Requirements/13 Declaring messages/Any type can be declared as type of message in a message port type + + +module Sem_13_toplevel_declaring_msg_various_types_007{ + type record CompositeType{ + integer i + } + type set MySet{ + integer int1, + charstring str1 + } + type enumerated MyEnum{ + Perl,Bash,Python + } + type integer MyArray[3]; + type union MyUnion{ + integer int, + float real + } + type record MsgType1{ + integer i, + float k, + boolean b, + verdicttype v, + bitstring bs, + hexstring hs, + octetstring os, + charstring cs, + universal charstring ucs, + CompositeType rec1, + MySet set1, + MyUnion union1, + MyEnum enum1, + MyArray arr1 + } + type record MsgType2{ + integer j + } + + type port MyPort message{ + inout integer; + inout float; + inout boolean; + inout verdicttype; + inout bitstring; + inout hexstring; + inout octetstring; + inout charstring; + inout universal charstring; + inout CompositeType; + inout MySet; + inout MyUnion; + inout MyEnum; + inout MyArray; + } + + type component Sender{ + timer t_timer := 2.0; + port MyPort src; + } + + type component Receiver{ + port MyPort dst; + } + type component MTC {} + + function make_union() return MyUnion + { + var MyUnion result; + result.int := 1; + return result; + } + + const MsgType1 c_values := { + i := 1, + k := 1.0, + b := true, + v := pass, + bs := '0101'B, + hs := '123ABD'H, + os := 'FF96'O, + cs := "ab", + ucs := "the", + rec1 := {1}, + set1 := {int1:=1, str1:="the"}, + union1 := make_union(), + enum1 := Bash, + arr1 := {1,2,3} + }; + + function f_sender() runs on Sender + { + // boolean + t_timer.start; + src.send(c_values.b); + alt { + [] src.receive(c_values.b) { setverdict(pass); } + [] src.receive { + setverdict(fail, "Unexpected data, expected boolean ", c_values.b); + stop; + } + [] t_timer.timeout { + setverdict(fail, "No response from echo service"); + stop; + } + } + } + + function f_receiver() runs on Receiver + { + timer t_timer := 30.0; + t_timer.start; + alt + { + [] dst.receive(c_values.b) { setverdict(pass); dst.send(c_values.b); } + + [] dst.receive { setverdict(fail, "Unexpected messagem expected boolean", c_values.b); stop; } + [] t_timer.timeout { setverdict(fail, "No more messages"); stop; } + } + } + + testcase TC_Sem_13_toplevel_declaring_msg_various_types_007() runs on MTC system MTC + { + var Sender c_sender := Sender.create; + var Receiver c_receiver := Receiver.create; + connect(c_sender:src, c_receiver:dst); + c_sender.start(f_sender()); + c_receiver.start(f_receiver()); + c_sender.done; + c_receiver.kill; + } + control { + execute(TC_Sem_13_toplevel_declaring_msg_various_types_007()) + } +} diff --git a/ATS/core_language/13_messages/13_toplevel/Sem_13_toplevel_declaring_msg_various_types_008.ttcn b/ATS/core_language/13_messages/13_toplevel/Sem_13_toplevel_declaring_msg_various_types_008.ttcn new file mode 100644 index 00000000..94cd25f7 --- /dev/null +++ b/ATS/core_language/13_messages/13_toplevel/Sem_13_toplevel_declaring_msg_various_types_008.ttcn @@ -0,0 +1,142 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:13, Port with type anytype can send and receive messages of any basic or structured type: 'charstring' type. + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// #reqname /Requirements/13 Declaring messages/Any type can be declared as type of message in a message port type + + +module Sem_13_toplevel_declaring_msg_various_types_008{ + type record CompositeType{ + integer i + } + type set MySet{ + integer int1, + charstring str1 + } + type enumerated MyEnum{ + Perl,Bash,Python + } + type integer MyArray[3]; + type union MyUnion{ + integer int, + float real + } + type record MsgType1{ + integer i, + float k, + boolean b, + verdicttype v, + bitstring bs, + hexstring hs, + octetstring os, + charstring cs, + universal charstring ucs, + CompositeType rec1, + MySet set1, + MyUnion union1, + MyEnum enum1, + MyArray arr1 + } + type record MsgType2{ + integer j + } + + type port MyPort message{ + inout integer; + inout float; + inout boolean; + inout verdicttype; + inout bitstring; + inout hexstring; + inout octetstring; + inout charstring; + inout universal charstring; + inout CompositeType; + inout MySet; + inout MyUnion; + inout MyEnum; + inout MyArray; + } + + type component Sender{ + timer t_timer := 2.0; + port MyPort src; + } + + type component Receiver{ + port MyPort dst; + } + type component MTC {} + + function make_union() return MyUnion + { + var MyUnion result; + result.int := 1; + return result; + } + + const MsgType1 c_values := { + i := 1, + k := 1.0, + b := true, + v := pass, + bs := '0101'B, + hs := '123ABD'H, + os := 'FF96'O, + cs := "ab", + ucs := "the", + rec1 := {1}, + set1 := {int1:=1, str1:="the"}, + union1 := make_union(), + enum1 := Bash, + arr1 := {1,2,3} + }; + + function f_sender() runs on Sender + { + // charstring + t_timer.start; + src.send(c_values.cs); + alt { + [] src.receive(c_values.cs) { setverdict(pass); } + [] src.receive { + setverdict(fail, "Unexpected data, expected charstring ", c_values.cs); + stop; + } + [] t_timer.timeout { + setverdict(fail, "No response from echo service"); + stop; + } + } + } + + function f_receiver() runs on Receiver + { + timer t_timer := 30.0; + t_timer.start; + alt + { + [] dst.receive(c_values.cs) { setverdict(pass); dst.send(c_values.cs); } + + [] dst.receive { setverdict(fail, "Unexpected messagem expected charstring", c_values.cs); stop; } + [] t_timer.timeout { setverdict(fail, "No more messages"); stop; } + } + } + + testcase TC_Sem_13_toplevel_declaring_msg_various_types_008() runs on MTC system MTC + { + var Sender c_sender := Sender.create; + var Receiver c_receiver := Receiver.create; + connect(c_sender:src, c_receiver:dst); + c_sender.start(f_sender()); + c_receiver.start(f_receiver()); + c_sender.done; + c_receiver.kill; + } + control { + execute(TC_Sem_13_toplevel_declaring_msg_various_types_008()) + } +} diff --git a/ATS/core_language/13_messages/13_toplevel/Sem_13_toplevel_declaring_msg_various_types_009.ttcn b/ATS/core_language/13_messages/13_toplevel/Sem_13_toplevel_declaring_msg_various_types_009.ttcn new file mode 100644 index 00000000..47ce6fc2 --- /dev/null +++ b/ATS/core_language/13_messages/13_toplevel/Sem_13_toplevel_declaring_msg_various_types_009.ttcn @@ -0,0 +1,142 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:13, Port with type anytype can send and receive messages of any basic or structured type: 'float' type. + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// #reqname /Requirements/13 Declaring messages/Any type can be declared as type of message in a message port type + + +module Sem_13_toplevel_declaring_msg_various_types_009{ + type record CompositeType{ + integer i + } + type set MySet{ + integer int1, + charstring str1 + } + type enumerated MyEnum{ + Perl,Bash,Python + } + type integer MyArray[3]; + type union MyUnion{ + integer int, + float real + } + type record MsgType1{ + integer i, + float k, + boolean b, + verdicttype v, + bitstring bs, + hexstring hs, + octetstring os, + charstring cs, + universal charstring ucs, + CompositeType rec1, + MySet set1, + MyUnion union1, + MyEnum enum1, + MyArray arr1 + } + type record MsgType2{ + integer j + } + + type port MyPort message{ + inout integer; + inout float; + inout boolean; + inout verdicttype; + inout bitstring; + inout hexstring; + inout octetstring; + inout charstring; + inout universal charstring; + inout CompositeType; + inout MySet; + inout MyUnion; + inout MyEnum; + inout MyArray; + } + + type component Sender{ + timer t_timer := 2.0; + port MyPort src; + } + + type component Receiver{ + port MyPort dst; + } + type component MTC {} + + function make_union() return MyUnion + { + var MyUnion result; + result.int := 1; + return result; + } + + const MsgType1 c_values := { + i := 1, + k := 1.0, + b := true, + v := pass, + bs := '0101'B, + hs := '123ABD'H, + os := 'FF96'O, + cs := "ab", + ucs := "the", + rec1 := {1}, + set1 := {int1:=1, str1:="the"}, + union1 := make_union(), + enum1 := Bash, + arr1 := {1,2,3} + }; + + function f_sender() runs on Sender + { + // float + t_timer.start; + src.send(c_values.k); + alt { + [] src.receive(c_values.k) { setverdict(pass); } + [] src.receive { + setverdict(fail, "Unexpected data, expected float ", c_values.k); + stop; + } + [] t_timer.timeout { + setverdict(fail, "No response from echo service"); + stop; + } + } + } + + function f_receiver() runs on Receiver + { + timer t_timer := 30.0; + t_timer.start; + alt + { + [] dst.receive(c_values.k) { setverdict(pass); dst.send(c_values.k); } + + [] dst.receive { setverdict(fail, "Unexpected messagem expected float", c_values.k); stop; } + [] t_timer.timeout { setverdict(fail, "No more messages"); stop; } + } + } + + testcase TC_Sem_13_toplevel_declaring_msg_various_types_009() runs on MTC system MTC + { + var Sender c_sender := Sender.create; + var Receiver c_receiver := Receiver.create; + connect(c_sender:src, c_receiver:dst); + c_sender.start(f_sender()); + c_receiver.start(f_receiver()); + c_sender.done; + c_receiver.kill; + } + control { + execute(TC_Sem_13_toplevel_declaring_msg_various_types_009()) + } +} diff --git a/ATS/core_language/13_messages/13_toplevel/Sem_13_toplevel_declaring_msg_various_types_010.ttcn b/ATS/core_language/13_messages/13_toplevel/Sem_13_toplevel_declaring_msg_various_types_010.ttcn new file mode 100644 index 00000000..705bd0b8 --- /dev/null +++ b/ATS/core_language/13_messages/13_toplevel/Sem_13_toplevel_declaring_msg_various_types_010.ttcn @@ -0,0 +1,142 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:13, Port with type anytype can send and receive messages of any basic or structured type: 'hexstring' type. + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// #reqname /Requirements/13 Declaring messages/Any type can be declared as type of message in a message port type + + +module Sem_13_toplevel_declaring_msg_various_types_010{ + type record CompositeType{ + integer i + } + type set MySet{ + integer int1, + charstring str1 + } + type enumerated MyEnum{ + Perl,Bash,Python + } + type integer MyArray[3]; + type union MyUnion{ + integer int, + float real + } + type record MsgType1{ + integer i, + float k, + boolean b, + verdicttype v, + bitstring bs, + hexstring hs, + octetstring os, + charstring cs, + universal charstring ucs, + CompositeType rec1, + MySet set1, + MyUnion union1, + MyEnum enum1, + MyArray arr1 + } + type record MsgType2{ + integer j + } + + type port MyPort message{ + inout integer; + inout float; + inout boolean; + inout verdicttype; + inout bitstring; + inout hexstring; + inout octetstring; + inout charstring; + inout universal charstring; + inout CompositeType; + inout MySet; + inout MyUnion; + inout MyEnum; + inout MyArray; + } + + type component Sender{ + timer t_timer := 2.0; + port MyPort src; + } + + type component Receiver{ + port MyPort dst; + } + type component MTC {} + + function make_union() return MyUnion + { + var MyUnion result; + result.int := 1; + return result; + } + + const MsgType1 c_values := { + i := 1, + k := 1.0, + b := true, + v := pass, + bs := '0101'B, + hs := '123ABD'H, + os := 'FF96'O, + cs := "ab", + ucs := "the", + rec1 := {1}, + set1 := {int1:=1, str1:="the"}, + union1 := make_union(), + enum1 := Bash, + arr1 := {1,2,3} + }; + + function f_sender() runs on Sender + { + // hexstring + t_timer.start; + src.send(c_values.hs); + alt { + [] src.receive(c_values.hs) { setverdict(pass); } + [] src.receive { + setverdict(fail, "Unexpected data, expected hexstring ", c_values.hs); + stop; + } + [] t_timer.timeout { + setverdict(fail, "No response from echo service"); + stop; + } + } + } + + function f_receiver() runs on Receiver + { + timer t_timer := 30.0; + t_timer.start; + alt + { + [] dst.receive(c_values.hs) { setverdict(pass); dst.send(c_values.hs); } + + [] dst.receive { setverdict(fail, "Unexpected messagem expected hexstring", c_values.hs); stop; } + [] t_timer.timeout { setverdict(fail, "No more messages"); stop; } + } + } + + testcase TC_Sem_13_toplevel_declaring_msg_various_types_010() runs on MTC system MTC + { + var Sender c_sender := Sender.create; + var Receiver c_receiver := Receiver.create; + connect(c_sender:src, c_receiver:dst); + c_sender.start(f_sender()); + c_receiver.start(f_receiver()); + c_sender.done; + c_receiver.kill; + } + control { + execute(TC_Sem_13_toplevel_declaring_msg_various_types_010()) + } +} diff --git a/ATS/core_language/13_messages/13_toplevel/Sem_13_toplevel_declaring_msg_various_types_011.ttcn b/ATS/core_language/13_messages/13_toplevel/Sem_13_toplevel_declaring_msg_various_types_011.ttcn new file mode 100644 index 00000000..b36aa92d --- /dev/null +++ b/ATS/core_language/13_messages/13_toplevel/Sem_13_toplevel_declaring_msg_various_types_011.ttcn @@ -0,0 +1,142 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:13, Port with type anytype can send and receive messages of any basic or structured type: 'integer' type. + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// #reqname /Requirements/13 Declaring messages/Any type can be declared as type of message in a message port type + + +module Sem_13_toplevel_declaring_msg_various_types_011{ + type record CompositeType{ + integer i + } + type set MySet{ + integer int1, + charstring str1 + } + type enumerated MyEnum{ + Perl,Bash,Python + } + type integer MyArray[3]; + type union MyUnion{ + integer int, + float real + } + type record MsgType1{ + integer i, + float k, + boolean b, + verdicttype v, + bitstring bs, + hexstring hs, + octetstring os, + charstring cs, + universal charstring ucs, + CompositeType rec1, + MySet set1, + MyUnion union1, + MyEnum enum1, + MyArray arr1 + } + type record MsgType2{ + integer j + } + + type port MyPort message{ + inout integer; + inout float; + inout boolean; + inout verdicttype; + inout bitstring; + inout hexstring; + inout octetstring; + inout charstring; + inout universal charstring; + inout CompositeType; + inout MySet; + inout MyUnion; + inout MyEnum; + inout MyArray; + } + + type component Sender{ + timer t_timer := 2.0; + port MyPort src; + } + + type component Receiver{ + port MyPort dst; + } + type component MTC {} + + function make_union() return MyUnion + { + var MyUnion result; + result.int := 1; + return result; + } + + const MsgType1 c_values := { + i := 1, + k := 1.0, + b := true, + v := pass, + bs := '0101'B, + hs := '123ABD'H, + os := 'FF96'O, + cs := "ab", + ucs := "the", + rec1 := {1}, + set1 := {int1:=1, str1:="the"}, + union1 := make_union(), + enum1 := Bash, + arr1 := {1,2,3} + }; + + function f_sender() runs on Sender + { + // integer + t_timer.start; + src.send(c_values.i); + alt { + [] src.receive(c_values.i) { setverdict(pass); } + [] src.receive { + setverdict(fail, "Unexpected data, expected integer ", c_values.i); + stop; + } + [] t_timer.timeout { + setverdict(fail, "No response from echo service"); + stop; + } + } + } + + function f_receiver() runs on Receiver + { + timer t_timer := 30.0; + t_timer.start; + alt + { + [] dst.receive(c_values.i) { setverdict(pass); dst.send(c_values.i); } + + [] dst.receive { setverdict(fail, "Unexpected messagem expected integer", c_values.i); stop; } + [] t_timer.timeout { setverdict(fail, "No more messages"); stop; } + } + } + + testcase TC_Sem_13_toplevel_declaring_msg_various_types_011() runs on MTC system MTC + { + var Sender c_sender := Sender.create; + var Receiver c_receiver := Receiver.create; + connect(c_sender:src, c_receiver:dst); + c_sender.start(f_sender()); + c_receiver.start(f_receiver()); + c_sender.done; + c_receiver.kill; + } + control { + execute(TC_Sem_13_toplevel_declaring_msg_various_types_011()) + } +} diff --git a/ATS/core_language/13_messages/13_toplevel/Sem_13_toplevel_declaring_msg_various_types_012.ttcn b/ATS/core_language/13_messages/13_toplevel/Sem_13_toplevel_declaring_msg_various_types_012.ttcn new file mode 100644 index 00000000..42bf86a6 --- /dev/null +++ b/ATS/core_language/13_messages/13_toplevel/Sem_13_toplevel_declaring_msg_various_types_012.ttcn @@ -0,0 +1,142 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:13, Port with type anytype can send and receive messages of any basic or structured type: 'octetstring' type. + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// #reqname /Requirements/13 Declaring messages/Any type can be declared as type of message in a message port type + + +module Sem_13_toplevel_declaring_msg_various_types_012{ + type record CompositeType{ + integer i + } + type set MySet{ + integer int1, + charstring str1 + } + type enumerated MyEnum{ + Perl,Bash,Python + } + type integer MyArray[3]; + type union MyUnion{ + integer int, + float real + } + type record MsgType1{ + integer i, + float k, + boolean b, + verdicttype v, + bitstring bs, + hexstring hs, + octetstring os, + charstring cs, + universal charstring ucs, + CompositeType rec1, + MySet set1, + MyUnion union1, + MyEnum enum1, + MyArray arr1 + } + type record MsgType2{ + integer j + } + + type port MyPort message{ + inout integer; + inout float; + inout boolean; + inout verdicttype; + inout bitstring; + inout hexstring; + inout octetstring; + inout charstring; + inout universal charstring; + inout CompositeType; + inout MySet; + inout MyUnion; + inout MyEnum; + inout MyArray; + } + + type component Sender{ + timer t_timer := 2.0; + port MyPort src; + } + + type component Receiver{ + port MyPort dst; + } + type component MTC {} + + function make_union() return MyUnion + { + var MyUnion result; + result.int := 1; + return result; + } + + const MsgType1 c_values := { + i := 1, + k := 1.0, + b := true, + v := pass, + bs := '0101'B, + hs := '123ABD'H, + os := 'FF96'O, + cs := "ab", + ucs := "the", + rec1 := {1}, + set1 := {int1:=1, str1:="the"}, + union1 := make_union(), + enum1 := Bash, + arr1 := {1,2,3} + }; + + function f_sender() runs on Sender + { + // octetstring + t_timer.start; + src.send(c_values.os); + alt { + [] src.receive(c_values.os) { setverdict(pass); } + [] src.receive { + setverdict(fail, "Unexpected data, expected octetstring ", c_values.os); + stop; + } + [] t_timer.timeout { + setverdict(fail, "No response from echo service"); + stop; + } + } + } + + function f_receiver() runs on Receiver + { + timer t_timer := 30.0; + t_timer.start; + alt + { + [] dst.receive(c_values.os) { setverdict(pass); dst.send(c_values.os); } + + [] dst.receive { setverdict(fail, "Unexpected messagem expected octetstring", c_values.os); stop; } + [] t_timer.timeout { setverdict(fail, "No more messages"); stop; } + } + } + + testcase TC_Sem_13_toplevel_declaring_msg_various_types_012() runs on MTC system MTC + { + var Sender c_sender := Sender.create; + var Receiver c_receiver := Receiver.create; + connect(c_sender:src, c_receiver:dst); + c_sender.start(f_sender()); + c_receiver.start(f_receiver()); + c_sender.done; + c_receiver.kill; + } + control { + execute(TC_Sem_13_toplevel_declaring_msg_various_types_012()) + } +} diff --git a/ATS/core_language/13_messages/13_toplevel/Sem_13_toplevel_declaring_msg_various_types_013.ttcn b/ATS/core_language/13_messages/13_toplevel/Sem_13_toplevel_declaring_msg_various_types_013.ttcn new file mode 100644 index 00000000..b6e46b68 --- /dev/null +++ b/ATS/core_language/13_messages/13_toplevel/Sem_13_toplevel_declaring_msg_various_types_013.ttcn @@ -0,0 +1,142 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:13, Port with type anytype can send and receive messages of any basic or structured type: 'universal charstring' type. + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// #reqname /Requirements/13 Declaring messages/Any type can be declared as type of message in a message port type + + +module Sem_13_toplevel_declaring_msg_various_types_013{ + type record CompositeType{ + integer i + } + type set MySet{ + integer int1, + charstring str1 + } + type enumerated MyEnum{ + Perl,Bash,Python + } + type integer MyArray[3]; + type union MyUnion{ + integer int, + float real + } + type record MsgType1{ + integer i, + float k, + boolean b, + verdicttype v, + bitstring bs, + hexstring hs, + octetstring os, + charstring cs, + universal charstring ucs, + CompositeType rec1, + MySet set1, + MyUnion union1, + MyEnum enum1, + MyArray arr1 + } + type record MsgType2{ + integer j + } + + type port MyPort message{ + inout integer; + inout float; + inout boolean; + inout verdicttype; + inout bitstring; + inout hexstring; + inout octetstring; + inout charstring; + inout universal charstring; + inout CompositeType; + inout MySet; + inout MyUnion; + inout MyEnum; + inout MyArray; + } + + type component Sender{ + timer t_timer := 2.0; + port MyPort src; + } + + type component Receiver{ + port MyPort dst; + } + type component MTC {} + + function make_union() return MyUnion + { + var MyUnion result; + result.int := 1; + return result; + } + + const MsgType1 c_values := { + i := 1, + k := 1.0, + b := true, + v := pass, + bs := '0101'B, + hs := '123ABD'H, + os := 'FF96'O, + cs := "ab", + ucs := "the", + rec1 := {1}, + set1 := {int1:=1, str1:="the"}, + union1 := make_union(), + enum1 := Bash, + arr1 := {1,2,3} + }; + + function f_sender() runs on Sender + { + // universal charstring + t_timer.start; + src.send(c_values.ucs); + alt { + [] src.receive(c_values.ucs) { setverdict(pass); } + [] src.receive { + setverdict(fail, "Unexpected data, expected universal charstring ", c_values.ucs); + stop; + } + [] t_timer.timeout { + setverdict(fail, "No response from echo service"); + stop; + } + } + } + + function f_receiver() runs on Receiver + { + timer t_timer := 30.0; + t_timer.start; + alt + { + [] dst.receive(c_values.ucs) { setverdict(pass); dst.send(c_values.ucs); } + + [] dst.receive { setverdict(fail, "Unexpected messagem expected universal charstring", c_values.ucs); stop; } + [] t_timer.timeout { setverdict(fail, "No more messages"); stop; } + } + } + + testcase TC_Sem_13_toplevel_declaring_msg_various_types_013() runs on MTC system MTC + { + var Sender c_sender := Sender.create; + var Receiver c_receiver := Receiver.create; + connect(c_sender:src, c_receiver:dst); + c_sender.start(f_sender()); + c_receiver.start(f_receiver()); + c_sender.done; + c_receiver.kill; + } + control { + execute(TC_Sem_13_toplevel_declaring_msg_various_types_013()) + } +} diff --git a/ATS/core_language/13_messages/13_toplevel/Sem_13_toplevel_declaring_msg_various_types_014.ttcn b/ATS/core_language/13_messages/13_toplevel/Sem_13_toplevel_declaring_msg_various_types_014.ttcn new file mode 100644 index 00000000..b25fa8e9 --- /dev/null +++ b/ATS/core_language/13_messages/13_toplevel/Sem_13_toplevel_declaring_msg_various_types_014.ttcn @@ -0,0 +1,142 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:13, Port with type anytype can send and receive messages of any basic or structured type: 'verdicttype' type. + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// #reqname /Requirements/13 Declaring messages/Any type can be declared as type of message in a message port type + + +module Sem_13_toplevel_declaring_msg_various_types_014{ + type record CompositeType{ + integer i + } + type set MySet{ + integer int1, + charstring str1 + } + type enumerated MyEnum{ + Perl,Bash,Python + } + type integer MyArray[3]; + type union MyUnion{ + integer int, + float real + } + type record MsgType1{ + integer i, + float k, + boolean b, + verdicttype v, + bitstring bs, + hexstring hs, + octetstring os, + charstring cs, + universal charstring ucs, + CompositeType rec1, + MySet set1, + MyUnion union1, + MyEnum enum1, + MyArray arr1 + } + type record MsgType2{ + integer j + } + + type port MyPort message{ + inout integer; + inout float; + inout boolean; + inout verdicttype; + inout bitstring; + inout hexstring; + inout octetstring; + inout charstring; + inout universal charstring; + inout CompositeType; + inout MySet; + inout MyUnion; + inout MyEnum; + inout MyArray; + } + + type component Sender{ + timer t_timer := 2.0; + port MyPort src; + } + + type component Receiver{ + port MyPort dst; + } + type component MTC {} + + function make_union() return MyUnion + { + var MyUnion result; + result.int := 1; + return result; + } + + const MsgType1 c_values := { + i := 1, + k := 1.0, + b := true, + v := pass, + bs := '0101'B, + hs := '123ABD'H, + os := 'FF96'O, + cs := "ab", + ucs := "the", + rec1 := {1}, + set1 := {int1:=1, str1:="the"}, + union1 := make_union(), + enum1 := Bash, + arr1 := {1,2,3} + }; + + function f_sender() runs on Sender + { + // verdicttype + t_timer.start; + src.send(c_values.v); + alt { + [] src.receive(c_values.v) { setverdict(pass); } + [] src.receive { + setverdict(fail, "Unexpected data, expected verdicttype ", c_values.v); + stop; + } + [] t_timer.timeout { + setverdict(fail, "No response from echo service"); + stop; + } + } + } + + function f_receiver() runs on Receiver + { + timer t_timer := 30.0; + t_timer.start; + alt + { + [] dst.receive(c_values.v) { setverdict(pass); dst.send(c_values.v); } + + [] dst.receive { setverdict(fail, "Unexpected messagem expected verdicttype", c_values.v); stop; } + [] t_timer.timeout { setverdict(fail, "No more messages"); stop; } + } + } + + testcase TC_Sem_13_toplevel_declaring_msg_various_types_014() runs on MTC system MTC + { + var Sender c_sender := Sender.create; + var Receiver c_receiver := Receiver.create; + connect(c_sender:src, c_receiver:dst); + c_sender.start(f_sender()); + c_receiver.start(f_receiver()); + c_sender.done; + c_receiver.kill; + } + control { + execute(TC_Sem_13_toplevel_declaring_msg_various_types_014()) + } +} diff --git a/ATS/core_language/14_procedure_signatures/NegSem_1400_procedure_signatures_001.ttcn b/ATS/core_language/14_procedure_signatures/NegSem_1400_procedure_signatures_001.ttcn new file mode 100644 index 00000000..c821b695 --- /dev/null +++ b/ATS/core_language/14_procedure_signatures/NegSem_1400_procedure_signatures_001.ttcn @@ -0,0 +1,52 @@ +/***************************************************************** + ** @author STF 451 + ** @version 0.0.1 + ** @purpose 1:22.3.1, Ensure that nonblocking signature contains in parameter + ** @verdict pass reject + *****************************************************************/ + +module NegSem_1400_procedure_signatures_001 { + + signature p_procedure_signatures_001(out integer p_par1) noblock; // noblock keyword, shall only have in parameters + + template p_procedure_signatures_001 s_returnTemplate := { + p_par1 := - } + + type port remotePort procedure { + inout p_procedure_signatures_001; + } + + type component GeneralComp { + port remotePort PCO; + } + + function f_ClientQuery() runs on GeneralComp { } + + testcase TC_NegSem_1400_procedure_signatures_001() runs on GeneralComp system GeneralComp { + var GeneralComp server := GeneralComp.create("RemoteProcedure Service"); + var GeneralComp client := GeneralComp.create("RemoteProcedure Client"); + + // map the PTCs to the system port + connect(server:PCO, client:PCO); + + + client.start(f_ClientQuery()); + + alt { + [] client.done { + server.stop; + } + } + + alt { + [] all component.done {} + } + + disconnect(server:PCO); + } + + control{ + execute(TC_NegSem_1400_procedure_signatures_001()); + } + +} \ No newline at end of file diff --git a/ATS/core_language/14_procedure_signatures/NegSem_1400_procedure_signatures_002.ttcn b/ATS/core_language/14_procedure_signatures/NegSem_1400_procedure_signatures_002.ttcn new file mode 100644 index 00000000..36a4328d --- /dev/null +++ b/ATS/core_language/14_procedure_signatures/NegSem_1400_procedure_signatures_002.ttcn @@ -0,0 +1,73 @@ +/***************************************************************** + ** @author STF 451 + ** @version 0.0.1 + ** @purpose 1:14, Ensure that blocking calls needs response or exception handling + ** @verdict pass reject + *****************************************************************/ +// Multiple calls requires response or exception handling if the signature is blocking + +module NegSem_1400_procedure_signatures_002 { + + signature p_Sig1_001( in charstring key ); // noblock needed for multiple calls without response or exections + + + type port remotePort procedure { + inout p_Sig1_001; + } + + type component GeneralComp { + port remotePort PCO; + var integer MyComp; + } + + + function f_Server() runs on GeneralComp { + timer t_guard; + + const charstring key[3] := {"My String1", "hello", "Probe string"}; + + t_guard.start( 5.0 ); + + for ( var integer i := 0; i < 3; i := i + 1 ) { + PCO.call( p_Sig1_001:{key[i]});} + setverdict(pass); + + t_guard.timeout; + setverdict(fail); + } + + function f_client() runs on GeneralComp { + + } + + testcase TC_NegSem_1400_procedure_signatures_002() runs on GeneralComp system GeneralComp { + + var GeneralComp server := GeneralComp.create("RemoteProcedure Service"); + var GeneralComp client := GeneralComp.create("RemoteProcedure Client"); + + + connect(server:PCO, client:PCO); + + server.start(f_Server()); + client.start(f_client()); + + + + alt { + [] client.done { + server.stop; + } + } + + alt { + [] all component.done {} + } + + disconnect(server:PCO); + } + + control{ + execute(TC_NegSem_1400_procedure_signatures_002()); + } + +} \ No newline at end of file diff --git a/ATS/core_language/14_procedure_signatures/Sem_1400_procedure_signatures_001.ttcn b/ATS/core_language/14_procedure_signatures/Sem_1400_procedure_signatures_001.ttcn new file mode 100644 index 00000000..2e58ba32 --- /dev/null +++ b/ATS/core_language/14_procedure_signatures/Sem_1400_procedure_signatures_001.ttcn @@ -0,0 +1,79 @@ +/***************************************************************** + ** @author STF 451 + ** @version 0.0.1 + ** @purpose 1:14, Ensure that the IUT calls signature exception + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +//Exception is a charstring + +module Sem_1400_procedure_signatures_001 { + + signature p_Sig1_001(in integer p_par1, out integer p_par2, inout integer p_par3) return integer + exception (charstring); //execption is a string + + + type port remotePort procedure { + inout p_Sig1_001; + } + + type component GeneralComp { + port remotePort PCO; + var integer MyComp; + } + + + function f_Server() runs on GeneralComp { + PCO.raise(p_Sig1_001,"My string"); // raise exception + } + + function f_client() runs on GeneralComp { + timer t_timeout:=30.0; + + t_timeout.start; + + alt { + [] PCO.catch(p_Sig1_001,charstring:"My string") { + setverdict(pass); // receive exception + } + [] PCO.catch(p_Sig1_001,charstring:?) // receive anything else + { + setverdict(fail); + } + + [] t_timeout.timeout { + setverdict(fail); + } + + } +} + + testcase TC_Sem_1400_procedure_signatures_001() runs on GeneralComp system GeneralComp { + + var GeneralComp server := GeneralComp.create("RemoteProcedure Service"); + var GeneralComp client := GeneralComp.create("RemoteProcedure Client"); + + + connect(server:PCO, client:PCO); + + + server.start(f_Server()); + client.start(f_client()); + + alt { + [] client.done { + server.stop; + } + } + + alt { + [] all component.done {} + } + + disconnect(server:PCO); + } + + control{ + execute(TC_Sem_1400_procedure_signatures_001()); + } + +} \ No newline at end of file diff --git a/ATS/core_language/14_procedure_signatures/Sem_1400_procedure_signatures_002.ttcn b/ATS/core_language/14_procedure_signatures/Sem_1400_procedure_signatures_002.ttcn new file mode 100644 index 00000000..6914e3b6 --- /dev/null +++ b/ATS/core_language/14_procedure_signatures/Sem_1400_procedure_signatures_002.ttcn @@ -0,0 +1,80 @@ +/***************************************************************** + ** @author STF 451 + ** @version 0.0.1 + ** @purpose 1:14, Ensure that with noblock signature the IUT can raise exception + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +// Singature exception is a charsting with noblock signature + +module Sem_1400_procedure_signatures_002 { + + signature p_Sig1_001(in integer p_par1) noblock + exception (charstring); //execption is a string + + + type port remotePort procedure { + inout p_Sig1_001; + } + + type component GeneralComp { + port remotePort PCO; + var integer MyComp; + } + + + function f_Server() runs on GeneralComp { + PCO.raise(p_Sig1_001,"My string"); // raise exception + } + + function f_client() runs on GeneralComp { + timer t_timeout:=30.0; + + t_timeout.start; + + alt { + + [] PCO.catch(p_Sig1_001,charstring:"My string") { + setverdict(pass); // receive exception + } + + [] PCO.catch(p_Sig1_001,charstring:?) //receive anything else + { + setverdict(fail); + } + [] t_timeout.timeout { + setverdict(fail); + } + + } +} + + testcase TC_Sem_1400_procedure_signatures_002() runs on GeneralComp system GeneralComp { + + var GeneralComp server := GeneralComp.create("RemoteProcedure Service"); + var GeneralComp client := GeneralComp.create("RemoteProcedure Client"); + + + connect(server:PCO, client:PCO); + + + server.start(f_Server()); + client.start(f_client()); + + alt { + [] client.done { + server.stop; + } + } + + alt { + [] all component.done {} + } + + disconnect(server:PCO); + } + + control{ + execute(TC_Sem_1400_procedure_signatures_002()); + } + +} \ No newline at end of file diff --git a/ATS/core_language/14_procedure_signatures/Sem_1400_procedure_signatures_003.ttcn b/ATS/core_language/14_procedure_signatures/Sem_1400_procedure_signatures_003.ttcn new file mode 100644 index 00000000..4e647a4f --- /dev/null +++ b/ATS/core_language/14_procedure_signatures/Sem_1400_procedure_signatures_003.ttcn @@ -0,0 +1,72 @@ +/***************************************************************** + ** @author STF 451 + ** @version 0.0.1 + ** @purpose 1:14, Ensure that non blocking signatures can raise exception + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +// Singature exception is an integer + +module Sem_1400_procedure_signatures_003 { + + signature p_Sig1_001(in integer p_par1) noblock + exception (integer); //execption is an integer + + type port remotePort procedure { + inout p_Sig1_001; + } + + type component GeneralComp { + port remotePort PCO; + var integer MyComp; + } + + + function f_Server() runs on GeneralComp { + PCO.raise(p_Sig1_001,5); // raise exception + } + + function f_client() runs on GeneralComp { + timer t_timeout:=30.0; + var integer temp; + t_timeout.start; + + PCO.catch(p_Sig1_001,integer:5)-> value temp; + if (temp==5) + { + setverdict(pass); // receive exception + } + else{ + setverdict(fail); + } +} + + testcase TC_Sem_1400_procedure_signatures_003() runs on GeneralComp system GeneralComp { + + var GeneralComp server := GeneralComp.create("RemoteProcedure Service"); + var GeneralComp client := GeneralComp.create("RemoteProcedure Client"); + + + connect(server:PCO, client:PCO); + + + server.start(f_Server()); + client.start(f_client()); + + alt { + [] client.done { + server.stop; + } + } + + alt { + [] all component.done {} + } + + disconnect(server:PCO); + } + + control{ + execute(TC_Sem_1400_procedure_signatures_003()); + } + +} \ No newline at end of file diff --git a/ATS/core_language/14_procedure_signatures/Sem_1400_procedure_signatures_004.ttcn b/ATS/core_language/14_procedure_signatures/Sem_1400_procedure_signatures_004.ttcn new file mode 100644 index 00000000..c855f8f9 --- /dev/null +++ b/ATS/core_language/14_procedure_signatures/Sem_1400_procedure_signatures_004.ttcn @@ -0,0 +1,68 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:14, Ensure that multiple calls can be send without ack using non-blocking signature + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +// Multiple calls without response or execption need noblock signature + +module Sem_1400_procedure_signatures_004 { + + signature p_Sig1_001( in charstring key ) noblock; + + + type port remotePort procedure { + inout p_Sig1_001; + } + + type component GeneralComp { + port remotePort PCO; + var integer MyComp; + } + + type component SystemComp { + } + + const charstring key[3] := {"My String1", "hello", "Probe string"}; + + function f_Server() runs on GeneralComp { + for (var integer i := 0; i < lengthof(key); i := i + 1) { + PCO.getcall(p_Sig1_001:{key[i]}); + } + setverdict(pass); + } + + function f_client() runs on GeneralComp { + for (var integer i := 0; i < lengthof(key); i := i + 1) { + PCO.call(p_Sig1_001:{key[i]}) ; + } + } + + testcase TC_Sem_1400_procedure_signatures_004() runs on GeneralComp system SystemComp { + + var GeneralComp server := GeneralComp.create("RemoteProcedure Service"); + var GeneralComp client := GeneralComp.create("RemoteProcedure Client"); + timer t_guard; + + connect(server:PCO, client:PCO); + + server.start(f_Server()); + client.start(f_client()); + + t_guard.start( 5.0 ); + alt { + [] all component.done {} + [] t_guard.timeout { + setverdict(fail); + all component.stop; + } + } + + disconnect(server:PCO); + } + + control{ + execute(TC_Sem_1400_procedure_signatures_004(), 10.0); + } + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1501_declaring_message_templates/Syn_1501_DeclaringMessageTemplates_001.ttcn b/ATS/core_language/15_templates/1501_declaring_message_templates/Syn_1501_DeclaringMessageTemplates_001.ttcn new file mode 100644 index 00000000..84826f0f --- /dev/null +++ b/ATS/core_language/15_templates/1501_declaring_message_templates/Syn_1501_DeclaringMessageTemplates_001.ttcn @@ -0,0 +1,22 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:15.1, Ensure that a simple record-based message template can be defined. + ** @verdict pass accept, noexecution + *****************************************************************/ + +module Syn_1501_DeclaringMessageTemplates_001 { + +type record MyMessageType { + integer field1 optional, + charstring field2, + boolean field3 +} + +template MyMessageType m_myTemplate := { + field1 := omit, + field2 := "My string", + field3 := true +} + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1501_declaring_message_templates/Syn_1501_DeclaringMessageTemplates_002.ttcn b/ATS/core_language/15_templates/1501_declaring_message_templates/Syn_1501_DeclaringMessageTemplates_002.ttcn new file mode 100644 index 00000000..0265387b --- /dev/null +++ b/ATS/core_language/15_templates/1501_declaring_message_templates/Syn_1501_DeclaringMessageTemplates_002.ttcn @@ -0,0 +1,18 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:15.1, Ensure that a simple record-based message template with a wildcard ? is accepted. + ** @verdict pass accept, noexecution + *****************************************************************/ + +module Syn_1501_DeclaringMessageTemplates_002 { + +type record MyMessageType { + integer field1 optional +} + +template MyMessageType m_myTemplate := { + field1 := ? +} + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1501_declaring_message_templates/Syn_1501_DeclaringMessageTemplates_003.ttcn b/ATS/core_language/15_templates/1501_declaring_message_templates/Syn_1501_DeclaringMessageTemplates_003.ttcn new file mode 100644 index 00000000..37098c45 --- /dev/null +++ b/ATS/core_language/15_templates/1501_declaring_message_templates/Syn_1501_DeclaringMessageTemplates_003.ttcn @@ -0,0 +1,18 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:15.1, Ensure that a simple record-based message template can be defined with a pattern in a charstring field. + ** @verdict pass accept, noexecution + *****************************************************************/ + +module Syn_1501_DeclaringMessageTemplates_003 { + +type record MyMessageType { + charstring field2 +} + +template MyMessageType m_myTemplate := { + field2 := pattern "abc*xyz" +} + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1501_declaring_message_templates/Syn_1501_DeclaringMessageTemplates_004.ttcn b/ATS/core_language/15_templates/1501_declaring_message_templates/Syn_1501_DeclaringMessageTemplates_004.ttcn new file mode 100644 index 00000000..b0feba64 --- /dev/null +++ b/ATS/core_language/15_templates/1501_declaring_message_templates/Syn_1501_DeclaringMessageTemplates_004.ttcn @@ -0,0 +1,12 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:15.1, Ensure that a primitive type template can be defined with a ? wildcard. + ** @verdict pass accept, noexecution + *****************************************************************/ + +module Syn_1501_DeclaringMessageTemplates_004 { + +template integer m_myTemplate := ?; + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1501_declaring_message_templates/Syn_1501_DeclaringMessageTemplates_005.ttcn b/ATS/core_language/15_templates/1501_declaring_message_templates/Syn_1501_DeclaringMessageTemplates_005.ttcn new file mode 100644 index 00000000..ae06a7cf --- /dev/null +++ b/ATS/core_language/15_templates/1501_declaring_message_templates/Syn_1501_DeclaringMessageTemplates_005.ttcn @@ -0,0 +1,12 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:15.1, Ensure that a primitive type template can be defined with a one-of notation. + ** @verdict pass accept, noexecution + *****************************************************************/ + +module Syn_1501_DeclaringMessageTemplates_005 { + +template integer m_myTemplate := (1, 2, 3); + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1501_declaring_message_templates/Syn_1501_DeclaringMessageTemplates_006.ttcn b/ATS/core_language/15_templates/1501_declaring_message_templates/Syn_1501_DeclaringMessageTemplates_006.ttcn new file mode 100644 index 00000000..72fbf90a --- /dev/null +++ b/ATS/core_language/15_templates/1501_declaring_message_templates/Syn_1501_DeclaringMessageTemplates_006.ttcn @@ -0,0 +1,42 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:15.1, Ensure that all port operations are accepted. + ** @verdict pass accept, noexecution + *****************************************************************/ + +module Syn_1501_DeclaringMessageTemplates_006 { + + type port MyMessagePortType message { + inout MyMessageType + } + + type component GeneralComp { + port MyMessagePortType pt_myPort; + } + + type record MyMessageType { + integer field1 optional, + charstring field2, + boolean field3 + } + + template MyMessageType m_myTemplate := { + field1 := omit, + field2 := "My string", + field3 := true + } + + testcase TC_Syn_1501_DeclaringMessageTemplates_006() runs on GeneralComp { + pt_myPort.send(m_myTemplate); + pt_myPort.receive(m_myTemplate); + pt_myPort.trigger(m_myTemplate); + pt_myPort.check(receive(m_myTemplate)); + setverdict(pass); + } + + control{ + execute(TC_Syn_1501_DeclaringMessageTemplates_006()); + } + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1502_declaring_signature_templates/NOTES b/ATS/core_language/15_templates/1502_declaring_signature_templates/NOTES new file mode 100644 index 00000000..fca9d612 --- /dev/null +++ b/ATS/core_language/15_templates/1502_declaring_signature_templates/NOTES @@ -0,0 +1,2 @@ +The semantic tests in this section require the execution of the control scripts, +which launch the remote procedure server and client operations. \ No newline at end of file diff --git a/ATS/core_language/15_templates/1502_declaring_signature_templates/Sem_1502_DeclaringSignatureTemplates_001.ttcn b/ATS/core_language/15_templates/1502_declaring_signature_templates/Sem_1502_DeclaringSignatureTemplates_001.ttcn new file mode 100644 index 00000000..61b99eb4 --- /dev/null +++ b/ATS/core_language/15_templates/1502_declaring_signature_templates/Sem_1502_DeclaringSignatureTemplates_001.ttcn @@ -0,0 +1,117 @@ +/***************************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:15.2, Test in-line templates for accepting procedure replies. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_1502_DeclaringSignatureTemplates_001 { + + /** + * @desc testing of inline return template for remote procedure call + * @param p_par1 only input parameter + * @param p_par2 must have value 4 at return + * @param p_par3 must have value 5 at return + * @return must return value 1 + */ + signature p_Sem_1502_DeclaringSignatureTemplates_001(in integer p_par1, out integer p_par2, inout integer p_par3) return integer; + + template p_Sem_1502_DeclaringSignatureTemplates_001 s_returnTemplate := { + p_par1 := -, + p_par2 := 4, + p_par3 := 5 + } + + template p_Sem_1502_DeclaringSignatureTemplates_001 s_wrongTemplate := { + p_par1 := -, + p_par2 := 2, + p_par3 := 3 + } + + template p_Sem_1502_DeclaringSignatureTemplates_001 s_callTemplate := { + p_par1 := 1, + p_par2 := -, + p_par3 := 3 + } + + type port remotePort procedure { + inout p_Sem_1502_DeclaringSignatureTemplates_001; + } + + type component GeneralComp { + port remotePort PCO; + } + + function f_ClientQuery() runs on GeneralComp { + + PCO.call(p_Sem_1502_DeclaringSignatureTemplates_001:s_callTemplate, 5.0) { + + [] PCO.getreply(p_Sem_1502_DeclaringSignatureTemplates_001:s_wrongTemplate value 1) { + setverdict(fail); + } + [] PCO.getreply(p_Sem_1502_DeclaringSignatureTemplates_001:s_returnTemplate value 2) { + setverdict(fail); + } + [] PCO.getreply(p_Sem_1502_DeclaringSignatureTemplates_001:s_returnTemplate value 1) { //check that procedure is returning correct values + setverdict(pass); + } + [] PCO.catch (timeout) { + setverdict(fail); + } + } + } + + function f_ServerResponses() runs on GeneralComp { + + var integer v_par1; + var integer v_par3; + timer t_timeout:=30.0; + + template p_Sem_1502_DeclaringSignatureTemplates_001 s_acceptTemplate := { + p_par1 := ?, + p_par2 := ?, + p_par3 := ? + }; + + + t_timeout.start; + + alt { + [] PCO.getcall(p_Sem_1502_DeclaringSignatureTemplates_001:s_acceptTemplate) -> param(v_par1, - , v_par3) { + PCO.reply(p_Sem_1502_DeclaringSignatureTemplates_001:{p_par1 := -, p_par2 := v_par1+v_par3, p_par3 := v_par1+v_par3+1} value v_par1); //procedure return values are sent + repeat; + } + [] t_timeout.timeout { + setverdict(fail); + } + } + } + + + testcase TC_Sem_1502_DeclaringSignatureTemplates_001() runs on GeneralComp system GeneralComp { + var GeneralComp server := GeneralComp.create("RemoteProcedure Service"); + var GeneralComp client := GeneralComp.create("RemoteProcedure Client"); + // map the PTCs to the system port + connect(server:PCO, client:PCO); + + server.start(f_ServerResponses()); + client.start(f_ClientQuery()); + + alt { + [] client.done { + server.stop; + } + } + + alt { + [] all component.done {} + } + + disconnect(server:PCO); + } + + control{ + execute(TC_Sem_1502_DeclaringSignatureTemplates_001()); + } + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1502_declaring_signature_templates/Sem_1502_DeclaringSignatureTemplates_002.ttcn b/ATS/core_language/15_templates/1502_declaring_signature_templates/Sem_1502_DeclaringSignatureTemplates_002.ttcn new file mode 100644 index 00000000..7f4c8f90 --- /dev/null +++ b/ATS/core_language/15_templates/1502_declaring_signature_templates/Sem_1502_DeclaringSignatureTemplates_002.ttcn @@ -0,0 +1,115 @@ +/***************************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:15.2, Test in-line templates for accepting procedure replies. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_1502_DeclaringSignatureTemplates_002 { + + /** + * @desc testing of inline return template for remote procedure call + * @param p_par1 only input parameter + * @param p_par2 must have value 4 at return + * @param p_par3 must have value 5 at return + * @return can return value any value + */ + signature p_Sem_1502_DeclaringSignatureTemplates_002(in integer p_par1, out integer p_par2, inout integer p_par3) return integer; + + template p_Sem_1502_DeclaringSignatureTemplates_002 s_returnTemplate := { + p_par1 := -, + p_par2 := 4, + p_par3 := 5 + } + + template p_Sem_1502_DeclaringSignatureTemplates_002 s_wrongTemplate := { + p_par1 := -, + p_par2 := 2, + p_par3 := 3 + } + + template p_Sem_1502_DeclaringSignatureTemplates_002 s_callTemplate := { + p_par1 := 1, + p_par2 := -, + p_par3 := 3 + } + + type port remotePort procedure { + inout p_Sem_1502_DeclaringSignatureTemplates_002; + } + + type component GeneralComp { + port remotePort PCO; + } + + function f_ClientQuery() runs on GeneralComp { + + PCO.call(p_Sem_1502_DeclaringSignatureTemplates_002:s_callTemplate, 5.0) { + + [] PCO.getreply(p_Sem_1502_DeclaringSignatureTemplates_002:s_wrongTemplate value ?) { + setverdict(fail); + } + [] PCO.getreply(p_Sem_1502_DeclaringSignatureTemplates_002:s_returnTemplate value ?) { //check that procedure is returning correct values + setverdict(pass); + } + [] PCO.catch (timeout) { + setverdict(fail); + } + } + } + + function f_ServerResponses() runs on GeneralComp { + + var integer v_par1; + var integer v_par3; + timer t_timeout:=30.0; + + template p_Sem_1502_DeclaringSignatureTemplates_002 s_acceptTemplate := { + p_par1 := ?, + p_par2 := ?, + p_par3 := ? + }; + + + t_timeout.start; + + alt { + [] PCO.getcall(p_Sem_1502_DeclaringSignatureTemplates_002:s_acceptTemplate) -> param(v_par1, - , v_par3) { + PCO.reply(p_Sem_1502_DeclaringSignatureTemplates_002:{p_par1 := -, p_par2 := v_par1+v_par3, p_par3 := v_par1+v_par3+1} value v_par1); //procedure return values are sent + repeat; + } + [] t_timeout.timeout { + setverdict(fail); + } + } + + } + + + testcase TC_Sem_1502_DeclaringSignatureTemplates_002() runs on GeneralComp system GeneralComp { + var GeneralComp server := GeneralComp.create("RemoteProcedure Service"); + var GeneralComp client := GeneralComp.create("RemoteProcedure Client"); + // map the PTCs to the system port + connect(server:PCO, client:PCO); + + server.start(f_ServerResponses()); + client.start(f_ClientQuery()); + + alt { + [] client.done { + server.stop; + } + } + + alt { + [] all component.done {} + } + + disconnect(server:PCO); + } + + control{ + execute(TC_Sem_1502_DeclaringSignatureTemplates_002()); + } + +} diff --git a/ATS/core_language/15_templates/1502_declaring_signature_templates/Sem_1502_DeclaringSignatureTemplates_003.ttcn b/ATS/core_language/15_templates/1502_declaring_signature_templates/Sem_1502_DeclaringSignatureTemplates_003.ttcn new file mode 100644 index 00000000..8b202475 --- /dev/null +++ b/ATS/core_language/15_templates/1502_declaring_signature_templates/Sem_1502_DeclaringSignatureTemplates_003.ttcn @@ -0,0 +1,112 @@ +/***************************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:15.2, Test in-line templates for accepting procedure replies. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_1502_DeclaringSignatureTemplates_003 { + + /** + * @desc testing of inline return template for remote procedure call + * @param p_par1 only input parameter + * @param p_par2 must have value 4 at return + * @param p_par3 must have value 5 at return + * @return can return value any value + */ + signature p_Sem_1502_DeclaringSignatureTemplates_003(in integer p_par1, out integer p_par2, inout integer p_par3) return integer; + + template p_Sem_1502_DeclaringSignatureTemplates_003 s_returnTemplate := { + p_par1 := -, + p_par2 := 4, + p_par3 := 5 + } + + template p_Sem_1502_DeclaringSignatureTemplates_003 s_wrongTemplate := { + p_par1 := -, + p_par2 := 2, + p_par3 := 3 + } + + template p_Sem_1502_DeclaringSignatureTemplates_003 s_callTemplate := { + p_par1 := 1, + p_par2 := -, + p_par3 := 3 + } + + type port remotePort procedure { + inout p_Sem_1502_DeclaringSignatureTemplates_003; + } + + type component GeneralComp { + port remotePort PCO; + } + + function f_ClientQuery() runs on GeneralComp { + + PCO.call(p_Sem_1502_DeclaringSignatureTemplates_003:s_callTemplate, 5.0) { + + [] PCO.getreply(p_Sem_1502_DeclaringSignatureTemplates_003:?) { //any reply is accepted + setverdict(pass); + } + [] PCO.catch (timeout) { + setverdict(fail); + } + } + } + + function f_ServerResponses() runs on GeneralComp { + + var integer v_par1; + var integer v_par3; + timer t_timeout:=30.0; + + template p_Sem_1502_DeclaringSignatureTemplates_003 s_acceptTemplate := { + p_par1 := ?, + p_par2 := ?, + p_par3 := ? + }; + + + t_timeout.start; + + alt { + [] PCO.getcall(p_Sem_1502_DeclaringSignatureTemplates_003:s_acceptTemplate) -> param(v_par1, - , v_par3) { + PCO.reply(p_Sem_1502_DeclaringSignatureTemplates_003:{p_par1 := -, p_par2 := v_par1+v_par3, p_par3 := v_par1+v_par3+1} value v_par1); //procedure return values are sent + repeat; + } + [] t_timeout.timeout { + setverdict(fail); + } + } + + } + + + testcase TC_Sem_1502_DeclaringSignatureTemplates_003() runs on GeneralComp system GeneralComp { + var GeneralComp server := GeneralComp.create("RemoteProcedure Service"); + var GeneralComp client := GeneralComp.create("RemoteProcedure Client"); + // map the PTCs to the system port + connect(server:PCO, client:PCO); + + server.start(f_ServerResponses()); + client.start(f_ClientQuery()); + + alt { + [] client.done { + server.stop; + } + } + + alt { + [] all component.done {} + } + + disconnect(server:PCO); + } + + control{ + execute(TC_Sem_1502_DeclaringSignatureTemplates_003()); + } + +} diff --git a/ATS/core_language/15_templates/1502_declaring_signature_templates/Syn_1502_DeclaringSignatureTemplates_001.ttcn b/ATS/core_language/15_templates/1502_declaring_signature_templates/Syn_1502_DeclaringSignatureTemplates_001.ttcn new file mode 100644 index 00000000..1e2a050c --- /dev/null +++ b/ATS/core_language/15_templates/1502_declaring_signature_templates/Syn_1502_DeclaringSignatureTemplates_001.ttcn @@ -0,0 +1,18 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:15.2, Ensure that signature templates with explicit values are accepted. + ** @verdict pass accept, noexecution + *****************************************************************/ + +module Syn_1502_DeclaringSignatureTemplates_001 { + + signature p_Syn_1502_DeclaringSignatureTemplates_001(in integer p_par1, out integer p_par2, inout integer p_par3) return integer; + + template p_Syn_1502_DeclaringSignatureTemplates_001 s_myTemplate := { + p_par1 := 1, + p_par2 := 2, + p_par3 := 3 + } + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1502_declaring_signature_templates/Syn_1502_DeclaringSignatureTemplates_002.ttcn b/ATS/core_language/15_templates/1502_declaring_signature_templates/Syn_1502_DeclaringSignatureTemplates_002.ttcn new file mode 100644 index 00000000..518ff380 --- /dev/null +++ b/ATS/core_language/15_templates/1502_declaring_signature_templates/Syn_1502_DeclaringSignatureTemplates_002.ttcn @@ -0,0 +1,18 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:15.2, Ensure that signature templates with wildcards are accepted. + ** @verdict pass accept, noexecution + *****************************************************************/ + +module Syn_1502_DeclaringSignatureTemplates_002 { + + signature p_Syn_1502_DeclaringSignatureTemplates_002(in integer p_par1, out integer p_par2, inout integer p_par3) return integer; + + template p_Syn_1502_DeclaringSignatureTemplates_002 s_myTemplate := { + p_par1 := 1, + p_par2 := ?, + p_par3 := ? + } + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1502_declaring_signature_templates/Syn_1502_DeclaringSignatureTemplates_003.ttcn b/ATS/core_language/15_templates/1502_declaring_signature_templates/Syn_1502_DeclaringSignatureTemplates_003.ttcn new file mode 100644 index 00000000..a7658f72 --- /dev/null +++ b/ATS/core_language/15_templates/1502_declaring_signature_templates/Syn_1502_DeclaringSignatureTemplates_003.ttcn @@ -0,0 +1,42 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:15.2, Ensure that the basic operations call and getreply are accepted. + ** @verdict pass accept, noexecution + *****************************************************************/ + +module Syn_1502_DeclaringSignatureTemplates_003 { + + type port MyProcedurePortType procedure { + inout p_Syn_1502_DeclaringSignatureTemplates_003; + } + + type component GeneralComp { + port MyProcedurePortType pt_myPort; + } + + signature p_Syn_1502_DeclaringSignatureTemplates_003(in integer p_par1, out integer p_par2, inout integer p_par3) return integer; + + template p_Syn_1502_DeclaringSignatureTemplates_003 m_myTemplate := { + p_par1 := 1, + p_par2 := 2, + p_par3 := 3 + } + + template p_Syn_1502_DeclaringSignatureTemplates_003 mw_myTemplate := { + p_par1 := 1, + p_par2 := ?, + p_par3 := ? + } + + testcase TC_Syn_1502_DeclaringSignatureTemplates_003() runs on GeneralComp { + pt_myPort.call(p_Syn_1502_DeclaringSignatureTemplates_003:m_myTemplate, nowait); + pt_myPort.getreply(p_Syn_1502_DeclaringSignatureTemplates_003:m_myTemplate); + setverdict(pass); + } + + control{ + execute(TC_Syn_1502_DeclaringSignatureTemplates_003()); + } + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1502_declaring_signature_templates/Syn_1502_DeclaringSignatureTemplates_004.ttcn b/ATS/core_language/15_templates/1502_declaring_signature_templates/Syn_1502_DeclaringSignatureTemplates_004.ttcn new file mode 100644 index 00000000..b143c1d1 --- /dev/null +++ b/ATS/core_language/15_templates/1502_declaring_signature_templates/Syn_1502_DeclaringSignatureTemplates_004.ttcn @@ -0,0 +1,42 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:15.2, Ensure that the raise and catch operations are accepted. + ** @verdict pass accept, noexecution + *****************************************************************/ + +module Syn_1502_DeclaringSignatureTemplates_004 { + + type port MyProcedurePortType procedure { + inout p_Syn_1502_DeclaringSignatureTemplates_004; + } + + type component GeneralComp { + port MyProcedurePortType pt_myPort; + } + + signature p_Syn_1502_DeclaringSignatureTemplates_004(in integer p_par1, out integer p_par2, inout integer p_par3) return integer exception (integer); + + template p_Syn_1502_DeclaringSignatureTemplates_004 m_myTemplate := { + p_par1 := 1, + p_par2 := 2, + p_par3 := 3 + } + + template p_Syn_1502_DeclaringSignatureTemplates_004 mw_myTemplate := { + p_par1 := 1, + p_par2 := ?, + p_par3 := ? + } + + testcase TC_Syn_1502_DeclaringSignatureTemplates_004() runs on GeneralComp { + pt_myPort.raise(p_Syn_1502_DeclaringSignatureTemplates_004, integer:5); + pt_myPort.catch(p_Syn_1502_DeclaringSignatureTemplates_004, integer:5); + setverdict(pass); + } + + control{ + execute(TC_Syn_1502_DeclaringSignatureTemplates_004()); + } + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1503_global_and_local_templates/NegSem_1503_GlobalAndLocalTemplates_001.ttcn b/ATS/core_language/15_templates/1503_global_and_local_templates/NegSem_1503_GlobalAndLocalTemplates_001.ttcn new file mode 100644 index 00000000..d01e274b --- /dev/null +++ b/ATS/core_language/15_templates/1503_global_and_local_templates/NegSem_1503_GlobalAndLocalTemplates_001.ttcn @@ -0,0 +1,22 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:15.3, Ensure that there's an error for re-assignment of a global non-parameterized template + ** @verdict pass reject + *****************************************************************/ + +// The following requirement is tested: +// Both global and local templates are initialized at the place of their +// declaration. This means, all template fields which are not affected by +// parameterization shall receive a value or matching mechanism. Template +// fields affected by parameterization are initialized at the time of +// template use. +module NegSem_1503_GlobalAndLocalTemplates_001 +{ + template integer t := ?; + type component GeneralComp { + } + testcase TC_NegSem_1503_GlobalAndLocalTemplates_001() runs on GeneralComp { + t := 2; // error expected + } +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1503_global_and_local_templates/NegSem_1503_GlobalAndLocalTemplates_002.ttcn b/ATS/core_language/15_templates/1503_global_and_local_templates/NegSem_1503_GlobalAndLocalTemplates_002.ttcn new file mode 100644 index 00000000..e641e9dc --- /dev/null +++ b/ATS/core_language/15_templates/1503_global_and_local_templates/NegSem_1503_GlobalAndLocalTemplates_002.ttcn @@ -0,0 +1,22 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:15.3, Ensure that there's an error for re-assignment of a global non-parameterized template + ** @verdict pass reject + *****************************************************************/ + +// The following requirement is tested: +// Both global and local templates are initialized at the place of their +// declaration. This means, all template fields which are not affected by +// parameterization shall receive a value or matching mechanism. Template +// fields affected by parameterization are initialized at the time of +// template use. +module NegSem_1503_GlobalAndLocalTemplates_002 +{ + type component GeneralComp { + } + testcase TC_NegSem_1503_GlobalAndLocalTemplates_002() runs on GeneralComp { + template integer t := ?; + t := 2; // error expected + } +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1503_global_and_local_templates/NegSem_1503_GlobalAndLocalTemplates_003.ttcn b/ATS/core_language/15_templates/1503_global_and_local_templates/NegSem_1503_GlobalAndLocalTemplates_003.ttcn new file mode 100644 index 00000000..54948b49 --- /dev/null +++ b/ATS/core_language/15_templates/1503_global_and_local_templates/NegSem_1503_GlobalAndLocalTemplates_003.ttcn @@ -0,0 +1,22 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:15.3, Ensure that there's an error for re-assignment of a global parameterized template + ** @verdict pass reject + *****************************************************************/ + +// The following requirement is tested: +// Both global and local templates are initialized at the place of their +// declaration. This means, all template fields which are not affected by +// parameterization shall receive a value or matching mechanism. Template +// fields affected by parameterization are initialized at the time of +// template use. +module NegSem_1503_GlobalAndLocalTemplates_003 +{ + template integer t(in integer p) := (0..p); + type component GeneralComp { + } + testcase TC_NegSem_1503_GlobalAndLocalTemplates_003() runs on GeneralComp { + t := 2; // error expected + } +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1503_global_and_local_templates/NegSem_1503_GlobalAndLocalTemplates_004.ttcn b/ATS/core_language/15_templates/1503_global_and_local_templates/NegSem_1503_GlobalAndLocalTemplates_004.ttcn new file mode 100644 index 00000000..c7d1a0e8 --- /dev/null +++ b/ATS/core_language/15_templates/1503_global_and_local_templates/NegSem_1503_GlobalAndLocalTemplates_004.ttcn @@ -0,0 +1,22 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:15.3, Ensure that there's an error for re-assignment of a local parameterized template + ** @verdict pass reject + *****************************************************************/ + +// The following requirement is tested: +// Both global and local templates are initialized at the place of their +// declaration. This means, all template fields which are not affected by +// parameterization shall receive a value or matching mechanism. Template +// fields affected by parameterization are initialized at the time of +// template use. +module NegSem_1503_GlobalAndLocalTemplates_004 +{ + type component GeneralComp { + } + testcase TC_NegSem_1503_GlobalAndLocalTemplates_004() runs on GeneralComp { + template integer t(in integer p) := (0..p); + t := 2; // error expected + } +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1503_global_and_local_templates/NegSyn_1503_GlobalAndLocalTemplates_001.ttcn b/ATS/core_language/15_templates/1503_global_and_local_templates/NegSyn_1503_GlobalAndLocalTemplates_001.ttcn new file mode 100644 index 00000000..9af75269 --- /dev/null +++ b/ATS/core_language/15_templates/1503_global_and_local_templates/NegSyn_1503_GlobalAndLocalTemplates_001.ttcn @@ -0,0 +1,17 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:15.3, Ensure that there's an error if no value is assigned in a global non-parameterized template declaration + ** @verdict pass reject + *****************************************************************/ + +// The following requirement is tested: +// Both global and local templates are initialized at the place of their +// declaration. This means, all template fields which are not affected by +// parameterization shall receive a value or matching mechanism. Template +// fields affected by parameterization are initialized at the time of +// template use. +module NegSyn_1503_GlobalAndLocalTemplates_001 +{ + template integer t; +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1503_global_and_local_templates/NegSyn_1503_GlobalAndLocalTemplates_002.ttcn b/ATS/core_language/15_templates/1503_global_and_local_templates/NegSyn_1503_GlobalAndLocalTemplates_002.ttcn new file mode 100644 index 00000000..b73a3965 --- /dev/null +++ b/ATS/core_language/15_templates/1503_global_and_local_templates/NegSyn_1503_GlobalAndLocalTemplates_002.ttcn @@ -0,0 +1,21 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:15.3, Ensure that there's an error if no value is assigned in a local non-parameterized template declaration + ** @verdict pass reject + *****************************************************************/ + +// The following requirement is tested: +// Both global and local templates are initialized at the place of their +// declaration. This means, all template fields which are not affected by +// parameterization shall receive a value or matching mechanism. Template +// fields affected by parameterization are initialized at the time of +// template use. +module NegSyn_1503_GlobalAndLocalTemplates_002 +{ + type component GeneralComp { + } + testcase TC_NegSyn_1503_GlobalAndLocalTemplates_002() runs on GeneralComp { + template integer t; + } +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1503_global_and_local_templates/NegSyn_1503_GlobalAndLocalTemplates_003.ttcn b/ATS/core_language/15_templates/1503_global_and_local_templates/NegSyn_1503_GlobalAndLocalTemplates_003.ttcn new file mode 100644 index 00000000..c8b63326 --- /dev/null +++ b/ATS/core_language/15_templates/1503_global_and_local_templates/NegSyn_1503_GlobalAndLocalTemplates_003.ttcn @@ -0,0 +1,17 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:15.3, Ensure that there's an error if no value is assigned in a global parameterized template declaration + ** @verdict pass reject + *****************************************************************/ + +// The following requirement is tested: +// Both global and local templates are initialized at the place of their +// declaration. This means, all template fields which are not affected by +// parameterization shall receive a value or matching mechanism. Template +// fields affected by parameterization are initialized at the time of +// template use. +module NegSyn_1503_GlobalAndLocalTemplates_003 +{ + template integer t(in integer p); +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1503_global_and_local_templates/NegSyn_1503_GlobalAndLocalTemplates_004.ttcn b/ATS/core_language/15_templates/1503_global_and_local_templates/NegSyn_1503_GlobalAndLocalTemplates_004.ttcn new file mode 100644 index 00000000..6c3d91a9 --- /dev/null +++ b/ATS/core_language/15_templates/1503_global_and_local_templates/NegSyn_1503_GlobalAndLocalTemplates_004.ttcn @@ -0,0 +1,21 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:15.3, Ensure that there's an error if no value is assigned in a local parameterized template declaration + ** @verdict pass reject + *****************************************************************/ + +// The following requirement is tested: +// Both global and local templates are initialized at the place of their +// declaration. This means, all template fields which are not affected by +// parameterization shall receive a value or matching mechanism. Template +// fields affected by parameterization are initialized at the time of +// template use. +module NegSyn_1503_GlobalAndLocalTemplates_004 +{ + type component GeneralComp { + } + testcase TC_NegSyn_1503_GlobalAndLocalTemplates_004() runs on GeneralComp { + template integer t(in integer p); + } +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1503_global_and_local_templates/Sem_1503_GlobalAndLocalTemplates_001.ttcn b/ATS/core_language/15_templates/1503_global_and_local_templates/Sem_1503_GlobalAndLocalTemplates_001.ttcn new file mode 100644 index 00000000..22da0c25 --- /dev/null +++ b/ATS/core_language/15_templates/1503_global_and_local_templates/Sem_1503_GlobalAndLocalTemplates_001.ttcn @@ -0,0 +1,41 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:15.3, Ensure that a template values can be accessed with the dot notation as expected. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_1503_GlobalAndLocalTemplates_001 { + +type port MyMessagePortType message { + inout MyMessageType +} + +type component GeneralComp { + port MyMessagePortType pt_myPort; +} + +type record MyMessageType { + integer field1, + charstring field2, + boolean field3 +} + +template MyMessageType m_myTemplate := { + field1 := 2, + field2 := "foobar", + field3 := true +} + +testcase TC_Sem_1503_GlobalAndLocalTemplates_001() runs on GeneralComp { + if (match(2,m_myTemplate.field1) and match("foobar", m_myTemplate.field2) and match(true, m_myTemplate.field3)) { + setverdict(pass); + } else { + setverdict(fail); + } +} + +control{ + execute(TC_Sem_1503_GlobalAndLocalTemplates_001()); +} +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1503_global_and_local_templates/Sem_1503_GlobalAndLocalTemplates_002.ttcn b/ATS/core_language/15_templates/1503_global_and_local_templates/Sem_1503_GlobalAndLocalTemplates_002.ttcn new file mode 100644 index 00000000..f06f95b7 --- /dev/null +++ b/ATS/core_language/15_templates/1503_global_and_local_templates/Sem_1503_GlobalAndLocalTemplates_002.ttcn @@ -0,0 +1,41 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:15.3, Ensure that a template actual parameter is passed through correctly. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_1503_GlobalAndLocalTemplates_002 { + +type port MyMessagePortType message { + inout MyMessageType +} + +type component GeneralComp { + port MyMessagePortType pt_myPort; +} + +type record MyMessageType { + integer field1, + charstring field2, + boolean field3 +} + +template MyMessageType m_myTemplate(integer p_myFormalParam):= { + field1 := p_myFormalParam, + field2 := pattern "abc*xyz", + field3 := true +} + +testcase TC_Sem_1503_GlobalAndLocalTemplates_002() runs on GeneralComp { + if (valueof(m_myTemplate(2).field1) == 2) { + setverdict(pass); + } else { + setverdict(fail); + } +} + +control{ + execute(TC_Sem_1503_GlobalAndLocalTemplates_002()); +} +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1503_global_and_local_templates/Sem_1503_GlobalAndLocalTemplates_003.ttcn b/ATS/core_language/15_templates/1503_global_and_local_templates/Sem_1503_GlobalAndLocalTemplates_003.ttcn new file mode 100644 index 00000000..9de5cffb --- /dev/null +++ b/ATS/core_language/15_templates/1503_global_and_local_templates/Sem_1503_GlobalAndLocalTemplates_003.ttcn @@ -0,0 +1,40 @@ +/***************************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:15.3, Ensure that a send operation with actual parameters of a global parameterized template is accepted. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_1503_GlobalAndLocalTemplates_003 { + + type port MyMessagePortType message { + inout MyMessageType + } + + type component GeneralComp { + port MyMessagePortType pt_myPort; + } + + type record MyMessageType { + integer field1, + charstring field2, + boolean field3 + } + + template MyMessageType m_myTemplate(integer p_myFormalParam):= { + field1 := p_myFormalParam, + field2 := "abcxyz", + field3 := true + } + + testcase TC_Sem_1503_GlobalAndLocalTemplates_003() runs on GeneralComp { + pt_myPort.send(m_myTemplate(2)); + setverdict(pass); + } + + control{ + execute(TC_Sem_1503_GlobalAndLocalTemplates_003()); + } + + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1503_global_and_local_templates/Sem_1503_GlobalAndLocalTemplates_004.ttcn b/ATS/core_language/15_templates/1503_global_and_local_templates/Sem_1503_GlobalAndLocalTemplates_004.ttcn new file mode 100644 index 00000000..954710aa --- /dev/null +++ b/ATS/core_language/15_templates/1503_global_and_local_templates/Sem_1503_GlobalAndLocalTemplates_004.ttcn @@ -0,0 +1,40 @@ +/***************************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:15.3, Ensure that a parameterized local template in a test case is accepted. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_1503_GlobalAndLocalTemplates_004 { + + type port MyMessagePortType message { + inout MyMessageType + } + + type component GeneralComp { + port MyMessagePortType pt_myPort; + } + + type record MyMessageType { + integer field1, + charstring field2, + boolean field3 + } + + testcase TC_Sem_1503_GlobalAndLocalTemplates_004() runs on GeneralComp { + template MyMessageType m_myTemplate(integer p_myFormalParam):= { + field1 := p_myFormalParam, + field2 := "abcxyz", + field3 := true + } + + pt_myPort.send(m_myTemplate(2)); + setverdict(pass); + } + + control{ + execute(TC_Sem_1503_GlobalAndLocalTemplates_004()); + } + + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1503_global_and_local_templates/Sem_1503_GlobalAndLocalTemplates_005.ttcn b/ATS/core_language/15_templates/1503_global_and_local_templates/Sem_1503_GlobalAndLocalTemplates_005.ttcn new file mode 100644 index 00000000..799af30f --- /dev/null +++ b/ATS/core_language/15_templates/1503_global_and_local_templates/Sem_1503_GlobalAndLocalTemplates_005.ttcn @@ -0,0 +1,46 @@ +/***************************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:15.3, Ensure that a send operation with actual parameters of a global parameterized template is accepted with the actual parameter being a template parameter. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_1503_GlobalAndLocalTemplates_005 { + + type port MyMessagePortType message { + inout MyMessageType + } + + type component GeneralComp { + port MyMessagePortType pt_myPort; + } + + type record MyMessageType { + integer field1, + charstring field2, + MyMessageType field3 optional + } + + template MyMessageType m_myTemplate(integer p_myFormalParam):= { + field1 := p_myFormalParam, + field2 := "abc1xyz", + field3 := omit + } + + template MyMessageType m_myOtherTemplate(template MyMessageType p_myTemplate):= { + field1 := 2, + field2 := "abcxyz", + field3 := p_myTemplate + } + + testcase TC_Sem_1503_GlobalAndLocalTemplates_005() runs on GeneralComp { + pt_myPort.send(m_myOtherTemplate(m_myTemplate(2))); + setverdict(pass); + } + + control{ + execute(TC_Sem_1503_GlobalAndLocalTemplates_005()); + } + + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1503_global_and_local_templates/Sem_1503_GlobalAndLocalTemplates_006.ttcn b/ATS/core_language/15_templates/1503_global_and_local_templates/Sem_1503_GlobalAndLocalTemplates_006.ttcn new file mode 100644 index 00000000..5cf8610c --- /dev/null +++ b/ATS/core_language/15_templates/1503_global_and_local_templates/Sem_1503_GlobalAndLocalTemplates_006.ttcn @@ -0,0 +1,40 @@ +/***************************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:15.3, Ensure that a send operation with actual parameters of a global parameterized template is accepted with the actual parameter being an inline template. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_1503_GlobalAndLocalTemplates_006 { + + type port MyMessagePortType message { + inout MyMessageType + } + + type component GeneralComp { + port MyMessagePortType pt_myPort; + } + + type record MyMessageType { + integer field1, + charstring field2, + MyMessageType field3 optional + } + + template MyMessageType m_myOtherTemplate(template MyMessageType p_myTemplate):= { + field1 := 2, + field2 := "abcxyz", + field3 := p_myTemplate + } + + testcase TC_Sem_1503_GlobalAndLocalTemplates_006() runs on GeneralComp { + pt_myPort.send(m_myOtherTemplate(MyMessageType:{2,"foobar",omit})); + setverdict(pass); + } + + control{ + execute(TC_Sem_1503_GlobalAndLocalTemplates_006()); + } + + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1503_global_and_local_templates/Syn_1503_GlobalAndLocalTemplates_001.ttcn b/ATS/core_language/15_templates/1503_global_and_local_templates/Syn_1503_GlobalAndLocalTemplates_001.ttcn new file mode 100644 index 00000000..28a4cf1d --- /dev/null +++ b/ATS/core_language/15_templates/1503_global_and_local_templates/Syn_1503_GlobalAndLocalTemplates_001.ttcn @@ -0,0 +1,22 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:15.3, Ensure that a global parameterized template is accepted. + ** @verdict pass accept, noexecution + *****************************************************************/ + +module Syn_1503_GlobalAndLocalTemplates_001 { + + type record MyMessageType { + integer field1, + charstring field2, + boolean field3 + } + + template MyMessageType m_myTemplate(integer p_myFormalParam):= { + field1 := p_myFormalParam, + field2 := pattern "abc*xyz", + field3 := true + } + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1503_global_and_local_templates/Syn_1503_GlobalAndLocalTemplates_004.ttcn b/ATS/core_language/15_templates/1503_global_and_local_templates/Syn_1503_GlobalAndLocalTemplates_004.ttcn new file mode 100644 index 00000000..7ce556b5 --- /dev/null +++ b/ATS/core_language/15_templates/1503_global_and_local_templates/Syn_1503_GlobalAndLocalTemplates_004.ttcn @@ -0,0 +1,33 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:15.3, Ensure that a parameterized local template in the control part is accepted. + ** @verdict pass accept, noexecution + *****************************************************************/ + +module Syn_1503_GlobalAndLocalTemplates_004 { + + type port MyMessagePortType message { + inout MyMessageType + } + + type component GeneralComp { + port MyMessagePortType pt_myPort; + } + + type record MyMessageType { + integer field1, + charstring field2, + boolean field3 + } + + control{ + template MyMessageType m_myTemplate(integer p_myFormalParam):= { + field1 := p_myFormalParam, + field2 := pattern "abc*xyz", + field3 := true + } + } + + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1503_global_and_local_templates/Syn_1503_GlobalAndLocalTemplates_005.ttcn b/ATS/core_language/15_templates/1503_global_and_local_templates/Syn_1503_GlobalAndLocalTemplates_005.ttcn new file mode 100644 index 00000000..5d97f0ba --- /dev/null +++ b/ATS/core_language/15_templates/1503_global_and_local_templates/Syn_1503_GlobalAndLocalTemplates_005.ttcn @@ -0,0 +1,32 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:15.3, Ensure that a parameterized local template in a function is accepted. + ** @verdict pass accept, noexecution + *****************************************************************/ + +module Syn_1503_GlobalAndLocalTemplates_005 { + + type port MyMessagePortType message { + inout MyMessageType + } + + type component GeneralComp { + port MyMessagePortType pt_myPort; + } + + type record MyMessageType { + integer field1, + charstring field2, + boolean field3 + } + + function f_testTemplate() { + template MyMessageType m_myTemplate(integer p_myFormalParam):= { + field1 := p_myFormalParam, + field2 := pattern "abc*xyz", + field3 := true + } + } + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1503_global_and_local_templates/Syn_1503_GlobalAndLocalTemplates_006.ttcn b/ATS/core_language/15_templates/1503_global_and_local_templates/Syn_1503_GlobalAndLocalTemplates_006.ttcn new file mode 100644 index 00000000..0e4704f4 --- /dev/null +++ b/ATS/core_language/15_templates/1503_global_and_local_templates/Syn_1503_GlobalAndLocalTemplates_006.ttcn @@ -0,0 +1,34 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:15.3, Ensure that a parameterized local template in an altstep is accepted. + ** @verdict pass accept, noexecution + *****************************************************************/ + +module Syn_1503_GlobalAndLocalTemplates_006 { + + type port MyMessagePortType message { + inout MyMessageType + } + + type component GeneralComp { + port MyMessagePortType pt_myPort; + } + + type record MyMessageType { + integer field1, + charstring field2, + boolean field3 + } + + altstep f_testTemplate() runs on GeneralComp { + [] pt_myPort.receive { + template MyMessageType m_myTemplate(integer p_myFormalParam):= { + field1 := p_myFormalParam, + field2 := pattern "abc*xyz", + field3 := true + } + } + } + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1504_inline_templates/Syn_1504_InlineTemplates_001.ttcn b/ATS/core_language/15_templates/1504_inline_templates/Syn_1504_InlineTemplates_001.ttcn new file mode 100644 index 00000000..b9851e00 --- /dev/null +++ b/ATS/core_language/15_templates/1504_inline_templates/Syn_1504_InlineTemplates_001.ttcn @@ -0,0 +1,32 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:15.4, Ensure that inline templates are accepted. + ** @verdict pass accept, noexecution + *****************************************************************/ + +module Syn_1504_InlineTemplates_001 { + +type port MyMessagePortType message { + inout MyMessageType +} + +type component GeneralComp { + port MyMessagePortType pt_myPort; +} + +type record MyMessageType { + integer field1, + charstring field2, + boolean field3 +} + +testcase TC_Syn_1504_InlineTemplates_001() runs on GeneralComp { + pt_myPort.send(MyMessageType:{2, "abcxyz", true}); + setverdict(pass); +} + +control{ + execute(TC_Syn_1504_InlineTemplates_001()); +} +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1504_inline_templates/Syn_1504_InlineTemplates_002.ttcn b/ATS/core_language/15_templates/1504_inline_templates/Syn_1504_InlineTemplates_002.ttcn new file mode 100644 index 00000000..4d9d6b6e --- /dev/null +++ b/ATS/core_language/15_templates/1504_inline_templates/Syn_1504_InlineTemplates_002.ttcn @@ -0,0 +1,38 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:15.4, Ensure that modified parameterized inline templates are accepted. + ** @verdict pass accept, noexecution + *****************************************************************/ + +module Syn_1504_InlineTemplates_002 { + +type port MyMessagePortType message { + inout MyMessageType +} + +type component GeneralComp { + port MyMessagePortType pt_myPort; +} + +type record MyMessageType { + integer field1, + charstring field2, + boolean field3 +} + +template MyMessageType m_myTemplate(integer p_myFormalParam):= { + field1 := p_myFormalParam, + field2 := pattern "abc*xyz", + field3 := true +} + +testcase TC_Syn_1504_InlineTemplates_002() runs on GeneralComp { + pt_myPort.send(MyMessageType:modifies m_myTemplate(2) := {field2:="foobar"}); + setverdict(pass); +} + +control{ + execute(TC_Syn_1504_InlineTemplates_002()); +} +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1504_inline_templates/Syn_1504_InlineTemplates_003.ttcn b/ATS/core_language/15_templates/1504_inline_templates/Syn_1504_InlineTemplates_003.ttcn new file mode 100644 index 00000000..b197d98b --- /dev/null +++ b/ATS/core_language/15_templates/1504_inline_templates/Syn_1504_InlineTemplates_003.ttcn @@ -0,0 +1,38 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:15.4, Ensure that modified plain inline templates are accepted. + ** @verdict pass accept, noexecution + *****************************************************************/ + +module Syn_1504_InlineTemplates_003 { + +type port MyMessagePortType message { + inout MyMessageType +} + +type component GeneralComp { + port MyMessagePortType pt_myPort; +} + +type record MyMessageType { + integer field1, + charstring field2, + boolean field3 +} + +template MyMessageType m_myTemplate := { + field1 := 2, + field2 := pattern "abc*xyz", + field3 := true +} + +testcase TC_Syn_1504_InlineTemplates_003() runs on GeneralComp { + pt_myPort.send(MyMessageType:modifies m_myTemplate := {field2:="foobar"}); + setverdict(pass); +} + +control{ + execute(TC_Syn_1504_InlineTemplates_003()); +} +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1505_modified_templates/NegSem_1505_ModifiedTemplates_001.ttcn b/ATS/core_language/15_templates/1505_modified_templates/NegSem_1505_ModifiedTemplates_001.ttcn new file mode 100644 index 00000000..de7a3acc --- /dev/null +++ b/ATS/core_language/15_templates/1505_modified_templates/NegSem_1505_ModifiedTemplates_001.ttcn @@ -0,0 +1,19 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:15.5, Ensure that a modified template does not refer to itself. + ** @verdict pass reject + *****************************************************************/ + +module NegSem_1505_ModifiedTemplates_001 { + +type record of integer MyMessageType; + +template MyMessageType m_myBaseTemplate := { 0, 1, 2, 3, 4 }; + +template MyMessageType m_myOtherTemplate modifies m_myOtherTemplate := { + [2]:=3, // switch the positions of 2 and 3 + [3]:=2 +} + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1505_modified_templates/NegSem_1505_ModifiedTemplates_002.ttcn b/ATS/core_language/15_templates/1505_modified_templates/NegSem_1505_ModifiedTemplates_002.ttcn new file mode 100644 index 00000000..68bc29e6 --- /dev/null +++ b/ATS/core_language/15_templates/1505_modified_templates/NegSem_1505_ModifiedTemplates_002.ttcn @@ -0,0 +1,30 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:15.5, Ensure that a modified template does not omit possible parameters of the base template. + ** @verdict pass reject + *****************************************************************/ + +module NegSem_1505_ModifiedTemplates_002 { + +type record of integer MyMessageType; + +type record MyMessageType { + integer field1, + charstring field2, + boolean field3 +} + +template MyMessageType m_templateOne(integer p_value) := { + field1 := p_value, + field2 := "Hello World", + field3 := true +} + +// illegal definition as the (integer p_value) formal parameter is missing and must +// not be omitted. +template MyMessageType m_templateTwo modifies m_templateOne := { + field3 := false +} + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1505_modified_templates/NegSem_1505_ModifiedTemplates_003.ttcn b/ATS/core_language/15_templates/1505_modified_templates/NegSem_1505_ModifiedTemplates_003.ttcn new file mode 100644 index 00000000..acca3a7f --- /dev/null +++ b/ATS/core_language/15_templates/1505_modified_templates/NegSem_1505_ModifiedTemplates_003.ttcn @@ -0,0 +1,36 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:15.5, Ensure that a modified template does not omit possible parameters introduced in any modification step. + ** @verdict pass reject + *****************************************************************/ + +module NegSem_1505_ModifiedTemplates_003 { + +type record of integer MyMessageType; + +type record MyMessageType { + integer field1, + charstring field2, + boolean field3 +} + +template MyMessageType m_templateOne(integer p_intValue) := { + field1 := p_intValue, + field2 := "Hello World", + field3 := true +} + +template MyMessageType m_templateTwo(integer p_intValue, boolean p_boolValue) modifies m_templateOne := { + field1 := p_intValue, + field3 := p_boolValue +} + +// illegal as it is missing the (boolean p_boolValue) formal parameter introduced in the previous +// modification step. +template MyMessageType m_templateThree(integer p_intValue) modifies m_templateTwo := { + field2 := "foobar" +} + + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1505_modified_templates/NegSem_1505_ModifiedTemplates_004.ttcn b/ATS/core_language/15_templates/1505_modified_templates/NegSem_1505_ModifiedTemplates_004.ttcn new file mode 100644 index 00000000..a385e893 --- /dev/null +++ b/ATS/core_language/15_templates/1505_modified_templates/NegSem_1505_ModifiedTemplates_004.ttcn @@ -0,0 +1,29 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:15.5, Ensure that parameter names in modified templates are the same. + ** @verdict pass reject + *****************************************************************/ + +module NegSem_1505_ModifiedTemplates_004 { + +type component GeneralComp { } + +type record MyMessageType { + integer field1, + charstring field2, + boolean field3 +} + +template MyMessageType m_templateOne(integer p_value) := { + field1 := p_value, + field2 := "Hello World", + field3 := true +} + +// illegal as p_intValue is a different parameter name than p_value +template MyMessageType m_templateTwo(integer p_intValue) modifies m_templateOne := { + field3 := false +} + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1505_modified_templates/NegSem_1505_ModifiedTemplates_005.ttcn b/ATS/core_language/15_templates/1505_modified_templates/NegSem_1505_ModifiedTemplates_005.ttcn new file mode 100644 index 00000000..2a062164 --- /dev/null +++ b/ATS/core_language/15_templates/1505_modified_templates/NegSem_1505_ModifiedTemplates_005.ttcn @@ -0,0 +1,29 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:15.5, Ensure that the dash in default parameter values of a modified templates is only accepted when the base template actually has a default value. + ** @verdict pass reject + *****************************************************************/ + +module NegSem_1505_ModifiedTemplates_005 { + +type component GeneralComp { } + +type record MyMessageType { + integer field1, + charstring field2, + boolean field3 +} + +template MyMessageType m_templateOne(integer p_intValue) := { + field1 := p_intValue, + field2 := "Hello World", + field3 := true +} + +// illegal as p_intValue does not have a default value that can be referred to with the "-". +template MyMessageType m_templateTwo(integer p_intValue := -) modifies m_templateOne := { + field1 := p_intValue +} + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1505_modified_templates/NegSem_1505_ModifiedTemplates_006.ttcn b/ATS/core_language/15_templates/1505_modified_templates/NegSem_1505_ModifiedTemplates_006.ttcn new file mode 100644 index 00000000..04249615 --- /dev/null +++ b/ATS/core_language/15_templates/1505_modified_templates/NegSem_1505_ModifiedTemplates_006.ttcn @@ -0,0 +1,29 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:15.5, Ensure that the same parameter name is used when modifying the base template. + ** @verdict pass reject + *****************************************************************/ + +module NegSem_1505_ModifiedTemplates_006 { + +type component GeneralComp { } + +type record MyMessageType { + integer field1, + charstring field2, + boolean field3 +} + +template MyMessageType m_templateOne(integer p_intValue) := { + field1 := p_intValue, + field2 := "Hello World", + field3 := true +} + +// illegal as parameter name mismatch p_intValue defined in m_templateOne +template MyMessageType m_templateTwo(integer p_value := -) modifies m_templateOne := { + field1 := p_value +} + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1505_modified_templates/NegSem_1505_ModifiedTemplates_007.ttcn b/ATS/core_language/15_templates/1505_modified_templates/NegSem_1505_ModifiedTemplates_007.ttcn new file mode 100644 index 00000000..ccae79fd --- /dev/null +++ b/ATS/core_language/15_templates/1505_modified_templates/NegSem_1505_ModifiedTemplates_007.ttcn @@ -0,0 +1,29 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:15.5, Ensure that the same parameter type is used when modifying the base template. + ** @verdict pass reject + *****************************************************************/ + +module NegSem_1505_ModifiedTemplates_007 { + +type component GeneralComp { } + +type record MyMessageType { + integer field1, + charstring field2, + boolean field3 +} + +template MyMessageType m_templateOne(integer p_intValue) := { + field1 := p_intValue, + field2 := "Hello World", + field3 := true +} + +// illegal as parameter type mismatch boolean defined in m_templateOne +template MyMessageType m_templateTwo(boolean p_intValue) modifies m_templateOne := { + field1 := 5 +} + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1505_modified_templates/NegSyn_1505_ModifiedTemplates_001.ttcn b/ATS/core_language/15_templates/1505_modified_templates/NegSyn_1505_ModifiedTemplates_001.ttcn new file mode 100644 index 00000000..ab94c5ab --- /dev/null +++ b/ATS/core_language/15_templates/1505_modified_templates/NegSyn_1505_ModifiedTemplates_001.ttcn @@ -0,0 +1,36 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:15.5, Ensure that the base tamplate and modified template cannot be the same + ** @verdict pass reject, noexectuion + *****************************************************************/ +//Restriction a) +/*A modified template shall not refer to itself, either directly or indirectly, i.e. recursive derivation is not +allowed.*/ + +module NegSyn_1505_ModifiedTemplates_001{ + +type component GeneralComp { } + +type record MyMessageType { + integer field1, + charstring field2, + boolean field3 +} + +template MyMessageType m_templateOne(integer p_intValue) := { + field1 := p_intValue, + field2 := "Hello World", + field3 := true +} + +template MyMessageType m_templateTwo(integer p_intValue) modifies m_templateOne := { + field1 := 5 +} + +//error: not allowed to modify itself +template MyMessageType m_templateTwo(integer p_intValue) modifies m_templateTwo := { + field1 := 10 +} + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1505_modified_templates/Sem_1505_ModifiedTemplates_001.ttcn b/ATS/core_language/15_templates/1505_modified_templates/Sem_1505_ModifiedTemplates_001.ttcn new file mode 100644 index 00000000..50896181 --- /dev/null +++ b/ATS/core_language/15_templates/1505_modified_templates/Sem_1505_ModifiedTemplates_001.ttcn @@ -0,0 +1,49 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:15.5, Ensure that the values of plain modified template definitions are as expected. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_1505_ModifiedTemplates_001 { + +type port MyMessagePortType message { + inout MyMessageType +} + +type component GeneralComp { + port MyMessagePortType pt_myPort; +} + +type record MyMessageType { + integer field1, + charstring field2, + boolean field3 +} + +template MyMessageType m_templateOne := { + field1 := 2, + field2 := "Hello World", + field3 := true +} + +template MyMessageType m_templateTwo modifies m_templateOne := { + field1 := 4 +} + +testcase TC_Sem_1505_ModifiedTemplates_001() runs on GeneralComp { + if (match(valueof(m_templateTwo.field1), 4) and + match(valueof(m_templateTwo.field2), "Hello World") and + match(valueof(m_templateTwo.field3), true) + ) { + setverdict(pass); + } else { + setverdict(fail); + } +} + +control{ + execute(TC_Sem_1505_ModifiedTemplates_001()); +} + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1505_modified_templates/Sem_1505_ModifiedTemplates_002.ttcn b/ATS/core_language/15_templates/1505_modified_templates/Sem_1505_ModifiedTemplates_002.ttcn new file mode 100644 index 00000000..c5a8cdc8 --- /dev/null +++ b/ATS/core_language/15_templates/1505_modified_templates/Sem_1505_ModifiedTemplates_002.ttcn @@ -0,0 +1,39 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:15.5, Ensure that a modified template of a record of type using index notation access works as expected. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_1505_ModifiedTemplates_002 { + +type component GeneralComp { +} + +type record of integer MyMessageType; + +template MyMessageType m_myBaseTemplate := { 0, 1, 2, 3, 4 }; + +template MyMessageType m_myOtherTemplate modifies m_myBaseTemplate := { + [2]:=3, // switch the positions of 2 and 3 + [3]:=2 +} + +testcase TC_Sem_1505_ModifiedTemplates_002() runs on GeneralComp { + if (match(valueof(m_myOtherTemplate[0]), 0) and + match(valueof(m_myOtherTemplate[1]), 1) and + match(valueof(m_myOtherTemplate[2]), 3) and + match(valueof(m_myOtherTemplate[3]), 2) and + match(valueof(m_myOtherTemplate[4]), 4) + ) { + setverdict(pass); + } else { + setverdict(fail); + } +} + +control{ + execute(TC_Sem_1505_ModifiedTemplates_002()); +} + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1505_modified_templates/Sem_1505_ModifiedTemplates_003.ttcn b/ATS/core_language/15_templates/1505_modified_templates/Sem_1505_ModifiedTemplates_003.ttcn new file mode 100644 index 00000000..31e42ef7 --- /dev/null +++ b/ATS/core_language/15_templates/1505_modified_templates/Sem_1505_ModifiedTemplates_003.ttcn @@ -0,0 +1,44 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:15.5, Ensure that default values in formal parameters of modified templates are working as expected. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_1505_ModifiedTemplates_003 { + +type component GeneralComp { } + +type record MyMessageType { + integer field1, + charstring field2, + boolean field3 +} + +template MyMessageType m_templateOne(integer p_intValue) := { + field1 := p_intValue, + field2 := "Hello World", + field3 := true +} + +template MyMessageType m_templateTwo(integer p_intValue:=2, boolean p_boolValue:=false) modifies m_templateOne := { + field1 := p_intValue, + field3 := p_boolValue +} + +testcase TC_Sem_1505_ModifiedTemplates_003() runs on GeneralComp { + if (match(valueof(m_templateTwo.field1), 2) and + match(valueof(m_templateTwo.field2), "Hello World") and + match(valueof(m_templateTwo.field3), false) + ) { + setverdict(pass); + } else { + setverdict(fail); + } +} + +control{ + execute(TC_Sem_1505_ModifiedTemplates_003()); +} + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1505_modified_templates/Sem_1505_ModifiedTemplates_004.ttcn b/ATS/core_language/15_templates/1505_modified_templates/Sem_1505_ModifiedTemplates_004.ttcn new file mode 100644 index 00000000..f7c2f1c3 --- /dev/null +++ b/ATS/core_language/15_templates/1505_modified_templates/Sem_1505_ModifiedTemplates_004.ttcn @@ -0,0 +1,43 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:15.5, Ensure that default values in formal parameters of modified templates are working as expected when the modified template uses the dash for the default value. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_1505_ModifiedTemplates_004 { + +type component GeneralComp { } + +type record MyMessageType { + integer field1, + charstring field2, + boolean field3 +} + +template MyMessageType m_templateOne(integer p_intValue:=2) := { + field1 := p_intValue, + field2 := "Hello World", + field3 := true +} + +template MyMessageType m_templateTwo(integer p_intValue := -) modifies m_templateOne := { + field1 := p_intValue +} + +testcase TC_Sem_1505_ModifiedTemplates_004() runs on GeneralComp { + if (match(valueof(m_templateTwo.field1), 2) and + match(valueof(m_templateTwo.field2), "Hello World") and + match(valueof(m_templateTwo.field3), true) + ) { + setverdict(pass); + } else { + setverdict(fail); + } +} + +control{ + execute(TC_Sem_1505_ModifiedTemplates_004()); +} + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1505_modified_templates/Sem_1505_ModifiedTemplates_005.ttcn b/ATS/core_language/15_templates/1505_modified_templates/Sem_1505_ModifiedTemplates_005.ttcn new file mode 100644 index 00000000..b98a8040 --- /dev/null +++ b/ATS/core_language/15_templates/1505_modified_templates/Sem_1505_ModifiedTemplates_005.ttcn @@ -0,0 +1,41 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:15.5, Ensure that default values in formal parameters of modified templates are working as expected + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + + //Restriction a) +/*In case of templates, template fields or list elements of simple types, union and enumerated types, the +matching mechanism specified in the modified template is simply replacing its corresponding content in its +parent.*/ + +module Sem_1505_ModifiedTemplates_005 { + +type component GeneralComp { } + +type union MyMessageType { + integer field +} + +template MyMessageType m_templateOne := { //union type + field :=2 +} + +template MyMessageType m_templateTwo(integer p_intValue := 10) modifies m_templateOne := { + field := p_intValue +} + +testcase TC_Sem_1505_ModifiedTemplates_005() runs on GeneralComp { + if (match(valueof(m_templateTwo.field) , 10) ) { + setverdict(pass); + } else { + setverdict(fail); + } +} + +control{ + execute(TC_Sem_1505_ModifiedTemplates_005()); +} + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1505_modified_templates/Sem_1505_ModifiedTemplates_006.ttcn b/ATS/core_language/15_templates/1505_modified_templates/Sem_1505_ModifiedTemplates_006.ttcn new file mode 100644 index 00000000..0d686025 --- /dev/null +++ b/ATS/core_language/15_templates/1505_modified_templates/Sem_1505_ModifiedTemplates_006.ttcn @@ -0,0 +1,47 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:15.5, Ensure that default values in formal parameters of modified templates are working as expected + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +//Restriction a) +/*In case of templates, template fields or list elements of simple types, union and enumerated types, the +matching mechanism specified in the modified template is simply replacing its corresponding content in its +parent.*/ + +module Sem_1505_ModifiedTemplates_006 { + +type component GeneralComp { } + + +type enumerated MyEnum { + A,B,C +} + +type record MyMessageType { + integer field1, + MyEnum field2 +} + +template MyMessageType m_templateOne := { + field1 :=10, + field2 := A //enum type +} + +template MyMessageType m_templateTwo(MyEnum p_intValue := B) modifies m_templateOne := { + field2 := p_intValue +} + +testcase TC_Sem_1505_ModifiedTemplates_006() runs on GeneralComp { + if (match(valueof(m_templateTwo.field2) , B) and match(valueof(m_templateTwo.field1) , 10)) { + setverdict(pass); + } else { + setverdict(fail); + } +} + +control{ + execute(TC_Sem_1505_ModifiedTemplates_006()); +} + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1505_modified_templates/Sem_1505_ModifiedTemplates_007.ttcn b/ATS/core_language/15_templates/1505_modified_templates/Sem_1505_ModifiedTemplates_007.ttcn new file mode 100644 index 00000000..614b1989 --- /dev/null +++ b/ATS/core_language/15_templates/1505_modified_templates/Sem_1505_ModifiedTemplates_007.ttcn @@ -0,0 +1,51 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:15.5, Ensure that default values in formal parameters of modified templates are working as expected. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + + //Restriction b) + +/*If a record or set field or its corresponding matching mechanism is – implicitly or explicitly by using the not used symbol "-" - +left unspecified in the modified template, then the matching mechanism in the corresponding field of the +parent template shall be used.*/ + +module Sem_1505_ModifiedTemplates_007 { + +type component GeneralComp { } + +type record MyMessageType { + integer field1, + charstring field2, + boolean field3 +} + +template MyMessageType m_templateOne(integer p_intValue) := { + field1 := p_intValue, + field2 := "Hello World", + field3 := true +} + +template MyMessageType m_templateTwo(integer p_intValue:=2, boolean p_boolValue:=false) modifies m_templateOne := { + field1 := p_intValue, + field2 := -, //not used symbol + field3 := p_boolValue +} + +testcase TC_Sem_1505_ModifiedTemplates_007() runs on GeneralComp { + if (match(valueof(m_templateTwo.field1) , 2) and + match(valueof(m_templateTwo.field2) , "Hello World") and + match(valueof(m_templateTwo.field3) , false) + ) { + setverdict(pass); + } else { + setverdict(fail); + } +} + +control{ + execute(TC_Sem_1505_ModifiedTemplates_007()); +} + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1505_modified_templates/Sem_1505_ModifiedTemplates_008.ttcn b/ATS/core_language/15_templates/1505_modified_templates/Sem_1505_ModifiedTemplates_008.ttcn new file mode 100644 index 00000000..4bb0aab1 --- /dev/null +++ b/ATS/core_language/15_templates/1505_modified_templates/Sem_1505_ModifiedTemplates_008.ttcn @@ -0,0 +1,53 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:15.5, Ensure that the values of plain modified template definitions are as expected. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +/*A modified template may also be declared fuzzy using the @fuzzy modifier. +If a fuzzy modified template modifies a non-fuzzy unparameterized template, the inherited fields before modification will be the same for every evaluation of the fuzzy template.*/ + +module Sem_1505_ModifiedTemplates_008 { + +type port MyMessagePortType message { + inout MyMessageType +} + +type component GeneralComp { + port MyMessagePortType pt_myPort; +} + +type record MyMessageType { + integer field1, + charstring field2, + boolean field3 +} + +template MyMessageType m_templateOne := { + field1 := 2, + field2 := "Hello World", + field3 := - +} + +template @fuzzy MyMessageType m_templateTwo modifies m_templateOne := { + field1 := 4, + field3 := true +} + +testcase TC_Sem_1505_ModifiedTemplates_008() runs on GeneralComp { + if ((valueof(m_templateTwo.field1) == 4) and + (valueof(m_templateTwo.field2) == "Hello World") and + (valueof(m_templateTwo.field3) == true) + ) { + setverdict(pass); + } else { + setverdict(fail); + } +} + +control{ + execute(TC_Sem_1505_ModifiedTemplates_008()); +} + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1505_modified_templates/Sem_1505_ModifiedTemplates_009.ttcn b/ATS/core_language/15_templates/1505_modified_templates/Sem_1505_ModifiedTemplates_009.ttcn new file mode 100644 index 00000000..257be207 --- /dev/null +++ b/ATS/core_language/15_templates/1505_modified_templates/Sem_1505_ModifiedTemplates_009.ttcn @@ -0,0 +1,38 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:15.5, Ensure that default values in formal parameters of modified templates are working as expected. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +//Restriction c) +/*For templates, template fields and elements of record of and set of types, the above rules specified for +records and sets apply with the following deviations: + * if the value list notation is used, only the number of elements listed in the modified template is inherited +from the parent (i.e. the list is truncated at the last element of the list notation in the modified template)*/ + +module Sem_1505_ModifiedTemplates_009 { + +type component GeneralComp { } + +type record of charstring MyMessageType; + +template MyMessageType m_templateOne := {"A","AB", "ABC", "ABCD","ABCDE","ABCDEF"}; + + +template MyMessageType m_templateTwo modifies m_templateOne := { "-", "AB", "ABC"} //after 3rd element no more elements are inherited from the parent + +testcase TC_Sem_1505_ModifiedTemplates_009() runs on GeneralComp { + if (match(valueof(m_templateTwo),{"-", "AB", "ABC"})) + { + setverdict(pass,m_templateTwo); + } else { + setverdict(fail,m_templateTwo); + } +} + +control{ + execute(TC_Sem_1505_ModifiedTemplates_009()); +} + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1505_modified_templates/Sem_1505_ModifiedTemplates_010.ttcn b/ATS/core_language/15_templates/1505_modified_templates/Sem_1505_ModifiedTemplates_010.ttcn new file mode 100644 index 00000000..b4e58ad6 --- /dev/null +++ b/ATS/core_language/15_templates/1505_modified_templates/Sem_1505_ModifiedTemplates_010.ttcn @@ -0,0 +1,37 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:15.5, Ensure that default values in formal parameters of modified templates are working as expected. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +//Restriction c) +/*For templates, template fields and elements of record of and set of types, the above rules specified for +records and sets apply with the following deviations: + * if the value list notation is used, only the number of elements listed in the modified template is inherited +from the parent (i.e. the list is truncated at the last element of the list notation in the modified template)*/ +module Sem_1505_ModifiedTemplates_010 { + +type component GeneralComp { } + +type set of integer MyMessageType; + +template MyMessageType m_templateOne := {1,2,3,4,5,6,7,8,9,10}; + + +template MyMessageType m_templateTwo modifies m_templateOne := {2,2,3} //after 3rd element no more elements are inherited from the parent + modification on the first element + +testcase TC_Sem_1505_ModifiedTemplates_010() runs on GeneralComp { + if (match(valueof(m_templateTwo),{2,2,3})) + { + setverdict(pass,m_templateTwo); + } else { + setverdict(fail,m_templateTwo); + } +} + +control{ + execute(TC_Sem_1505_ModifiedTemplates_010()); +} + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1505_modified_templates/Syn_1505_ModifiedTemplates_001.ttcn b/ATS/core_language/15_templates/1505_modified_templates/Syn_1505_ModifiedTemplates_001.ttcn new file mode 100644 index 00000000..bda3f328 --- /dev/null +++ b/ATS/core_language/15_templates/1505_modified_templates/Syn_1505_ModifiedTemplates_001.ttcn @@ -0,0 +1,26 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:15.5, Ensure that plain modified template definitions are accepted. + ** @verdict pass accept, noexecution + *****************************************************************/ + +module Syn_1505_ModifiedTemplates_001 { + +type record MyMessageType { + integer field1, + charstring field2, + boolean field3 +} + +template MyMessageType m_templateOne := { + field1 := 2, + field2 := "Hello World", + field3 := true +} + +template MyMessageType m_templateTwo modifies m_templateOne := { + field1 := 4 +} + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1505_modified_templates/Syn_1505_ModifiedTemplates_002.ttcn b/ATS/core_language/15_templates/1505_modified_templates/Syn_1505_ModifiedTemplates_002.ttcn new file mode 100644 index 00000000..24ea4c26 --- /dev/null +++ b/ATS/core_language/15_templates/1505_modified_templates/Syn_1505_ModifiedTemplates_002.ttcn @@ -0,0 +1,32 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:15.5, Ensure that a modified template does not omit possible parameters introduced in any modification step. + ** @verdict pass accept, noexecution + *****************************************************************/ + +module Syn_1505_ModifiedTemplates_002 { + +type record MyMessageType { + integer field1, + charstring field2, + boolean field3 +} + +template MyMessageType m_templateOne(integer p_value) := { + field1 := p_value, + field2 := "Hello World", + field3 := true +} + +template MyMessageType m_templateTwo(integer p_value, boolean p_boolValue) modifies m_templateOne := { + field1 := p_value, + field3 := p_boolValue +} + +template MyMessageType m_templateThree(integer p_value, boolean p_boolValue) modifies m_templateTwo := { + field2 := "foobar" +} + + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1505_modified_templates/Syn_1505_ModifiedTemplates_003.ttcn b/ATS/core_language/15_templates/1505_modified_templates/Syn_1505_ModifiedTemplates_003.ttcn new file mode 100644 index 00000000..e4e7eb5a --- /dev/null +++ b/ATS/core_language/15_templates/1505_modified_templates/Syn_1505_ModifiedTemplates_003.ttcn @@ -0,0 +1,27 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:15.5, Ensure that the default values in formal parameters of modified templates are accepted. + ** @verdict pass accept, noexecution + *****************************************************************/ + +module Syn_1505_ModifiedTemplates_003 { + +type record MyMessageType { + integer field1, + charstring field2, + boolean field3 +} + +template MyMessageType m_templateOne(integer p_intValue) := { + field1 := p_intValue, + field2 := "Hello World", + field3 := true +} + +template MyMessageType m_templateTwo(integer p_intValue:=2, boolean p_boolValue:=false) modifies m_templateOne := { + field1 := p_intValue, + field3 := p_boolValue +} + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1505_modified_templates/Syn_1505_ModifiedTemplates_004.ttcn b/ATS/core_language/15_templates/1505_modified_templates/Syn_1505_ModifiedTemplates_004.ttcn new file mode 100644 index 00000000..68024420 --- /dev/null +++ b/ATS/core_language/15_templates/1505_modified_templates/Syn_1505_ModifiedTemplates_004.ttcn @@ -0,0 +1,26 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:15.5, Ensure that dash as default parameter values are accepted. + ** @verdict pass accept, noexecution + *****************************************************************/ + +module Syn_1505_ModifiedTemplates_004 { + +type record MyMessageType { + integer field1, + charstring field2, + boolean field3 +} + +template MyMessageType m_templateOne(integer p_intValue:=2) := { + field1 := p_intValue, + field2 := "Hello World", + field3 := true +} + +template MyMessageType m_templateTwo(integer p_intValue := -) modifies m_templateOne := { + field1 := p_intValue +} + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1506_referencing_elements_of_templates_or_template_fields/150601_referencing_individual_string_elements/NegSem_150601_ReferencingIndividualStringElements_001.ttcn b/ATS/core_language/15_templates/1506_referencing_elements_of_templates_or_template_fields/150601_referencing_individual_string_elements/NegSem_150601_ReferencingIndividualStringElements_001.ttcn new file mode 100644 index 00000000..0b83279f --- /dev/null +++ b/ATS/core_language/15_templates/1506_referencing_elements_of_templates_or_template_fields/150601_referencing_individual_string_elements/NegSem_150601_ReferencingIndividualStringElements_001.ttcn @@ -0,0 +1,30 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:15.6.1, Ensure that the referencing of individual string elements inside templates or template fields is forbidden. + ** @verdict pass reject + *****************************************************************/ + +module NegSem_150601_ReferencingIndividualStringElements_001 { + +type component GeneralComp { } + +testcase TC_NegSem_150601_ReferencingIndividualStringElements_001() runs on GeneralComp { + var template charstring m_char1 := "MYCHAR1"; + var template charstring m_char2; + + // illegal acchess. Instead, substr should be used. + m_char2 := m_char1[1]; + + if (m_char2 == "Y") { + setverdict(fail); + } else { + setverdict(pass); + } +} + +control{ + execute(TC_NegSem_150601_ReferencingIndividualStringElements_001()); +} + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1506_referencing_elements_of_templates_or_template_fields/150602_referencing_record_and_set_fields/NegSem_150602_ReferencingRecordAndSetFields_001.ttcn b/ATS/core_language/15_templates/1506_referencing_elements_of_templates_or_template_fields/150602_referencing_record_and_set_fields/NegSem_150602_ReferencingRecordAndSetFields_001.ttcn new file mode 100644 index 00000000..dc9ecae5 --- /dev/null +++ b/ATS/core_language/15_templates/1506_referencing_elements_of_templates_or_template_fields/150602_referencing_record_and_set_fields/NegSem_150602_ReferencingRecordAndSetFields_001.ttcn @@ -0,0 +1,40 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:15.6.2, Ensure that fields with omit values on the right-hand side of an assignment are rejected. + ** @verdict pass reject + *****************************************************************/ + +module NegSem_150602_ReferencingRecordAndSetFields_001 { + +type component GeneralComp { } + +type record MyRecordTwo { + integer g1, + MyRecordTwo g2 optional +} + +type record MyRecordOne { + integer f1 optional, + MyRecordTwo f2 optional +} + +testcase TC_NegSem_150602_ReferencingRecordAndSetFields_001() runs on GeneralComp { + var template MyRecordOne m_R1 := { + f1 := 5, + f2 := omit + } + + // shall cause an error as omit is assigned to m_R1.f2 + var template MyRecordOne m_R2 := m_R1.f2.g2; + // if we get here, something must be wrong + setverdict(fail); +} + +control{ + execute(TC_NegSem_150602_ReferencingRecordAndSetFields_001()); +} + + + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1506_referencing_elements_of_templates_or_template_fields/150602_referencing_record_and_set_fields/NegSem_150602_ReferencingRecordAndSetFields_002.ttcn b/ATS/core_language/15_templates/1506_referencing_elements_of_templates_or_template_fields/150602_referencing_record_and_set_fields/NegSem_150602_ReferencingRecordAndSetFields_002.ttcn new file mode 100644 index 00000000..8d4b68a2 --- /dev/null +++ b/ATS/core_language/15_templates/1506_referencing_elements_of_templates_or_template_fields/150602_referencing_record_and_set_fields/NegSem_150602_ReferencingRecordAndSetFields_002.ttcn @@ -0,0 +1,41 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:15.6.2, Ensure that fields with * values on the right-hand side of an assignment are rejected + ** @verdict pass reject + *****************************************************************/ + +module NegSem_150602_ReferencingRecordAndSetFields_002 { + +type component GeneralComp { } + +type record MyRecordTwo { + integer g1, + MyRecordTwo g2 optional +} + +type record MyRecordOne { + integer f1 optional, + MyRecordTwo f2 optional +} + +testcase TC_NegSem_150602_ReferencingRecordAndSetFields_002() runs on GeneralComp { + var template MyRecordOne m_R1 := { + f1 := 5, + f2 := omit + } + + m_R1.f2 := *; + + // shall cause an error as * is assigned to m_R1.f2 + var template MyRecordTwo m_R2 := m_R1.f2.g2; + // if we get here, something must be wrong + setverdict(fail); +} + +control{ + execute(TC_NegSem_150602_ReferencingRecordAndSetFields_002()); +} + + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1506_referencing_elements_of_templates_or_template_fields/150602_referencing_record_and_set_fields/NegSem_150602_ReferencingRecordAndSetFields_003.ttcn b/ATS/core_language/15_templates/1506_referencing_elements_of_templates_or_template_fields/150602_referencing_record_and_set_fields/NegSem_150602_ReferencingRecordAndSetFields_003.ttcn new file mode 100644 index 00000000..2fc7d9b5 --- /dev/null +++ b/ATS/core_language/15_templates/1506_referencing_elements_of_templates_or_template_fields/150602_referencing_record_and_set_fields/NegSem_150602_ReferencingRecordAndSetFields_003.ttcn @@ -0,0 +1,59 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:15.6.2, Ensure that value lists on the right-hand side of an assignment are not acceped. + ** @verdict pass reject + *****************************************************************/ + +module NegSem_150602_ReferencingRecordAndSetFields_003 { + +type component GeneralComp { } + +type record MyRecordTwo { + integer g1, + MyRecordTwo g2 optional +} + +type record MyRecordOne { + integer f1 optional, + MyRecordTwo f2 optional +} + +testcase TC_NegSem_150602_ReferencingRecordAndSetFields_003() runs on GeneralComp { + var template MyRecordOne m_R1 := ( + { + f1 := omit, + f2 := + { + g1 := 0, + g2 := omit + } + }, + { + f1 := 5, + f2 := + { + g1 := 1, + g2 := + { + g1 := 2, + g2 := omit + } + } + } + ); + + // shall cause an error as value list is assigned to m_R1 + var template MyRecordTwo m_R2 := m_R1.f2; + m_R2 := m_R1.f2.g2; + m_R2 := m_R1.f2.g2.g2; + // if we get here, something must be wrong + setverdict(fail); +} + +control{ + execute(TC_NegSem_150602_ReferencingRecordAndSetFields_003()); +} + + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1506_referencing_elements_of_templates_or_template_fields/150602_referencing_record_and_set_fields/NegSem_150602_ReferencingRecordAndSetFields_004.ttcn b/ATS/core_language/15_templates/1506_referencing_elements_of_templates_or_template_fields/150602_referencing_record_and_set_fields/NegSem_150602_ReferencingRecordAndSetFields_004.ttcn new file mode 100644 index 00000000..3bd20ae8 --- /dev/null +++ b/ATS/core_language/15_templates/1506_referencing_elements_of_templates_or_template_fields/150602_referencing_record_and_set_fields/NegSem_150602_ReferencingRecordAndSetFields_004.ttcn @@ -0,0 +1,59 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:15.6.2, Ensure that complement lists on the right-hand side of an assignment are not acceped. + ** @verdict pass reject + *****************************************************************/ + +module NegSem_150602_ReferencingRecordAndSetFields_004 { + +type component GeneralComp { } + +type record MyRecordTwo { + integer g1, + MyRecordTwo g2 optional +} + +type record MyRecordOne { + integer f1 optional, + MyRecordTwo f2 optional +} + +testcase TC_NegSem_150602_ReferencingRecordAndSetFields_004() runs on GeneralComp { + var template MyRecordOne m_R1 := complement( + { + f1 := omit, + f2 := + { + g1 := 0, + g2 := omit + } + }, + { + f1 := 5, + f2 := + { + g1 := 1, + g2 := + { + g1 := 2, + g2 := omit + } + } + } + ); + + // shall cause an error as a complement list is assigned to m_R1 + var template MyRecordTwo m_R2 := m_R1.f2; + m_R2 := m_R1.f2.g2; + m_R2 := m_R1.f2.g2.g2; + // if we get here, something must be wrong + setverdict(fail); +} + +control{ + execute(TC_NegSem_150602_ReferencingRecordAndSetFields_004()); +} + + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1506_referencing_elements_of_templates_or_template_fields/150602_referencing_record_and_set_fields/NegSem_150602_ReferencingRecordAndSetFields_005.ttcn b/ATS/core_language/15_templates/1506_referencing_elements_of_templates_or_template_fields/150602_referencing_record_and_set_fields/NegSem_150602_ReferencingRecordAndSetFields_005.ttcn new file mode 100644 index 00000000..5da2efaf --- /dev/null +++ b/ATS/core_language/15_templates/1506_referencing_elements_of_templates_or_template_fields/150602_referencing_record_and_set_fields/NegSem_150602_ReferencingRecordAndSetFields_005.ttcn @@ -0,0 +1,32 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:15.6.2, Ensure that referencing a template field with the ifpresent attribute causes a rejection. + ** @verdict pass reject + *****************************************************************/ + +module NegSem_150602_ReferencingRecordAndSetFields_005 { + +type component GeneralComp { } + +type record MyRecordOne { + MyRecordOne f1 optional +} + +testcase TC_NegSem_150602_ReferencingRecordAndSetFields_005() runs on GeneralComp { + var template MyRecordOne m_R1 := { + f1 := * ifpresent + } + var template MyRecordOne m_R2 := { + f1 := m_R1.f1.f1 // access to a field with ifpresent shall cause an error! + } + setverdict(fail); +} + +control{ + execute(TC_NegSem_150602_ReferencingRecordAndSetFields_005()); +} + + + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1506_referencing_elements_of_templates_or_template_fields/150602_referencing_record_and_set_fields/NegSem_150602_ReferencingRecordAndSetFields_006.ttcn b/ATS/core_language/15_templates/1506_referencing_elements_of_templates_or_template_fields/150602_referencing_record_and_set_fields/NegSem_150602_ReferencingRecordAndSetFields_006.ttcn new file mode 100644 index 00000000..7c11f8cd --- /dev/null +++ b/ATS/core_language/15_templates/1506_referencing_elements_of_templates_or_template_fields/150602_referencing_record_and_set_fields/NegSem_150602_ReferencingRecordAndSetFields_006.ttcn @@ -0,0 +1,37 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:15.6.2, Ensure that referencing a field of an address type, which actual value is null shall cause rejection. + ** @verdict pass reject + *****************************************************************/ + +//Restriction d) +/*Special value null: referencing a field of an address type, which actual value is null shall cause an error.*/ + +module NegSem_150602_ReferencingRecordAndSetFields_006 { + +type component GeneralComp { } + +type integer address; + +type record MyRecordOne { + address f1 +} + +testcase TC_NegSem_150602_ReferencingRecordAndSetFields_006() runs on GeneralComp { + var template MyRecordOne m_R1 := { + f1 := null + } + var template MyRecordOne m_R2 := { + f1 := m_R1.f1.f1 // access to a field with null shall cause an error! + } + setverdict(pass); +} + +control{ + execute(TC_NegSem_150602_ReferencingRecordAndSetFields_006()); +} + + + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1506_referencing_elements_of_templates_or_template_fields/150602_referencing_record_and_set_fields/Sem_150602_ReferencingRecordAndSetFields_001.ttcn b/ATS/core_language/15_templates/1506_referencing_elements_of_templates_or_template_fields/150602_referencing_record_and_set_fields/Sem_150602_ReferencingRecordAndSetFields_001.ttcn new file mode 100644 index 00000000..950a297d --- /dev/null +++ b/ATS/core_language/15_templates/1506_referencing_elements_of_templates_or_template_fields/150602_referencing_record_and_set_fields/Sem_150602_ReferencingRecordAndSetFields_001.ttcn @@ -0,0 +1,54 @@ +/***************************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:15.6.2, ? shall be returned for mandatory subfields and * shall be returned for optional subfields. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_150602_ReferencingRecordAndSetFields_001 { + + type component GeneralComp { } + + type record MyRecordTwo { + integer g1, + MyRecordTwo g2 optional + } + + type record MyRecordOne { + integer f1 optional, + MyRecordTwo f2 optional + } + + testcase TC_Sem_150602_ReferencingRecordAndSetFields_001() runs on GeneralComp { + var template MyRecordOne m_R1 := { + f1 := 0, + f2 := ? + } + + // m_R2.g1 is mandatory, therefore it shall be ? + // m_R2.g2 is optional, therefore it shall be * + var template MyRecordTwo m_R2 := m_R1.f2; + + var template(value) MyRecordTwo m_value := { + g1 := 5, + g2 := omit + } + + // match against ? + var boolean v_matchRes1 := match(5, m_R2.g1); + + + if (v_matchRes1) { + setverdict(pass); + } else { + setverdict(fail, "match against ?"); + } + + } + + control{ + execute(TC_Sem_150602_ReferencingRecordAndSetFields_001()); + } + + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1506_referencing_elements_of_templates_or_template_fields/150602_referencing_record_and_set_fields/Sem_150602_ReferencingRecordAndSetFields_002.ttcn b/ATS/core_language/15_templates/1506_referencing_elements_of_templates_or_template_fields/150602_referencing_record_and_set_fields/Sem_150602_ReferencingRecordAndSetFields_002.ttcn new file mode 100644 index 00000000..fd298ceb --- /dev/null +++ b/ATS/core_language/15_templates/1506_referencing_elements_of_templates_or_template_fields/150602_referencing_record_and_set_fields/Sem_150602_ReferencingRecordAndSetFields_002.ttcn @@ -0,0 +1,60 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:15.6.2, Ensure that the recurisve anyvalue expansion is performed correctly when new values are assigned. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_150602_ReferencingRecordAndSetFields_002 { + +type component GeneralComp { } + +type record MyRecordTwo { + integer g1, + MyRecordTwo g2 optional +} + +type record MyRecordOne { + integer f1 optional, + MyRecordTwo f2 optional +} + +testcase TC_Sem_150602_ReferencingRecordAndSetFields_002() runs on GeneralComp { + var template MyRecordOne m_R1 := { + f1 := 0, + f2 := ? + } + + m_R1.f2.g2.g2 := {g1:=1, g2:=omit}; + // as f2 is ? and we access g2.g2, TTCN-3 should expand the following fields to + // contain the following values: + // m_R1.f1 = 0 + // m_R1.f2 = { + // g1 = ? + // g2 = { + // g1 = ?, + // g2 = { + // g1 = 1 + // g2 = omit + // } + // } + // } + + if (match(valueof(m_R1.f1), 0) and + ispresent(m_R1.f2.g2) and + ispresent(m_R1.f2.g2.g2) and + ( ispresent(m_R1.f2.g2.g2.g2) == false) and + match( valueof(m_R1.f2.g2.g2.g1), 1 ) + ) { + setverdict(pass); + } else { + setverdict(fail); + } +} + +control{ + execute(TC_Sem_150602_ReferencingRecordAndSetFields_002()); +} + + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1506_referencing_elements_of_templates_or_template_fields/150602_referencing_record_and_set_fields/Sem_150602_ReferencingRecordAndSetFields_003.ttcn b/ATS/core_language/15_templates/1506_referencing_elements_of_templates_or_template_fields/150602_referencing_record_and_set_fields/Sem_150602_ReferencingRecordAndSetFields_003.ttcn new file mode 100644 index 00000000..155c3896 --- /dev/null +++ b/ATS/core_language/15_templates/1506_referencing_elements_of_templates_or_template_fields/150602_referencing_record_and_set_fields/Sem_150602_ReferencingRecordAndSetFields_003.ttcn @@ -0,0 +1,54 @@ +/***************************************************************** + ** @author STF 487 (updated by STF 521) + ** @version 0.0.2 + ** @purpose 1:15.6.2, ? shall be returned for mandatory subfields and * shall be returned for optional subfields. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_150602_ReferencingRecordAndSetFields_003 { + + type component GeneralComp { } + + type record MyRecordTwo { + integer g1, + MyRecordTwo g2 optional + } + + type record MyRecordOne { + integer f1 optional, + MyRecordTwo f2 optional + } + + testcase TC_Sem_150602_ReferencingRecordAndSetFields_003() runs on GeneralComp { + var boolean v_matchRes; + var template MyRecordOne m_R1 := { + f1 := 0, + f2 := ? + } + + // m_R2.g1 is mandatory, therefore it shall be ? + // m_R2.g2 is optional, therefore it shall be * + var template MyRecordTwo m_R2 := m_R1.f2; + var MyRecordTwo m_value := { + g1 := 5, + g2 := omit + } + + // match against {?, *} + v_matchRes := match(m_value, MyRecordTwo:{m_R2.g1, m_R2.g2}); + + + if (v_matchRes) { + setverdict(pass); + } else { + setverdict(fail, "match against {?, *}"); + } + + } + + control{ + execute(TC_Sem_150602_ReferencingRecordAndSetFields_003()); + } + + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1506_referencing_elements_of_templates_or_template_fields/150602_referencing_record_and_set_fields/Sem_150602_ReferencingRecordAndSetFields_004.ttcn b/ATS/core_language/15_templates/1506_referencing_elements_of_templates_or_template_fields/150602_referencing_record_and_set_fields/Sem_150602_ReferencingRecordAndSetFields_004.ttcn new file mode 100644 index 00000000..d152aaeb --- /dev/null +++ b/ATS/core_language/15_templates/1506_referencing_elements_of_templates_or_template_fields/150602_referencing_record_and_set_fields/Sem_150602_ReferencingRecordAndSetFields_004.ttcn @@ -0,0 +1,53 @@ +/***************************************************************** + ** @author STF 487 (updated by STF 521) + ** @version 0.0.2 + ** @purpose 1:15.6.2, ? shall be returned for mandatory subfields and * shall be returned for optional subfields. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_150602_ReferencingRecordAndSetFields_004 { + + type component GeneralComp { } + + type record MyRecordTwo { + integer g1, + MyRecordTwo g2 optional + } + + type record MyRecordOne { + integer f1 optional, + MyRecordTwo f2 optional + } + + testcase TC_Sem_150602_ReferencingRecordAndSetFields_004() runs on GeneralComp { + var template MyRecordOne m_R1 := { + f1 := 0, + f2 := ? + } + + // m_R2.g1 is mandatory, therefore it shall be ? + // m_R2.g2 is optional, therefore it shall be * + var template MyRecordTwo m_R2 := m_R1.f2; + + var MyRecordTwo m_value := { + g1 := 5, + g2 := omit + } + + // match against {?, *} - use dotted notation to cover other expansion thread + var boolean v_matchRes := match(m_value, MyRecordTwo:{m_R1.f2.g1, m_R1.f2.g2}); + + + if (v_matchRes) { + setverdict(pass); + } else { + setverdict(fail, "match against {?, *} - use dotted notation to cover other expansion thread"); + } + } + + control{ + execute(TC_Sem_150602_ReferencingRecordAndSetFields_004()); + } + + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1506_referencing_elements_of_templates_or_template_fields/150603_referencing_record_of_and_set_elements/NegSem_150603_ReferencingRecordOfAndSetElements_001.ttcn b/ATS/core_language/15_templates/1506_referencing_elements_of_templates_or_template_fields/150603_referencing_record_of_and_set_elements/NegSem_150603_ReferencingRecordOfAndSetElements_001.ttcn new file mode 100644 index 00000000..ef52885a --- /dev/null +++ b/ATS/core_language/15_templates/1506_referencing_elements_of_templates_or_template_fields/150603_referencing_record_of_and_set_elements/NegSem_150603_ReferencingRecordOfAndSetElements_001.ttcn @@ -0,0 +1,30 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:15.6.3, Ensure that referencing an element within a value list causes an error in the context of record of. + ** @verdict pass reject + *****************************************************************/ + +module NegSem_150603_ReferencingRecordOfAndSetElements_001 { + + type component GeneralComp { } + + type record of integer RoI; + type record of RoI RoRoI; + + testcase TC_NegSem_150603_ReferencingRecordOfAndSetElements_001() runs on GeneralComp { + var template RoI m_one; + var template RoRoI m_two; + template RoRoI constraint_value := {{},{0},{0,0},{0,0,0}}; + + m_two := ( constraint_value, constraint_value ); // value list + m_one := m_two[0]; // shall cause an error as we access a value list + + setverdict(fail); + } + + control{ + execute(TC_NegSem_150603_ReferencingRecordOfAndSetElements_001()); + } + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1506_referencing_elements_of_templates_or_template_fields/150603_referencing_record_of_and_set_elements/NegSem_150603_ReferencingRecordOfAndSetElements_002.ttcn b/ATS/core_language/15_templates/1506_referencing_elements_of_templates_or_template_fields/150603_referencing_record_of_and_set_elements/NegSem_150603_ReferencingRecordOfAndSetElements_002.ttcn new file mode 100644 index 00000000..1f4a8208 --- /dev/null +++ b/ATS/core_language/15_templates/1506_referencing_elements_of_templates_or_template_fields/150603_referencing_record_of_and_set_elements/NegSem_150603_ReferencingRecordOfAndSetElements_002.ttcn @@ -0,0 +1,31 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:15.6.3, Ensure that access to unitialized fields in the context of record of is rejected. + ** @verdict pass reject + *****************************************************************/ + +module NegSem_150603_ReferencingRecordOfAndSetElements_002 { + + type component GeneralComp { } + + type record of integer RoI; + + testcase TC_NegSem_150603_ReferencingRecordOfAndSetElements_002() runs on GeneralComp { + var template RoI m_one; + var integer v_test; + + m_one[0] := 0; + m_one[2] := 1; + v_test := valueof(m_one[1]); // shall cause an error as element one is an unitialized field + + setverdict(fail); + } + + control{ + execute(TC_NegSem_150603_ReferencingRecordOfAndSetElements_002()); + } + + + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1506_referencing_elements_of_templates_or_template_fields/150603_referencing_record_of_and_set_elements/NegSem_150603_ReferencingRecordOfAndSetElements_003.ttcn b/ATS/core_language/15_templates/1506_referencing_elements_of_templates_or_template_fields/150603_referencing_record_of_and_set_elements/NegSem_150603_ReferencingRecordOfAndSetElements_003.ttcn new file mode 100644 index 00000000..52c0857e --- /dev/null +++ b/ATS/core_language/15_templates/1506_referencing_elements_of_templates_or_template_fields/150603_referencing_record_of_and_set_elements/NegSem_150603_ReferencingRecordOfAndSetElements_003.ttcn @@ -0,0 +1,30 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:15.6.3, Ensure that anyvalueornone fields in the context of record of is rejected. + ** @verdict pass reject + *****************************************************************/ + +module NegSem_150603_ReferencingRecordOfAndSetElements_003 { + + type component GeneralComp { } + + type record of integer RoI; + + testcase TC_NegSem_150603_ReferencingRecordOfAndSetElements_003() runs on GeneralComp { + var template RoI m_one; + var integer v_test; + + m_one := {0,*,1,2}; + v_test := valueof(m_one[1]); // shall cause an error as element one is an "any value or none" field + + setverdict(fail); + } + + control{ + execute(TC_NegSem_150603_ReferencingRecordOfAndSetElements_003()); + } + + + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1506_referencing_elements_of_templates_or_template_fields/150603_referencing_record_of_and_set_elements/NegSem_150603_ReferencingRecordOfAndSetElements_004.ttcn b/ATS/core_language/15_templates/1506_referencing_elements_of_templates_or_template_fields/150603_referencing_record_of_and_set_elements/NegSem_150603_ReferencingRecordOfAndSetElements_004.ttcn new file mode 100644 index 00000000..931554fa --- /dev/null +++ b/ATS/core_language/15_templates/1506_referencing_elements_of_templates_or_template_fields/150603_referencing_record_of_and_set_elements/NegSem_150603_ReferencingRecordOfAndSetElements_004.ttcn @@ -0,0 +1,28 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:15.6.3, Ensure that complement value lists in the context of record of are rejected. + ** @verdict pass reject + *****************************************************************/ + +module NegSem_150603_ReferencingRecordOfAndSetElements_004 { + + type component GeneralComp { } + + type record of integer RoI; + + testcase TC_NegSem_150603_ReferencingRecordOfAndSetElements_004() runs on GeneralComp { + var template RoI m_one; + var integer v_test; + + m_one := {0,complement(1,3,5),1,2}; + v_test := valueof(m_one[1]); // shall cause an error as element one is a complement list + + setverdict(fail); + } + + control{ + execute(TC_NegSem_150603_ReferencingRecordOfAndSetElements_004()); + } + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1506_referencing_elements_of_templates_or_template_fields/150603_referencing_record_of_and_set_elements/NegSem_150603_ReferencingRecordOfAndSetElements_005.ttcn b/ATS/core_language/15_templates/1506_referencing_elements_of_templates_or_template_fields/150603_referencing_record_of_and_set_elements/NegSem_150603_ReferencingRecordOfAndSetElements_005.ttcn new file mode 100644 index 00000000..bce2ed3c --- /dev/null +++ b/ATS/core_language/15_templates/1506_referencing_elements_of_templates_or_template_fields/150603_referencing_record_of_and_set_elements/NegSem_150603_ReferencingRecordOfAndSetElements_005.ttcn @@ -0,0 +1,28 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:15.6.3, Ensure that subset in the context of record of are rejected. + ** @verdict pass reject + *****************************************************************/ + +module NegSem_150603_ReferencingRecordOfAndSetElements_005 { + + type component GeneralComp { } + + type record of integer RoI; + + testcase TC_NegSem_150603_ReferencingRecordOfAndSetElements_005() runs on GeneralComp { + var template RoI m_one; + var integer v_test; + + m_one := {0,subset(1,3,5),1,2}; + v_test := valueof(m_one[1]); // shall cause an error as element one is a subset + + setverdict(fail); + } + + control{ + execute(TC_NegSem_150603_ReferencingRecordOfAndSetElements_005()); + } + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1506_referencing_elements_of_templates_or_template_fields/150603_referencing_record_of_and_set_elements/NegSem_150603_ReferencingRecordOfAndSetElements_006.ttcn b/ATS/core_language/15_templates/1506_referencing_elements_of_templates_or_template_fields/150603_referencing_record_of_and_set_elements/NegSem_150603_ReferencingRecordOfAndSetElements_006.ttcn new file mode 100644 index 00000000..433910f3 --- /dev/null +++ b/ATS/core_language/15_templates/1506_referencing_elements_of_templates_or_template_fields/150603_referencing_record_of_and_set_elements/NegSem_150603_ReferencingRecordOfAndSetElements_006.ttcn @@ -0,0 +1,28 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:15.6.3, Ensure that superset in the context of record of are rejected. + ** @verdict pass reject + *****************************************************************/ + +module NegSem_150603_ReferencingRecordOfAndSetElements_006 { + + type component GeneralComp { } + + type record of integer RoI; + + testcase TC_NegSem_150603_ReferencingRecordOfAndSetElements_006() runs on GeneralComp { + var template RoI m_one; + var integer v_test; + + m_one := {0,superset(1,3,5),1,2}; + v_test := valueof(m_one[1]); // shall cause an error as element one is a superset + + setverdict(fail); + } + + control{ + execute(TC_NegSem_150603_ReferencingRecordOfAndSetElements_006()); + } + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1506_referencing_elements_of_templates_or_template_fields/150603_referencing_record_of_and_set_elements/NegSem_150603_ReferencingRecordOfAndSetElements_007.ttcn b/ATS/core_language/15_templates/1506_referencing_elements_of_templates_or_template_fields/150603_referencing_record_of_and_set_elements/NegSem_150603_ReferencingRecordOfAndSetElements_007.ttcn new file mode 100644 index 00000000..b50ce2f2 --- /dev/null +++ b/ATS/core_language/15_templates/1506_referencing_elements_of_templates_or_template_fields/150603_referencing_record_of_and_set_elements/NegSem_150603_ReferencingRecordOfAndSetElements_007.ttcn @@ -0,0 +1,28 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:15.6.3, Ensure that access into permutation in record of templates is forbidden. + ** @verdict pass reject + *****************************************************************/ + +module NegSem_150603_ReferencingRecordOfAndSetElements_007 { + + type component GeneralComp { } + + type record of integer RoI; + + testcase TC_NegSem_150603_ReferencingRecordOfAndSetElements_007() runs on GeneralComp { + var template RoI m_one; + var integer v_test; + + m_one := {permutation(0,1,3,?),2,*}; + v_test := valueof(m_one[2]); // shall cause an error as the third element (index 2) will be inside the permutation + + setverdict(fail); + } + + control{ + execute(TC_NegSem_150603_ReferencingRecordOfAndSetElements_007()); + } + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1506_referencing_elements_of_templates_or_template_fields/150603_referencing_record_of_and_set_elements/NegSem_150603_ReferencingRecordOfAndSetElements_008.ttcn b/ATS/core_language/15_templates/1506_referencing_elements_of_templates_or_template_fields/150603_referencing_record_of_and_set_elements/NegSem_150603_ReferencingRecordOfAndSetElements_008.ttcn new file mode 100644 index 00000000..537e6ce1 --- /dev/null +++ b/ATS/core_language/15_templates/1506_referencing_elements_of_templates_or_template_fields/150603_referencing_record_of_and_set_elements/NegSem_150603_ReferencingRecordOfAndSetElements_008.ttcn @@ -0,0 +1,28 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:15.6.3, Ensure that access to record of indexes is forbidden when a previous index entry is a permutation with a *. + ** @verdict pass reject + *****************************************************************/ + +module NegSem_150603_ReferencingRecordOfAndSetElements_008 { + + type component GeneralComp { } + + type record of integer RoI; + + testcase TC_NegSem_150603_ReferencingRecordOfAndSetElements_008() runs on GeneralComp { + var template RoI m_one; + var integer v_test; + + m_one := {permutation(0,1,3,*),2,?}; + v_test := valueof(m_one[5]); // shall cause an error as the permutation contains a * that is able to cover any record of indexes + + setverdict(fail); + } + + control{ + execute(TC_NegSem_150603_ReferencingRecordOfAndSetElements_008()); + } + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1506_referencing_elements_of_templates_or_template_fields/150603_referencing_record_of_and_set_elements/NegSem_150603_ReferencingRecordOfAndSetElements_009.ttcn b/ATS/core_language/15_templates/1506_referencing_elements_of_templates_or_template_fields/150603_referencing_record_of_and_set_elements/NegSem_150603_ReferencingRecordOfAndSetElements_009.ttcn new file mode 100644 index 00000000..d7c032b7 --- /dev/null +++ b/ATS/core_language/15_templates/1506_referencing_elements_of_templates_or_template_fields/150603_referencing_record_of_and_set_elements/NegSem_150603_ReferencingRecordOfAndSetElements_009.ttcn @@ -0,0 +1,28 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:15.6.3, Ensure that access to ifpresent fields is not allowed. + ** @verdict pass reject + *****************************************************************/ + +module NegSem_150603_ReferencingRecordOfAndSetElements_009 { + + type component GeneralComp { } + + type record of integer RoI; + + testcase TC_NegSem_150603_ReferencingRecordOfAndSetElements_009() runs on GeneralComp { + var template RoI m_one; + var integer v_test; + + m_one := {1 ifpresent,2,?}; + v_test := valueof(m_one[0]); // shall cause an error due to the presence of ifpresent + + setverdict(fail); + } + + control{ + execute(TC_NegSem_150603_ReferencingRecordOfAndSetElements_009()); + } + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1506_referencing_elements_of_templates_or_template_fields/150603_referencing_record_of_and_set_elements/NegSem_150603_ReferencingRecordOfAndSetElements_010.ttcn b/ATS/core_language/15_templates/1506_referencing_elements_of_templates_or_template_fields/150603_referencing_record_of_and_set_elements/NegSem_150603_ReferencingRecordOfAndSetElements_010.ttcn new file mode 100644 index 00000000..701a1e61 --- /dev/null +++ b/ATS/core_language/15_templates/1506_referencing_elements_of_templates_or_template_fields/150603_referencing_record_of_and_set_elements/NegSem_150603_ReferencingRecordOfAndSetElements_010.ttcn @@ -0,0 +1,42 @@ +/***************************************************************** + ** @author STF 451 + ** @version 0.0.1 + ** @purpose 1:15.6.3, Ensure that referencing AnyValueOrNone fields is not allowed. + ** @verdict pass reject + *****************************************************************/ + +module NegSem_150603_ReferencingRecordOfAndSetElements_010 { + + type component GeneralComp { } + + type record of integer RoI; + + testcase TC_NegSem_150603_ReferencingRecordOfAndSetElements_010() runs on GeneralComp { + var template RoI m_one; + + m_one := ?; + m_one[2] := 2; + // assignment should yield {?,?,2,*} + + if (not match(5,m_one[0])) { + setverdict(fail); + } + if (not match(5,m_one[1])) { + setverdict(fail); + } + if (not match(2,m_one[2])) { + setverdict(fail); + } + if (not match(5,m_one[3])) { // shall cause an error due to the presence of AnyValueOrNone + setverdict(fail); + } + setverdict(pass); + } + + control{ + execute(TC_NegSem_150603_ReferencingRecordOfAndSetElements_010()); + } + + + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1506_referencing_elements_of_templates_or_template_fields/150603_referencing_record_of_and_set_elements/NegSem_150603_ReferencingRecordOfAndSetElements_011.ttcn b/ATS/core_language/15_templates/1506_referencing_elements_of_templates_or_template_fields/150603_referencing_record_of_and_set_elements/NegSem_150603_ReferencingRecordOfAndSetElements_011.ttcn new file mode 100644 index 00000000..be1a94bc --- /dev/null +++ b/ATS/core_language/15_templates/1506_referencing_elements_of_templates_or_template_fields/150603_referencing_record_of_and_set_elements/NegSem_150603_ReferencingRecordOfAndSetElements_011.ttcn @@ -0,0 +1,41 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:15.6.3, Ensure that referencing uninitialized fields is not allowed. + ** @verdict pass reject + *****************************************************************/ + + //Restriction a) Omit: referencing an element within a record of, set of or array field to which omit is assigned shall follow the rules specified in clause 6.2.3. + + /*Clause 6.2.3: If the value of the element indicated by the index at the right-hand of an assignment is undefined (uninitialized), this +shall cause a semantic or runtime error. Referencing an identified element of an uninitialized or omitted record of or set +of field or value on the right hand side of an assignment shall cause an error.*/ + + +module NegSem_150603_ReferencingRecordOfAndSetElements_011 { + + type component GeneralComp { } + + type record of integer RoI; + + testcase TC_NegSem_150603_ReferencingRecordOfAndSetElements_011() runs on GeneralComp { + + var template RoI m_one; + var template RoI m_two; + + m_one := {1,-}; // {1,-} + m_two := {m_one[1],4}; // {-,4} error not allowed referencing + + if (not isvalue(m_two)) { + setverdict(pass); + } + + } + + control{ + execute(TC_NegSem_150603_ReferencingRecordOfAndSetElements_011()); + } + + + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1506_referencing_elements_of_templates_or_template_fields/150603_referencing_record_of_and_set_elements/NegSem_150603_ReferencingRecordOfAndSetElements_012.ttcn b/ATS/core_language/15_templates/1506_referencing_elements_of_templates_or_template_fields/150603_referencing_record_of_and_set_elements/NegSem_150603_ReferencingRecordOfAndSetElements_012.ttcn new file mode 100644 index 00000000..4c180d5d --- /dev/null +++ b/ATS/core_language/15_templates/1506_referencing_elements_of_templates_or_template_fields/150603_referencing_record_of_and_set_elements/NegSem_150603_ReferencingRecordOfAndSetElements_012.ttcn @@ -0,0 +1,41 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:15.6.3, Ensure that referencing uninitialized fields is not allowed. + ** @verdict pass reject + *****************************************************************/ + +//Restriction a) Omit: referencing an element within a record of, set of or array field to which omit is assigned shall follow the rules specified in clause 6.2.3. + +/*Clause 6.2.3: If the value of the element indicated by the index at the right-hand of an assignment is undefined (uninitialized), this +shall cause a semantic or runtime error. Referencing an identified element of an uninitialized or omitted record of or set +of field or value on the right hand side of an assignment shall cause an error.*/ + + +module NegSem_150603_ReferencingRecordOfAndSetElements_012{ + + type component GeneralComp { } + + type set of integer SoI; + + testcase TC_NegSem_150603_ReferencingRecordOfAndSetElements_012() runs on GeneralComp { + + var template SoI m_one; + var template SoI m_two; + + m_one := {1,-}; // {1,-} + m_two := {m_one[1],2}; // {-,2} error not allowed referencing + + if (not isvalue(m_two)) { + setverdict(pass); + } + + } + + control{ + execute(TC_NegSem_150603_ReferencingRecordOfAndSetElements_012()); + } + + + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1506_referencing_elements_of_templates_or_template_fields/150603_referencing_record_of_and_set_elements/NegSem_150603_ReferencingRecordOfAndSetElements_013.ttcn b/ATS/core_language/15_templates/1506_referencing_elements_of_templates_or_template_fields/150603_referencing_record_of_and_set_elements/NegSem_150603_ReferencingRecordOfAndSetElements_013.ttcn new file mode 100644 index 00000000..add8bf0f --- /dev/null +++ b/ATS/core_language/15_templates/1506_referencing_elements_of_templates_or_template_fields/150603_referencing_record_of_and_set_elements/NegSem_150603_ReferencingRecordOfAndSetElements_013.ttcn @@ -0,0 +1,40 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:15.6.3, Ensure that referencing uninitialized fields is not allowed. + ** @verdict pass reject + *****************************************************************/ + +//Restriction a) Omit: referencing an element within a record of, set of or array field to which omit is assigned shall follow the rules specified in clause 6.2.3. + +/*Clause 6.2.3: If the value of the element indicated by the index at the right-hand of an assignment is undefined (uninitialized), this +shall cause a semantic or runtime error. Referencing an identified element of an uninitialized or omitted record of or set +of field or value on the right hand side of an assignment shall cause an error.*/ + + +module NegSem_150603_ReferencingRecordOfAndSetElements_013{ + + type component GeneralComp { } + + + testcase TC_NegSem_150603_ReferencingRecordOfAndSetElements_013() runs on GeneralComp { + + var integer m_one[2]; + var integer m_two[2]; + + m_one := {1,-}; // {1,-} + m_two := {m_one[1],2}; // {-,2} error not allowed referencing + + if (not isvalue(m_two)) { + setverdict(pass); + } + + } + + control{ + execute(TC_NegSem_150603_ReferencingRecordOfAndSetElements_013()); + } + + + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1506_referencing_elements_of_templates_or_template_fields/150603_referencing_record_of_and_set_elements/NegSem_150603_ReferencingRecordOfAndSetElements_014.ttcn b/ATS/core_language/15_templates/1506_referencing_elements_of_templates_or_template_fields/150603_referencing_record_of_and_set_elements/NegSem_150603_ReferencingRecordOfAndSetElements_014.ttcn new file mode 100644 index 00000000..9c8a90fb --- /dev/null +++ b/ATS/core_language/15_templates/1506_referencing_elements_of_templates_or_template_fields/150603_referencing_record_of_and_set_elements/NegSem_150603_ReferencingRecordOfAndSetElements_014.ttcn @@ -0,0 +1,30 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:15.6.3, Ensure that referencing an element within a value list causes an error in the context of set of. + ** @verdict pass reject + *****************************************************************/ + +module NegSem_150603_ReferencingRecordOfAndSetElements_014 { + + type component GeneralComp { } + + type set of integer RoI; + type set of RoI RoRoI; + + testcase TC_NegSem_150603_ReferencingRecordOfAndSetElements_014() runs on GeneralComp { + var template RoI m_one; + var template RoRoI m_two; + template RoRoI constraint_value := {{},{0},{0,0},{0,0,0}}; + + m_two := ( constraint_value, constraint_value ); // value list + m_one := m_two[0]; // shall cause an error as we access a value list + + setverdict(fail); + } + + control{ + execute(TC_NegSem_150603_ReferencingRecordOfAndSetElements_014()); + } + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1506_referencing_elements_of_templates_or_template_fields/150603_referencing_record_of_and_set_elements/NegSem_150603_ReferencingRecordOfAndSetElements_015.ttcn b/ATS/core_language/15_templates/1506_referencing_elements_of_templates_or_template_fields/150603_referencing_record_of_and_set_elements/NegSem_150603_ReferencingRecordOfAndSetElements_015.ttcn new file mode 100644 index 00000000..d7662887 --- /dev/null +++ b/ATS/core_language/15_templates/1506_referencing_elements_of_templates_or_template_fields/150603_referencing_record_of_and_set_elements/NegSem_150603_ReferencingRecordOfAndSetElements_015.ttcn @@ -0,0 +1,32 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:15.6.3, Ensure that referencing an element of an address type, which actual value is null shall cause an error. + ** @verdict pass reject + *****************************************************************/ + + //Restriction h) +/*Special value null: referencing an element of an address type, which actual value is null shall cause an error.*/ + +module NegSem_150603_ReferencingRecordOfAndSetElements_015 { + + type component GeneralComp { } + + type set of integer RoI; + type integer address; + + testcase TC_NegSem_150603_ReferencingRecordOfAndSetElements_015() runs on GeneralComp { + var address v_add := null; + var template RoI m_one; + + + m_one := {v_add, 1}; // // shall cause an error as we access a value list + + setverdict(pass); + } + + control{ + execute(TC_NegSem_150603_ReferencingRecordOfAndSetElements_015()); + } + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1506_referencing_elements_of_templates_or_template_fields/150603_referencing_record_of_and_set_elements/Sem_150603_ReferencingRecordOfAndSetElements_001.ttcn b/ATS/core_language/15_templates/1506_referencing_elements_of_templates_or_template_fields/150603_referencing_record_of_and_set_elements/Sem_150603_ReferencingRecordOfAndSetElements_001.ttcn new file mode 100644 index 00000000..0e9e5f84 --- /dev/null +++ b/ATS/core_language/15_templates/1506_referencing_elements_of_templates_or_template_fields/150603_referencing_record_of_and_set_elements/Sem_150603_ReferencingRecordOfAndSetElements_001.ttcn @@ -0,0 +1,35 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:15.6.3, Ensure that assignment of an anyvalue on the right hand side yields an anyvalue in the context of record of. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_150603_ReferencingRecordOfAndSetElements_001 { + + type component GeneralComp { } + + type record of integer RoI; + + testcase TC_Sem_150603_ReferencingRecordOfAndSetElements_001() runs on GeneralComp { + var template RoI m_one; + var template RoI m_two; + + m_one := {0,?,2}; + m_two := {0,1,2}; + m_two[1] := m_one[1]; + + if (match(5,m_two[1])) { + setverdict(pass); + } else { + setverdict(fail); + } + } + + control{ + execute(TC_Sem_150603_ReferencingRecordOfAndSetElements_001()); + } + + + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1506_referencing_elements_of_templates_or_template_fields/150603_referencing_record_of_and_set_elements/Sem_150603_ReferencingRecordOfAndSetElements_002.ttcn b/ATS/core_language/15_templates/1506_referencing_elements_of_templates_or_template_fields/150603_referencing_record_of_and_set_elements/Sem_150603_ReferencingRecordOfAndSetElements_002.ttcn new file mode 100644 index 00000000..8198379a --- /dev/null +++ b/ATS/core_language/15_templates/1506_referencing_elements_of_templates_or_template_fields/150603_referencing_record_of_and_set_elements/Sem_150603_ReferencingRecordOfAndSetElements_002.ttcn @@ -0,0 +1,40 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:15.6.3, Ensure that assignment to a anyvalue in the context of record of is handled correctly. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_150603_ReferencingRecordOfAndSetElements_002 { + + type component GeneralComp { } + + type record of integer RoI; + + testcase TC_Sem_150603_ReferencingRecordOfAndSetElements_002() runs on GeneralComp { + var template RoI m_one; + + m_one := ?; + m_one[2] := 2; + // assignment should yield {?,?,2,*} + + if (not match(5,m_one[0])) { + setverdict(fail); + } + if (not match(5,m_one[1])) { + setverdict(fail); + } + if (not match(2,m_one[2])) { + setverdict(fail); + } + + setverdict(pass); + } + + control{ + execute(TC_Sem_150603_ReferencingRecordOfAndSetElements_002()); + } + + + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1506_referencing_elements_of_templates_or_template_fields/150603_referencing_record_of_and_set_elements/Sem_150603_ReferencingRecordOfAndSetElements_003.ttcn b/ATS/core_language/15_templates/1506_referencing_elements_of_templates_or_template_fields/150603_referencing_record_of_and_set_elements/Sem_150603_ReferencingRecordOfAndSetElements_003.ttcn new file mode 100644 index 00000000..4a9fd3a9 --- /dev/null +++ b/ATS/core_language/15_templates/1506_referencing_elements_of_templates_or_template_fields/150603_referencing_record_of_and_set_elements/Sem_150603_ReferencingRecordOfAndSetElements_003.ttcn @@ -0,0 +1,41 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:15.6.3, Ensure that assignment to a anyvalue in the context of record of is handled correctly in two subsequent assignments. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_150603_ReferencingRecordOfAndSetElements_003 { + + type component GeneralComp { } + + type record of integer RoI; + + testcase TC_Sem_150603_ReferencingRecordOfAndSetElements_003() runs on GeneralComp { + var template RoI m_one; + + m_one := ?; + m_one[2] := 2; + // assignment should yield {?,?,2,*} + m_one[4] := 3; + // assignment should yield {?,?,2,?,3,*} + + if (match(5,m_one[0]) and + match(5,m_one[1]) and + match(2,m_one[2]) and + match(5,m_one[3]) and + match(3,m_one[4]) + ) { + setverdict(pass); + } else { + setverdict(fail); + } + } + + control{ + execute(TC_Sem_150603_ReferencingRecordOfAndSetElements_003()); + } + + + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1506_referencing_elements_of_templates_or_template_fields/150603_referencing_record_of_and_set_elements/Sem_150603_ReferencingRecordOfAndSetElements_004.ttcn b/ATS/core_language/15_templates/1506_referencing_elements_of_templates_or_template_fields/150603_referencing_record_of_and_set_elements/Sem_150603_ReferencingRecordOfAndSetElements_004.ttcn new file mode 100644 index 00000000..dbe21ca6 --- /dev/null +++ b/ATS/core_language/15_templates/1506_referencing_elements_of_templates_or_template_fields/150603_referencing_record_of_and_set_elements/Sem_150603_ReferencingRecordOfAndSetElements_004.ttcn @@ -0,0 +1,34 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:15.6.3, Ensure that assignment to a anyvalue in the context of record of is handled correctly when the first element is changed. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_150603_ReferencingRecordOfAndSetElements_004 { + + type component GeneralComp { } + + type record of integer RoI; + + testcase TC_Sem_150603_ReferencingRecordOfAndSetElements_004() runs on GeneralComp { + var template RoI m_one; + + m_one := ?; + m_one[0] := 2; + // assignment should yield {2,*} + + if (not match(2,m_one[0])) { + setverdict(fail); + } + + setverdict(pass); + } + + control{ + execute(TC_Sem_150603_ReferencingRecordOfAndSetElements_004()); + } + + + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1506_referencing_elements_of_templates_or_template_fields/150603_referencing_record_of_and_set_elements/Sem_150603_ReferencingRecordOfAndSetElements_005.ttcn b/ATS/core_language/15_templates/1506_referencing_elements_of_templates_or_template_fields/150603_referencing_record_of_and_set_elements/Sem_150603_ReferencingRecordOfAndSetElements_005.ttcn new file mode 100644 index 00000000..3f7a5f58 --- /dev/null +++ b/ATS/core_language/15_templates/1506_referencing_elements_of_templates_or_template_fields/150603_referencing_record_of_and_set_elements/Sem_150603_ReferencingRecordOfAndSetElements_005.ttcn @@ -0,0 +1,35 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:15.6.3, Ensure that access outside permutation fields is allowed and works as expected. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_150603_ReferencingRecordOfAndSetElements_005 { + + type component GeneralComp { } + + type record of integer RoI; + + testcase TC_Sem_150603_ReferencingRecordOfAndSetElements_005() runs on GeneralComp { + var template RoI m_one; + var template integer m_two; + + m_one := {permutation(0,1,3,?),2,?}; + // assignment should yield ? + m_two := m_one[5]; + + if (match(5,m_two)) { + setverdict(pass); + } else { + setverdict(fail); + } + } + + control{ + execute(TC_Sem_150603_ReferencingRecordOfAndSetElements_005()); + } + + + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1506_referencing_elements_of_templates_or_template_fields/150603_referencing_record_of_and_set_elements/Sem_150603_ReferencingRecordOfAndSetElements_006.ttcn b/ATS/core_language/15_templates/1506_referencing_elements_of_templates_or_template_fields/150603_referencing_record_of_and_set_elements/Sem_150603_ReferencingRecordOfAndSetElements_006.ttcn new file mode 100644 index 00000000..db391785 --- /dev/null +++ b/ATS/core_language/15_templates/1506_referencing_elements_of_templates_or_template_fields/150603_referencing_record_of_and_set_elements/Sem_150603_ReferencingRecordOfAndSetElements_006.ttcn @@ -0,0 +1,38 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:15.6.3, Ensure that referencing an element within a record of, set of or array field to which omit is assigned works as expected + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +//Restriction a) +/*Omit: referencing an element within a record of, set of or array field to which omit is assigned shall follow the rules specified in clause 6.2.3.*/ + + +module Sem_150603_ReferencingRecordOfAndSetElements_006 { + + type component GeneralComp { } + + type record of integer RoI; + + testcase TC_Sem_150603_ReferencingRecordOfAndSetElements_006() runs on GeneralComp { + var template RoI m_one; + var template RoI m_two := {6}; + + m_one := {1,-,3}; + // assignment should yield omit + m_two := m_one; + + if (ispresent(m_two)) { + setverdict(pass,m_two); + } else { + setverdict(fail,m_two); + } + } + + control{ + execute(TC_Sem_150603_ReferencingRecordOfAndSetElements_006()); + } + + + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1506_referencing_elements_of_templates_or_template_fields/150603_referencing_record_of_and_set_elements/Sem_150603_ReferencingRecordOfAndSetElements_007.ttcn b/ATS/core_language/15_templates/1506_referencing_elements_of_templates_or_template_fields/150603_referencing_record_of_and_set_elements/Sem_150603_ReferencingRecordOfAndSetElements_007.ttcn new file mode 100644 index 00000000..0ee8fdc5 --- /dev/null +++ b/ATS/core_language/15_templates/1506_referencing_elements_of_templates_or_template_fields/150603_referencing_record_of_and_set_elements/Sem_150603_ReferencingRecordOfAndSetElements_007.ttcn @@ -0,0 +1,46 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:15.6.3, Ensure that referencing an element within a record of, set of or array field to which omit is assigned works as expected + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + + //Restriction g) +/* AnyElementsOrNone: when referencing an element of a record of or set of template or field that contains AnyElementsOrNone, the result of an operation + * is dependent on the position of AnyElementsOrNone, the referenced index and length attributes attached to AnyElementsOrNone. +*/ + + +module Sem_150603_ReferencingRecordOfAndSetElements_007 { + + type component GeneralComp { } + + type record of integer RoI; + + testcase TC_Sem_150603_ReferencingRecordOfAndSetElements_007() runs on GeneralComp { + var template RoI m_one; + + m_one := {1,?, * length(1..3), 5}; + m_one[1] := 2; + m_one[2] := 2; + + // assignment should yield {1,2,2,?,?,5} + + if (not match(1,m_one[0])) { + setverdict(fail,m_one); + } + if (not match(2,m_one[1])) { + setverdict(fail,m_one); + } + if (not match(2,m_one[2])) { + setverdict(fail,m_one); + } + + setverdict(pass); + } + + control{ + execute(TC_Sem_150603_ReferencingRecordOfAndSetElements_007()); + } + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1506_referencing_elements_of_templates_or_template_fields/150604_referencing_signature_parameters/NOTES b/ATS/core_language/15_templates/1506_referencing_elements_of_templates_or_template_fields/150604_referencing_signature_parameters/NOTES new file mode 100644 index 00000000..7053c8c8 --- /dev/null +++ b/ATS/core_language/15_templates/1506_referencing_elements_of_templates_or_template_fields/150604_referencing_signature_parameters/NOTES @@ -0,0 +1 @@ +The semantic tests in this section require the corresponding remote procedure implemented \ No newline at end of file diff --git a/ATS/core_language/15_templates/1506_referencing_elements_of_templates_or_template_fields/150604_referencing_signature_parameters/NegSem_150604_ReferencingSignatureParameters_001.ttcn b/ATS/core_language/15_templates/1506_referencing_elements_of_templates_or_template_fields/150604_referencing_signature_parameters/NegSem_150604_ReferencingSignatureParameters_001.ttcn new file mode 100644 index 00000000..8df826b1 --- /dev/null +++ b/ATS/core_language/15_templates/1506_referencing_elements_of_templates_or_template_fields/150604_referencing_signature_parameters/NegSem_150604_ReferencingSignatureParameters_001.ttcn @@ -0,0 +1,49 @@ +/***************************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:15.6.4, Test modification of signature parameters. + ** @verdict pass reject + *****************************************************************/ + +module NegSem_150604_ReferencingSignatureParameters_001 { + +/** + * @desc testing of inline return template for remote procedure call + * @param p_par1 only input parameter + * @param p_par2 must have value 4 at return + * @param p_par3 must have value 5 at return + * @return must return value 1 + */ + +signature p_NegSem_150604_ReferencingSignatureParameters_001(in integer p_par1, out integer p_par2, inout integer p_par3) return integer; + +template p_NegSem_150604_ReferencingSignatureParameters_001 s_baseTemplate := ( + {p_par1 := -, p_par2 := 4, p_par3 := ?} , {p_par1 := -, p_par2 := 4, p_par3 := 1} +); + +template p_NegSem_150604_ReferencingSignatureParameters_001 s_returnTemplate modifies s_baseTemplate := { + p_par3 := 5 +} //cannot modify list value template + +template p_NegSem_150604_ReferencingSignatureParameters_001 s_wrongTemplate modifies s_baseTemplate := { + p_par3 := 3 +} //cannot modify list value template + + + type port remotePort procedure { + out p_NegSem_150604_ReferencingSignatureParameters_001; + } + +type component GeneralComp { + port remotePort PCO; +} + +testcase TC_NegSem_150604_ReferencingSignatureParameters_001() runs on GeneralComp { + +} + +control{ + execute(TC_NegSem_150604_ReferencingSignatureParameters_001()); +} + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1506_referencing_elements_of_templates_or_template_fields/150604_referencing_signature_parameters/Sem_150604_ReferencingSignatureParameters_001.ttcn b/ATS/core_language/15_templates/1506_referencing_elements_of_templates_or_template_fields/150604_referencing_signature_parameters/Sem_150604_ReferencingSignatureParameters_001.ttcn new file mode 100644 index 00000000..53eb048c --- /dev/null +++ b/ATS/core_language/15_templates/1506_referencing_elements_of_templates_or_template_fields/150604_referencing_signature_parameters/Sem_150604_ReferencingSignatureParameters_001.ttcn @@ -0,0 +1,78 @@ +/***************************************************************** + ** @author STF 433 (updated by STF 521) + ** @version 0.0.2 + ** @purpose 1:15.6.4, Test modification of signature parameters. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_150604_ReferencingSignatureParameters_001 { + +/** + * @desc testing of inline return template for remote procedure call + * @param p_par1 only input parameter + * @param p_par2 must have value 4 at return + * @param p_par3 must have value 5 at return + * @return must return value 1 + */ + +signature p_Sem_150604_ReferencingSignatureParameters_001(in integer p_par1, out integer p_par2, inout integer p_par3) return integer; + +template p_Sem_150604_ReferencingSignatureParameters_001 s_baseTemplate := { + p_par1 := -, + p_par2 := 4, + p_par3 := ? +} + +template p_Sem_150604_ReferencingSignatureParameters_001 s_returnTemplate modifies s_baseTemplate := { + p_par3 := 5 +} + +template p_Sem_150604_ReferencingSignatureParameters_001 s_wrongTemplate modifies s_baseTemplate := { + p_par3 := 3 +} + +template p_Sem_150604_ReferencingSignatureParameters_001 s_callTemplate := { + p_par1 := 1, + p_par2 := -, + p_par3 := 3 +} + + type port remotePort procedure { + inout p_Sem_150604_ReferencingSignatureParameters_001; + } + +type component GeneralComp { + port remotePort PCO; +} + +function f_ptcBehaviour() runs on GeneralComp { + PCO.getcall(p_Sem_150604_ReferencingSignatureParameters_001:?); + PCO.reply(p_Sem_150604_ReferencingSignatureParameters_001:{-, 4, 5} value 1); +} + +testcase TC_Sem_150604_ReferencingSignatureParameters_001() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create("PTC"); + connect (self:PCO, v_ptc:PCO); + v_ptc.start(f_ptcBehaviour()); + PCO.call(p_Sem_150604_ReferencingSignatureParameters_001:s_callTemplate, 5.0) { + + [] PCO.getreply(p_Sem_150604_ReferencingSignatureParameters_001:s_wrongTemplate value 1) { + setverdict(fail); + } + [] PCO.getreply(p_Sem_150604_ReferencingSignatureParameters_001:s_returnTemplate value 2) { + setverdict(fail); + } + [] PCO.getreply(p_Sem_150604_ReferencingSignatureParameters_001:s_returnTemplate value 1) { //check that procedure is returning correct values + setverdict(pass); + } + [] PCO.catch (timeout) { + setverdict(fail); + } + } +} + +control{ + execute(TC_Sem_150604_ReferencingSignatureParameters_001()); +} + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1506_referencing_elements_of_templates_or_template_fields/150605_Referencing_union_alternatives/NegSem_150605_Referencing_union_alternatives_001.ttcn b/ATS/core_language/15_templates/1506_referencing_elements_of_templates_or_template_fields/150605_Referencing_union_alternatives/NegSem_150605_Referencing_union_alternatives_001.ttcn new file mode 100644 index 00000000..8b8ddcb5 --- /dev/null +++ b/ATS/core_language/15_templates/1506_referencing_elements_of_templates_or_template_fields/150605_Referencing_union_alternatives/NegSem_150605_Referencing_union_alternatives_001.ttcn @@ -0,0 +1,53 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:15.6.5, Ensure that template variables does not allow referencing alternatives inside an union with omit + ** @verdict pass reject + *****************************************************************/ + + //Restriction a) + /*referencing an alternative of a union template or template field to which Omit, AnyValueOrNone, + * a template list or a complemented list is assigned, at the right hand side of an assignment, shall cause an error.*/ + + + +module NegSem_150605_Referencing_union_alternatives_001 { + + type union My_Union { + integer u1, + float u2 + } + + type record ExampleType { // Exampletype record with union + integer a, + My_Union b optional + } + + + + type component GeneralComp { } + + + testcase TC_NegSem_150605_Referencing_union_alternatives_001() runs on GeneralComp { + + + + + var template ExampleType m_template; + var template integer m_template_2; + + //assign values to template: + + m_template.a:=10; + m_template.b:= omit; + + m_template_2 := m_template.b.u1; //error: omit + + setverdict(pass); + + } + + control{ + execute(TC_NegSem_150605_Referencing_union_alternatives_001()); + } +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1506_referencing_elements_of_templates_or_template_fields/150605_Referencing_union_alternatives/NegSem_150605_Referencing_union_alternatives_002.ttcn b/ATS/core_language/15_templates/1506_referencing_elements_of_templates_or_template_fields/150605_Referencing_union_alternatives/NegSem_150605_Referencing_union_alternatives_002.ttcn new file mode 100644 index 00000000..acf53bb9 --- /dev/null +++ b/ATS/core_language/15_templates/1506_referencing_elements_of_templates_or_template_fields/150605_Referencing_union_alternatives/NegSem_150605_Referencing_union_alternatives_002.ttcn @@ -0,0 +1,52 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:15.6.5, Ensure that template variables does not allow referencing alternatives inside an union with AnyValueOrNone + ** @verdict pass reject + *****************************************************************/ +//Restriction a) +/*referencing an alternative of a union template +or template field to which Omit, AnyValueOrNone, a template list or a complemented list is assigned, at the right hand side of an assignment, shall cause an error.*/ + + +module NegSem_150605_Referencing_union_alternatives_002 { + + type union My_Union { + integer u1, + float u2 + } + + type record ExampleType { // Exampletype record with union + integer a, + My_Union b optional + } + + + + type component GeneralComp { } + + + testcase TC_NegSem_150605_Referencing_union_alternatives_002() runs on GeneralComp { + + + + + var template ExampleType m_template; + var template integer m_template_2; + + //assign values to template: + + m_template.a:=10; + m_template.b:= *; + + m_template_2 := m_template.b.u1; //error: AnyValueOrNone + + setverdict(pass); + + + } + + control{ + execute(TC_NegSem_150605_Referencing_union_alternatives_002()); + } +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1506_referencing_elements_of_templates_or_template_fields/150605_Referencing_union_alternatives/NegSem_150605_Referencing_union_alternatives_003.ttcn b/ATS/core_language/15_templates/1506_referencing_elements_of_templates_or_template_fields/150605_Referencing_union_alternatives/NegSem_150605_Referencing_union_alternatives_003.ttcn new file mode 100644 index 00000000..039b928c --- /dev/null +++ b/ATS/core_language/15_templates/1506_referencing_elements_of_templates_or_template_fields/150605_Referencing_union_alternatives/NegSem_150605_Referencing_union_alternatives_003.ttcn @@ -0,0 +1,54 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:15.6.5, Ensure that template variables does not allow referencing alternatives inside an union with list + ** @verdict pass reject + *****************************************************************/ + + //Restriction a) +/*referencing an alternative of a union template +or template field to which Omit, AnyValueOrNone, a template list or a complemented list is assigned, at the right hand side of an assignment, shall cause an error.*/ + + +module NegSem_150605_Referencing_union_alternatives_003 { + + type union My_Union { + integer u1, + float u2 + } + + type record ExampleType { // Exampletype record with union + integer a, + My_Union b optional + } + + + + type component GeneralComp { } + + + testcase TC_NegSem_150605_Referencing_union_alternatives_003() runs on GeneralComp { + + + + + var template ExampleType m_template; + var template integer m_template_2; + + //assign values to template: + + m_template.a:=10; + m_template.b.u1:=(1,2); + m_template.b.u2:=2.0; + + m_template_2 := m_template.b.u1; //error: value list + + setverdict(pass); + + + } + + control{ + execute(TC_NegSem_150605_Referencing_union_alternatives_003()); + } +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1506_referencing_elements_of_templates_or_template_fields/150605_Referencing_union_alternatives/NegSem_150605_Referencing_union_alternatives_004.ttcn b/ATS/core_language/15_templates/1506_referencing_elements_of_templates_or_template_fields/150605_Referencing_union_alternatives/NegSem_150605_Referencing_union_alternatives_004.ttcn new file mode 100644 index 00000000..59114102 --- /dev/null +++ b/ATS/core_language/15_templates/1506_referencing_elements_of_templates_or_template_fields/150605_Referencing_union_alternatives/NegSem_150605_Referencing_union_alternatives_004.ttcn @@ -0,0 +1,54 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:15.6.5, Ensure that template variables does not allow referencing alternatives inside an union with complemented list + ** @verdict pass reject + *****************************************************************/ + + //Restriction a) +/*referencing an alternative of a union template +or template field to which Omit, AnyValueOrNone, a template list or a complemented list is assigned, at the right hand side of an assignment, shall cause an error.*/ + + +module NegSem_150605_Referencing_union_alternatives_004 { + + type union My_Union { + integer u1, + float u2 + } + + type record ExampleType { // Exampletype record with union + integer a, + My_Union b optional + } + + + + type component GeneralComp { } + + + testcase TC_NegSem_150605_Referencing_union_alternatives_004() runs on GeneralComp { + + + + + var template ExampleType m_template; + var template integer m_template_2; + + //assign values to template: + + m_template.a:=10; + m_template.b.u1:=complement(1,2); + m_template.b.u2:=2.0; + + m_template_2 := m_template.b.u1; //error: complement value list + + setverdict(pass); + + + } + + control{ + execute(TC_NegSem_150605_Referencing_union_alternatives_004()); + } +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1506_referencing_elements_of_templates_or_template_fields/150605_Referencing_union_alternatives/NegSem_150605_Referencing_union_alternatives_005.ttcn b/ATS/core_language/15_templates/1506_referencing_elements_of_templates_or_template_fields/150605_Referencing_union_alternatives/NegSem_150605_Referencing_union_alternatives_005.ttcn new file mode 100644 index 00000000..097f6890 --- /dev/null +++ b/ATS/core_language/15_templates/1506_referencing_elements_of_templates_or_template_fields/150605_Referencing_union_alternatives/NegSem_150605_Referencing_union_alternatives_005.ttcn @@ -0,0 +1,50 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:15.6.5, Ensure that referencing an alternative of a union template field to which the ifpresent attribute is attached, shall cause an error + ** @verdict pass reject + *****************************************************************/ + +//Restriction c) +/*Ifpresent attribute: referencing an alternative of a union template field to which the ifpresent attribute is +attached, shall cause an error (irrespective of the value or the matching mechanism to which ifpresent is +appended).*/ + + +module NegSem_150605_Referencing_union_alternatives_005 { + + + type union My_Union { + integer u1, + float u2 + } + + type record My_Rec { + My_Union r1 optional + } + + type component GeneralComp { } + + + + testcase TC_NegSem_150605_Referencing_union_alternatives_005() runs on GeneralComp { + + var template integer m_template; + + + + var template My_Rec My_Template; + My_Template.r1 := {u1:=1} ifpresent; + + + m_template := My_Template.r1.u1; //error: ifpresent attribute is attached + + setverdict(pass,m_template); + + + } + + control{ + execute(TC_NegSem_150605_Referencing_union_alternatives_005()); + } +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1506_referencing_elements_of_templates_or_template_fields/150605_Referencing_union_alternatives/NegSem_150605_Referencing_union_alternatives_006.ttcn b/ATS/core_language/15_templates/1506_referencing_elements_of_templates_or_template_fields/150605_Referencing_union_alternatives/NegSem_150605_Referencing_union_alternatives_006.ttcn new file mode 100644 index 00000000..2234f861 --- /dev/null +++ b/ATS/core_language/15_templates/1506_referencing_elements_of_templates_or_template_fields/150605_Referencing_union_alternatives/NegSem_150605_Referencing_union_alternatives_006.ttcn @@ -0,0 +1,52 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:15.6.5, Ensure that referencing an alternative of an address type, which actual value is null shall cause + ** @verdict pass reject + *****************************************************************/ + +//Restriction d) +/*Special value null: referencing an alternative of an address type, which actual value is null shall cause +an error.*/ + + +module NegSem_150605_Referencing_union_alternatives_006 { + + type integer address; + + + type union My_Union { + integer u1, + address u2 + } + + + + + type component GeneralComp { } + + + + testcase TC_NegSem_150605_Referencing_union_alternatives_006() runs on GeneralComp { + + var template integer m_template; + + + + var template My_Union My_Template; + My_Template.u1 := 1; + My_Template.u2 := null; + + + + m_template := My_Template.u2; //error: null + + setverdict(pass); + + + } + + control{ + execute(TC_NegSem_150605_Referencing_union_alternatives_006()); + } +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1506_referencing_elements_of_templates_or_template_fields/150605_Referencing_union_alternatives/Sem_150605_Referencing_union_alternatives_001.ttcn b/ATS/core_language/15_templates/1506_referencing_elements_of_templates_or_template_fields/150605_Referencing_union_alternatives/Sem_150605_Referencing_union_alternatives_001.ttcn new file mode 100644 index 00000000..fba63be4 --- /dev/null +++ b/ATS/core_language/15_templates/1506_referencing_elements_of_templates_or_template_fields/150605_Referencing_union_alternatives/Sem_150605_Referencing_union_alternatives_001.ttcn @@ -0,0 +1,59 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:15.6.5, Ensure that template variables allow referencing alternatives inside a union template definition + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_150605_Referencing_union_alternatives_001 { + + type union My_Union { + integer u1, + float u2 + } + + type record ExampleType { // Exampletype record with union + integer a, + My_Union b + } + + type port loopbackPort message{inout ExampleType}; + + + type component GeneralComp { + port loopbackPort messagePort + } + + + testcase TC_Sem_150605_Referencing_union_alternatives_001() runs on GeneralComp { + + + + + var template ExampleType m_template; + + //assign values to template: + + m_template.a:=10; + m_template.b.u1:=1; + m_template.b.u2:=2.0; + + + messagePort.send(m_template); //send message + + alt { + [] messagePort.receive(m_template) { + setverdict(pass); + } + [] messagePort.receive { + setverdict(fail); + } + } + + + } + + control{ + execute(TC_Sem_150605_Referencing_union_alternatives_001()); + } +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1506_referencing_elements_of_templates_or_template_fields/150605_Referencing_union_alternatives/Sem_150605_Referencing_union_alternatives_002.ttcn b/ATS/core_language/15_templates/1506_referencing_elements_of_templates_or_template_fields/150605_Referencing_union_alternatives/Sem_150605_Referencing_union_alternatives_002.ttcn new file mode 100644 index 00000000..acbb5817 --- /dev/null +++ b/ATS/core_language/15_templates/1506_referencing_elements_of_templates_or_template_fields/150605_Referencing_union_alternatives/Sem_150605_Referencing_union_alternatives_002.ttcn @@ -0,0 +1,60 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:15.6.5, Ensure that template variables allow referencing with an Anyvalue union template + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +//Restriction b) +/*when referencing an alternative of a union template or template field to which AnyValue is +assigned, at the right hand side of an assignment, AnyValue shall be returned.*/ + +module Sem_150605_Referencing_union_alternatives_002{ + + type union My_Union { + integer u1, + float u2 + } + + type record ExampleType { // Exampletype record with union + integer a, + My_Union b optional + } + + type port loopbackPort message{inout ExampleType}; + + + type component GeneralComp { + port loopbackPort messagePort + } + + + testcase TC_Sem_150605_Referencing_union_alternatives_002() runs on GeneralComp { + + + + + + var template ExampleType m_template; + var template integer m_template_2; + + //assign values to template: + + m_template.a:=10; + m_template.b := ?; + + m_template_2 := m_template.b.u1; //m_template_2 :=? + + if (ispresent(m_template_2)) + { + setverdict(pass,m_template_2); + } else { + setverdict(fail,m_template_2); + } + + } + + control{ + execute(TC_Sem_150605_Referencing_union_alternatives_002()); + } +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1506_referencing_elements_of_templates_or_template_fields/150605_Referencing_union_alternatives/Sem_150605_Referencing_union_alternatives_003.ttcn b/ATS/core_language/15_templates/1506_referencing_elements_of_templates_or_template_fields/150605_Referencing_union_alternatives/Sem_150605_Referencing_union_alternatives_003.ttcn new file mode 100644 index 00000000..32342076 --- /dev/null +++ b/ATS/core_language/15_templates/1506_referencing_elements_of_templates_or_template_fields/150605_Referencing_union_alternatives/Sem_150605_Referencing_union_alternatives_003.ttcn @@ -0,0 +1,59 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:15.6.5, Ensure that template variables allow referencing with an Anyvalue union template + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +//Restriction b) +/*when referencing an alternative of a union template or template field to which AnyValue is +assigned, at the right hand side of an assignment, AnyValue shall be returned.*/ + +module Sem_150605_Referencing_union_alternatives_003 { + + type union My_Union { + integer u1, + float u2 + } + + type record ExampleType { // Exampletype record with union + integer a, + My_Union b + } + + type port loopbackPort message{inout ExampleType}; + + + type component GeneralComp { + port loopbackPort messagePort + } + + + testcase TC_Sem_150605_Referencing_union_alternatives_003() runs on GeneralComp { + + var template ExampleType m_template; + var template ExampleType m_template_2; + + //assign values to template: + + m_template.a:=10; + m_template.b := ?; + + m_template_2 := m_template; + + m_template_2.b.u1:=1; + + + if (match(valueof(m_template_2),{a := 10,b :={u1 := 1}})) + { + setverdict(pass,m_template_2); + } else { + setverdict(fail,m_template_2); + } + + } + + control{ + execute(TC_Sem_150605_Referencing_union_alternatives_003()); + } +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1506_referencing_elements_of_templates_or_template_fields/150605_Referencing_union_alternatives/Sem_150605_Referencing_union_alternatives_004.ttcn b/ATS/core_language/15_templates/1506_referencing_elements_of_templates_or_template_fields/150605_Referencing_union_alternatives/Sem_150605_Referencing_union_alternatives_004.ttcn new file mode 100644 index 00000000..8cc8c568 --- /dev/null +++ b/ATS/core_language/15_templates/1506_referencing_elements_of_templates_or_template_fields/150605_Referencing_union_alternatives/Sem_150605_Referencing_union_alternatives_004.ttcn @@ -0,0 +1,64 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:15.6.5, Ensure that template variables allow referencing with an Anyvalue union template + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +//Restriction a) +/*When referencing an alternative of a union template or template field to which AnyValueOrNone or omit is +assigned, at the left hand side of an assignment, the template field is implicitly set to be present and the +referenced alternative becomes the chosen one.*/ + +module Sem_150605_Referencing_union_alternatives_004 { + + type union My_Union { + integer u1, + float u2 + } + + type record ExampleType { // Exampletype record with union + integer a, + My_Union b optional + } + + type port loopbackPort message{inout ExampleType}; + + + type component GeneralComp { + port loopbackPort messagePort + } + + + testcase TC_Sem_150605_Referencing_union_alternatives_004() runs on GeneralComp { + + + + + + var template ExampleType m_template; + var template ExampleType m_template_2; + + //assign values to template: + + m_template.a:=10; + m_template.b := omit; + + m_template_2 := m_template; + + m_template_2.b.u1:=1; + + + if (match(valueof(m_template_2),{a := 10,b :={u1 := 1}})) + { + setverdict(pass,m_template_2); + } else { + setverdict(fail,m_template_2); + } + + } + + control{ + execute(TC_Sem_150605_Referencing_union_alternatives_004()); + } +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1507_template_matching_mechanisms/README b/ATS/core_language/15_templates/1507_template_matching_mechanisms/README new file mode 100644 index 00000000..f165a664 --- /dev/null +++ b/ATS/core_language/15_templates/1507_template_matching_mechanisms/README @@ -0,0 +1 @@ +template matching tests can be found in B_matching_incoming_values. \ No newline at end of file diff --git a/ATS/core_language/15_templates/1508_template_restrictions/NOTES b/ATS/core_language/15_templates/1508_template_restrictions/NOTES new file mode 100644 index 00000000..f53723be --- /dev/null +++ b/ATS/core_language/15_templates/1508_template_restrictions/NOTES @@ -0,0 +1 @@ +- TODO: grey fields in table 13 could be tested further with negative semantics tests... \ No newline at end of file diff --git a/ATS/core_language/15_templates/1508_template_restrictions/NegSem_1508_TemplateRestrictions_001.ttcn b/ATS/core_language/15_templates/1508_template_restrictions/NegSem_1508_TemplateRestrictions_001.ttcn new file mode 100644 index 00000000..fa4cce8c --- /dev/null +++ b/ATS/core_language/15_templates/1508_template_restrictions/NegSem_1508_TemplateRestrictions_001.ttcn @@ -0,0 +1,17 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:15.8, Ensure that template(omit) is rejected with anyvalue(?). + ** @verdict pass reject + *****************************************************************/ + +module NegSem_1508_TemplateRestrictions_001 { + +type record ExampleType { + integer a, + boolean b optional +} + +template(omit) ExampleType exampleOmitAny := ?; + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1508_template_restrictions/NegSem_1508_TemplateRestrictions_002.ttcn b/ATS/core_language/15_templates/1508_template_restrictions/NegSem_1508_TemplateRestrictions_002.ttcn new file mode 100644 index 00000000..88eb6783 --- /dev/null +++ b/ATS/core_language/15_templates/1508_template_restrictions/NegSem_1508_TemplateRestrictions_002.ttcn @@ -0,0 +1,17 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:15.8, Ensure that template(omit) is rejected with setof template. + ** @verdict pass reject + *****************************************************************/ + +module NegSem_1508_TemplateRestrictions_002 { + +type record ExampleType { + integer a, + boolean b optional +} + +template(omit) ExampleType exampleOmitAny := ({1,true},{2,false}); + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1508_template_restrictions/NegSem_1508_TemplateRestrictions_003.ttcn b/ATS/core_language/15_templates/1508_template_restrictions/NegSem_1508_TemplateRestrictions_003.ttcn new file mode 100644 index 00000000..33d94c05 --- /dev/null +++ b/ATS/core_language/15_templates/1508_template_restrictions/NegSem_1508_TemplateRestrictions_003.ttcn @@ -0,0 +1,17 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:15.8, Ensure that template(omit) is rejected with anyvalueornone(*). + ** @verdict pass reject + *****************************************************************/ + +module NegSem_1508_TemplateRestrictions_003 { + +type record ExampleType { + integer a, + boolean b optional +} + +template(omit) ExampleType exampleOmitAny := *; + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1508_template_restrictions/NegSem_1508_TemplateRestrictions_004.ttcn b/ATS/core_language/15_templates/1508_template_restrictions/NegSem_1508_TemplateRestrictions_004.ttcn new file mode 100644 index 00000000..a35e5e8e --- /dev/null +++ b/ATS/core_language/15_templates/1508_template_restrictions/NegSem_1508_TemplateRestrictions_004.ttcn @@ -0,0 +1,17 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:15.8, Ensure that template(omit) is rejected with value ranges. + ** @verdict pass reject + *****************************************************************/ + +module NegSem_1508_TemplateRestrictions_004 { + +type record ExampleType { + integer a, + boolean b optional +} + +template(omit) ExampleType exampleOmitAny := {(1..6), true}; + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1508_template_restrictions/NegSem_1508_TemplateRestrictions_005.ttcn b/ATS/core_language/15_templates/1508_template_restrictions/NegSem_1508_TemplateRestrictions_005.ttcn new file mode 100644 index 00000000..5c86f279 --- /dev/null +++ b/ATS/core_language/15_templates/1508_template_restrictions/NegSem_1508_TemplateRestrictions_005.ttcn @@ -0,0 +1,17 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:15.8, Ensure that template(omit) is rejected with supersets. + ** @verdict pass reject + *****************************************************************/ + +module NegSem_1508_TemplateRestrictions_005 { + +type record ExampleType { + set of integer a, + boolean b optional +} + +template(omit) ExampleType exampleOmitAny := {superset(1,2,3), true}; + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1508_template_restrictions/NegSem_1508_TemplateRestrictions_006.ttcn b/ATS/core_language/15_templates/1508_template_restrictions/NegSem_1508_TemplateRestrictions_006.ttcn new file mode 100644 index 00000000..59f0eafd --- /dev/null +++ b/ATS/core_language/15_templates/1508_template_restrictions/NegSem_1508_TemplateRestrictions_006.ttcn @@ -0,0 +1,18 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:15.8, Ensure that template(omit) is rejected with subsets. + ** @verdict pass reject + *****************************************************************/ + +module NegSem_1508_TemplateRestrictions_006 { + +type record ExampleType { + set of integer a, + boolean b optional +} + +template(omit) ExampleType exampleOmitAny := {subset(1,2,3), true}; + + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1508_template_restrictions/NegSem_1508_TemplateRestrictions_007.ttcn b/ATS/core_language/15_templates/1508_template_restrictions/NegSem_1508_TemplateRestrictions_007.ttcn new file mode 100644 index 00000000..715884dd --- /dev/null +++ b/ATS/core_language/15_templates/1508_template_restrictions/NegSem_1508_TemplateRestrictions_007.ttcn @@ -0,0 +1,18 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:15.8, Ensure that template(omit) is rejected with patterns. + ** @verdict pass reject + *****************************************************************/ + +module NegSem_1508_TemplateRestrictions_007 { + +type record ExampleType { + integer a, + charstring b +} + +template(omit) ExampleType exampleOmitAny := {1, pattern "ab*c"}; + + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1508_template_restrictions/NegSem_1508_TemplateRestrictions_008.ttcn b/ATS/core_language/15_templates/1508_template_restrictions/NegSem_1508_TemplateRestrictions_008.ttcn new file mode 100644 index 00000000..3f6d35f4 --- /dev/null +++ b/ATS/core_language/15_templates/1508_template_restrictions/NegSem_1508_TemplateRestrictions_008.ttcn @@ -0,0 +1,18 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:15.8, Ensure that template(omit) is rejected with anyelement inside values. + ** @verdict pass reject + *****************************************************************/ + +module NegSem_1508_TemplateRestrictions_008 { + +type record ExampleType { + integer a, + charstring b +} + +template(omit) ExampleType exampleOmitAny := {2, ?}; + + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1508_template_restrictions/NegSem_1508_TemplateRestrictions_009.ttcn b/ATS/core_language/15_templates/1508_template_restrictions/NegSem_1508_TemplateRestrictions_009.ttcn new file mode 100644 index 00000000..759b710a --- /dev/null +++ b/ATS/core_language/15_templates/1508_template_restrictions/NegSem_1508_TemplateRestrictions_009.ttcn @@ -0,0 +1,18 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:15.8, Ensure that template(omit) is rejected with anyelemenornone inside values. + ** @verdict pass reject + *****************************************************************/ + +module NegSem_1508_TemplateRestrictions_009 { + +type record ExampleType { + integer a, + charstring b +} + +template(omit) ExampleType exampleOmitAny := {2, *}; + + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1508_template_restrictions/NegSem_1508_TemplateRestrictions_010.ttcn b/ATS/core_language/15_templates/1508_template_restrictions/NegSem_1508_TemplateRestrictions_010.ttcn new file mode 100644 index 00000000..0990db7a --- /dev/null +++ b/ATS/core_language/15_templates/1508_template_restrictions/NegSem_1508_TemplateRestrictions_010.ttcn @@ -0,0 +1,18 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:15.8, Ensure that template(omit) is rejected with permutation inside values. + ** @verdict pass reject + *****************************************************************/ + +module NegSem_1508_TemplateRestrictions_010 { + +type record ExampleType { + set of integer a, + charstring b +} + +template(omit) ExampleType exampleOmitAny := {permutation(2,4,6),"abcde"}; + + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1508_template_restrictions/NegSem_1508_TemplateRestrictions_011.ttcn b/ATS/core_language/15_templates/1508_template_restrictions/NegSem_1508_TemplateRestrictions_011.ttcn new file mode 100644 index 00000000..73c9b143 --- /dev/null +++ b/ATS/core_language/15_templates/1508_template_restrictions/NegSem_1508_TemplateRestrictions_011.ttcn @@ -0,0 +1,17 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:15.8, Ensure that template(omit) is rejected with length restrictions. + ** @verdict pass reject + *****************************************************************/ + +module NegSem_1508_TemplateRestrictions_011 { + +type record ExampleType { + charstring b +} + +template(omit) ExampleType exampleOmitAny := {"abcde" length(1..3)}; + + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1508_template_restrictions/NegSem_1508_TemplateRestrictions_012.ttcn b/ATS/core_language/15_templates/1508_template_restrictions/NegSem_1508_TemplateRestrictions_012.ttcn new file mode 100644 index 00000000..a26abe9e --- /dev/null +++ b/ATS/core_language/15_templates/1508_template_restrictions/NegSem_1508_TemplateRestrictions_012.ttcn @@ -0,0 +1,17 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:15.8, Ensure that template(omit) is rejected with length restrictions. + ** @verdict pass reject + *****************************************************************/ + +module NegSem_1508_TemplateRestrictions_012 { + +type record ExampleType { + charstring b +} + +template(omit) ExampleType exampleOmitAny := {"abcde" ifpresent}; + + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1508_template_restrictions/NegSem_1508_TemplateRestrictions_013.ttcn b/ATS/core_language/15_templates/1508_template_restrictions/NegSem_1508_TemplateRestrictions_013.ttcn new file mode 100644 index 00000000..d42fc024 --- /dev/null +++ b/ATS/core_language/15_templates/1508_template_restrictions/NegSem_1508_TemplateRestrictions_013.ttcn @@ -0,0 +1,16 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:15.8, Ensure that template(omit) is rejected with length restrictions. + ** @verdict pass reject + *****************************************************************/ + +module NegSem_1508_TemplateRestrictions_013 { + +type record ExampleType { + integer f1 +} + +template(omit) ExampleType exampleOmitAny := {complement(2,3)}; + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1508_template_restrictions/NegSem_1508_TemplateRestrictions_014.ttcn b/ATS/core_language/15_templates/1508_template_restrictions/NegSem_1508_TemplateRestrictions_014.ttcn new file mode 100644 index 00000000..62081718 --- /dev/null +++ b/ATS/core_language/15_templates/1508_template_restrictions/NegSem_1508_TemplateRestrictions_014.ttcn @@ -0,0 +1,17 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:15.8, Ensure that template(value) is rejected with anyvalue(?). + ** @verdict pass reject + *****************************************************************/ + +module NegSem_1508_TemplateRestrictions_014 { + +type record ExampleType { + integer a, + boolean b optional +} + +template(value) ExampleType exampleOmitAny := ?; + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1508_template_restrictions/NegSem_1508_TemplateRestrictions_015.ttcn b/ATS/core_language/15_templates/1508_template_restrictions/NegSem_1508_TemplateRestrictions_015.ttcn new file mode 100644 index 00000000..61a315c4 --- /dev/null +++ b/ATS/core_language/15_templates/1508_template_restrictions/NegSem_1508_TemplateRestrictions_015.ttcn @@ -0,0 +1,17 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:15.8, Ensure that template(value) is rejected with valuelist. + ** @verdict pass reject + *****************************************************************/ + +module NegSem_1508_TemplateRestrictions_015 { + +type record ExampleType { + integer a, + boolean b optional +} + +template(value) ExampleType exampleOmitAny := ({1,true},{2,false}); + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1508_template_restrictions/NegSem_1508_TemplateRestrictions_016.ttcn b/ATS/core_language/15_templates/1508_template_restrictions/NegSem_1508_TemplateRestrictions_016.ttcn new file mode 100644 index 00000000..9571ac0a --- /dev/null +++ b/ATS/core_language/15_templates/1508_template_restrictions/NegSem_1508_TemplateRestrictions_016.ttcn @@ -0,0 +1,17 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:15.8, Ensure that template(value) is rejected with anyvalueornone(*). + ** @verdict pass reject + *****************************************************************/ + +module NegSem_1508_TemplateRestrictions_016 { + +type record ExampleType { + integer a, + boolean b optional +} + +template(value) ExampleType exampleOmitAny := *; + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1508_template_restrictions/NegSem_1508_TemplateRestrictions_017.ttcn b/ATS/core_language/15_templates/1508_template_restrictions/NegSem_1508_TemplateRestrictions_017.ttcn new file mode 100644 index 00000000..8eee573a --- /dev/null +++ b/ATS/core_language/15_templates/1508_template_restrictions/NegSem_1508_TemplateRestrictions_017.ttcn @@ -0,0 +1,17 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:15.8, Ensure that template(value) is rejected with value ranges. + ** @verdict pass reject + *****************************************************************/ + +module NegSem_1508_TemplateRestrictions_017 { + +type record ExampleType { + integer a, + boolean b optional +} + +template(value) ExampleType exampleOmitAny := {(1..6), true}; + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1508_template_restrictions/NegSem_1508_TemplateRestrictions_018.ttcn b/ATS/core_language/15_templates/1508_template_restrictions/NegSem_1508_TemplateRestrictions_018.ttcn new file mode 100644 index 00000000..8cf84ac6 --- /dev/null +++ b/ATS/core_language/15_templates/1508_template_restrictions/NegSem_1508_TemplateRestrictions_018.ttcn @@ -0,0 +1,17 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:15.8, Ensure that template(value) is rejected with supersets. + ** @verdict pass reject + *****************************************************************/ + +module NegSem_1508_TemplateRestrictions_018 { + +type record ExampleType { + set of integer a, + boolean b optional +} + +template(value) ExampleType exampleOmitAny := {superset(1,2,3), true}; + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1508_template_restrictions/NegSem_1508_TemplateRestrictions_019.ttcn b/ATS/core_language/15_templates/1508_template_restrictions/NegSem_1508_TemplateRestrictions_019.ttcn new file mode 100644 index 00000000..bb3f79be --- /dev/null +++ b/ATS/core_language/15_templates/1508_template_restrictions/NegSem_1508_TemplateRestrictions_019.ttcn @@ -0,0 +1,17 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:15.8, Ensure that template(value) is rejected with supersets. + ** @verdict pass reject + *****************************************************************/ + +module NegSem_1508_TemplateRestrictions_019 { + +type record ExampleType { + set of integer a, + boolean b optional +} + +template(value) ExampleType exampleOmitAny := {superset(1,2,3), true}; + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1508_template_restrictions/NegSem_1508_TemplateRestrictions_020.ttcn b/ATS/core_language/15_templates/1508_template_restrictions/NegSem_1508_TemplateRestrictions_020.ttcn new file mode 100644 index 00000000..b7cc7f7a --- /dev/null +++ b/ATS/core_language/15_templates/1508_template_restrictions/NegSem_1508_TemplateRestrictions_020.ttcn @@ -0,0 +1,18 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:15.8, Ensure that template(value) is rejected with patterns. + ** @verdict pass reject + *****************************************************************/ + +module NegSem_1508_TemplateRestrictions_020 { + +type record ExampleType { + integer a, + charstring b +} + +template(value) ExampleType exampleOmitAny := {1, pattern "ab*c"}; + + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1508_template_restrictions/NegSem_1508_TemplateRestrictions_021.ttcn b/ATS/core_language/15_templates/1508_template_restrictions/NegSem_1508_TemplateRestrictions_021.ttcn new file mode 100644 index 00000000..4c6ec2d9 --- /dev/null +++ b/ATS/core_language/15_templates/1508_template_restrictions/NegSem_1508_TemplateRestrictions_021.ttcn @@ -0,0 +1,18 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:15.8, Ensure that template(value) is rejected with anyelement inside values. + ** @verdict pass reject + *****************************************************************/ + +module NegSem_1508_TemplateRestrictions_021 { + +type record ExampleType { + integer a, + charstring b +} + +template(value) ExampleType exampleOmitAny := {2, ?}; + + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1508_template_restrictions/NegSem_1508_TemplateRestrictions_022.ttcn b/ATS/core_language/15_templates/1508_template_restrictions/NegSem_1508_TemplateRestrictions_022.ttcn new file mode 100644 index 00000000..f474cbe3 --- /dev/null +++ b/ATS/core_language/15_templates/1508_template_restrictions/NegSem_1508_TemplateRestrictions_022.ttcn @@ -0,0 +1,18 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:15.8, Ensure that template(value) is rejected with permutation inside values. + ** @verdict pass reject + *****************************************************************/ + +module NegSem_1508_TemplateRestrictions_022 { + +type record ExampleType { + set of integer a, + charstring b +} + +template(value) ExampleType exampleOmitAny := {permutation(2,4,6),"abcde"}; + + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1508_template_restrictions/NegSem_1508_TemplateRestrictions_023.ttcn b/ATS/core_language/15_templates/1508_template_restrictions/NegSem_1508_TemplateRestrictions_023.ttcn new file mode 100644 index 00000000..94be4c7c --- /dev/null +++ b/ATS/core_language/15_templates/1508_template_restrictions/NegSem_1508_TemplateRestrictions_023.ttcn @@ -0,0 +1,17 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:15.8, Ensure that template(value) is rejected with length restrictions. + ** @verdict pass reject + *****************************************************************/ + +module NegSem_1508_TemplateRestrictions_023 { + +type record ExampleType { + charstring b +} + +template(value) ExampleType exampleOmitAny := {"abcde" length(1..3)}; + + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1508_template_restrictions/NegSem_1508_TemplateRestrictions_024.ttcn b/ATS/core_language/15_templates/1508_template_restrictions/NegSem_1508_TemplateRestrictions_024.ttcn new file mode 100644 index 00000000..db38b86d --- /dev/null +++ b/ATS/core_language/15_templates/1508_template_restrictions/NegSem_1508_TemplateRestrictions_024.ttcn @@ -0,0 +1,17 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:15.8, Ensure that template(value) is rejected with length restrictions. + ** @verdict pass reject + *****************************************************************/ + +module NegSem_1508_TemplateRestrictions_024 { + +type record ExampleType { + charstring b +} + +template(value) ExampleType exampleOmitAny := {"abcde" ifpresent}; + + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1508_template_restrictions/NegSem_1508_TemplateRestrictions_025.ttcn b/ATS/core_language/15_templates/1508_template_restrictions/NegSem_1508_TemplateRestrictions_025.ttcn new file mode 100644 index 00000000..ac60f935 --- /dev/null +++ b/ATS/core_language/15_templates/1508_template_restrictions/NegSem_1508_TemplateRestrictions_025.ttcn @@ -0,0 +1,17 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:15.8, Ensure that template(present) refuses omitvalue as a whole. + ** @verdict pass reject + *****************************************************************/ + +module NegSem_1508_TemplateRestrictions_025 { + +type record ExampleType { + integer a, + boolean b optional +} + +template(present) ExampleType exampleOmit := omit; + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1508_template_restrictions/NegSem_1508_TemplateRestrictions_026.ttcn b/ATS/core_language/15_templates/1508_template_restrictions/NegSem_1508_TemplateRestrictions_026.ttcn new file mode 100644 index 00000000..c94592fc --- /dev/null +++ b/ATS/core_language/15_templates/1508_template_restrictions/NegSem_1508_TemplateRestrictions_026.ttcn @@ -0,0 +1,17 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:15.8, Ensure that template(value) refuses omit as a whole. + ** @verdict pass reject + *****************************************************************/ + +module NegSem_1508_TemplateRestrictions_026 { + +type record ExampleType { + integer a, + boolean b optional +} + +template(value) ExampleType exampleOmit := omit; + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1508_template_restrictions/NegSem_1508_TemplateRestrictions_029.ttcn b/ATS/core_language/15_templates/1508_template_restrictions/NegSem_1508_TemplateRestrictions_029.ttcn new file mode 100644 index 00000000..aabaa076 --- /dev/null +++ b/ATS/core_language/15_templates/1508_template_restrictions/NegSem_1508_TemplateRestrictions_029.ttcn @@ -0,0 +1,41 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:15.8, Ensure that the template(present) with anyvalue(?) can't be assigned to an omit restricted variable template + ** @verdict pass reject + *****************************************************************/ + + +module NegSem_1508_TemplateRestrictions_029 { + + type record ExampleType { // Exampletype record contains a charstring and a boolean + charstring a, + boolean b + } + + type component GeneralComp { + var template (omit) ExampleType v_omit; //omit restricted template variable + } + + + template (present) ExampleType MyintTemplate :={ //actual template with present restriction contains anytype (?) + a := ?, + b := false + } + + + testcase TC_NegSem_1508_TemplateRestrictions_029() runs on GeneralComp { + + v_omit := MyintTemplate; //error: v_omit is omit restricted, hence can not contain anytype(?) + + if (valueof(v_omit.b) == false) { + setverdict(pass); + } else { + setverdict(fail); + } + } + + control{ + execute(TC_NegSem_1508_TemplateRestrictions_029()); + } +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1508_template_restrictions/NegSem_1508_TemplateRestrictions_030.ttcn b/ATS/core_language/15_templates/1508_template_restrictions/NegSem_1508_TemplateRestrictions_030.ttcn new file mode 100644 index 00000000..8180e6b1 --- /dev/null +++ b/ATS/core_language/15_templates/1508_template_restrictions/NegSem_1508_TemplateRestrictions_030.ttcn @@ -0,0 +1,41 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:15.8, Ensure that unrestricted template with anyvalue(?) can't be assigned to an omit restricted variable template + ** @verdict pass reject + *****************************************************************/ + + +module NegSem_1508_TemplateRestrictions_030 { + + type record ExampleType { // Exampletype record contains a charstring and a boolean + charstring a optional, + boolean b + } + + type component GeneralComp { + var template (omit) ExampleType v_omit; //omit restricted template variable + } + + + template ExampleType MyintTemplate :={ //actual template without restriction contains anyvalue (?) + a := ?, + b := false + } + + + testcase TC_NegSem_1508_TemplateRestrictions_030() runs on GeneralComp { + + v_omit := MyintTemplate; //error: v_omit is omit restricted, hence can not contain anyvalue(?) + + if (valueof(v_omit.b) == false) { + setverdict(pass); + } else { + setverdict(fail); + } + } + + control{ + execute(TC_NegSem_1508_TemplateRestrictions_030()); + } +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1508_template_restrictions/NegSem_1508_TemplateRestrictions_031.ttcn b/ATS/core_language/15_templates/1508_template_restrictions/NegSem_1508_TemplateRestrictions_031.ttcn new file mode 100644 index 00000000..29594a67 --- /dev/null +++ b/ATS/core_language/15_templates/1508_template_restrictions/NegSem_1508_TemplateRestrictions_031.ttcn @@ -0,0 +1,39 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:15.8, Ensure that template(omit) can't be assigned to a variable template(value) if omit + ** @verdict pass reject + *****************************************************************/ + + +module NegSem_1508_TemplateRestrictions_031 { + + type record ExampleType { // Exampletype record contains a charstring and a boolean + charstring a optional, + boolean b + } + + type component GeneralComp { + var template (value) ExampleType v_value; //value restricted template variable + } + + + template (omit) ExampleType MyintTemplate :=omit; //actual template (with omit restriction) is omit + + + + testcase TC_NegSem_1508_TemplateRestrictions_031() runs on GeneralComp { + + v_value := MyintTemplate; //error: v_value is value restricted, hence can not be omit + + if (valueof(v_value.b) == false) { + setverdict(pass); + } else { + setverdict(fail); + } + } + + control{ + execute(TC_NegSem_1508_TemplateRestrictions_031()); + } +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1508_template_restrictions/NegSem_1508_TemplateRestrictions_032.ttcn b/ATS/core_language/15_templates/1508_template_restrictions/NegSem_1508_TemplateRestrictions_032.ttcn new file mode 100644 index 00000000..34944902 --- /dev/null +++ b/ATS/core_language/15_templates/1508_template_restrictions/NegSem_1508_TemplateRestrictions_032.ttcn @@ -0,0 +1,43 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:15.8, Ensure that template(present) can't be assigned to a template(value) variable if contains anyvalueornone(*) + ** @verdict pass reject + *****************************************************************/ + + +module NegSem_1508_TemplateRestrictions_032 { + + type record ExampleType { // Exampletype record contains a charstring and a boolean + charstring a optional, + boolean b + } + + type component GeneralComp { + var template (value) ExampleType v_value; //value restricted template variable + } + + + template (present) ExampleType MyintTemplate :={ //actual template (with present restriction) contains * + a := *, + b:= true + } + + + + + testcase TC_NegSem_1508_TemplateRestrictions_032() runs on GeneralComp { + + v_value := MyintTemplate; //error: v_value is value restricted, hence can not contain * + + if (valueof(v_value.b) == false) { + setverdict(pass); + } else { + setverdict(fail); + } + } + + control{ + execute(TC_NegSem_1508_TemplateRestrictions_032()); + } +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1508_template_restrictions/NegSem_1508_TemplateRestrictions_033.ttcn b/ATS/core_language/15_templates/1508_template_restrictions/NegSem_1508_TemplateRestrictions_033.ttcn new file mode 100644 index 00000000..6e2a51c7 --- /dev/null +++ b/ATS/core_language/15_templates/1508_template_restrictions/NegSem_1508_TemplateRestrictions_033.ttcn @@ -0,0 +1,43 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:15.8, Ensure that an unrestricted template can't be assigned to a template(value) variable if contains anyvalueornone(*) + ** @verdict pass reject + *****************************************************************/ + + +module NegSem_1508_TemplateRestrictions_033 { + + type record ExampleType { // Exampletype record contains a charstring and a boolean + charstring a optional, + boolean b + } + + type component GeneralComp { + var template (value) ExampleType v_value; //value restricted template variable + } + + + template ExampleType MyintTemplate :={ //actual template (without restriction) contains * + a := *, + b:= true + } + + + + + testcase TC_NegSem_1508_TemplateRestrictions_033() runs on GeneralComp { + + v_value := MyintTemplate; //error: v_value is value restricted, hence can not contain * + + if (valueof(v_value.b) == false) { + setverdict(pass); + } else { + setverdict(fail); + } + } + + control{ + execute(TC_NegSem_1508_TemplateRestrictions_033()); + } +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1508_template_restrictions/NegSem_1508_TemplateRestrictions_034.ttcn b/ATS/core_language/15_templates/1508_template_restrictions/NegSem_1508_TemplateRestrictions_034.ttcn new file mode 100644 index 00000000..e16d7c5c --- /dev/null +++ b/ATS/core_language/15_templates/1508_template_restrictions/NegSem_1508_TemplateRestrictions_034.ttcn @@ -0,0 +1,40 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:15.8, Ensure that a template with omit restriction can't be assigned to a template(present)variable if omit + ** @verdict pass reject + *****************************************************************/ + + +module NegSem_1508_TemplateRestrictions_034 { + + type record ExampleType { // Exampletype record contains a charstring and a boolean + charstring a , + boolean b optional + } + + type component GeneralComp { + var template (present) ExampleType v_present; //value restricted template variable + } + + + template (omit) ExampleType MyintTemplate := omit; //actual template (omit) is omit + + + + + testcase TC_NegSem_1508_TemplateRestrictions_034() runs on GeneralComp { + + v_present := MyintTemplate; //error: v_present is present restricted, hence can not be omit + + if (valueof(v_present.b) == false) { + setverdict(pass); + } else { + setverdict(fail); + } + } + + control{ + execute(TC_NegSem_1508_TemplateRestrictions_034()); + } +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1508_template_restrictions/NegSem_1508_TemplateRestrictions_035.ttcn b/ATS/core_language/15_templates/1508_template_restrictions/NegSem_1508_TemplateRestrictions_035.ttcn new file mode 100644 index 00000000..240ba0c2 --- /dev/null +++ b/ATS/core_language/15_templates/1508_template_restrictions/NegSem_1508_TemplateRestrictions_035.ttcn @@ -0,0 +1,40 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:15.8, Ensure that an unrestricted template can't be assigned to a template(present)variable if omit + ** @verdict pass reject + *****************************************************************/ + + +module NegSem_1508_TemplateRestrictions_035 { + + type record ExampleType { // Exampletype record contains a charstring and a boolean + charstring a , + boolean b optional + } + + type component GeneralComp { + var template (present) ExampleType v_present; //value restricted template variable + } + + + template ExampleType MyintTemplate := omit; //actual template is omit + + + + + testcase TC_NegSem_1508_TemplateRestrictions_035() runs on GeneralComp { + + v_present := MyintTemplate; //error: v_present is present restricted, hence can not be omit + + if (valueof(v_present.b) == false) { + setverdict(pass); + } else { + setverdict(fail); + } + } + + control{ + execute(TC_NegSem_1508_TemplateRestrictions_035()); + } +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1508_template_restrictions/NegSem_1508_TemplateRestrictions_036.ttcn b/ATS/core_language/15_templates/1508_template_restrictions/NegSem_1508_TemplateRestrictions_036.ttcn new file mode 100644 index 00000000..8dd39dc7 --- /dev/null +++ b/ATS/core_language/15_templates/1508_template_restrictions/NegSem_1508_TemplateRestrictions_036.ttcn @@ -0,0 +1,38 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:15.8, Ensure that template(present) can't be parameter to a template(omit) if contains anyvalueornone(*) + ** @verdict pass reject + *****************************************************************/ + +module NegSem_1508_TemplateRestrictions_036 { + + type record ExampleType { // Exampletype record integer and a boolean + integer a, + boolean b + } + + type component GeneralComp { + } + + + + template (omit) ExampleType m_baseTemplate(template (present) integer MyintTemplate := *) :={ + a := MyintTemplate, // template (present) MyintTemplate contains anyvalueornone(*), which is not allowed in omit restriction + b := true + } + + testcase TC_NegSem_1508_TemplateRestrictions_036() runs on GeneralComp { + + + if (valueof(m_baseTemplate.b) == true) { + setverdict(pass); + } else { + setverdict(fail); + } + } + + control{ + execute(TC_NegSem_1508_TemplateRestrictions_036()); + } +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1508_template_restrictions/NegSem_1508_TemplateRestrictions_037.ttcn b/ATS/core_language/15_templates/1508_template_restrictions/NegSem_1508_TemplateRestrictions_037.ttcn new file mode 100644 index 00000000..5e402abb --- /dev/null +++ b/ATS/core_language/15_templates/1508_template_restrictions/NegSem_1508_TemplateRestrictions_037.ttcn @@ -0,0 +1,38 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:15.8, Ensure that template(present) can't be parameter to template(omit) if contains anyvalue(?) + ** @verdict pass reject + *****************************************************************/ + +module NegSem_1508_TemplateRestrictions_037 { + + type record ExampleType { // Exampletype record integer and a boolean + integer a, + boolean b + } + + type component GeneralComp { + } + + + + template (omit) ExampleType m_baseTemplate(template integer MyintTemplate := ?) :={ + a := MyintTemplate, // template MyintTemplate contains anyvalue(?), which is not allowed in omit restriction + b := true + } + + testcase TC_NegSem_1508_TemplateRestrictions_037() runs on GeneralComp { + + + if (ispresent(m_baseTemplate.a) == true) { + setverdict(pass); + } else { + setverdict(fail); + } + } + + control{ + execute(TC_NegSem_1508_TemplateRestrictions_037()); + } +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1508_template_restrictions/NegSem_1508_TemplateRestrictions_038.ttcn b/ATS/core_language/15_templates/1508_template_restrictions/NegSem_1508_TemplateRestrictions_038.ttcn new file mode 100644 index 00000000..1499a445 --- /dev/null +++ b/ATS/core_language/15_templates/1508_template_restrictions/NegSem_1508_TemplateRestrictions_038.ttcn @@ -0,0 +1,38 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:15.8, Ensure that template(omit) can't be parameter to template(value) if it is omit + ** @verdict pass reject + *****************************************************************/ + +module NegSem_1508_TemplateRestrictions_038 { + + type record ExampleType { // Exampletype record integer and a boolean + integer a, + boolean b + } + + type component GeneralComp { + } + + + + template (value) ExampleType m_baseTemplate(template (omit) integer MyintTemplate := omit) :={ + a := MyintTemplate, // template (omit) MyintTemplate is omit, which is not allowed with value restriction + b := true + } + + testcase TC_NegSem_1508_TemplateRestrictions_038() runs on GeneralComp { + + + if (ispresent(m_baseTemplate.a) == true) { + setverdict(pass); + } else { + setverdict(fail); + } + } + + control{ + execute(TC_NegSem_1508_TemplateRestrictions_038()); + } +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1508_template_restrictions/NegSem_1508_TemplateRestrictions_039.ttcn b/ATS/core_language/15_templates/1508_template_restrictions/NegSem_1508_TemplateRestrictions_039.ttcn new file mode 100644 index 00000000..a3b3bb40 --- /dev/null +++ b/ATS/core_language/15_templates/1508_template_restrictions/NegSem_1508_TemplateRestrictions_039.ttcn @@ -0,0 +1,38 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:15.8, Ensure that template(present) can't be parameter to template(value) if it contains anyvalueornone(*) + ** @verdict pass reject + *****************************************************************/ + +module NegSem_1508_TemplateRestrictions_039 { + + type record ExampleType { // Exampletype record integer and a boolean + integer a, + boolean b + } + + type component GeneralComp { + } + + + + template (value) ExampleType m_baseTemplate(template (present) integer MyintTemplate := *) :={ + a := MyintTemplate, // template (present) MyintTemplate contains anyvalueornone(*), which is not allowed with value restriction + b := true + } + + testcase TC_NegSem_1508_TemplateRestrictions_039() runs on GeneralComp { + + + if (ispresent(m_baseTemplate.a) == true) { + setverdict(pass); + } else { + setverdict(fail); + } + } + + control{ + execute(TC_NegSem_1508_TemplateRestrictions_039()); + } +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1508_template_restrictions/NegSem_1508_TemplateRestrictions_040.ttcn b/ATS/core_language/15_templates/1508_template_restrictions/NegSem_1508_TemplateRestrictions_040.ttcn new file mode 100644 index 00000000..5eb8a47b --- /dev/null +++ b/ATS/core_language/15_templates/1508_template_restrictions/NegSem_1508_TemplateRestrictions_040.ttcn @@ -0,0 +1,38 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:15.8, Ensure that unrestricted template can't be parameter to template(value) if it contains anyvalueornone(*) + ** @verdict pass reject + *****************************************************************/ + +module NegSem_1508_TemplateRestrictions_040 { + + type record ExampleType { // Exampletype record integer and a boolean + integer a, + boolean b + } + + type component GeneralComp { + } + + + + template (value) ExampleType m_baseTemplate(template integer MyintTemplate := *) :={ + a := MyintTemplate, // template MyintTemplate contains anyvalueornone(*), which is not allowed with value restriction + b := true + } + + testcase TC_NegSem_1508_TemplateRestrictions_040() runs on GeneralComp { + + + if (ispresent(m_baseTemplate.a) == true) { + setverdict(pass); + } else { + setverdict(fail); + } + } + + control{ + execute(TC_NegSem_1508_TemplateRestrictions_040()); + } +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1508_template_restrictions/NegSem_1508_TemplateRestrictions_041.ttcn b/ATS/core_language/15_templates/1508_template_restrictions/NegSem_1508_TemplateRestrictions_041.ttcn new file mode 100644 index 00000000..ffb4de20 --- /dev/null +++ b/ATS/core_language/15_templates/1508_template_restrictions/NegSem_1508_TemplateRestrictions_041.ttcn @@ -0,0 +1,38 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:15.8, Ensure that template (omit) can't be parameter to template(present) if it contains omit + ** @verdict pass reject + *****************************************************************/ + +module NegSem_1508_TemplateRestrictions_041 { + + type record ExampleType { // Exampletype record integer and a boolean + integer a, + boolean b + } + + type component GeneralComp { + } + + + + template (present) ExampleType m_baseTemplate(template (omit) integer MyintTemplate := omit) :={ + a := MyintTemplate, // template (omit) MyintTemplate contains omit, which is not allowed with present restriction + b := true + } + + testcase TC_NegSem_1508_TemplateRestrictions_041() runs on GeneralComp { + + + if (ispresent(m_baseTemplate.a) == true) { + setverdict(pass); + } else { + setverdict(fail); + } + } + + control{ + execute(TC_NegSem_1508_TemplateRestrictions_041()); + } +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1508_template_restrictions/NegSem_1508_TemplateRestrictions_042.ttcn b/ATS/core_language/15_templates/1508_template_restrictions/NegSem_1508_TemplateRestrictions_042.ttcn new file mode 100644 index 00000000..362cf522 --- /dev/null +++ b/ATS/core_language/15_templates/1508_template_restrictions/NegSem_1508_TemplateRestrictions_042.ttcn @@ -0,0 +1,38 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:15.8, Ensure that the an unrestriced template can't be parameter to template(present) if it contains omit + ** @verdict pass reject + *****************************************************************/ + +module NegSem_1508_TemplateRestrictions_042 { + + type record ExampleType { // Exampletype record integer and a boolean + integer a, + boolean b + } + + type component GeneralComp { + } + + + + template (present) ExampleType m_baseTemplate(template integer MyintTemplate := omit) :={ + a := MyintTemplate, // template MyintTemplate contains omit, which is not allowed with present restriction + b := true + } + + testcase TC_NegSem_1508_TemplateRestrictions_042() runs on GeneralComp { + + + if (ispresent(m_baseTemplate.a) == true) { + setverdict(pass); + } else { + setverdict(fail); + } + } + + control{ + execute(TC_NegSem_1508_TemplateRestrictions_042()); + } +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1508_template_restrictions/NegSem_1508_TemplateRestrictions_049.ttcn b/ATS/core_language/15_templates/1508_template_restrictions/NegSem_1508_TemplateRestrictions_049.ttcn new file mode 100644 index 00000000..0e5af364 --- /dev/null +++ b/ATS/core_language/15_templates/1508_template_restrictions/NegSem_1508_TemplateRestrictions_049.ttcn @@ -0,0 +1,39 @@ +/***************************************************************** + ** @author STF 470 (updated by STF 521) + ** @version 0.0.2 + ** @purpose 1:15.8, Ensure that template(present) can't be parameter to a template(omit) + ** @verdict pass reject + *****************************************************************/ + +module NegSem_1508_TemplateRestrictions_049 { + + type record ExampleType { // Exampletype record integer and a boolean + integer a, + boolean b + } + + type component GeneralComp { + } + + + + template (omit) ExampleType m_baseTemplate(template (present) integer MyintTemplate := ?) :={ + a := MyintTemplate, // template (present)is not allowed parameter in omit restriction + // if the content is wrong (see the note in table 13) + b := true + } + + testcase TC_NegSem_1508_TemplateRestrictions_049() runs on GeneralComp { + + + if (valueof(m_baseTemplate.b) == true) { + setverdict(pass); + } else { + setverdict(fail); + } + } + + control{ + execute(TC_NegSem_1508_TemplateRestrictions_049()); + } +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1508_template_restrictions/NegSem_1508_TemplateRestrictions_050.ttcn b/ATS/core_language/15_templates/1508_template_restrictions/NegSem_1508_TemplateRestrictions_050.ttcn new file mode 100644 index 00000000..cd5167f6 --- /dev/null +++ b/ATS/core_language/15_templates/1508_template_restrictions/NegSem_1508_TemplateRestrictions_050.ttcn @@ -0,0 +1,60 @@ +/*************************************************** + ** @author STF 487 (updated by STF 521) + ** @version 0.0.2 + ** @purpose 1:15.8, Ensure that decoded content match is not allowed for omit template restriction + ** @verdict pass reject, noexecution + ***************************************************/ + +module NegSem_1508_TemplateRestrictions_050 { + + type record MessageType { + hexstring payload + } + + type record Mymessage { + integer field1, + bitstring field2 optional + } + + + type port loopbackPort message{inout MessageType}; + + + type component GeneralComp { + port loopbackPort messagePort + } + +testcase TC_NegSem_1508_TemplateRestrictions_050() runs on GeneralComp { + var bitstring v_enc; + var Mymessage v_testMessage; + var MessageType Message; + template (omit) MessageType mw_matchingTemplate:= { + payload := decmatch Mymessage: {field1:= 10, field2 := omit} //error: omit restriction not allowed + } + + v_testMessage:= { + field1 := 10, + field2 := '1001'B + } + + Message.payload := bit2hex(encvalue(v_testMessage)); //encode message to payload + + + messagePort.send(Message); //send message + + alt { + [] messagePort.receive(mw_matchingTemplate) { + setverdict(pass); + } + [] messagePort.receive { + setverdict(fail,mw_matchingTemplate); + } + } + +} + +control{ + execute(TC_NegSem_1508_TemplateRestrictions_050()); +} + +} diff --git a/ATS/core_language/15_templates/1508_template_restrictions/NegSem_1508_TemplateRestrictions_051.ttcn b/ATS/core_language/15_templates/1508_template_restrictions/NegSem_1508_TemplateRestrictions_051.ttcn new file mode 100644 index 00000000..eaad9ba4 --- /dev/null +++ b/ATS/core_language/15_templates/1508_template_restrictions/NegSem_1508_TemplateRestrictions_051.ttcn @@ -0,0 +1,59 @@ +/*************************************************** + ** @author STF 487 (updated by STF 521) + ** @version 0.0.2 + ** @purpose 1:15.8, Ensure that decoded content match is not allowed for omit template restriction + ** @verdict pass reject, noexecution + ***************************************************/ + +module NegSem_1508_TemplateRestrictions_051 { + + type record MessageType { + hexstring payload + } + + type record Mymessage { + integer field1, + bitstring field2 optional + } + + + type port loopbackPort message{inout MessageType}; + + + type component GeneralComp { + port loopbackPort messagePort + } + +testcase TC_NegSem_1508_TemplateRestrictions_051() runs on GeneralComp { + var bitstring v_enc; + var Mymessage v_testMessage; + var MessageType Message; + template (value) MessageType mw_matchingTemplate:= { + payload := decmatch Mymessage: {field1:= 10, field2 := '1001'B} //error: value restriction not allowed + } + + v_testMessage:= { + field1 := 10, + field2 := '1001'B + } + + Message.payload := bit2hex(encvalue(v_testMessage)); //encode message to payload + + messagePort.send(Message); //send message + + alt { + [] messagePort.receive(mw_matchingTemplate) { + setverdict(pass); + } + [] messagePort.receive { + setverdict(fail,mw_matchingTemplate); + } + } + +} + +control{ + execute(TC_NegSem_1508_TemplateRestrictions_051()); +} + +} diff --git a/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_001.ttcn b/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_001.ttcn new file mode 100644 index 00000000..e091c1fe --- /dev/null +++ b/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_001.ttcn @@ -0,0 +1,29 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:15.8, Ensure that a value can be assigned to a template(omit) variable. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_1508_TemplateRestrictions_001 { + +type component GeneralComp { } + +testcase TC_Sem_1508_TemplateRestrictions_001() runs on GeneralComp { + var template(omit) integer v_omit; + + v_omit := 20; + + if (valueof(v_omit) == 20) { + setverdict(pass); + } else { + setverdict(fail); + } +} + +control{ + execute(TC_Sem_1508_TemplateRestrictions_001()); +} + + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_002.ttcn b/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_002.ttcn new file mode 100644 index 00000000..f2f7bae0 --- /dev/null +++ b/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_002.ttcn @@ -0,0 +1,36 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:15.8, Ensure that a template(omit) can be assigned to a template(omit) variable. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_1508_TemplateRestrictions_002 { + +type component GeneralComp { } + +type record ExampleType { + integer a, + boolean b optional +} + +template(omit) ExampleType exampleOmit := omit; + +testcase TC_Sem_1508_TemplateRestrictions_002() runs on GeneralComp { + var template(omit) ExampleType v_omit; + + v_omit := exampleOmit; + + if ( ispresent(v_omit) ) { + setverdict(fail); + } else { + setverdict(pass); + } +} + +control{ + execute(TC_Sem_1508_TemplateRestrictions_002()); +} + + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_003.ttcn b/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_003.ttcn new file mode 100644 index 00000000..8f80a3ff --- /dev/null +++ b/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_003.ttcn @@ -0,0 +1,38 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:15.8, Ensure that a templat(value) can be assigned to a template(omit) variable. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_1508_TemplateRestrictions_003 { + +type component GeneralComp { } + +type record ExampleType { + integer a, + boolean b optional +} + +template(value) ExampleType exampleValueOptional := {1, omit}; + +testcase TC_Sem_1508_TemplateRestrictions_003() runs on GeneralComp { + var template(omit) ExampleType v_omit; + + v_omit := exampleValueOptional; + + if (match(valueof(v_omit.a), 1) and + match(ispresent(v_omit.b), false ) + ) { + setverdict(pass); + } else { + setverdict(fail); + } +} + +control{ + execute(TC_Sem_1508_TemplateRestrictions_003()); +} + + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_004.ttcn b/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_004.ttcn new file mode 100644 index 00000000..ccec9250 --- /dev/null +++ b/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_004.ttcn @@ -0,0 +1,29 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:15.8, Ensure that a value can be assigned to a template(value) variable. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_1508_TemplateRestrictions_004 { + +type component GeneralComp { } + +testcase TC_Sem_1508_TemplateRestrictions_004() runs on GeneralComp { + var template(value) integer v_value; + + v_value := 20; + + if (valueof(v_value) == 20) { + setverdict(pass); + } else { + setverdict(fail); + } +} + +control{ + execute(TC_Sem_1508_TemplateRestrictions_004()); +} + + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_005.ttcn b/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_005.ttcn new file mode 100644 index 00000000..3a820f88 --- /dev/null +++ b/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_005.ttcn @@ -0,0 +1,38 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:15.8, Ensure that a template(value) can be assigned to a template(value) variable. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_1508_TemplateRestrictions_005 { + +type component GeneralComp { } + +type record ExampleType { + integer a, + boolean b optional +} + +template(value) ExampleType exampleValue := {1, true}; + +testcase TC_Sem_1508_TemplateRestrictions_005() runs on GeneralComp { + var template(value) ExampleType v_value; + + v_value := exampleValue; + + if (match(valueof(v_value.a), 1) and + match(valueof(v_value.b), true) + ) { + setverdict(pass); + } else { + setverdict(fail); + } +} + +control{ + execute(TC_Sem_1508_TemplateRestrictions_005()); +} + + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_006.ttcn b/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_006.ttcn new file mode 100644 index 00000000..7cb2b7a8 --- /dev/null +++ b/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_006.ttcn @@ -0,0 +1,29 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:15.8, Ensure that a value can be assigned to a template(present) variable. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_1508_TemplateRestrictions_006 { + +type component GeneralComp { } + +testcase TC_Sem_1508_TemplateRestrictions_006() runs on GeneralComp { + var template(present) integer v_present; + + v_present := 20; + + if (valueof(v_present) == 20) { + setverdict(pass); + } else { + setverdict(fail); + } +} + +control{ + execute(TC_Sem_1508_TemplateRestrictions_006()); +} + + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_007.ttcn b/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_007.ttcn new file mode 100644 index 00000000..2606d2be --- /dev/null +++ b/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_007.ttcn @@ -0,0 +1,38 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:15.8, Ensure that a template(omit) can be assigned to a template(present) variable. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_1508_TemplateRestrictions_007 { + +type component GeneralComp { } + +type record ExampleType { + integer a, + boolean b optional +} + +template(omit) ExampleType exampleOmit := {1, omit}; + +testcase TC_Sem_1508_TemplateRestrictions_007() runs on GeneralComp { + var template(present) ExampleType v_present; + + v_present := exampleOmit; + + if (match(valueof(v_present.a), 1) and + match(ispresent(v_present.b), false) + ) { + setverdict(pass); + } else { + setverdict(fail); + } +} + +control{ + execute(TC_Sem_1508_TemplateRestrictions_007()); +} + + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_008.ttcn b/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_008.ttcn new file mode 100644 index 00000000..25fc2b67 --- /dev/null +++ b/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_008.ttcn @@ -0,0 +1,38 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:15.8, Ensure that a template(value) can be assigned to a template(present) variable. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_1508_TemplateRestrictions_008 { + +type component GeneralComp { } + +type record ExampleType { + integer a, + boolean b optional +} + +template(value) ExampleType exampleValue := {1, true}; + +testcase TC_Sem_1508_TemplateRestrictions_008() runs on GeneralComp { + var template(present) ExampleType v_present; + + v_present := exampleValue; + + if (match(valueof(v_present.a), 1) and + match(valueof(v_present.b), true) + ) { + setverdict(pass); + } else { + setverdict(fail); + } +} + +control{ + execute(TC_Sem_1508_TemplateRestrictions_008()); +} + + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_009.ttcn b/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_009.ttcn new file mode 100644 index 00000000..40e32267 --- /dev/null +++ b/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_009.ttcn @@ -0,0 +1,38 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:15.8, Ensure that a template(present) can be assigned to a template(present) variable. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_1508_TemplateRestrictions_009 { + +type component GeneralComp { } + +type record ExampleType { + integer a, + boolean b optional +} + +template(present) ExampleType examplePresent := {1, true}; + +testcase TC_Sem_1508_TemplateRestrictions_009() runs on GeneralComp { + var template(present) ExampleType v_present; + + v_present := examplePresent; + + if (match(valueof(v_present.a), 1) and + match(valueof(v_present.b), true) + ) { + setverdict(pass); + } else { + setverdict(fail); + } +} + +control{ + execute(TC_Sem_1508_TemplateRestrictions_009()); +} + + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_010.ttcn b/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_010.ttcn new file mode 100644 index 00000000..53dcbf4a --- /dev/null +++ b/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_010.ttcn @@ -0,0 +1,29 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:15.8, Ensure that a value can be assigned to a template variable. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_1508_TemplateRestrictions_010 { + +type component GeneralComp { } + +testcase TC_Sem_1508_TemplateRestrictions_010() runs on GeneralComp { + var template integer v_template; + + v_template := 20; + + if (valueof(v_template) == 20) { + setverdict(pass); + } else { + setverdict(fail); + } +} + +control{ + execute(TC_Sem_1508_TemplateRestrictions_010()); +} + + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_011.ttcn b/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_011.ttcn new file mode 100644 index 00000000..443cbe6f --- /dev/null +++ b/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_011.ttcn @@ -0,0 +1,38 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:15.8, Ensure that a template(omit) can be assigned to a template variable. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_1508_TemplateRestrictions_011 { + +type component GeneralComp { } + +type record ExampleType { + integer a, + boolean b optional +} + +template(omit) ExampleType exampleOmit := {1, omit}; + +testcase TC_Sem_1508_TemplateRestrictions_011() runs on GeneralComp { + var template ExampleType v_template; + + v_template := exampleOmit; + + if (match(valueof(v_template.a), 1) and + match(ispresent(v_template.b), false) + ) { + setverdict(pass); + } else { + setverdict(fail); + } +} + +control{ + execute(TC_Sem_1508_TemplateRestrictions_011()); +} + + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_012.ttcn b/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_012.ttcn new file mode 100644 index 00000000..eeda4d1c --- /dev/null +++ b/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_012.ttcn @@ -0,0 +1,38 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:15.8, Ensure that a template(value) can be assigned to a template variable. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_1508_TemplateRestrictions_012 { + +type component GeneralComp { } + +type record ExampleType { + integer a, + boolean b optional +} + +template(value) ExampleType exampleValue := {1, true}; + +testcase TC_Sem_1508_TemplateRestrictions_012() runs on GeneralComp { + var template ExampleType v_template; + + v_template := exampleValue; + + if (match(valueof(v_template.a), 1) and + match(valueof(v_template.b), true) + ) { + setverdict(pass); + } else { + setverdict(fail); + } +} + +control{ + execute(TC_Sem_1508_TemplateRestrictions_012()); +} + + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_013.ttcn b/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_013.ttcn new file mode 100644 index 00000000..fbd96fdb --- /dev/null +++ b/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_013.ttcn @@ -0,0 +1,38 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:15.8, Ensure that a template(present) can be assigned to a template variable. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_1508_TemplateRestrictions_013 { + +type component GeneralComp { } + +type record ExampleType { + integer a, + boolean b optional +} + +template(present) ExampleType examplePresent := {1, true}; + +testcase TC_Sem_1508_TemplateRestrictions_013() runs on GeneralComp { + var template ExampleType v_template; + + v_template := examplePresent; + + if (match(valueof(v_template.a), 1) and + match(valueof(v_template.b), true) + ) { + setverdict(pass); + } else { + setverdict(fail); + } +} + +control{ + execute(TC_Sem_1508_TemplateRestrictions_013()); +} + + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_014.ttcn b/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_014.ttcn new file mode 100644 index 00000000..5c772ba3 --- /dev/null +++ b/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_014.ttcn @@ -0,0 +1,38 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:15.8, Ensure that a template can be assigned to a template variable. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_1508_TemplateRestrictions_014 { + +type component GeneralComp { } + +type record ExampleType { + integer a, + boolean b optional +} + +template ExampleType exampleTemplate := {1, true}; + +testcase TC_Sem_1508_TemplateRestrictions_014() runs on GeneralComp { + var template ExampleType v_template; + + v_template := exampleTemplate; + + if (match(valueof(v_template.a), 1) and + match(valueof(v_template.b), true) + ) { + setverdict(pass); + } else { + setverdict(fail); + } +} + +control{ + execute(TC_Sem_1508_TemplateRestrictions_014()); +} + + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_015.ttcn b/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_015.ttcn new file mode 100644 index 00000000..771a58c4 --- /dev/null +++ b/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_015.ttcn @@ -0,0 +1,41 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:15.8, Ensure that a base template can be modified without restrictions. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_1508_TemplateRestrictions_015 { + +type component GeneralComp { } + +type record ExampleType { + integer a, + boolean b optional +} + +template ExampleType m_baseTemplate := { + a := 20, + b := true +} + +template ExampleType m_modifiedTemplate modifies m_baseTemplate := { + a := 22 +} + +testcase TC_Sem_1508_TemplateRestrictions_015() runs on GeneralComp { + if (match(valueof(m_modifiedTemplate.a), 22) and + match(valueof(m_modifiedTemplate.b), true) + ) { + setverdict(pass); + } else { + setverdict(fail); + } +} + +control{ + execute(TC_Sem_1508_TemplateRestrictions_015()); +} + + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_016.ttcn b/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_016.ttcn new file mode 100644 index 00000000..20629cef --- /dev/null +++ b/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_016.ttcn @@ -0,0 +1,41 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:15.8, Ensure that a base template can be modified with template(present) restriction. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_1508_TemplateRestrictions_016 { + + type component GeneralComp { } + + type record ExampleType { + integer a, + boolean b optional + } + + template ExampleType m_baseTemplate := { + a := 20, + b := true + } + + template(present) ExampleType m_modifiedTemplate modifies m_baseTemplate := { + a := 22 + } + + testcase TC_Sem_1508_TemplateRestrictions_016() runs on GeneralComp { + if (match(valueof(m_modifiedTemplate.a), 22) and + match(valueof(m_modifiedTemplate.b), true) + ) { + setverdict(pass); + } else { + setverdict(fail); + } + } + + control{ + execute(TC_Sem_1508_TemplateRestrictions_016()); + } + + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_017.ttcn b/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_017.ttcn new file mode 100644 index 00000000..6bd6f3fc --- /dev/null +++ b/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_017.ttcn @@ -0,0 +1,41 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:15.8, Ensure that a base template can be modified with template(omit) restriction. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_1508_TemplateRestrictions_017 { + + type component GeneralComp { } + + type record ExampleType { + integer a, + boolean b optional + } + + template ExampleType m_baseTemplate := { + a := 20, + b := true + } + + template(omit) ExampleType m_modifiedTemplate modifies m_baseTemplate := { + a := 22 + } + + testcase TC_Sem_1508_TemplateRestrictions_017() runs on GeneralComp { + if (match(valueof(m_modifiedTemplate.a), 22) and + match(valueof(m_modifiedTemplate.b), true) + ) { + setverdict(pass); + } else { + setverdict(fail); + } + } + + control{ + execute(TC_Sem_1508_TemplateRestrictions_017()); + } + + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_018.ttcn b/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_018.ttcn new file mode 100644 index 00000000..944691f0 --- /dev/null +++ b/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_018.ttcn @@ -0,0 +1,41 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:15.8, Ensure that a base template can be modified with template(value) restriction. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_1508_TemplateRestrictions_018 { + + type component GeneralComp { } + + type record ExampleType { + integer a, + boolean b optional + } + + template ExampleType m_baseTemplate := { + a := 20, + b := true + } + + template(value) ExampleType m_modifiedTemplate modifies m_baseTemplate := { + a := 22 + } + + testcase TC_Sem_1508_TemplateRestrictions_018() runs on GeneralComp { + if (match(valueof(m_modifiedTemplate.a), 22) and + match(valueof(m_modifiedTemplate.b), true) + ) { + setverdict(pass); + } else { + setverdict(fail); + } + } + + control{ + execute(TC_Sem_1508_TemplateRestrictions_018()); + } + + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_019.ttcn b/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_019.ttcn new file mode 100644 index 00000000..269dc9db --- /dev/null +++ b/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_019.ttcn @@ -0,0 +1,41 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:15.8, Ensure that a template(present) base template can be modified with template(present) restriction. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_1508_TemplateRestrictions_019 { + + type component GeneralComp { } + + type record ExampleType { + integer a, + boolean b optional + } + + template(present) ExampleType m_baseTemplate := { + a := 20, + b := true + } + + template(present) ExampleType m_modifiedTemplate modifies m_baseTemplate := { + a := 22 + } + + testcase TC_Sem_1508_TemplateRestrictions_019() runs on GeneralComp { + if (match(valueof(m_modifiedTemplate.a), 22) and + match(valueof(m_modifiedTemplate.b), true) + ) { + setverdict(pass); + } else { + setverdict(fail); + } + } + + control{ + execute(TC_Sem_1508_TemplateRestrictions_019()); + } + + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_020.ttcn b/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_020.ttcn new file mode 100644 index 00000000..f4e11716 --- /dev/null +++ b/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_020.ttcn @@ -0,0 +1,41 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:15.8, Ensure that a template(present) base template can be modified with template(value) restriction. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_1508_TemplateRestrictions_020 { + + type component GeneralComp { } + + type record ExampleType { + integer a, + boolean b optional + } + + template(present) ExampleType m_baseTemplate := { + a := 20, + b := true + } + + template(value) ExampleType m_modifiedTemplate modifies m_baseTemplate := { + a := 22 + } + + testcase TC_Sem_1508_TemplateRestrictions_020() runs on GeneralComp { + if (match(valueof(m_modifiedTemplate.a), 22) and + match(valueof(m_modifiedTemplate.b), true) + ) { + setverdict(pass); + } else { + setverdict(fail); + } + } + + control{ + execute(TC_Sem_1508_TemplateRestrictions_020()); + } + + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_021.ttcn b/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_021.ttcn new file mode 100644 index 00000000..a65f5827 --- /dev/null +++ b/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_021.ttcn @@ -0,0 +1,41 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:15.8, Ensure that a template(omit) base template can be modified with template(omit) restriction. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_1508_TemplateRestrictions_021 { + + type component GeneralComp { } + + type record ExampleType { + integer a, + boolean b optional + } + + template(omit) ExampleType m_baseTemplate := { + a := 20, + b := true + } + + template(omit) ExampleType m_modifiedTemplate modifies m_baseTemplate := { + a := 22 + } + + testcase TC_Sem_1508_TemplateRestrictions_021() runs on GeneralComp { + if (match(valueof(m_modifiedTemplate.a), 22) and + match(valueof(m_modifiedTemplate.b), true) + ) { + setverdict(pass); + } else { + setverdict(fail); + } + } + + control{ + execute(TC_Sem_1508_TemplateRestrictions_021()); + } + + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_022.ttcn b/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_022.ttcn new file mode 100644 index 00000000..bb5c8324 --- /dev/null +++ b/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_022.ttcn @@ -0,0 +1,41 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:15.8, Ensure that a template(omit) base template can be modified with template(value) restriction. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_1508_TemplateRestrictions_022 { + + type component GeneralComp { } + + type record ExampleType { + integer a, + boolean b optional + } + + template(omit) ExampleType m_baseTemplate := { + a := 20, + b := true + } + + template(value) ExampleType m_modifiedTemplate modifies m_baseTemplate := { + a := 22 + } + + testcase TC_Sem_1508_TemplateRestrictions_022() runs on GeneralComp { + if (match(valueof(m_modifiedTemplate.a), 22) and + match(valueof(m_modifiedTemplate.b), true) + ) { + setverdict(pass); + } else { + setverdict(fail); + } + } + + control{ + execute(TC_Sem_1508_TemplateRestrictions_022()); + } + + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_023.ttcn b/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_023.ttcn new file mode 100644 index 00000000..1ecf8683 --- /dev/null +++ b/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_023.ttcn @@ -0,0 +1,41 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:15.8, Ensure that a template(value) base template can be modified with template(value) restriction. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_1508_TemplateRestrictions_023 { + + type component GeneralComp { } + + type record ExampleType { + integer a, + boolean b optional + } + + template(value) ExampleType m_baseTemplate := { + a := 20, + b := true + } + + template(value) ExampleType m_modifiedTemplate modifies m_baseTemplate := { + a := 22 + } + + testcase TC_Sem_1508_TemplateRestrictions_023() runs on GeneralComp { + if (match(valueof(m_modifiedTemplate.a), 22) and + match(valueof(m_modifiedTemplate.b), true) + ) { + setverdict(pass); + } else { + setverdict(fail); + } + } + + control{ + execute(TC_Sem_1508_TemplateRestrictions_023()); + } + + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_024.ttcn b/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_024.ttcn new file mode 100644 index 00000000..ab0a677a --- /dev/null +++ b/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_024.ttcn @@ -0,0 +1,43 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:15.8, Ensure that template(present) base templates are allowed to be modfied to template(omit). + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// ATTENTION: valid for TTCN-3:2013 (ETSI ES 201 873-1 V4.5.1) and newer +// Older versions of the core languate standard didn't allow this type of +// modification because of restriction 15.8.c. + +module Sem_1508_TemplateRestrictions_024 { + + type component GeneralComp { } + + type record ExampleType { + integer a, + boolean b optional + } + + template(present) ExampleType m_baseTemplate := { + a := 20, + b := true + } + + template(omit) ExampleType m_modifiedTemplate modifies m_baseTemplate := { + a := 21 + } + + testcase TC_Sem_1508_TemplateRestrictions_024() runs on GeneralComp { + if (match(valueof(m_modifiedTemplate.a), 21) and + match(valueof(m_modifiedTemplate.b), true) + ) { + setverdict(pass); + } else { + setverdict(fail); + } + } + + control{ + execute(TC_Sem_1508_TemplateRestrictions_024()); + } +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_025.ttcn b/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_025.ttcn new file mode 100644 index 00000000..e9756845 --- /dev/null +++ b/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_025.ttcn @@ -0,0 +1,43 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:15.8, Ensure that template(omit) base templates are allowed to be modfied to template(present). + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// ATTENTION: valid for TTCN-3:2013 (ETSI ES 201 873-1 V4.5.1) and newer +// Older versions of the core languate standard didn't allow this type of +// modification because of restriction 15.8.c. + +module Sem_1508_TemplateRestrictions_025 { + + type component GeneralComp { } + + type record ExampleType { + integer a, + boolean b optional + } + + template(omit) ExampleType m_baseTemplate := { + a := 20, + b := true + } + + template(present) ExampleType m_modifiedTemplate modifies m_baseTemplate := { + a := 21 + } + + testcase TC_Sem_1508_TemplateRestrictions_025() runs on GeneralComp { + if (match(valueof(m_modifiedTemplate.a), 21) and + match(valueof(m_modifiedTemplate.b), true) + ) { + setverdict(pass); + } else { + setverdict(fail); + } + } + + control{ + execute(TC_Sem_1508_TemplateRestrictions_025()); + } +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_026.ttcn b/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_026.ttcn new file mode 100644 index 00000000..e2686216 --- /dev/null +++ b/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_026.ttcn @@ -0,0 +1,43 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:15.8, Ensure that template(value) base templates are allowed to be modfied to template(present). + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// ATTENTION: valid for TTCN-3:2013 (ETSI ES 201 873-1 V4.5.1) and newer +// Older versions of the core languate standard didn't allow this type of +// modification because of restriction 15.8.c. + +module Sem_1508_TemplateRestrictions_026 { + + type component GeneralComp { } + + type record ExampleType { + integer a, + boolean b optional + } + + template(value) ExampleType m_baseTemplate := { + a := 20, + b := true + } + + template(present) ExampleType m_modifiedTemplate modifies m_baseTemplate := { + a := 21 + } + + testcase TC_Sem_1508_TemplateRestrictions_026() runs on GeneralComp { + if (match(valueof(m_modifiedTemplate.a), 21) and + match(valueof(m_modifiedTemplate.b), true) + ) { + setverdict(pass); + } else { + setverdict(fail); + } + } + + control{ + execute(TC_Sem_1508_TemplateRestrictions_026()); + } +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_027.ttcn b/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_027.ttcn new file mode 100644 index 00000000..b7c85a2e --- /dev/null +++ b/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_027.ttcn @@ -0,0 +1,45 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:15.8, Ensure that template(value) base templates are allowed to be modfied to template(omit). + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// ATTENTION: valid for TTCN-3:2013 (ETSI ES 201 873-1 V4.5.1) and newer +// Older versions of the core languate standard didn't allow this type of +// modification because of restriction 15.8.c. + +module Sem_1508_TemplateRestrictions_027 { + + type component GeneralComp { } + + type record ExampleType { + integer a, + boolean b optional + } + + template(value) ExampleType m_baseTemplate := { + a := 20, + b := true + } + +// shall be rejected as template(omit) is not an allowed restriction for template(value) +// templates + template(omit) ExampleType m_modifiedTemplate modifies m_baseTemplate := { + a := 21 + } + + testcase TC_Sem_1508_TemplateRestrictions_027() runs on GeneralComp { + if (match(valueof(m_modifiedTemplate.a), 21) and + match(valueof(m_modifiedTemplate.b), true) + ) { + setverdict(pass); + } else { + setverdict(fail); + } + } + + control{ + execute(TC_Sem_1508_TemplateRestrictions_027()); + } +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_028.ttcn b/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_028.ttcn new file mode 100644 index 00000000..94194659 --- /dev/null +++ b/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_028.ttcn @@ -0,0 +1,43 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:15.8, Ensure that template(value) base templates are allowed to be modfied to template. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// ATTENTION: valid for TTCN-3:2013 (ETSI ES 201 873-1 V4.5.1) and newer +// Older versions of the core languate standard didn't allow this type of +// modification because of restriction 15.8.c. + +module Sem_1508_TemplateRestrictions_028 { + + type component GeneralComp { } + + type record ExampleType { + integer a, + boolean b optional + } + + template(value) ExampleType m_baseTemplate := { + a := 20, + b := true + } + + template ExampleType m_modifiedTemplate modifies m_baseTemplate := { + a := 21 + } + + testcase TC_Sem_1508_TemplateRestrictions_028() runs on GeneralComp { + if (match(valueof(m_modifiedTemplate.a), 21) and + match(valueof(m_modifiedTemplate.b), true) + ) { + setverdict(pass); + } else { + setverdict(fail); + } + } + + control{ + execute(TC_Sem_1508_TemplateRestrictions_028()); + } +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_029.ttcn b/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_029.ttcn new file mode 100644 index 00000000..068e69d6 --- /dev/null +++ b/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_029.ttcn @@ -0,0 +1,43 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:15.8, Ensure that template(omit) base templates are allowed to be modfied to template. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// ATTENTION: valid for TTCN-3:2013 (ETSI ES 201 873-1 V4.5.1) and newer +// Older versions of the core languate standard didn't allow this type of +// modification because of restriction 15.8.c. + +module Sem_1508_TemplateRestrictions_029 { + + type component GeneralComp { } + + type record ExampleType { + integer a, + boolean b optional + } + + template(omit) ExampleType m_baseTemplate := { + a := 20, + b := true + } + + template ExampleType m_modifiedTemplate modifies m_baseTemplate := { + a := 21 + } + + testcase TC_Sem_1508_TemplateRestrictions_029() runs on GeneralComp { + if (match(valueof(m_modifiedTemplate.a), 21) and + match(valueof(m_modifiedTemplate.b), true) + ) { + setverdict(pass); + } else { + setverdict(fail); + } + } + + control{ + execute(TC_Sem_1508_TemplateRestrictions_029()); + } +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_030.ttcn b/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_030.ttcn new file mode 100644 index 00000000..fc3cf2f6 --- /dev/null +++ b/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_030.ttcn @@ -0,0 +1,43 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:15.8, Ensure that template(present) base templates are allowed to be modfied to template. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// ATTENTION: valid for TTCN-3:2013 (ETSI ES 201 873-1 V4.5.1) and newer +// Older versions of the core languate standard didn't allow this type of +// modification because of restriction 15.8.c. + +module Sem_1508_TemplateRestrictions_030 { + + type component GeneralComp { } + + type record ExampleType { + integer a, + boolean b optional + } + + template(present) ExampleType m_baseTemplate := { + a := 20, + b := true + } + + template ExampleType m_modifiedTemplate modifies m_baseTemplate := { + a := 21 + } + + testcase TC_Sem_1508_TemplateRestrictions_030() runs on GeneralComp { + if (match(valueof(m_modifiedTemplate.a), 21) and + match(valueof(m_modifiedTemplate.b), true) + ) { + setverdict(pass); + } else { + setverdict(fail); + } + } + + control{ + execute(TC_Sem_1508_TemplateRestrictions_030()); + } +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_031.ttcn b/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_031.ttcn new file mode 100644 index 00000000..a292d07d --- /dev/null +++ b/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_031.ttcn @@ -0,0 +1,53 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:15.8, Ensure that the restrictiveness of parameters template(value)->template(present) is handled correctly. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// ATTENTION: valid for TTCN-3:2013 (ETSI ES 201 873-1 V4.5.1) and newer +// Older versions of the core languate standard didn't allow this type of +// modification because of restriction 15.8.c. + +/* +Pro opinion: +Test an intentional change made on the request of the STF160 in TTCN-3:2013. In particular, restriction 15.8.c was taken away from the core language specification (as marked in test case comments). This restriction did indeed mean that the tests would behave as you described, thus producing an error. However, with the restriction missing, the tests are perfectly valid. I also do not understand why you claim that it would not be possible to instantiate super-templates in these cases. Restrictions are always related to actual values and if the values satisfy both restrictions (parent and modified), there's no problem at all. And this is exactly what these test intend to verify. +Besides, the core language specification does not say that the parameters must be the same. There's a rule saying that the parameters shall not be omitted. It is rather unfortunate wording, because it might be interpreted in several ways. There's a CR 6692 regarding this issue. + +Contra opinion +The problem is with the semantics of modified templates. For every actual parameter list, first, the template-to-be-modified is implicitly instantiated and then modified by the given modifications. If the template-to-be-modified is not defined for the actual parameters, then neither is the modified one. Of course, you are right in that this restriction could be applied for actual parameters only and need not be checked at the template-level already. However, it does not make sense to lessen the template restriction of a parameter, as implicitly, it still keeps the stronger restriction (because of the modification-semantics). Therefore, it is misleading to SEEMINGLY allow a template(present) parameter for a template where the super-template has a template(value) parameter. If allowed, the user might use a non-value template as an actual parameter and then get a runtime error, even though the template-restriction matched the one in the formal parameter of the template. Therefore, we interpret the standard in such a way that the inheritance of the parameters includes the inheritance of both the types and the template restrictions of the inherited parameters. Strengthening of template restrictions would indeed not be a problem. Lessening is. + +*/ + +module Sem_1508_TemplateRestrictions_031 { + + type component GeneralComp { } + + type record ExampleType { + integer a, + boolean b optional + } + + template(present) ExampleType m_baseTemplate(template(value) integer p_myInt) := { + a := p_myInt, + b := true + } + + template(present) ExampleType m_modifiedTemplate(template(present) integer p_myInt) modifies m_baseTemplate := { + a := 21 + } + + testcase TC_Sem_1508_TemplateRestrictions_031() runs on GeneralComp { + if (match(valueof(m_modifiedTemplate(1).a), 21) and + match(valueof(m_modifiedTemplate(1).b), true) + ) { + setverdict(pass); + } else { + setverdict(fail); + } + } + + control{ + execute(TC_Sem_1508_TemplateRestrictions_031()); + } +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_032.ttcn b/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_032.ttcn new file mode 100644 index 00000000..91141099 --- /dev/null +++ b/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_032.ttcn @@ -0,0 +1,54 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:15.8, Ensure that the restrictiveness of parameters template(value)->template(omit) is handled correctly. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// ATTENTION: valid for TTCN-3:2013 (ETSI ES 201 873-1 V4.5.1) and newer +// Older versions of the core languate standard didn't allow this type of +// modification because of restriction 15.8.c. + +/* +Pro opinion: +Test an intentional change made on the request of the STF160 in TTCN-3:2013. In particular, restriction 15.8.c was taken away from the core language specification (as marked in test case comments). This restriction did indeed mean that the tests would behave as you described, thus producing an error. However, with the restriction missing, the tests are perfectly valid. I also do not understand why you claim that it would not be possible to instantiate super-templates in these cases. Restrictions are always related to actual values and if the values satisfy both restrictions (parent and modified), there's no problem at all. And this is exactly what these test intend to verify. +Besides, the core language specification does not say that the parameters must be the same. There's a rule saying that the parameters shall not be omitted. It is rather unfortunate wording, because it might be interpreted in several ways. There's a CR 6692 regarding this issue. + +Contra opinion +The problem is with the semantics of modified templates. For every actual parameter list, first, the template-to-be-modified is implicitly instantiated and then modified by the given modifications. If the template-to-be-modified is not defined for the actual parameters, then neither is the modified one. Of course, you are right in that this restriction could be applied for actual parameters only and need not be checked at the template-level already. However, it does not make sense to lessen the template restriction of a parameter, as implicitly, it still keeps the stronger restriction (because of the modification-semantics). Therefore, it is misleading to SEEMINGLY allow a template(present) parameter for a template where the super-template has a template(value) parameter. If allowed, the user might use a non-value template as an actual parameter and then get a runtime error, even though the template-restriction matched the one in the formal parameter of the template. Therefore, we interpret the standard in such a way that the inheritance of the parameters includes the inheritance of both the types and the template restrictions of the inherited parameters. Strengthening of template restrictions would indeed not be a problem. Lessening is. + +*/ + +module Sem_1508_TemplateRestrictions_032 { + + type component GeneralComp { } + + type record ExampleType { + integer a, + boolean b optional + } + + template(present) ExampleType m_baseTemplate(template(value) integer p_myInt) := { + a := p_myInt, + b := true + } + + template(present) ExampleType m_modifiedTemplate(template(omit) integer p_myInt) modifies m_baseTemplate := { + a := 21 + } + + testcase TC_Sem_1508_TemplateRestrictions_032() runs on GeneralComp { + if (match(valueof(m_modifiedTemplate(1).a), 21) and + match(valueof(m_modifiedTemplate(1).b), true) + ) { + setverdict(pass); + } else { + setverdict(fail); + } + } + + control{ + execute(TC_Sem_1508_TemplateRestrictions_032()); + } + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_033.ttcn b/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_033.ttcn new file mode 100644 index 00000000..b7dd9aff --- /dev/null +++ b/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_033.ttcn @@ -0,0 +1,53 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:15.8, Ensure that the restrictiveness of parameters template(value)->template is handled correctly. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// ATTENTION: valid for TTCN-3:2013 (ETSI ES 201 873-1 V4.5.1) and newer +// Older versions of the core languate standard didn't allow this type of +// modification because of restriction 15.8.c. + +/* +Pro opinion: +Test an intentional change made on the request of the STF160 in TTCN-3:2013. In particular, restriction 15.8.c was taken away from the core language specification (as marked in test case comments). This restriction did indeed mean that the tests would behave as you described, thus producing an error. However, with the restriction missing, the tests are perfectly valid. I also do not understand why you claim that it would not be possible to instantiate super-templates in these cases. Restrictions are always related to actual values and if the values satisfy both restrictions (parent and modified), there's no problem at all. And this is exactly what these test intend to verify. +Besides, the core language specification does not say that the parameters must be the same. There's a rule saying that the parameters shall not be omitted. It is rather unfortunate wording, because it might be interpreted in several ways. There's a CR 6692 regarding this issue. + +Contra opinion +The problem is with the semantics of modified templates. For every actual parameter list, first, the template-to-be-modified is implicitly instantiated and then modified by the given modifications. If the template-to-be-modified is not defined for the actual parameters, then neither is the modified one. Of course, you are right in that this restriction could be applied for actual parameters only and need not be checked at the template-level already. However, it does not make sense to lessen the template restriction of a parameter, as implicitly, it still keeps the stronger restriction (because of the modification-semantics). Therefore, it is misleading to SEEMINGLY allow a template(present) parameter for a template where the super-template has a template(value) parameter. If allowed, the user might use a non-value template as an actual parameter and then get a runtime error, even though the template-restriction matched the one in the formal parameter of the template. Therefore, we interpret the standard in such a way that the inheritance of the parameters includes the inheritance of both the types and the template restrictions of the inherited parameters. Strengthening of template restrictions would indeed not be a problem. Lessening is. + +*/ + +module Sem_1508_TemplateRestrictions_033 { + + type component GeneralComp { } + + type record ExampleType { + integer a, + boolean b optional + } + + template(present) ExampleType m_baseTemplate(template(value) integer p_myInt) := { + a := p_myInt, + b := true + } + + template(present) ExampleType m_modifiedTemplate(template integer p_myInt) modifies m_baseTemplate := { + a := 21 + } + + testcase TC_Sem_1508_TemplateRestrictions_033() runs on GeneralComp { + if (match(valueof(m_modifiedTemplate(1).a), 21) and + match(valueof(m_modifiedTemplate(1).b), true) + ) { + setverdict(pass); + } else { + setverdict(fail); + } + } + + control{ + execute(TC_Sem_1508_TemplateRestrictions_033()); + } +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_034.ttcn b/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_034.ttcn new file mode 100644 index 00000000..66f39257 --- /dev/null +++ b/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_034.ttcn @@ -0,0 +1,53 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:15.8, Ensure that the restrictiveness of parameters template(omit)->template(present) is handled correctly. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// ATTENTION: valid for TTCN-3:2013 (ETSI ES 201 873-1 V4.5.1) and newer +// Older versions of the core languate standard didn't allow this type of +// modification because of restriction 15.8.c. + +/* +Pro opinion: +Test an intentional change made on the request of the STF160 in TTCN-3:2013. In particular, restriction 15.8.c was taken away from the core language specification (as marked in test case comments). This restriction did indeed mean that the tests would behave as you described, thus producing an error. However, with the restriction missing, the tests are perfectly valid. I also do not understand why you claim that it would not be possible to instantiate super-templates in these cases. Restrictions are always related to actual values and if the values satisfy both restrictions (parent and modified), there's no problem at all. And this is exactly what these test intend to verify. +Besides, the core language specification does not say that the parameters must be the same. There's a rule saying that the parameters shall not be omitted. It is rather unfortunate wording, because it might be interpreted in several ways. There's a CR 6692 regarding this issue. + +Contra opinion +The problem is with the semantics of modified templates. For every actual parameter list, first, the template-to-be-modified is implicitly instantiated and then modified by the given modifications. If the template-to-be-modified is not defined for the actual parameters, then neither is the modified one. Of course, you are right in that this restriction could be applied for actual parameters only and need not be checked at the template-level already. However, it does not make sense to lessen the template restriction of a parameter, as implicitly, it still keeps the stronger restriction (because of the modification-semantics). Therefore, it is misleading to SEEMINGLY allow a template(present) parameter for a template where the super-template has a template(value) parameter. If allowed, the user might use a non-value template as an actual parameter and then get a runtime error, even though the template-restriction matched the one in the formal parameter of the template. Therefore, we interpret the standard in such a way that the inheritance of the parameters includes the inheritance of both the types and the template restrictions of the inherited parameters. Strengthening of template restrictions would indeed not be a problem. Lessening is. + +*/ + +module Sem_1508_TemplateRestrictions_034 { + + type component GeneralComp { } + + type record ExampleType { + integer a, + boolean b optional + } + + template(present) ExampleType m_baseTemplate(template(omit) integer p_myInt) := { + a := p_myInt, + b := true + } + + template(present) ExampleType m_modifiedTemplate(template(present) integer p_myInt) modifies m_baseTemplate := { + a := 21 + } + + testcase TC_Sem_1508_TemplateRestrictions_034() runs on GeneralComp { + if (match(valueof(m_modifiedTemplate(1).a), 21) and + match(valueof(m_modifiedTemplate(1).b), true) + ) { + setverdict(pass); + } else { + setverdict(fail); + } + } + + control{ + execute(TC_Sem_1508_TemplateRestrictions_034()); + } +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_035.ttcn b/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_035.ttcn new file mode 100644 index 00000000..312f0018 --- /dev/null +++ b/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_035.ttcn @@ -0,0 +1,53 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:15.8, Ensure that the restrictiveness of parameters template(omit)->template(present) is handled correctly. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// ATTENTION: valid for TTCN-3:2013 (ETSI ES 201 873-1 V4.5.1) and newer +// Older versions of the core languate standard didn't allow this type of +// modification because of restriction 15.8.c. + +/* +Pro opinion: +Test an intentional change made on the request of the STF160 in TTCN-3:2013. In particular, restriction 15.8.c was taken away from the core language specification (as marked in test case comments). This restriction did indeed mean that the tests would behave as you described, thus producing an error. However, with the restriction missing, the tests are perfectly valid. I also do not understand why you claim that it would not be possible to instantiate super-templates in these cases. Restrictions are always related to actual values and if the values satisfy both restrictions (parent and modified), there's no problem at all. And this is exactly what these test intend to verify. +Besides, the core language specification does not say that the parameters must be the same. There's a rule saying that the parameters shall not be omitted. It is rather unfortunate wording, because it might be interpreted in several ways. There's a CR 6692 regarding this issue. + +Contra opinion +The problem is with the semantics of modified templates. For every actual parameter list, first, the template-to-be-modified is implicitly instantiated and then modified by the given modifications. If the template-to-be-modified is not defined for the actual parameters, then neither is the modified one. Of course, you are right in that this restriction could be applied for actual parameters only and need not be checked at the template-level already. However, it does not make sense to lessen the template restriction of a parameter, as implicitly, it still keeps the stronger restriction (because of the modification-semantics). Therefore, it is misleading to SEEMINGLY allow a template(present) parameter for a template where the super-template has a template(value) parameter. If allowed, the user might use a non-value template as an actual parameter and then get a runtime error, even though the template-restriction matched the one in the formal parameter of the template. Therefore, we interpret the standard in such a way that the inheritance of the parameters includes the inheritance of both the types and the template restrictions of the inherited parameters. Strengthening of template restrictions would indeed not be a problem. Lessening is. + +*/ + +module Sem_1508_TemplateRestrictions_035 { + + type component GeneralComp { } + + type record ExampleType { + integer a, + boolean b optional + } + + template(present) ExampleType m_baseTemplate(template(omit) integer p_myInt) := { + a := p_myInt, + b := true + } + + template(present) ExampleType m_modifiedTemplate(template integer p_myInt) modifies m_baseTemplate := { + a := 21 + } + + testcase TC_Sem_1508_TemplateRestrictions_035() runs on GeneralComp { + if (match(valueof(m_modifiedTemplate(1).a), 21) and + match(valueof(m_modifiedTemplate(1).b), true) + ) { + setverdict(pass); + } else { + setverdict(fail); + } + } + + control{ + execute(TC_Sem_1508_TemplateRestrictions_035()); + } +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_036.ttcn b/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_036.ttcn new file mode 100644 index 00000000..5c2d320c --- /dev/null +++ b/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_036.ttcn @@ -0,0 +1,53 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:15.8, Ensure that the restrictiveness of parameters template(omit)->template(present) is handled correctly. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// ATTENTION: valid for TTCN-3:2013 (ETSI ES 201 873-1 V4.5.1) and newer +// Older versions of the core languate standard didn't allow this type of +// modification because of restriction 15.8.c. + +/* +Pro opinion: +Test an intentional change made on the request of the STF160 in TTCN-3:2013. In particular, restriction 15.8.c was taken away from the core language specification (as marked in test case comments). This restriction did indeed mean that the tests would behave as you described, thus producing an error. However, with the restriction missing, the tests are perfectly valid. I also do not understand why you claim that it would not be possible to instantiate super-templates in these cases. Restrictions are always related to actual values and if the values satisfy both restrictions (parent and modified), there's no problem at all. And this is exactly what these test intend to verify. +Besides, the core language specification does not say that the parameters must be the same. There's a rule saying that the parameters shall not be omitted. It is rather unfortunate wording, because it might be interpreted in several ways. There's a CR 6692 regarding this issue. + +Contra opinion +The problem is with the semantics of modified templates. For every actual parameter list, first, the template-to-be-modified is implicitly instantiated and then modified by the given modifications. If the template-to-be-modified is not defined for the actual parameters, then neither is the modified one. Of course, you are right in that this restriction could be applied for actual parameters only and need not be checked at the template-level already. However, it does not make sense to lessen the template restriction of a parameter, as implicitly, it still keeps the stronger restriction (because of the modification-semantics). Therefore, it is misleading to SEEMINGLY allow a template(present) parameter for a template where the super-template has a template(value) parameter. If allowed, the user might use a non-value template as an actual parameter and then get a runtime error, even though the template-restriction matched the one in the formal parameter of the template. Therefore, we interpret the standard in such a way that the inheritance of the parameters includes the inheritance of both the types and the template restrictions of the inherited parameters. Strengthening of template restrictions would indeed not be a problem. Lessening is. + +*/ + +module Sem_1508_TemplateRestrictions_036 { + + type component GeneralComp { } + + type record ExampleType { + integer a, + boolean b optional + } + + template(present) ExampleType m_baseTemplate(template(present) integer p_myInt) := { + a := p_myInt, + b := true + } + + template(present) ExampleType m_modifiedTemplate(template integer p_myInt) modifies m_baseTemplate := { + a := 21 + } + + testcase TC_Sem_1508_TemplateRestrictions_036() runs on GeneralComp { + if (match(valueof(m_modifiedTemplate(1).a), 21) and + match(valueof(m_modifiedTemplate(1).b), true) + ) { + setverdict(pass); + } else { + setverdict(fail); + } + } + + control{ + execute(TC_Sem_1508_TemplateRestrictions_036()); + } +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_043.ttcn b/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_043.ttcn new file mode 100644 index 00000000..c081dcab --- /dev/null +++ b/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_043.ttcn @@ -0,0 +1,38 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:15.8, Ensure that the an unrestriced template can be parameter to template(present) + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_1508_TemplateRestrictions_043 { + + type record ExampleType { // Exampletype record integer and a boolean + integer a, + boolean b + } + + type component GeneralComp { + } + + + + template (present) ExampleType m_baseTemplate(template integer MyintTemplate := 21) :={ + a := MyintTemplate, + b := true + } + + testcase TC_Sem_1508_TemplateRestrictions_043() runs on GeneralComp { + + + if (ispresent(m_baseTemplate.a) == true) { + setverdict(pass); + } else { + setverdict(fail); + } + } + + control{ + execute(TC_Sem_1508_TemplateRestrictions_043()); + } +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_044.ttcn b/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_044.ttcn new file mode 100644 index 00000000..96fa9d0c --- /dev/null +++ b/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_044.ttcn @@ -0,0 +1,38 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:15.8, Ensure that template (omit) can be parameter to template(present) + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_1508_TemplateRestrictions_044 { + + type record ExampleType { // Exampletype record integer and a boolean + integer a, + boolean b + } + + type component GeneralComp { + } + + + + template (present) ExampleType m_baseTemplate(template (omit) integer MyintTemplate := 21) :={ + a := MyintTemplate, + b := true + } + + testcase TC_Sem_1508_TemplateRestrictions_044() runs on GeneralComp { + + + if (ispresent(m_baseTemplate.a) == true) { + setverdict(pass); + } else { + setverdict(fail); + } + } + + control{ + execute(TC_Sem_1508_TemplateRestrictions_044()); + } +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_045.ttcn b/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_045.ttcn new file mode 100644 index 00000000..14c92b19 --- /dev/null +++ b/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_045.ttcn @@ -0,0 +1,38 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:15.8, Ensure that unrestricted template can be parameter to template(value) + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_1508_TemplateRestrictions_045 { + + type record ExampleType { // Exampletype record integer and a boolean + integer a, + boolean b + } + + type component GeneralComp { + } + + + + template (value) ExampleType m_baseTemplate(template integer MyintTemplate := 1) :={ + a := MyintTemplate, + b := true + } + + testcase TC_Sem_1508_TemplateRestrictions_045() runs on GeneralComp { + + + if (ispresent(m_baseTemplate.a) == true) { + setverdict(pass); + } else { + setverdict(fail); + } + } + + control{ + execute(TC_Sem_1508_TemplateRestrictions_045()); + } +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_046.ttcn b/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_046.ttcn new file mode 100644 index 00000000..be96222c --- /dev/null +++ b/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_046.ttcn @@ -0,0 +1,38 @@ +/***************************************************************** + ** @author STF 470 (updated by STF 521) + ** @version 0.0.2 + ** @purpose 1:15.8, Ensure that template(present) can be parameter to template(value) + ** @verdict pass reject + *****************************************************************/ + +module Sem_1508_TemplateRestrictions_046 { + + type record ExampleType { // Exampletype record integer and a boolean + integer a, + boolean b + } + + type component GeneralComp { + } + + + + template (value) ExampleType m_baseTemplate(template (present) integer MyintTemplate := ?) :={ + a := MyintTemplate, + b := true + } + + testcase TC_Sem_1508_TemplateRestrictions_046() runs on GeneralComp { + + + if (ispresent(m_baseTemplate.a) == true) { + setverdict(pass); + } else { + setverdict(fail); + } + } + + control{ + execute(TC_Sem_1508_TemplateRestrictions_046()); + } +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_047.ttcn b/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_047.ttcn new file mode 100644 index 00000000..8d450e2f --- /dev/null +++ b/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_047.ttcn @@ -0,0 +1,38 @@ +/***************************************************************** + ** @author STF 470 (updated by STF 521) + ** @version 0.0.2 + ** @purpose 1:15.8, Ensure that template(omit) can be parameter to template(value) + ** @verdict pass reject + *****************************************************************/ + +module Sem_1508_TemplateRestrictions_047 { + + type record ExampleType { // Exampletype record integer and a boolean + integer a, + boolean b + } + + type component GeneralComp { + } + + + + template (value) ExampleType m_baseTemplate(template (omit) integer MyintTemplate := omit) :={ + a := MyintTemplate, + b := true + } + + testcase TC_Sem_1508_TemplateRestrictions_047() runs on GeneralComp { + + + if (ispresent(m_baseTemplate.a) == true) { + setverdict(pass); + } else { + setverdict(fail); + } + } + + control{ + execute(TC_Sem_1508_TemplateRestrictions_047()); + } +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_048.ttcn b/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_048.ttcn new file mode 100644 index 00000000..71b240c5 --- /dev/null +++ b/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_048.ttcn @@ -0,0 +1,38 @@ +/***************************************************************** + ** @author STF 470 (updated by STF 521) + ** @version 0.0.2 + ** @purpose 1:15.8, Ensure that template(present) can be parameter to template(omit) + ** @verdict pass reject + *****************************************************************/ + +module Sem_1508_TemplateRestrictions_048 { + + type record ExampleType { // Exampletype record integer and a boolean + integer a, + boolean b + } + + type component GeneralComp { + } + + + + template (omit) ExampleType m_baseTemplate(template integer MyintTemplate := ?) :={ + a := MyintTemplate, + b := true + } + + testcase TC_Sem_1508_TemplateRestrictions_048() runs on GeneralComp { + + + if (ispresent(m_baseTemplate.a) == true) { + setverdict(pass); + } else { + setverdict(fail); + } + } + + control{ + execute(TC_Sem_1508_TemplateRestrictions_048()); + } +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_049.ttcn b/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_049.ttcn new file mode 100644 index 00000000..4e8ce011 --- /dev/null +++ b/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_049.ttcn @@ -0,0 +1,59 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:15.8, Ensure that decoded content match is allowed for present template restriction + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + + +module Sem_1508_TemplateRestrictions_049 { + + type record MessageType { + hexstring payload + } + + type record Mymessage { + integer field1, + bitstring field2 optional + } + + + type port loopbackPort message{inout MessageType}; + + + type component GeneralComp { + port loopbackPort messagePort + } + + testcase TC_Sem_1508_TemplateRestrictions_049() runs on GeneralComp { + var bitstring v_enc; + var Mymessage v_testMessage; + var MessageType Message; + template (present) MessageType mw_matchingTemplate := { + payload := decmatch Mymessage: {field1:= 10, field2 := '1001'B} + } + + v_testMessage := { + field1 := 10, + field2 := '1001'B + } + + Message.payload := bit2hex(encvalue(v_testMessage)); //encode message to payload + + messagePort.send(Message); //send message + + alt { + [] messagePort.receive(mw_matchingTemplate) { + setverdict(pass); + } + [] messagePort.receive { + setverdict(fail,mw_matchingTemplate); + } + } + } + + control{ + execute(TC_Sem_1508_TemplateRestrictions_049()); + } + +} diff --git a/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_050.ttcn b/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_050.ttcn new file mode 100644 index 00000000..56ca4873 --- /dev/null +++ b/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_050.ttcn @@ -0,0 +1,39 @@ +/*************************************************** + ** @author STF 470 (updated by STF 521) + ** @version 0.0.2 + ** @purpose 1:15.8, ensure that symbols created during template expansion are checked against omit template restriction + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// When referencing elements of templates or templates fields with the value or omit +// restriction, the rules for referencing elements of values are used. + +// Note: +// Older rules (TTCN-3:2014) didn't contain this restriction. This caused the following test +// to end with a dynamic error + +module Sem_1508_TemplateRestrictions_050 { + +type component GeneralComp { } + +type record R { + integer field1, + integer field2 +} + +testcase TC_Sem_1508_TemplateRestrictions_050() runs on GeneralComp { + var omit R v_test := omit; + v_test.field1 := 0; // As the result of expansion, v_test value is { field1 := -, field2 := - } + // After the field assignment it changes to { field1 := 0, field2 := - } + // In the older versions, the result was { field1 := 0, field2 := ? } + // which violated the omit restriction + if (valueof(v_test.field1) == 0 and not isbound(v_test.field2)) { setverdict(pass); } + else { setverdict(fail); } +} + +control{ + execute(TC_Sem_1508_TemplateRestrictions_050()); +} + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_051.ttcn b/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_051.ttcn new file mode 100644 index 00000000..45759253 --- /dev/null +++ b/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_051.ttcn @@ -0,0 +1,44 @@ +/*************************************************** + ** @author STF 470 (updated by STF 521) + ** @version 0.0.2 + ** @purpose 1:15.8, ensure that symbols created during template expansion are checked against value template restriction + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// When referencing elements of templates or templates fields with the value or omit +// restriction, the rules for referencing elements of values are used. + +// Note: +// Older rules (TTCN-3:2014) didn't contain this restriction. This caused the following test +// to end with a dynamic error + +module Sem_1508_TemplateRestrictions_051 { + +type component GeneralComp { } + +type record R { + record + { + integer subfield1, + integer subfield2 + } field1 optional, + integer field2 +} + +testcase TC_Sem_1508_TemplateRestrictions_051() runs on GeneralComp { + var template(value) R v_test := { field1 := omit, field2 := 2 }; + v_test.field1.subfield1 := 0; // As the result of expansion, v_test value is { field1 := { -, - }, field2 := 2 } + // After the field assignment it changes to { field1 := { 0, - }, field2 := 2 } + // In the older versions, the result was { field1 := { 0, ? }, field2 := ? } + // which violated the value restriction + + if (valueof(v_test.field1.subfield1) == 0 and not isbound(v_test.field1.subfield2)) { setverdict(pass); } + else { setverdict(fail); } +} + +control{ + execute(TC_Sem_1508_TemplateRestrictions_051()); +} + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1508_template_restrictions/Syn_1508_TemplateRestrictions_001.ttcn b/ATS/core_language/15_templates/1508_template_restrictions/Syn_1508_TemplateRestrictions_001.ttcn new file mode 100644 index 00000000..ff838aec --- /dev/null +++ b/ATS/core_language/15_templates/1508_template_restrictions/Syn_1508_TemplateRestrictions_001.ttcn @@ -0,0 +1,17 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:15.8, Ensure that template(omit) is accepted with value omitvalue. + ** @verdict pass accept, noexecution + *****************************************************************/ + +module Syn_1508_TemplateRestrictions_001 { + +type record ExampleType { + integer a, + boolean b optional +} + +template(omit) ExampleType exampleOmit := omit; + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1508_template_restrictions/Syn_1508_TemplateRestrictions_002.ttcn b/ATS/core_language/15_templates/1508_template_restrictions/Syn_1508_TemplateRestrictions_002.ttcn new file mode 100644 index 00000000..ac3f2888 --- /dev/null +++ b/ATS/core_language/15_templates/1508_template_restrictions/Syn_1508_TemplateRestrictions_002.ttcn @@ -0,0 +1,17 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:15.8, Ensure that template(omit) is accepted with a concrete value. + ** @verdict pass accept, noexecution + *****************************************************************/ + +module Syn_1508_TemplateRestrictions_002 { + +type record ExampleType { + integer a, + boolean b optional +} + +template(omit) ExampleType exampleOmit := {1, true}; + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1508_template_restrictions/Syn_1508_TemplateRestrictions_003.ttcn b/ATS/core_language/15_templates/1508_template_restrictions/Syn_1508_TemplateRestrictions_003.ttcn new file mode 100644 index 00000000..355de021 --- /dev/null +++ b/ATS/core_language/15_templates/1508_template_restrictions/Syn_1508_TemplateRestrictions_003.ttcn @@ -0,0 +1,17 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:15.8, Ensure that template(value) is accepted with a concrete value. + ** @verdict pass accept, noexecution + *****************************************************************/ + +module Syn_1508_TemplateRestrictions_003 { + +type record ExampleType { + integer a, + boolean b optional +} + +template(value) ExampleType exampleOmit := {1, true}; + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1508_template_restrictions/Syn_1508_TemplateRestrictions_004.ttcn b/ATS/core_language/15_templates/1508_template_restrictions/Syn_1508_TemplateRestrictions_004.ttcn new file mode 100644 index 00000000..8b00217a --- /dev/null +++ b/ATS/core_language/15_templates/1508_template_restrictions/Syn_1508_TemplateRestrictions_004.ttcn @@ -0,0 +1,17 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:15.8, Ensure that template(present) is accepted with a concrete value. + ** @verdict pass accept, noexecution + *****************************************************************/ + +module Syn_1508_TemplateRestrictions_004 { + +type record ExampleType { + integer a, + boolean b optional +} + +template(present) ExampleType exampleOmit := {1, true}; + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1509_match_operation/NOTES b/ATS/core_language/15_templates/1509_match_operation/NOTES new file mode 100644 index 00000000..a3c8564f --- /dev/null +++ b/ATS/core_language/15_templates/1509_match_operation/NOTES @@ -0,0 +1 @@ +- NOTE: This could be extended to cover any kinds of types and wildcards. We keep this simple. \ No newline at end of file diff --git a/ATS/core_language/15_templates/1509_match_operation/NegSem_1509_MatchOperation_001.ttcn b/ATS/core_language/15_templates/1509_match_operation/NegSem_1509_MatchOperation_001.ttcn new file mode 100644 index 00000000..a8eeadf8 --- /dev/null +++ b/ATS/core_language/15_templates/1509_match_operation/NegSem_1509_MatchOperation_001.ttcn @@ -0,0 +1,27 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:15.9, Ensure that the match operation refuses two templates as actual parameters. + ** @verdict pass reject + *****************************************************************/ + +module NegSem_1509_MatchOperation_001 { + +type component GeneralComp { } + +template integer m_lessThan10 := (-infinity..9); +template integer m_second := (-20,-40); + +testcase TC_NegSem_1509_MatchOperation_001() runs on GeneralComp { + if (match(m_second, m_lessThan10)) { // shall fail as both actual parameters refer to templates + setverdict(fail); + } else { + setverdict(pass); + } +} + +control{ + execute(TC_NegSem_1509_MatchOperation_001()); +} + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1509_match_operation/NegSem_1509_MatchOperation_002.ttcn b/ATS/core_language/15_templates/1509_match_operation/NegSem_1509_MatchOperation_002.ttcn new file mode 100644 index 00000000..2ecc4b68 --- /dev/null +++ b/ATS/core_language/15_templates/1509_match_operation/NegSem_1509_MatchOperation_002.ttcn @@ -0,0 +1,32 @@ +/***************************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:15.9, Ensure that the match operation refuses not initialized operands. + ** @verdict pass reject + *****************************************************************/ + +// Restriction b) The operands of the match operation shall be completely initialized. + +module NegSem_1509_MatchOperation_002 { + +type component GeneralComp { } + +template integer m_lessThan10 := (-infinity..9); + +testcase TC_NegSem_1509_MatchOperation_002() runs on GeneralComp { + + var integer v_value; + + + if (match(v_value, m_lessThan10)) { // error: The operands of the match operation shall be completely initialized. + setverdict(pass); + } else { + setverdict(fail); + } +} + +control{ + execute(TC_NegSem_1509_MatchOperation_002()); +} + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1509_match_operation/NegSem_1509_MatchOperation_003.ttcn b/ATS/core_language/15_templates/1509_match_operation/NegSem_1509_MatchOperation_003.ttcn new file mode 100644 index 00000000..f68aa2c2 --- /dev/null +++ b/ATS/core_language/15_templates/1509_match_operation/NegSem_1509_MatchOperation_003.ttcn @@ -0,0 +1,31 @@ +/***************************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:15.9, Ensure that the match operation works correctly with enums. + ** @verdict pass reject + *****************************************************************/ + +module NegSem_1509_MatchOperation_003 { + +type component GeneralComp { } + +type enumerated A_enum { A, B, C, D, E }; +type enumerated B_enum { A, F, G }; + +testcase TC_NegSem_1509_MatchOperation_003() runs on GeneralComp { + + var A_enum v_value := A; + + + if (match(v_value, G)) { // error: different enum type + setverdict(pass); + } else { + setverdict(fail); + } +} + +control{ + execute(TC_NegSem_1509_MatchOperation_003()); +} + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1509_match_operation/Sem_1509_MatchOperation_001.ttcn b/ATS/core_language/15_templates/1509_match_operation/Sem_1509_MatchOperation_001.ttcn new file mode 100644 index 00000000..b027898e --- /dev/null +++ b/ATS/core_language/15_templates/1509_match_operation/Sem_1509_MatchOperation_001.ttcn @@ -0,0 +1,28 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:15.9, Ensure that the match operation works as expected on a template with range restriction when the tested value is inside the range. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_1509_MatchOperation_001 { + +type component GeneralComp { } + +template integer m_lessThan10 := (-infinity..9); + +testcase TC_Sem_1509_MatchOperation_001() runs on GeneralComp { + var integer v_value := -20; + + if (match(v_value, m_lessThan10)) { + setverdict(pass); + } else { + setverdict(fail); + } +} + +control{ + execute(TC_Sem_1509_MatchOperation_001()); +} + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1509_match_operation/Sem_1509_MatchOperation_002.ttcn b/ATS/core_language/15_templates/1509_match_operation/Sem_1509_MatchOperation_002.ttcn new file mode 100644 index 00000000..c83109c2 --- /dev/null +++ b/ATS/core_language/15_templates/1509_match_operation/Sem_1509_MatchOperation_002.ttcn @@ -0,0 +1,28 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:15.9, Ensure that the match operation works as expected on a template with range restriction when the tested value is outside the range. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_1509_MatchOperation_002 { + +type component GeneralComp { } + +template integer m_lessThan10 := (-infinity..9); + +testcase TC_Sem_1509_MatchOperation_002() runs on GeneralComp { + var integer v_value := 20; + + if (match(v_value, m_lessThan10)) { + setverdict(fail); + } else { + setverdict(pass); + } +} + +control{ + execute(TC_Sem_1509_MatchOperation_002()); +} + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1509_match_operation/Sem_1509_MatchOperation_003.ttcn b/ATS/core_language/15_templates/1509_match_operation/Sem_1509_MatchOperation_003.ttcn new file mode 100644 index 00000000..a4f71b06 --- /dev/null +++ b/ATS/core_language/15_templates/1509_match_operation/Sem_1509_MatchOperation_003.ttcn @@ -0,0 +1,39 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:15.9, Ensure that the match operation works correctly on records in the positive case. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_1509_MatchOperation_003 { + +type component GeneralComp { } + +type record MyRecord { + charstring field1, + boolean field2 +} + +template MyRecord m_receiveTemplate := { + field1 := pattern "ab*de", + field2 := ? +} + +testcase TC_Sem_1509_MatchOperation_003() runs on GeneralComp { + var MyRecord v_value := { + field1 := "abcde", + field2 := true + } + + if (match(v_value, m_receiveTemplate)) { + setverdict(pass); + } else { + setverdict(fail); + } +} + +control{ + execute(TC_Sem_1509_MatchOperation_003()); +} + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1509_match_operation/Sem_1509_MatchOperation_004.ttcn b/ATS/core_language/15_templates/1509_match_operation/Sem_1509_MatchOperation_004.ttcn new file mode 100644 index 00000000..2c0dcedb --- /dev/null +++ b/ATS/core_language/15_templates/1509_match_operation/Sem_1509_MatchOperation_004.ttcn @@ -0,0 +1,39 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:15.9, Ensure that the match operation works correctly on records in the negative case. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_1509_MatchOperation_004 { + +type component GeneralComp { } + +type record MyRecord { + charstring field1, + boolean field2 +} + +template MyRecord m_receiveTemplate := { + field1 := "ab*de", + field2 := ? +} + +testcase TC_Sem_1509_MatchOperation_004() runs on GeneralComp { + var MyRecord v_value := { + field1 := "abc", + field2 := true + } + + if (match(v_value, m_receiveTemplate)) { + setverdict(fail); + } else { + setverdict(pass); + } +} + +control{ + execute(TC_Sem_1509_MatchOperation_004()); +} + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1509_match_operation/Sem_1509_MatchOperation_006.ttcn b/ATS/core_language/15_templates/1509_match_operation/Sem_1509_MatchOperation_006.ttcn new file mode 100644 index 00000000..550220d0 --- /dev/null +++ b/ATS/core_language/15_templates/1509_match_operation/Sem_1509_MatchOperation_006.ttcn @@ -0,0 +1,39 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:15.9, Ensure that the match operation works correctly on records with optional fields in the positive case. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_1509_MatchOperation_006 { + +type component GeneralComp { } + +type record MyRecord { + charstring field1, + boolean field2 optional +} + +template MyRecord mw_receiveTemplate := { + field1 := pattern "ab*de", + field2 := * +} + +testcase TC_Sem_1509_MatchOperation_006() runs on GeneralComp { + var MyRecord v_value := { + field1 := "abcde", + field2 := omit + } + + if (match(v_value, mw_receiveTemplate)) { + setverdict(pass); + } else { + setverdict(fail); + } +} + +control{ + execute(TC_Sem_1509_MatchOperation_006()); +} + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1509_match_operation/Sem_1509_MatchOperation_007.ttcn b/ATS/core_language/15_templates/1509_match_operation/Sem_1509_MatchOperation_007.ttcn new file mode 100644 index 00000000..329478c5 --- /dev/null +++ b/ATS/core_language/15_templates/1509_match_operation/Sem_1509_MatchOperation_007.ttcn @@ -0,0 +1,39 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:15.9, Ensure that the match operation works correctly on sets in the positive case. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_1509_MatchOperation_007 { + +type component GeneralComp { } + +type set MySet { + charstring field1, + boolean field2 +} + +template MySet mw_receiveTemplate := { + field1 := pattern "ab*de", + field2 := ? +} + +testcase TC_Sem_1509_MatchOperation_007() runs on GeneralComp { + var MySet v_value := { + field1 := "abcde", + field2 := true + } + + if (match(v_value, mw_receiveTemplate)) { + setverdict(pass); + } else { + setverdict(fail); + } +} + +control{ + execute(TC_Sem_1509_MatchOperation_007()); +} + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1509_match_operation/Sem_1509_MatchOperation_008.ttcn b/ATS/core_language/15_templates/1509_match_operation/Sem_1509_MatchOperation_008.ttcn new file mode 100644 index 00000000..38d87c89 --- /dev/null +++ b/ATS/core_language/15_templates/1509_match_operation/Sem_1509_MatchOperation_008.ttcn @@ -0,0 +1,39 @@ +/***************************************************************** + ** @author STF 470 (updated by STF 521) + ** @version 0.0.2 + ** @purpose 1:15.9, Ensure that the match operation works correctly on sets in the negative case. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_1509_MatchOperation_008 { + +type component GeneralComp { } + +type set MySet { + charstring field1, + boolean field2 +} + +template MySet mw_receiveTemplate := { + field1 := "ab*de", + field2 := ? +} + +testcase TC_Sem_1509_MatchOperation_008() runs on GeneralComp { + var MySet v_value := { + field1 := "abc", + field2 := true + } + + if (match(v_value, mw_receiveTemplate)) { + setverdict(fail); + } else { + setverdict(pass); + } +} + +control{ + execute(TC_Sem_1509_MatchOperation_008()); +} + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1509_match_operation/Sem_1509_MatchOperation_010.ttcn b/ATS/core_language/15_templates/1509_match_operation/Sem_1509_MatchOperation_010.ttcn new file mode 100644 index 00000000..f55a6b9c --- /dev/null +++ b/ATS/core_language/15_templates/1509_match_operation/Sem_1509_MatchOperation_010.ttcn @@ -0,0 +1,39 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:15.9, Ensure that the match operation works correctly on sets with optional fields in the positive case. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_1509_MatchOperation_010 { + +type component GeneralComp { } + +type set MySet { + charstring field1, + boolean field2 optional +} + +template MySet mw_receiveTemplate := { + field1 := pattern "ab*de", + field2 := * +} + +testcase TC_Sem_1509_MatchOperation_010() runs on GeneralComp { + var MySet v_value := { + field1 := "abcde", + field2 := omit + } + + if (match(v_value, mw_receiveTemplate)) { + setverdict(pass); + } else { + setverdict(fail); + } +} + +control{ + execute(TC_Sem_1509_MatchOperation_010()); +} + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1509_match_operation/Sem_1509_MatchOperation_011.ttcn b/ATS/core_language/15_templates/1509_match_operation/Sem_1509_MatchOperation_011.ttcn new file mode 100644 index 00000000..ea82c1ed --- /dev/null +++ b/ATS/core_language/15_templates/1509_match_operation/Sem_1509_MatchOperation_011.ttcn @@ -0,0 +1,39 @@ +/***************************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:15.9, Ensure that matching a value expression against a template instance which evaluates to the omit matching mechanism shall return false. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_1509_MatchOperation_011 { + +type component GeneralComp { } + +type set MySet { + charstring field1, + boolean field2 optional +} + +template MySet mw_receiveTemplate := { + field1 := pattern "ab*de", + field2 := omit +} + +testcase TC_Sem_1509_MatchOperation_011() runs on GeneralComp { + var MySet v_value := { + field1 := "abcde", + field2 := true + } + + if (match(v_value, mw_receiveTemplate)) { + setverdict(fail); + } else { + setverdict(pass); + } +} + +control{ + execute(TC_Sem_1509_MatchOperation_011()); +} + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1509_match_operation/Sem_1509_MatchOperation_012.ttcn b/ATS/core_language/15_templates/1509_match_operation/Sem_1509_MatchOperation_012.ttcn new file mode 100644 index 00000000..c9abfd25 --- /dev/null +++ b/ATS/core_language/15_templates/1509_match_operation/Sem_1509_MatchOperation_012.ttcn @@ -0,0 +1,30 @@ +/***************************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:15.9, Ensure that if the expression-parameter evaluates to a literal value without explicit or implicit identification of its type, the type of the template instance-parameter shall be used as the type governor for the expression-parameter. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// Restriction C: If the expression-parameter evaluates to a literal value without explicit or implicit identification of its type, the type of the template instance-parameter shall be used as the type governor for the expression-parameter. + + +module Sem_1509_MatchOperation_012 { + +type component GeneralComp { } + +template integer m_lessThan10 := (-infinity..9); + +testcase TC_Sem_1509_MatchOperation_012() runs on GeneralComp { + + if (match(-20, m_lessThan10)) { + setverdict(pass); + } else { + setverdict(fail); + } +} + +control{ + execute(TC_Sem_1509_MatchOperation_012()); +} + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1509_match_operation/Sem_1509_MatchOperation_013.ttcn b/ATS/core_language/15_templates/1509_match_operation/Sem_1509_MatchOperation_013.ttcn new file mode 100644 index 00000000..23382b7b --- /dev/null +++ b/ATS/core_language/15_templates/1509_match_operation/Sem_1509_MatchOperation_013.ttcn @@ -0,0 +1,30 @@ +/***************************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:15.9, Ensure that if the expression-parameter evaluates to a literal value without explicit or implicit identification of its type, the type of the template instance-parameter shall be used as the type governor for the expression-parameter. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// Restriction C: If the expression-parameter evaluates to a literal value without explicit or implicit identification of its type, the type of the template instance-parameter shall be used as the type governor for the expression-parameter. + + +module Sem_1509_MatchOperation_013 { + +type component GeneralComp { } + +const integer c_value := 1; + +testcase TC_Sem_1509_MatchOperation_013() runs on GeneralComp { + + if (match(c_value,*)) { + setverdict(pass); + } else { + setverdict(fail); + } +} + +control{ + execute(TC_Sem_1509_MatchOperation_013()); +} + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1509_match_operation/Sem_1509_MatchOperation_014.ttcn b/ATS/core_language/15_templates/1509_match_operation/Sem_1509_MatchOperation_014.ttcn new file mode 100644 index 00000000..3472a035 --- /dev/null +++ b/ATS/core_language/15_templates/1509_match_operation/Sem_1509_MatchOperation_014.ttcn @@ -0,0 +1,31 @@ +/***************************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:15.9, Ensure that the match operation works correctly with enums. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_1509_MatchOperation_014 { + +type component GeneralComp { } + +type enumerated A_enum { A, B, C, D, E }; +type enumerated B_enum { A, F, G }; + +testcase TC_Sem_1509_MatchOperation_014() runs on GeneralComp { + + var A_enum v_value := A; + + + if (match(v_value, B_enum:G)) { + setverdict(fail); + } else { + setverdict(pass); + } +} + +control{ + execute(TC_Sem_1509_MatchOperation_014()); +} + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1509_match_operation/Sem_1509_MatchOperation_015.ttcn b/ATS/core_language/15_templates/1509_match_operation/Sem_1509_MatchOperation_015.ttcn new file mode 100644 index 00000000..bd96ceaf --- /dev/null +++ b/ATS/core_language/15_templates/1509_match_operation/Sem_1509_MatchOperation_015.ttcn @@ -0,0 +1,31 @@ +/***************************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:15.9, Ensure that the match operation works correctly with enums. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_1509_MatchOperation_015 { + +type component GeneralComp { } + +type enumerated A_enum { A, B, C, D, E }; +type enumerated B_enum { A, F, G }; + +testcase TC_Sem_1509_MatchOperation_015() runs on GeneralComp { + + var A_enum v_value := A; + + + if (match(A,v_value)) { + setverdict(pass); + } else { + setverdict(fail); + } +} + +control{ + execute(TC_Sem_1509_MatchOperation_015()); +} + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1509_match_operation/Sem_1509_MatchOperation_016.ttcn b/ATS/core_language/15_templates/1509_match_operation/Sem_1509_MatchOperation_016.ttcn new file mode 100644 index 00000000..9aaf8669 --- /dev/null +++ b/ATS/core_language/15_templates/1509_match_operation/Sem_1509_MatchOperation_016.ttcn @@ -0,0 +1,31 @@ +/***************************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:15.9, Ensure that the match operation works correctly with enums. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_1509_MatchOperation_016 { + +type component GeneralComp { } + +type enumerated A_enum { A, B, C, D, E }; +type enumerated B_enum { A, F, G }; + +testcase TC_Sem_1509_MatchOperation_016() runs on GeneralComp { + + var A_enum v_value := A; + + + if (match(B,v_value)) { + setverdict(fail); + } else { + setverdict(pass); + } +} + +control{ + execute(TC_Sem_1509_MatchOperation_016()); +} + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1510_valueof_operation/NOTES b/ATS/core_language/15_templates/1510_valueof_operation/NOTES new file mode 100644 index 00000000..f1ddf69e --- /dev/null +++ b/ATS/core_language/15_templates/1510_valueof_operation/NOTES @@ -0,0 +1 @@ +- NOTE: This could be extended to cover any kinds of types etc. We keep this simple. \ No newline at end of file diff --git a/ATS/core_language/15_templates/1510_valueof_operation/NegSem_1510_ValueOfOperation_001.ttcn b/ATS/core_language/15_templates/1510_valueof_operation/NegSem_1510_ValueOfOperation_001.ttcn new file mode 100644 index 00000000..4a50103a --- /dev/null +++ b/ATS/core_language/15_templates/1510_valueof_operation/NegSem_1510_ValueOfOperation_001.ttcn @@ -0,0 +1,25 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:15.10, Ensure that the valueof function works correctly on omit. + ** @verdict pass reject + *****************************************************************/ + +module NegSem_1510_ValueOfOperation_001 { + +type component GeneralComp { } + +testcase TC_NegSem_1510_ValueOfOperation_001() runs on GeneralComp { + var template integer m_int := omit; + var integer v_int := valueof(m_int); + + // if we get here, something must be wrong as valueof on m_int shall cause an error + // due to the omit. + setverdict(fail); +} + +control{ + execute(TC_NegSem_1510_ValueOfOperation_001()); +} + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1510_valueof_operation/NegSem_1510_ValueOfOperation_002.ttcn b/ATS/core_language/15_templates/1510_valueof_operation/NegSem_1510_ValueOfOperation_002.ttcn new file mode 100644 index 00000000..0cd54aa3 --- /dev/null +++ b/ATS/core_language/15_templates/1510_valueof_operation/NegSem_1510_ValueOfOperation_002.ttcn @@ -0,0 +1,34 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:15.10, Ensure that the valueof function works correctly on templates with wildcards. + ** @verdict pass reject + *****************************************************************/ + +module NegSem_1510_ValueOfOperation_002 { + +type component GeneralComp { } + +type record ExampleType { + integer field1, + boolean field2 +} + +template ExampleType m_template := { + field1 := *, + field2 := ? +} + +testcase TC_NegSem_1510_ValueOfOperation_002() runs on GeneralComp { + var ExampleType v_int := valueof(m_template); + + // if we get here, something must be wrong as valueof on m_template shall cause an error + // due to the * and ? wildcards. + setverdict(fail); +} + +control{ + execute(TC_NegSem_1510_ValueOfOperation_002()); +} + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1510_valueof_operation/NegSem_1510_ValueOfOperation_003.ttcn b/ATS/core_language/15_templates/1510_valueof_operation/NegSem_1510_ValueOfOperation_003.ttcn new file mode 100644 index 00000000..1be285b3 --- /dev/null +++ b/ATS/core_language/15_templates/1510_valueof_operation/NegSem_1510_ValueOfOperation_003.ttcn @@ -0,0 +1,33 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:15.10, Ensure that the valueof function works correctly on regular value templates. + ** @verdict pass reject + *****************************************************************/ + +module NegSem_1510_ValueOfOperation_003 { + +type component GeneralComp { } + +type record ExampleType { + integer field1, + boolean field2 +} + +testcase TC_NegSem_1510_ValueOfOperation_003() runs on GeneralComp { + var template ExampleType f_first := { + field1 := (1, 2), + field2 := true + }; + + var ExampleType v_second := valueof(f_first); + + // if we get here, something must be wrong as valueof on m_template shall cause an error + setverdict(fail); +} + +control{ + execute(TC_NegSem_1510_ValueOfOperation_003()); +} + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1510_valueof_operation/NegSem_1510_ValueOfOperation_004.ttcn b/ATS/core_language/15_templates/1510_valueof_operation/NegSem_1510_ValueOfOperation_004.ttcn new file mode 100644 index 00000000..06fad54d --- /dev/null +++ b/ATS/core_language/15_templates/1510_valueof_operation/NegSem_1510_ValueOfOperation_004.ttcn @@ -0,0 +1,26 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:15.10, Ensure that the valueof function works correctly on range templates. + ** @verdict pass reject + *****************************************************************/ + +module NegSem_1510_ValueOfOperation_004 { + +type component GeneralComp { } + +testcase TC_NegSem_1510_ValueOfOperation_004() runs on GeneralComp { + var template integer v_test := (1..5); + + var integer v_second := valueof(v_test); + + // if we get here, something must be wrong as valueof on v_test shall cause an error + // as it is not a template. + setverdict(fail); +} + +control{ + execute(TC_NegSem_1510_ValueOfOperation_004()); +} + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1510_valueof_operation/NegSem_1510_ValueOfOperation_005.ttcn b/ATS/core_language/15_templates/1510_valueof_operation/NegSem_1510_ValueOfOperation_005.ttcn new file mode 100644 index 00000000..a072eab7 --- /dev/null +++ b/ATS/core_language/15_templates/1510_valueof_operation/NegSem_1510_ValueOfOperation_005.ttcn @@ -0,0 +1,29 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:15.10, check that runtime error occurs if valueof is applied to uninitialized template + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// The template shall be completely initialized and resolve to a specific value. + +module NegSem_1510_ValueOfOperation_005 { + +type component GeneralComp { } + +testcase TC_NegSem_1510_ValueOfOperation_005() runs on GeneralComp { + var template integer v_test; + + var integer v_second := valueof(v_test); + + // if we get here, something must be wrong as valueof on v_test shall cause an error + // as it is not a template. + setverdict(fail); +} + +control{ + execute(TC_NegSem_1510_ValueOfOperation_005()); +} + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1510_valueof_operation/NegSem_1510_ValueOfOperation_006.ttcn b/ATS/core_language/15_templates/1510_valueof_operation/NegSem_1510_ValueOfOperation_006.ttcn new file mode 100644 index 00000000..26ec3cc7 --- /dev/null +++ b/ATS/core_language/15_templates/1510_valueof_operation/NegSem_1510_ValueOfOperation_006.ttcn @@ -0,0 +1,35 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:15.10, check that runtime error occurs if valueof is applied to partially initialized template + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// The template shall be completely initialized and resolve to a specific value. + +module NegSem_1510_ValueOfOperation_006 { + +type component GeneralComp { } + +type record R { + integer field1, + integer field2 +} + +testcase TC_NegSem_1510_ValueOfOperation_006() runs on GeneralComp { + var template R v_test; + var R v_result; + v_test.field1 := 1; // field2 is left uninitialized + v_result := valueof(v_test); + + // if we get here, something must be wrong as valueof on v_test shall cause an error + // as it is not a template. + setverdict(fail); +} + +control{ + execute(TC_NegSem_1510_ValueOfOperation_006()); +} + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1510_valueof_operation/Sem_1510_ValueOfOperation_001.ttcn b/ATS/core_language/15_templates/1510_valueof_operation/Sem_1510_ValueOfOperation_001.ttcn new file mode 100644 index 00000000..72508240 --- /dev/null +++ b/ATS/core_language/15_templates/1510_valueof_operation/Sem_1510_ValueOfOperation_001.ttcn @@ -0,0 +1,38 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:15.10, Ensure that the valueof operation works as expected for fully initialized templates. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_1510_ValueOfOperation_001 { + +type component GeneralComp { } + +type record ExampleType { + integer field1, + boolean field2 +} + +template ExampleType m_template := { + field1 := 1, + field2 := true +} + +testcase TC_Sem_1510_ValueOfOperation_001() runs on GeneralComp { + var ExampleType v_value := valueof(m_template); + + if (match(v_value.field1, 1) and + match(v_value.field2, true) + ) { + setverdict(pass); + } else { + setverdict(fail); + } +} + +control{ + execute(TC_Sem_1510_ValueOfOperation_001()); +} + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1511_concatenating_templates_of_string_and_list_types/NegSem_1511_ConcatenatingTemplatesOfStringAndListTypes_001.ttcn b/ATS/core_language/15_templates/1511_concatenating_templates_of_string_and_list_types/NegSem_1511_ConcatenatingTemplatesOfStringAndListTypes_001.ttcn new file mode 100644 index 00000000..067e60fb --- /dev/null +++ b/ATS/core_language/15_templates/1511_concatenating_templates_of_string_and_list_types/NegSem_1511_ConcatenatingTemplatesOfStringAndListTypes_001.ttcn @@ -0,0 +1,24 @@ +/***************************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:15.11, Ensure that concatenation of octetstring types yields an even number of digits. + ** @verdict pass reject + *****************************************************************/ +//Note: see CR5805 regarding corresponding BNF update + +module NegSem_1511_ConcatenatingTemplatesOfStringAndListTypes_001 { + +type component GeneralComp { } + +testcase TC_NegSem_1511_ConcatenatingTemplatesOfStringAndListTypes_001() runs on GeneralComp { + var template octetstring v_str := 'ABCD'O & '?'O & '?E'O; + + // shall cause an error as it would denote 9 (i.e., uneven) number of digits + setverdict(fail); +} + +control{ + execute(TC_NegSem_1511_ConcatenatingTemplatesOfStringAndListTypes_001()); +} + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1511_concatenating_templates_of_string_and_list_types/NegSem_1511_ConcatenatingTemplatesOfStringAndListTypes_002.ttcn b/ATS/core_language/15_templates/1511_concatenating_templates_of_string_and_list_types/NegSem_1511_ConcatenatingTemplatesOfStringAndListTypes_002.ttcn new file mode 100644 index 00000000..6bb80eab --- /dev/null +++ b/ATS/core_language/15_templates/1511_concatenating_templates_of_string_and_list_types/NegSem_1511_ConcatenatingTemplatesOfStringAndListTypes_002.ttcn @@ -0,0 +1,24 @@ +/***************************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:15.11, Ensure that concatenation of strings types yields an error if specified ranges are not fixed length. + ** @verdict pass reject + *****************************************************************/ +//Note: see CR5805 regarding corresponding BNF update + +module NegSem_1511_ConcatenatingTemplatesOfStringAndListTypes_002 { + +type component GeneralComp { } + +testcase TC_NegSem_1511_ConcatenatingTemplatesOfStringAndListTypes_002() runs on GeneralComp { + var template octetstring v_str := 'ABCD'O & * length(1..2) & pattern 'EE?FF'; + + // shall cause an error as the length attribute should be of fixed length + setverdict(fail); +} + +control{ + execute(TC_NegSem_1511_ConcatenatingTemplatesOfStringAndListTypes_002()); +} + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1511_concatenating_templates_of_string_and_list_types/NegSem_1511_ConcatenatingTemplatesOfStringAndListTypes_003.ttcn b/ATS/core_language/15_templates/1511_concatenating_templates_of_string_and_list_types/NegSem_1511_ConcatenatingTemplatesOfStringAndListTypes_003.ttcn new file mode 100644 index 00000000..c0044636 --- /dev/null +++ b/ATS/core_language/15_templates/1511_concatenating_templates_of_string_and_list_types/NegSem_1511_ConcatenatingTemplatesOfStringAndListTypes_003.ttcn @@ -0,0 +1,24 @@ +/***************************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:15.11, Ensure that a simple concatenation of non-wildcard octetstring must not yield in a non-even number of hexadecimals. + ** @verdict pass reject + *****************************************************************/ +//Note: see CR5805 regarding corresponding BNF update + +module NegSem_1511_ConcatenatingTemplatesOfStringAndListTypes_003 { + +type component GeneralComp { } + +testcase TC_NegSem_1511_ConcatenatingTemplatesOfStringAndListTypes_003() runs on GeneralComp { + var template octetstring v_str := 'AB'O & '0F'O & '2A'O & 'F'O; + + // shall cause an error as the length of the concantenated octetstring is is uneven + setverdict(fail); +} + +control{ + execute(TC_NegSem_1511_ConcatenatingTemplatesOfStringAndListTypes_003()); +} + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1511_concatenating_templates_of_string_and_list_types/NegSem_1511_ConcatenatingTemplatesOfStringAndListTypes_004.ttcn b/ATS/core_language/15_templates/1511_concatenating_templates_of_string_and_list_types/NegSem_1511_ConcatenatingTemplatesOfStringAndListTypes_004.ttcn new file mode 100644 index 00000000..78730884 --- /dev/null +++ b/ATS/core_language/15_templates/1511_concatenating_templates_of_string_and_list_types/NegSem_1511_ConcatenatingTemplatesOfStringAndListTypes_004.ttcn @@ -0,0 +1,39 @@ +/***************************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:15.11, Ensure that the inline template definitions are correctly concatenated. + ** @verdict pass reject + *****************************************************************/ + +module NegSem_1511_ConcatenatingTemplatesOfStringAndListTypes_004 { + +type component GeneralComp { } + +type record MyRecord { + charstring field1, + charstring field2 +} + +template MyRecord m_receiveTemplate := { + field1 := pattern "AB*DE", + field2 := "ABCC" & * & "EF" //only specific values allowed when there is no pattern keyword +} + +testcase TC_NegSem_1511_ConcatenatingTemplatesOfStringAndListTypes_004() runs on GeneralComp { + var MyRecord v_value := { + field1 := "AB*DE", + field2 := "ABCCDE*EF" + } + + if (match(v_value, m_receiveTemplate)) { + setverdict(pass); + } else { + setverdict(fail); + } +} + +control{ + execute(TC_NegSem_1511_ConcatenatingTemplatesOfStringAndListTypes_004()); +} + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1511_concatenating_templates_of_string_and_list_types/NegSem_1511_ConcatenatingTemplatesOfStringAndListTypes_005.ttcn b/ATS/core_language/15_templates/1511_concatenating_templates_of_string_and_list_types/NegSem_1511_ConcatenatingTemplatesOfStringAndListTypes_005.ttcn new file mode 100644 index 00000000..62cc7040 --- /dev/null +++ b/ATS/core_language/15_templates/1511_concatenating_templates_of_string_and_list_types/NegSem_1511_ConcatenatingTemplatesOfStringAndListTypes_005.ttcn @@ -0,0 +1,39 @@ +/***************************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:15.11, Ensure that the inline template definitions are correctly concatenated. + ** @verdict pass reject + *****************************************************************/ + +module NegSem_1511_ConcatenatingTemplatesOfStringAndListTypes_005 { + +type component GeneralComp { } + +type record MyRecord { + charstring field1, + charstring field2 +} + +template MyRecord m_receiveTemplate := { + field1 := pattern "AB*DE", + field2 := pattern "ABCC" & * length(2) & "EF" //cannot use length(n) attribute on charstring pattern +} + +testcase TC_NegSem_1511_ConcatenatingTemplatesOfStringAndListTypes_005() runs on GeneralComp { + var MyRecord v_value := { + field1 := "AB*DE", + field2 := "ABCCDE*EF" + } + + if (match(v_value, m_receiveTemplate)) { + setverdict(pass); + } else { + setverdict(fail); + } +} + +control{ + execute(TC_NegSem_1511_ConcatenatingTemplatesOfStringAndListTypes_005()); +} + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1511_concatenating_templates_of_string_and_list_types/NegSem_1511_ConcatenatingTemplatesOfStringAndListTypes_006.ttcn b/ATS/core_language/15_templates/1511_concatenating_templates_of_string_and_list_types/NegSem_1511_ConcatenatingTemplatesOfStringAndListTypes_006.ttcn new file mode 100644 index 00000000..2f825232 --- /dev/null +++ b/ATS/core_language/15_templates/1511_concatenating_templates_of_string_and_list_types/NegSem_1511_ConcatenatingTemplatesOfStringAndListTypes_006.ttcn @@ -0,0 +1,25 @@ +/***************************************************************** + ** @author STF 451 + ** @version 0.0.1 + ** @purpose 1:15.11, Ensure that concatenation of octetstring types and ? patterns works as expected. + ** @verdict pass reject + *****************************************************************/ + +module NegSem_1511_ConcatenatingTemplatesOfStringAndListTypes_006 { + +type component GeneralComp { } + +testcase TC_NegSem_1511_ConcatenatingTemplatesOfStringAndListTypes_006() runs on GeneralComp { + var template octetstring v_myString1 := 'ABCD'O & ? length(2) length (6); //missing parenthesis + if (match('ABCD12'O, v_myString1)) { + setverdict(pass); + } else { + setverdict(fail); + } +} + +control{ + execute(TC_NegSem_1511_ConcatenatingTemplatesOfStringAndListTypes_006()); +} + +} diff --git a/ATS/core_language/15_templates/1511_concatenating_templates_of_string_and_list_types/Sem_1511_ConcatenatingTemplatesOfStringAndListTypes_001.ttcn b/ATS/core_language/15_templates/1511_concatenating_templates_of_string_and_list_types/Sem_1511_ConcatenatingTemplatesOfStringAndListTypes_001.ttcn new file mode 100644 index 00000000..d8346e70 --- /dev/null +++ b/ATS/core_language/15_templates/1511_concatenating_templates_of_string_and_list_types/Sem_1511_ConcatenatingTemplatesOfStringAndListTypes_001.ttcn @@ -0,0 +1,26 @@ +/***************************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:15.11, Ensure that concatenation of charstring types works as expected (variant 1). + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +//Note: see CR5805 regarding corresponding BNF update + +module Sem_1511_ConcatenatingTemplatesOfStringAndListTypes_001 { + +type component GeneralComp { } + +testcase TC_Sem_1511_ConcatenatingTemplatesOfStringAndListTypes_001() runs on GeneralComp { + var template charstring v_myChar1 := pattern "ABC" & "D" & "*" & "E?F"; + if (match("ABCD2E1F", v_myChar1)) { + setverdict(pass); + } else { + setverdict(fail); + } +} + +control{ + execute(TC_Sem_1511_ConcatenatingTemplatesOfStringAndListTypes_001()); +} + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1511_concatenating_templates_of_string_and_list_types/Sem_1511_ConcatenatingTemplatesOfStringAndListTypes_002.ttcn b/ATS/core_language/15_templates/1511_concatenating_templates_of_string_and_list_types/Sem_1511_ConcatenatingTemplatesOfStringAndListTypes_002.ttcn new file mode 100644 index 00000000..74d39f00 --- /dev/null +++ b/ATS/core_language/15_templates/1511_concatenating_templates_of_string_and_list_types/Sem_1511_ConcatenatingTemplatesOfStringAndListTypes_002.ttcn @@ -0,0 +1,26 @@ +/***************************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:15.11, Ensure that concatenation of octetstring types works as expected (variant 2). + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +//Note: see CR5805 regarding corresponding BNF update + +module Sem_1511_ConcatenatingTemplatesOfStringAndListTypes_002 { + +type component GeneralComp { } + +testcase TC_Sem_1511_ConcatenatingTemplatesOfStringAndListTypes_002() runs on GeneralComp { + var template octetstring v_myString1 := 'ABCC'O & * length(1) & 'EF'O; + if (match('ABCC22EF'O,v_myString1)) { + setverdict(pass); + } else { + setverdict(fail); + } +} + +control{ + execute(TC_Sem_1511_ConcatenatingTemplatesOfStringAndListTypes_002()); +} + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1511_concatenating_templates_of_string_and_list_types/Sem_1511_ConcatenatingTemplatesOfStringAndListTypes_003.ttcn b/ATS/core_language/15_templates/1511_concatenating_templates_of_string_and_list_types/Sem_1511_ConcatenatingTemplatesOfStringAndListTypes_003.ttcn new file mode 100644 index 00000000..ce97f66d --- /dev/null +++ b/ATS/core_language/15_templates/1511_concatenating_templates_of_string_and_list_types/Sem_1511_ConcatenatingTemplatesOfStringAndListTypes_003.ttcn @@ -0,0 +1,27 @@ +/***************************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:15.11, Ensure that concatenation of bitstring types works as expected. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +//Note: see CR5805 regarding corresponding BNF update + +module Sem_1511_ConcatenatingTemplatesOfStringAndListTypes_003 { + +type component GeneralComp { } + +testcase TC_Sem_1511_ConcatenatingTemplatesOfStringAndListTypes_003() runs on GeneralComp { + var template bitstring v_myBitStr := '010'B & '*'B & '1?1'B; + + if (match('010010101101'B, v_myBitStr)) { + setverdict(pass); + } else { + setverdict(fail); + } +} + +control{ + execute(TC_Sem_1511_ConcatenatingTemplatesOfStringAndListTypes_003()); +} + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1511_concatenating_templates_of_string_and_list_types/Sem_1511_ConcatenatingTemplatesOfStringAndListTypes_004.ttcn b/ATS/core_language/15_templates/1511_concatenating_templates_of_string_and_list_types/Sem_1511_ConcatenatingTemplatesOfStringAndListTypes_004.ttcn new file mode 100644 index 00000000..3abf3259 --- /dev/null +++ b/ATS/core_language/15_templates/1511_concatenating_templates_of_string_and_list_types/Sem_1511_ConcatenatingTemplatesOfStringAndListTypes_004.ttcn @@ -0,0 +1,27 @@ +/***************************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:15.11, Ensure that concatenation of octetstring types works as expected (variant 1). + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +//Note: see CR5805 regarding corresponding BNF update + +module Sem_1511_ConcatenatingTemplatesOfStringAndListTypes_004 { + +type component GeneralComp { } + +testcase TC_Sem_1511_ConcatenatingTemplatesOfStringAndListTypes_004() runs on GeneralComp { + var template octetstring v_str := 'ABCD'O & 'AB*'O & 'EF'O; + + if (match('ABCDABEF'O, v_str)) { //matching not present values + setverdict(pass); + } else { + setverdict(fail); + } +} + +control{ + execute(TC_Sem_1511_ConcatenatingTemplatesOfStringAndListTypes_004()); +} + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1511_concatenating_templates_of_string_and_list_types/Sem_1511_ConcatenatingTemplatesOfStringAndListTypes_005.ttcn b/ATS/core_language/15_templates/1511_concatenating_templates_of_string_and_list_types/Sem_1511_ConcatenatingTemplatesOfStringAndListTypes_005.ttcn new file mode 100644 index 00000000..17de02df --- /dev/null +++ b/ATS/core_language/15_templates/1511_concatenating_templates_of_string_and_list_types/Sem_1511_ConcatenatingTemplatesOfStringAndListTypes_005.ttcn @@ -0,0 +1,27 @@ +/***************************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:15.11, Ensure that concatenation of octetstring types works as expected (variant 2). + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +//Note: see CR5805 regarding corresponding BNF update + +module Sem_1511_ConcatenatingTemplatesOfStringAndListTypes_005 { + +type component GeneralComp { } + +testcase TC_Sem_1511_ConcatenatingTemplatesOfStringAndListTypes_005() runs on GeneralComp { + var template octetstring v_template := 'ABCD'O & '??'O & 'EF'O; + + if (match('ABCDAABBEF'O, v_template)) { + setverdict(pass); + } else { + setverdict(fail); + } +} + +control{ + execute(TC_Sem_1511_ConcatenatingTemplatesOfStringAndListTypes_005()); +} + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1511_concatenating_templates_of_string_and_list_types/Sem_1511_ConcatenatingTemplatesOfStringAndListTypes_006.ttcn b/ATS/core_language/15_templates/1511_concatenating_templates_of_string_and_list_types/Sem_1511_ConcatenatingTemplatesOfStringAndListTypes_006.ttcn new file mode 100644 index 00000000..b70c7df5 --- /dev/null +++ b/ATS/core_language/15_templates/1511_concatenating_templates_of_string_and_list_types/Sem_1511_ConcatenatingTemplatesOfStringAndListTypes_006.ttcn @@ -0,0 +1,27 @@ +/***************************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:15.11, Ensure that a concatenation of charstrings with a fixed length AnyValueOrNone be matched. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +//Note: see CR5805 regarding corresponding BNF update + +module Sem_1511_ConcatenatingTemplatesOfStringAndListTypes_006 { + +type component GeneralComp { } + +testcase TC_Sem_1511_ConcatenatingTemplatesOfStringAndListTypes_006() runs on GeneralComp { + var template charstring m_str := pattern "ABC?#3" & "E?F"; //equivalent to ABC???E?F pattern + + if (match("ABCXYZE2F", m_str)) { + setverdict(pass); + } else { + setverdict(fail); + } +} + +control{ + execute(TC_Sem_1511_ConcatenatingTemplatesOfStringAndListTypes_006()); +} + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1511_concatenating_templates_of_string_and_list_types/Sem_1511_ConcatenatingTemplatesOfStringAndListTypes_007.ttcn b/ATS/core_language/15_templates/1511_concatenating_templates_of_string_and_list_types/Sem_1511_ConcatenatingTemplatesOfStringAndListTypes_007.ttcn new file mode 100644 index 00000000..62e9e291 --- /dev/null +++ b/ATS/core_language/15_templates/1511_concatenating_templates_of_string_and_list_types/Sem_1511_ConcatenatingTemplatesOfStringAndListTypes_007.ttcn @@ -0,0 +1,30 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.2 + ** @purpose 1:15.11, Ensure that concatenations of record of charstrings are accepted. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_1511_ConcatenatingTemplatesOfStringAndListTypes_007 { + +type component GeneralComp { } + +type record of charstring RecOfChar; + +testcase TC_Sem_1511_ConcatenatingTemplatesOfStringAndListTypes_007() runs on GeneralComp { + var template RecOfChar m_concatenation := {"ABC"} & {pattern "D*", pattern "E?" & "F"}; + + var RecOfChar m_reference := {"ABC","D213","E2F"}; // some value that matches + + if (match(m_reference,m_concatenation)) { + setverdict(pass); + } else { + setverdict(fail); + } +} + +control{ + execute(TC_Sem_1511_ConcatenatingTemplatesOfStringAndListTypes_007()); +} + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1511_concatenating_templates_of_string_and_list_types/Sem_1511_ConcatenatingTemplatesOfStringAndListTypes_008.ttcn b/ATS/core_language/15_templates/1511_concatenating_templates_of_string_and_list_types/Sem_1511_ConcatenatingTemplatesOfStringAndListTypes_008.ttcn new file mode 100644 index 00000000..f9ccde7a --- /dev/null +++ b/ATS/core_language/15_templates/1511_concatenating_templates_of_string_and_list_types/Sem_1511_ConcatenatingTemplatesOfStringAndListTypes_008.ttcn @@ -0,0 +1,32 @@ +/***************************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:15.11, Ensure that concatenations of record of charstrings work when parameterized. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +//Note: see CR5805 regarding corresponding BNF update + +module Sem_1511_ConcatenatingTemplatesOfStringAndListTypes_008 { + +type component GeneralComp { } + +type record of charstring RecOfChar; + +template RecOfChar m_concatenation := {"ABC"} & * length(3) & {pattern "E" & "?" & "F"}; + +testcase TC_Sem_1511_ConcatenatingTemplatesOfStringAndListTypes_008() runs on GeneralComp { + var RecOfChar m_reference := {"ABC","A","B","C","E2F"}; // some value that matches + + if (match(m_reference, m_concatenation)) { + setverdict(pass); + } else { + setverdict(fail); + } + +} + +control{ + execute(TC_Sem_1511_ConcatenatingTemplatesOfStringAndListTypes_008()); +} + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1511_concatenating_templates_of_string_and_list_types/Sem_1511_ConcatenatingTemplatesOfStringAndListTypes_009.ttcn b/ATS/core_language/15_templates/1511_concatenating_templates_of_string_and_list_types/Sem_1511_ConcatenatingTemplatesOfStringAndListTypes_009.ttcn new file mode 100644 index 00000000..4ad6dd48 --- /dev/null +++ b/ATS/core_language/15_templates/1511_concatenating_templates_of_string_and_list_types/Sem_1511_ConcatenatingTemplatesOfStringAndListTypes_009.ttcn @@ -0,0 +1,30 @@ +/***************************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:15.11, Ensure that concatenations of set of integers are accepted. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +//Note: see CR5805 regarding corresponding BNF update + +module Sem_1511_ConcatenatingTemplatesOfStringAndListTypes_009 { + +type component GeneralComp { } + +type set of integer SetOfInt; + +testcase TC_Sem_1511_ConcatenatingTemplatesOfStringAndListTypes_009() runs on GeneralComp { + var template SetOfInt m_concatenation := {1, 2} & * length(2) & {3, 4}; + + var SetOfInt m_reference := {1,2, 20, 21, 3, 4}; + if (match(m_reference,m_concatenation)) { + setverdict(pass); + } else { + setverdict(fail); + } +} + +control{ + execute(TC_Sem_1511_ConcatenatingTemplatesOfStringAndListTypes_009()); +} + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1511_concatenating_templates_of_string_and_list_types/Sem_1511_ConcatenatingTemplatesOfStringAndListTypes_010.ttcn b/ATS/core_language/15_templates/1511_concatenating_templates_of_string_and_list_types/Sem_1511_ConcatenatingTemplatesOfStringAndListTypes_010.ttcn new file mode 100644 index 00000000..2ad68a00 --- /dev/null +++ b/ATS/core_language/15_templates/1511_concatenating_templates_of_string_and_list_types/Sem_1511_ConcatenatingTemplatesOfStringAndListTypes_010.ttcn @@ -0,0 +1,39 @@ +/***************************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:15.11, Ensure that the inline template definitions are correctly concatenated. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_1511_ConcatenatingTemplatesOfStringAndListTypes_010 { + +type component GeneralComp { } + +type record MyRecord { + charstring field1, + charstring field2 +} + +template MyRecord m_receiveTemplate := { + field1 := pattern "ab*de", + field2 := "ABC" & "DE*" & "F?" //concatenation of literal characters +} + +testcase TC_Sem_1511_ConcatenatingTemplatesOfStringAndListTypes_010() runs on GeneralComp { + var MyRecord v_value := { + field1 := "ab*de", + field2 := "ABCDE1F1" + } + + if (match(v_value, m_receiveTemplate)) { + setverdict(fail); + } else { + setverdict(pass); + } +} + +control{ + execute(TC_Sem_1511_ConcatenatingTemplatesOfStringAndListTypes_010()); +} + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1511_concatenating_templates_of_string_and_list_types/Sem_1511_ConcatenatingTemplatesOfStringAndListTypes_011.ttcn b/ATS/core_language/15_templates/1511_concatenating_templates_of_string_and_list_types/Sem_1511_ConcatenatingTemplatesOfStringAndListTypes_011.ttcn new file mode 100644 index 00000000..4e0b0fe8 --- /dev/null +++ b/ATS/core_language/15_templates/1511_concatenating_templates_of_string_and_list_types/Sem_1511_ConcatenatingTemplatesOfStringAndListTypes_011.ttcn @@ -0,0 +1,26 @@ +/***************************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:15.11, Ensure that concatenation of octetstring types works as expected (matching patterns in quotation). + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +//Note: see CR5805 regarding corresponding BNF update + +module Sem_1511_ConcatenatingTemplatesOfStringAndListTypes_011 { + +type component GeneralComp { } + +testcase TC_Sem_1511_ConcatenatingTemplatesOfStringAndListTypes_011() runs on GeneralComp { + var template octetstring v_myString1 := 'ABCC'O & 'DD*'O & 'EE?FF'O; + if (match('ABCCDD22EE11FF'O, v_myString1)) { + setverdict(pass); + } else { + setverdict(fail); + } +} + +control{ + execute(TC_Sem_1511_ConcatenatingTemplatesOfStringAndListTypes_011()); +} + +} diff --git a/ATS/core_language/15_templates/1511_concatenating_templates_of_string_and_list_types/Sem_1511_ConcatenatingTemplatesOfStringAndListTypes_012.ttcn b/ATS/core_language/15_templates/1511_concatenating_templates_of_string_and_list_types/Sem_1511_ConcatenatingTemplatesOfStringAndListTypes_012.ttcn new file mode 100644 index 00000000..34ac0ff8 --- /dev/null +++ b/ATS/core_language/15_templates/1511_concatenating_templates_of_string_and_list_types/Sem_1511_ConcatenatingTemplatesOfStringAndListTypes_012.ttcn @@ -0,0 +1,25 @@ +/***************************************************************** + ** @author STF 451 and 470 + ** @version 0.0.1 + ** @purpose 1:15.11, Ensure that concatenation of octetstring types and ? patterns works as expected. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_1511_ConcatenatingTemplatesOfStringAndListTypes_012 { + +type component GeneralComp { } + +testcase TC_Sem_1511_ConcatenatingTemplatesOfStringAndListTypes_012() runs on GeneralComp { + var template octetstring v_myString1 := 'AB'O & 'CD'O & ? & ? length(1) & 'EF'O; //results in 'ABCD*?EF'O + if (match('ABCD2233EF'O, v_myString1)) { + setverdict(pass); + } else { + setverdict(fail); + } +} + +control{ + execute(TC_Sem_1511_ConcatenatingTemplatesOfStringAndListTypes_012()); +} + +} diff --git a/ATS/core_language/15_templates/1511_concatenating_templates_of_string_and_list_types/Sem_1511_ConcatenatingTemplatesOfStringAndListTypes_013.ttcn b/ATS/core_language/15_templates/1511_concatenating_templates_of_string_and_list_types/Sem_1511_ConcatenatingTemplatesOfStringAndListTypes_013.ttcn new file mode 100644 index 00000000..ddbbbb77 --- /dev/null +++ b/ATS/core_language/15_templates/1511_concatenating_templates_of_string_and_list_types/Sem_1511_ConcatenatingTemplatesOfStringAndListTypes_013.ttcn @@ -0,0 +1,26 @@ +/***************************************************************** + ** @author STF 451 + ** @version 0.0.1 + ** @purpose 1:15.11, Ensure that concatenation of octetstring types and ? patterns works as expected. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_1511_ConcatenatingTemplatesOfStringAndListTypes_013 { + +type component GeneralComp { } + +testcase TC_Sem_1511_ConcatenatingTemplatesOfStringAndListTypes_013() runs on GeneralComp { + var template octetstring v_myString1 := ('ABCD'O & ? length(2)) length (1..6); + // results in 'ABCD??'O matching an octet string of length 4 (8 hex digits) + if (match('ABCD1234'O, v_myString1)) { + setverdict(pass); + } else { + setverdict(fail); + } +} + +control{ + execute(TC_Sem_1511_ConcatenatingTemplatesOfStringAndListTypes_013()); +} + +} diff --git a/ATS/core_language/15_templates/1511_concatenating_templates_of_string_and_list_types/Sem_1511_ConcatenatingTemplatesOfStringAndListTypes_014.ttcn b/ATS/core_language/15_templates/1511_concatenating_templates_of_string_and_list_types/Sem_1511_ConcatenatingTemplatesOfStringAndListTypes_014.ttcn new file mode 100644 index 00000000..dfd881d6 --- /dev/null +++ b/ATS/core_language/15_templates/1511_concatenating_templates_of_string_and_list_types/Sem_1511_ConcatenatingTemplatesOfStringAndListTypes_014.ttcn @@ -0,0 +1,29 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:15.11, Ensure that concatenation of charstring and universal charsting types are concatenated as expected. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +/* When templates of charstring and universal charstring type are both + * present in the concatenation, the charstring values are implicitly converted to universal charstring values*/ + +module Sem_1511_ConcatenatingTemplatesOfStringAndListTypes_014 { + +type component GeneralComp { } + +testcase TC_Sem_1511_ConcatenatingTemplatesOfStringAndListTypes_014() runs on GeneralComp { + var template universal charstring v_myString1 := (char ( 0, 0, 1, 113) & "AB" & char ( 0, 0, 1, 112)); // "űABŰ" + + if (match("űABŰ", v_myString1)) { + setverdict(pass); + } else { + setverdict(fail,v_myString1); + } +} + +control{ + execute(TC_Sem_1511_ConcatenatingTemplatesOfStringAndListTypes_014()); +} + +} diff --git a/ATS/core_language/15_templates/1511_concatenating_templates_of_string_and_list_types/Sem_1511_ConcatenatingTemplatesOfStringAndListTypes_015.ttcn b/ATS/core_language/15_templates/1511_concatenating_templates_of_string_and_list_types/Sem_1511_ConcatenatingTemplatesOfStringAndListTypes_015.ttcn new file mode 100644 index 00000000..7428012f --- /dev/null +++ b/ATS/core_language/15_templates/1511_concatenating_templates_of_string_and_list_types/Sem_1511_ConcatenatingTemplatesOfStringAndListTypes_015.ttcn @@ -0,0 +1,33 @@ +/***************************************************************** + ** @author STF 470 (updated by STF 521) + ** @version 0.0.2 + ** @purpose 1:15.11, Ensure that concatenations of record of charstrings work when parameterized. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_1511_ConcatenatingTemplatesOfStringAndListTypes_015 { + +type component GeneralComp { } + +type record of charstring RecOfChar; + +template RecOfChar m_myRec_par(integer p_num) := {"ABC"} & ? & * length(p_num) & {"EF"}; + +testcase TC_Sem_1511_ConcatenatingTemplatesOfStringAndListTypes_015() runs on GeneralComp { + var integer v_int := 3; + var template RecOfChar v_recofChar; + v_recofChar :={ "ABC" } & { "Z" } & { "Z" } & { "Z" } & { "EF" }; + + if (match(valueof(v_recofChar), m_myRec_par(2))) { + setverdict(pass); + } else { + setverdict(fail); + } + +} + +control{ + execute(TC_Sem_1511_ConcatenatingTemplatesOfStringAndListTypes_015()); +} + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/15_toplevel/NegSem_15_TopLevel_001.ttcn b/ATS/core_language/15_templates/15_toplevel/NegSem_15_TopLevel_001.ttcn new file mode 100644 index 00000000..ed8362c2 --- /dev/null +++ b/ATS/core_language/15_templates/15_toplevel/NegSem_15_TopLevel_001.ttcn @@ -0,0 +1,23 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:15, Ensure that a template formed from a union is rejected when the union somehow contains a default type field. + ** @verdict pass reject + *****************************************************************/ + +module NegSem_15_TopLevel_001 { + +type record MyRecord { + default def +} + +type union MyUnion { + integer choice1, + MyRecord choice2 +} + +template MyUnion m_integerChosen := { + choice1 := 5 +} + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/15_toplevel/NegSem_15_TopLevel_002.ttcn b/ATS/core_language/15_templates/15_toplevel/NegSem_15_TopLevel_002.ttcn new file mode 100644 index 00000000..df1f0eee --- /dev/null +++ b/ATS/core_language/15_templates/15_toplevel/NegSem_15_TopLevel_002.ttcn @@ -0,0 +1,25 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:15, Ensure that a template formed from a union is rejected when the union somehow contains a port type field. + ** @verdict pass reject + *****************************************************************/ + +module NegSem_15_TopLevel_002 { + +type port MyPort message {inout integer}; + +type record MyRecord { + MyPort myPort1 +} + +type union MyUnion { + integer choice1, + MyRecord choice2 +} + +template MyUnion m_integerChosen := { + choice1 := 5 +} + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/15_toplevel/NegSem_15_TopLevel_003.ttcn b/ATS/core_language/15_templates/15_toplevel/NegSem_15_TopLevel_003.ttcn new file mode 100644 index 00000000..47c90ea9 --- /dev/null +++ b/ATS/core_language/15_templates/15_toplevel/NegSem_15_TopLevel_003.ttcn @@ -0,0 +1,18 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:15, Ensure that a template shall not be of default type. + ** @verdict pass reject + *****************************************************************/ + +module NegSem_15_TopLevel_003 { + +type record MyRecord { + default def +} + +template MyRecord mw_myRecord := { + def := ? +} + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/15_toplevel/NegSem_15_TopLevel_004.ttcn b/ATS/core_language/15_templates/15_toplevel/NegSem_15_TopLevel_004.ttcn new file mode 100644 index 00000000..6898ecfe --- /dev/null +++ b/ATS/core_language/15_templates/15_toplevel/NegSem_15_TopLevel_004.ttcn @@ -0,0 +1,20 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:15, Ensure that a template shall not be of port type. + ** @verdict pass reject + *****************************************************************/ + +module NegSem_15_TopLevel_004 { + +type port MyPort message {inout integer}; + +type record MyRecord { + MyPort myPort1 +} + +template MyRecord mw_myRecord := { + myPort1 := ? +} + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/15_toplevel/NegSyn_15_TopLevel_001.ttcn b/ATS/core_language/15_templates/15_toplevel/NegSyn_15_TopLevel_001.ttcn new file mode 100644 index 00000000..1754222a --- /dev/null +++ b/ATS/core_language/15_templates/15_toplevel/NegSyn_15_TopLevel_001.ttcn @@ -0,0 +1,22 @@ +/***************************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:15, Ensure that the expression or template body initializing a template shall evaluate to a value or template, which is type compatible with the template being declared. + ** @verdict pass reject, noexecution + *****************************************************************/ + +// The following requirement is tested: +//Restriction C: the expression or template body initializing a template shall evaluate to a value or template, which is type compatible with the template being declared. + +module NegSyn_15_TopLevel_001 { + + +type record MyRecord { + integer myInt +} + +template MyRecord mw_myRecord := { + myInt := 2.1 // error: incompatible type (int req., float is given) +} + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/15_toplevel/Syn_15_TopLevel_001.ttcn b/ATS/core_language/15_templates/15_toplevel/Syn_15_TopLevel_001.ttcn new file mode 100644 index 00000000..bdb933be --- /dev/null +++ b/ATS/core_language/15_templates/15_toplevel/Syn_15_TopLevel_001.ttcn @@ -0,0 +1,18 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:15, Ensure that a simple template with a single charstring field is accepted. + ** @verdict pass accept, noexecution + *****************************************************************/ + +module Syn_15_TopLevel_001 { + +type record MyRecord { + charstring field1 +} + +template MyRecord m_myTemplate := { + field1 := "Hello World!" +} + +} \ No newline at end of file diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160101_invoking_functions/Sem_160101_invoking_functions_001.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160101_invoking_functions/Sem_160101_invoking_functions_001.ttcn new file mode 100644 index 00000000..090742be --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160101_invoking_functions/Sem_160101_invoking_functions_001.ttcn @@ -0,0 +1,42 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:16.1.1, Ensure that the IUT correctly handles function invocations + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Sem_160101_invoking_functions_001 { + + +type component GeneralComp { + var integer v_gc:=0; +} + +function f_test ( integer p_integer := 0 ) runs on GeneralComp return integer { + + v_gc:=v_gc+p_integer; + return v_gc; +} + +testcase TC_Sem_160101_invoking_functions_001 () runs on GeneralComp { + var integer v_result:=0; + + f_test(); + f_test(1); + v_result:=f_test(1); + if( match(v_result, 2) and match(f_test(), 2) ) { + setverdict(pass); + } + else { + setverdict(fail); + } + +} + + +control{ + + execute(TC_Sem_160101_invoking_functions_001()); + +} + +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/NOTES b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/NOTES new file mode 100644 index 00000000..0bfefe5b --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/NOTES @@ -0,0 +1,3 @@ +- NOTE: The proper functioning of encvalue and decvalue functions cannot be tested. +- TODO: split these tests in one per function (since if one function fails the entire test + fails and we could not say that the other functions work properly) \ No newline at end of file diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/NegSem_160102_predefined_functions_001.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/NegSem_160102_predefined_functions_001.ttcn new file mode 100644 index 00000000..df3d8b1b --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/NegSem_160102_predefined_functions_001.ttcn @@ -0,0 +1,21 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:16.1.2, Ensure that the IUT recognizes predefined functions and correctly evaluates them (as specified by Annex C) + ** @verdict pass reject + ***************************************************/ +module NegSem_160102_predefined_functions_001 { + + type component GeneralComp { + } + + testcase TC_NegSem_160102_predefined_functions_001 () runs on GeneralComp { + var charstring v_i; + + v_i:=int2char(128); + } + + control{ + execute(TC_NegSem_160102_predefined_functions_001()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/NegSem_160102_predefined_functions_002.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/NegSem_160102_predefined_functions_002.ttcn new file mode 100644 index 00000000..2f37b471 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/NegSem_160102_predefined_functions_002.ttcn @@ -0,0 +1,21 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:16.1.2, Ensure that the IUT recognizes predefined functions and correctly evaluates them (as specified by Annex C) + ** @verdict pass reject + ***************************************************/ +module NegSem_160102_predefined_functions_002 { + + type component GeneralComp { + } + + testcase TC_NegSem_160102_predefined_functions_002 () runs on GeneralComp { + var charstring v_i; + + v_i:=int2char(-1); + } + + control { + execute(TC_NegSem_160102_predefined_functions_002()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/NegSem_160102_predefined_functions_003.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/NegSem_160102_predefined_functions_003.ttcn new file mode 100644 index 00000000..14452fe9 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/NegSem_160102_predefined_functions_003.ttcn @@ -0,0 +1,27 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:16.1.2, Ensure that the IUT recognizes predefined functions and correctly evaluates them (as specified by Annex C) + ** @verdict pass reject + ***************************************************/ +module NegSem_160102_predefined_functions_003 { + +type component GeneralComp { +} + + +testcase TC_NegSem_160102_predefined_functions_003 () runs on GeneralComp { + var universal charstring v_i; + + v_i:=int2char(2147483648); + +} + + +control{ + + execute(TC_NegSem_160102_predefined_functions_003()); + +} + +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/NegSem_160102_predefined_functions_004.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/NegSem_160102_predefined_functions_004.ttcn new file mode 100644 index 00000000..416018a6 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/NegSem_160102_predefined_functions_004.ttcn @@ -0,0 +1,27 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:16.1.2, Ensure that the IUT recognizes predefined functions and correctly evaluates them (as specified by Annex C) + ** @verdict pass reject + ***************************************************/ +module NegSem_160102_predefined_functions_004 { + +type component GeneralComp { +} + + +testcase TC_NegSem_160102_predefined_functions_004 () runs on GeneralComp { + var hexstring v_i; + + v_i:=int2hex(256,2); //mismatch of string length + setverdict(pass); +} + + +control{ + + execute(TC_NegSem_160102_predefined_functions_004()); + +} + +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/NegSem_160102_predefined_functions_005.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/NegSem_160102_predefined_functions_005.ttcn new file mode 100644 index 00000000..05c5b420 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/NegSem_160102_predefined_functions_005.ttcn @@ -0,0 +1,27 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:16.1.2, Ensure that the IUT recognizes predefined functions and correctly evaluates them (as specified by Annex C) + ** @verdict pass reject + ***************************************************/ +module NegSem_160102_predefined_functions_005 { + +type component GeneralComp { +} + + +testcase TC_NegSem_160102_predefined_functions_005 () runs on GeneralComp { + var integer v_i; + + v_i:=char2int("blabla"); //mismatch of string length + +} + + +control{ + + execute(TC_NegSem_160102_predefined_functions_005()); + +} + +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/NegSem_160102_predefined_functions_006.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/NegSem_160102_predefined_functions_006.ttcn new file mode 100644 index 00000000..261bbfda --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/NegSem_160102_predefined_functions_006.ttcn @@ -0,0 +1,27 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:16.1.2, Ensure that the IUT recognizes predefined functions and correctly evaluates them (as specified by Annex C) + ** @verdict pass reject + ***************************************************/ +module NegSem_160102_predefined_functions_006 { + +type component GeneralComp { +} + + +testcase TC_NegSem_160102_predefined_functions_006 () runs on GeneralComp { + var integer v_i; + + v_i:=lengthof('1*F'H); //undetermined string length + setverdict(pass); +} + + +control{ + + execute(TC_NegSem_160102_predefined_functions_006()); + +} + +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/NegSem_160102_predefined_functions_007.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/NegSem_160102_predefined_functions_007.ttcn new file mode 100644 index 00000000..03f5d8e5 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/NegSem_160102_predefined_functions_007.ttcn @@ -0,0 +1,27 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:16.1.2, Ensure that the IUT recognizes predefined functions and correctly evaluates them (as specified by Annex C) + ** @verdict pass reject + ***************************************************/ +module NegSem_160102_predefined_functions_007 { + +type component GeneralComp { +} + + +testcase TC_NegSem_160102_predefined_functions_007 () runs on GeneralComp { + var integer v_i; + + v_i:=lengthof('1'B length(3)); //undetermined string length + setverdict(pass); +} + + +control{ + + execute(TC_NegSem_160102_predefined_functions_007()); + +} + +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/NegSem_160102_predefined_functions_008.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/NegSem_160102_predefined_functions_008.ttcn new file mode 100644 index 00000000..83d445a1 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/NegSem_160102_predefined_functions_008.ttcn @@ -0,0 +1,27 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:16.1.2, Ensure that the IUT recognizes predefined functions and correctly evaluates them (as specified by Annex C) + ** @verdict pass reject + ***************************************************/ +module NegSem_160102_predefined_functions_008 { + +type component GeneralComp { +} + + +testcase TC_NegSem_160102_predefined_functions_008 () runs on GeneralComp { + var integer v_i; + + v_i:=lengthof('1*0'B length(3..6)); //undetermined string length + setverdict(pass); +} + + +control{ + + execute(TC_NegSem_160102_predefined_functions_008()); + +} + +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/NegSem_160102_predefined_functions_009.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/NegSem_160102_predefined_functions_009.ttcn new file mode 100644 index 00000000..32d111bc --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/NegSem_160102_predefined_functions_009.ttcn @@ -0,0 +1,36 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:16.1.2, Ensure that the IUT recognizes predefined functions and correctly evaluates them (as specified by Annex C) + ** @verdict pass reject + ***************************************************/ +module NegSem_160102_predefined_functions_009 { + type enumerated MyEnumeratedType {e_black, e_white}; + + type record MyRecord { + boolean field1, + record of integer field2, + integer field3, + MyEnumeratedType field4 optional + } + +type component GeneralComp { +} + + +testcase TC_NegSem_160102_predefined_functions_009 () runs on GeneralComp { + template MyRecord template1 := { true, { permutation(2, 3) }, * } + var integer v_i; + + v_i:=sizeof(template1); //undetermined record length + +} + + +control{ + + execute(TC_NegSem_160102_predefined_functions_009()); + +} + +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/NegSem_160102_predefined_functions_010.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/NegSem_160102_predefined_functions_010.ttcn new file mode 100644 index 00000000..3404fbb8 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/NegSem_160102_predefined_functions_010.ttcn @@ -0,0 +1,29 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:16.1.2, Ensure that the IUT recognizes predefined functions and correctly evaluates them (as specified by Annex C) + ** @verdict pass reject + ***************************************************/ +module NegSem_160102_predefined_functions_010 { + type record of integer IntegerList; + +type component GeneralComp { +} + + +testcase TC_NegSem_160102_predefined_functions_010 () runs on GeneralComp { + template IntegerList template1 := { 1, 2, 3, * } length(1..2) ; //incorrect template length + var integer v_i; + + v_i:=lengthof(template1); + +} + + +control{ + + execute(TC_NegSem_160102_predefined_functions_010()); + +} + +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/NegSem_160102_predefined_functions_017.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/NegSem_160102_predefined_functions_017.ttcn new file mode 100644 index 00000000..38baf064 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/NegSem_160102_predefined_functions_017.ttcn @@ -0,0 +1,28 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:16.1.2, Ensure that the IUT recognizes predefined functions and correctly evaluates them (as specified by Annex C) + ** @verdict pass reject + ***************************************************/ +module NegSem_160102_predefined_functions_017 { + +type component GeneralComp { +} + + +testcase TC_NegSem_160102_predefined_functions_017 () runs on GeneralComp { + var charstring v_example:="example text string"; + var charstring v_i; + + v_i:=regexp(v_example,charstring:"?+(text)?+",1); //wrong group index + +} + + +control{ + + execute(TC_NegSem_160102_predefined_functions_017()); + +} + +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/NegSem_160102_predefined_functions_018.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/NegSem_160102_predefined_functions_018.ttcn new file mode 100644 index 00000000..88bb6392 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/NegSem_160102_predefined_functions_018.ttcn @@ -0,0 +1,28 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:16.1.2, Ensure that the IUT recognizes predefined functions and correctly evaluates them (as specified by Annex C) + ** @verdict pass reject + ***************************************************/ +module NegSem_160102_predefined_functions_018 { + +type component GeneralComp { +} + + +testcase TC_NegSem_160102_predefined_functions_018 () runs on GeneralComp { + var charstring v_example:="example text string"; + var charstring v_i; + + v_i:=regexp(v_example,charstring:"?+(text)?+",-1); //wrong group index + +} + + +control{ + + execute(TC_NegSem_160102_predefined_functions_018()); + +} + +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/NegSem_160102_predefined_functions_019.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/NegSem_160102_predefined_functions_019.ttcn new file mode 100644 index 00000000..8cbd9a2f --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/NegSem_160102_predefined_functions_019.ttcn @@ -0,0 +1,28 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:16.1.2, Ensure that the IUT recognizes predefined functions and correctly evaluates them (as specified by Annex C) + ** @verdict pass reject + ***************************************************/ +module NegSem_160102_predefined_functions_019 { + +type component GeneralComp { +} + + +testcase TC_NegSem_160102_predefined_functions_019 () runs on GeneralComp { + var charstring v_example:="example text string"; + var charstring v_i; + + v_i:=regexp(v_example,charstring:"?+(text)?+"); //missing group index + +} + + +control{ + + execute(TC_NegSem_160102_predefined_functions_019()); + +} + +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/NegSem_160102_predefined_functions_021.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/NegSem_160102_predefined_functions_021.ttcn new file mode 100644 index 00000000..08db89f8 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/NegSem_160102_predefined_functions_021.ttcn @@ -0,0 +1,27 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:16.1.2, Ensure that the IUT recognizes predefined functions and correctly evaluates them (as specified by Annex C) + ** @verdict pass reject + ***************************************************/ +module NegSem_160102_predefined_functions_021 { + +type component GeneralComp { +} + + +testcase TC_NegSem_160102_predefined_functions_021 () runs on GeneralComp { + var charstring v_i; + + v_i:=substr('00100110'B,-3,4); //wrong index value + +} + + +control{ + + execute(TC_NegSem_160102_predefined_functions_021()); + +} + +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/NegSem_160102_predefined_functions_022.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/NegSem_160102_predefined_functions_022.ttcn new file mode 100644 index 00000000..fc14fd12 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/NegSem_160102_predefined_functions_022.ttcn @@ -0,0 +1,27 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:16.1.2, Ensure that the IUT recognizes predefined functions and correctly evaluates them (as specified by Annex C) + ** @verdict pass reject + ***************************************************/ +module NegSem_160102_predefined_functions_022 { + +type component GeneralComp { +} + + +testcase TC_NegSem_160102_predefined_functions_022 () runs on GeneralComp { + var charstring v_i; + + v_i:=substr('00100110'B,3,-4); //wrong length value + +} + + +control{ + + execute(TC_NegSem_160102_predefined_functions_022()); + +} + +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/NegSem_160102_predefined_functions_023.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/NegSem_160102_predefined_functions_023.ttcn new file mode 100644 index 00000000..14912645 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/NegSem_160102_predefined_functions_023.ttcn @@ -0,0 +1,27 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:16.1.2, Ensure that the IUT recognizes predefined functions and correctly evaluates them (as specified by Annex C) + ** @verdict pass reject + ***************************************************/ +module NegSem_160102_predefined_functions_023 { + +type component GeneralComp { +} + + +testcase TC_NegSem_160102_predefined_functions_023 () runs on GeneralComp { + var charstring v_i; + + v_i:=substr('00100110'B,3,14); //too large length value + +} + + +control{ + + execute(TC_NegSem_160102_predefined_functions_023()); + +} + +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/NegSem_160102_predefined_functions_024.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/NegSem_160102_predefined_functions_024.ttcn new file mode 100644 index 00000000..94036191 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/NegSem_160102_predefined_functions_024.ttcn @@ -0,0 +1,27 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:16.1.2, Ensure that the IUT recognizes predefined functions and correctly evaluates them (as specified by Annex C) + ** @verdict pass reject + ***************************************************/ +module NegSem_160102_predefined_functions_024 { + +type component GeneralComp { +} + + +testcase TC_NegSem_160102_predefined_functions_024 () runs on GeneralComp { + var bitstring v_i; + + v_i:=replace('00000110'B,-1,3,'111'B); //wrong index value + +} + + +control{ + + execute(TC_NegSem_160102_predefined_functions_024()); + +} + +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/NegSem_160102_predefined_functions_025.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/NegSem_160102_predefined_functions_025.ttcn new file mode 100644 index 00000000..de887e8d --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/NegSem_160102_predefined_functions_025.ttcn @@ -0,0 +1,27 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:16.1.2, Ensure that the IUT recognizes predefined functions and correctly evaluates them (as specified by Annex C) + ** @verdict pass reject + ***************************************************/ +module NegSem_160102_predefined_functions_025 { + +type component GeneralComp { +} + + +testcase TC_NegSem_160102_predefined_functions_025 () runs on GeneralComp { + var bitstring v_i; + + v_i:=replace('00000110'B,1,-3,'111'B); //wrong length value + +} + + +control{ + + execute(TC_NegSem_160102_predefined_functions_025()); + +} + +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/NegSem_160102_predefined_functions_026.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/NegSem_160102_predefined_functions_026.ttcn new file mode 100644 index 00000000..fe45e83e --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/NegSem_160102_predefined_functions_026.ttcn @@ -0,0 +1,27 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:16.1.2, Ensure that the IUT recognizes predefined functions and correctly evaluates them (as specified by Annex C) + ** @verdict pass reject + ***************************************************/ +module NegSem_160102_predefined_functions_026 { + +type component GeneralComp { +} + + +testcase TC_NegSem_160102_predefined_functions_026 () runs on GeneralComp { + var bitstring v_i; + + v_i:=replace('00000110'B,1,13,'111'B); //too large length value + +} + + +control{ + + execute(TC_NegSem_160102_predefined_functions_026()); + +} + +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/NegSem_160102_predefined_functions_027.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/NegSem_160102_predefined_functions_027.ttcn new file mode 100644 index 00000000..03812251 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/NegSem_160102_predefined_functions_027.ttcn @@ -0,0 +1,27 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:16.1.2, Ensure that the IUT recognizes predefined functions and correctly evaluates them (as specified by Annex C) + ** @verdict pass reject + ***************************************************/ +module NegSem_160102_predefined_functions_027 { + +type component GeneralComp { +} + + +testcase TC_NegSem_160102_predefined_functions_027 () runs on GeneralComp { + var bitstring v_i; + + v_i:=replace('00000110'B,1,4,'8'H); //incompatible replacement type + +} + + +control{ + + execute(TC_NegSem_160102_predefined_functions_027()); + +} + +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/NegSem_160102_predefined_functions_028.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/NegSem_160102_predefined_functions_028.ttcn new file mode 100644 index 00000000..fff8e1a5 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/NegSem_160102_predefined_functions_028.ttcn @@ -0,0 +1,49 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:16.1.2, Ensure that the IUT recognizes predefined functions and correctly evaluates them (as specified by Annex C) + ** @verdict pass reject + ***************************************************/ +module NegSem_160102_predefined_functions_028 { + type enumerated EnumeratedType {e_black, e_white}; + type enumerated EnumeratedTypeWithLabels1 {e_black (1), e_white}; + type enumerated EnumeratedTypeWithLabels2 {e_black (-1), e_white}; + type enumerated EnumeratedTypeWithLabels3 {e_black (-1), e_white , e_yellow (0) }; + type enumerated Fruits {e_apple, e_peach, e_cherry}; + +type component GeneralComp { +} + + +testcase TC_NegSem_160102_predefined_functions_028 () runs on GeneralComp { + + var EnumeratedType vl_enum_black := e_black; + var EnumeratedType vl_enum_white := e_white; + var EnumeratedTypeWithLabels1 vl_enum1_black := e_black; + var EnumeratedTypeWithLabels1 vl_enum1_white := e_white; + var EnumeratedTypeWithLabels2 vl_enum2_black := e_black; + var EnumeratedTypeWithLabels2 vl_enum2_white := e_white; + var EnumeratedTypeWithLabels3 vl_enum3_black := e_black; + var EnumeratedTypeWithLabels3 vl_enum3_white := e_white; + var EnumeratedTypeWithLabels3 vl_enum3_yellow := e_yellow; + + + if( match(enum2int(e_black), 0) //ambiguous label + ) { + setverdict(pass); + } + else { + setverdict(fail); + } + + +} + + +control{ + + execute(TC_NegSem_160102_predefined_functions_028()); + +} + +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/NegSem_160102_predefined_functions_029.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/NegSem_160102_predefined_functions_029.ttcn new file mode 100644 index 00000000..38dfd4d5 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/NegSem_160102_predefined_functions_029.ttcn @@ -0,0 +1,49 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:16.1.2, Ensure that the IUT recognizes predefined functions and correctly evaluates them (as specified by Annex C) + ** @verdict pass reject + ***************************************************/ +module NegSem_160102_predefined_functions_029 { + type enumerated EnumeratedType {e_black, e_white}; + type enumerated EnumeratedTypeWithLabels1 {e_black (1), e_white}; + type enumerated EnumeratedTypeWithLabels2 {e_black (-1), e_white}; + type enumerated EnumeratedTypeWithLabels3 {e_black (-1), e_white , e_yellow (0) }; + type enumerated Fruits {e_apple, e_peach, e_cherry}; + +type component GeneralComp { +} + + +testcase TC_NegSem_160102_predefined_functions_029 () runs on GeneralComp { + + var EnumeratedType vl_enum_black := e_black; + var EnumeratedType vl_enum_white := e_white; + var EnumeratedTypeWithLabels1 vl_enum1_black := e_black; + var EnumeratedTypeWithLabels1 vl_enum1_white := e_white; + var EnumeratedTypeWithLabels2 vl_enum2_black := e_black; + var EnumeratedTypeWithLabels2 vl_enum2_white := e_white; + var EnumeratedTypeWithLabels3 vl_enum3_black := e_black; + var EnumeratedTypeWithLabels3 vl_enum3_white := e_white; + var EnumeratedTypeWithLabels3 vl_enum3_yellow := e_yellow; + + + if( match(enum2int(EnumeratedTypeWithLabels1.e_black), 0) //not allowed selection + ) { + setverdict(pass); + } + else { + setverdict(fail); + } + + +} + + +control{ + + execute(TC_NegSem_160102_predefined_functions_029()); + +} + +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/NegSem_160102_predefined_functions_030.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/NegSem_160102_predefined_functions_030.ttcn new file mode 100644 index 00000000..74a7b375 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/NegSem_160102_predefined_functions_030.ttcn @@ -0,0 +1,50 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:16.1.2, Ensure that the IUT recognizes predefined functions and correctly evaluates them (as specified by Annex C) + ** @verdict pass reject + ***************************************************/ +module NegSem_160102_predefined_functions_030 { + type enumerated EnumeratedType {e_black, e_white}; + type enumerated EnumeratedTypeWithLabels1 {e_black (1), e_white}; + type enumerated EnumeratedTypeWithLabels2 {e_black (-1), e_white}; + type enumerated EnumeratedTypeWithLabels3 {e_black (-1), e_white , e_yellow (0) }; + type enumerated Fruits {e_apple, e_peach, e_cherry}; + +type component GeneralComp { +} + + +testcase TC_NegSem_160102_predefined_functions_030 () runs on GeneralComp { + + var EnumeratedType vl_enum_black := e_black; + var EnumeratedType vl_enum_white := e_white; + var EnumeratedTypeWithLabels1 vl_enum1_black := e_black; + var EnumeratedTypeWithLabels1 vl_enum1_white := e_white; + var EnumeratedTypeWithLabels2 vl_enum2_black := e_black; + var EnumeratedTypeWithLabels2 vl_enum2_white := e_white; + var EnumeratedTypeWithLabels3 vl_enum3_black := e_black; + var EnumeratedTypeWithLabels3 vl_enum3_white := e_white; + var EnumeratedTypeWithLabels3 vl_enum3_yellow := e_yellow; + const EnumeratedTypeWithLabels1 c_enum1_black := e_black; + + + if( match(int2enum(4,vl_enum1_black), c_enum1_black) //not existing label + ) { + setverdict(pass); + } + else { + setverdict(fail); + } + + +} + + +control{ + + execute(TC_NegSem_160102_predefined_functions_030()); + +} + +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/NegSem_160102_predefined_functions_031.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/NegSem_160102_predefined_functions_031.ttcn new file mode 100644 index 00000000..f77749cc --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/NegSem_160102_predefined_functions_031.ttcn @@ -0,0 +1,33 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:16.1.2, Ensure that the IUT recognizes predefined functions and correctly evaluates them (as specified by Annex C) + ** @verdict pass reject + ***************************************************/ +module NegSem_160102_predefined_functions_031 { + +type component GeneralComp { +} + + +testcase TC_NegSem_160102_predefined_functions_031 () runs on GeneralComp { + var float v_random1; + + v_random1:=rnd(infinity); //cannot have infinity as a seed + if( match(rnd(infinity), v_random1) and not match(rnd(1.0), v_random1) ) { + setverdict(pass); + } + else { + setverdict(fail); + } + +} + + +control{ + + execute(TC_NegSem_160102_predefined_functions_031()); + +} + +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/NegSem_160102_predefined_functions_032.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/NegSem_160102_predefined_functions_032.ttcn new file mode 100644 index 00000000..6a46fbb3 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/NegSem_160102_predefined_functions_032.ttcn @@ -0,0 +1,32 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:16.1.2, Ensure that an error is generated when the parameter of the encvalue function contains a matching symbol + ** @verdict pass reject + ***************************************************/ + +// The following requirements are tested: +// (C.5.1) When the actual parameter that is passed to inpar is a template, it shall resolve to +// a specific value (the same restrictions apply as for the argument of the send statement). + +module NegSem_160102_predefined_functions_032 { + +type integer I with { variant "32 bit"}; + +type component GeneralComp { +} + + +testcase TC_NegSem_160102_predefined_functions_032 () runs on GeneralComp { + template I v_test := ?; + var bitstring v_res := encvalue(v_test); + setverdict(fail, "The previous encvalue call should have caused an error"); +} + +control{ + + execute(TC_NegSem_160102_predefined_functions_032()); + +} + +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/NegSem_160102_predefined_functions_033.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/NegSem_160102_predefined_functions_033.ttcn new file mode 100644 index 00000000..b2622e39 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/NegSem_160102_predefined_functions_033.ttcn @@ -0,0 +1,31 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:16.1.2, Ensure that an error is detected when the parameter of the encvalue function contains an unitialized value + ** @verdict pass reject + ***************************************************/ + +// The following requirements are tested: +// 16.1.2, restriction a.3: all actual in and inout parameters shall be initialized + +module NegSem_160102_predefined_functions_033 { + +type integer I with { variant "32 bit"}; + +type component GeneralComp { +} + + +testcase TC_NegSem_160102_predefined_functions_033 () runs on GeneralComp { + var template I v_test; + var bitstring v_res := encvalue(v_test); + setverdict(fail, "The previous encvalue call should have caused an error"); +} + +control{ + + execute(TC_NegSem_160102_predefined_functions_033()); + +} + +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/NegSem_160102_predefined_functions_034.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/NegSem_160102_predefined_functions_034.ttcn new file mode 100644 index 00000000..15af2dd9 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/NegSem_160102_predefined_functions_034.ttcn @@ -0,0 +1,35 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:16.1.2, Ensure that an error is detected when the parameter of the encvalue function contains a partially initialized value + ** @verdict pass reject + ***************************************************/ + +// The following requirements are tested: +// 16.1.2, restriction a.3: all actual in and inout parameters shall be initialized + +module NegSem_160102_predefined_functions_034 { + +type record R +{ + integer field1, + integer field2 +} + +type component GeneralComp { +} + + +testcase TC_NegSem_160102_predefined_functions_034 () runs on GeneralComp { + template R v_test := { field1 := 1, field2 := - } + var bitstring v_res := encvalue(v_test); + setverdict(fail, "The previous encvalue call should have caused an error"); +} + +control{ + + execute(TC_NegSem_160102_predefined_functions_034()); + +} + +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/NegSem_160102_predefined_functions_036.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/NegSem_160102_predefined_functions_036.ttcn new file mode 100644 index 00000000..c67f88a3 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/NegSem_160102_predefined_functions_036.ttcn @@ -0,0 +1,37 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:16.1.2, Ensure that the IUT recognizes predefined functions and correctly evaluates them (as specified by Annex C) + ** @verdict pass reject + ***************************************************/ + +/* The following requirements are tested: + *In addition to the general error causes in clause 16.1.2, error causes are: + * inpar is a template of a character string type and contains a matching mechanism other than AnyElement or +AnyElementsOrNone; */ + +module NegSem_160102_predefined_functions_036 { + +type component GeneralComp { +} + + +testcase TC_NegSem_160102_predefined_functions_036 () runs on GeneralComp { + + const charstring m_Ref:="abc?def?"; + var template charstring Mytemp := pattern "{m_Ref}\q{0,0,1,113}"; + var charstring v_i; + + v_i:=substr(Mytemp,1,2); //error: non allowed matching mechanism + + +} + + +control{ + + execute(TC_NegSem_160102_predefined_functions_036()); + +} + +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/NegSem_160102_predefined_functions_037.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/NegSem_160102_predefined_functions_037.ttcn new file mode 100644 index 00000000..f099e24a --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/NegSem_160102_predefined_functions_037.ttcn @@ -0,0 +1,39 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:16.1.2, Ensure that the IUT recognizes predefined functions and correctly evaluates them (as specified by Annex C) + ** @verdict pass reject + ***************************************************/ + +/* The following requirements are tested: + *In addition to the general error causes in clause 16.1.2, error causes are: + * inpar is a template of a binary string or sequence type or array and it contains other matching mechanism as + * specific value and AnyElement; + */ + +module NegSem_160102_predefined_functions_037 { + +type component GeneralComp { +} + + +testcase TC_NegSem_160102_predefined_functions_037 () runs on GeneralComp { + + + var template bitstring Mytemp := '00101*'B; + var bitstring v_i; + + v_i:=substr(Mytemp,1,2); //error: contains a matching mechanism other than AnyElement + + + +} + + +control{ + + execute(TC_NegSem_160102_predefined_functions_037()); + +} + +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/NegSem_160102_predefined_functions_038.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/NegSem_160102_predefined_functions_038.ttcn new file mode 100644 index 00000000..6af64e27 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/NegSem_160102_predefined_functions_038.ttcn @@ -0,0 +1,40 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:16.1.2, Ensure that the IUT recognizes predefined functions and correctly evaluates them (as specified by Annex C) + ** @verdict pass reject + ***************************************************/ + +/* The following requirements are tested: + *In addition to the general error causes in clause 16.1.2, error causes are: + * inpar is a template of a binary string or sequence type or array and it contains other matching mechanism as + * specific value and AnyElement; + */ + +module NegSem_160102_predefined_functions_038 { + +type component GeneralComp { +} + +type integer MyArrayType1[3]; +type record of integer MyRecof; + +testcase TC_NegSem_160102_predefined_functions_038 () runs on GeneralComp { + + + var template MyArrayType1 MyArray :={ 7, 8, * }; + + var template MyRecof v_i; + + v_i:=substr(MyArray,1,2); //error: contains a matching mechanism * + +} + + +control{ + + execute(TC_NegSem_160102_predefined_functions_038()); + +} + +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/NegSem_160102_predefined_functions_039.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/NegSem_160102_predefined_functions_039.ttcn new file mode 100644 index 00000000..8be72094 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/NegSem_160102_predefined_functions_039.ttcn @@ -0,0 +1,34 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.2, Ensure that the IUT recognizes predefined functions and correctly evaluates them (as specified by Annex C) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Ensure that integer value of an enum handled correctly + +module NegSem_160102_predefined_functions_039 { + + type component GeneralComp { + } + + type enumerated EDays { + Monday, Tuesday, Wednesday, Thursday, Friday(3..5) + }; + + testcase TC_NegSem_160102_predefined_functions_039() runs on GeneralComp { + var EDays v_enum := Friday(3); + int2enum(6,v_enum); // error: not allowed value + + if (match(enum2int(v_enum),6)) { + setverdict(pass); + } else { + setverdict(fail); + } + } + + control { + execute(TC_NegSem_160102_predefined_functions_039()); + } +} \ No newline at end of file diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/NegSem_160102_predefined_functions_040.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/NegSem_160102_predefined_functions_040.ttcn new file mode 100644 index 00000000..ec2c89c7 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/NegSem_160102_predefined_functions_040.ttcn @@ -0,0 +1,34 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.2, Ensure that the IUT recognizes predefined functions and correctly evaluates them (as specified by Annex C) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Ensure that integer value of an enum handled correctly + +module NegSem_160102_predefined_functions_040 { + + type component GeneralComp { + } + + type enumerated EDays { + Monday(-1), Tuesday(1), Wednesday(2), Thursday(3), Friday(3..5) // error + }; + + testcase TC_NegSem_160102_predefined_functions_040() runs on GeneralComp { + var EDays v_enum := Wednesday; + int2enum(3,v_enum); // value already occupied + + if (match(enum2int(v_enum),2)) { + setverdict(pass); + } else { + setverdict(fail); + } + } + + control { + execute(TC_NegSem_160102_predefined_functions_040()); + } +} \ No newline at end of file diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_001.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_001.ttcn new file mode 100644 index 00000000..22dbb326 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_001.ttcn @@ -0,0 +1,69 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:16.1.2, Ensure that the IUT recognizes predefined functions and correctly evaluates them (as specified by Annex C) + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Sem_160102_predefined_functions_001 { + type enumerated EnumeratedType {e_black, e_white}; + + type component GeneralComp { + } + + /** + * @desc Equals method for floats + * @return true if abs(f1 - f2) < 1.E-6 + */ + function f_isFloatNear(in float f1, in float f2) return boolean { + var float delta := f1-f2; + if (delta < 0.0) { + delta := 0.0 - delta; + } + return delta < 1E-6; + } + + testcase TC_Sem_160102_predefined_functions_001 () runs on GeneralComp { + const universal charstring c_i:="i"; + var integer v_result:=0; + var EnumeratedType v_enum:=e_white; + + if( match(int2char(105), "i") and + match(int2unichar(105), c_i) and + match(int2bit(5,4), '0101'B) and + match(int2hex(55,4), '0037'H) and + match(int2oct(55,2), '0037'O) and + match(int2str(55), "55") and + (f_isFloatNear(int2float(5),5.0)) and + match(float2int(5.0), 5) and + match(char2int("i"), 105) and + match(char2oct("i"), '69'O) and + match(unichar2int(c_i), 105) and + match(bit2int('101'B), 5) and + match(bit2hex('110111'B), '37'H) and + match(bit2oct('110111'B), '37'O) and + match(bit2str('110111'B), "110111") and + match(hex2int('37'H), 55) and + match(hex2bit('37'H),'00110111'B) and + match(hex2oct('37'H), '37'O) and + match(hex2str('37'H), "37") and + match(oct2int('37'O), 55) and + match(oct2bit('37'O), '00110111'B) and + match(oct2hex('37'O), '37'H) and + match(oct2str('37'O), "37") and + match(oct2char('69'O), "i") and + match(str2int("55"),55) and + match(str2oct("55"), '55'O) and + (f_isFloatNear(str2float("5.5"),5.5)) and + match(enum2int(v_enum), 1) + ) { + setverdict(pass); + } + else { + setverdict(fail); + } + } + + control{ + execute(TC_Sem_160102_predefined_functions_001()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_002.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_002.ttcn new file mode 100644 index 00000000..6d699940 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_002.ttcn @@ -0,0 +1,78 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:16.1.2, Ensure that the IUT recognizes predefined functions and correctly evaluates them (as specified by Annex C) + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +module Sem_160102_predefined_functions_002 { + type record of integer IntegerList; + + type record MyRecord { + boolean field1, + record of integer field2, + integer field3 optional + } + + type component GeneralComp { + } + + testcase TC_Sem_160102_predefined_functions_002 () runs on GeneralComp { + template MyRecord template1 := { + field1 := true, + field2 := { permutation(2, 3), ? }, + field3 := omit + } + template MyRecord template2 := { + field1 := true, + field2 := {permutation(2, 3)}, + field3 := omit + } + template IntegerList template3 := { 1, 2, 3, * } length(1..3) ; + + if (not (lengthof(charstring:"test") == 4)) { + setverdict(fail); + } + if (not (lengthof(universal charstring:"test") == 4)) { + setverdict(fail); + } + if (not (lengthof(bitstring:'010'B) == 3)) { + setverdict(fail); + } + if (not (lengthof(hexstring:'55'H) == 2)) { + setverdict(fail); + } + if (not (lengthof(octetstring:'55'O) == 1)) { + setverdict(fail); + } + if (not (lengthof(charstring:pattern "t??t") == 4)) { + setverdict(fail); + } + if (not (lengthof(bitstring:'1??1'B) == 4)) { + setverdict(fail); + } + if (not (lengthof(hexstring:'1*1'H length(8)) == 8)) { + setverdict(fail); + } + if (not (lengthof(octetstring:'00?FF'O length(3)) == 3)) { + setverdict(fail); + } + if (not (lengthof(octetstring:'AB?'O) == 2)) { + setverdict(fail); + } + if (not (lengthof(template1.field2) == 3)) { + setverdict(fail); + } + if (not (sizeof(template2) == 2)) { + setverdict(fail); + } + if (not (lengthof(template3) == 3)) { + setverdict(fail); + } + setverdict(pass); + } + + control { + execute(TC_Sem_160102_predefined_functions_002()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_003.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_003.ttcn new file mode 100644 index 00000000..6d46170a --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_003.ttcn @@ -0,0 +1,63 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:16.1.2, Ensure that the IUT recognizes predefined functions and correctly evaluates them (as specified by Annex C) + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +module Sem_160102_predefined_functions_003 { + type enumerated MyEnumeratedType {e_black, e_white, e_green}; + + type record MyRecord { + record { + boolean innerField1 optional, + integer innerField2 optional + } field1 optional, + integer field2, + integer field3, + MyEnumeratedType field4 optional + } + + type union U { integer f1, octetstring f2 } + + type component GeneralComp { + } + + testcase TC_Sem_160102_predefined_functions_003 () runs on GeneralComp { + var MyRecord v_record1 := { + field1 := {innerField1 := omit, innerField2 := omit}, + field2 := 2, + field3 := 3, + field4 := omit + }; + var U v_U1 := {f1 := 1}; + template MyRecord template1 := { + field1 := {?, *}, + field2 := 2, + field3 := 3, + field4 := (e_black, e_white) ifpresent + } + template U template2 := {f2 := ?} + + if( match(ispresent(v_record1.field1), true) and + match(ispresent(v_record1.field4), false) and + match(ispresent(v_record1.field2), true) and + match(ispresent(template1.field1.innerField1), true) and + match(ischosen(v_U1.f1), true) and + match(ischosen(v_U1.f2), false) and + match(ischosen(template2.f2), true) and + match(ischosen(template2.f1), false) and + match(isvalue(template1.field2), true) and + match(isvalue(template2.f2), false) + ) { + setverdict(pass); + } + else { + setverdict(fail); + } + } + + control{ + execute(TC_Sem_160102_predefined_functions_003()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_004.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_004.ttcn new file mode 100644 index 00000000..fdd3538b --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_004.ttcn @@ -0,0 +1,36 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:16.1.2, Ensure that the IUT recognizes predefined functions and correctly evaluates them (as specified by Annex C) + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Sem_160102_predefined_functions_004 { + + type component GeneralComp { + } + + testcase TC_Sem_160102_predefined_functions_004 () runs on GeneralComp { + var charstring v_example:="example text string"; + + if( match(regexp(v_example,charstring:"?+(text)?+",0), "text") and //inline templates in this function are allowed by BNF 165. + match(regexp(v_example,charstring:"(?+)(text)(?+)",2), " string") and + match(regexp(v_example,charstring:"((?+)(text)(?+))",0), "example text string") and + match(substr('00100110'B,3,4), '0011'B) and + match(substr('ABCDEF'H,2,3), 'CDE'H) and + match(substr('01AB23CD'O,1,2), 'AB23'O) and + match(replace('00000110'B,1,3,'111'B), '01110110'B) and + match(replace('ABCDEF'H,0,2,'123'H), '123CDEF'H) and + match(replace('01AB23CD'O,2,1,'FF96'O), '01ABFF96CD'O) and + match(replace(v_example,0,7,"my"), "my text string") + ) { + setverdict(pass); + } + else { + setverdict(fail); + } + } + + control{ + execute(TC_Sem_160102_predefined_functions_004()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_005.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_005.ttcn new file mode 100644 index 00000000..f8b2703f --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_005.ttcn @@ -0,0 +1,49 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:16.1.2, Ensure that the IUT recognizes predefined functions and correctly evaluates them (as specified by Annex C) + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Sem_160102_predefined_functions_005 { + type enumerated MyEnumeratedType {e_black, e_white, e_green}; + + type record MyRecord { + record { + boolean innerField1 optional, + integer innerField2 optional + } field1 optional, + integer field2, + integer field3, + MyEnumeratedType field4 optional + } + + type component GeneralComp { + } + + testcase TC_Sem_160102_predefined_functions_005 () runs on GeneralComp { + var MyRecord v_record1 := { + field1 := {}, + field2 := 2, + field3 := 3, + field4 := omit + }; + var bitstring v_encoded; + var MyRecord v_decoded; + + v_encoded:=encvalue(v_record1); + if( match(decvalue(v_encoded,v_decoded), 0) and + match(v_record1,v_decoded) + ) { + setverdict(pass); + } + else { + setverdict(fail); + } + } with { + optional "implicit omit"; + } + + control{ + execute(TC_Sem_160102_predefined_functions_005()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_006.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_006.ttcn new file mode 100644 index 00000000..5162faa5 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_006.ttcn @@ -0,0 +1,27 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:16.1.2, Ensure that the IUT recognizes predefined functions and correctly evaluates them (as specified by Annex C) + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Sem_160102_predefined_functions_006 { + + type component GeneralComp { + } + + testcase TC_Sem_160102_predefined_functions_006 () runs on GeneralComp { + var float v_random1; + + v_random1:=rnd(0.0); + if( match(rnd(0.0), v_random1) and not match(rnd(1.0), v_random1) ) { + setverdict(pass); + } else { + setverdict(fail); + } + } + + control{ + execute(TC_Sem_160102_predefined_functions_006()); + } + +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_007.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_007.ttcn new file mode 100644 index 00000000..f046c629 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_007.ttcn @@ -0,0 +1,82 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:16.1.2, Ensure that the IUT recognizes predefined functions and correctly evaluates them (as specified by Annex C) + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +module Sem_160102_predefined_functions_007 { + type enumerated MyEnumeratedType {e_black, e_white}; + type record of integer IntegerList; + + type record MyRecord { + boolean field1, + record of integer field2, + integer field3, + MyEnumeratedType field4 optional + } + + type component GeneralComp { + } + + testcase TC_Sem_160102_predefined_functions_007 () runs on GeneralComp { + template MyRecord template1 := { + field1 := true, + field2 := { permutation(2, 3), ? }, + field3 := 5, + field4 := omit + } + template MyRecord template2 := { + field1 := true, + field2 := {permutation(2, 3)}, + field3 := 6, + field4 := omit + } + template IntegerList template3 := { 1, 2, 3, * } length(1..3) ; + + if(lengthof(charstring : "test")!=4) { + setverdict(fail, "lengthof(charstring : ""test"")"); + } + if (lengthof(universal charstring : "test")!=4) { + setverdict(fail, "lengthof(universal charstring : ""test"")"); + } + if (lengthof('010'B)!=3) { // STF409: value definitions are interpreted as templates here + setverdict(fail, "lengthof('010'B)"); + } + if (lengthof('55'H)!=2) { // STF409: value definitions are interpreted as templates here + setverdict(fail, "lengthof('55'H)"); + } + if (lengthof('55'O)!=1) { // STF409: value definitions are interpreted as templates here + setverdict(fail, "lengthof('55'O)"); + } + if (lengthof(charstring : pattern "t??t")!=4) { + setverdict(fail, "lengthof(charstring : pattern ""t??t"")"); + } + if (lengthof(bitstring : '1??1'B)!=4) { + setverdict(fail, "lengthof(bitstring : '1??1'B)"); + } + if (lengthof(hexstring : '1*1'H length(8))!=8) { + setverdict(fail, "lengthof(hexstring : '1*1'H length(8))"); + } + if (lengthof(octetstring : '00?FF'O length(3))!=3) { + setverdict(fail, "lengthof(octetstring : '00?FF'O length(3))"); + } + if (lengthof(octetstring : 'AB?'O)!=2) { + setverdict(fail, "lengthof(octetstring : 'AB?'O)"); + } + if (sizeof(template1.field2)!=3) { + setverdict(fail, "sizeof(", template1.field2, ")"); + } + if (sizeof(template2.field2)!=2) { + setverdict(fail, "sizeof(", template2.field2, ")"); + } + if (lengthof(template3)!=3) { + setverdict(fail, "lengthof(", template3, ")"); + } + setverdict(pass); + } + + control{ + execute(TC_Sem_160102_predefined_functions_007()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_008.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_008.ttcn new file mode 100644 index 00000000..31df498f --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_008.ttcn @@ -0,0 +1,41 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:16.1.2, Ensure that the IUT recognizes predefined functions and correctly evaluates them (as specified by Annex C) + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Sem_160102_predefined_functions_008 { + type enumerated MyEnumeratedType {e_black, e_white, e_green}; + + type record MyRecord { + record { + boolean innerField1 optional, + integer innerField2 optional + } field1 optional, + integer field2, + integer field3, + MyEnumeratedType field4 optional + } + + type component GeneralComp { + } + + testcase TC_Sem_160102_predefined_functions_008 () runs on GeneralComp { + template MyRecord template1 := { + field1 := {?, *}, + field2 := 2, + field3 := 3, + field4 := (e_black, e_white) ifpresent + } + + if (ispresent(template1.field1.innerField2)) { // not present + setverdict(fail); + } else { + setverdict(pass); + } + } + + control{ + execute(TC_Sem_160102_predefined_functions_008()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_009.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_009.ttcn new file mode 100644 index 00000000..f6062cd7 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_009.ttcn @@ -0,0 +1,41 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:16.1.2, Ensure that the IUT recognizes predefined functions and correctly evaluates them (as specified by Annex C) + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Sem_160102_predefined_functions_009 { + type enumerated MyEnumeratedType {e_black, e_white, e_green}; + + type record MyRecord { + record { + boolean innerField1 optional, + integer innerField2 optional + } field1 optional, + integer field2, + integer field3, + MyEnumeratedType field4 optional + } + + type component GeneralComp { + } + + testcase TC_Sem_160102_predefined_functions_009 () runs on GeneralComp { + template MyRecord template1 := { + field1 := {?, *}, + field2 := 2, + field3 := 3, + field4 := (e_black, e_white) ifpresent + } + + if (ispresent(template1.field4)) { // not present + setverdict(fail); + } else { + setverdict(pass); + } + } + + control{ + execute(TC_Sem_160102_predefined_functions_009()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_010.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_010.ttcn new file mode 100644 index 00000000..3fd46a8f --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_010.ttcn @@ -0,0 +1,44 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.2 + ** @purpose 1:16.1.2, Ensure that the IUT recognizes predefined functions and correctly evaluates them (as specified by Annex C) + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +// test enum2int predefined function with labels + +module Sem_160102_predefined_functions_010 { + type enumerated EnumeratedType {e_black, e_white}; + type enumerated EnumeratedTypeWithLabels1 {e_black (1), e_white}; + + type component GeneralComp { + } + + testcase TC_Sem_160102_predefined_functions_010 () runs on GeneralComp { + var EnumeratedType vl_enum_black := e_black; + var EnumeratedType vl_enum_white := e_white; + var EnumeratedTypeWithLabels1 vl_enum1_black := e_black; + var EnumeratedTypeWithLabels1 vl_enum1_white := e_white; + + if( match(enum2int(vl_enum_black), 0) and + match(enum2int(vl_enum_white), 1) + ) { + setverdict(pass); + } + else { + setverdict(fail, "fail 0"); + } + + if( match(enum2int(vl_enum1_black), 1) and + match(enum2int(vl_enum1_white), 0) + ) { + setverdict(pass); + } + else { + setverdict(fail, "fail 1"); + } + } + + control{ + execute(TC_Sem_160102_predefined_functions_010()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_011.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_011.ttcn new file mode 100644 index 00000000..6ec9a2aa --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_011.ttcn @@ -0,0 +1,84 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:16.1.2, Ensure that the IUT recognizes predefined functions and correctly evaluates them (as specified by Annex C) + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Sem_160102_predefined_functions_011 { + type enumerated EnumeratedType {e_black, e_white}; + type enumerated EnumeratedTypeWithLabels1 {e_black (1), e_white}; + type enumerated EnumeratedTypeWithLabels2 {e_black (-1), e_white}; + type enumerated EnumeratedTypeWithLabels3 {e_black (-1), e_white , e_yellow (0) }; + + type component GeneralComp { + } + + testcase TC_Sem_160102_predefined_functions_011 () runs on GeneralComp { + var EnumeratedType vl_enum_black := e_black; + var EnumeratedType vl_enum_white := e_white; + var EnumeratedTypeWithLabels1 vl_enum1_black := e_white; + var EnumeratedTypeWithLabels1 vl_enum1_white := e_black; + var EnumeratedTypeWithLabels2 vl_enum2_black := e_white; + var EnumeratedTypeWithLabels2 vl_enum2_white := e_black; + var EnumeratedTypeWithLabels3 vl_enum3_black := e_white; + var EnumeratedTypeWithLabels3 vl_enum3_white := e_black; + var EnumeratedTypeWithLabels3 vl_enum3_yellow := e_black; + + const EnumeratedType c_enum_black := e_black; + const EnumeratedType c_enum_white := e_white; + const EnumeratedTypeWithLabels1 c_enum1_black := e_black; + const EnumeratedTypeWithLabels1 c_enum1_white := e_white; + const EnumeratedTypeWithLabels2 c_enum2_black := e_black; + const EnumeratedTypeWithLabels2 c_enum2_white := e_white; + const EnumeratedTypeWithLabels3 c_enum3_black := e_black; + const EnumeratedTypeWithLabels3 c_enum3_white := e_white; + + int2enum(0,vl_enum_black); + int2enum(1,vl_enum_white); + if( match(vl_enum_black, c_enum_black) and + match(vl_enum_white, c_enum_white) + ) { + setverdict(pass); + } + else { + setverdict(fail, "fail 0"); + } + + int2enum(1,vl_enum1_black); + int2enum(0,vl_enum1_white); + if( match(vl_enum1_black, c_enum1_black) and + match(vl_enum1_white, c_enum1_white) + ) { + setverdict(pass); + } + else { + setverdict(fail, "fail 1"); + } + + int2enum(-1,vl_enum2_black); + int2enum(0,vl_enum2_white); + if( match(vl_enum2_black, c_enum2_black) and + match(vl_enum2_white, c_enum2_white) + ) { + setverdict(pass); + } + else { + setverdict(fail, "fail 2"); + } + + int2enum(-1,vl_enum3_black); + int2enum(1,vl_enum3_white); + if( match(vl_enum3_black, c_enum3_black) and + match(vl_enum3_white, c_enum3_white) + ) { + setverdict(pass); + } + else { + setverdict(fail, "fail 3"); + } + } + + control{ + execute(TC_Sem_160102_predefined_functions_011()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_012.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_012.ttcn new file mode 100644 index 00000000..a80bcdab --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_012.ttcn @@ -0,0 +1,43 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:16.1.2, Ensure that the IUT recognizes predefined functions and correctly evaluates them (as specified by Annex C) + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Sem_160102_predefined_functions_012 { + type enumerated EnumeratedType {e_black, e_white}; + type enumerated EnumeratedTypeWithLabels1 {e_black (-1), e_red (1), e_white(0) , e_yellow }; //e_yellow is 2 + + type component GeneralComp { + } + + testcase TC_Sem_160102_predefined_functions_012 () runs on GeneralComp { + var EnumeratedType vl_enum_black := e_black; + var EnumeratedType vl_enum_white := e_white; + var EnumeratedTypeWithLabels1 vl_enum1_red := e_white; + var EnumeratedTypeWithLabels1 vl_enum1_yellow := e_black; + + const EnumeratedType c_enum_black := e_black; + const EnumeratedType c_enum_white := e_white; + const EnumeratedTypeWithLabels1 c_enum1_red := e_red; + const EnumeratedTypeWithLabels1 c_enum1_yellow := e_yellow; + + int2enum(1,vl_enum1_red); + int2enum(2,vl_enum1_yellow); + + setverdict(pass); + + if (vl_enum1_red != c_enum1_red) { + setverdict(fail, "cannot decode e_red"); + } + + if (vl_enum1_yellow != c_enum1_yellow) { + setverdict(fail, "cannot decode e_yellow"); + } + } + + control{ + execute(TC_Sem_160102_predefined_functions_012()); + } + +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_013.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_013.ttcn new file mode 100644 index 00000000..3f8495d5 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_013.ttcn @@ -0,0 +1,45 @@ +/*************************************************** + ** @author STF 451 + ** @version 0.0.1 + ** @purpose 1:16.1.2, Ensure that the IUT recognizes predefined functions and correctly evaluates them (as specified by Annex C) + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +// test enum2int with labels +module Sem_160102_predefined_functions_013 { + + type enumerated EnumeratedTypeWithLabels2 {e_black (-1), e_white}; + type enumerated EnumeratedTypeWithLabels3 {e_black (-1), e_white , e_yellow (0) }; + + type component GeneralComp { + } + + testcase TC_Sem_160102_predefined_functions_013 () runs on GeneralComp { + var EnumeratedTypeWithLabels2 vl_enum2_black := e_black; + var EnumeratedTypeWithLabels2 vl_enum2_white := e_white; + var EnumeratedTypeWithLabels3 vl_enum3_black := e_black; + var EnumeratedTypeWithLabels3 vl_enum3_white := e_white; + var EnumeratedTypeWithLabels3 vl_enum3_yellow := e_yellow; + + if( match(enum2int(vl_enum2_black), -1) and + match(enum2int(vl_enum2_white), 0) + ) { + setverdict(pass); + } + else { + setverdict(fail); + } + + if( match(enum2int(vl_enum3_black), -1) and + match(enum2int(vl_enum3_white), 1) + ) { + setverdict(pass); + } + else { + setverdict(fail); + } + } + + control{ + execute(TC_Sem_160102_predefined_functions_013()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_014.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_014.ttcn new file mode 100644 index 00000000..af8c3b33 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_014.ttcn @@ -0,0 +1,36 @@ +/*************************************************** + ** @author STF 451 + ** @version 0.0.1 + ** @purpose 1:16.1.2, Ensure that the IUT recognizes predefined functions and correctly evaluates them (as specified by Annex C) + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Sem_160102_predefined_functions_014 { + + type enumerated EnumeratedTypeWithLabels1 {e_black (1), e_white}; + + type component GeneralComp { + } + + testcase TC_Sem_160102_predefined_functions_014 () runs on GeneralComp { + var EnumeratedTypeWithLabels1 vl_enum1_black := e_white; + var EnumeratedTypeWithLabels1 vl_enum1_white := e_black; + + const EnumeratedTypeWithLabels1 c_enum1_black := e_black; + const EnumeratedTypeWithLabels1 c_enum1_white := e_white; + + int2enum(1,vl_enum1_black); + int2enum(0,vl_enum1_white); + if( match(vl_enum1_black, c_enum1_black) and + match(vl_enum1_white, c_enum1_white) + ) { + setverdict(pass); + } + else { + setverdict(fail); + } + } + + control{ + execute(TC_Sem_160102_predefined_functions_014()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_015.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_015.ttcn new file mode 100644 index 00000000..ac853027 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_015.ttcn @@ -0,0 +1,39 @@ +/*************************************************** + ** @author STF 451 + ** @version 0.0.1 + ** @purpose 1:16.1.2, Ensure that the IUT recognizes predefined functions and correctly evaluates them (as specified by Annex C) + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Sem_160102_predefined_functions_015 { + type enumerated EnumeratedType {e_black, e_white}; + type enumerated EnumeratedTypeWithLabels1 {e_black (1), e_white}; + type enumerated EnumeratedTypeWithLabels2 {e_black (-1), e_white}; + type enumerated EnumeratedTypeWithLabels3 {e_black (-1), e_white , e_yellow (0) }; + + type component GeneralComp { + } + + testcase TC_Sem_160102_predefined_functions_015 () runs on GeneralComp { + var EnumeratedTypeWithLabels2 vl_enum2_black := e_white; + var EnumeratedTypeWithLabels2 vl_enum2_white := e_black; + + const EnumeratedTypeWithLabels2 c_enum2_black := e_black; + const EnumeratedTypeWithLabels2 c_enum2_white := e_white; + + int2enum(-1, vl_enum2_black); + int2enum(0, vl_enum2_white); + + setverdict(pass, "Both enumerated values matched"); + + if (vl_enum2_black != c_enum2_black) { + setverdict(fail, "black enumerated value not matching ", vl_enum2_black, c_enum2_black); + } + if (vl_enum2_white != c_enum2_white) { + setverdict(fail, "black enumerated value not matching ", vl_enum2_white, c_enum2_white); + } + } + + control{ + execute(TC_Sem_160102_predefined_functions_015()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_016.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_016.ttcn new file mode 100644 index 00000000..05710dee --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_016.ttcn @@ -0,0 +1,34 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:16.1.2, Ensure that predefined encvalue function works correctly (as specified in Annex C.5.1) + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirements are tested: +// (C.5.1) The encvalue function encodes a value or template into a bitstring. When the actual +// parameter that is passed to inpar is a template, it shall resolve to a specific value (the +// same restrictions apply as for the argument of the send statement). The returned bitstring +// represents the encoded value of inpar, however, the TTCN-3 test system need not make any +// check on its correctness. + +module Sem_160102_predefined_functions_016 { + type integer I with { variant "32 bit"}; + + type component GeneralComp { + } + + testcase TC_Sem_160102_predefined_functions_016 () runs on GeneralComp { + var template I v_test := 0; + var bitstring v_res := encvalue(v_test); + if (lengthof(v_res) == 32) { + setverdict(pass); + } else { + setverdict(fail, "Invalid encoding length"); + } + } + + control{ + execute(TC_Sem_160102_predefined_functions_016()); + } +} \ No newline at end of file diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_017.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_017.ttcn new file mode 100644 index 00000000..675f8f08 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_017.ttcn @@ -0,0 +1,42 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:16.1.2, Ensure that predefined decvalue function performs full decoding correctly + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirements are tested: +// (C.5.2) +// The decvalue function decodes a bitstring into a value. The test system shall suppose that +// the bitstring encoded_value represents an encoded instance of the actual type of decoded_value. +// If the decoding was successful, then the used bits are removed from the parameter encoded_value, +// the rest is returned (in the parameter encoded_value), and the decoded value is returned +// in the parameter decoded_value. The function shall return an integer value to indicate success +// or failure of the decoding below: +// • The return value 0 indicates that decoding was successful. + +module Sem_160102_predefined_functions_017 { + type integer I with { variant "32 bit"}; + + type component GeneralComp { + } + + testcase TC_Sem_160102_predefined_functions_017 () runs on GeneralComp { + var bitstring v_test := int2bit(0, 32); + var I v_decoded; + var integer v_res := decvalue(v_test, v_decoded); + // expected result: + // v_res: 0 (success) + // v_decoded: 0 + // v_test: ''B (fully decoded) + if (match(v_res, 0) and match(v_decoded, 0) and match(lengthof(v_test), 0)) { + setverdict(pass); + } else { + setverdict(fail, "Unexpected decoding result"); + } + } + + control{ + execute(TC_Sem_160102_predefined_functions_017()); + } +} \ No newline at end of file diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_018.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_018.ttcn new file mode 100644 index 00000000..53c5acbb --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_018.ttcn @@ -0,0 +1,43 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:16.1.2, Ensure that predefined decvalue function performs decoding if there are more bits than needed + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirements are tested: +// (C.5.2) +// The decvalue function decodes a bitstring into a value. The test system shall suppose that +// the bitstring encoded_value represents an encoded instance of the actual type of decoded_value. +// If the decoding was successful, then the used bits are removed from the parameter encoded_value, +// the rest is returned (in the parameter encoded_value), and the decoded value is returned +// in the parameter decoded_value. The function shall return an integer value to indicate success +// or failure of the decoding below: +// • The return value 0 indicates that decoding was successful. + +module Sem_160102_predefined_functions_018 { + type integer I with { variant "32 bit"}; + + type component GeneralComp { + } + + testcase TC_Sem_160102_predefined_functions_018 () runs on GeneralComp { + const bitstring c_suffix := '11111111'B; + var bitstring v_test := int2bit(0, 32) & c_suffix; // 8 excess bits + var I v_decoded; + var integer v_res := decvalue(v_test, v_decoded); + // expected result: + // v_res: 0 (success) + // v_decoded: 0 + // v_test: '11111111'B (8 excess bits shall be returned) + if (match(v_res, 0) and match(v_decoded, 0) and match(v_test, c_suffix)) { + setverdict(pass); + } else { + setverdict(fail, "Unexpected decoding result"); + } + } + + control{ + execute(TC_Sem_160102_predefined_functions_018()); + } +} \ No newline at end of file diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_019.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_019.ttcn new file mode 100644 index 00000000..2cf9c7ce --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_019.ttcn @@ -0,0 +1,41 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:16.1.2, Ensure that predefined decvalue function works properly in case of decoding failure + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirements are tested: +// (C.5.2) +// The decvalue function decodes a bitstring into a value. The test system shall suppose that +// the bitstring encoded_value represents an encoded instance of the actual type of decoded_value. +// If the decoding was unsuccessful, the actual parameters for encoded_value and decoded_value are +// not changed. The function shall return an integer value to indicate success or failure of the +// decoding below: +// • The return value 1 indicates an unspecified cause of decoding failure. + +module Sem_160102_predefined_functions_019 { + type enumerated E { one(1), two(2), three(3) } with { variant "32 bit"}; + + type component GeneralComp { + } + + testcase TC_Sem_160102_predefined_functions_019 () runs on GeneralComp { + var bitstring v_test := int2bit(0, 32); + var E v_decoded; + var integer v_res := decvalue(v_test, v_decoded); + // expected result: + // v_res: 1 (failure, unspecified) -> no named value corresponding to ordinal number 0 + // v_decoded: uninitialized + // v_test: original 32-bit value + if (match(v_res, 1) and not isbound(v_decoded) and match(lengthof(v_test), 32)) { + setverdict(pass); + } else { + setverdict(fail, "Unexpected decoding result"); + } + } + + control{ + execute(TC_Sem_160102_predefined_functions_019()); + } +} \ No newline at end of file diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_020.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_020.ttcn new file mode 100644 index 00000000..f1029dd3 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_020.ttcn @@ -0,0 +1,42 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:16.1.2, Ensure that predefined decvalue function works properly in case of not enough bits + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirements are tested: +// (C.5.2) +// The decvalue function decodes a bitstring into a value. The test system shall suppose that +// the bitstring encoded_value represents an encoded instance of the actual type of decoded_value. +// If the decoding was unsuccessful, the actual parameters for encoded_value and decoded_value are +// not changed. The function shall return an integer value to indicate success or failure of the +// decoding below: +// The return value 2 indicates that decoding could not be completed as encoded_value did not +// contain enough bits. + +module Sem_160102_predefined_functions_020 { + type integer I with { variant "32 bit"}; + + type component GeneralComp { + } + + testcase TC_Sem_160102_predefined_functions_020 () runs on GeneralComp { + var bitstring v_test := int2bit(0, 16); + var I v_decoded; + var integer v_res := decvalue(v_test, v_decoded); + // expected result: + // v_res: 2 (failed, not enough bits) -> there are only 16 bits available, while 32 is needed + // v_decoded: uninitialized + // v_test: original 16-bit value + if (match(v_res, 2) and not isbound(v_decoded) and match(lengthof(v_test), 16)) { + setverdict(pass); + } else { + setverdict(fail, "Unexpected decoding result"); + } + } + + control{ + execute(TC_Sem_160102_predefined_functions_020()); + } +} \ No newline at end of file diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_021.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_021.ttcn new file mode 100644 index 00000000..fe24722d --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_021.ttcn @@ -0,0 +1,43 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:16.1.2, Ensure that the IUT recognizes predefined functions and correctly evaluates them (as specified by Annex C) + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Sem_160102_predefined_functions_021 { + type enumerated MyEnumeratedType {e_black, e_white, e_green}; + + type record MyRecord { + record { + boolean innerField1 optional, + integer innerField2 optional + } field1 optional, + integer field2, + integer field3, + MyEnumeratedType field4 optional + } + + type component GeneralComp { + } + + + testcase TC_Sem_160102_predefined_functions_021 () runs on GeneralComp { + var MyRecord v_record1 := { field1 := omit, field2 := 2, field3 := 3, field4 := omit } ; + var boolean v_i; + + v_i:=ispresent(v_record1.field1.innerField1); //function returns false value + if(v_i==false) { + setverdict(pass); + } else { + setverdict(fail, "Unexpected decoding result"); + } + } + + + control{ + + execute(TC_Sem_160102_predefined_functions_021()); + + } + +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_022.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_022.ttcn new file mode 100644 index 00000000..fa1b2910 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_022.ttcn @@ -0,0 +1,33 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:16.1.2, Ensure that the IUT recognizes predefined functions and correctly evaluates them (as specified by Annex C) + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Sem_160102_predefined_functions_022 { + type union U { integer f1, octetstring f2 } + +type component GeneralComp { +} + + +testcase TC_Sem_160102_predefined_functions_022 () runs on GeneralComp { + template U template1 := ?; + var boolean v_i; + + v_i:=ischosen(template1.f1); //function returns false value + if(v_i==false) { + setverdict(pass); + } else { + setverdict(fail, "Unexpected decoding result"); + } +} + + +control{ + + execute(TC_Sem_160102_predefined_functions_022()); + +} + +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_023.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_023.ttcn new file mode 100644 index 00000000..08738b1a --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_023.ttcn @@ -0,0 +1,33 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:16.1.2, Ensure that the IUT recognizes predefined functions and correctly evaluates them (as specified by Annex C) + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Sem_160102_predefined_functions_023 { + type union U { integer f1, octetstring f2 } + +type component GeneralComp { +} + + +testcase TC_Sem_160102_predefined_functions_023 () runs on GeneralComp { + template U template1 := ({ f1 := 2 }, {f2 := 'AB'O }); + var boolean v_i; + + v_i:=ischosen(template1.f1); //function returns false value + if(v_i==false) { + setverdict(pass); + } else { + setverdict(fail, "Unexpected decoding result"); + } +} + + +control{ + + execute(TC_Sem_160102_predefined_functions_023()); + +} + +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_024.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_024.ttcn new file mode 100644 index 00000000..f1341f57 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_024.ttcn @@ -0,0 +1,32 @@ +/*************************************************** + ** @author STF 470 (updated by STF 521) + ** @version 0.0.1 + ** @purpose 1:16.1.2, Ensure that the IUT recognizes predefined functions and correctly evaluates them (as specified by Annex C) + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Sem_160102_predefined_functions_024 { + type union U { + integer f1, + octetstring f2 + } + + type component GeneralComp { + } + + + testcase TC_Sem_160102_predefined_functions_024() runs on GeneralComp { + template U template1 := {f2 := ?} + var boolean v_i; + + v_i := isvalue(template1.f1); //function returns false value + if(v_i==false) { + setverdict(pass); + } else { + setverdict(fail, "Unexpected decoding result"); + } + } + + control { + execute(TC_Sem_160102_predefined_functions_024()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_025.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_025.ttcn new file mode 100644 index 00000000..c6668740 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_025.ttcn @@ -0,0 +1,32 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:16.1.2, Ensure that the IUT recognizes predefined functions and correctly evaluates them (as specified by Annex C.33) + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Sem_160102_predefined_functions_025 { + + type component GeneralComp { + } + + + testcase TC_Sem_160102_predefined_functions_025 () runs on GeneralComp { + var charstring v_example:="example text string"; + var charstring v_i; + + v_i:=regexp(v_example,universal charstring: "?+(text)?+",0); //works according to resolution of CR 6424 + if(v_i=="text") { + setverdict(pass); + } else { + setverdict(fail, "Unexpected matching result"); + } + } + + + control{ + + execute(TC_Sem_160102_predefined_functions_025()); + + } + +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_026.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_026.ttcn new file mode 100644 index 00000000..acb7acdb --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_026.ttcn @@ -0,0 +1,41 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:16.1.2, Ensure that the IUT recognizes predefined functions and correctly evaluates them (as specified by Annex C) + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +/* The following requirements are tested: + * This function converts a universal charstring value to an octetstring.*/ + + +module Sem_160102_predefined_functions_026 { + + + type component GeneralComp { + } + + + testcase TC_Sem_160102_predefined_functions_026 () runs on GeneralComp { + + // universal charstring: + var universal charstring v_0 := "ABC123abc"; + + // predefined function for universal charstring to octetstring conversion: + var octetstring v_encoded := unichar2oct(v_0); //string_encoding parameter is omitted, the default value "UTF-8", expected value: '414243313233616263'O + var octetstring v_1 := '414243313233616263'O; + + + if( match(v_encoded,v_1) + ) { + setverdict(pass,"Encoded value for: ",v_0, " is ", v_encoded); + } + else { + setverdict(fail,"encoded value is: ", v_encoded, " expected ", v_1); + } + } + + control{ + execute(TC_Sem_160102_predefined_functions_026()); + } +} \ No newline at end of file diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_027.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_027.ttcn new file mode 100644 index 00000000..51e239ee --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_027.ttcn @@ -0,0 +1,41 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:16.1.2, Ensure that the IUT recognizes predefined functions and correctly evaluates them (as specified by Annex C) + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +/* The following requirements are tested: + * This function converts an UTF-8 universal charstring value to an octetstring.*/ + + +module Sem_160102_predefined_functions_027 { + + + type component GeneralComp { + } + + + testcase TC_Sem_160102_predefined_functions_027 () runs on GeneralComp { + + // universal charstring: + var universal charstring v_0 := "ABC123abc"; + + // predefined function for universal charstring to octetstring conversion: + var octetstring v_encoded := unichar2oct(v_0,"UTF-8"); //"UTF-8", expected value: '414243313233616263'O + var octetstring v_1 := '414243313233616263'O; + + + if( match(v_encoded,v_1) + ) { + setverdict(pass,"Encoded value for: ",v_0, " is ", v_encoded); + } + else { + setverdict(fail,"encoded value is: ", v_encoded, " expected ", v_1); + } + } + + control{ + execute(TC_Sem_160102_predefined_functions_027()); + } +} \ No newline at end of file diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_028.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_028.ttcn new file mode 100644 index 00000000..cd3a2eb5 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_028.ttcn @@ -0,0 +1,40 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:16.1.2, Ensure that the IUT recognizes predefined functions and correctly evaluates them (as specified by Annex C) + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +/* The following requirements are tested: + * This function converts an UTF-16 universal charstring value to an octetstring.*/ + +module Sem_160102_predefined_functions_028 { + + + type component GeneralComp { + } + + + testcase TC_Sem_160102_predefined_functions_028 () runs on GeneralComp { + + // universal charstring: + var universal charstring v_0 := "ABC123abc"; + + // predefined function for universal charstring to octetstring conversion: + var octetstring v_encoded := unichar2oct(v_0,"UTF-16"); //"UTF-16", expected value: '0041 0042 0043 0031 0032 0033 0061 0062 0063'O + var octetstring v_1 := '004100420043003100320033006100620063'O; + + + if( match(v_encoded,v_1) + ) { + setverdict(pass,"Encoded value for: ",v_0, " is ", v_encoded); + } + else { + setverdict(fail,"encoded value is: ", v_encoded, " expected ", v_1); + } + } + + control{ + execute(TC_Sem_160102_predefined_functions_028()); + } +} \ No newline at end of file diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_029.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_029.ttcn new file mode 100644 index 00000000..144ebffd --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_029.ttcn @@ -0,0 +1,40 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:16.1.2, Ensure that the IUT recognizes predefined functions and correctly evaluates them (as specified by Annex C) + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +/* The following requirements are tested: + * This function converts an UTF-32 universal charstring value to an octetstring.*/ + +module Sem_160102_predefined_functions_029 { + + + type component GeneralComp { + } + + + testcase TC_Sem_160102_predefined_functions_029 () runs on GeneralComp { + + // universal charstring: + var universal charstring v_0 := "ABC123abc"; + + // predefined function for universal charstring to octetstring conversion: + var octetstring v_encoded := unichar2oct(v_0,"UTF-32"); //"UTF-32", expected value: '0000 0041 0000 0042 0000 0043 0000 0031 0000 0032 0000 0033 0000 0061 0000 0062 0000 0063'O + var octetstring v_1 := '000000410000004200000043000000310000003200000033000000610000006200000063'O; + + + if( match(v_encoded,v_1) + ) { + setverdict(pass,"Encoded value for: ",v_0, " is ", v_encoded); + } + else { + setverdict(fail,"encoded value is: ", v_encoded, " expected ", v_1); + } + } + + control{ + execute(TC_Sem_160102_predefined_functions_029()); + } +} \ No newline at end of file diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_030.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_030.ttcn new file mode 100644 index 00000000..6cfb7e46 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_030.ttcn @@ -0,0 +1,40 @@ +/*************************************************** + ** @author STF 487 (updated by STF 521) + ** @version 0.0.2 + ** @purpose 1:16.1.2, Ensure that the IUT recognizes predefined functions and correctly evaluates them (as specified by Annex C) + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +/* The following requirements are tested: + * This function converts an UTF-16 universal charstring value to a Little endian octetstring.*/ + +module Sem_160102_predefined_functions_030 { + + + type component GeneralComp { + } + + + testcase TC_Sem_160102_predefined_functions_030 () runs on GeneralComp { + + // universal charstring: + var universal charstring v_0 := "ABC"; + + // predefined function for universal charstring to octetstring conversion: + var octetstring v_encoded := unichar2oct(v_0, "UTF-16LE"); //"UTF-16" little endian, expected value:'4100 4200 4300'O; + var octetstring v_1 := '410042004300'O; + + + if( match(v_encoded,v_1) + ) { + setverdict(pass,"Encoded value for: ",v_0, " is ", v_encoded); + } + else { + setverdict(fail,"encoded value is: ", v_encoded, " expected ", v_1); + } + } + + control{ + execute(TC_Sem_160102_predefined_functions_030()); + } +} \ No newline at end of file diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_031.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_031.ttcn new file mode 100644 index 00000000..3525778f --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_031.ttcn @@ -0,0 +1,40 @@ +/*************************************************** + ** @author STF 487 (updated by STF 521) + ** @version 0.0.2 + ** @purpose 1:16.1.2, Ensure that the IUT recognizes predefined functions and correctly evaluates them (as specified by Annex C) + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +/* The following requirements are tested: + * This function converts an UTF-32 universal charstring value to a Little endian octetstring.*/ + +module Sem_160102_predefined_functions_031 { + + + type component GeneralComp { + } + + + testcase TC_Sem_160102_predefined_functions_031 () runs on GeneralComp { + + // universal charstring: + var universal charstring v_0 := "ABC"; + + // predefined function for universal charstring to octetstring conversion: + var octetstring v_encoded := unichar2oct(v_0, "UTF-32LE"); //"UTF-32" little endian, expected value:'4100 0000 4200 0000 4300 0000'O + var octetstring v_1 := '410000004200000043000000'O; + + + if( match(v_encoded,v_1) + ) { + setverdict(pass,"Encoded value for: ",v_0, " is ", v_encoded); + } + else { + setverdict(fail,"encoded value is: ", v_encoded, " expected ", v_1); + } + } + + control{ + execute(TC_Sem_160102_predefined_functions_031()); + } +} \ No newline at end of file diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_032.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_032.ttcn new file mode 100644 index 00000000..5fc50b64 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_032.ttcn @@ -0,0 +1,40 @@ +/*************************************************** + ** @author STF 487 (updated by STF 521) + ** @version 0.0.2 + ** @purpose 1:16.1.2, Ensure that the IUT recognizes predefined functions and correctly evaluates them (as specified by Annex C) + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +/* The following requirements are tested: + * This function converts an UTF-16 universal charstring value to a Big endian octetstring.*/ + +module Sem_160102_predefined_functions_032 { + + + type component GeneralComp { + } + + + testcase TC_Sem_160102_predefined_functions_032 () runs on GeneralComp { + + // universal charstring: + var universal charstring v_0 := "AB"; + + // predefined function for universal charstring to octetstring conversion: + var octetstring v_encoded := unichar2oct(v_0, "UTF-16BE"); //"UTF-16" Big endian, expected value:'00410042'O; + var octetstring v_1 := '00410042'O; + + + if( match(v_encoded,v_1) + ) { + setverdict(pass,"Encoded value for: ",v_0, " is ", v_encoded); + } + else { + setverdict(fail,"encoded value is: ", v_encoded, " expected ", v_1); + } + } + + control{ + execute(TC_Sem_160102_predefined_functions_032()); + } +} \ No newline at end of file diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_033.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_033.ttcn new file mode 100644 index 00000000..59337dc3 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_033.ttcn @@ -0,0 +1,40 @@ +/*************************************************** + ** @author STF 487 (updated by STF 521) + ** @version 0.0.2 + ** @purpose 1:16.1.2, Ensure that the IUT recognizes predefined functions and correctly evaluates them (as specified by Annex C) + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +/* The following requirements are tested: + * This function converts an UTF-32 universal charstring value to a Big endian octetstring.*/ + +module Sem_160102_predefined_functions_033 { + + + type component GeneralComp { + } + + + testcase TC_Sem_160102_predefined_functions_033 () runs on GeneralComp { + + // universal charstring: + var universal charstring v_0 := "AB"; + + // predefined function for universal charstring to octetstring conversion: + var octetstring v_encoded := unichar2oct(v_0, "UTF-32BE"); //"UTF-32" Big endian, expected value:'00 00 00 41 00 00 00 42'O + var octetstring v_1 := '0000004100000042'O; + + + if( match(v_encoded,v_1) + ) { + setverdict(pass,"Encoded value for: ",v_0, " is ", v_encoded); + } + else { + setverdict(fail,"encoded value is: ", v_encoded, " expected ", v_1); + } + } + + control{ + execute(TC_Sem_160102_predefined_functions_033()); + } +} \ No newline at end of file diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_034.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_034.ttcn new file mode 100644 index 00000000..82e62fcf --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_034.ttcn @@ -0,0 +1,40 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:16.1.2, Ensure that the IUT recognizes predefined functions and correctly evaluates them (as specified by Annex C) + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +/* The following requirements are tested: + * This function converts an octetstring to universal charstring.*/ + + +module Sem_160102_predefined_functions_034 { + + + type component GeneralComp { + } + + + testcase TC_Sem_160102_predefined_functions_034 () runs on GeneralComp { + + //octetstring: + var octetstring v_0 := '414243313233616263'O; + + // predefined function for universal charstring to octetstring conversion: + var universal charstring v_decode := oct2unichar(v_0); //expected value: ABC123abc + var universal charstring v_1 := "ABC123abc"; + + if( match(v_decode,v_1) + ) { + setverdict(pass,"Decoded value for: ",v_0, " is ", v_decode); + } + else { + setverdict(fail,"encoded value is: ", v_decode, " expected ", v_1); + } + } + + control{ + execute(TC_Sem_160102_predefined_functions_034()); + } +} \ No newline at end of file diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_035.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_035.ttcn new file mode 100644 index 00000000..f9de0a15 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_035.ttcn @@ -0,0 +1,40 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:16.1.2, Ensure that the IUT recognizes predefined functions and correctly evaluates them (as specified by Annex C) + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +/* The following requirements are tested: + * This function converts an octetstring to an UTF-8 encoded universal charstring.*/ + + +module Sem_160102_predefined_functions_035 { + + + type component GeneralComp { + } + + + testcase TC_Sem_160102_predefined_functions_035 () runs on GeneralComp { + + //octetstring: + var octetstring v_0 := '414243'O; + + // predefined function for universal charstring to octetstring conversion: + var universal charstring v_decode := oct2unichar(v_0,"UTF-8"); //expected value: ABC + var universal charstring v_1 := "ABC"; + + if( match(v_decode,v_1) + ) { + setverdict(pass,"Decoded value for: ",v_0, " is ", v_decode); + } + else { + setverdict(fail,"encoded value is: ", v_decode, " expected ", v_1); + } + } + + control{ + execute(TC_Sem_160102_predefined_functions_035()); + } +} \ No newline at end of file diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_036.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_036.ttcn new file mode 100644 index 00000000..c2c6a9ce --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_036.ttcn @@ -0,0 +1,40 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:16.1.2, Ensure that the IUT recognizes predefined functions and correctly evaluates them (as specified by Annex C) + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +/* The following requirements are tested: + * This function converts an octetstring to an UTF-16 encoded universal charstring.*/ + + +module Sem_160102_predefined_functions_036 { + + + type component GeneralComp { + } + + + testcase TC_Sem_160102_predefined_functions_036 () runs on GeneralComp { + + //octetstring: + var octetstring v_0 := '004100420043'O; + + // predefined function for universal charstring to octetstring conversion: + var universal charstring v_decode := oct2unichar(v_0,"UTF-16"); //expected value: ABC + var universal charstring v_1 := "ABC"; + + if( match(v_decode,v_1) + ) { + setverdict(pass,"Decoded value for: ",v_0, " is ", v_decode); + } + else { + setverdict(fail,"encoded value is: ", v_decode, " expected ", v_1); + } + } + + control{ + execute(TC_Sem_160102_predefined_functions_036()); + } +} \ No newline at end of file diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_037.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_037.ttcn new file mode 100644 index 00000000..9c1cdb76 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_037.ttcn @@ -0,0 +1,40 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:16.1.2, Ensure that the IUT recognizes predefined functions and correctly evaluates them (as specified by Annex C) + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +/* The following requirements are tested: + * This function converts an octetstring to an UTF-32 encoded universal charstring.*/ + + +module Sem_160102_predefined_functions_037 { + + + type component GeneralComp { + } + + + testcase TC_Sem_160102_predefined_functions_037 () runs on GeneralComp { + + //octetstring: + var octetstring v_0 := '000000410000004200000043'O; + + // predefined function for universal charstring to octetstring conversion: + var universal charstring v_decode := oct2unichar(v_0,"UTF-32"); //expected value: ABC + var universal charstring v_1 := "ABC"; + + if( match(v_decode,v_1) + ) { + setverdict(pass,"Decoded value for: ",v_0, " is ", v_decode); + } + else { + setverdict(fail,"encoded value is: ", v_decode, " expected ", v_1); + } + } + + control{ + execute(TC_Sem_160102_predefined_functions_037()); + } +} \ No newline at end of file diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_038.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_038.ttcn new file mode 100644 index 00000000..7c7c588d --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_038.ttcn @@ -0,0 +1,40 @@ +/*************************************************** + ** @author STF 487 (updated by STF 521) + ** @version 0.0.2 + ** @purpose 1:16.1.2, Ensure that the IUT recognizes predefined functions and correctly evaluates them (as specified by Annex C) + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +/* The following requirements are tested: + * This function converts an octetstring to an UTF-16 Little Endian byte order universal charstring.*/ + + +module Sem_160102_predefined_functions_038 { + + + type component GeneralComp { + } + + + testcase TC_Sem_160102_predefined_functions_038 () runs on GeneralComp { + + //octetstring: + var octetstring v_0 := '410042004300'O; + + // predefined function for universal charstring to octetstring conversion: + var universal charstring v_decode := oct2unichar(v_0, "UTF-16LE"); //expected value: ABC + var universal charstring v_1 := "ABC"; + + if( match(v_decode,v_1) + ) { + setverdict(pass,"Decoded value for: ", v_0, " is ", v_decode); + } + else { + setverdict(fail,"encoded value is: ", v_decode, " expected ", v_1); + } + } + + control{ + execute(TC_Sem_160102_predefined_functions_038()); + } +} \ No newline at end of file diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_039.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_039.ttcn new file mode 100644 index 00000000..345cd2a7 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_039.ttcn @@ -0,0 +1,40 @@ +/*************************************************** + ** @author STF 487 (updated by STF 521) + ** @version 0.0.2 + ** @purpose 1:16.1.2, Ensure that the IUT recognizes predefined functions and correctly evaluates them (as specified by Annex C) + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +/* The following requirements are tested: + * This function converts an octetstring to an UTF-32 Little Endian byte order universal charstring.*/ + + +module Sem_160102_predefined_functions_039 { + + + type component GeneralComp { + } + + + testcase TC_Sem_160102_predefined_functions_039 () runs on GeneralComp { + + //octetstring: + var octetstring v_0 := '410000004200000043000000'O; + + // predefined function for universal charstring to octetstring conversion: + var universal charstring v_decode := oct2unichar(v_0, "UTF-32LE"); //expected value: ABC + var universal charstring v_1 := "ABC"; + + if( match(v_decode,v_1) + ) { + setverdict(pass,"Decoded value for: ", v_0, " is ", v_decode); + } + else { + setverdict(fail,"encoded value is: ", v_decode, " expected ", v_1); + } + } + + control{ + execute(TC_Sem_160102_predefined_functions_039()); + } +} \ No newline at end of file diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_040.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_040.ttcn new file mode 100644 index 00000000..bd27a003 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_040.ttcn @@ -0,0 +1,40 @@ +/*************************************************** + ** @author STF 487 (updated by STF 521) + ** @version 0.0.2 + ** @purpose 1:16.1.2, Ensure that the IUT recognizes predefined functions and correctly evaluates them (as specified by Annex C) + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +/* The following requirements are tested: + * This function converts an octetstring to an UTF-16 Big Endian byte order universal charstring.*/ + + +module Sem_160102_predefined_functions_040 { + + + type component GeneralComp { + } + + + testcase TC_Sem_160102_predefined_functions_040 () runs on GeneralComp { + + //octetstring: + var octetstring v_0 := '004100420043'O; + + // predefined function for universal charstring to octetstring conversion: + var universal charstring v_decode := oct2unichar(v_0, "UTF-16BE"); //expected value: ABC + var universal charstring v_1 := "ABC"; + + if( match(v_decode,v_1) + ) { + setverdict(pass,"Decoded value for: ", v_0, " is ", v_decode); + } + else { + setverdict(fail,"encoded value is: ", v_decode, " expected ", v_1); + } + } + + control{ + execute(TC_Sem_160102_predefined_functions_040()); + } +} \ No newline at end of file diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_041.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_041.ttcn new file mode 100644 index 00000000..73a61690 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_041.ttcn @@ -0,0 +1,40 @@ +/*************************************************** + ** @author STF 487 (updated by STF 521) + ** @version 0.0.2 + ** @purpose 1:16.1.2, Ensure that the IUT recognizes predefined functions and correctly evaluates them (as specified by Annex C) + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +/* The following requirements are tested: + * This function converts an octetstring to an UTF-32 Big Endian byte order universal charstring.*/ + + +module Sem_160102_predefined_functions_041 { + + + type component GeneralComp { + } + + + testcase TC_Sem_160102_predefined_functions_041 () runs on GeneralComp { + + //octetstring: + var octetstring v_0 := '000000410000004200000043'O; + + // predefined function for universal charstring to octetstring conversion: + var universal charstring v_decode := oct2unichar(v_0, "UTF-32BE"); //expected value: ABC + var universal charstring v_1 := "ABC"; + + if( match(v_decode,v_1) + ) { + setverdict(pass,"Decoded value for: ", v_0, " is ", v_decode); + } + else { + setverdict(fail,"encoded value is: ", v_decode, " expected ", v_1); + } + } + + control{ + execute(TC_Sem_160102_predefined_functions_041()); + } +} \ No newline at end of file diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_042.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_042.ttcn new file mode 100644 index 00000000..0e4112c9 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_042.ttcn @@ -0,0 +1,35 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:16.1.2, Ensure that the IUT recognizes predefined functions and correctly evaluates them (as specified by Annex C) + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +/* The following requirements are tested: + * this test investigates that IUT correctly evaluates predefined function any2unistr, + * the invalue parameter of the any2unistr function may be uninitialized or partially initialized; +*/ + +module Sem_160102_predefined_functions_042 { + + + type component GeneralComp { + } + + + testcase TC_Sem_160102_predefined_functions_042 () runs on GeneralComp { + + + var integer v_0 := 100; //integer with value + + + //integer with value + if( match(any2unistr(v_0),"100")) { setverdict(pass,"Result: ",any2unistr(v_0));} + else{setverdict(fail,"Result is: ",any2unistr(v_0), " Expected: 100");} + + } + + control{ + execute(TC_Sem_160102_predefined_functions_042()); + } +} \ No newline at end of file diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_043.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_043.ttcn new file mode 100644 index 00000000..cf724db6 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_043.ttcn @@ -0,0 +1,32 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:16.1.2, Ensure that the IUT recognizes predefined functions and correctly evaluates them (as specified by Annex C) + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +/* The following requirements are tested: + * this test investigates that IUT correctly evaluates predefined function any2unistr, + * the invalue parameter of the any2unistr function may be uninitialized or partially initialized; +*/ + +module Sem_160102_predefined_functions_043 { + + type component GeneralComp { + } + + + testcase TC_Sem_160102_predefined_functions_043 () runs on GeneralComp { + + var integer v_1; //uninitialized value + + //uninitialized value + if( match(any2unistr(v_1),"UNINITIALIZED")) { setverdict(pass,"Result: ",any2unistr(v_1));} + else{setverdict(fail,"Result is: ",any2unistr(v_1), " Expected: UNINITIALIZED");} + + } + + control{ + execute(TC_Sem_160102_predefined_functions_043()); + } +} \ No newline at end of file diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_044.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_044.ttcn new file mode 100644 index 00000000..5e637a2e --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_044.ttcn @@ -0,0 +1,32 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:16.1.2, Ensure that the IUT recognizes predefined functions and correctly evaluates them (as specified by Annex C) + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +/* The following requirements are tested: + * this test investigates that IUT correctly evaluates predefined function any2unistr, + * the invalue parameter of the any2unistr function may be uninitialized or partially initialized; +*/ + +module Sem_160102_predefined_functions_044 { + + type component GeneralComp { + } + + + testcase TC_Sem_160102_predefined_functions_044 () runs on GeneralComp { + + var bitstring v_2 := '11101'B; //bitstring + + //bitstring + if(match(any2unistr(v_2),"'11101'B")) { setverdict(pass,"Result: ",any2unistr(v_2));} + else{setverdict(fail,"Result is: ",any2unistr(v_2), " Expected:'11101'B");} + + } + + control{ + execute(TC_Sem_160102_predefined_functions_044()); + } +} \ No newline at end of file diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_045.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_045.ttcn new file mode 100644 index 00000000..aa1d1e74 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_045.ttcn @@ -0,0 +1,33 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:16.1.2, Ensure that the IUT recognizes predefined functions and correctly evaluates them (as specified by Annex C) + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +/* The following requirements are tested: + * this test investigates that IUT correctly evaluates predefined function any2unistr, + * the invalue parameter of the any2unistr function may be uninitialized or partially initialized; +*/ + +module Sem_160102_predefined_functions_045 { + + type record of integer MyRoI; + type component GeneralComp { + } + + + testcase TC_Sem_160102_predefined_functions_045 () runs on GeneralComp { + + template MyRoI v_3 := *; //template record of integer anyvalue + + //template record of integer anyvalue (*) + if(match(any2unistr(v_3),"*")) { setverdict(pass,"Result: ",any2unistr(v_3));} + else{setverdict(fail,"Result is: ",any2unistr(v_3), " Expected:*");} + + } + + control{ + execute(TC_Sem_160102_predefined_functions_045()); + } +} \ No newline at end of file diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_046.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_046.ttcn new file mode 100644 index 00000000..a493b040 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_046.ttcn @@ -0,0 +1,38 @@ +/*************************************************** + ** @author STF 487 (updated by STF 521) + ** @version 0.0.2 + ** @purpose 1:16.1.2, Ensure that the IUT recognizes predefined functions and correctly evaluates them (as specified by Annex C) + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +/* The following requirements are tested: + * this test investigates that IUT correctly evaluates predefined function any2unistr, + * the invalue parameter of the any2unistr function may be uninitialized or partially initialized; +*/ + +module Sem_160102_predefined_functions_046 { + + type record MyRec { + integer field1, + boolean field2, + integer field3 optional + }; + type component GeneralComp { + } + + + testcase TC_Sem_160102_predefined_functions_046 () runs on GeneralComp { + template MyRec v_4 := {1,false,-}; // record containing integer, boolean and optional elements + // record containing integer, boolean and optional elements + // NOTE: different tools might use different whitespace formats + if(match(any2unistr(v_4), pattern "\s#(){\s#()field1\s#():=\s#()1\s#(),\s#()field2\s#():=\s#()false\s#(),\s#()field3\s#():=\s#()((UNINITIALIZED)|\-)\s#()}\s#()" )) { + setverdict(pass,"Result: ",any2unistr(v_4)); + } else { + setverdict(fail,"Result is: ",any2unistr(v_4), " Expected:{ field1 := 1, field2 := false, field3 := UNINITIALIZED }"); + } + } + + control{ + execute(TC_Sem_160102_predefined_functions_046()); + } +} \ No newline at end of file diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_047.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_047.ttcn new file mode 100644 index 00000000..ea8655f2 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_047.ttcn @@ -0,0 +1,36 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:16.1.2, Ensure that the IUT recognizes predefined functions and correctly evaluates them (as specified by Annex C.3.5) + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +/* The following requirements are tested: + * this test investigates that IUT correctly evaluates predefined function istemplateking().*/ + +module Sem_160102_predefined_functions_047 { + + + type component GeneralComp { + } + + /*Type definition:*/ + type record of integer MyRecofInt; + + testcase TC_Sem_160102_predefined_functions_047 () runs on GeneralComp { + + var template MyRecofInt v_0 := {1,2,3} ifpresent; // ifpresent + + + + if ( match(istemplatekind(v_0, "ifpresent"), true)) {setverdict(pass," ifpresent: ", istemplatekind(v_0, "ifpresent"));} + else{setverdict(fail," ifpresent:",istemplatekind(v_0, "ifpresent"), " expected result: true");} + + } + control{ + + execute(TC_Sem_160102_predefined_functions_047()); + + } + +} \ No newline at end of file diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_048.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_048.ttcn new file mode 100644 index 00000000..2d4f10e4 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_048.ttcn @@ -0,0 +1,34 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:16.1.2, Ensure that the IUT recognizes predefined functions and correctly evaluates them (as specified by Annex C.3.5) + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +/* The following requirements are tested: + * this test investigates that IUT correctly evaluates predefined function istemplateking().*/ + +module Sem_160102_predefined_functions_048 { + + + type component GeneralComp { + } + + /*Type definition:*/ + type record of integer MyRecofInt; + + testcase TC_Sem_160102_predefined_functions_048 () runs on GeneralComp { + + var template MyRecofInt v_1 := {1,2,3,4,5}; // specific value of integer type + + if ( match(istemplatekind(v_1, "value"), true)) {setverdict(pass," value: ", istemplatekind(v_1, "value"));} + else{setverdict(fail," value:",istemplatekind(v_1, "value"), " expected result: true");} + + } + control{ + + execute(TC_Sem_160102_predefined_functions_048()); + + } + +} \ No newline at end of file diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_049.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_049.ttcn new file mode 100644 index 00000000..6f6005a9 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_049.ttcn @@ -0,0 +1,35 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:16.1.2, Ensure that the IUT recognizes predefined functions and correctly evaluates them (as specified by Annex C.3.5) + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +/* The following requirements are tested: + * this test investigates that IUT correctly evaluates predefined function istemplateking().*/ + +module Sem_160102_predefined_functions_049 { + + + type component GeneralComp { + } + + /*Type definition:*/ + type record of integer MyRecofInt; + + testcase TC_Sem_160102_predefined_functions_049 () runs on GeneralComp { + + var template MyRecofInt v_1 := {1,2,3,4,5}; // specific value of integer type + var template integer v_2 := (all from v_1, 10); //Template list + + if ( match(istemplatekind(v_2, "list"), true)) {setverdict(pass," list: ", istemplatekind(v_2, "list"));} + else{setverdict(fail," value:",istemplatekind(v_2, "list"), " expected result: true");} + + } + control{ + + execute(TC_Sem_160102_predefined_functions_049()); + + } + +} \ No newline at end of file diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_050.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_050.ttcn new file mode 100644 index 00000000..3e13f352 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_050.ttcn @@ -0,0 +1,34 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:16.1.2, Ensure that the IUT recognizes predefined functions and correctly evaluates them (as specified by Annex C.3.5) + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +/* The following requirements are tested: + * this test investigates that IUT correctly evaluates predefined function istemplateking().*/ + +module Sem_160102_predefined_functions_050 { + + + type component GeneralComp { + } + + /*Type definition:*/ + type record of integer MyRecofInt; + + testcase TC_Sem_160102_predefined_functions_050 () runs on GeneralComp { + var template MyRecofInt v_1 := {1,2,3,4,5}; // specific value of integer type + var template integer v_3 := complement(all from v_1, 10); //component + + if ( match(istemplatekind(v_3, "complement"), true)) {setverdict(pass," component: ", istemplatekind(v_3, "complement"));} + else{setverdict(fail," componenet:",istemplatekind(v_3, "complement"), " expected result: true");} + + } + control{ + + execute(TC_Sem_160102_predefined_functions_050()); + + } + +} \ No newline at end of file diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_051.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_051.ttcn new file mode 100644 index 00000000..d7745edb --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_051.ttcn @@ -0,0 +1,34 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:16.1.2, Ensure that the IUT recognizes predefined functions and correctly evaluates them (as specified by Annex C.3.5) + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +/* The following requirements are tested: + * this test investigates that IUT correctly evaluates predefined function istemplateking().*/ + +module Sem_160102_predefined_functions_051 { + + + type component GeneralComp { + } + + /*Type definition:*/ + type record of integer MyRecofInt; + + testcase TC_Sem_160102_predefined_functions_051 () runs on GeneralComp { + + var template MyRecofInt v_4 :=?; //anytype (?) + + if ( match(istemplatekind(v_4, "AnyValue"), true)) {setverdict(pass," AnyValue: ", istemplatekind(v_4, "AnyValue"));} + else{setverdict(fail," AnyValue:",istemplatekind(v_4, "AnyValue"), " expected result: true");} + + } + control{ + + execute(TC_Sem_160102_predefined_functions_051()); + + } + +} \ No newline at end of file diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_052.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_052.ttcn new file mode 100644 index 00000000..b0812632 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_052.ttcn @@ -0,0 +1,34 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:16.1.2, Ensure that the IUT recognizes predefined functions and correctly evaluates them (as specified by Annex C.3.5) + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +/* The following requirements are tested: + * this test investigates that IUT correctly evaluates predefined function istemplateking().*/ + +module Sem_160102_predefined_functions_052 { + + + type component GeneralComp { + } + + /*Type definition:*/ + type record of integer MyRecofInt; + + testcase TC_Sem_160102_predefined_functions_052 () runs on GeneralComp { + + var template MyRecofInt v_5 := *; //anyvalue (*) + + if ( match(istemplatekind(v_5, "AnyValueOrNone"), true)) {setverdict(pass," AnyValueOrNone: ", istemplatekind(v_5, "AnyValueOrNone"));} + else{setverdict(fail," AnyValueOrNone:",istemplatekind(v_5, "AnyValueOrNone"), " expected result: true");} + + } + control{ + + execute(TC_Sem_160102_predefined_functions_052()); + + } + +} \ No newline at end of file diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_053.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_053.ttcn new file mode 100644 index 00000000..ceea0269 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_053.ttcn @@ -0,0 +1,30 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:16.1.2, Ensure that the IUT recognizes predefined functions and correctly evaluates them (as specified by Annex C.3.5) + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +/* The following requirements are tested: + * this test investigates that IUT correctly evaluates predefined function istemplateking().*/ + +module Sem_160102_predefined_functions_053 { + + + type component GeneralComp { + } + + testcase TC_Sem_160102_predefined_functions_053 () runs on GeneralComp { + + var template integer v_6 := (-100 .. -1); // tamplate with ranged values + + if ( match(istemplatekind(v_6, "range"), true)) {setverdict(pass," range: ", istemplatekind(v_6, "range"));} + else{setverdict(fail," range:",istemplatekind(v_6, "range"), " expected result: true");} + } + control{ + + execute(TC_Sem_160102_predefined_functions_053()); + + } + +} \ No newline at end of file diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_054.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_054.ttcn new file mode 100644 index 00000000..23d85e8b --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_054.ttcn @@ -0,0 +1,31 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:16.1.2, Ensure that the IUT recognizes predefined functions and correctly evaluates them (as specified by Annex C.3.5) + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +/* The following requirements are tested: + * this test investigates that IUT correctly evaluates predefined function istemplateking().*/ + +module Sem_160102_predefined_functions_054 { + + + type component GeneralComp { + } + type set of integer MySet(0 .. 10); + + testcase TC_Sem_160102_predefined_functions_054 () runs on GeneralComp { + + var template MySet v_7 := superset (1, 2, 3); //superset + + if ( match(istemplatekind(v_7, "superset"), true)) {setverdict(pass," superset: ", istemplatekind(v_7, "superset"));} + else{setverdict(fail," superset:",istemplatekind(v_7, "superset"), " expected result: true");} + } + control{ + + execute(TC_Sem_160102_predefined_functions_054()); + + } + +} \ No newline at end of file diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_055.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_055.ttcn new file mode 100644 index 00000000..eeab9a94 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_055.ttcn @@ -0,0 +1,31 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:16.1.2, Ensure that the IUT recognizes predefined functions and correctly evaluates them (as specified by Annex C.3.5) + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +/* The following requirements are tested: + * this test investigates that IUT correctly evaluates predefined function istemplateking().*/ + +module Sem_160102_predefined_functions_055 { + + + type component GeneralComp { + } + type set of integer MySet(0 .. 10); + + testcase TC_Sem_160102_predefined_functions_055 () runs on GeneralComp { + + var template MySet v_8 := subset (1, 2, 3); //subset + + if ( match(istemplatekind(v_8, "subset"), true)) {setverdict(pass," superset: ", istemplatekind(v_8, "subset"));} + else{setverdict(fail," subset:",istemplatekind(v_8, "subset"), " expected result: true");} + } + control{ + + execute(TC_Sem_160102_predefined_functions_055()); + + } + +} \ No newline at end of file diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_056.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_056.ttcn new file mode 100644 index 00000000..e1b637bb --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_056.ttcn @@ -0,0 +1,32 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:16.1.2, Ensure that the IUT recognizes predefined functions and correctly evaluates them (as specified by Annex C.3.5) + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +/* The following requirements are tested: + * this test investigates that IUT correctly evaluates predefined function istemplateking().*/ + +module Sem_160102_predefined_functions_056 { + + + type component GeneralComp { + } + /*Type definitions:*/ + type record of integer MyRecofInt; + + testcase TC_Sem_160102_predefined_functions_056 () runs on GeneralComp { + + var template MyRecofInt v_9 := omit length (1 .. 6); // omit and length restriction + + if ( match(istemplatekind(v_9, "omit"), true)) {setverdict(pass," omit: ", istemplatekind(v_9, "omit"));} + else{setverdict(fail," omit:",istemplatekind(v_9, "omit"), " expected result: true");} + } + control{ + + execute(TC_Sem_160102_predefined_functions_056()); + + } + +} \ No newline at end of file diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_057.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_057.ttcn new file mode 100644 index 00000000..d68290b9 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_057.ttcn @@ -0,0 +1,33 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:16.1.2, Ensure that the IUT recognizes predefined functions and correctly evaluates them (as specified by Annex C.3.5) + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +/* The following requirements are tested: + * this test investigates that IUT correctly evaluates predefined function istemplateking().*/ + +module Sem_160102_predefined_functions_057 { + + + type component GeneralComp { + } + /*Type definitions:*/ + type record of integer MyRecofInt; + + testcase TC_Sem_160102_predefined_functions_057 () runs on GeneralComp { + + var template MyRecofInt v_9 := * length (1 .. 6); // omit and length restriction + + + if ( match(istemplatekind(v_9, "length"), true)) {setverdict(pass," length: ", istemplatekind(v_9, "length"));} + else{setverdict(fail," length:",istemplatekind(v_9, "length"), " expected result: true");} + } + control{ + + execute(TC_Sem_160102_predefined_functions_057()); + + } + +} \ No newline at end of file diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_058.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_058.ttcn new file mode 100644 index 00000000..96b45d8b --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_058.ttcn @@ -0,0 +1,33 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:16.1.2, Ensure that the IUT recognizes predefined functions and correctly evaluates them (as specified by Annex C.3.5) + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +/* The following requirements are tested: + * this test investigates that IUT correctly evaluates predefined function istemplateking().*/ + +module Sem_160102_predefined_functions_058 { + + + type component GeneralComp { + } + /*Type definitions:*/ + type record of integer MyRecofInt; + + testcase TC_Sem_160102_predefined_functions_058 () runs on GeneralComp { + + var template MyRecofInt v_10 := {permutation(1, 2, 3),?,*} ; // permutation, Any element(?) and AnyElementsOrNone(*) + + + if ( match(istemplatekind(v_10, "AnyElement"), true)) {setverdict(pass," AnyElement: ", istemplatekind(v_10, "AnyElement"));} + else{setverdict(fail," AnyElement:",istemplatekind(v_10, "AnyElement"), " expected result: true");} + } + control{ + + execute(TC_Sem_160102_predefined_functions_058()); + + } + +} \ No newline at end of file diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_059.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_059.ttcn new file mode 100644 index 00000000..d9a19ab9 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_059.ttcn @@ -0,0 +1,33 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:16.1.2, Ensure that the IUT recognizes predefined functions and correctly evaluates them (as specified by Annex C.3.5) + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +/* The following requirements are tested: + * this test investigates that IUT correctly evaluates predefined function istemplateking().*/ + +module Sem_160102_predefined_functions_059 { + + + type component GeneralComp { + } + /*Type definitions:*/ + type record of integer MyRecofInt; + + testcase TC_Sem_160102_predefined_functions_059() runs on GeneralComp { + + var template MyRecofInt v_10 := {permutation(1, 2, 3),?,*} ; // permutation, Any element(?) and AnyElementsOrNone(*) + + + if ( match(istemplatekind(v_10, "AnyElementsOrNone"), true)) {setverdict(pass," AnyElementsOrNone: ", istemplatekind(v_10, "AnyElementsOrNone"));} + else{setverdict(fail," AnyElementsOrNone:",istemplatekind(v_10, "AnyElementsOrNone"), " expected result: true");} + } + control{ + + execute(TC_Sem_160102_predefined_functions_059()); + + } + +} \ No newline at end of file diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_060.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_060.ttcn new file mode 100644 index 00000000..5596c5d0 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_060.ttcn @@ -0,0 +1,33 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:16.1.2, Ensure that the IUT recognizes predefined functions and correctly evaluates them (as specified by Annex C.3.5) + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +/* The following requirements are tested: + * this test investigates that IUT correctly evaluates predefined function istemplateking().*/ + +module Sem_160102_predefined_functions_060 { + + + type component GeneralComp { + } + /*Type definitions:*/ + type record of integer MyRecofInt; + + testcase TC_Sem_160102_predefined_functions_060() runs on GeneralComp { + + var template MyRecofInt v_10 := {permutation(1, 2, 3),?,*} ; // permutation, Any element(?) and AnyElementsOrNone(*) + + + if ( match(istemplatekind(v_10, "permutation"), true)) {setverdict(pass," permutation: ", istemplatekind(v_10, "permutation"));} + else{setverdict(fail," permutation:",istemplatekind(v_10, "permutation"), " expected result: true");} + } + control{ + + execute(TC_Sem_160102_predefined_functions_060()); + + } + +} \ No newline at end of file diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_061.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_061.ttcn new file mode 100644 index 00000000..39ef3f4b --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_061.ttcn @@ -0,0 +1,33 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:16.1.2, Ensure that the IUT recognizes predefined functions and correctly evaluates them (as specified by Annex C.3.5) + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +/* The following requirements are tested: + * this test investigates that IUT correctly evaluates predefined function istemplateking().*/ + +module Sem_160102_predefined_functions_061 { + + + type component GeneralComp { + } + /*Type definitions:*/ + type record of integer MyRecofInt; + + testcase TC_Sem_160102_predefined_functions_061() runs on GeneralComp { + + var template charstring v_11 := pattern "abc"; //pattern template + + if ( match(istemplatekind(v_11, "pattern"), true)) {setverdict(pass," pattern: ", istemplatekind(v_11, "pattern"));} + else{setverdict(fail," pattern:",istemplatekind(v_11, "pattern"), " expected result: true");} + + } + control{ + + execute(TC_Sem_160102_predefined_functions_061()); + + } + +} \ No newline at end of file diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_062.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_062.ttcn new file mode 100644 index 00000000..17396ebe --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_062.ttcn @@ -0,0 +1,30 @@ +/*************************************************** + ** @author STF 487 (updated by STF 521) + ** @version 0.0.2 + ** @purpose 1:16.1.2, Ensure that the IUT recognizes predefined functions and correctly evaluates them (as specified by Annex C.3.5) + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +module Sem_160102_predefined_functions_062 { + + type component GeneralComp { + } + + type record of integer MyRecofInt; + + testcase TC_Sem_160102_predefined_functions_062() runs on GeneralComp { + var template MyRecofInt v_1 := {1,2,3,4,5}; // specific value of integer type + var template bitstring enc := decmatch v_1; //encoded template + + if (match(istemplatekind(enc, "decmatch"), true)) { + setverdict(pass, "decmatch: ", istemplatekind(enc, "decmatch")); + } else { + setverdict(fail, "decmatch: ", istemplatekind(enc, "decmatch"), "; expected result: true"); + } + + } + + control { + execute(TC_Sem_160102_predefined_functions_062()); + } +} \ No newline at end of file diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_063.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_063.ttcn new file mode 100644 index 00000000..16e65791 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_063.ttcn @@ -0,0 +1,40 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:16.1.2, Ensure that predefined encvalue_unichar function works properly in case of encoding universal charstring + ** @verdict pass accept, ttcn3verdict:pass + + ***************************************************/ + +/* The following requirements are tested: + + * this test focuses on the predefined functions encvalue_unichar (utf8)*/ + + + +module Sem_160102_predefined_functions_063 { + + type component GeneralComp { + + } + + testcase TC_Sem_160102_predefined_functions_063 () runs on GeneralComp { + + var charstring v_test := "abc"; + + //Encoding: + + var universal charstring v_test_enc_8 := encvalue_unichar(v_test,"UTF-8"); //encode to universal charstring UTF-8 + setverdict(pass,"Encoded value: ", v_test_enc_8); + + } + + + + control{ + + execute(TC_Sem_160102_predefined_functions_063()); + + } + +} \ No newline at end of file diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_064.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_064.ttcn new file mode 100644 index 00000000..2a3b92bc --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_064.ttcn @@ -0,0 +1,41 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:16.1.2, Ensure that predefined encvalue_unichar function works properly in case of encoding universal charstring + ** @verdict pass accept, ttcn3verdict:pass + + ***************************************************/ + + +/* The following requirements are tested: + + * this test focuses on the predefined functions encvalue_unichar (utf-16)*/ + + + +module Sem_160102_predefined_functions_064 { + + type component GeneralComp { + + } + + testcase TC_Sem_160102_predefined_functions_064 () runs on GeneralComp { + + var charstring v_test := "abc"; + + //Encoding: + + var universal charstring v_test_enc_16 := encvalue_unichar(v_test,"UTF-16"); //encode to universal charstring UTF-16 + setverdict(pass,"Encoded value: ", v_test_enc_16); + + } + + + + control{ + + execute(TC_Sem_160102_predefined_functions_064()); + + } + +} \ No newline at end of file diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_065.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_065.ttcn new file mode 100644 index 00000000..18ff7422 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_065.ttcn @@ -0,0 +1,40 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:16.1.2, Ensure that predefined decvalue function works properly in case of encoding universal charstring + ** @verdict pass accept, ttcn3verdict:pass + + ***************************************************/ + +/* The following requirements are tested: + + * this test focuses on the predefined functions encvalue_unichar (utf-16) */ + + + +module Sem_160102_predefined_functions_065 { + + type component GeneralComp { + + } + + testcase TC_Sem_160102_predefined_functions_065 () runs on GeneralComp { + + var charstring v_test := "abc"; + + //Encoding: + + var universal charstring v_test_enc_32 := encvalue_unichar(v_test,"UTF-32"); //encode to universal charstring UTF-32 + setverdict(pass,"Encoded value: ", v_test_enc_32); + + } + + + + control{ + + execute(TC_Sem_160102_predefined_functions_065()); + + } + +} \ No newline at end of file diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_066.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_066.ttcn new file mode 100644 index 00000000..09e5897f --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_066.ttcn @@ -0,0 +1,38 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:16.1.2, Ensure that predefined encvalue_unichar function works properly in case of encoding universal charstring + ** @verdict pass accept, ttcn3verdict:pass + + ***************************************************/ + +/* The following requirements are tested: + + * this test focuses on the predefined functions encvalue_unichar (utf-16 little endian)*/ + + + +module Sem_160102_predefined_functions_066 { + + type component GeneralComp { + + } + + testcase TC_Sem_160102_predefined_functions_066 () runs on GeneralComp { + + var charstring v_test := "abc"; + + //Encoding: + + var universal charstring v_test_enc_16LE := encvalue_unichar(v_test,"UTF-16LE"); //encode to universal charstring UTF-16 little endian + setverdict(pass,"Encoded value: ", v_test_enc_16LE); + + } + + control{ + + execute(TC_Sem_160102_predefined_functions_066()); + + } + +} \ No newline at end of file diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_067.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_067.ttcn new file mode 100644 index 00000000..686d2cce --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_067.ttcn @@ -0,0 +1,38 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:16.1.2, Ensure that predefined encvalue_unichar function works properly in case of encoding universal charstring + ** @verdict pass accept, ttcn3verdict:pass + + ***************************************************/ + +/* The following requirements are tested: + + * this test focuses on the predefined functions encvalue_unichar (utf-16 big endian)*/ + + + +module Sem_160102_predefined_functions_067 { + + type component GeneralComp { + + } + + testcase TC_Sem_160102_predefined_functions_067 () runs on GeneralComp { + + var charstring v_test := "abc"; + + //Encoding: + + var universal charstring v_test_enc_16BE := encvalue_unichar(v_test,"UTF-16BE"); //encode to universal charstring UTF-16 big endian + setverdict(pass,"Encoded value: ", v_test_enc_16BE); + + } + + control{ + + execute(TC_Sem_160102_predefined_functions_067()); + + } + +} \ No newline at end of file diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_068.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_068.ttcn new file mode 100644 index 00000000..0a4f7516 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_068.ttcn @@ -0,0 +1,38 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:16.1.2, Ensure that predefined encvalue_unichar function works properly in case of encoding universal charstring + ** @verdict pass accept, ttcn3verdict:pass + + ***************************************************/ + +/* The following requirements are tested: + + * this test focuses on the predefined functions encvalue_unichar (utf-32 little endian)*/ + + + +module Sem_160102_predefined_functions_068 { + + type component GeneralComp { + + } + + testcase TC_Sem_160102_predefined_functions_068 () runs on GeneralComp { + + var charstring v_test := "abc"; + + //Encoding: + + var universal charstring v_test_enc_32LE := encvalue_unichar(v_test,"UTF-32LE"); //encode to universal charstring UTF-32 little endian + setverdict(pass,"Encoded value: ", v_test_enc_32LE); + + } + + control{ + + execute(TC_Sem_160102_predefined_functions_068()); + + } + +} \ No newline at end of file diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_069.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_069.ttcn new file mode 100644 index 00000000..7d7741d6 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_069.ttcn @@ -0,0 +1,38 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:16.1.2, Ensure that predefined encvalue_unichar function works properly in case of encoding universal charstring + ** @verdict pass accept, ttcn3verdict:pass + + ***************************************************/ + +/* The following requirements are tested: + + * this test focuses on the predefined functions encvalue_unichar (utf-32 big endian)*/ + + + +module Sem_160102_predefined_functions_069 { + + type component GeneralComp { + + } + + testcase TC_Sem_160102_predefined_functions_069 () runs on GeneralComp { + + var charstring v_test := "abc"; + + //Encoding: + + var universal charstring v_test_enc_32BE := encvalue_unichar(v_test,"UTF-32BE"); //encode to universal charstring UTF-32 big endian + setverdict(pass,"Encoded value: ", v_test_enc_32BE); + + } + + control{ + + execute(TC_Sem_160102_predefined_functions_069()); + + } + +} \ No newline at end of file diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_070.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_070.ttcn new file mode 100644 index 00000000..c482cb09 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_070.ttcn @@ -0,0 +1,46 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:16.1.2, Ensure that predefined decvalue_unichar function works properly + ** @verdict pass accept, ttcn3verdict:pass + + ***************************************************/ + +/* The following requirements are tested: + + * this test focuses on the predefined functions decvalue_unichar (utf-8)*/ + + + +module Sem_160102_predefined_functions_070 { + + type component GeneralComp { + + } + + testcase TC_Sem_160102_predefined_functions_070 () runs on GeneralComp { + + + //encoded text: + var universal charstring v_enc := encvalue_unichar(123,"UTF-8"); + + + //decode: + var integer v_test_dec; + var integer v_res:= decvalue_unichar(v_enc,v_test_dec,"UTF-8"); //decode (UTF-8) + + if (v_res == 0) { + setverdict(pass, "Decoded ", v_enc , " with result ", v_res); + } else { + setverdict(fail, "Unexpected decoding result: Decoded ", v_enc , " with result ", v_res); + } + + } + + control{ + + execute(TC_Sem_160102_predefined_functions_070()); + + } + +} \ No newline at end of file diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_071.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_071.ttcn new file mode 100644 index 00000000..e37abd97 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_071.ttcn @@ -0,0 +1,48 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:16.1.2, Ensure that predefined decvalue_unichar function works properly + ** @verdict pass accept, ttcn3verdict:pass + + ***************************************************/ +//NOT working with TestCast 6.8.2.5 -test fails + + +/* The following requirements are tested: + + * this test focuses on the predefined functions decvalue_unichar (utf-8) with charstring input*/ + + + +module Sem_160102_predefined_functions_071 { + + type component GeneralComp { + + } + + testcase TC_Sem_160102_predefined_functions_071 () runs on GeneralComp { + + + //encoded text: + var universal charstring v_enc := encvalue_unichar("aBcDeF","UTF-8"); + + + //decode: + var charstring v_test_dec; + var integer v_res:= decvalue_unichar(v_enc,v_test_dec,"UTF-8"); //decode (UTF-8) + + if (v_res == 0) { + setverdict(pass, "Decoded ", v_enc , " with result ", v_res); + } else { + setverdict(fail, "Unexpected decoding result: Decoded ", v_enc , " with result ", v_res); + } + + } + + control{ + + execute(TC_Sem_160102_predefined_functions_071()); + + } + +} \ No newline at end of file diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_072.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_072.ttcn new file mode 100644 index 00000000..f09b8576 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_072.ttcn @@ -0,0 +1,46 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:16.1.2, Ensure that predefined decvalue_unichar function works properly + ** @verdict pass accept, ttcn3verdict:pass + + ***************************************************/ + +/* The following requirements are tested: + + * this test focuses on the predefined functions decvalue_unichar (utf-16)*/ + + + +module Sem_160102_predefined_functions_072 { + + type component GeneralComp { + + } + + testcase TC_Sem_160102_predefined_functions_072 () runs on GeneralComp { + + + //encoded text: + var universal charstring v_enc := encvalue_unichar(123,"UTF-16"); + + + //decode: + var integer v_test_dec; + var integer v_res:= decvalue_unichar(v_enc,v_test_dec,"UTF-16"); //decode (UTF-16) + + if (v_res == 0) { + setverdict(pass, "Decoded ", v_enc , " with result ", v_res); + } else { + setverdict(fail, "Unexpected decoding result: Decoded ", v_enc , " with result ", v_res); + } + + } + + control{ + + execute(TC_Sem_160102_predefined_functions_072()); + + } + +} \ No newline at end of file diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_073.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_073.ttcn new file mode 100644 index 00000000..557fe7b6 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_073.ttcn @@ -0,0 +1,47 @@ +/*************************************************** + ** @author STF 487 (updated by STF 521) + ** @version 0.0.2 + ** @purpose 1:16.1.2, Ensure that predefined decvalue_unichar function works properly + ** @verdict pass accept, ttcn3verdict:pass + + ***************************************************/ + +/* The following requirements are tested: + + * this test focuses on the predefined functions decvalue_unichar (utf-16) with charstring input*/ + + + +module Sem_160102_predefined_functions_073 { + + type component GeneralComp { + + } + + type universal charstring UStr with { variant "UTF-16LE" } + testcase TC_Sem_160102_predefined_functions_073 () runs on GeneralComp { + + + //encoded text: + var UStr v_test := "aBcDe"; + var universal charstring v_enc := encvalue_unichar(v_test,"UTF-16LE"); + + //decode: + var UStr v_test_dec; + var integer v_res:= decvalue_unichar(v_enc,v_test_dec,"UTF-16LE"); //decode (UTF-16LE) + + if (v_res == 0) { + setverdict(pass, "Decoded ", v_test_dec , " with result ", v_res); + } else { + setverdict(fail, "Unexpected decoding result: Decoded ", v_test_dec, " with result ", v_res); + } + + } + + control{ + + execute(TC_Sem_160102_predefined_functions_073()); + + } + +} \ No newline at end of file diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_074.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_074.ttcn new file mode 100644 index 00000000..bc7b0e27 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_074.ttcn @@ -0,0 +1,43 @@ +/*************************************************** + ** @author STF 487 (updated by STF 512) + ** @version 0.0.2 + ** @purpose 1:16.1.2, Ensure that predefined decvalue_unichar function works properly + ** @verdict pass accept, ttcn3verdict:pass + + ***************************************************/ + +/* The following requirements are tested: + + * this test focuses on the predefined functions decvalue_unichar (utf-32)*/ + + + +module Sem_160102_predefined_functions_074 { + + type component GeneralComp { + + } + + type integer Int with { variant "32 bit" }; // produces value that can be transformed to UTF-32 + testcase TC_Sem_160102_predefined_functions_074 () runs on GeneralComp { + var Int v_src := 123; + + //encoded text: + var universal charstring v_enc := encvalue_unichar(v_src, "UTF-32"); //encode UTF-32 + + //decode: + var Int v_test_dec; + var integer v_res:= decvalue_unichar(v_enc, v_test_dec, "UTF-32"); //decode (UTF-32) + + if (v_res == 0) { + setverdict(pass, "Decoded ", v_enc , " with result ", v_res); + } else { + setverdict(fail, "Unexpected decoding result: Decoded ", v_enc , " with result ", v_res); + } + } + + control { + execute(TC_Sem_160102_predefined_functions_074()); + } + +} \ No newline at end of file diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_075.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_075.ttcn new file mode 100644 index 00000000..83334d59 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_075.ttcn @@ -0,0 +1,47 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:16.1.2, Ensure that predefined decvalue_unichar function works properly + ** @verdict pass accept, ttcn3verdict:pass + + ***************************************************/ +//NOT working with TestCast 6.8.2.5 -test fails + +/* The following requirements are tested: + + * this test focuses on the predefined functions decvalue_unichar (utf-32) with charstring input*/ + + + +module Sem_160102_predefined_functions_075 { + + type component GeneralComp { + + } + + testcase TC_Sem_160102_predefined_functions_075 () runs on GeneralComp { + + + //encoded text: + var universal charstring v_enc := encvalue_unichar("aBc","UTF-32"); //encode UTF-32 + + + //decode: + var charstring v_test_dec; + var integer v_res:= decvalue_unichar(v_enc,v_test_dec,"UTF-32"); //decode (UTF-32) + + if (v_res == 0) { + setverdict(pass, "Decoded ", v_enc , " with result ", v_res); + } else { + setverdict(fail, "Unexpected decoding result: Decoded ", v_enc , " with result ", v_res); + } + + } + + control{ + + execute(TC_Sem_160102_predefined_functions_075()); + + } + +} \ No newline at end of file diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_076.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_076.ttcn new file mode 100644 index 00000000..7dbf9c6f --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_076.ttcn @@ -0,0 +1,43 @@ +/*************************************************** + ** @author STF 487 (updated by STF 521) + ** @version 0.0.2 + ** @purpose 1:16.1.2, Ensure that predefined decvalue_unichar function works properly + ** @verdict pass accept, ttcn3verdict:pass + + ***************************************************/ + +/* The following requirements are tested: + + * this test focuses on the predefined functions decvalue_unichar (utf-16 little endian)*/ + + + +module Sem_160102_predefined_functions_076 { + + type component GeneralComp { + + } + + type integer Int with { variant "16 bit" } // standardized variant, 2 octets should be acceptable for UTF-16 + testcase TC_Sem_160102_predefined_functions_076 () runs on GeneralComp { + var Int v_test := 100; + + //encoded text: + var universal charstring v_enc := encvalue_unichar(v_test, "UTF-16LE"); + + //decode: + var Int v_test_dec; + var integer v_res:= decvalue_unichar(v_enc,v_test_dec,"UTF-16LE"); //decode (UTF-16 little endian) + + if (v_res == 0) { + setverdict(pass, "Decoded ", v_enc , " with result ", v_res); + } else { + setverdict(fail, "Unexpected decoding result: Decoded ", v_enc , " with result ", v_res); + } + } + + control { + execute(TC_Sem_160102_predefined_functions_076()); + } + +} \ No newline at end of file diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_077.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_077.ttcn new file mode 100644 index 00000000..50d1b671 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_077.ttcn @@ -0,0 +1,46 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:16.1.2, Ensure that predefined decvalue_unichar function works properly + ** @verdict pass accept, ttcn3verdict:pass + + ***************************************************/ + +/* The following requirements are tested: + + * this test focuses on the predefined functions decvalue_unichar (utf-16 big endian)*/ + + + +module Sem_160102_predefined_functions_077 { + + type component GeneralComp { + + } + + testcase TC_Sem_160102_predefined_functions_077 () runs on GeneralComp { + + + //encoded text: + var universal charstring v_enc := encvalue_unichar(123,"UTF-16BE"); + + + //decode: + var integer v_test_dec; + var integer v_res:= decvalue_unichar(v_enc,v_test_dec,"UTF-16BE"); //decode (UTF-16 big endian) + + if (v_res == 0) { + setverdict(pass, "Decoded ", v_enc , " with result ", v_res); + } else { + setverdict(fail, "Unexpected decoding result: Decoded ", v_enc , " with result ", v_res); + } + + } + + control{ + + execute(TC_Sem_160102_predefined_functions_077()); + + } + +} \ No newline at end of file diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_078.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_078.ttcn new file mode 100644 index 00000000..e91ad3e3 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_078.ttcn @@ -0,0 +1,46 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:16.1.2, Ensure that predefined decvalue_unichar function works properly + ** @verdict pass accept, ttcn3verdict:pass + + ***************************************************/ + +/* The following requirements are tested: + + * this test focuses on the predefined functions decvalue_unichar (utf-16 big endian)*/ + + + +module Sem_160102_predefined_functions_078 { + + type component GeneralComp { + + } + + testcase TC_Sem_160102_predefined_functions_078 () runs on GeneralComp { + + + //encoded text: + var universal charstring v_enc := encvalue_unichar(123,"UTF-16BE"); + + + //decode: + var integer v_test_dec; + var integer v_res:= decvalue_unichar(v_enc,v_test_dec,"UTF-16BE"); //decode (UTF-16 big endian) + + if (v_res == 0) { + setverdict(pass, "Decoded ", v_enc , " with result ", v_res); + } else { + setverdict(fail, "Unexpected decoding result: Decoded ", v_enc , " with result ", v_res); + } + + } + + control{ + + execute(TC_Sem_160102_predefined_functions_078()); + + } + +} \ No newline at end of file diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_079.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_079.ttcn new file mode 100644 index 00000000..f8d8401f --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_079.ttcn @@ -0,0 +1,46 @@ +/*************************************************** + ** @author STF 487 (updated by STF 521) + ** @version 0.0.2 + ** @purpose 1:16.1.2, Ensure that predefined decvalue_unichar function works properly + ** @verdict pass accept, ttcn3verdict:pass + + ***************************************************/ + +/* The following requirements are tested: + + * this test focuses on the predefined functions decvalue_unichar (utf-32 big endian)*/ + + + +module Sem_160102_predefined_functions_079 { + + type component GeneralComp { + + } + + type integer Int with { variant "32 bit" }; // standardized variant encodes into 4 octets + testcase TC_Sem_160102_predefined_functions_079 () runs on GeneralComp { + var Int v_test := 123; + + //encoded text: + var universal charstring v_enc := encvalue_unichar(v_test, "UTF-32BE"); + + //decode: + var Int v_test_dec; + var integer v_res:= decvalue_unichar(v_enc,v_test_dec, "UTF-32BE"); //decode (UTF-32 big endian) + + if (v_res == 0) { + setverdict(pass, "Decoded ", v_enc , " with result ", v_res); + } else { + setverdict(fail, "Unexpected decoding result: Decoded ", v_enc , " with result ", v_res); + } + + } + + control{ + + execute(TC_Sem_160102_predefined_functions_079()); + + } + +} \ No newline at end of file diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_080.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_080.ttcn new file mode 100644 index 00000000..8213067b --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_080.ttcn @@ -0,0 +1,43 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:16.1.2, Ensure that predefined decvalue and decvalue_unichar function works properly in case of uninitialized encode value is given + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +/* The following requirements are tested: + * all actual in and inout parameters shall be initialized with the following exceptions: + * 16.1.2. Restriction a.3 : the encoded_value parameter of the decvalue and decvalue_unichar function may be uninitialized.*/ + +module Sem_160102_predefined_functions_080 { + type enumerated E { one(1), two(2), three(3) } with { variant "32 bit"}; + + type component GeneralComp { + } + + testcase TC_Sem_160102_predefined_functions_080 () runs on GeneralComp { + + var bitstring v_test; // uninitialized value for encoded_value parameter decvalue() input + var universal charstring v_test_enc_8; // uninitialized value encoded_value parameter for decvalue_unichar() input + var E v_decoded; + var E v_decoded_8; + + var integer v_res := decvalue(v_test, v_decoded); + var integer v_res_8 := decvalue_unichar(v_test_enc_8, v_decoded_8, "UTF-8"); + + if(match(v_res,1)){ + setverdict(pass,"Decoded ", v_decoded , " with result ", v_res); + }else{ + setverdict(fail,"Decode failed ", v_decoded , " with result ", v_res); + } + + if(match(v_res_8,1)){ + setverdict(pass,"Decoded ", v_decoded_8 , " with result ", v_res_8); + }else{ + setverdict(fail,"Decode failed ", v_decoded_8 , " with result ", v_res_8); + } + } + control{ + execute(TC_Sem_160102_predefined_functions_080()); + } +} \ No newline at end of file diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_081.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_081.ttcn new file mode 100644 index 00000000..eed5f441 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_081.ttcn @@ -0,0 +1,36 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:16.1.2, Ensure that predefined function get_stringencoding works properly + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +/* The following requirements are tested: + * The get_stringencoding function analyses the encoded_value and returns the UCS encoding scheme.*/ + + +module Sem_160102_predefined_functions_081 { + + type component GeneralComp { + } + + testcase TC_Sem_160102_predefined_functions_081 () runs on GeneralComp { + + + var octetstring v_test := '414243C3A9C3BC'O; //UTF-8 encoded octetstring. The decoded value is: ABCéü + + var charstring v_get := get_stringencoding(v_test); // expected result: "UTF8" + + if (match(v_get , ("UTF-8",""))) { + setverdict(pass,"Decoded: ",v_get); + } else { + setverdict(fail, "Unexpected result: ", v_get); + } + } + + + + control{ + execute(TC_Sem_160102_predefined_functions_081()); + } +} \ No newline at end of file diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_082.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_082.ttcn new file mode 100644 index 00000000..7c4fc4e4 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_082.ttcn @@ -0,0 +1,40 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:16.1.2, Ensure that predefined function for removing Byte order mark works properly + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +/* The following requirements are tested: + * check that reomve_bom() function successfully removes the byte order mark present at the beginning of a stream of serialized (encoded) universal character strings + UCS encoding scheme + */ + + +module Sem_160102_predefined_functions_082 { + + type component GeneralComp { + } + + testcase TC_Sem_160102_predefined_functions_082 () runs on GeneralComp { + + + var octetstring v_test_1 :='FEFF0AC2'O ; + var octetstring v_test_2 :='C0'O ; + + var octetstring v_remove := remove_bom(v_test_1); // expected result: v_remove := '0AC2'O + var octetstring v_remove_2 := remove_bom(v_test_2); // expected result: v_remove := 'C0'O + + if (match(v_remove,'0AC2'O) and match(v_remove_2, 'C0'O)) { + setverdict(pass,"Results are: ",v_remove, " and ",v_remove_2 ); + } else { + setverdict(fail,"Failed,the results are: ",v_remove, " and ",v_remove_2, "Expected: '0AC2'O and 'C0'O"); + } + } + + + + control{ + execute(TC_Sem_160102_predefined_functions_082()); + } +} \ No newline at end of file diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_083.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_083.ttcn new file mode 100644 index 00000000..3dd35791 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_083.ttcn @@ -0,0 +1,39 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:16.1.2, Ensure that predefined function isvalue() works properly + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +/* The following requirements are tested: + * check that isvalue() predefined function works properly + */ + + +module Sem_160102_predefined_functions_083 { + + type component GeneralComp { + } + + testcase TC_Sem_160102_predefined_functions_083 () runs on GeneralComp { + + var boolean v_res; + + template charstring Mytemaplate:= "1234ABCD"; + + + + v_res := isvalue(Mytemaplate); //template, expected result: true + + + + if ( match(v_res, true)) {setverdict(pass," isvalue(Mytemaplate): ", v_res);} + else{setverdict(fail," isvalue(Mytemaplate):", v_res, " expected result: true");} + + } + + + control{ + execute(TC_Sem_160102_predefined_functions_083()); + } +} \ No newline at end of file diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_084.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_084.ttcn new file mode 100644 index 00000000..1f862173 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_084.ttcn @@ -0,0 +1,39 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:16.1.2, Ensure that predefined function isvalue() works properly + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +/* The following requirements are tested: + * check that isvalue() predefined function works properly + */ + + +module Sem_160102_predefined_functions_084 { + + type component GeneralComp { + } + + testcase TC_Sem_160102_predefined_functions_084 () runs on GeneralComp { + + var boolean v_res; + + var GeneralComp MyComp; + + + + v_res := isvalue(MyComp); //component ,expected result: false + + + + if ( match(v_res, false)) {setverdict(pass," isvalue(MyComp): ", v_res);} + else{setverdict(fail," isvalue(MyComp):", v_res, " expected result: false");} + + } + + + control{ + execute(TC_Sem_160102_predefined_functions_084()); + } +} \ No newline at end of file diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_085.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_085.ttcn new file mode 100644 index 00000000..82efc217 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_085.ttcn @@ -0,0 +1,41 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:16.1.2, Ensure that predefined function isvalue() works properly + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +/* The following requirements are tested: + * check that isvalue() predefined function works properly + */ + + +module Sem_160102_predefined_functions_085 { + + type integer address; + + type component GeneralComp { + } + + testcase TC_Sem_160102_predefined_functions_085 () runs on GeneralComp { + + var boolean v_res; + + var address MyAddr := null; + + + + v_res := isvalue(MyAddr); //address, expected result: true + + + + if ( match(v_res, true)) {setverdict(pass," isvalue(MyAddr): ", v_res);} + else{setverdict(fail," isvalue(MyAddr):", v_res, " expected result: true");} + + } + + + control{ + execute(TC_Sem_160102_predefined_functions_085()); + } +} \ No newline at end of file diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_086.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_086.ttcn new file mode 100644 index 00000000..4c88cc20 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_086.ttcn @@ -0,0 +1,38 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:16.1.2, Ensure that predefined function isvalue() works properly + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +/* The following requirements are tested: + * check that isvalue() predefined function works properly + */ + + +module Sem_160102_predefined_functions_086 { + + type component GeneralComp { + } + + testcase TC_Sem_160102_predefined_functions_086 () runs on GeneralComp { + + var boolean v_res; + + var default MyDef := null; + + + + v_res := isvalue(MyDef); //dafult, expected result: true + + + if ( match(v_res, true)) {setverdict(pass," isvalue(MyDef): ", v_res);} + else{setverdict(fail," isvalue(MyDef)):", v_res, " expected result: true");} + + } + + + control{ + execute(TC_Sem_160102_predefined_functions_086()); + } +} \ No newline at end of file diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_087.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_087.ttcn new file mode 100644 index 00000000..582c18ea --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_087.ttcn @@ -0,0 +1,39 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:16.1.2, Ensure that predefined function isvalue() works properly + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +/* The following requirements are tested: + * check that isvalue() predefined function works properly + */ + + +module Sem_160102_predefined_functions_087 { + + type component GeneralComp { + } + + testcase TC_Sem_160102_predefined_functions_087 () runs on GeneralComp { + + var boolean v_res; + + template charstring Mytemaplate2 := pattern "A*Z"; + + + + v_res := isvalue(Mytemaplate2); //pattern, expected result: false + + + if ( match(v_res, false)) {setverdict(pass," isvalue(Mytemaplate2: ", v_res);} + else{setverdict(fail," isvalue(Mytemaplate2): ", v_res, " expected result: false");} + + + } + + + control{ + execute(TC_Sem_160102_predefined_functions_087()); + } +} \ No newline at end of file diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_088.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_088.ttcn new file mode 100644 index 00000000..50f2b80c --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_088.ttcn @@ -0,0 +1,47 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:16.1.2, Ensure that predefined function isvalue() works properly + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +/* The following requirements are tested: + * check that isvalue() predefined function works properly + */ + + +module Sem_160102_predefined_functions_088 { + + type record MyRec{ + integer field1, + integer field2 optional} + + type record MyRec2 { + MyRec field1, + integer field2 + } + + type component GeneralComp { + } + + testcase TC_Sem_160102_predefined_functions_088() runs on GeneralComp { + + var boolean v_res; + + var MyRec2 MyRecValue := {{1,-},1}; + + + + v_res := isvalue(MyRecValue.field1.field1); //nested, expected result: true + + + if ( match(v_res, true)) {setverdict(pass," isvalue(MyRecValue.field1.field1): ", v_res);} + else{setverdict(fail," isvalue(MyRecValue.field1.field1):", v_res, " expected result: true");} + + } + + + control{ + execute(TC_Sem_160102_predefined_functions_088()); + } +} \ No newline at end of file diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_089.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_089.ttcn new file mode 100644 index 00000000..ace8bc9e --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_089.ttcn @@ -0,0 +1,47 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:16.1.2, Ensure that predefined function isvalue() works properly + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +/* The following requirements are tested: + * check that isvalue() predefined function works properly + */ + + +module Sem_160102_predefined_functions_089 { + + type record MyRec{ + integer field1, + integer field2 optional} + + type record MyRec2 { + MyRec field1, + integer field2 + } + + type component GeneralComp { + } + + testcase TC_Sem_160102_predefined_functions_089() runs on GeneralComp { + + var boolean v_res; + + var MyRec2 MyRecValue := {{1,-},1}; + + + + v_res := isvalue(MyRecValue.field1.field2); //nested omit, expected result: false + + + if ( match(v_res, false)) {setverdict(pass," isvalue(MyRecValue.field1.field2): ", v_res);} + else{setverdict(fail," isvalue(MyRecValue.field1.field2):", v_res, " expected result: true");} + + } + + + control{ + execute(TC_Sem_160102_predefined_functions_089()); + } +} \ No newline at end of file diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_090.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_090.ttcn new file mode 100644 index 00000000..742f4f9f --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_090.ttcn @@ -0,0 +1,42 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:16.1.2, Ensure that the IUT recognizes predefined functions and correctly evaluates them (as specified by Annex C.4.1) + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +/* The following requirements are tested: + * Check that regexp predefined function with @nocase modfier evaluates the charstrings case insensitive way + * + * */ + +module Sem_160102_predefined_functions_090 { + + type component GeneralComp { + } + + + testcase TC_Sem_160102_predefined_functions_090 () runs on GeneralComp { + var charstring v_example_1:="example text string"; + var charstring v_example_2:="ExAmPlE TeXt StRinG"; + + var charstring v_i,v_j; + + v_i := regexp @nocase(v_example_1,charstring:"?+(TeXt)?+",0); //capital letters in expression + v_j := regexp @nocase(v_example_2,charstring:"?+(text)?+",0); //captial letters in inpar + + if(match(v_i,"text") and match(v_j,"TeXt")) { + setverdict(pass,"Results are: ",v_i, " and ", v_j); + } else { + setverdict(fail,"Results are: ",v_i, " and ", v_j); + } + } + + + control{ + + execute(TC_Sem_160102_predefined_functions_090()); + + } + +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_091.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_091.ttcn new file mode 100644 index 00000000..62fd9e34 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_091.ttcn @@ -0,0 +1,54 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:16.1.2, Ensure that the IUT recognizes predefined functions and correctly evaluates them (as specified by Annex C) + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +/* The following requirements are tested: + * check that rnd() uses seeds per component + * + */ + + +module Sem_160102_predefined_functions_091 { + + type component GeneralComp {} + + + //function to generate random number with seed given as input + function frnd(float seed) runs on GeneralComp { + var float v_random1 := rnd(seed); + var float v_random2 := rnd(); + + setverdict(pass); + if (not match(rnd(seed), v_random1)) { + setverdict(fail, "rnd from same seed has to be identical to ", v_random1); + } + if (match(rnd(seed+1.0), v_random1)) { + setverdict(fail, "rnd from different seed should not be identical with ", v_random1); + } + } + + testcase TC_Sem_160102_predefined_functions_091 (float General_Comp_seed) runs on GeneralComp system GeneralComp { + + var float v_random1,v_random2; + + //Generate components with different seeds + var GeneralComp v_ptc1,v_ptc2; + + v_ptc1:= GeneralComp.create alive; + v_ptc2:= GeneralComp.create alive; + + //different seeds given to components: + v_ptc1.start(frnd(General_Comp_seed)); + v_ptc2.start(frnd(General_Comp_seed+0.5)); + all component.done; + } + + control{ + const float General_Comp_seed := 0.0; + execute(TC_Sem_160102_predefined_functions_091(General_Comp_seed)); + } + +} \ No newline at end of file diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_092.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_092.ttcn new file mode 100644 index 00000000..79d09ce5 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_092.ttcn @@ -0,0 +1,39 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:16.1.2, Ensure that the IUT recognizes predefined functions and correctly evaluates them (as specified by Annex C) + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +/* The following requirements are tested: + *16.1.2 Restriction a.3: + * any_string or sequence_type parameters of the functions substr may be partially initialized; */ + + +module Sem_160102_predefined_functions_092 { + + type component GeneralComp {} + + type record of integer RoI; + + + testcase TC_Sem_160102_predefined_functions_092 () runs on GeneralComp { + + var RoI v_Rec1; + var RoI v_res; + + v_Rec1 :={-,0,-,2}; //partially initialized record of integers + v_res := substr(v_Rec1,1,1); //expected result: {0} + + if( match(v_res,{0}) ) { + setverdict(pass,v_res); + } else { + setverdict(fail,"The value of v_res:",v_res); + } + } + + control{ + execute(TC_Sem_160102_predefined_functions_092()); + } + +} \ No newline at end of file diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_093.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_093.ttcn new file mode 100644 index 00000000..0d005987 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_093.ttcn @@ -0,0 +1,35 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.2, Ensure that the IUT recognizes predefined functions and correctly evaluates them (as specified by Annex C) + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Ensure that integer value of an enum handled correctly + +module Sem_160102_predefined_functions_093 { + + type component GeneralComp { + } + + type enumerated EDays { + Monday, Tuesday, Wednesday, Thursday, Friday(3..5) + }; + + testcase TC_Sem_160102_predefined_functions_093() runs on GeneralComp { + var EDays v_enum := Thursday; + + int2enum(4,v_enum); // new value for v_enum is Friday(4) + + if (match(enum2int(v_enum),4) and match(v_enum,Friday(4))) { + setverdict(pass); + } else { + setverdict(fail); + } + } + + control { + execute(TC_Sem_160102_predefined_functions_093()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_094.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_094.ttcn new file mode 100644 index 00000000..5757e9a1 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_094.ttcn @@ -0,0 +1,34 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.2, Ensure that the IUT recognizes predefined functions and correctly evaluates them (as specified by Annex C) + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Ensure that integer value of an enum handled correctly + +module Sem_160102_predefined_functions_094 { + + type component GeneralComp { + } + + type enumerated EDays { + Monday, Tuesday, Wednesday, Thursday, Friday(3..5) + }; + + testcase TC_Sem_160102_predefined_functions_094 () runs on GeneralComp { + var EDays v_enum := Friday(3); + var integer v_day := enum2int(v_enum); + + if (match(v_day,3)) { + setverdict(pass); + } else { + setverdict(fail); + } + } + + control { + execute(TC_Sem_160102_predefined_functions_094 ()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_095.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_095.ttcn new file mode 100644 index 00000000..dd3af395 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_095.ttcn @@ -0,0 +1,36 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.2, Ensure that the IUT recognizes predefined functions and correctly evaluates them (as specified by Annex C) + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +// The following requirements are tested: Using ischosen for anytype + +module Sem_160102_predefined_functions_095 { + type union U { integer f1, octetstring f2 } + +type component GeneralComp { +} + + +testcase TC_Sem_160102_predefined_functions_095 () runs on GeneralComp { + template U m_u4 := ({ f1 := 2 }, {f2 := 'AB'O }); + template anytype mw_anytype := { U := m_u4 } + var boolean v_i; + + v_i:=ischosen(mw_anytype.U); //function returns true value + if(match(v_i,true)) { + setverdict(pass); + } else { + setverdict(fail, "Unexpected decoding result"); + } +} + + +control{ + + execute(TC_Sem_160102_predefined_functions_095()); + +} + +} \ No newline at end of file diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_096.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_096.ttcn new file mode 100644 index 00000000..aceaf70c --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_096.ttcn @@ -0,0 +1,38 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.2, Ensure that the IUT recognizes predefined functions and correctly evaluates them (as specified by Annex C) + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +// The following requirements are tested: Using ischosen for anytype + +module Sem_160102_predefined_functions_096 { + +type component GeneralComp { +} + +type union U { integer f1, charstring f2 }; + + +testcase TC_Sem_160102_predefined_functions_096 () runs on GeneralComp { + + template anytype mw_anytype := { U.f1:=1}; + var boolean v_i, v_j; + + v_i:=ischosen(mw_anytype.integer); //function returns false + + if(match(v_i,false)) { + setverdict(pass); + } else { + setverdict(fail, "Unexpected result for ischosen()"); + } +} + + +control{ + + execute(TC_Sem_160102_predefined_functions_096()); + +} + +} \ No newline at end of file diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_097.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_097.ttcn new file mode 100644 index 00000000..dccaebbe --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_097.ttcn @@ -0,0 +1,32 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.2, Ensure that the IUT recognizes predefined functions and correctly evaluates them (as specified by Annex C) + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +// The following requirements are tested: +// The optional encoding_info parameter is used for passing additional encoding information to the codec and, if it is omitted, no additional information is sent to the codec. + +module Sem_160102_predefined_functions_097 { + +type component GeneralComp { +} + + type integer I with { variant "32 bit"}; + + + testcase TC_Sem_160102_predefined_functions_097 () runs on GeneralComp { + var template I v_test := 0; + var bitstring v_res := encvalue(v_test, "encoding_info_text"); + if (lengthof(v_res) == 32) { + setverdict(pass,v_res); + } else { + setverdict(fail, "Invalid encoding length"); + } + } + + control{ + execute(TC_Sem_160102_predefined_functions_097()); + } + +} \ No newline at end of file diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_098.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_098.ttcn new file mode 100644 index 00000000..3df2b7a6 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_098.ttcn @@ -0,0 +1,33 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.2, Ensure that the IUT recognizes predefined functions and correctly evaluates them (as specified by Annex C) + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +// The following requirements are tested: +// The optional decoding_info parameter is used for passing additional encoding information to the codec and, if it is omitted, no additional information is sent to the codec. + +module Sem_160102_predefined_functions_098 { + +type component GeneralComp { +} + + type integer I with { variant "32 bit"}; + + + testcase TC_Sem_160102_predefined_functions_098 () runs on GeneralComp { + var template I v_test := 0; + var bitstring v_enc := encvalue(v_test, "encoding_info_text"); + + if (match(decvalue(v_enc,v_test,"decoding_info_text"), 0)){ + setverdict(pass,v_enc); + } else { + setverdict(fail, "Invalid encoding length"); + } + } + + control{ + execute(TC_Sem_160102_predefined_functions_098()); + } + +} \ No newline at end of file diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_099.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_099.ttcn new file mode 100644 index 00000000..be8b7130 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_099.ttcn @@ -0,0 +1,39 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.2, Ensure that predefined encvalue_unichar function works properly in case of encoding universal charstring + ** @verdict pass accept, ttcn3verdict:pass + + ***************************************************/ + +/* The following requirements are tested: + * The optional encoding_info parameter is used for passing additional encoding information to the codec and, + * if it is omitted, no additional information is sent to the codec.*/ + + +module Sem_160102_predefined_functions_099 { + + type component GeneralComp { + + } + + testcase TC_Sem_160102_predefined_functions_099 () runs on GeneralComp { + + var charstring v_test := "abc"; + + //Encoding: + + var universal charstring v_test_enc_8 := encvalue_unichar(v_test,"UTF-8", "encoding_info_text"); //encode to universal charstring UTF-8 + setverdict(pass,"Encoded value: ", v_test_enc_8); + + } + + + + control{ + + execute(TC_Sem_160102_predefined_functions_099()); + + } + +} \ No newline at end of file diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_100.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_100.ttcn new file mode 100644 index 00000000..a1081cee --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_100.ttcn @@ -0,0 +1,45 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.2, Ensure that predefined encvalue_unichar function works properly in case of encoding universal charstring + ** @verdict pass accept, ttcn3verdict:pass + + ***************************************************/ + +/* The following requirements are tested: + * The optional decoding_info parameter is used for passing additional encoding information to the codec and, + * if it is omitted, no additional information is sent to the codec.*/ + + +module Sem_160102_predefined_functions_100 { + + type component GeneralComp { + + } + + testcase TC_Sem_160102_predefined_functions_100 () runs on GeneralComp { + + var charstring v_test := "abc"; + + //Encoding: + var universal charstring v_test_enc_8 := encvalue_unichar(v_test,"UTF-8", "encoding_info_text"); //encode to universal charstring UTF-8 + + //Decoding: + var integer v_test_dec; + var integer v_res:= decvalue_unichar(v_test_enc_8,v_test_dec,"UTF-8", "encoding_info_text"); //decode (UTF-8) + + if (v_res == 0) { + setverdict(pass, "Decoded ", v_test_enc_8 , " with result ", v_res); + } else { + setverdict(fail, "Unexpected decoding result: Decoded ", v_test_enc_8 , " with result ", v_res); + } + + } + + control{ + + execute(TC_Sem_160102_predefined_functions_100()); + + } + +} \ No newline at end of file diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_101.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_101.ttcn new file mode 100644 index 00000000..b802ba9c --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_101.ttcn @@ -0,0 +1,34 @@ +/*************************************************** + ** @author STF 548 + ** @version 0.0.1 + ** @purpose 1:16.1.2, Verify that the encvalue function supports the dynamic_encoding parameter + ** @verdict pass accept, noexecution + ***************************************************/ +// The following requirements are tested: +// The optional dynamic_encoding parameter is used for dynamic selection of encode +// attribute of the inpar value for this single encvalue call. The rules for dynamic +// selection of the encode attribute are described in clause 27.9. + +// NOTE: the test is not executed as it would require dedicated codec support + +module Sem_160102_predefined_functions_101 { + + type component GeneralComp { + } + + type integer I with { + encode "Codec 1"; + encode "Codec 2" + }; + + testcase TC_Sem_160102_predefined_functions_101 () runs on GeneralComp { + var template I v_test := 0; + var bitstring v_res := encvalue(v_test, -, "Codec 1"); + setverdict(pass); + } + + //control{ + // execute(TC_Sem_160102_predefined_functions_101()); + //} + +} \ No newline at end of file diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_102.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_102.ttcn new file mode 100644 index 00000000..37be6d69 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_102.ttcn @@ -0,0 +1,33 @@ +/*************************************************** + ** @author STF 548 + ** @version 0.0.1 + ** @purpose 1:16.1.2, Verify that the dynamic_encoding parameter of the encvalue function can be explicitly skipped + ** @verdict pass accept, noexecution + ***************************************************/ +// The following requirements are tested: +// The optional dynamic_encoding parameter is used for dynamic selection of encode +// attribute of the inpar value for this single encvalue call. The rules for dynamic +// selection of the encode attribute are described in clause 27.9. + +module Sem_160102_predefined_functions_102 { + + type component GeneralComp { + } + + type integer I with { variant "32 bit"}; + + testcase TC_Sem_160102_predefined_functions_102 () runs on GeneralComp { + var template I v_test := 0; + var bitstring v_res := encvalue(v_test, "encoding_info_text", -); + if (lengthof(v_res) == 32) { + setverdict(pass,v_res); + } else { + setverdict(fail, "Invalid encoding length"); + } + } + + control{ + execute(TC_Sem_160102_predefined_functions_102()); + } + +} \ No newline at end of file diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_103.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_103.ttcn new file mode 100644 index 00000000..44b6c3a9 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_103.ttcn @@ -0,0 +1,35 @@ +/*************************************************** + ** @author STF 548 + ** @version 0.0.1 + ** @purpose 1:16.1.2, Verify that the decvalue function supports the dynamic_encoding parameter + ** @verdict pass accept, noexecution + ***************************************************/ +// The following requirements are tested: +// The optional dynamic_encoding parameter is used for dynamic selection of encode +// attribute of the decoded_value parameter for this single decvalue call. The rules +// for dynamic selection of the encode attribute are described in clause 27.9. + +// NOTE: the test is not executed as it would require dedicated codec support + +module Sem_160102_predefined_functions_103 { + + type component GeneralComp { + } + + type integer I with { + encode "Codec 1"; + encode "Codec 2" + }; + + testcase TC_Sem_160102_predefined_functions_103 () runs on GeneralComp { + var template I v_target := 0; + var bitstring v_src := oct2bit('00000000'O); + decvalue(v_src, v_target, -, "Codec 1"); + setverdict(pass); + } + + //control{ + // execute(TC_Sem_160102_predefined_functions_103()); + //} + +} \ No newline at end of file diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_104.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_104.ttcn new file mode 100644 index 00000000..9a9f4e40 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_104.ttcn @@ -0,0 +1,34 @@ +/*************************************************** + ** @author STF 548 + ** @version 0.0.1 + ** @purpose 1:16.1.2, Verify that the dynamic_encoding parameter of the decvalue function can be explicitly skipped + ** @verdict pass accept, noexecution + ***************************************************/ +// The following requirements are tested: +// The optional dynamic_encoding parameter is used for dynamic selection of encode +// attribute of the decoded_value parameter for this single decvalue call. The rules +// for dynamic selection of the encode attribute are described in clause 27.9. + +module Sem_160102_predefined_functions_104 { + + type component GeneralComp { + } + + type integer I with { variant "32 bit"}; + + testcase TC_Sem_160102_predefined_functions_104 () runs on GeneralComp { + var template I v_target := 0; + var bitstring v_src := oct2bit('00000000'O); + var integer v_res := decvalue(v_src, v_target, "encoding_info_text", -); + if (v_res == 0) { + setverdict(pass, "Decoded value is: ", v_target); + } else { + setverdict(fail, "Invalid encoding length"); + } + } + + control{ + execute(TC_Sem_160102_predefined_functions_104()); + } + +} \ No newline at end of file diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_105.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_105.ttcn new file mode 100644 index 00000000..828e5ceb --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_105.ttcn @@ -0,0 +1,34 @@ +/*************************************************** + ** @author STF 548 + ** @version 0.0.1 + ** @purpose 1:16.1.2, Verify that the encvalue_unichar function supports the dynamic_encoding parameter + ** @verdict pass accept, noexecution + ***************************************************/ +// The following requirements are tested: +// The optional dynamic_encoding parameter is used for dynamic selection of encode +// attribute of the inpar value for this single encvalue_unichar call. The rules for +// dynamic selection of the encode attribute are described in clause 27.9. + +// NOTE: the test is not executed as it would require dedicated codec support + +module Sem_160102_predefined_functions_105 { + + type component GeneralComp { + } + + type integer I with { + encode "Codec 1"; + encode "Codec 2" + }; + + testcase TC_Sem_160102_predefined_functions_105 () runs on GeneralComp { + var template I v_test := 0; + var universal charstring v_res := encvalue_unichar(v_test, -, "Codec 1"); + setverdict(pass); + } + + //control{ + // execute(TC_Sem_160102_predefined_functions_105()); + //} + +} \ No newline at end of file diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_106.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_106.ttcn new file mode 100644 index 00000000..bb887658 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_106.ttcn @@ -0,0 +1,33 @@ +/*************************************************** + ** @author STF 548 + ** @version 0.0.1 + ** @purpose 1:16.1.2, Verify that the dynamic_encoding parameter of the encvalue_unichar function can be explicitly skipped + ** @verdict pass accept, noexecution + ***************************************************/ +// The following requirements are tested: +// The optional dynamic_encoding parameter is used for dynamic selection of encode +// attribute of the inpar value for this single encvalue_unichar call. The rules for +// dynamic selection of the encode attribute are described in clause 27.9. + +module Sem_160102_predefined_functions_106 { + + type component GeneralComp { + } + + type integer I with { variant "32 bit"}; + + testcase TC_Sem_160102_predefined_functions_106 () runs on GeneralComp { + var template I v_test := 100; + var universal charstring v_res := encvalue_unichar(v_test, "UTF-32LE", "encoding_info_text", -); + if (v_res == "d") { + setverdict(pass); + } else { + setverdict(fail, "Invalid encoding result"); + } + } + + control{ + execute(TC_Sem_160102_predefined_functions_106()); + } + +} \ No newline at end of file diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_107.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_107.ttcn new file mode 100644 index 00000000..78eee493 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_107.ttcn @@ -0,0 +1,35 @@ +/*************************************************** + ** @author STF 548 + ** @version 0.0.1 + ** @purpose 1:16.1.2, Verify that the decvalue_unichar function supports the dynamic_encoding parameter + ** @verdict pass accept, noexecution + ***************************************************/ +// The following requirements are tested: +// The optional dynamic_encoding parameter is used for dynamic selection of encode +// attribute of the decoded_value parameter for this single decvalue_unichar call. +// The rules for dynamic selection of the encode attribute are described in clause 27.9. + +// NOTE: the test is not executed as it would require dedicated codec support + +module Sem_160102_predefined_functions_107 { + + type component GeneralComp { + } + + type integer I with { + encode "Codec 1"; + encode "Codec 2" + }; + + testcase TC_Sem_160102_predefined_functions_107 () runs on GeneralComp { + var template I v_target := 0; + var universal charstring v_src := "d"; + decvalue_unichar(v_src, v_target, "UTF-32LE", -, "Codec 1"); + setverdict(pass); + } + + //control{ + // execute(TC_Sem_160102_predefined_functions_107()); + //} + +} \ No newline at end of file diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_108.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_108.ttcn new file mode 100644 index 00000000..375c8c4d --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_108.ttcn @@ -0,0 +1,34 @@ +/*************************************************** + ** @author STF 548 + ** @version 0.0.1 + ** @purpose 1:16.1.2, Verify that the dynamic_encoding parameter of the decvalue_unichar function can be explicitly skipped + ** @verdict pass accept, noexecution + ***************************************************/ +// The following requirements are tested: +// The optional dynamic_encoding parameter is used for dynamic selection of encode +// attribute of the decoded_value parameter for this single decvalue_unichar call. +// The rules for dynamic selection of the encode attribute are described in clause 27.9. + +module Sem_160102_predefined_functions_108 { + + type component GeneralComp { + } + + type integer I with { variant "32 bit"}; + + testcase TC_Sem_160102_predefined_functions_108 () runs on GeneralComp { + var template I v_target := 0; + var universal charstring v_src := "d"; + var integer v_res := decvalue_unichar(v_src, v_target, "UTF-32LE", "encoding_info_text", -); + if (v_res == 0) { + setverdict(pass, "Decoded value is: ", v_target); + } else { + setverdict(fail, "Invalid encoding length"); + } + } + + control{ + execute(TC_Sem_160102_predefined_functions_108()); + } + +} \ No newline at end of file diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160103_external_functions/NegSem_160103_external_functions_001.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160103_external_functions/NegSem_160103_external_functions_001.ttcn new file mode 100644 index 00000000..3bcc56c0 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160103_external_functions/NegSem_160103_external_functions_001.ttcn @@ -0,0 +1,23 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:16.1.3, Ensure that the IUT recognizes external functions + ** @verdict pass reject + ** @configuration external_functions + ***************************************************/ +module NegSem_160103_external_functions_001 { + + type component GeneralComp { + } + + external function xf_NegSem_160103_external_functions_001() return template octetstring; //external functions cannot return template + + testcase TC_NegSem_160103_external_functions_001 () runs on GeneralComp { + setverdict(pass); + } + + control{ + execute(TC_NegSem_160103_external_functions_001()); + } + +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160103_external_functions/Sem_160103_external_functions_001.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160103_external_functions/Sem_160103_external_functions_001.ttcn new file mode 100644 index 00000000..4a28ee6e --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160103_external_functions/Sem_160103_external_functions_001.ttcn @@ -0,0 +1,36 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:16.1.3, Ensure that the IUT recognizes external functions + ** @verdict pass accept, ttcn3verdict:pass + ** @configuration external_functions + ***************************************************/ +module Sem_160103_external_functions_001 { + + type component GeneralComp { + } + + /** + * @return always 1 + */ + external function xf_Sem_160103_external_functions_001() return integer; + + testcase TC_Sem_160103_external_functions_001 () runs on GeneralComp { + var integer v_i; + + v_i := xf_Sem_160103_external_functions_001(); + + if (v_i == 1) { + setverdict(pass); + } else { + setverdict(fail); + } + } + + control{ + + execute(TC_Sem_160103_external_functions_001()); + + } + +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160103_external_functions/Sem_160103_external_functions_002.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160103_external_functions/Sem_160103_external_functions_002.ttcn new file mode 100644 index 00000000..a8a73f67 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160103_external_functions/Sem_160103_external_functions_002.ttcn @@ -0,0 +1,42 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:16.1.3, Ensure that the IUT recognizes external functions + ** @verdict pass accept, ttcn3verdict:pass + ** @configuration external_functions + ***************************************************/ +module Sem_160103_external_functions_002 { + + type record MyRecord { + integer field1, + integer field2, + integer field3 + } + + type port TestPort message { + inout MyRecord + } + + type component GeneralComp { + } + /** + * @return p_in + 1 + */ + external function xf_Sem_160103_external_functions_002(inout integer p_in) return integer; + + testcase TC_Sem_160103_external_functions_002 () runs on GeneralComp { + var integer v_input := 5; + var integer v_result; + + v_result := xf_Sem_160103_external_functions_002(v_input); + if(v_result==6) { setverdict(pass) } + else { setverdict(fail) } + } + + control{ + + execute(TC_Sem_160103_external_functions_002()); + + } + +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_001.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_001.ttcn new file mode 100644 index 00000000..3c0a1388 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_001.ttcn @@ -0,0 +1,45 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:16.1.4, Ensure that the IUT recognizes restrictions described in section 16.1.4. STF409 assumes that the list given in section 16.1.4 describes mandatory restrictions + ** @verdict pass reject + ** @configuration external_functions + ***************************************************/ +module NegSem_160104_invoking_functions_from_specific_places_001 { + + type port loopbackPort message { + inout integer + } + + + type component GeneralComp { + port loopbackPort messagePort + } + + /** + * @return always true + */ + external function xf_NegSem_160104_invoking_functions_from_specific_places_001() return boolean; + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_001 () runs on GeneralComp { + var integer v_i; + + messagePort.send(1); + alt { + //calling an external function in boolean guard + [xf_NegSem_160104_invoking_functions_from_specific_places_001()] messagePort.receive { + v_i:=0; + setverdict(fail); + } + [] messagePort.receive { v_i:=1; } + } + + } + + control{ + + execute(TC_NegSem_160104_invoking_functions_from_specific_places_001()); + + } + +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_002.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_002.ttcn new file mode 100644 index 00000000..74751ab2 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_002.ttcn @@ -0,0 +1,43 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:16.1.4, Ensure that the IUT recognizes restrictions described in section 16.1.4. STF409 assumes that the list given in section 16.1.4 describes mandatory restrictions + ** @verdict pass reject + ***************************************************/ +module NegSem_160104_invoking_functions_from_specific_places_002 { + + type port loopbackPort message { + inout integer + } + + + type component GeneralComp { + port loopbackPort messagePort + } + + function f_test() return boolean { + if (rnd() > 0.5) { //calling rnd within a function inside a boolean guard + return true; + } else { + return false; + } + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_002 () runs on GeneralComp { + var integer v_i; + + messagePort.send(1); + alt { + [f_test()] messagePort.receive { v_i:=0; } + [] messagePort.receive { v_i:=1; } + } + + } + + control{ + + execute(TC_NegSem_160104_invoking_functions_from_specific_places_002()); + + } + +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_003.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_003.ttcn new file mode 100644 index 00000000..b1111cb5 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_003.ttcn @@ -0,0 +1,39 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:16.1.4, Ensure that the IUT recognizes restrictions described in section 16.1.4. STF409 assumes that the list given in section 16.1.4 describes mandatory restrictions + ** @verdict pass reject + ***************************************************/ +module NegSem_160104_invoking_functions_from_specific_places_003 { + + type port loopbackPort message { + inout integer + } + + + type component GeneralComp { + port loopbackPort messagePort + } + + function f_test() return boolean { + setverdict(inconc); //setting verdict within a function inside a boolean guard + return true; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_003 () runs on GeneralComp { + var integer v_i; + + messagePort.send(1); + alt { + [f_test()] messagePort.receive { v_i:=0; } + [] messagePort.receive { v_i:=1; } + } + } + + control{ + + execute(TC_NegSem_160104_invoking_functions_from_specific_places_003()); + + } + +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_004.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_004.ttcn new file mode 100644 index 00000000..758e8bf5 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_004.ttcn @@ -0,0 +1,45 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:16.1.4, Ensure that the IUT recognizes restrictions described in section 16.1.4. STF409 assumes that the list given in section 16.1.4 describes mandatory restrictions + ** @verdict pass reject + ***************************************************/ +module NegSem_160104_invoking_functions_from_specific_places_004 { + + type port loopbackPort message { + inout integer + } + + + type component GeneralComp { + port loopbackPort messagePort + } + + function f_test(inout integer p_int) return boolean { //issue of inout parameter + p_int:=1; + return true; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_004 () runs on GeneralComp { + var integer v_i:=0; + + messagePort.send(1); + alt { + [f_test(v_i)] messagePort.receive { + v_i:=0; + setverdict(fail, "function call not allowed in guard"); + } + [] messagePort.receive { + v_i:=1; + setverdict(pass); + } + } + } + + control{ + + execute(TC_NegSem_160104_invoking_functions_from_specific_places_004()); + + } + +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_005.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_005.ttcn new file mode 100644 index 00000000..ee3d3618 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_005.ttcn @@ -0,0 +1,43 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the create operation cannot be used in a function called during receiving operation (in templates) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// a) All component operations, i.e. create, start (component), stop (component), kill, running (component), +// alive, done and killed (see notes 1, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_005 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + function f_test() return template integer { + var GeneralComp v_ptc := GeneralComp.create; + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_005() runs on GeneralComp system GeneralComp { + template @fuzzy integer mw_test := f_test(); + connect(mtc:p, mtc:p); + p.send(1); + p.receive(mw_test); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_005()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_006.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_006.ttcn new file mode 100644 index 00000000..a877ba4d --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_006.ttcn @@ -0,0 +1,48 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the component.start operation cannot be used in a function called during receiving operation (in templates) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// a) All component operations, i.e. create, start (component), stop (component), kill, running (component), +// alive, done and killed (see notes 1, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_006 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + function f_ptcBehaviour() runs on GeneralComp { + log("PTC running"); + } + + function f_test(GeneralComp p_ptc) return template integer { + p_ptc.start(f_ptcBehaviour()); + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_006() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + template @fuzzy integer mw_test := f_test(v_ptc); + connect(mtc:p, mtc:p); + p.send(1); + p.receive(mw_test); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_006()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_007.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_007.ttcn new file mode 100644 index 00000000..2fe14030 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_007.ttcn @@ -0,0 +1,51 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the component.stop operation cannot be used in a function called during receiving operation (in templates) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// a) All component operations, i.e. create, start (component), stop (component), kill, running (component), +// alive, done and killed (see notes 1, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_007 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + function f_ptcBehaviour() runs on GeneralComp { + timer t_tmr := 10.0; + t_tmr.start; + t_tmr.timeout; + } + + function f_test(GeneralComp p_ptc) return template integer { + p_ptc.stop; + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_007() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + template @fuzzy integer mw_test := f_test(v_ptc); + v_ptc.start(f_ptcBehaviour()); + connect(mtc:p, mtc:p); + p.send(1); + p.receive(mw_test); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_007()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_008.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_008.ttcn new file mode 100644 index 00000000..eb1cd7d7 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_008.ttcn @@ -0,0 +1,51 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the kill operation cannot be used in a function called during receiving operation (in templates) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// a) All component operations, i.e. create, start (component), stop (component), kill, running (component), +// alive, done and killed (see notes 1, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_008 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + function f_ptcBehaviour() runs on GeneralComp { + timer t_tmr := 10.0; + t_tmr.start; + t_tmr.timeout; + } + + function f_test(GeneralComp p_ptc) return template integer { + p_ptc.kill; + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_008() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + template @fuzzy integer mw_test := f_test(v_ptc); + v_ptc.start(f_ptcBehaviour()); + connect(mtc:p, mtc:p); + p.send(1); + p.receive(mw_test); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_008()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_009.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_009.ttcn new file mode 100644 index 00000000..4271dea4 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_009.ttcn @@ -0,0 +1,51 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the component.running operation cannot be used in a function called during receiving operation (in templates) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// a) All component operations, i.e. create, start (component), stop (component), kill, running (component), +// alive, done and killed (see notes 1, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_009 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + function f_ptcBehaviour() runs on GeneralComp { + timer t_tmr := 10.0; + t_tmr.start; + t_tmr.timeout; + } + + function f_test(GeneralComp p_ptc) return template integer { + if (p_ptc.running) { return ?; } + else { return 1; } + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_009() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + template @fuzzy integer mw_test := f_test(v_ptc); + v_ptc.start(f_ptcBehaviour()); + connect(mtc:p, mtc:p); + p.send(1); + p.receive(mw_test); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_009()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_010.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_010.ttcn new file mode 100644 index 00000000..5d9ada57 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_010.ttcn @@ -0,0 +1,51 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the alive operation cannot be used in a function called during receiving operation (in templates) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// a) All component operations, i.e. create, start (component), stop (component), kill, running (component), +// alive, done and killed (see notes 1, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_010 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + function f_ptcBehaviour() runs on GeneralComp { + timer t_tmr := 10.0; + t_tmr.start; + t_tmr.timeout; + } + + function f_test(GeneralComp p_ptc) return template integer { + if (p_ptc.alive) { return ?; } + else { return 1; } + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_010() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + template @fuzzy integer mw_test := f_test(v_ptc); + v_ptc.start(f_ptcBehaviour()); + connect(mtc:p, mtc:p); + p.send(1); + p.receive(mw_test); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_010()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_011.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_011.ttcn new file mode 100644 index 00000000..355c886b --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_011.ttcn @@ -0,0 +1,48 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the done operation cannot be used in a function called during receiving operation (in templates) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// a) All component operations, i.e. create, start (component), stop (component), kill, running (component), +// alive, done and killed (see notes 1, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_011 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + function f_ptcBehaviour() runs on GeneralComp { + } + + function f_test(GeneralComp p_ptc) return template integer { + p_ptc.done; + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_011() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + template @fuzzy integer mw_test := f_test(v_ptc); + v_ptc.start(f_ptcBehaviour()); + connect(mtc:p, mtc:p); + p.send(1); + p.receive(mw_test); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_011()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_012.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_012.ttcn new file mode 100644 index 00000000..fdfe1961 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_012.ttcn @@ -0,0 +1,48 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the killed operation cannot be used in a function called during receiving operation (in templates) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// a) All component operations, i.e. create, start (component), stop (component), kill, running (component), +// alive, done and killed (see notes 1, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_012 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + function f_ptcBehaviour() runs on GeneralComp { + } + + function f_test(GeneralComp p_ptc) return template integer { + p_ptc.killed; + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_012() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + template @fuzzy integer mw_test := f_test(v_ptc); + v_ptc.start(f_ptcBehaviour()); + connect(mtc:p, mtc:p); + p.send(1); + p.receive(mw_test); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_012()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_013.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_013.ttcn new file mode 100644 index 00000000..db4f0bbc --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_013.ttcn @@ -0,0 +1,48 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the port.start operation cannot be used in a function called during receiving operation (in templates) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_013 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return template integer { + p.start; + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_013() runs on GeneralComp system GeneralComp { + template @fuzzy integer mw_test := f_test(); + timer t_tmr := 0.1; + t_tmr.start; + connect(mtc:p, mtc:p); + p.send(1); + alt { + [] p.receive(mw_test) {} + [] t_tmr.timeout {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_013()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_014.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_014.ttcn new file mode 100644 index 00000000..867fa411 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_014.ttcn @@ -0,0 +1,48 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the port.stop operation cannot be used in a function called during receiving operation (in templates) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_013 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return template integer { + p.stop; + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_013() runs on GeneralComp system GeneralComp { + template @fuzzy integer mw_test := f_test(); + timer t_tmr := 0.1; + t_tmr.start; + connect(mtc:p, mtc:p); + p.send(1); + alt { + [] p.receive(mw_test) {} + [] t_tmr.timeout {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_013()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_015.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_015.ttcn new file mode 100644 index 00000000..3b8360bb --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_015.ttcn @@ -0,0 +1,48 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the halt operation cannot be used in a function called during receiving operation (in templates) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_015 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return template integer { + p.halt; + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_015() runs on GeneralComp system GeneralComp { + template @fuzzy integer mw_test := f_test(); + timer t_tmr := 0.1; + t_tmr.start; + connect(mtc:p, mtc:p); + p.send(1); + alt { + [] p.receive(mw_test) {} + [] t_tmr.timeout {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_015()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_016.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_016.ttcn new file mode 100644 index 00000000..7db6d250 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_016.ttcn @@ -0,0 +1,48 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the clear operation cannot be used in a function called during receiving operation (in templates) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_016 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return template integer { + p.clear; + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_016() runs on GeneralComp system GeneralComp { + template @fuzzy integer mw_test := f_test(); + timer t_tmr := 0.1; + t_tmr.start; + connect(mtc:p, mtc:p); + p.send(1); + alt { + [] p.receive(mw_test) {} + [] t_tmr.timeout {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_016()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_017.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_017.ttcn new file mode 100644 index 00000000..9c54c7de --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_017.ttcn @@ -0,0 +1,43 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the checkstate operation cannot be used in a function called during receiving operation (in templates) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_017 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return template integer { + if (p.checkstate("Started")) { return ?; } + else { return 1; } + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_017() runs on GeneralComp system GeneralComp { + template @fuzzy integer mw_test := f_test(); + connect(mtc:p, mtc:p); + p.send(1); + p.receive(mw_test); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_017()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_018.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_018.ttcn new file mode 100644 index 00000000..e7e3d4ab --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_018.ttcn @@ -0,0 +1,43 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the send operation cannot be used in a function called during receiving operation (in templates) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_018 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return template integer { + p.send(2); + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_018() runs on GeneralComp system GeneralComp { + template @fuzzy integer mw_test := f_test(); + connect(mtc:p, mtc:p); + p.send(1); + p.receive(mw_test); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_018()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_019.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_019.ttcn new file mode 100644 index 00000000..c096a4db --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_019.ttcn @@ -0,0 +1,44 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the receive operation cannot be used in a function called during receiving operation (in templates) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_019 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return template integer { + p.receive(integer:?); + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_019() runs on GeneralComp system GeneralComp { + template @fuzzy integer mw_test := f_test(); + connect(mtc:p, mtc:p); + p.send(1); + p.send(1); + p.receive(mw_test); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_019()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_020.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_020.ttcn new file mode 100644 index 00000000..e99b99a9 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_020.ttcn @@ -0,0 +1,44 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the trigger operation cannot be used in a function called during receiving operation (in templates) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_020 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return template integer { + p.trigger(integer:?); + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_020() runs on GeneralComp system GeneralComp { + template @fuzzy integer mw_test := f_test(); + connect(mtc:p, mtc:p); + p.send(1); + p.send(1); + p.receive(mw_test); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_020()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_021.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_021.ttcn new file mode 100644 index 00000000..989a5b38 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_021.ttcn @@ -0,0 +1,52 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the call operation cannot be used in a function called during receiving operation (in templates) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_021 { + type port P message { + inout integer; + } + + signature S(); + + type port PSig procedure { + inout S; + } + + type component GeneralComp { + port P p; + port PSig psig; + } + + function f_test() runs on GeneralComp return template integer { + psig.call(S:{}, nowait); + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_021() runs on GeneralComp system GeneralComp { + template @fuzzy integer mw_test := f_test(); + var GeneralComp v_ptc := GeneralComp.create; + connect(mtc:p, mtc:p); + connect(mtc:psig, v_ptc:psig); + p.send(1); + p.receive(mw_test); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_021()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_022.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_022.ttcn new file mode 100644 index 00000000..73bd4a8b --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_022.ttcn @@ -0,0 +1,57 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the getcall operation cannot be used in a function called during receiving operation (in templates) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_022 { + type port P message { + inout integer; + } + + signature S(); + + type port PSig procedure { + inout S; + } + + type component GeneralComp { + port P p; + port PSig psig; + } + + function f_ptcBehaviour() runs on GeneralComp { + psig.call(S:{}, nowait); + } + + function f_test() runs on GeneralComp return template integer { + psig.getcall(S:?); + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_022() runs on GeneralComp system GeneralComp { + template @fuzzy integer mw_test := f_test(); + var GeneralComp v_ptc := GeneralComp.create; + connect(mtc:p, mtc:p); + connect(mtc:psig, v_ptc:psig); + v_ptc.start(f_ptcBehaviour()); + p.send(1); + p.receive(mw_test); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_022()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_023.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_023.ttcn new file mode 100644 index 00000000..3108a76f --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_023.ttcn @@ -0,0 +1,58 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the reply operation cannot be used in a function called during receiving operation (in templates) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_023 { + type port P message { + inout integer; + } + + signature S(); + + type port PSig procedure { + inout S; + } + + type component GeneralComp { + port P p; + port PSig psig; + } + + function f_ptcBehaviour() runs on GeneralComp { + psig.call(S:{}, nowait); + } + + function f_test() runs on GeneralComp return template integer { + psig.reply(S:{}); + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_023() runs on GeneralComp system GeneralComp { + template @fuzzy integer mw_test := f_test(); + var GeneralComp v_ptc := GeneralComp.create; + connect(mtc:p, mtc:p); + connect(mtc:psig, v_ptc:psig); + v_ptc.start(f_ptcBehaviour()); + p.send(1); + psig.getcall(S:?); + p.receive(mw_test); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_023()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_024.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_024.ttcn new file mode 100644 index 00000000..c5df269b --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_024.ttcn @@ -0,0 +1,59 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the getreply operation cannot be used in a function called during receiving operation (in templates) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_024 { + type port P message { + inout integer; + } + + signature S(); + + type port PSig procedure { + inout S; + } + + type component GeneralComp { + port P p; + port PSig psig; + } + + function f_ptcBehaviour() runs on GeneralComp { + psig.getcall(S:?); + psig.reply(S:{}); + } + + function f_test() runs on GeneralComp return template integer { + psig.getreply(S:?); + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_024() runs on GeneralComp system GeneralComp { + template @fuzzy integer mw_test := f_test(); + var GeneralComp v_ptc := GeneralComp.create; + connect(mtc:p, mtc:p); + connect(mtc:psig, v_ptc:psig); + v_ptc.start(f_ptcBehaviour()); + psig.call(S:{}, nowait); + p.send(1); + p.receive(mw_test); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_024()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_025.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_025.ttcn new file mode 100644 index 00000000..ecb398df --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_025.ttcn @@ -0,0 +1,58 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the raise operation cannot be used in a function called during receiving operation (in templates) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_025 { + type port P message { + inout integer; + } + + signature S() exception (charstring); + + type port PSig procedure { + inout S; + } + + type component GeneralComp { + port P p; + port PSig psig; + } + + function f_ptcBehaviour() runs on GeneralComp { + psig.call(S:{}, nowait); + } + + function f_test() runs on GeneralComp return template integer { + psig.raise(S, "UserException"); + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_025() runs on GeneralComp system GeneralComp { + template @fuzzy integer mw_test := f_test(); + var GeneralComp v_ptc := GeneralComp.create; + connect(mtc:p, mtc:p); + connect(mtc:psig, v_ptc:psig); + v_ptc.start(f_ptcBehaviour()); + p.send(1); + psig.getcall(S:?); + p.receive(mw_test); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_025()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_026.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_026.ttcn new file mode 100644 index 00000000..9239cd4b --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_026.ttcn @@ -0,0 +1,59 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the catch operation cannot be used in a function called during receiving operation (in templates) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_026 { + type port P message { + inout integer; + } + + signature S() exception (charstring); + + type port PSig procedure { + inout S; + } + + type component GeneralComp { + port P p; + port PSig psig; + } + + function f_ptcBehaviour() runs on GeneralComp { + psig.getcall(S:?); + psig.raise(S, "UserException"); + } + + function f_test() runs on GeneralComp return template integer { + psig.catch(S, charstring:?); + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_026() runs on GeneralComp system GeneralComp { + template @fuzzy integer mw_test := f_test(); + var GeneralComp v_ptc := GeneralComp.create; + connect(mtc:p, mtc:p); + connect(mtc:psig, v_ptc:psig); + v_ptc.start(f_ptcBehaviour()); + psig.call(S:{}, nowait); + p.send(1); + p.receive(mw_test); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_026()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_027.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_027.ttcn new file mode 100644 index 00000000..d6ad26f3 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_027.ttcn @@ -0,0 +1,43 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the check operation cannot be used in a function called during receiving operation (in templates) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_027 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return template integer { + p.check; + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_027() runs on GeneralComp system GeneralComp { + template @fuzzy integer mw_test := f_test(); + connect(mtc:p, mtc:p); + p.send(1); + p.receive(mw_test); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_027()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_028.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_028.ttcn new file mode 100644 index 00000000..d97abcc8 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_028.ttcn @@ -0,0 +1,43 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the connect operation cannot be used in a function called during receiving operation (in templates) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_028 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return template integer { + connect(mtc:p, mtc:p); + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_028() runs on GeneralComp system GeneralComp { + template @fuzzy integer mw_test := f_test(); + connect(mtc:p, mtc:p); + p.send(1); + p.receive(mw_test); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_028()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_029.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_029.ttcn new file mode 100644 index 00000000..6ec4b8bc --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_029.ttcn @@ -0,0 +1,43 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the disconnect operation cannot be used in a function called during receiving operation (in templates) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_029 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return template integer { + disconnect(mtc:p, mtc:p); + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_029() runs on GeneralComp system GeneralComp { + template @fuzzy integer mw_test := f_test(); + connect(mtc:p, mtc:p); + p.send(1); + p.receive(mw_test); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_029()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_030.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_030.ttcn new file mode 100644 index 00000000..49a7497b --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_030.ttcn @@ -0,0 +1,44 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the map operation cannot be used in a function called during receiving operation (in templates) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_030 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp system GeneralComp return template integer { + map(mtc:p, system:p); + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_030() runs on GeneralComp system GeneralComp { + template @fuzzy integer mw_test := f_test(); + connect(mtc:p, mtc:p); + p.send(1); + disconnect(mtc:p, mtc:p); + p.receive(mw_test); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_030()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_031.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_031.ttcn new file mode 100644 index 00000000..68666120 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_031.ttcn @@ -0,0 +1,45 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the unmap operation cannot be used in a function called during receiving operation (in templates) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_031 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp system GeneralComp return template integer { + unmap(mtc:p, system:p); + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_031() runs on GeneralComp system GeneralComp { + template @fuzzy integer mw_test := f_test(); + connect(mtc:p, mtc:p); + p.send(1); + disconnect(mtc:p, mtc:p); + map(mtc:p, system:p); + p.receive(mw_test); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_031()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_032.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_032.ttcn new file mode 100644 index 00000000..3b7f2aa2 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_032.ttcn @@ -0,0 +1,42 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the action operation cannot be used in a function called during receiving operation (in templates) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// c) The action operation (see notes 2 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_032 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return template integer { + action("My action"); + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_032() runs on GeneralComp system GeneralComp { + template @fuzzy integer mw_test := f_test(); + connect(mtc:p, mtc:p); + p.send(1); + p.receive(mw_test); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_032()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_033.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_033.ttcn new file mode 100644 index 00000000..d67c5607 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_033.ttcn @@ -0,0 +1,43 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the timer.start operation cannot be used in a function called during receiving operation (in templates) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// d) All timer operations, i.e. start (timer), stop (timer), running (timer), read, timeout (see notes 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_033 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + timer tc_tmr := 0.1; + } + + function f_test() runs on GeneralComp return template integer { + tc_tmr.start; + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_033() runs on GeneralComp system GeneralComp { + template @fuzzy integer mw_test := f_test(); + connect(mtc:p, mtc:p); + p.send(1); + p.receive(mw_test); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_033()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_034.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_034.ttcn new file mode 100644 index 00000000..deced8a2 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_034.ttcn @@ -0,0 +1,44 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the timer.stop operation cannot be used in a function called during receiving operation (in templates) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// d) All timer operations, i.e. start (timer), stop (timer), running (timer), read, timeout (see notes 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_034 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + timer tc_tmr := 0.1; + } + + function f_test() runs on GeneralComp return template integer { + tc_tmr.stop; + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_034() runs on GeneralComp system GeneralComp { + template @fuzzy integer mw_test := f_test(); + connect(mtc:p, mtc:p); + tc_tmr.start; + p.send(1); + p.receive(mw_test); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_034()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_035.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_035.ttcn new file mode 100644 index 00000000..f2638947 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_035.ttcn @@ -0,0 +1,44 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the timer.running operation cannot be used in a function called during receiving operation (in templates) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// d) All timer operations, i.e. start (timer), stop (timer), running (timer), read, timeout (see notes 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_035 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + timer tc_tmr := 0.1; + } + + function f_test() runs on GeneralComp return template integer { + if (tc_tmr.running) { return ?; } + else { return 1; } + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_035() runs on GeneralComp system GeneralComp { + template @fuzzy integer mw_test := f_test(); + connect(mtc:p, mtc:p); + tc_tmr.start; + p.send(1); + p.receive(mw_test); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_035()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_036.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_036.ttcn new file mode 100644 index 00000000..5cfda034 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_036.ttcn @@ -0,0 +1,44 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the read operation cannot be used in a function called during receiving operation (in templates) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// d) All timer operations, i.e. start (timer), stop (timer), running (timer), read, timeout (see notes 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_036 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + timer tc_tmr := 0.1; + } + + function f_test() runs on GeneralComp return template integer { + if (tc_tmr.read > 0.0) { return ?; } + else { return 1; } + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_036() runs on GeneralComp system GeneralComp { + template @fuzzy integer mw_test := f_test(); + connect(mtc:p, mtc:p); + tc_tmr.start; + p.send(1); + p.receive(mw_test); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_036()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_037.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_037.ttcn new file mode 100644 index 00000000..9dfca68e --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_037.ttcn @@ -0,0 +1,44 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the timeout operation cannot be used in a function called during receiving operation (in templates) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// d) All timer operations, i.e. start (timer), stop (timer), running (timer), read, timeout (see notes 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_037 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + timer tc_tmr := 0.1; + } + + function f_test() runs on GeneralComp return template integer { + any timer.timeout; + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_037() runs on GeneralComp system GeneralComp { + template @fuzzy integer mw_test := f_test(); + connect(mtc:p, mtc:p); + tc_tmr.start; + p.send(1); + p.receive(mw_test); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_037()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_038.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_038.ttcn new file mode 100644 index 00000000..ec4328ee --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_038.ttcn @@ -0,0 +1,50 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that a non-deterministic external function call cannot be used in a function called during receiving operation (in templates) + ** @verdict pass reject + ** @configuration external_functions + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// e) Calling non-deterministic external functions, i.e. external functions where the resulting values for actual +// inout or out parameters or the return value may differ for different invocations with the same actual in and +// inout parameters (see notes 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_038 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + /** + * @return always true + */ + external function xf_NegSem_160104_invoking_functions_from_specific_places_001() return boolean; + + function f_test() runs on GeneralComp return template integer { + if (xf_NegSem_160104_invoking_functions_from_specific_places_001()) { return ?; } + else { return 1; } + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_038() runs on GeneralComp system GeneralComp { + template @fuzzy integer mw_test := f_test(); + connect(mtc:p, mtc:p); + p.send(1); + p.receive(mw_test); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_038()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_039.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_039.ttcn new file mode 100644 index 00000000..5ee41f22 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_039.ttcn @@ -0,0 +1,42 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the predefined rnd function cannot be used in a function called during receiving operation (in templates) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// f) Calling the rnd predefined function (see notes 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_039 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return template integer { + if (rnd() > 0.5) { return ?; } + else { return 1; } + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_039() runs on GeneralComp system GeneralComp { + template @fuzzy integer mw_test := f_test(); + connect(mtc:p, mtc:p); + p.send(1); + p.receive(mw_test); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_039()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_040.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_040.ttcn new file mode 100644 index 00000000..fe478834 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_040.ttcn @@ -0,0 +1,44 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify a function called during receiving operation cannot contain an assignment of a component variable (in templates) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// g) Changing of component variables, i.e. using component variables on the left-hand side of assignments, +// and in the instantiation of out and inout parameters (see notes 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_040 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + var integer vc_int; + } + + function f_test() runs on GeneralComp return template integer { + vc_int := 1; + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_040() runs on GeneralComp system GeneralComp { + template @fuzzy integer mw_test := f_test(); + connect(mtc:p, mtc:p); + p.send(1); + p.receive(mw_test); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_040()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_041.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_041.ttcn new file mode 100644 index 00000000..1bf4b549 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_041.ttcn @@ -0,0 +1,48 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify a function called during receiving operation cannot contain a component variable used as an actual out parameter (in templates) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// g) Changing of component variables, i.e. using component variables on the left-hand side of assignments, +// and in the instantiation of out and inout parameters (see notes 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_041 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + var integer vc_int; + } + + function f_out (out integer p_out) { + p_out := 1; + } + + function f_test() runs on GeneralComp return template integer { + f_out(vc_int); + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_041() runs on GeneralComp system GeneralComp { + template @fuzzy integer mw_test := f_test(); + connect(mtc:p, mtc:p); + p.send(1); + p.receive(mw_test); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_041()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_042.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_042.ttcn new file mode 100644 index 00000000..e3d8709d --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_042.ttcn @@ -0,0 +1,48 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify a function called during receiving operation cannot contain a component variable used as an actual inout parameter (in templates) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// g) Changing of component variables, i.e. using component variables on the left-hand side of assignments, +// and in the instantiation of out and inout parameters (see notes 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_042 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + var integer vc_int := 0; + } + + function f_inout (inout integer p_inout) { + p_inout := 1; + } + + function f_test() runs on GeneralComp return template integer { + f_inout(vc_int); + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_042() runs on GeneralComp system GeneralComp { + template @fuzzy integer mw_test := f_test(); + connect(mtc:p, mtc:p); + p.send(1); + p.receive(mw_test); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_042()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_043.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_043.ttcn new file mode 100644 index 00000000..1ecb2561 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_043.ttcn @@ -0,0 +1,41 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the setverdict operation cannot be used in a function called during receiving operation (in templates) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// h) Calling the setverdict operation (see notes 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_043 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return template integer { + setverdict(pass); + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_043() runs on GeneralComp system GeneralComp { + template @fuzzy integer mw_test := f_test(); + connect(mtc:p, mtc:p); + p.send(1); + p.receive(mw_test); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_043()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_044.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_044.ttcn new file mode 100644 index 00000000..ddc07aa8 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_044.ttcn @@ -0,0 +1,46 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the activate operation cannot be used in a function called during receiving operation (in templates) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// i) Activation and deactivation of defaults, i.e. the activate and deactivate statements (see notes 5 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_044 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + altstep a_anyTimer() runs on GeneralComp { + [] any timer.timeout {} + } + + function f_test() runs on GeneralComp return template integer { + activate(a_anyTimer()); + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_044() runs on GeneralComp system GeneralComp { + template @fuzzy integer mw_test := f_test(); + connect(mtc:p, mtc:p); + p.send(1); + p.receive(mw_test); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_044()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_045.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_045.ttcn new file mode 100644 index 00000000..6265b1cc --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_045.ttcn @@ -0,0 +1,47 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the deactivate operation cannot be used in a function called during receiving operation (in templates) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// i) Activation and deactivation of defaults, i.e. the activate and deactivate statements (see notes 5 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_045 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + altstep a_anyTimer() runs on GeneralComp { + [] any timer.timeout {} + } + + function f_test() runs on GeneralComp return template integer { + deactivate; + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_045() runs on GeneralComp system GeneralComp { + template @fuzzy integer mw_test := f_test(); + activate(a_anyTimer()); + connect(mtc:p, mtc:p); + p.send(1); + p.receive(mw_test); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_045()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_046.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_046.ttcn new file mode 100644 index 00000000..bb4946a2 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_046.ttcn @@ -0,0 +1,47 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the create operation cannot be used in a function called during receiving operation (in template fields) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// a) All component operations, i.e. create, start (component), stop (component), kill, running (component), +// alive, done and killed (see notes 1, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_046 { + type record R { + integer field1 + } + + type port P message { + inout R; + } + + type component GeneralComp { + port P p; + } + + function f_test() return template integer { + var GeneralComp v_ptc := GeneralComp.create; + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_046() runs on GeneralComp system GeneralComp { + template @fuzzy R mw_test := { field1 := f_test() }; + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + p.receive(mw_test); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_046()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_047.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_047.ttcn new file mode 100644 index 00000000..dce824af --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_047.ttcn @@ -0,0 +1,52 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the component.start operation cannot be used in a function called during receiving operation (in template fields) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// a) All component operations, i.e. create, start (component), stop (component), kill, running (component), +// alive, done and killed (see notes 1, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_047 { + type record R { + integer field1 + } + + type port P message { + inout R; + } + + type component GeneralComp { + port P p; + } + + function f_ptcBehaviour() runs on GeneralComp { + log("PTC running"); + } + + function f_test(GeneralComp p_ptc) return template integer { + p_ptc.start(f_ptcBehaviour()); + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_047() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + template @fuzzy R mw_test := { field1 := f_test(v_ptc) }; + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + p.receive(mw_test); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_047()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_048.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_048.ttcn new file mode 100644 index 00000000..514e2c74 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_048.ttcn @@ -0,0 +1,55 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the component.stop operation cannot be used in a function called during receiving operation (in template fields) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// a) All component operations, i.e. create, start (component), stop (component), kill, running (component), +// alive, done and killed (see notes 1, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_048 { + type record R { + integer field1 + } + + type port P message { + inout R; + } + + type component GeneralComp { + port P p; + } + + function f_ptcBehaviour() runs on GeneralComp { + timer t_tmr := 10.0; + t_tmr.start; + t_tmr.timeout; + } + + function f_test(GeneralComp p_ptc) return template integer { + p_ptc.stop; + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_048() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + template @fuzzy R mw_test := { field1 := f_test(v_ptc) }; + v_ptc.start(f_ptcBehaviour()); + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + p.receive(mw_test); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_048()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_049.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_049.ttcn new file mode 100644 index 00000000..6be36d52 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_049.ttcn @@ -0,0 +1,55 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the kill operation cannot be used in a function called during receiving operation (in template fields) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// a) All component operations, i.e. create, start (component), stop (component), kill, running (component), +// alive, done and killed (see notes 1, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_049 { + type record R { + integer field1 + } + + type port P message { + inout R; + } + + type component GeneralComp { + port P p; + } + + function f_ptcBehaviour() runs on GeneralComp { + timer t_tmr := 10.0; + t_tmr.start; + t_tmr.timeout; + } + + function f_test(GeneralComp p_ptc) return template integer { + p_ptc.kill; + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_049() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + template @fuzzy R mw_test := { field1 := f_test(v_ptc) }; + v_ptc.start(f_ptcBehaviour()); + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + p.receive(mw_test); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_049()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_050.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_050.ttcn new file mode 100644 index 00000000..8ff568d2 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_050.ttcn @@ -0,0 +1,55 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the component.running operation cannot be used in a function called during receiving operation (in template fields) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// a) All component operations, i.e. create, start (component), stop (component), kill, running (component), +// alive, done and killed (see notes 1, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_050 { + type record R { + integer field1 + } + + type port P message { + inout R; + } + + type component GeneralComp { + port P p; + } + + function f_ptcBehaviour() runs on GeneralComp { + timer t_tmr := 10.0; + t_tmr.start; + t_tmr.timeout; + } + + function f_test(GeneralComp p_ptc) return template integer { + if (p_ptc.running) { return ?; } + else { return 1; } + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_050() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + template @fuzzy R mw_test := { field1 := f_test(v_ptc) }; + v_ptc.start(f_ptcBehaviour()); + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + p.receive(mw_test); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_050()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_051.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_051.ttcn new file mode 100644 index 00000000..8c842a95 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_051.ttcn @@ -0,0 +1,55 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the alive operation cannot be used in a function called during receiving operation (in template fields) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// a) All component operations, i.e. create, start (component), stop (component), kill, running (component), +// alive, done and killed (see notes 1, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_051 { + type record R { + integer field1 + } + + type port P message { + inout R; + } + + type component GeneralComp { + port P p; + } + + function f_ptcBehaviour() runs on GeneralComp { + timer t_tmr := 10.0; + t_tmr.start; + t_tmr.timeout; + } + + function f_test(GeneralComp p_ptc) return template integer { + if (p_ptc.alive) { return ?; } + else { return 1; } + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_051() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + template @fuzzy R mw_test := { field1 := f_test(v_ptc) }; + v_ptc.start(f_ptcBehaviour()); + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + p.receive(mw_test); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_051()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_052.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_052.ttcn new file mode 100644 index 00000000..9e6e3057 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_052.ttcn @@ -0,0 +1,52 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the done operation cannot be used in a function called during receiving operation (in template fields) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// a) All component operations, i.e. create, start (component), stop (component), kill, running (component), +// alive, done and killed (see notes 1, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_052 { + type record R { + integer field1 + } + + type port P message { + inout R; + } + + type component GeneralComp { + port P p; + } + + function f_ptcBehaviour() runs on GeneralComp { + } + + function f_test(GeneralComp p_ptc) return template integer { + p_ptc.done; + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_052() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + template @fuzzy R mw_test := { field1 := f_test(v_ptc) }; + v_ptc.start(f_ptcBehaviour()); + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + p.receive(mw_test); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_052()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_053.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_053.ttcn new file mode 100644 index 00000000..acda4c1d --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_053.ttcn @@ -0,0 +1,52 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the killed operation cannot be used in a function called during receiving operation (in template fields) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// a) All component operations, i.e. create, start (component), stop (component), kill, running (component), +// alive, done and killed (see notes 1, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_053 { + type record R { + integer field1 + } + + type port P message { + inout R; + } + + type component GeneralComp { + port P p; + } + + function f_ptcBehaviour() runs on GeneralComp { + } + + function f_test(GeneralComp p_ptc) return template integer { + p_ptc.killed; + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_053() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + template @fuzzy R mw_test := { field1 := f_test(v_ptc) }; + v_ptc.start(f_ptcBehaviour()); + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + p.receive(mw_test); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_053()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_054.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_054.ttcn new file mode 100644 index 00000000..52513923 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_054.ttcn @@ -0,0 +1,52 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the port.start operation cannot be used in a function called during receiving operation (in template fields) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_054 { + type record R { + integer field1 + } + + type port P message { + inout R; + } + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return template integer { + p.start; + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_054() runs on GeneralComp system GeneralComp { + template @fuzzy R mw_test := { field1 := f_test() }; + timer t_tmr := 0.1; + t_tmr.start; + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + alt { + [] p.receive(mw_test) {} + [] t_tmr.timeout {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_054()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_055.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_055.ttcn new file mode 100644 index 00000000..4e310240 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_055.ttcn @@ -0,0 +1,52 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the port.stop operation cannot be used in a function called during receiving operation (in template fields) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_013 { + type record R { + integer field1 + } + + type port P message { + inout R; + } + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return template integer { + p.stop; + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_013() runs on GeneralComp system GeneralComp { + template @fuzzy R mw_test := { field1 := f_test() }; + timer t_tmr := 0.1; + t_tmr.start; + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + alt { + [] p.receive(mw_test) {} + [] t_tmr.timeout {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_013()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_056.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_056.ttcn new file mode 100644 index 00000000..aaa5456c --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_056.ttcn @@ -0,0 +1,52 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the halt operation cannot be used in a function called during receiving operation (in template fields) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_056 { + type record R { + integer field1 + } + + type port P message { + inout R; + } + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return template integer { + p.halt; + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_056() runs on GeneralComp system GeneralComp { + template @fuzzy R mw_test := { field1 := f_test() }; + timer t_tmr := 0.1; + t_tmr.start; + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + alt { + [] p.receive(mw_test) {} + [] t_tmr.timeout {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_056()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_057.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_057.ttcn new file mode 100644 index 00000000..b179631a --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_057.ttcn @@ -0,0 +1,52 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the clear operation cannot be used in a function called during receiving operation (in template fields) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_057 { + type record R { + integer field1 + } + + type port P message { + inout R; + } + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return template integer { + p.clear; + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_057() runs on GeneralComp system GeneralComp { + template @fuzzy R mw_test := { field1 := f_test() }; + timer t_tmr := 0.1; + t_tmr.start; + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + alt { + [] p.receive(mw_test) {} + [] t_tmr.timeout {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_057()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_058.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_058.ttcn new file mode 100644 index 00000000..b469e421 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_058.ttcn @@ -0,0 +1,47 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the checkstate operation cannot be used in a function called during receiving operation (in template fields) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_058 { + type record R { + integer field1 + } + + type port P message { + inout R; + } + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return template integer { + if (p.checkstate("Started")) { return ?; } + else { return 1; } + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_058() runs on GeneralComp system GeneralComp { + template @fuzzy R mw_test := { field1 := f_test() }; + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + p.receive(mw_test); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_058()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_059.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_059.ttcn new file mode 100644 index 00000000..87c4b6e0 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_059.ttcn @@ -0,0 +1,47 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the send operation cannot be used in a function called during receiving operation (in template fields) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_059 { + type record R { + integer field1 + } + + type port P message { + inout R; + } + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return template integer { + p.send(R:{ field1 := 2 }); + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_059() runs on GeneralComp system GeneralComp { + template @fuzzy R mw_test := { field1 := f_test() }; + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + p.receive(mw_test); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_059()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_060.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_060.ttcn new file mode 100644 index 00000000..7a813f37 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_060.ttcn @@ -0,0 +1,48 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the receive operation cannot be used in a function called during receiving operation (in template fields) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_060 { + type record R { + integer field1 + } + + type port P message { + inout R; + } + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return template integer { + p.receive(R:?); + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_060() runs on GeneralComp system GeneralComp { + template @fuzzy R mw_test := { field1 := f_test() }; + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + p.send(R:{ field1 := 1 }); + p.receive(mw_test); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_060()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_061.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_061.ttcn new file mode 100644 index 00000000..745fc897 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_061.ttcn @@ -0,0 +1,48 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the trigger operation cannot be used in a function called during receiving operation (in template fields) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_061 { + type record R { + integer field1 + } + + type port P message { + inout R; + } + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return template integer { + p.trigger(R:?); + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_061() runs on GeneralComp system GeneralComp { + template @fuzzy R mw_test := { field1 := f_test() }; + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + p.send(R:{ field1 := 1 }); + p.receive(mw_test); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_061()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_062.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_062.ttcn new file mode 100644 index 00000000..e88bf05b --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_062.ttcn @@ -0,0 +1,56 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the call operation cannot be used in a function called during receiving operation (in template fields) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_062 { + type record R { + integer field1 + } + + type port P message { + inout R; + } + + signature S(); + + type port PSig procedure { + inout S; + } + + type component GeneralComp { + port P p; + port PSig psig; + } + + function f_test() runs on GeneralComp return template integer { + psig.call(S:{}, nowait); + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_062() runs on GeneralComp system GeneralComp { + template @fuzzy R mw_test := { field1 := f_test() }; + var GeneralComp v_ptc := GeneralComp.create; + connect(mtc:p, mtc:p); + connect(mtc:psig, v_ptc:psig); + p.send(R:{ field1 := 1 }); + p.receive(mw_test); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_062()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_063.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_063.ttcn new file mode 100644 index 00000000..cad4369b --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_063.ttcn @@ -0,0 +1,61 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the getcall operation cannot be used in a function called during receiving operation (in template fields) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_063 { + type record R { + integer field1 + } + + type port P message { + inout R; + } + + signature S(); + + type port PSig procedure { + inout S; + } + + type component GeneralComp { + port P p; + port PSig psig; + } + + function f_ptcBehaviour() runs on GeneralComp { + psig.call(S:{}, nowait); + } + + function f_test() runs on GeneralComp return template integer { + psig.getcall(S:?); + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_063() runs on GeneralComp system GeneralComp { + template @fuzzy R mw_test := { field1 := f_test() }; + var GeneralComp v_ptc := GeneralComp.create; + connect(mtc:p, mtc:p); + connect(mtc:psig, v_ptc:psig); + v_ptc.start(f_ptcBehaviour()); + p.send(R:{ field1 := 1 }); + p.receive(mw_test); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_063()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_064.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_064.ttcn new file mode 100644 index 00000000..3c714e44 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_064.ttcn @@ -0,0 +1,62 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the reply operation cannot be used in a function called during receiving operation (in template fields) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_064 { + type record R { + integer field1 + } + + type port P message { + inout R; + } + + signature S(); + + type port PSig procedure { + inout S; + } + + type component GeneralComp { + port P p; + port PSig psig; + } + + function f_ptcBehaviour() runs on GeneralComp { + psig.call(S:{}, nowait); + } + + function f_test() runs on GeneralComp return template integer { + psig.reply(S:{}); + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_064() runs on GeneralComp system GeneralComp { + template @fuzzy R mw_test := { field1 := f_test() }; + var GeneralComp v_ptc := GeneralComp.create; + connect(mtc:p, mtc:p); + connect(mtc:psig, v_ptc:psig); + v_ptc.start(f_ptcBehaviour()); + p.send(R:{ field1 := 1 }); + psig.getcall(S:?); + p.receive(mw_test); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_064()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_065.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_065.ttcn new file mode 100644 index 00000000..05c6bca9 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_065.ttcn @@ -0,0 +1,63 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the getreply operation cannot be used in a function called during receiving operation (in template fields) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_065 { + type record R { + integer field1 + } + + type port P message { + inout R; + } + + signature S(); + + type port PSig procedure { + inout S; + } + + type component GeneralComp { + port P p; + port PSig psig; + } + + function f_ptcBehaviour() runs on GeneralComp { + psig.getcall(S:?); + psig.reply(S:{}); + } + + function f_test() runs on GeneralComp return template integer { + psig.getreply(S:?); + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_065() runs on GeneralComp system GeneralComp { + template @fuzzy R mw_test := { field1 := f_test() }; + var GeneralComp v_ptc := GeneralComp.create; + connect(mtc:p, mtc:p); + connect(mtc:psig, v_ptc:psig); + v_ptc.start(f_ptcBehaviour()); + psig.call(S:{}, nowait); + p.send(R:{ field1 := 1 }); + p.receive(mw_test); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_065()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_066.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_066.ttcn new file mode 100644 index 00000000..cf73c6ff --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_066.ttcn @@ -0,0 +1,62 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the raise operation cannot be used in a function called during receiving operation (in template fields) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_066 { + type record R { + integer field1 + } + + type port P message { + inout R; + } + + signature S() exception (charstring); + + type port PSig procedure { + inout S; + } + + type component GeneralComp { + port P p; + port PSig psig; + } + + function f_ptcBehaviour() runs on GeneralComp { + psig.call(S:{}, nowait); + } + + function f_test() runs on GeneralComp return template integer { + psig.raise(S, "UserException"); + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_066() runs on GeneralComp system GeneralComp { + template @fuzzy R mw_test := { field1 := f_test() }; + var GeneralComp v_ptc := GeneralComp.create; + connect(mtc:p, mtc:p); + connect(mtc:psig, v_ptc:psig); + v_ptc.start(f_ptcBehaviour()); + p.send(R:{ field1 := 1 }); + psig.getcall(S:?); + p.receive(mw_test); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_066()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_067.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_067.ttcn new file mode 100644 index 00000000..8f318b40 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_067.ttcn @@ -0,0 +1,63 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the catch operation cannot be used in a function called during receiving operation (in template fields) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_067 { + type record R { + integer field1 + } + + type port P message { + inout R; + } + + signature S() exception (charstring); + + type port PSig procedure { + inout S; + } + + type component GeneralComp { + port P p; + port PSig psig; + } + + function f_ptcBehaviour() runs on GeneralComp { + psig.getcall(S:?); + psig.raise(S, "UserException"); + } + + function f_test() runs on GeneralComp return template integer { + psig.catch(S, charstring:?); + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_067() runs on GeneralComp system GeneralComp { + template @fuzzy R mw_test := { field1 := f_test() }; + var GeneralComp v_ptc := GeneralComp.create; + connect(mtc:p, mtc:p); + connect(mtc:psig, v_ptc:psig); + v_ptc.start(f_ptcBehaviour()); + psig.call(S:{}, nowait); + p.send(R:{ field1 := 1 }); + p.receive(mw_test); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_067()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_068.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_068.ttcn new file mode 100644 index 00000000..eb132d78 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_068.ttcn @@ -0,0 +1,47 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the check operation cannot be used in a function called during receiving operation (in template fields) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_068 { + type record R { + integer field1 + } + + type port P message { + inout R; + } + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return template integer { + p.check; + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_068() runs on GeneralComp system GeneralComp { + template @fuzzy R mw_test := { field1 := f_test() }; + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + p.receive(mw_test); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_068()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_069.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_069.ttcn new file mode 100644 index 00000000..b2fe65ca --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_069.ttcn @@ -0,0 +1,47 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the connect operation cannot be used in a function called during receiving operation (in template fields) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_069 { + type record R { + integer field1 + } + + type port P message { + inout R; + } + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return template integer { + connect(mtc:p, mtc:p); + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_069() runs on GeneralComp system GeneralComp { + template @fuzzy R mw_test := { field1 := f_test() }; + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + p.receive(mw_test); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_069()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_070.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_070.ttcn new file mode 100644 index 00000000..2119ef5d --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_070.ttcn @@ -0,0 +1,47 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the disconnect operation cannot be used in a function called during receiving operation (in template fields) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_070 { + type record R { + integer field1 + } + + type port P message { + inout R; + } + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return template integer { + disconnect(mtc:p, mtc:p); + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_070() runs on GeneralComp system GeneralComp { + template @fuzzy R mw_test := { field1 := f_test() }; + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + p.receive(mw_test); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_070()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_071.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_071.ttcn new file mode 100644 index 00000000..0f86fb8e --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_071.ttcn @@ -0,0 +1,48 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the map operation cannot be used in a function called during receiving operation (in template fields) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_071 { + type record R { + integer field1 + } + + type port P message { + inout R; + } + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp system GeneralComp return template integer { + map(mtc:p, system:p); + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_071() runs on GeneralComp system GeneralComp { + template @fuzzy R mw_test := { field1 := f_test() }; + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + disconnect(mtc:p, mtc:p); + p.receive(mw_test); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_071()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_072.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_072.ttcn new file mode 100644 index 00000000..94f96b51 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_072.ttcn @@ -0,0 +1,49 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the unmap operation cannot be used in a function called during receiving operation (in template fields) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_072 { + type record R { + integer field1 + } + + type port P message { + inout R; + } + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp system GeneralComp return template integer { + unmap(mtc:p, system:p); + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_072() runs on GeneralComp system GeneralComp { + template @fuzzy R mw_test := { field1 := f_test() }; + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + disconnect(mtc:p, mtc:p); + map(mtc:p, system:p); + p.receive(mw_test); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_072()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_073.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_073.ttcn new file mode 100644 index 00000000..99b2e2c1 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_073.ttcn @@ -0,0 +1,46 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the action operation cannot be used in a function called during receiving operation (in template fields) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// c) The action operation (see notes 2 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_073 { + type record R { + integer field1 + } + + type port P message { + inout R; + } + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return template integer { + action("My action"); + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_073() runs on GeneralComp system GeneralComp { + template @fuzzy R mw_test := { field1 := f_test() }; + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + p.receive(mw_test); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_073()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_074.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_074.ttcn new file mode 100644 index 00000000..31a6970b --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_074.ttcn @@ -0,0 +1,47 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the timer.start operation cannot be used in a function called during receiving operation (in template fields) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// d) All timer operations, i.e. start (timer), stop (timer), running (timer), read, timeout (see notes 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_074 { + type record R { + integer field1 + } + + type port P message { + inout R; + } + + type component GeneralComp { + port P p; + timer tc_tmr := 0.1; + } + + function f_test() runs on GeneralComp return template integer { + tc_tmr.start; + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_074() runs on GeneralComp system GeneralComp { + template @fuzzy R mw_test := { field1 := f_test() }; + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + p.receive(mw_test); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_074()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_075.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_075.ttcn new file mode 100644 index 00000000..d4d68562 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_075.ttcn @@ -0,0 +1,48 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the timer.stop operation cannot be used in a function called during receiving operation (in template fields) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// d) All timer operations, i.e. start (timer), stop (timer), running (timer), read, timeout (see notes 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_075 { + type record R { + integer field1 + } + + type port P message { + inout R; + } + + type component GeneralComp { + port P p; + timer tc_tmr := 0.1; + } + + function f_test() runs on GeneralComp return template integer { + tc_tmr.stop; + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_075() runs on GeneralComp system GeneralComp { + template @fuzzy R mw_test := { field1 := f_test() }; + connect(mtc:p, mtc:p); + tc_tmr.start; + p.send(R:{ field1 := 1 }); + p.receive(mw_test); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_075()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_076.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_076.ttcn new file mode 100644 index 00000000..8d780f82 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_076.ttcn @@ -0,0 +1,48 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the timer.running operation cannot be used in a function called during receiving operation (in template fields) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// d) All timer operations, i.e. start (timer), stop (timer), running (timer), read, timeout (see notes 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_076 { + type record R { + integer field1 + } + + type port P message { + inout R; + } + + type component GeneralComp { + port P p; + timer tc_tmr := 0.1; + } + + function f_test() runs on GeneralComp return template integer { + if (tc_tmr.running) { return ?; } + else { return 1; } + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_076() runs on GeneralComp system GeneralComp { + template @fuzzy R mw_test := { field1 := f_test() }; + connect(mtc:p, mtc:p); + tc_tmr.start; + p.send(R:{ field1 := 1 }); + p.receive(mw_test); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_076()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_077.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_077.ttcn new file mode 100644 index 00000000..f37b15e8 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_077.ttcn @@ -0,0 +1,48 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the read operation cannot be used in a function called during receiving operation (in template fields) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// d) All timer operations, i.e. start (timer), stop (timer), running (timer), read, timeout (see notes 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_077 { + type record R { + integer field1 + } + + type port P message { + inout R; + } + + type component GeneralComp { + port P p; + timer tc_tmr := 0.1; + } + + function f_test() runs on GeneralComp return template integer { + if (tc_tmr.read > 0.0) { return ?; } + else { return 1; } + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_077() runs on GeneralComp system GeneralComp { + template @fuzzy R mw_test := { field1 := f_test() }; + connect(mtc:p, mtc:p); + tc_tmr.start; + p.send(R:{ field1 := 1 }); + p.receive(mw_test); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_077()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_078.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_078.ttcn new file mode 100644 index 00000000..27478808 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_078.ttcn @@ -0,0 +1,48 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the timeout operation cannot be used in a function called during receiving operation (in template fields) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// d) All timer operations, i.e. start (timer), stop (timer), running (timer), read, timeout (see notes 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_078 { + type record R { + integer field1 + } + + type port P message { + inout R; + } + + type component GeneralComp { + port P p; + timer tc_tmr := 0.1; + } + + function f_test() runs on GeneralComp return template integer { + any timer.timeout; + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_078() runs on GeneralComp system GeneralComp { + template @fuzzy R mw_test := { field1 := f_test() }; + connect(mtc:p, mtc:p); + tc_tmr.start; + p.send(R:{ field1 := 1 }); + p.receive(mw_test); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_078()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_079.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_079.ttcn new file mode 100644 index 00000000..13a4aeb5 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_079.ttcn @@ -0,0 +1,54 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that a non-deterministic external function call cannot be used in a function called during receiving operation (in template fields) + ** @verdict pass reject + ** @configuration external_functions + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// e) Calling non-deterministic external functions, i.e. external functions where the resulting values for actual +// inout or out parameters or the return value may differ for different invocations with the same actual in and +// inout parameters (see notes 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_079 { + type record R { + integer field1 + } + + type port P message { + inout R; + } + + type component GeneralComp { + port P p; + } + + /** + * @return always true + */ + external function xf_NegSem_160104_invoking_functions_from_specific_places_001() return boolean; + + function f_test() runs on GeneralComp return template integer { + if (xf_NegSem_160104_invoking_functions_from_specific_places_001()) { return ?; } + else { return 1; } + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_079() runs on GeneralComp system GeneralComp { + template @fuzzy R mw_test := { field1 := f_test() }; + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + p.receive(mw_test); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_079()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_080.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_080.ttcn new file mode 100644 index 00000000..6e4a88b0 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_080.ttcn @@ -0,0 +1,46 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the predefined rnd function cannot be used in a function called during receiving operation (in template fields) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// f) Calling the rnd predefined function (see notes 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_080 { + type record R { + integer field1 + } + + type port P message { + inout R; + } + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return template integer { + if (rnd() > 0.5) { return ?; } + else { return 1; } + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_080() runs on GeneralComp system GeneralComp { + template @fuzzy R mw_test := { field1 := f_test() }; + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + p.receive(mw_test); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_080()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_081.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_081.ttcn new file mode 100644 index 00000000..a951273e --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_081.ttcn @@ -0,0 +1,48 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify a function called during receiving operation cannot contain an assignment of a component variable (in template fields) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// g) Changing of component variables, i.e. using component variables on the left-hand side of assignments, +// and in the instantiation of out and inout parameters (see notes 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_081 { + type record R { + integer field1 + } + + type port P message { + inout R; + } + + type component GeneralComp { + port P p; + var integer vc_int; + } + + function f_test() runs on GeneralComp return template integer { + vc_int := 1; + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_081() runs on GeneralComp system GeneralComp { + template @fuzzy R mw_test := { field1 := f_test() }; + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + p.receive(mw_test); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_081()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_082.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_082.ttcn new file mode 100644 index 00000000..bd2c5e5f --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_082.ttcn @@ -0,0 +1,52 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify a function called during receiving operation cannot contain a component variable used as an actual out parameter (in template fields) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// g) Changing of component variables, i.e. using component variables on the left-hand side of assignments, +// and in the instantiation of out and inout parameters (see notes 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_082 { + type record R { + integer field1 + } + + type port P message { + inout R; + } + + type component GeneralComp { + port P p; + var integer vc_int; + } + + function f_out (out integer p_out) { + p_out := 1; + } + + function f_test() runs on GeneralComp return template integer { + f_out(vc_int); + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_082() runs on GeneralComp system GeneralComp { + template @fuzzy R mw_test := { field1 := f_test() }; + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + p.receive(mw_test); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_082()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_083.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_083.ttcn new file mode 100644 index 00000000..fa3d75e3 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_083.ttcn @@ -0,0 +1,52 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify a function called during receiving operation cannot contain a component variable used as an actual inout parameter (in template fields) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// g) Changing of component variables, i.e. using component variables on the left-hand side of assignments, +// and in the instantiation of out and inout parameters (see notes 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_083 { + type record R { + integer field1 + } + + type port P message { + inout R; + } + + type component GeneralComp { + port P p; + var integer vc_int := 0; + } + + function f_inout (inout integer p_inout) { + p_inout := 1; + } + + function f_test() runs on GeneralComp return template integer { + f_inout(vc_int); + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_083() runs on GeneralComp system GeneralComp { + template @fuzzy R mw_test := { field1 := f_test() }; + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + p.receive(mw_test); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_083()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_084.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_084.ttcn new file mode 100644 index 00000000..87f51019 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_084.ttcn @@ -0,0 +1,45 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the setverdict operation cannot be used in a function called during receiving operation (in template fields) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// h) Calling the setverdict operation (see notes 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_084 { + type record R { + integer field1 + } + + type port P message { + inout R; + } + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return template integer { + setverdict(pass); + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_084() runs on GeneralComp system GeneralComp { + template @fuzzy R mw_test := { field1 := f_test() }; + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + p.receive(mw_test); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_084()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_085.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_085.ttcn new file mode 100644 index 00000000..66b31d5c --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_085.ttcn @@ -0,0 +1,50 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the activate operation cannot be used in a function called during receiving operation (in template fields) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// i) Activation and deactivation of defaults, i.e. the activate and deactivate statements (see notes 5 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_085 { + type record R { + integer field1 + } + + type port P message { + inout R; + } + + type component GeneralComp { + port P p; + } + + altstep a_anyTimer() runs on GeneralComp { + [] any timer.timeout {} + } + + function f_test() runs on GeneralComp return template integer { + activate(a_anyTimer()); + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_085() runs on GeneralComp system GeneralComp { + template @fuzzy R mw_test := { field1 := f_test() }; + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + p.receive(mw_test); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_085()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_086.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_086.ttcn new file mode 100644 index 00000000..1ae1ca90 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_086.ttcn @@ -0,0 +1,51 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the deactivate operation cannot be used in a function called during receiving operation (in template fields) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// i) Activation and deactivation of defaults, i.e. the activate and deactivate statements (see notes 5 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_086 { + type record R { + integer field1 + } + + type port P message { + inout R; + } + + type component GeneralComp { + port P p; + } + + altstep a_anyTimer() runs on GeneralComp { + [] any timer.timeout {} + } + + function f_test() runs on GeneralComp return template integer { + deactivate; + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_086() runs on GeneralComp system GeneralComp { + template @fuzzy R mw_test := { field1 := f_test() }; + activate(a_anyTimer()); + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + p.receive(mw_test); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_086()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_087.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_087.ttcn new file mode 100644 index 00000000..d687b368 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_087.ttcn @@ -0,0 +1,46 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the create operation cannot be used in a function called during receiving operation (in in-line templates) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// a) All component operations, i.e. create, start (component), stop (component), kill, running (component), +// alive, done and killed (see notes 1, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_087 { + type record R { + integer field1 + } + + type port P message { + inout R; + } + + type component GeneralComp { + port P p; + } + + function f_test() return template integer { + var GeneralComp v_ptc := GeneralComp.create; + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_087() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + p.receive(R:{ field1 := f_test() }); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_087()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_088.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_088.ttcn new file mode 100644 index 00000000..6022c02b --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_088.ttcn @@ -0,0 +1,51 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the component.start operation cannot be used in a function called during receiving operation (in in-line templates) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// a) All component operations, i.e. create, start (component), stop (component), kill, running (component), +// alive, done and killed (see notes 1, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_088 { + type record R { + integer field1 + } + + type port P message { + inout R; + } + + type component GeneralComp { + port P p; + } + + function f_ptcBehaviour() runs on GeneralComp { + log("PTC running"); + } + + function f_test(GeneralComp p_ptc) return template integer { + p_ptc.start(f_ptcBehaviour()); + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_088() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + p.receive(R:{ field1 := f_test(v_ptc) }); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_088()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_089.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_089.ttcn new file mode 100644 index 00000000..36f9c6a9 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_089.ttcn @@ -0,0 +1,54 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the component.stop operation cannot be used in a function called during receiving operation (in in-line templates) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// a) All component operations, i.e. create, start (component), stop (component), kill, running (component), +// alive, done and killed (see notes 1, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_089 { + type record R { + integer field1 + } + + type port P message { + inout R; + } + + type component GeneralComp { + port P p; + } + + function f_ptcBehaviour() runs on GeneralComp { + timer t_tmr := 10.0; + t_tmr.start; + t_tmr.timeout; + } + + function f_test(GeneralComp p_ptc) return template integer { + p_ptc.stop; + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_089() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + v_ptc.start(f_ptcBehaviour()); + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + p.receive(R:{ field1 := f_test(v_ptc) }); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_089()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_090.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_090.ttcn new file mode 100644 index 00000000..c0cdf3c0 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_090.ttcn @@ -0,0 +1,54 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the kill operation cannot be used in a function called during receiving operation (in in-line templates) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// a) All component operations, i.e. create, start (component), stop (component), kill, running (component), +// alive, done and killed (see notes 1, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_090 { + type record R { + integer field1 + } + + type port P message { + inout R; + } + + type component GeneralComp { + port P p; + } + + function f_ptcBehaviour() runs on GeneralComp { + timer t_tmr := 10.0; + t_tmr.start; + t_tmr.timeout; + } + + function f_test(GeneralComp p_ptc) return template integer { + p_ptc.kill; + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_090() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + v_ptc.start(f_ptcBehaviour()); + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + p.receive(R:{ field1 := f_test(v_ptc) }); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_090()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_091.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_091.ttcn new file mode 100644 index 00000000..3d96e08a --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_091.ttcn @@ -0,0 +1,54 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the component.running operation cannot be used in a function called during receiving operation (in in-line templates) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// a) All component operations, i.e. create, start (component), stop (component), kill, running (component), +// alive, done and killed (see notes 1, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_091 { + type record R { + integer field1 + } + + type port P message { + inout R; + } + + type component GeneralComp { + port P p; + } + + function f_ptcBehaviour() runs on GeneralComp { + timer t_tmr := 10.0; + t_tmr.start; + t_tmr.timeout; + } + + function f_test(GeneralComp p_ptc) return template integer { + if (p_ptc.running) { return ?; } + else { return 1; } + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_091() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + v_ptc.start(f_ptcBehaviour()); + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + p.receive(R:{ field1 := f_test(v_ptc) }); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_091()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_092.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_092.ttcn new file mode 100644 index 00000000..c2647c62 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_092.ttcn @@ -0,0 +1,54 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the alive operation cannot be used in a function called during receiving operation (in in-line templates) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// a) All component operations, i.e. create, start (component), stop (component), kill, running (component), +// alive, done and killed (see notes 1, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_092 { + type record R { + integer field1 + } + + type port P message { + inout R; + } + + type component GeneralComp { + port P p; + } + + function f_ptcBehaviour() runs on GeneralComp { + timer t_tmr := 10.0; + t_tmr.start; + t_tmr.timeout; + } + + function f_test(GeneralComp p_ptc) return template integer { + if (p_ptc.alive) { return ?; } + else { return 1; } + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_092() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + v_ptc.start(f_ptcBehaviour()); + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + p.receive(R:{ field1 := f_test(v_ptc) }); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_092()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_093.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_093.ttcn new file mode 100644 index 00000000..4e83b8fa --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_093.ttcn @@ -0,0 +1,51 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the done operation cannot be used in a function called during receiving operation (in in-line templates) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// a) All component operations, i.e. create, start (component), stop (component), kill, running (component), +// alive, done and killed (see notes 1, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_093 { + type record R { + integer field1 + } + + type port P message { + inout R; + } + + type component GeneralComp { + port P p; + } + + function f_ptcBehaviour() runs on GeneralComp { + } + + function f_test(GeneralComp p_ptc) return template integer { + p_ptc.done; + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_093() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + v_ptc.start(f_ptcBehaviour()); + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + p.receive(R:{ field1 := f_test(v_ptc) }); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_093()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_094.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_094.ttcn new file mode 100644 index 00000000..a6268ac7 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_094.ttcn @@ -0,0 +1,51 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the killed operation cannot be used in a function called during receiving operation (in in-line templates) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// a) All component operations, i.e. create, start (component), stop (component), kill, running (component), +// alive, done and killed (see notes 1, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_094 { + type record R { + integer field1 + } + + type port P message { + inout R; + } + + type component GeneralComp { + port P p; + } + + function f_ptcBehaviour() runs on GeneralComp { + } + + function f_test(GeneralComp p_ptc) return template integer { + p_ptc.killed; + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_094() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + v_ptc.start(f_ptcBehaviour()); + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + p.receive(R:{ field1 := f_test(v_ptc) }); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_094()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_095.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_095.ttcn new file mode 100644 index 00000000..802aaa3f --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_095.ttcn @@ -0,0 +1,51 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the port.start operation cannot be used in a function called during receiving operation (in in-line templates) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_095 { + type record R { + integer field1 + } + + type port P message { + inout R; + } + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return template integer { + p.start; + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_095() runs on GeneralComp system GeneralComp { + timer t_tmr := 0.1; + t_tmr.start; + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + alt { + [] p.receive(R:{ field1 := f_test() }) {} + [] t_tmr.timeout {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_095()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_096.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_096.ttcn new file mode 100644 index 00000000..5a2973ab --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_096.ttcn @@ -0,0 +1,51 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the port.stop operation cannot be used in a function called during receiving operation (in in-line templates) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_013 { + type record R { + integer field1 + } + + type port P message { + inout R; + } + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return template integer { + p.stop; + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_013() runs on GeneralComp system GeneralComp { + timer t_tmr := 0.1; + t_tmr.start; + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + alt { + [] p.receive(R:{ field1 := f_test() }) {} + [] t_tmr.timeout {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_013()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_097.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_097.ttcn new file mode 100644 index 00000000..003045d5 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_097.ttcn @@ -0,0 +1,51 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the halt operation cannot be used in a function called during receiving operation (in in-line templates) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_097 { + type record R { + integer field1 + } + + type port P message { + inout R; + } + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return template integer { + p.halt; + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_097() runs on GeneralComp system GeneralComp { + timer t_tmr := 0.1; + t_tmr.start; + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + alt { + [] p.receive(R:{ field1 := f_test() }) {} + [] t_tmr.timeout {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_097()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_098.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_098.ttcn new file mode 100644 index 00000000..4470494c --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_098.ttcn @@ -0,0 +1,51 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the clear operation cannot be used in a function called during receiving operation (in in-line templates) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_098 { + type record R { + integer field1 + } + + type port P message { + inout R; + } + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return template integer { + p.clear; + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_098() runs on GeneralComp system GeneralComp { + timer t_tmr := 0.1; + t_tmr.start; + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + alt { + [] p.receive(R:{ field1 := f_test() }) {} + [] t_tmr.timeout {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_098()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_099.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_099.ttcn new file mode 100644 index 00000000..e497437f --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_099.ttcn @@ -0,0 +1,46 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the checkstate operation cannot be used in a function called during receiving operation (in in-line templates) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_099 { + type record R { + integer field1 + } + + type port P message { + inout R; + } + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return template integer { + if (p.checkstate("Started")) { return ?; } + else { return 1; } + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_099() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + p.receive(R:{ field1 := f_test() }); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_099()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_100.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_100.ttcn new file mode 100644 index 00000000..80e7b651 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_100.ttcn @@ -0,0 +1,46 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the send operation cannot be used in a function called during receiving operation (in in-line templates) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_100 { + type record R { + integer field1 + } + + type port P message { + inout R; + } + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return template integer { + p.send(R:{ field1 := 2 }); + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_100() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + p.receive(R:{ field1 := f_test() }); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_100()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_101.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_101.ttcn new file mode 100644 index 00000000..950e7c15 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_101.ttcn @@ -0,0 +1,47 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the receive operation cannot be used in a function called during receiving operation (in in-line templates) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_101 { + type record R { + integer field1 + } + + type port P message { + inout R; + } + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return template integer { + p.receive(R:?); + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_101() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + p.send(R:{ field1 := 1 }); + p.receive(R:{ field1 := f_test() }); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_101()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_102.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_102.ttcn new file mode 100644 index 00000000..0d63b296 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_102.ttcn @@ -0,0 +1,47 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the trigger operation cannot be used in a function called during receiving operation (in in-line templates) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_102 { + type record R { + integer field1 + } + + type port P message { + inout R; + } + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return template integer { + p.trigger(R:?); + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_102() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + p.send(R:{ field1 := 1 }); + p.receive(R:{ field1 := f_test() }); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_102()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_103.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_103.ttcn new file mode 100644 index 00000000..134b9f4a --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_103.ttcn @@ -0,0 +1,55 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the call operation cannot be used in a function called during receiving operation (in in-line templates) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_103 { + type record R { + integer field1 + } + + type port P message { + inout R; + } + + signature S(); + + type port PSig procedure { + inout S; + } + + type component GeneralComp { + port P p; + port PSig psig; + } + + function f_test() runs on GeneralComp return template integer { + psig.call(S:{}, nowait); + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_103() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + connect(mtc:p, mtc:p); + connect(mtc:psig, v_ptc:psig); + p.send(R:{ field1 := 1 }); + p.receive(R:{ field1 := f_test() }); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_103()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_104.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_104.ttcn new file mode 100644 index 00000000..ad32d95d --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_104.ttcn @@ -0,0 +1,60 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the getcall operation cannot be used in a function called during receiving operation (in in-line templates) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_104 { + type record R { + integer field1 + } + + type port P message { + inout R; + } + + signature S(); + + type port PSig procedure { + inout S; + } + + type component GeneralComp { + port P p; + port PSig psig; + } + + function f_ptcBehaviour() runs on GeneralComp { + psig.call(S:{}, nowait); + } + + function f_test() runs on GeneralComp return template integer { + psig.getcall(S:?); + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_104() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + connect(mtc:p, mtc:p); + connect(mtc:psig, v_ptc:psig); + v_ptc.start(f_ptcBehaviour()); + p.send(R:{ field1 := 1 }); + p.receive(R:{ field1 := f_test() }); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_104()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_105.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_105.ttcn new file mode 100644 index 00000000..0149a9e2 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_105.ttcn @@ -0,0 +1,61 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the reply operation cannot be used in a function called during receiving operation (in in-line templates) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_105 { + type record R { + integer field1 + } + + type port P message { + inout R; + } + + signature S(); + + type port PSig procedure { + inout S; + } + + type component GeneralComp { + port P p; + port PSig psig; + } + + function f_ptcBehaviour() runs on GeneralComp { + psig.call(S:{}, nowait); + } + + function f_test() runs on GeneralComp return template integer { + psig.reply(S:{}); + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_105() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + connect(mtc:p, mtc:p); + connect(mtc:psig, v_ptc:psig); + v_ptc.start(f_ptcBehaviour()); + p.send(R:{ field1 := 1 }); + psig.getcall(S:?); + p.receive(R:{ field1 := f_test() }); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_105()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_106.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_106.ttcn new file mode 100644 index 00000000..0ccd78cb --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_106.ttcn @@ -0,0 +1,62 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the getreply operation cannot be used in a function called during receiving operation (in in-line templates) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_106 { + type record R { + integer field1 + } + + type port P message { + inout R; + } + + signature S(); + + type port PSig procedure { + inout S; + } + + type component GeneralComp { + port P p; + port PSig psig; + } + + function f_ptcBehaviour() runs on GeneralComp { + psig.getcall(S:?); + psig.reply(S:{}); + } + + function f_test() runs on GeneralComp return template integer { + psig.getreply(S:?); + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_106() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + connect(mtc:p, mtc:p); + connect(mtc:psig, v_ptc:psig); + v_ptc.start(f_ptcBehaviour()); + psig.call(S:{}, nowait); + p.send(R:{ field1 := 1 }); + p.receive(R:{ field1 := f_test() }); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_106()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_107.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_107.ttcn new file mode 100644 index 00000000..9292e534 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_107.ttcn @@ -0,0 +1,61 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the raise operation cannot be used in a function called during receiving operation (in in-line templates) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_107 { + type record R { + integer field1 + } + + type port P message { + inout R; + } + + signature S() exception (charstring); + + type port PSig procedure { + inout S; + } + + type component GeneralComp { + port P p; + port PSig psig; + } + + function f_ptcBehaviour() runs on GeneralComp { + psig.call(S:{}, nowait); + } + + function f_test() runs on GeneralComp return template integer { + psig.raise(S, "UserException"); + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_107() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + connect(mtc:p, mtc:p); + connect(mtc:psig, v_ptc:psig); + v_ptc.start(f_ptcBehaviour()); + p.send(R:{ field1 := 1 }); + psig.getcall(S:?); + p.receive(R:{ field1 := f_test() }); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_107()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_108.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_108.ttcn new file mode 100644 index 00000000..541f055d --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_108.ttcn @@ -0,0 +1,62 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the catch operation cannot be used in a function called during receiving operation (in in-line templates) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_108 { + type record R { + integer field1 + } + + type port P message { + inout R; + } + + signature S() exception (charstring); + + type port PSig procedure { + inout S; + } + + type component GeneralComp { + port P p; + port PSig psig; + } + + function f_ptcBehaviour() runs on GeneralComp { + psig.getcall(S:?); + psig.raise(S, "UserException"); + } + + function f_test() runs on GeneralComp return template integer { + psig.catch(S, charstring:?); + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_108() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + connect(mtc:p, mtc:p); + connect(mtc:psig, v_ptc:psig); + v_ptc.start(f_ptcBehaviour()); + psig.call(S:{}, nowait); + p.send(R:{ field1 := 1 }); + p.receive(R:{ field1 := f_test() }); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_108()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_109.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_109.ttcn new file mode 100644 index 00000000..5bc80f94 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_109.ttcn @@ -0,0 +1,46 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the check operation cannot be used in a function called during receiving operation (in in-line templates) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_109 { + type record R { + integer field1 + } + + type port P message { + inout R; + } + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return template integer { + p.check; + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_109() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + p.receive(R:{ field1 := f_test() }); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_109()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_110.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_110.ttcn new file mode 100644 index 00000000..1bdfa1ef --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_110.ttcn @@ -0,0 +1,46 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the connect operation cannot be used in a function called during receiving operation (in in-line templates) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_110 { + type record R { + integer field1 + } + + type port P message { + inout R; + } + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return template integer { + connect(mtc:p, mtc:p); + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_110() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + p.receive(R:{ field1 := f_test() }); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_110()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_111.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_111.ttcn new file mode 100644 index 00000000..4a35bd4e --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_111.ttcn @@ -0,0 +1,46 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the disconnect operation cannot be used in a function called during receiving operation (in in-line templates) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_111 { + type record R { + integer field1 + } + + type port P message { + inout R; + } + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return template integer { + disconnect(mtc:p, mtc:p); + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_111() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + p.receive(R:{ field1 := f_test() }); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_111()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_112.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_112.ttcn new file mode 100644 index 00000000..7497a7f5 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_112.ttcn @@ -0,0 +1,47 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the map operation cannot be used in a function called during receiving operation (in in-line templates) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_112 { + type record R { + integer field1 + } + + type port P message { + inout R; + } + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp system GeneralComp return template integer { + map(mtc:p, system:p); + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_112() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + disconnect(mtc:p, mtc:p); + p.receive(R:{ field1 := f_test() }); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_112()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_113.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_113.ttcn new file mode 100644 index 00000000..4203f96b --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_113.ttcn @@ -0,0 +1,48 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the unmap operation cannot be used in a function called during receiving operation (in in-line templates) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_113 { + type record R { + integer field1 + } + + type port P message { + inout R; + } + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp system GeneralComp return template integer { + unmap(mtc:p, system:p); + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_113() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + disconnect(mtc:p, mtc:p); + map(mtc:p, system:p); + p.receive(R:{ field1 := f_test() }); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_113()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_114.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_114.ttcn new file mode 100644 index 00000000..d3393647 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_114.ttcn @@ -0,0 +1,45 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the action operation cannot be used in a function called during receiving operation (in in-line templates) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// c) The action operation (see notes 2 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_114 { + type record R { + integer field1 + } + + type port P message { + inout R; + } + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return template integer { + action("My action"); + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_114() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + p.receive(R:{ field1 := f_test() }); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_114()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_115.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_115.ttcn new file mode 100644 index 00000000..46237ed0 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_115.ttcn @@ -0,0 +1,46 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the timer.start operation cannot be used in a function called during receiving operation (in in-line templates) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// d) All timer operations, i.e. start (timer), stop (timer), running (timer), read, timeout (see notes 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_115 { + type record R { + integer field1 + } + + type port P message { + inout R; + } + + type component GeneralComp { + port P p; + timer tc_tmr := 0.1; + } + + function f_test() runs on GeneralComp return template integer { + tc_tmr.start; + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_115() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + p.receive(R:{ field1 := f_test() }); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_115()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_116.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_116.ttcn new file mode 100644 index 00000000..5f041274 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_116.ttcn @@ -0,0 +1,47 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the timer.stop operation cannot be used in a function called during receiving operation (in in-line templates) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// d) All timer operations, i.e. start (timer), stop (timer), running (timer), read, timeout (see notes 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_116 { + type record R { + integer field1 + } + + type port P message { + inout R; + } + + type component GeneralComp { + port P p; + timer tc_tmr := 0.1; + } + + function f_test() runs on GeneralComp return template integer { + tc_tmr.stop; + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_116() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + tc_tmr.start; + p.send(R:{ field1 := 1 }); + p.receive(R:{ field1 := f_test() }); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_116()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_117.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_117.ttcn new file mode 100644 index 00000000..13e414c1 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_117.ttcn @@ -0,0 +1,47 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the timer.running operation cannot be used in a function called during receiving operation (in in-line templates) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// d) All timer operations, i.e. start (timer), stop (timer), running (timer), read, timeout (see notes 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_117 { + type record R { + integer field1 + } + + type port P message { + inout R; + } + + type component GeneralComp { + port P p; + timer tc_tmr := 0.1; + } + + function f_test() runs on GeneralComp return template integer { + if (tc_tmr.running) { return ?; } + else { return 1; } + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_117() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + tc_tmr.start; + p.send(R:{ field1 := 1 }); + p.receive(R:{ field1 := f_test() }); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_117()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_118.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_118.ttcn new file mode 100644 index 00000000..f44f56d0 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_118.ttcn @@ -0,0 +1,47 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the read operation cannot be used in a function called during receiving operation (in in-line templates) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// d) All timer operations, i.e. start (timer), stop (timer), running (timer), read, timeout (see notes 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_118 { + type record R { + integer field1 + } + + type port P message { + inout R; + } + + type component GeneralComp { + port P p; + timer tc_tmr := 0.1; + } + + function f_test() runs on GeneralComp return template integer { + if (tc_tmr.read > 0.0) { return ?; } + else { return 1; } + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_118() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + tc_tmr.start; + p.send(R:{ field1 := 1 }); + p.receive(R:{ field1 := f_test() }); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_118()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_119.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_119.ttcn new file mode 100644 index 00000000..b9a4a20b --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_119.ttcn @@ -0,0 +1,47 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the timeout operation cannot be used in a function called during receiving operation (in in-line templates) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// d) All timer operations, i.e. start (timer), stop (timer), running (timer), read, timeout (see notes 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_119 { + type record R { + integer field1 + } + + type port P message { + inout R; + } + + type component GeneralComp { + port P p; + timer tc_tmr := 0.1; + } + + function f_test() runs on GeneralComp return template integer { + any timer.timeout; + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_119() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + tc_tmr.start; + p.send(R:{ field1 := 1 }); + p.receive(R:{ field1 := f_test() }); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_119()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_120.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_120.ttcn new file mode 100644 index 00000000..d8bcc867 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_120.ttcn @@ -0,0 +1,53 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that a non-deterministic external function call cannot be used in a function called during receiving operation (in in-line templates) + ** @verdict pass reject + ** @configuration external_functions + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// e) Calling non-deterministic external functions, i.e. external functions where the resulting values for actual +// inout or out parameters or the return value may differ for different invocations with the same actual in and +// inout parameters (see notes 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_120 { + type record R { + integer field1 + } + + type port P message { + inout R; + } + + type component GeneralComp { + port P p; + } + + /** + * @return always true + */ + external function xf_NegSem_160104_invoking_functions_from_specific_places_001() return boolean; + + function f_test() runs on GeneralComp return template integer { + if (xf_NegSem_160104_invoking_functions_from_specific_places_001()) { return ?; } + else { return 1; } + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_120() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + p.receive(R:{ field1 := f_test() }); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_120()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_121.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_121.ttcn new file mode 100644 index 00000000..1aed0614 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_121.ttcn @@ -0,0 +1,45 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the predefined rnd function cannot be used in a function called during receiving operation (in in-line templates) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// f) Calling the rnd predefined function (see notes 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_121 { + type record R { + integer field1 + } + + type port P message { + inout R; + } + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return template integer { + if (rnd() > 0.5) { return ?; } + else { return 1; } + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_121() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + p.receive(R:{ field1 := f_test() }); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_121()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_122.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_122.ttcn new file mode 100644 index 00000000..3180b9d0 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_122.ttcn @@ -0,0 +1,47 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify a function called during receiving operation cannot contain an assignment of a component variable (in in-line templates) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// g) Changing of component variables, i.e. using component variables on the left-hand side of assignments, +// and in the instantiation of out and inout parameters (see notes 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_122 { + type record R { + integer field1 + } + + type port P message { + inout R; + } + + type component GeneralComp { + port P p; + var integer vc_int; + } + + function f_test() runs on GeneralComp return template integer { + vc_int := 1; + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_122() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + p.receive(R:{ field1 := f_test() }); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_122()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_123.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_123.ttcn new file mode 100644 index 00000000..ebcf3632 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_123.ttcn @@ -0,0 +1,51 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify a function called during receiving operation cannot contain a component variable used as an actual out parameter (in in-line templates) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// g) Changing of component variables, i.e. using component variables on the left-hand side of assignments, +// and in the instantiation of out and inout parameters (see notes 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_123 { + type record R { + integer field1 + } + + type port P message { + inout R; + } + + type component GeneralComp { + port P p; + var integer vc_int; + } + + function f_out (out integer p_out) { + p_out := 1; + } + + function f_test() runs on GeneralComp return template integer { + f_out(vc_int); + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_123() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + p.receive(R:{ field1 := f_test() }); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_123()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_124.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_124.ttcn new file mode 100644 index 00000000..19da8f5a --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_124.ttcn @@ -0,0 +1,52 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify a function called during receiving operation cannot contain a component variable used as an actual inout parameter (in in-line templates) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// g) Changing of component variables, i.e. using component variables on the left-hand side of assignments, +// and in the instantiation of out and inout parameters (see notes 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_124 { + type record R { + integer field1 + } + + type port P message { + inout R; + } + + type component GeneralComp { + port P p; + var integer vc_int := 0; + } + + function f_inout (inout integer p_inout) { + p_inout := 1; + } + + function f_test() runs on GeneralComp return template integer { + f_inout(vc_int); + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_124() runs on GeneralComp system GeneralComp { + template @fuzzy R mw_test := { field1 := f_test() }; + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + p.receive(R:{ field1 := f_test() }); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_124()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_125.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_125.ttcn new file mode 100644 index 00000000..704e4114 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_125.ttcn @@ -0,0 +1,44 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the setverdict operation cannot be used in a function called during receiving operation (in in-line templates) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// h) Calling the setverdict operation (see notes 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_125 { + type record R { + integer field1 + } + + type port P message { + inout R; + } + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return template integer { + setverdict(pass); + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_125() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + p.receive(R:{ field1 := f_test() }); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_125()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_126.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_126.ttcn new file mode 100644 index 00000000..e78824da --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_126.ttcn @@ -0,0 +1,49 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the activate operation cannot be used in a function called during receiving operation (in in-line templates) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// i) Activation and deactivation of defaults, i.e. the activate and deactivate statements (see notes 5 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_126 { + type record R { + integer field1 + } + + type port P message { + inout R; + } + + type component GeneralComp { + port P p; + } + + altstep a_anyTimer() runs on GeneralComp { + [] any timer.timeout {} + } + + function f_test() runs on GeneralComp return template integer { + activate(a_anyTimer()); + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_126() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + p.receive(R:{ field1 := f_test() }); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_126()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_127.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_127.ttcn new file mode 100644 index 00000000..77862658 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_127.ttcn @@ -0,0 +1,50 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the deactivate operation cannot be used in a function called during receiving operation (in in-line templates) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// i) Activation and deactivation of defaults, i.e. the activate and deactivate statements (see notes 5 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_127 { + type record R { + integer field1 + } + + type port P message { + inout R; + } + + type component GeneralComp { + port P p; + } + + altstep a_anyTimer() runs on GeneralComp { + [] any timer.timeout {} + } + + function f_test() runs on GeneralComp return template integer { + deactivate; + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_127() runs on GeneralComp system GeneralComp { + activate(a_anyTimer()); + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + p.receive(R:{ field1 := f_test() }); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_127()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_128.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_128.ttcn new file mode 100644 index 00000000..e1a1d410 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_128.ttcn @@ -0,0 +1,47 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify a function called during receiving operation cannot contain an out parameter (in in-line templates) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// j) Calling functions and deterministic external functions with out or inout parameters (see notes 7 and 8). + +module NegSem_160104_invoking_functions_from_specific_places_128 { + type record R { + integer field1 + } + + type port P message { + inout R; + } + + type component GeneralComp { + port P p; + var integer vc_int; + } + + function f_test(out integer p_out) runs on GeneralComp return template integer { + p_out := 1; + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_128() runs on GeneralComp system GeneralComp { + var integer v_int; + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + p.receive(R:{ field1 := f_test(v_int) }); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_128()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_129.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_129.ttcn new file mode 100644 index 00000000..fcf10baa --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_129.ttcn @@ -0,0 +1,47 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify a function called during receiving operation cannot contain an inout parameter (in in-line templates) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// j) Calling functions and deterministic external functions with out or inout parameters (see notes 7 and 8). + +module NegSem_160104_invoking_functions_from_specific_places_129 { + type record R { + integer field1 + } + + type port P message { + inout R; + } + + type component GeneralComp { + port P p; + var integer vc_int; + } + + function f_test(out integer p_out) runs on GeneralComp return template integer { + p_out := 1; + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_129() runs on GeneralComp system GeneralComp { + var integer v_int := 0; + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + p.receive(R:{ field1 := f_test(v_int) }); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_129()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_130.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_130.ttcn new file mode 100644 index 00000000..6a417331 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_130.ttcn @@ -0,0 +1,50 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the create operation cannot be used in a function called during receiving operation (as actual parameters) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// a) All component operations, i.e. create, start (component), stop (component), kill, running (component), +// alive, done and killed (see notes 1, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_130 { + type record R { + integer field1 + } + + type port P message { + inout R; + } + + type component GeneralComp { + port P p; + } + + function f_test() return template integer { + var GeneralComp v_ptc := GeneralComp.create; + return ?; + } + + template R m_msg (template integer p_par) := { + field1 := p_par + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_130() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + p.receive(m_msg(f_test())); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_130()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_131.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_131.ttcn new file mode 100644 index 00000000..0564f23a --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_131.ttcn @@ -0,0 +1,55 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the component.start operation cannot be used in a function called during receiving operation (as actual parameters) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// a) All component operations, i.e. create, start (component), stop (component), kill, running (component), +// alive, done and killed (see notes 1, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_131 { + type record R { + integer field1 + } + + type port P message { + inout R; + } + + type component GeneralComp { + port P p; + } + + function f_ptcBehaviour() runs on GeneralComp { + log("PTC running"); + } + + function f_test(GeneralComp p_ptc) return template integer { + p_ptc.start(f_ptcBehaviour()); + return ?; + } + + template R m_msg (template integer p_par) := { + field1 := p_par + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_131() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + p.receive(m_msg(f_test(v_ptc))); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_131()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_132.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_132.ttcn new file mode 100644 index 00000000..4e719433 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_132.ttcn @@ -0,0 +1,58 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the component.stop operation cannot be used in a function called during receiving operation (as actual parameters) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// a) All component operations, i.e. create, start (component), stop (component), kill, running (component), +// alive, done and killed (see notes 1, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_132 { + type record R { + integer field1 + } + + type port P message { + inout R; + } + + type component GeneralComp { + port P p; + } + + function f_ptcBehaviour() runs on GeneralComp { + timer t_tmr := 10.0; + t_tmr.start; + t_tmr.timeout; + } + + function f_test(GeneralComp p_ptc) return template integer { + p_ptc.stop; + return ?; + } + + template R m_msg (template integer p_par) := { + field1 := p_par + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_132() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + v_ptc.start(f_ptcBehaviour()); + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + p.receive(m_msg(f_test(v_ptc))); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_132()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_133.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_133.ttcn new file mode 100644 index 00000000..822fec16 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_133.ttcn @@ -0,0 +1,58 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the kill operation cannot be used in a function called during receiving operation (as actual parameters) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// a) All component operations, i.e. create, start (component), stop (component), kill, running (component), +// alive, done and killed (see notes 1, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_133 { + type record R { + integer field1 + } + + type port P message { + inout R; + } + + type component GeneralComp { + port P p; + } + + function f_ptcBehaviour() runs on GeneralComp { + timer t_tmr := 10.0; + t_tmr.start; + t_tmr.timeout; + } + + function f_test(GeneralComp p_ptc) return template integer { + p_ptc.kill; + return ?; + } + + template R m_msg (template integer p_par) := { + field1 := p_par + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_133() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + v_ptc.start(f_ptcBehaviour()); + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + p.receive(m_msg(f_test(v_ptc))); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_133()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_134.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_134.ttcn new file mode 100644 index 00000000..6e8eab70 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_134.ttcn @@ -0,0 +1,58 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the component.running operation cannot be used in a function called during receiving operation (as actual parameters) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// a) All component operations, i.e. create, start (component), stop (component), kill, running (component), +// alive, done and killed (see notes 1, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_134 { + type record R { + integer field1 + } + + type port P message { + inout R; + } + + type component GeneralComp { + port P p; + } + + function f_ptcBehaviour() runs on GeneralComp { + timer t_tmr := 10.0; + t_tmr.start; + t_tmr.timeout; + } + + function f_test(GeneralComp p_ptc) return template integer { + if (p_ptc.running) { return ?; } + else { return 1; } + } + + template R m_msg (template integer p_par) := { + field1 := p_par + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_134() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + v_ptc.start(f_ptcBehaviour()); + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + p.receive(m_msg(f_test(v_ptc))); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_134()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_135.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_135.ttcn new file mode 100644 index 00000000..2be11e50 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_135.ttcn @@ -0,0 +1,58 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the alive operation cannot be used in a function called during receiving operation (as actual parameters) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// a) All component operations, i.e. create, start (component), stop (component), kill, running (component), +// alive, done and killed (see notes 1, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_135 { + type record R { + integer field1 + } + + type port P message { + inout R; + } + + type component GeneralComp { + port P p; + } + + function f_ptcBehaviour() runs on GeneralComp { + timer t_tmr := 10.0; + t_tmr.start; + t_tmr.timeout; + } + + function f_test(GeneralComp p_ptc) return template integer { + if (p_ptc.alive) { return ?; } + else { return 1; } + } + + template R m_msg (template integer p_par) := { + field1 := p_par + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_135() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + v_ptc.start(f_ptcBehaviour()); + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + p.receive(m_msg(f_test(v_ptc))); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_135()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_136.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_136.ttcn new file mode 100644 index 00000000..d46c152c --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_136.ttcn @@ -0,0 +1,55 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the done operation cannot be used in a function called during receiving operation (as actual parameters) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// a) All component operations, i.e. create, start (component), stop (component), kill, running (component), +// alive, done and killed (see notes 1, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_136 { + type record R { + integer field1 + } + + type port P message { + inout R; + } + + type component GeneralComp { + port P p; + } + + function f_ptcBehaviour() runs on GeneralComp { + } + + function f_test(GeneralComp p_ptc) return template integer { + p_ptc.done; + return ?; + } + + template R m_msg (template integer p_par) := { + field1 := p_par + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_136() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + v_ptc.start(f_ptcBehaviour()); + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + p.receive(m_msg(f_test(v_ptc))); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_136()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_137.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_137.ttcn new file mode 100644 index 00000000..8b4033ea --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_137.ttcn @@ -0,0 +1,55 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the killed operation cannot be used in a function called during receiving operation (as actual parameters) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// a) All component operations, i.e. create, start (component), stop (component), kill, running (component), +// alive, done and killed (see notes 1, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_137 { + type record R { + integer field1 + } + + type port P message { + inout R; + } + + type component GeneralComp { + port P p; + } + + function f_ptcBehaviour() runs on GeneralComp { + } + + function f_test(GeneralComp p_ptc) return template integer { + p_ptc.killed; + return ?; + } + + template R m_msg (template integer p_par) := { + field1 := p_par + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_137() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + v_ptc.start(f_ptcBehaviour()); + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + p.receive(m_msg(f_test(v_ptc))); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_137()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_138.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_138.ttcn new file mode 100644 index 00000000..d883c934 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_138.ttcn @@ -0,0 +1,55 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the port.start operation cannot be used in a function called during receiving operation (as actual parameters) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_138 { + type record R { + integer field1 + } + + type port P message { + inout R; + } + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return template integer { + p.start; + return ?; + } + + template R m_msg (template integer p_par) := { + field1 := p_par + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_138() runs on GeneralComp system GeneralComp { + timer t_tmr := 0.1; + t_tmr.start; + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + alt { + [] p.receive(m_msg(f_test())) {} + [] t_tmr.timeout {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_138()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_139.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_139.ttcn new file mode 100644 index 00000000..c26bda8b --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_139.ttcn @@ -0,0 +1,55 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the port.stop operation cannot be used in a function called during receiving operation (as actual parameters) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_013 { + type record R { + integer field1 + } + + type port P message { + inout R; + } + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return template integer { + p.stop; + return ?; + } + + template R m_msg (template integer p_par) := { + field1 := p_par + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_013() runs on GeneralComp system GeneralComp { + timer t_tmr := 0.1; + t_tmr.start; + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + alt { + [] p.receive(m_msg(f_test())) {} + [] t_tmr.timeout {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_013()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_140.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_140.ttcn new file mode 100644 index 00000000..48d2a300 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_140.ttcn @@ -0,0 +1,55 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the halt operation cannot be used in a function called during receiving operation (as actual parameters) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_140 { + type record R { + integer field1 + } + + type port P message { + inout R; + } + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return template integer { + p.halt; + return ?; + } + + template R m_msg (template integer p_par) := { + field1 := p_par + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_140() runs on GeneralComp system GeneralComp { + timer t_tmr := 0.1; + t_tmr.start; + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + alt { + [] p.receive(m_msg(f_test())) {} + [] t_tmr.timeout {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_140()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_141.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_141.ttcn new file mode 100644 index 00000000..6466ad75 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_141.ttcn @@ -0,0 +1,55 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the clear operation cannot be used in a function called during receiving operation (as actual parameters) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_141 { + type record R { + integer field1 + } + + type port P message { + inout R; + } + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return template integer { + p.clear; + return ?; + } + + template R m_msg (template integer p_par) := { + field1 := p_par + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_141() runs on GeneralComp system GeneralComp { + timer t_tmr := 0.1; + t_tmr.start; + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + alt { + [] p.receive(m_msg(f_test())) {} + [] t_tmr.timeout {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_141()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_142.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_142.ttcn new file mode 100644 index 00000000..d98b278d --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_142.ttcn @@ -0,0 +1,50 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the checkstate operation cannot be used in a function called during receiving operation (as actual parameters) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_142 { + type record R { + integer field1 + } + + type port P message { + inout R; + } + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return template integer { + if (p.checkstate("Started")) { return ?; } + else { return 1; } + } + + template R m_msg (template integer p_par) := { + field1 := p_par + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_142() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + p.receive(m_msg(f_test())); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_142()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_143.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_143.ttcn new file mode 100644 index 00000000..70d0075c --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_143.ttcn @@ -0,0 +1,50 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the send operation cannot be used in a function called during receiving operation (as actual parameters) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_143 { + type record R { + integer field1 + } + + type port P message { + inout R; + } + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return template integer { + p.send(R:{ field1 := 2 }); + return ?; + } + + template R m_msg (template integer p_par) := { + field1 := p_par + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_143() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + p.receive(m_msg(f_test())); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_143()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_144.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_144.ttcn new file mode 100644 index 00000000..1a636c4e --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_144.ttcn @@ -0,0 +1,51 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the receive operation cannot be used in a function called during receiving operation (as actual parameters) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_144 { + type record R { + integer field1 + } + + type port P message { + inout R; + } + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return template integer { + p.receive(R:?); + return ?; + } + + template R m_msg (template integer p_par) := { + field1 := p_par + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_144() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + p.send(R:{ field1 := 1 }); + p.receive(m_msg(f_test())); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_144()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_145.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_145.ttcn new file mode 100644 index 00000000..2141a827 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_145.ttcn @@ -0,0 +1,51 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the trigger operation cannot be used in a function called during receiving operation (as actual parameters) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_145 { + type record R { + integer field1 + } + + type port P message { + inout R; + } + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return template integer { + p.trigger(R:?); + return ?; + } + + template R m_msg (template integer p_par) := { + field1 := p_par + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_145() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + p.send(R:{ field1 := 1 }); + p.receive(m_msg(f_test())); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_145()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_146.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_146.ttcn new file mode 100644 index 00000000..80276ee6 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_146.ttcn @@ -0,0 +1,59 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the call operation cannot be used in a function called during receiving operation (as actual parameters) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_146 { + type record R { + integer field1 + } + + type port P message { + inout R; + } + + signature S(); + + type port PSig procedure { + inout S; + } + + type component GeneralComp { + port P p; + port PSig psig; + } + + function f_test() runs on GeneralComp return template integer { + psig.call(S:{}, nowait); + return ?; + } + + template R m_msg (template integer p_par) := { + field1 := p_par + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_146() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + connect(mtc:p, mtc:p); + connect(mtc:psig, v_ptc:psig); + p.send(R:{ field1 := 1 }); + p.receive(m_msg(f_test())); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_146()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_147.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_147.ttcn new file mode 100644 index 00000000..4d7ed02a --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_147.ttcn @@ -0,0 +1,64 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the getcall operation cannot be used in a function called during receiving operation (as actual parameters) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_147 { + type record R { + integer field1 + } + + type port P message { + inout R; + } + + signature S(); + + type port PSig procedure { + inout S; + } + + type component GeneralComp { + port P p; + port PSig psig; + } + + function f_ptcBehaviour() runs on GeneralComp { + psig.call(S:{}, nowait); + } + + function f_test() runs on GeneralComp return template integer { + psig.getcall(S:?); + return ?; + } + + template R m_msg (template integer p_par) := { + field1 := p_par + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_147() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + connect(mtc:p, mtc:p); + connect(mtc:psig, v_ptc:psig); + v_ptc.start(f_ptcBehaviour()); + p.send(R:{ field1 := 1 }); + p.receive(m_msg(f_test())); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_147()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_148.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_148.ttcn new file mode 100644 index 00000000..e4fd77c9 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_148.ttcn @@ -0,0 +1,65 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the reply operation cannot be used in a function called during receiving operation (as actual parameters) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_148 { + type record R { + integer field1 + } + + type port P message { + inout R; + } + + signature S(); + + type port PSig procedure { + inout S; + } + + type component GeneralComp { + port P p; + port PSig psig; + } + + function f_ptcBehaviour() runs on GeneralComp { + psig.call(S:{}, nowait); + } + + function f_test() runs on GeneralComp return template integer { + psig.reply(S:{}); + return ?; + } + + template R m_msg (template integer p_par) := { + field1 := p_par + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_148() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + connect(mtc:p, mtc:p); + connect(mtc:psig, v_ptc:psig); + v_ptc.start(f_ptcBehaviour()); + p.send(R:{ field1 := 1 }); + psig.getcall(S:?); + p.receive(m_msg(f_test())); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_148()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_149.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_149.ttcn new file mode 100644 index 00000000..42175fbe --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_149.ttcn @@ -0,0 +1,66 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the getreply operation cannot be used in a function called during receiving operation (as actual parameters) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_149 { + type record R { + integer field1 + } + + type port P message { + inout R; + } + + signature S(); + + type port PSig procedure { + inout S; + } + + type component GeneralComp { + port P p; + port PSig psig; + } + + function f_ptcBehaviour() runs on GeneralComp { + psig.getcall(S:?); + psig.reply(S:{}); + } + + function f_test() runs on GeneralComp return template integer { + psig.getreply(S:?); + return ?; + } + + template R m_msg (template integer p_par) := { + field1 := p_par + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_149() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + connect(mtc:p, mtc:p); + connect(mtc:psig, v_ptc:psig); + v_ptc.start(f_ptcBehaviour()); + psig.call(S:{}, nowait); + p.send(R:{ field1 := 1 }); + p.receive(m_msg(f_test())); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_149()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_150.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_150.ttcn new file mode 100644 index 00000000..330222f0 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_150.ttcn @@ -0,0 +1,65 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the raise operation cannot be used in a function called during receiving operation (as actual parameters) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_150 { + type record R { + integer field1 + } + + type port P message { + inout R; + } + + signature S() exception (charstring); + + type port PSig procedure { + inout S; + } + + type component GeneralComp { + port P p; + port PSig psig; + } + + function f_ptcBehaviour() runs on GeneralComp { + psig.call(S:{}, nowait); + } + + function f_test() runs on GeneralComp return template integer { + psig.raise(S, "UserException"); + return ?; + } + + template R m_msg (template integer p_par) := { + field1 := p_par + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_150() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + connect(mtc:p, mtc:p); + connect(mtc:psig, v_ptc:psig); + v_ptc.start(f_ptcBehaviour()); + p.send(R:{ field1 := 1 }); + psig.getcall(S:?); + p.receive(m_msg(f_test())); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_150()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_151.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_151.ttcn new file mode 100644 index 00000000..fc14232e --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_151.ttcn @@ -0,0 +1,66 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the catch operation cannot be used in a function called during receiving operation (as actual parameters) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_151 { + type record R { + integer field1 + } + + type port P message { + inout R; + } + + signature S() exception (charstring); + + type port PSig procedure { + inout S; + } + + type component GeneralComp { + port P p; + port PSig psig; + } + + function f_ptcBehaviour() runs on GeneralComp { + psig.getcall(S:?); + psig.raise(S, "UserException"); + } + + function f_test() runs on GeneralComp return template integer { + psig.catch(S, charstring:?); + return ?; + } + + template R m_msg (template integer p_par) := { + field1 := p_par + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_151() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + connect(mtc:p, mtc:p); + connect(mtc:psig, v_ptc:psig); + v_ptc.start(f_ptcBehaviour()); + psig.call(S:{}, nowait); + p.send(R:{ field1 := 1 }); + p.receive(m_msg(f_test())); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_151()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_152.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_152.ttcn new file mode 100644 index 00000000..b55de81c --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_152.ttcn @@ -0,0 +1,50 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the check operation cannot be used in a function called during receiving operation (as actual parameters) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_152 { + type record R { + integer field1 + } + + type port P message { + inout R; + } + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return template integer { + p.check; + return ?; + } + + template R m_msg (template integer p_par) := { + field1 := p_par + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_152() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + p.receive(m_msg(f_test())); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_152()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_153.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_153.ttcn new file mode 100644 index 00000000..f4a63c87 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_153.ttcn @@ -0,0 +1,50 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the connect operation cannot be used in a function called during receiving operation (as actual parameters) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_153 { + type record R { + integer field1 + } + + type port P message { + inout R; + } + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return template integer { + connect(mtc:p, mtc:p); + return ?; + } + + template R m_msg (template integer p_par) := { + field1 := p_par + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_153() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + p.receive(m_msg(f_test())); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_153()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_154.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_154.ttcn new file mode 100644 index 00000000..6e6310e5 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_154.ttcn @@ -0,0 +1,50 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the disconnect operation cannot be used in a function called during receiving operation (as actual parameters) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_154 { + type record R { + integer field1 + } + + type port P message { + inout R; + } + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return template integer { + disconnect(mtc:p, mtc:p); + return ?; + } + + template R m_msg (template integer p_par) := { + field1 := p_par + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_154() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + p.receive(m_msg(f_test())); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_154()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_155.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_155.ttcn new file mode 100644 index 00000000..d5d696a0 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_155.ttcn @@ -0,0 +1,51 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the map operation cannot be used in a function called during receiving operation (as actual parameters) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_155 { + type record R { + integer field1 + } + + type port P message { + inout R; + } + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp system GeneralComp return template integer { + map(mtc:p, system:p); + return ?; + } + + template R m_msg (template integer p_par) := { + field1 := p_par + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_155() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + disconnect(mtc:p, mtc:p); + p.receive(m_msg(f_test())); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_155()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_156.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_156.ttcn new file mode 100644 index 00000000..682a0cff --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_156.ttcn @@ -0,0 +1,52 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the unmap operation cannot be used in a function called during receiving operation (as actual parameters) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_156 { + type record R { + integer field1 + } + + type port P message { + inout R; + } + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp system GeneralComp return template integer { + unmap(mtc:p, system:p); + return ?; + } + + template R m_msg (template integer p_par) := { + field1 := p_par + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_156() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + disconnect(mtc:p, mtc:p); + map(mtc:p, system:p); + p.receive(m_msg(f_test())); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_156()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_157.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_157.ttcn new file mode 100644 index 00000000..ad36b26a --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_157.ttcn @@ -0,0 +1,49 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the action operation cannot be used in a function called during receiving operation (as actual parameters) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// c) The action operation (see notes 2 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_157 { + type record R { + integer field1 + } + + type port P message { + inout R; + } + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return template integer { + action("My action"); + return ?; + } + + template R m_msg (template integer p_par) := { + field1 := p_par + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_157() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + p.receive(m_msg(f_test())); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_157()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_158.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_158.ttcn new file mode 100644 index 00000000..cba9a634 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_158.ttcn @@ -0,0 +1,50 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the timer.start operation cannot be used in a function called during receiving operation (as actual parameters) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// d) All timer operations, i.e. start (timer), stop (timer), running (timer), read, timeout (see notes 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_158 { + type record R { + integer field1 + } + + type port P message { + inout R; + } + + type component GeneralComp { + port P p; + timer tc_tmr := 0.1; + } + + function f_test() runs on GeneralComp return template integer { + tc_tmr.start; + return ?; + } + + template R m_msg (template integer p_par) := { + field1 := p_par + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_158() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + p.receive(m_msg(f_test())); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_158()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_159.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_159.ttcn new file mode 100644 index 00000000..6fcaee27 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_159.ttcn @@ -0,0 +1,51 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the timer.stop operation cannot be used in a function called during receiving operation (as actual parameters) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// d) All timer operations, i.e. start (timer), stop (timer), running (timer), read, timeout (see notes 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_159 { + type record R { + integer field1 + } + + type port P message { + inout R; + } + + type component GeneralComp { + port P p; + timer tc_tmr := 0.1; + } + + function f_test() runs on GeneralComp return template integer { + tc_tmr.stop; + return ?; + } + + template R m_msg (template integer p_par) := { + field1 := p_par + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_159() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + tc_tmr.start; + p.send(R:{ field1 := 1 }); + p.receive(m_msg(f_test())); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_159()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_160.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_160.ttcn new file mode 100644 index 00000000..6077736c --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_160.ttcn @@ -0,0 +1,51 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the timer.running operation cannot be used in a function called during receiving operation (as actual parameters) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// d) All timer operations, i.e. start (timer), stop (timer), running (timer), read, timeout (see notes 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_160 { + type record R { + integer field1 + } + + type port P message { + inout R; + } + + type component GeneralComp { + port P p; + timer tc_tmr := 0.1; + } + + function f_test() runs on GeneralComp return template integer { + if (tc_tmr.running) { return ?; } + else { return 1; } + } + + template R m_msg (template integer p_par) := { + field1 := p_par + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_160() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + tc_tmr.start; + p.send(R:{ field1 := 1 }); + p.receive(m_msg(f_test())); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_160()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_161.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_161.ttcn new file mode 100644 index 00000000..e321c03d --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_161.ttcn @@ -0,0 +1,51 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the read operation cannot be used in a function called during receiving operation (as actual parameters) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// d) All timer operations, i.e. start (timer), stop (timer), running (timer), read, timeout (see notes 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_161 { + type record R { + integer field1 + } + + type port P message { + inout R; + } + + type component GeneralComp { + port P p; + timer tc_tmr := 0.1; + } + + function f_test() runs on GeneralComp return template integer { + if (tc_tmr.read > 0.0) { return ?; } + else { return 1; } + } + + template R m_msg (template integer p_par) := { + field1 := p_par + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_161() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + tc_tmr.start; + p.send(R:{ field1 := 1 }); + p.receive(m_msg(f_test())); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_161()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_162.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_162.ttcn new file mode 100644 index 00000000..16b562a8 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_162.ttcn @@ -0,0 +1,51 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the timeout operation cannot be used in a function called during receiving operation (as actual parameters) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// d) All timer operations, i.e. start (timer), stop (timer), running (timer), read, timeout (see notes 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_162 { + type record R { + integer field1 + } + + type port P message { + inout R; + } + + type component GeneralComp { + port P p; + timer tc_tmr := 0.1; + } + + function f_test() runs on GeneralComp return template integer { + any timer.timeout; + return ?; + } + + template R m_msg (template integer p_par) := { + field1 := p_par + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_162() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + tc_tmr.start; + p.send(R:{ field1 := 1 }); + p.receive(m_msg(f_test())); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_162()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_163.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_163.ttcn new file mode 100644 index 00000000..ca25e243 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_163.ttcn @@ -0,0 +1,57 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that a non-deterministic external function call cannot be used in a function called during receiving operation (as actual parameters) + ** @verdict pass reject + ** @configuration external_functions + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// e) Calling non-deterministic external functions, i.e. external functions where the resulting values for actual +// inout or out parameters or the return value may differ for different invocations with the same actual in and +// inout parameters (see notes 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_163 { + type record R { + integer field1 + } + + type port P message { + inout R; + } + + type component GeneralComp { + port P p; + } + + /** + * @return always true + */ + external function xf_NegSem_160104_invoking_functions_from_specific_places_001() return boolean; + + function f_test() runs on GeneralComp return template integer { + if (xf_NegSem_160104_invoking_functions_from_specific_places_001()) { return ?; } + else { return 1; } + } + + template R m_msg (template integer p_par) := { + field1 := p_par + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_163() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + p.receive(m_msg(f_test())); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_163()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_164.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_164.ttcn new file mode 100644 index 00000000..b2948153 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_164.ttcn @@ -0,0 +1,49 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the predefined rnd function cannot be used in a function called during receiving operation (as actual parameters) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// f) Calling the rnd predefined function (see notes 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_164 { + type record R { + integer field1 + } + + type port P message { + inout R; + } + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return template integer { + if (rnd() > 0.5) { return ?; } + else { return 1; } + } + + template R m_msg (template integer p_par) := { + field1 := p_par + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_164() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + p.receive(m_msg(f_test())); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_164()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_165.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_165.ttcn new file mode 100644 index 00000000..e34aa481 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_165.ttcn @@ -0,0 +1,51 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify a function called during receiving operation cannot contain an assignment of a component variable (as actual parameters) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// g) Changing of component variables, i.e. using component variables on the left-hand side of assignments, +// and in the instantiation of out and inout parameters (see notes 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_165 { + type record R { + integer field1 + } + + type port P message { + inout R; + } + + type component GeneralComp { + port P p; + var integer vc_int; + } + + function f_test() runs on GeneralComp return template integer { + vc_int := 1; + return ?; + } + + template R m_msg (template integer p_par) := { + field1 := p_par + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_165() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + p.receive(m_msg(f_test())); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_165()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_166.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_166.ttcn new file mode 100644 index 00000000..a0c83c77 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_166.ttcn @@ -0,0 +1,55 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify a function called during receiving operation cannot contain a component variable used as an actual out parameter (as actual parameters) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// g) Changing of component variables, i.e. using component variables on the left-hand side of assignments, +// and in the instantiation of out and inout parameters (see notes 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_166 { + type record R { + integer field1 + } + + type port P message { + inout R; + } + + type component GeneralComp { + port P p; + var integer vc_int; + } + + function f_out (out integer p_out) { + p_out := 1; + } + + function f_test() runs on GeneralComp return template integer { + f_out(vc_int); + return ?; + } + + template R m_msg (template integer p_par) := { + field1 := p_par + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_166() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + p.receive(m_msg(f_test())); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_166()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_167.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_167.ttcn new file mode 100644 index 00000000..00807e21 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_167.ttcn @@ -0,0 +1,56 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify a function called during receiving operation cannot contain a component variable used as an actual inout parameter (as actual parameters) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// g) Changing of component variables, i.e. using component variables on the left-hand side of assignments, +// and in the instantiation of out and inout parameters (see notes 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_167 { + type record R { + integer field1 + } + + type port P message { + inout R; + } + + type component GeneralComp { + port P p; + var integer vc_int := 0; + } + + function f_inout (inout integer p_inout) { + p_inout := 1; + } + + function f_test() runs on GeneralComp return template integer { + f_inout(vc_int); + return ?; + } + + template R m_msg (template integer p_par) := { + field1 := p_par + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_167() runs on GeneralComp system GeneralComp { + template @fuzzy R mw_test := { field1 := f_test() }; + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + p.receive(m_msg(f_test())); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_167()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_168.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_168.ttcn new file mode 100644 index 00000000..c54828c3 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_168.ttcn @@ -0,0 +1,48 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the setverdict operation cannot be used in a function called during receiving operation (as actual parameters) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// h) Calling the setverdict operation (see notes 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_168 { + type record R { + integer field1 + } + + type port P message { + inout R; + } + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return template integer { + setverdict(pass); + return ?; + } + + template R m_msg (template integer p_par) := { + field1 := p_par + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_168() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + p.receive(m_msg(f_test())); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_168()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_169.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_169.ttcn new file mode 100644 index 00000000..5ba902da --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_169.ttcn @@ -0,0 +1,53 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the activate operation cannot be used in a function called during receiving operation (as actual parameters) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// i) Activation and deactivation of defaults, i.e. the activate and deactivate statements (see notes 5 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_169 { + type record R { + integer field1 + } + + type port P message { + inout R; + } + + type component GeneralComp { + port P p; + } + + altstep a_anyTimer() runs on GeneralComp { + [] any timer.timeout {} + } + + function f_test() runs on GeneralComp return template integer { + activate(a_anyTimer()); + return ?; + } + + template R m_msg (template integer p_par) := { + field1 := p_par + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_169() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + p.receive(m_msg(f_test())); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_169()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_170.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_170.ttcn new file mode 100644 index 00000000..a2294c81 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_170.ttcn @@ -0,0 +1,54 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the deactivate operation cannot be used in a function called during receiving operation (as actual parameters) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// i) Activation and deactivation of defaults, i.e. the activate and deactivate statements (see notes 5 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_170 { + type record R { + integer field1 + } + + type port P message { + inout R; + } + + type component GeneralComp { + port P p; + } + + altstep a_anyTimer() runs on GeneralComp { + [] any timer.timeout {} + } + + function f_test() runs on GeneralComp return template integer { + deactivate; + return ?; + } + + template R m_msg (template integer p_par) := { + field1 := p_par + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_170() runs on GeneralComp system GeneralComp { + activate(a_anyTimer()); + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + p.receive(m_msg(f_test())); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_170()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_171.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_171.ttcn new file mode 100644 index 00000000..ba2efcaf --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_171.ttcn @@ -0,0 +1,51 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify a function called during receiving operation cannot contain an out parameter (as actual parameters) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// j) Calling functions and deterministic external functions with out or inout parameters (see notes 7 and 8). + +module NegSem_160104_invoking_functions_from_specific_places_171 { + type record R { + integer field1 + } + + type port P message { + inout R; + } + + type component GeneralComp { + port P p; + var integer vc_int; + } + + function f_test(out integer p_out) runs on GeneralComp return template integer { + p_out := 1; + return ?; + } + + template R m_msg (template integer p_par) := { + field1 := p_par + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_171() runs on GeneralComp system GeneralComp { + var integer v_int; + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + p.receive(m_msg(f_test(v_int))); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_171()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_172.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_172.ttcn new file mode 100644 index 00000000..4b1dd0af --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_172.ttcn @@ -0,0 +1,51 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify a function called during receiving operation cannot contain an inout parameter (as actual parameters) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// j) Calling functions and deterministic external functions with out or inout parameters (see notes 7 and 8). + +module NegSem_160104_invoking_functions_from_specific_places_172 { + type record R { + integer field1 + } + + type port P message { + inout R; + } + + type component GeneralComp { + port P p; + var integer vc_int; + } + + function f_test(out integer p_out) runs on GeneralComp return template integer { + p_out := 1; + return ?; + } + + template R m_msg (template integer p_par) := { + field1 := p_par + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_172() runs on GeneralComp system GeneralComp { + var integer v_int := 0; + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + p.receive(m_msg(f_test(v_int))); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_172()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_173.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_173.ttcn new file mode 100644 index 00000000..fc3f633f --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_173.ttcn @@ -0,0 +1,44 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the create operation cannot be used in guards of alt statements + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// a) All component operations, i.e. create, start (component), stop (component), kill, running (component), +// alive, done and killed (see notes 1, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_173 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + function f_test() return boolean { + var GeneralComp v_ptc := GeneralComp.create; + return true; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_173() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(1); + alt { + [f_test()] p.receive(integer:?) {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_173()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_174.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_174.ttcn new file mode 100644 index 00000000..a7a636d3 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_174.ttcn @@ -0,0 +1,49 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the component.start operation cannot be used in guards of alt statements + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// a) All component operations, i.e. create, start (component), stop (component), kill, running (component), +// alive, done and killed (see notes 1, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_174 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + function f_ptcBehaviour() runs on GeneralComp { + log("PTC running"); + } + + function f_test(GeneralComp p_ptc) return boolean { + p_ptc.start(f_ptcBehaviour()); + return true; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_174() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + connect(mtc:p, mtc:p); + p.send(1); + alt { + [f_test(v_ptc)] p.receive(integer:?) {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_174()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_175.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_175.ttcn new file mode 100644 index 00000000..ab4f91d4 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_175.ttcn @@ -0,0 +1,52 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the component.stop operation cannot be used in guards of alt statements + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// a) All component operations, i.e. create, start (component), stop (component), kill, running (component), +// alive, done and killed (see notes 1, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_175 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + function f_ptcBehaviour() runs on GeneralComp { + timer t_tmr := 10.0; + t_tmr.start; + t_tmr.timeout; + } + + function f_test(GeneralComp p_ptc) return boolean { + p_ptc.stop; + return true; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_175() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + v_ptc.start(f_ptcBehaviour()); + connect(mtc:p, mtc:p); + p.send(1); + alt { + [f_test(v_ptc)] p.receive(integer:?) {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_175()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_176.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_176.ttcn new file mode 100644 index 00000000..1934895d --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_176.ttcn @@ -0,0 +1,52 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the kill operation cannot be used in guards of alt statements + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// a) All component operations, i.e. create, start (component), stop (component), kill, running (component), +// alive, done and killed (see notes 1, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_176 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + function f_ptcBehaviour() runs on GeneralComp { + timer t_tmr := 10.0; + t_tmr.start; + t_tmr.timeout; + } + + function f_test(GeneralComp p_ptc) return boolean { + p_ptc.kill; + return true; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_176() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + v_ptc.start(f_ptcBehaviour()); + connect(mtc:p, mtc:p); + p.send(1); + alt { + [f_test(v_ptc)] p.receive(integer:?) {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_176()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_177.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_177.ttcn new file mode 100644 index 00000000..f507ab56 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_177.ttcn @@ -0,0 +1,52 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the component.running operation cannot be used in guards of alt statements + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// a) All component operations, i.e. create, start (component), stop (component), kill, running (component), +// alive, done and killed (see notes 1, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_177 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + function f_ptcBehaviour() runs on GeneralComp { + timer t_tmr := 10.0; + t_tmr.start; + t_tmr.timeout; + } + + function f_test(GeneralComp p_ptc) return boolean { + if (p_ptc.running) { return true; } + else { return false; } + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_177() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + v_ptc.start(f_ptcBehaviour()); + connect(mtc:p, mtc:p); + p.send(1); + alt { + [f_test(v_ptc)] p.receive(integer:?) {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_177()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_178.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_178.ttcn new file mode 100644 index 00000000..32b58cc9 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_178.ttcn @@ -0,0 +1,52 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the alive operation cannot be used in guards of alt statements + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// a) All component operations, i.e. create, start (component), stop (component), kill, running (component), +// alive, done and killed (see notes 1, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_178 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + function f_ptcBehaviour() runs on GeneralComp { + timer t_tmr := 10.0; + t_tmr.start; + t_tmr.timeout; + } + + function f_test(GeneralComp p_ptc) return boolean { + if (p_ptc.alive) { return true; } + else { return false; } + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_178() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + v_ptc.start(f_ptcBehaviour()); + connect(mtc:p, mtc:p); + p.send(1); + alt { + [f_test(v_ptc)] p.receive(integer:?) {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_178()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_179.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_179.ttcn new file mode 100644 index 00000000..0fc23ac0 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_179.ttcn @@ -0,0 +1,49 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the done operation cannot be used in guards of alt statements + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// a) All component operations, i.e. create, start (component), stop (component), kill, running (component), +// alive, done and killed (see notes 1, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_179 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + function f_ptcBehaviour() runs on GeneralComp { + } + + function f_test(GeneralComp p_ptc) return boolean { + p_ptc.done; + return true; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_179() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + v_ptc.start(f_ptcBehaviour()); + connect(mtc:p, mtc:p); + p.send(1); + alt { + [f_test(v_ptc)] p.receive(integer:?) {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_179()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_180.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_180.ttcn new file mode 100644 index 00000000..9d3e1bbd --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_180.ttcn @@ -0,0 +1,49 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the killed operation cannot be used in guards of alt statements + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// a) All component operations, i.e. create, start (component), stop (component), kill, running (component), +// alive, done and killed (see notes 1, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_180 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + function f_ptcBehaviour() runs on GeneralComp { + } + + function f_test(GeneralComp p_ptc) return boolean { + p_ptc.killed; + return true; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_180() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + v_ptc.start(f_ptcBehaviour()); + connect(mtc:p, mtc:p); + p.send(1); + alt { + [f_test(v_ptc)] p.receive(integer:?) {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_180()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_181.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_181.ttcn new file mode 100644 index 00000000..9d686d13 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_181.ttcn @@ -0,0 +1,47 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the port.start operation cannot be used in guards of alt statements + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_181 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return boolean { + p.start; + return true; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_181() runs on GeneralComp system GeneralComp { + timer t_tmr := 0.1; + t_tmr.start; + connect(mtc:p, mtc:p); + p.send(1); + alt { + [f_test()] p.receive(integer:?) {} + [] t_tmr.timeout {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_181()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_182.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_182.ttcn new file mode 100644 index 00000000..3c7b8fb1 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_182.ttcn @@ -0,0 +1,47 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the port.stop operation cannot be used in guards of alt statements + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_013 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return boolean { + p.stop; + return true; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_013() runs on GeneralComp system GeneralComp { + timer t_tmr := 0.1; + t_tmr.start; + connect(mtc:p, mtc:p); + p.send(1); + alt { + [f_test()] p.receive(integer:?) {} + [] t_tmr.timeout {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_013()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_183.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_183.ttcn new file mode 100644 index 00000000..67040242 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_183.ttcn @@ -0,0 +1,47 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the halt operation cannot be used in guards of alt statements + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_183 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return boolean { + p.halt; + return true; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_183() runs on GeneralComp system GeneralComp { + timer t_tmr := 0.1; + t_tmr.start; + connect(mtc:p, mtc:p); + p.send(1); + alt { + [f_test()] p.receive(integer:?) {} + [] t_tmr.timeout {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_183()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_184.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_184.ttcn new file mode 100644 index 00000000..c37b3e85 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_184.ttcn @@ -0,0 +1,47 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the clear operation cannot be used in guards of alt statements + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_184 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return boolean { + p.clear; + return true; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_184() runs on GeneralComp system GeneralComp { + timer t_tmr := 0.1; + t_tmr.start; + connect(mtc:p, mtc:p); + p.send(1); + alt { + [f_test()] p.receive(integer:?) {} + [] t_tmr.timeout {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_184()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_185.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_185.ttcn new file mode 100644 index 00000000..f86c60ac --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_185.ttcn @@ -0,0 +1,44 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the checkstate operation cannot be used in guards of alt statements + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_185 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return boolean { + if (p.checkstate("Started")) { return true; } + else { return false; } + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_185() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(1); + alt { + [f_test()] p.receive(integer:?) {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_185()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_186.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_186.ttcn new file mode 100644 index 00000000..590c781e --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_186.ttcn @@ -0,0 +1,44 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the send operation cannot be used in guards of alt statements + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_186 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return boolean { + p.send(2); + return true; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_186() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(1); + alt { + [f_test()] p.receive(integer:?) {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_186()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_187.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_187.ttcn new file mode 100644 index 00000000..f943832f --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_187.ttcn @@ -0,0 +1,45 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the receive operation cannot be used in guards of alt statements + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_187 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return boolean { + p.receive(integer:?); + return true; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_187() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(1); + p.send(1); + alt { + [f_test()] p.receive(integer:?) {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_187()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_188.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_188.ttcn new file mode 100644 index 00000000..b613f4cf --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_188.ttcn @@ -0,0 +1,45 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the trigger operation cannot be used in guards of alt statements + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_188 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return boolean { + p.trigger(integer:?); + return true; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_188() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(1); + p.send(1); + alt { + [f_test()] p.receive(integer:?) {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_188()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_189.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_189.ttcn new file mode 100644 index 00000000..94410e6d --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_189.ttcn @@ -0,0 +1,53 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the call operation cannot be used in guards of alt statements + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_189 { + type port P message { + inout integer; + } + + signature S(); + + type port PSig procedure { + inout S; + } + + type component GeneralComp { + port P p; + port PSig psig; + } + + function f_test() runs on GeneralComp return boolean { + psig.call(S:{}, nowait); + return true; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_189() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + connect(mtc:p, mtc:p); + connect(mtc:psig, v_ptc:psig); + p.send(1); + alt { + [f_test()] p.receive(integer:?) {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_189()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_190.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_190.ttcn new file mode 100644 index 00000000..bb3262c8 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_190.ttcn @@ -0,0 +1,58 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the getcall operation cannot be used in guards of alt statements + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_190 { + type port P message { + inout integer; + } + + signature S(); + + type port PSig procedure { + inout S; + } + + type component GeneralComp { + port P p; + port PSig psig; + } + + function f_ptcBehaviour() runs on GeneralComp { + psig.call(S:{}, nowait); + } + + function f_test() runs on GeneralComp return boolean { + psig.getcall(S:?); + return true; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_190() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + connect(mtc:p, mtc:p); + connect(mtc:psig, v_ptc:psig); + v_ptc.start(f_ptcBehaviour()); + p.send(1); + alt { + [f_test()] p.receive(integer:?) {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_190()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_191.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_191.ttcn new file mode 100644 index 00000000..58c6e353 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_191.ttcn @@ -0,0 +1,59 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the reply operation cannot be used in guards of alt statements + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_191 { + type port P message { + inout integer; + } + + signature S(); + + type port PSig procedure { + inout S; + } + + type component GeneralComp { + port P p; + port PSig psig; + } + + function f_ptcBehaviour() runs on GeneralComp { + psig.call(S:{}, nowait); + } + + function f_test() runs on GeneralComp return boolean { + psig.reply(S:{}); + return true; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_191() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + connect(mtc:p, mtc:p); + connect(mtc:psig, v_ptc:psig); + v_ptc.start(f_ptcBehaviour()); + p.send(1); + psig.getcall(S:?); + alt { + [f_test()] p.receive(integer:?) {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_191()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_192.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_192.ttcn new file mode 100644 index 00000000..e0e656cc --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_192.ttcn @@ -0,0 +1,60 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the getreply operation cannot be used in guards of alt statements + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_192 { + type port P message { + inout integer; + } + + signature S(); + + type port PSig procedure { + inout S; + } + + type component GeneralComp { + port P p; + port PSig psig; + } + + function f_ptcBehaviour() runs on GeneralComp { + psig.getcall(S:?); + psig.reply(S:{}); + } + + function f_test() runs on GeneralComp return boolean { + psig.getreply(S:?); + return true; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_192() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + connect(mtc:p, mtc:p); + connect(mtc:psig, v_ptc:psig); + v_ptc.start(f_ptcBehaviour()); + psig.call(S:{}, nowait); + p.send(1); + alt { + [f_test()] p.receive(integer:?) {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_192()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_193.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_193.ttcn new file mode 100644 index 00000000..b2fd068d --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_193.ttcn @@ -0,0 +1,59 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the raise operation cannot be used in guards of alt statements + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_193 { + type port P message { + inout integer; + } + + signature S() exception (charstring); + + type port PSig procedure { + inout S; + } + + type component GeneralComp { + port P p; + port PSig psig; + } + + function f_ptcBehaviour() runs on GeneralComp { + psig.call(S:{}, nowait); + } + + function f_test() runs on GeneralComp return boolean { + psig.raise(S, "UserException"); + return true; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_193() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + connect(mtc:p, mtc:p); + connect(mtc:psig, v_ptc:psig); + v_ptc.start(f_ptcBehaviour()); + p.send(1); + psig.getcall(S:?); + alt { + [f_test()] p.receive(integer:?) {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_193()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_194.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_194.ttcn new file mode 100644 index 00000000..b356ebaa --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_194.ttcn @@ -0,0 +1,60 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the catch operation cannot be used in guards of alt statements + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_194 { + type port P message { + inout integer; + } + + signature S() exception (charstring); + + type port PSig procedure { + inout S; + } + + type component GeneralComp { + port P p; + port PSig psig; + } + + function f_ptcBehaviour() runs on GeneralComp { + psig.getcall(S:?); + psig.raise(S, "UserException"); + } + + function f_test() runs on GeneralComp return boolean { + psig.catch(S, charstring:?); + return true; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_194() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + connect(mtc:p, mtc:p); + connect(mtc:psig, v_ptc:psig); + v_ptc.start(f_ptcBehaviour()); + psig.call(S:{}, nowait); + p.send(1); + alt { + [f_test()] p.receive(integer:?) {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_194()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_195.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_195.ttcn new file mode 100644 index 00000000..54b14b42 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_195.ttcn @@ -0,0 +1,44 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the check operation cannot be used in guards of alt statements + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_195 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return boolean { + p.check; + return true; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_195() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(1); + alt { + [f_test()] p.receive(integer:?) {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_195()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_196.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_196.ttcn new file mode 100644 index 00000000..ca7f576f --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_196.ttcn @@ -0,0 +1,44 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the connect operation cannot be used in guards of alt statements + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_196 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return boolean { + connect(mtc:p, mtc:p); + return true; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_196() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(1); + alt { + [f_test()] p.receive(integer:?) {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_196()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_197.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_197.ttcn new file mode 100644 index 00000000..f5e8704c --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_197.ttcn @@ -0,0 +1,44 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the disconnect operation cannot be used in guards of alt statements + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_197 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return boolean { + disconnect(mtc:p, mtc:p); + return true; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_197() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(1); + alt { + [f_test()] p.receive(integer:?) {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_197()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_198.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_198.ttcn new file mode 100644 index 00000000..28e31dea --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_198.ttcn @@ -0,0 +1,45 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the map operation cannot be used in guards of alt statements + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_198 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp system GeneralComp return boolean { + map(mtc:p, system:p); + return true; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_198() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(1); + disconnect(mtc:p, mtc:p); + alt { + [f_test()] p.receive(integer:?) {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_198()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_199.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_199.ttcn new file mode 100644 index 00000000..0d788432 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_199.ttcn @@ -0,0 +1,46 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the unmap operation cannot be used in guards of alt statements + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_199 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp system GeneralComp return boolean { + unmap(mtc:p, system:p); + return true; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_199() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(1); + disconnect(mtc:p, mtc:p); + map(mtc:p, system:p); + alt { + [f_test()] p.receive(integer:?) {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_199()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_200.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_200.ttcn new file mode 100644 index 00000000..66159f29 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_200.ttcn @@ -0,0 +1,43 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the action operation cannot be used in guards of alt statements + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// c) The action operation (see notes 2 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_200 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return boolean { + action("My action"); + return true; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_200() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(1); + alt { + [f_test()] p.receive(integer:?) {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_200()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_201.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_201.ttcn new file mode 100644 index 00000000..53ff019d --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_201.ttcn @@ -0,0 +1,44 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the timer.start operation cannot be used in guards of alt statements + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// d) All timer operations, i.e. start (timer), stop (timer), running (timer), read, timeout (see notes 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_201 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + timer tc_tmr := 0.1; + } + + function f_test() runs on GeneralComp return boolean { + tc_tmr.start; + return true; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_201() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(1); + alt { + [f_test()] p.receive(integer:?) {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_201()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_202.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_202.ttcn new file mode 100644 index 00000000..25953aa2 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_202.ttcn @@ -0,0 +1,45 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the timer.stop operation cannot be used in guards of alt statements + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// d) All timer operations, i.e. start (timer), stop (timer), running (timer), read, timeout (see notes 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_202 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + timer tc_tmr := 0.1; + } + + function f_test() runs on GeneralComp return boolean { + tc_tmr.stop; + return true; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_202() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + tc_tmr.start; + p.send(1); + alt { + [f_test()] p.receive(integer:?) {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_202()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_203.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_203.ttcn new file mode 100644 index 00000000..515391bb --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_203.ttcn @@ -0,0 +1,45 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the timer.running operation cannot be used in guards of alt statements + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// d) All timer operations, i.e. start (timer), stop (timer), running (timer), read, timeout (see notes 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_203 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + timer tc_tmr := 5.0; + } + + function f_test() runs on GeneralComp return boolean { + if (tc_tmr.running) { return true; } + else { return false; } + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_203() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + tc_tmr.start; + p.send(1); + alt { + [f_test()] p.receive(integer:?) {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_203()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_204.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_204.ttcn new file mode 100644 index 00000000..169e3766 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_204.ttcn @@ -0,0 +1,45 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the read operation cannot be used in guards of alt statements + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// d) All timer operations, i.e. start (timer), stop (timer), running (timer), read, timeout (see notes 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_204 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + timer tc_tmr := 0.1; + } + + function f_test() runs on GeneralComp return boolean { + if (tc_tmr.read > 0.0) { return true; } + else { return false; } + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_204() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + tc_tmr.start; + p.send(1); + alt { + [f_test()] p.receive(integer:?) {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_204()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_205.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_205.ttcn new file mode 100644 index 00000000..a9853e10 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_205.ttcn @@ -0,0 +1,45 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the timeout operation cannot be used in guards of alt statements + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// d) All timer operations, i.e. start (timer), stop (timer), running (timer), read, timeout (see notes 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_205 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + timer tc_tmr := 0.1; + } + + function f_test() runs on GeneralComp return boolean { + any timer.timeout; + return true; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_205() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + tc_tmr.start; + p.send(1); + alt { + [f_test()] p.receive(integer:?) {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_205()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_206.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_206.ttcn new file mode 100644 index 00000000..43eef3ce --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_206.ttcn @@ -0,0 +1,45 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify a function called in a guard of an alt statement cannot contain an assignment of a component variable + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// g) Changing of component variables, i.e. using component variables on the left-hand side of assignments, +// and in the instantiation of out and inout parameters (see notes 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_206 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + var integer vc_int; + } + + function f_test() runs on GeneralComp return boolean { + vc_int := 1; + return true; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_206() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(1); + alt { + [f_test()] p.receive(integer:?) {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_206()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_207.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_207.ttcn new file mode 100644 index 00000000..797cd45d --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_207.ttcn @@ -0,0 +1,49 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify a function called in a guard of an alt statement cannot contain a component variable used as an actual out parameter + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// g) Changing of component variables, i.e. using component variables on the left-hand side of assignments, +// and in the instantiation of out and inout parameters (see notes 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_207 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + var integer vc_int; + } + + function f_out (out integer p_out) { + p_out := 1; + } + + function f_test() runs on GeneralComp return boolean { + f_out(vc_int); + return true; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_207() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(1); + alt { + [f_test()] p.receive(integer:?) {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_207()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_208.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_208.ttcn new file mode 100644 index 00000000..f624a8f6 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_208.ttcn @@ -0,0 +1,49 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify a function called in a guard of an alt statement cannot contain a component variable used as an actual inout parameter + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// g) Changing of component variables, i.e. using component variables on the left-hand side of assignments, +// and in the instantiation of out and inout parameters (see notes 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_208 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + var integer vc_int := 0; + } + + function f_inout (inout integer p_inout) { + p_inout := 1; + } + + function f_test() runs on GeneralComp return boolean { + f_inout(vc_int); + return true; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_208() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(1); + alt { + [f_test()] p.receive(integer:?) {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_208()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_209.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_209.ttcn new file mode 100644 index 00000000..6efc4405 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_209.ttcn @@ -0,0 +1,47 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the activate operation cannot be used in guards of alt statements + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// i) Activation and deactivation of defaults, i.e. the activate and deactivate statements (see notes 5 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_209 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + altstep a_anyTimer() runs on GeneralComp { + [] any timer.timeout {} + } + + function f_test() runs on GeneralComp return boolean { + activate(a_anyTimer()); + return true; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_209() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(1); + alt { + [f_test()] p.receive(integer:?) {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_209()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_210.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_210.ttcn new file mode 100644 index 00000000..b3177435 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_210.ttcn @@ -0,0 +1,48 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the deactivate operation cannot be used in guards of alt statements + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// i) Activation and deactivation of defaults, i.e. the activate and deactivate statements (see notes 5 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_210 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + altstep a_anyTimer() runs on GeneralComp { + [] any timer.timeout {} + } + + function f_test() runs on GeneralComp return boolean { + deactivate; + return true; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_210() runs on GeneralComp system GeneralComp { + activate(a_anyTimer()); + connect(mtc:p, mtc:p); + p.send(1); + alt { + [f_test()] p.receive(integer:?) {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_210()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_211.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_211.ttcn new file mode 100644 index 00000000..0e042d0b --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_211.ttcn @@ -0,0 +1,44 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that a function called from a guard statement of an alt operation cannot contain out parameters + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// j) Calling functions and deterministic external functions with out or inout parameters (see notes 7 and 8). + +module NegSem_160104_invoking_functions_from_specific_places_211 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + function f_test(out integer p_par) runs on GeneralComp return boolean { + p_par := 1; + return true; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_211() runs on GeneralComp system GeneralComp { + var integer v_int := 0; + connect(mtc:p, mtc:p); + p.send(1); + alt { + [f_test(v_int)] p.receive(integer:?) {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_211()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_212.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_212.ttcn new file mode 100644 index 00000000..daecdd74 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_212.ttcn @@ -0,0 +1,46 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the create operation cannot be used in guards of altsteps + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// a) All component operations, i.e. create, start (component), stop (component), kill, running (component), +// alive, done and killed (see notes 1, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_212 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + function f_test() return boolean { + var GeneralComp v_ptc := GeneralComp.create; + return true; + } + + altstep a_rcv() runs on GeneralComp { + [f_test()] p.receive(integer:?) {} + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_212() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(1); + a_rcv(); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_212()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_213.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_213.ttcn new file mode 100644 index 00000000..81b0b570 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_213.ttcn @@ -0,0 +1,51 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the component.start operation cannot be used in guards of altsteps + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// a) All component operations, i.e. create, start (component), stop (component), kill, running (component), +// alive, done and killed (see notes 1, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_213 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + function f_ptcBehaviour() runs on GeneralComp { + log("PTC running"); + } + + function f_test(GeneralComp p_ptc) return boolean { + p_ptc.start(f_ptcBehaviour()); + return true; + } + + altstep a_rcv(GeneralComp p_ptc) runs on GeneralComp { + [f_test(p_ptc)] p.receive(integer:?) {} + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_213() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + connect(mtc:p, mtc:p); + p.send(1); + a_rcv(v_ptc); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_213()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_214.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_214.ttcn new file mode 100644 index 00000000..2a630b9b --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_214.ttcn @@ -0,0 +1,54 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the component.stop operation cannot be used in guards of altsteps + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// a) All component operations, i.e. create, start (component), stop (component), kill, running (component), +// alive, done and killed (see notes 1, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_214 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + function f_ptcBehaviour() runs on GeneralComp { + timer t_tmr := 10.0; + t_tmr.start; + t_tmr.timeout; + } + + function f_test(GeneralComp p_ptc) return boolean { + p_ptc.stop; + return true; + } + + altstep a_rcv(GeneralComp p_ptc) runs on GeneralComp { + [f_test(p_ptc)] p.receive(integer:?) {} + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_214() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + v_ptc.start(f_ptcBehaviour()); + connect(mtc:p, mtc:p); + p.send(1); + a_rcv(v_ptc); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_214()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_215.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_215.ttcn new file mode 100644 index 00000000..270dd4a9 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_215.ttcn @@ -0,0 +1,54 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the kill operation cannot be used in guards of altsteps + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// a) All component operations, i.e. create, start (component), stop (component), kill, running (component), +// alive, done and killed (see notes 1, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_215 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + function f_ptcBehaviour() runs on GeneralComp { + timer t_tmr := 10.0; + t_tmr.start; + t_tmr.timeout; + } + + function f_test(GeneralComp p_ptc) return boolean { + p_ptc.kill; + return true; + } + + altstep a_rcv(GeneralComp p_ptc) runs on GeneralComp { + [f_test(p_ptc)] p.receive(integer:?) {} + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_215() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + v_ptc.start(f_ptcBehaviour()); + connect(mtc:p, mtc:p); + p.send(1); + a_rcv(v_ptc); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_215()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_216.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_216.ttcn new file mode 100644 index 00000000..5b742bcb --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_216.ttcn @@ -0,0 +1,54 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the component.running operation cannot be used in guards of altsteps + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// a) All component operations, i.e. create, start (component), stop (component), kill, running (component), +// alive, done and killed (see notes 1, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_216 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + function f_ptcBehaviour() runs on GeneralComp { + timer t_tmr := 10.0; + t_tmr.start; + t_tmr.timeout; + } + + function f_test(GeneralComp p_ptc) return boolean { + if (p_ptc.running) { return true; } + else { return false; } + } + + altstep a_rcv(GeneralComp p_ptc) runs on GeneralComp { + [f_test(p_ptc)] p.receive(integer:?) {} + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_216() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + v_ptc.start(f_ptcBehaviour()); + connect(mtc:p, mtc:p); + p.send(1); + a_rcv(v_ptc); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_216()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_217.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_217.ttcn new file mode 100644 index 00000000..922d466d --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_217.ttcn @@ -0,0 +1,54 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the alive operation cannot be used in guards of altsteps + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// a) All component operations, i.e. create, start (component), stop (component), kill, running (component), +// alive, done and killed (see notes 1, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_217 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + function f_ptcBehaviour() runs on GeneralComp { + timer t_tmr := 10.0; + t_tmr.start; + t_tmr.timeout; + } + + function f_test(GeneralComp p_ptc) return boolean { + if (p_ptc.alive) { return true; } + else { return false; } + } + + altstep a_rcv(GeneralComp p_ptc) runs on GeneralComp { + [f_test(p_ptc)] p.receive(integer:?) {} + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_217() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + v_ptc.start(f_ptcBehaviour()); + connect(mtc:p, mtc:p); + p.send(1); + a_rcv(v_ptc); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_217()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_218.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_218.ttcn new file mode 100644 index 00000000..4e3d5b99 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_218.ttcn @@ -0,0 +1,51 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the done operation cannot be used in guards of altsteps + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// a) All component operations, i.e. create, start (component), stop (component), kill, running (component), +// alive, done and killed (see notes 1, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_218 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + function f_ptcBehaviour() runs on GeneralComp { + } + + function f_test(GeneralComp p_ptc) return boolean { + p_ptc.done; + return true; + } + + altstep a_rcv(GeneralComp p_ptc) runs on GeneralComp { + [f_test(p_ptc)] p.receive(integer:?) {} + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_218() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + v_ptc.start(f_ptcBehaviour()); + connect(mtc:p, mtc:p); + p.send(1); + a_rcv(v_ptc); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_218()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_219.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_219.ttcn new file mode 100644 index 00000000..aa3c9d60 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_219.ttcn @@ -0,0 +1,51 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the killed operation cannot be used in guards of altsteps + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// a) All component operations, i.e. create, start (component), stop (component), kill, running (component), +// alive, done and killed (see notes 1, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_219 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + function f_ptcBehaviour() runs on GeneralComp { + } + + function f_test(GeneralComp p_ptc) return boolean { + p_ptc.killed; + return true; + } + + altstep a_rcv(GeneralComp p_ptc) runs on GeneralComp { + [f_test(p_ptc)] p.receive(integer:?) {} + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_219() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + v_ptc.start(f_ptcBehaviour()); + connect(mtc:p, mtc:p); + p.send(1); + a_rcv(v_ptc); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_219()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_220.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_220.ttcn new file mode 100644 index 00000000..27d20a70 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_220.ttcn @@ -0,0 +1,51 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the port.start operation cannot be used in guards of altsteps + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_220 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return boolean { + p.start; + return true; + } + + altstep a_rcv() runs on GeneralComp { + [f_test()] p.receive(integer:?) {} + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_220() runs on GeneralComp system GeneralComp { + timer t_tmr := 0.1; + t_tmr.start; + connect(mtc:p, mtc:p); + p.send(1); + alt { + [] a_rcv() {} + [] t_tmr.timeout {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_220()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_221.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_221.ttcn new file mode 100644 index 00000000..6fb87956 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_221.ttcn @@ -0,0 +1,51 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the port.stop operation cannot be used in guards of altsteps + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_013 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return boolean { + p.stop; + return true; + } + + altstep a_rcv() runs on GeneralComp { + [f_test()] p.receive(integer:?) {} + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_013() runs on GeneralComp system GeneralComp { + timer t_tmr := 0.1; + t_tmr.start; + connect(mtc:p, mtc:p); + p.send(1); + alt { + [] a_rcv() {} + [] t_tmr.timeout {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_013()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_222.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_222.ttcn new file mode 100644 index 00000000..6158bd1a --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_222.ttcn @@ -0,0 +1,51 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the halt operation cannot be used in guards of altsteps + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_222 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return boolean { + p.halt; + return true; + } + + altstep a_rcv() runs on GeneralComp { + [f_test()] p.receive(integer:?) {} + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_222() runs on GeneralComp system GeneralComp { + timer t_tmr := 0.1; + t_tmr.start; + connect(mtc:p, mtc:p); + p.send(1); + alt { + [] a_rcv() {} + [] t_tmr.timeout {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_222()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_223.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_223.ttcn new file mode 100644 index 00000000..e654056e --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_223.ttcn @@ -0,0 +1,51 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the clear operation cannot be used in guards of altsteps + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_223 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return boolean { + p.clear; + return true; + } + + altstep a_rcv() runs on GeneralComp { + [f_test()] p.receive(integer:?) {} + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_223() runs on GeneralComp system GeneralComp { + timer t_tmr := 0.1; + t_tmr.start; + connect(mtc:p, mtc:p); + p.send(1); + alt { + [] a_rcv() {} + [] t_tmr.timeout {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_223()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_224.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_224.ttcn new file mode 100644 index 00000000..d1db4f78 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_224.ttcn @@ -0,0 +1,46 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the checkstate operation cannot be used in guards of altsteps + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_224 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return boolean { + if (p.checkstate("Started")) { return true; } + else { return false; } + } + + altstep a_rcv() runs on GeneralComp { + [f_test()] p.receive(integer:?) {} + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_224() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(1); + a_rcv(); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_224()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_225.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_225.ttcn new file mode 100644 index 00000000..98ea848b --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_225.ttcn @@ -0,0 +1,46 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the send operation cannot be used in guards of altsteps + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_225 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return boolean { + p.send(2); + return true; + } + + altstep a_rcv() runs on GeneralComp { + [f_test()] p.receive(integer:?) {} + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_225() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(1); + a_rcv(); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_225()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_226.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_226.ttcn new file mode 100644 index 00000000..ada4e25c --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_226.ttcn @@ -0,0 +1,47 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the receive operation cannot be used in guards of altsteps + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_226 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return boolean { + p.receive(integer:?); + return true; + } + + altstep a_rcv() runs on GeneralComp { + [f_test()] p.receive(integer:?) {} + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_226() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(1); + p.send(1); + a_rcv(); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_226()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_227.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_227.ttcn new file mode 100644 index 00000000..dafbe9a8 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_227.ttcn @@ -0,0 +1,47 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the trigger operation cannot be used in guards of altsteps + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_227 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return boolean { + p.trigger(integer:?); + return true; + } + + altstep a_rcv() runs on GeneralComp { + [f_test()] p.receive(integer:?) {} + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_227() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(1); + p.send(1); + a_rcv(); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_227()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_228.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_228.ttcn new file mode 100644 index 00000000..e4840ef1 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_228.ttcn @@ -0,0 +1,55 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the call operation cannot be used in guards of altsteps + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_228 { + type port P message { + inout integer; + } + + signature S(); + + type port PSig procedure { + inout S; + } + + type component GeneralComp { + port P p; + port PSig psig; + } + + function f_test() runs on GeneralComp return boolean { + psig.call(S:{}, nowait); + return true; + } + + altstep a_rcv() runs on GeneralComp { + [f_test()] p.receive(integer:?) {} + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_228() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + connect(mtc:p, mtc:p); + connect(mtc:psig, v_ptc:psig); + p.send(1); + a_rcv(); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_228()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_229.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_229.ttcn new file mode 100644 index 00000000..d4199e2b --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_229.ttcn @@ -0,0 +1,60 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the getcall operation cannot be used in guards of altsteps + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_229 { + type port P message { + inout integer; + } + + signature S(); + + type port PSig procedure { + inout S; + } + + type component GeneralComp { + port P p; + port PSig psig; + } + + function f_ptcBehaviour() runs on GeneralComp { + psig.call(S:{}, nowait); + } + + function f_test() runs on GeneralComp return boolean { + psig.getcall(S:?); + return true; + } + + altstep a_rcv() runs on GeneralComp { + [f_test()] p.receive(integer:?) {} + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_229() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + connect(mtc:p, mtc:p); + connect(mtc:psig, v_ptc:psig); + v_ptc.start(f_ptcBehaviour()); + p.send(1); + a_rcv(); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_229()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_230.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_230.ttcn new file mode 100644 index 00000000..622378ac --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_230.ttcn @@ -0,0 +1,61 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the reply operation cannot be used in guards of altsteps + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_230 { + type port P message { + inout integer; + } + + signature S(); + + type port PSig procedure { + inout S; + } + + type component GeneralComp { + port P p; + port PSig psig; + } + + function f_ptcBehaviour() runs on GeneralComp { + psig.call(S:{}, nowait); + } + + function f_test() runs on GeneralComp return boolean { + psig.reply(S:{}); + return true; + } + + altstep a_rcv() runs on GeneralComp { + [f_test()] p.receive(integer:?) {} + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_230() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + connect(mtc:p, mtc:p); + connect(mtc:psig, v_ptc:psig); + v_ptc.start(f_ptcBehaviour()); + p.send(1); + psig.getcall(S:?); + a_rcv(); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_230()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_231.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_231.ttcn new file mode 100644 index 00000000..381d4031 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_231.ttcn @@ -0,0 +1,62 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the getreply operation cannot be used in guards of altsteps + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_231 { + type port P message { + inout integer; + } + + signature S(); + + type port PSig procedure { + inout S; + } + + type component GeneralComp { + port P p; + port PSig psig; + } + + function f_ptcBehaviour() runs on GeneralComp { + psig.getcall(S:?); + psig.reply(S:{}); + } + + function f_test() runs on GeneralComp return boolean { + psig.getreply(S:?); + return true; + } + + altstep a_rcv() runs on GeneralComp { + [f_test()] p.receive(integer:?) {} + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_231() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + connect(mtc:p, mtc:p); + connect(mtc:psig, v_ptc:psig); + v_ptc.start(f_ptcBehaviour()); + psig.call(S:{}, nowait); + p.send(1); + a_rcv(); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_231()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_232.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_232.ttcn new file mode 100644 index 00000000..fd9b2cfd --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_232.ttcn @@ -0,0 +1,61 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the raise operation cannot be used in guards of altsteps + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_232 { + type port P message { + inout integer; + } + + signature S() exception (charstring); + + type port PSig procedure { + inout S; + } + + type component GeneralComp { + port P p; + port PSig psig; + } + + function f_ptcBehaviour() runs on GeneralComp { + psig.call(S:{}, nowait); + } + + function f_test() runs on GeneralComp return boolean { + psig.raise(S, "UserException"); + return true; + } + + altstep a_rcv() runs on GeneralComp { + [f_test()] p.receive(integer:?) {} + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_232() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + connect(mtc:p, mtc:p); + connect(mtc:psig, v_ptc:psig); + v_ptc.start(f_ptcBehaviour()); + p.send(1); + psig.getcall(S:?); + a_rcv(); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_232()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_233.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_233.ttcn new file mode 100644 index 00000000..2eb62edc --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_233.ttcn @@ -0,0 +1,62 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the catch operation cannot be used in guards of altsteps + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_233 { + type port P message { + inout integer; + } + + signature S() exception (charstring); + + type port PSig procedure { + inout S; + } + + type component GeneralComp { + port P p; + port PSig psig; + } + + function f_ptcBehaviour() runs on GeneralComp { + psig.getcall(S:?); + psig.raise(S, "UserException"); + } + + function f_test() runs on GeneralComp return boolean { + psig.catch(S, charstring:?); + return true; + } + + altstep a_rcv() runs on GeneralComp { + [f_test()] p.receive(integer:?) {} + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_233() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + connect(mtc:p, mtc:p); + connect(mtc:psig, v_ptc:psig); + v_ptc.start(f_ptcBehaviour()); + psig.call(S:{}, nowait); + p.send(1); + a_rcv(); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_233()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_234.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_234.ttcn new file mode 100644 index 00000000..02b57f24 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_234.ttcn @@ -0,0 +1,46 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the check operation cannot be used in guards of altsteps + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_234 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return boolean { + p.check; + return true; + } + + altstep a_rcv() runs on GeneralComp { + [f_test()] p.receive(integer:?) {} + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_234() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(1); + a_rcv(); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_234()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_235.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_235.ttcn new file mode 100644 index 00000000..5ac70f4f --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_235.ttcn @@ -0,0 +1,46 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the connect operation cannot be used in guards of altsteps + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_235 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return boolean { + connect(mtc:p, mtc:p); + return true; + } + + altstep a_rcv() runs on GeneralComp { + [f_test()] p.receive(integer:?) {} + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_235() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(1); + a_rcv(); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_235()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_236.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_236.ttcn new file mode 100644 index 00000000..6908ac45 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_236.ttcn @@ -0,0 +1,46 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the disconnect operation cannot be used in guards of altsteps + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_236 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return boolean { + disconnect(mtc:p, mtc:p); + return true; + } + + altstep a_rcv() runs on GeneralComp { + [f_test()] p.receive(integer:?) {} + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_236() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(1); + a_rcv(); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_236()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_237.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_237.ttcn new file mode 100644 index 00000000..ffa068da --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_237.ttcn @@ -0,0 +1,47 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the map operation cannot be used in guards of altsteps + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_237 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp system GeneralComp return boolean { + map(mtc:p, system:p); + return true; + } + + altstep a_rcv() runs on GeneralComp system GeneralComp { + [f_test()] p.receive(integer:?) {} + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_237() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(1); + disconnect(mtc:p, mtc:p); + a_rcv(); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_237()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_238.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_238.ttcn new file mode 100644 index 00000000..7147c963 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_238.ttcn @@ -0,0 +1,48 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the unmap operation cannot be used in guards of altsteps + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_238 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp system GeneralComp return boolean { + unmap(mtc:p, system:p); + return true; + } + + altstep a_rcv() runs on GeneralComp system GeneralComp { + [f_test()] p.receive(integer:?) {} + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_238() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(1); + disconnect(mtc:p, mtc:p); + map(mtc:p, system:p); + a_rcv(); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_238()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_239.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_239.ttcn new file mode 100644 index 00000000..5b087862 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_239.ttcn @@ -0,0 +1,45 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the action operation cannot be used in guards of altsteps + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// c) The action operation (see notes 2 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_239 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return boolean { + action("My action"); + return true; + } + + altstep a_rcv() runs on GeneralComp { + [f_test()] p.receive(integer:?) {} + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_239() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(1); + a_rcv(); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_239()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_240.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_240.ttcn new file mode 100644 index 00000000..e3a80c23 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_240.ttcn @@ -0,0 +1,46 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the timer.start operation cannot be used in guards of altsteps + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// d) All timer operations, i.e. start (timer), stop (timer), running (timer), read, timeout (see notes 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_240 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + timer tc_tmr := 0.1; + } + + function f_test() runs on GeneralComp return boolean { + tc_tmr.start; + return true; + } + + altstep a_rcv() runs on GeneralComp { + [f_test()] p.receive(integer:?) {} + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_240() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(1); + a_rcv(); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_240()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_241.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_241.ttcn new file mode 100644 index 00000000..4df4e793 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_241.ttcn @@ -0,0 +1,47 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the timer.stop operation cannot be used in guards of altsteps + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// d) All timer operations, i.e. start (timer), stop (timer), running (timer), read, timeout (see notes 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_241 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + timer tc_tmr := 0.1; + } + + function f_test() runs on GeneralComp return boolean { + tc_tmr.stop; + return true; + } + + altstep a_rcv() runs on GeneralComp { + [f_test()] p.receive(integer:?) {} + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_241() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + tc_tmr.start; + p.send(1); + a_rcv(); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_241()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_242.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_242.ttcn new file mode 100644 index 00000000..c94683e0 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_242.ttcn @@ -0,0 +1,47 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the timer.running operation cannot be used in guards of altsteps + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// d) All timer operations, i.e. start (timer), stop (timer), running (timer), read, timeout (see notes 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_242 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + timer tc_tmr := 5.0; + } + + function f_test() runs on GeneralComp return boolean { + if (tc_tmr.running) { return true; } + else { return false; } + } + + altstep a_rcv() runs on GeneralComp { + [f_test()] p.receive(integer:?) {} + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_242() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + tc_tmr.start; + p.send(1); + a_rcv(); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_242()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_243.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_243.ttcn new file mode 100644 index 00000000..e608f893 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_243.ttcn @@ -0,0 +1,47 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the read operation cannot be used in guards of altsteps + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// d) All timer operations, i.e. start (timer), stop (timer), running (timer), read, timeout (see notes 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_243 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + timer tc_tmr := 0.1; + } + + function f_test() runs on GeneralComp return boolean { + if (tc_tmr.read > 0.0) { return true; } + else { return false; } + } + + altstep a_rcv() runs on GeneralComp { + [f_test()] p.receive(integer:?) {} + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_243() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + tc_tmr.start; + p.send(1); + a_rcv(); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_243()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_244.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_244.ttcn new file mode 100644 index 00000000..64c80d82 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_244.ttcn @@ -0,0 +1,47 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the timeout operation cannot be used in guards of altsteps + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// d) All timer operations, i.e. start (timer), stop (timer), running (timer), read, timeout (see notes 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_244 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + timer tc_tmr := 0.1; + } + + function f_test() runs on GeneralComp return boolean { + any timer.timeout; + return true; + } + + altstep a_rcv() runs on GeneralComp { + [f_test()] p.receive(integer:?) {} + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_244() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + tc_tmr.start; + p.send(1); + a_rcv(); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_244()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_245.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_245.ttcn new file mode 100644 index 00000000..fc89cd1f --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_245.ttcn @@ -0,0 +1,53 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that a non-deterministic external function call cannot be used in guards of altsteps + ** @verdict pass reject + ** @configuration external_functions + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// e) Calling non-deterministic external functions, i.e. external functions where the resulting values for actual +// inout or out parameters or the return value may differ for different invocations with the same actual in and +// inout parameters (see notes 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_245 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + /** + * @return always true + */ + external function xf_NegSem_160104_invoking_functions_from_specific_places_001() return boolean; + + function f_test() runs on GeneralComp return boolean { + if (xf_NegSem_160104_invoking_functions_from_specific_places_001()) { return true; } + else { return true; } + } + + altstep a_rcv() runs on GeneralComp { + [f_test()] p.receive(integer:?) {} + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_245() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(1); + a_rcv(); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_245()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_246.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_246.ttcn new file mode 100644 index 00000000..26efb08b --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_246.ttcn @@ -0,0 +1,45 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the predefined rnd function cannot be used in guards of altsteps + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// f) Calling the rnd predefined function (see notes 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_246 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return boolean { + if (rnd() > 0.5) { return true; } + else { return true; } + } + + altstep a_rcv() runs on GeneralComp { + [f_test()] p.receive(integer:?) {} + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_246() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(1); + a_rcv(); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_246()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_247.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_247.ttcn new file mode 100644 index 00000000..ebd54042 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_247.ttcn @@ -0,0 +1,47 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify a function called in a guard of an altstep cannot contain an assignment of a component variable + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// g) Changing of component variables, i.e. using component variables on the left-hand side of assignments, +// and in the instantiation of out and inout parameters (see notes 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_247 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + var integer vc_int; + } + + function f_test() runs on GeneralComp return boolean { + vc_int := 1; + return true; + } + + altstep a_rcv() runs on GeneralComp { + [f_test()] p.receive(integer:?) {} + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_247() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(1); + a_rcv(); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_247()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_248.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_248.ttcn new file mode 100644 index 00000000..c77ff27d --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_248.ttcn @@ -0,0 +1,51 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify a function called in a guard of an altstep cannot contain a component variable used as an actual out parameter + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// g) Changing of component variables, i.e. using component variables on the left-hand side of assignments, +// and in the instantiation of out and inout parameters (see notes 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_248 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + var integer vc_int; + } + + function f_out (out integer p_out) { + p_out := 1; + } + + function f_test() runs on GeneralComp return boolean { + f_out(vc_int); + return true; + } + + altstep a_rcv() runs on GeneralComp { + [f_test()] p.receive(integer:?) {} + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_248() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(1); + a_rcv(); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_248()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_249.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_249.ttcn new file mode 100644 index 00000000..914c298e --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_249.ttcn @@ -0,0 +1,51 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify a function called in a guard of an altstep cannot contain a component variable used as an actual inout parameter + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// g) Changing of component variables, i.e. using component variables on the left-hand side of assignments, +// and in the instantiation of out and inout parameters (see notes 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_249 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + var integer vc_int := 0; + } + + function f_inout (inout integer p_inout) { + p_inout := 1; + } + + function f_test() runs on GeneralComp return boolean { + f_inout(vc_int); + return true; + } + + altstep a_rcv() runs on GeneralComp { + [f_test()] p.receive(integer:?) {} + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_249() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(1); + a_rcv(); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_249()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_250.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_250.ttcn new file mode 100644 index 00000000..260147f7 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_250.ttcn @@ -0,0 +1,44 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the setverdict operation cannot be used in guard statements of altstep + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// h) Calling the setverdict operation (see notes 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_250 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return boolean { + setverdict(pass); + return true; + } + + altstep a_rcv() runs on GeneralComp { + [f_test()] p.receive(integer:?) {} + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_250() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(1); + a_rcv(); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_250()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_251.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_251.ttcn new file mode 100644 index 00000000..40422105 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_251.ttcn @@ -0,0 +1,49 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the activate operation cannot be used in guards of altsteps + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// i) Activation and deactivation of defaults, i.e. the activate and deactivate statements (see notes 5 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_251 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + altstep a_anyTimer() runs on GeneralComp { + [] any timer.timeout {} + } + + function f_test() runs on GeneralComp return boolean { + activate(a_anyTimer()); + return true; + } + + altstep a_rcv() runs on GeneralComp { + [f_test()] p.receive(integer:?) {} + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_251() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(1); + a_rcv(); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_251()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_252.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_252.ttcn new file mode 100644 index 00000000..33144275 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_252.ttcn @@ -0,0 +1,50 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the deactivate operation cannot be used in guards of altsteps + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// i) Activation and deactivation of defaults, i.e. the activate and deactivate statements (see notes 5 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_252 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + altstep a_anyTimer() runs on GeneralComp { + [] any timer.timeout {} + } + + function f_test() runs on GeneralComp return boolean { + deactivate; + return true; + } + + altstep a_rcv() runs on GeneralComp { + [f_test()] p.receive(integer:?) {} + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_252() runs on GeneralComp system GeneralComp { + activate(a_anyTimer()); + connect(mtc:p, mtc:p); + p.send(1); + a_rcv(); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_252()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_253.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_253.ttcn new file mode 100644 index 00000000..4ff207e7 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_253.ttcn @@ -0,0 +1,46 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that a function called from a guard statement of an altstep cannot contain out parameters + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// j) Calling functions and deterministic external functions with out or inout parameters (see notes 7 and 8). + +module NegSem_160104_invoking_functions_from_specific_places_253 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + function f_test(out integer p_par) runs on GeneralComp return boolean { + p_par := 1; + return true; + } + + altstep a_rcv() runs on GeneralComp { + var integer v_int := 0; + [f_test(v_int)] p.receive(integer:?) {} + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_253() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(1); + a_rcv(); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_253()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_254.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_254.ttcn new file mode 100644 index 00000000..b3d8eb00 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_254.ttcn @@ -0,0 +1,46 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that a function called from a guard statement of an altstep cannot contain inout parameters + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// j) Calling functions and deterministic external functions with out or inout parameters (see notes 7 and 8). + +module NegSem_160104_invoking_functions_from_specific_places_254 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + function f_test(inout integer p_par) runs on GeneralComp return boolean { + p_par := 1; + return true; + } + + altstep a_rcv() runs on GeneralComp { + var integer v_int := 0; + [f_test(v_int)] p.receive(integer:?) {} + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_254() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(1); + a_rcv(); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_254()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_255.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_255.ttcn new file mode 100644 index 00000000..b77c0a0c --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_255.ttcn @@ -0,0 +1,47 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the create operation cannot be used in altstep local definitions + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// a) All component operations, i.e. create, start (component), stop (component), kill, running (component), +// alive, done and killed (see notes 1, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_255 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + function f_test() return boolean { + var GeneralComp v_ptc := GeneralComp.create; + return true; + } + + altstep a_rcv() runs on GeneralComp { + var boolean v_guard := f_test(); + [v_guard] p.receive(integer:?) {} + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_255() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(1); + a_rcv(); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_255()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_256.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_256.ttcn new file mode 100644 index 00000000..aa825bed --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_256.ttcn @@ -0,0 +1,52 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the component.start operation cannot be used in altstep local definitions + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// a) All component operations, i.e. create, start (component), stop (component), kill, running (component), +// alive, done and killed (see notes 1, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_256 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + function f_ptcBehaviour() runs on GeneralComp { + log("PTC running"); + } + + function f_test(GeneralComp p_ptc) return boolean { + p_ptc.start(f_ptcBehaviour()); + return true; + } + + altstep a_rcv(GeneralComp p_ptc) runs on GeneralComp { + var boolean v_guard := f_test(p_ptc); + [v_guard] p.receive(integer:?) {} + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_256() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + connect(mtc:p, mtc:p); + p.send(1); + a_rcv(v_ptc); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_256()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_257.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_257.ttcn new file mode 100644 index 00000000..75a00c48 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_257.ttcn @@ -0,0 +1,55 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the component.stop operation cannot be used in altstep local definitions + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// a) All component operations, i.e. create, start (component), stop (component), kill, running (component), +// alive, done and killed (see notes 1, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_257 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + function f_ptcBehaviour() runs on GeneralComp { + timer t_tmr := 10.0; + t_tmr.start; + t_tmr.timeout; + } + + function f_test(GeneralComp p_ptc) return boolean { + p_ptc.stop; + return true; + } + + altstep a_rcv(GeneralComp p_ptc) runs on GeneralComp { + var boolean v_guard := f_test(p_ptc); + [v_guard] p.receive(integer:?) {} + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_257() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + v_ptc.start(f_ptcBehaviour()); + connect(mtc:p, mtc:p); + p.send(1); + a_rcv(v_ptc); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_257()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_258.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_258.ttcn new file mode 100644 index 00000000..e50bcf95 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_258.ttcn @@ -0,0 +1,55 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the kill operation cannot be used in altstep local definitions + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// a) All component operations, i.e. create, start (component), stop (component), kill, running (component), +// alive, done and killed (see notes 1, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_258 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + function f_ptcBehaviour() runs on GeneralComp { + timer t_tmr := 10.0; + t_tmr.start; + t_tmr.timeout; + } + + function f_test(GeneralComp p_ptc) return boolean { + p_ptc.kill; + return true; + } + + altstep a_rcv(GeneralComp p_ptc) runs on GeneralComp { + var boolean v_guard := f_test(p_ptc); + [v_guard] p.receive(integer:?) {} + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_258() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + v_ptc.start(f_ptcBehaviour()); + connect(mtc:p, mtc:p); + p.send(1); + a_rcv(v_ptc); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_258()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_259.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_259.ttcn new file mode 100644 index 00000000..aa7d647c --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_259.ttcn @@ -0,0 +1,55 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the component.running operation cannot be used in altstep local definitions + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// a) All component operations, i.e. create, start (component), stop (component), kill, running (component), +// alive, done and killed (see notes 1, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_259 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + function f_ptcBehaviour() runs on GeneralComp { + timer t_tmr := 10.0; + t_tmr.start; + t_tmr.timeout; + } + + function f_test(GeneralComp p_ptc) return boolean { + if (p_ptc.running) { return true; } + else { return false; } + } + + altstep a_rcv(GeneralComp p_ptc) runs on GeneralComp { + var boolean v_guard := f_test(p_ptc); + [v_guard] p.receive(integer:?) {} + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_259() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + v_ptc.start(f_ptcBehaviour()); + connect(mtc:p, mtc:p); + p.send(1); + a_rcv(v_ptc); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_259()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_260.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_260.ttcn new file mode 100644 index 00000000..2840f3d6 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_260.ttcn @@ -0,0 +1,55 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the alive operation cannot be used in altstep local definitions + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// a) All component operations, i.e. create, start (component), stop (component), kill, running (component), +// alive, done and killed (see notes 1, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_260 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + function f_ptcBehaviour() runs on GeneralComp { + timer t_tmr := 10.0; + t_tmr.start; + t_tmr.timeout; + } + + function f_test(GeneralComp p_ptc) return boolean { + if (p_ptc.alive) { return true; } + else { return false; } + } + + altstep a_rcv(GeneralComp p_ptc) runs on GeneralComp { + var boolean v_guard := f_test(p_ptc); + [v_guard] p.receive(integer:?) {} + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_260() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + v_ptc.start(f_ptcBehaviour()); + connect(mtc:p, mtc:p); + p.send(1); + a_rcv(v_ptc); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_260()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_261.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_261.ttcn new file mode 100644 index 00000000..3ff9b7c2 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_261.ttcn @@ -0,0 +1,52 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the done operation cannot be used in altstep local definitions + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// a) All component operations, i.e. create, start (component), stop (component), kill, running (component), +// alive, done and killed (see notes 1, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_261 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + function f_ptcBehaviour() runs on GeneralComp { + } + + function f_test(GeneralComp p_ptc) return boolean { + p_ptc.done; + return true; + } + + altstep a_rcv(GeneralComp p_ptc) runs on GeneralComp { + var boolean v_guard := f_test(p_ptc); + [v_guard] p.receive(integer:?) {} + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_261() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + v_ptc.start(f_ptcBehaviour()); + connect(mtc:p, mtc:p); + p.send(1); + a_rcv(v_ptc); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_261()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_262.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_262.ttcn new file mode 100644 index 00000000..9b0c9d6c --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_262.ttcn @@ -0,0 +1,52 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the killed operation cannot be used in altstep local definitions + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// a) All component operations, i.e. create, start (component), stop (component), kill, running (component), +// alive, done and killed (see notes 1, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_262 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + function f_ptcBehaviour() runs on GeneralComp { + } + + function f_test(GeneralComp p_ptc) return boolean { + p_ptc.killed; + return true; + } + + altstep a_rcv(GeneralComp p_ptc) runs on GeneralComp { + var boolean v_guard := f_test(p_ptc); + [v_guard] p.receive(integer:?) {} + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_262() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + v_ptc.start(f_ptcBehaviour()); + connect(mtc:p, mtc:p); + p.send(1); + a_rcv(v_ptc); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_262()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_263.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_263.ttcn new file mode 100644 index 00000000..b5b1ab2e --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_263.ttcn @@ -0,0 +1,52 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the port.start operation cannot be used in altstep local definitions + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_263 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return boolean { + p.start; + return true; + } + + altstep a_rcv() runs on GeneralComp { + var boolean v_guard := f_test(); + [v_guard] p.receive(integer:?) {} + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_263() runs on GeneralComp system GeneralComp { + timer t_tmr := 0.1; + t_tmr.start; + connect(mtc:p, mtc:p); + p.send(1); + alt { + [] a_rcv() {} + [] t_tmr.timeout {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_263()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_264.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_264.ttcn new file mode 100644 index 00000000..33c6d872 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_264.ttcn @@ -0,0 +1,52 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the port.stop operation cannot be used in altstep local definitions + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_013 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return boolean { + p.stop; + return true; + } + + altstep a_rcv() runs on GeneralComp { + var boolean v_guard := f_test(); + [v_guard] p.receive(integer:?) {} + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_013() runs on GeneralComp system GeneralComp { + timer t_tmr := 0.1; + t_tmr.start; + connect(mtc:p, mtc:p); + p.send(1); + alt { + [] a_rcv() {} + [] t_tmr.timeout {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_013()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_265.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_265.ttcn new file mode 100644 index 00000000..f4cefb32 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_265.ttcn @@ -0,0 +1,52 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the halt operation cannot be used in altstep local definitions + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_265 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return boolean { + p.halt; + return true; + } + + altstep a_rcv() runs on GeneralComp { + var boolean v_guard := f_test(); + [v_guard] p.receive(integer:?) {} + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_265() runs on GeneralComp system GeneralComp { + timer t_tmr := 0.1; + t_tmr.start; + connect(mtc:p, mtc:p); + p.send(1); + alt { + [] a_rcv() {} + [] t_tmr.timeout {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_265()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_266.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_266.ttcn new file mode 100644 index 00000000..33253c93 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_266.ttcn @@ -0,0 +1,52 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the clear operation cannot be used in altstep local definitions + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_266 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return boolean { + p.clear; + return true; + } + + altstep a_rcv() runs on GeneralComp { + var boolean v_guard := f_test(); + [v_guard] p.receive(integer:?) {} + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_266() runs on GeneralComp system GeneralComp { + timer t_tmr := 0.1; + t_tmr.start; + connect(mtc:p, mtc:p); + p.send(1); + alt { + [] a_rcv() {} + [] t_tmr.timeout {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_266()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_267.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_267.ttcn new file mode 100644 index 00000000..05ca811a --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_267.ttcn @@ -0,0 +1,47 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the checkstate operation cannot be used in altstep local definitions + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_267 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return boolean { + if (p.checkstate("Started")) { return true; } + else { return false; } + } + + altstep a_rcv() runs on GeneralComp { + var boolean v_guard := f_test(); + [v_guard] p.receive(integer:?) {} + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_267() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(1); + a_rcv(); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_267()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_268.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_268.ttcn new file mode 100644 index 00000000..9cfbbc97 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_268.ttcn @@ -0,0 +1,47 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the send operation cannot be used in altstep local definitions + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_268 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return boolean { + p.send(2); + return true; + } + + altstep a_rcv() runs on GeneralComp { + var boolean v_guard := f_test(); + [v_guard] p.receive(integer:?) {} + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_268() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(1); + a_rcv(); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_268()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_269.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_269.ttcn new file mode 100644 index 00000000..ea62c029 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_269.ttcn @@ -0,0 +1,48 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the receive operation cannot be used in altstep local definitions + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_269 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return boolean { + p.receive(integer:?); + return true; + } + + altstep a_rcv() runs on GeneralComp { + var boolean v_guard := f_test(); + [v_guard] p.receive(integer:?) {} + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_269() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(1); + p.send(1); + a_rcv(); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_269()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_270.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_270.ttcn new file mode 100644 index 00000000..6e4f84a6 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_270.ttcn @@ -0,0 +1,48 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the trigger operation cannot be used in altstep local definitions + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_270 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return boolean { + p.trigger(integer:?); + return true; + } + + altstep a_rcv() runs on GeneralComp { + var boolean v_guard := f_test(); + [v_guard] p.receive(integer:?) {} + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_270() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(1); + p.send(1); + a_rcv(); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_270()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_271.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_271.ttcn new file mode 100644 index 00000000..f79d78c0 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_271.ttcn @@ -0,0 +1,56 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the call operation cannot be used in altstep local definitions + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_271 { + type port P message { + inout integer; + } + + signature S(); + + type port PSig procedure { + inout S; + } + + type component GeneralComp { + port P p; + port PSig psig; + } + + function f_test() runs on GeneralComp return boolean { + psig.call(S:{}, nowait); + return true; + } + + altstep a_rcv() runs on GeneralComp { + var boolean v_guard := f_test(); + [v_guard] p.receive(integer:?) {} + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_271() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + connect(mtc:p, mtc:p); + connect(mtc:psig, v_ptc:psig); + p.send(1); + a_rcv(); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_271()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_272.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_272.ttcn new file mode 100644 index 00000000..400b7272 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_272.ttcn @@ -0,0 +1,61 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the getcall operation cannot be used in altstep local definitions + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_272 { + type port P message { + inout integer; + } + + signature S(); + + type port PSig procedure { + inout S; + } + + type component GeneralComp { + port P p; + port PSig psig; + } + + function f_ptcBehaviour() runs on GeneralComp { + psig.call(S:{}, nowait); + } + + function f_test() runs on GeneralComp return boolean { + psig.getcall(S:?); + return true; + } + + altstep a_rcv() runs on GeneralComp { + var boolean v_guard := f_test(); + [v_guard] p.receive(integer:?) {} + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_272() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + connect(mtc:p, mtc:p); + connect(mtc:psig, v_ptc:psig); + v_ptc.start(f_ptcBehaviour()); + p.send(1); + a_rcv(); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_272()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_273.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_273.ttcn new file mode 100644 index 00000000..3f637a75 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_273.ttcn @@ -0,0 +1,62 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the reply operation cannot be used in altstep local definitions + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_273 { + type port P message { + inout integer; + } + + signature S(); + + type port PSig procedure { + inout S; + } + + type component GeneralComp { + port P p; + port PSig psig; + } + + function f_ptcBehaviour() runs on GeneralComp { + psig.call(S:{}, nowait); + } + + function f_test() runs on GeneralComp return boolean { + psig.reply(S:{}); + return true; + } + + altstep a_rcv() runs on GeneralComp { + var boolean v_guard := f_test(); + [v_guard] p.receive(integer:?) {} + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_273() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + connect(mtc:p, mtc:p); + connect(mtc:psig, v_ptc:psig); + v_ptc.start(f_ptcBehaviour()); + p.send(1); + psig.getcall(S:?); + a_rcv(); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_273()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_274.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_274.ttcn new file mode 100644 index 00000000..1aedc651 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_274.ttcn @@ -0,0 +1,63 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the getreply operation cannot be used in altstep local definitions + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_274 { + type port P message { + inout integer; + } + + signature S(); + + type port PSig procedure { + inout S; + } + + type component GeneralComp { + port P p; + port PSig psig; + } + + function f_ptcBehaviour() runs on GeneralComp { + psig.getcall(S:?); + psig.reply(S:{}); + } + + function f_test() runs on GeneralComp return boolean { + psig.getreply(S:?); + return true; + } + + altstep a_rcv() runs on GeneralComp { + var boolean v_guard := f_test(); + [v_guard] p.receive(integer:?) {} + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_274() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + connect(mtc:p, mtc:p); + connect(mtc:psig, v_ptc:psig); + v_ptc.start(f_ptcBehaviour()); + psig.call(S:{}, nowait); + p.send(1); + a_rcv(); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_274()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_275.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_275.ttcn new file mode 100644 index 00000000..c6ff22bc --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_275.ttcn @@ -0,0 +1,62 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the raise operation cannot be used in altstep local definitions + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_275 { + type port P message { + inout integer; + } + + signature S() exception (charstring); + + type port PSig procedure { + inout S; + } + + type component GeneralComp { + port P p; + port PSig psig; + } + + function f_ptcBehaviour() runs on GeneralComp { + psig.call(S:{}, nowait); + } + + function f_test() runs on GeneralComp return boolean { + psig.raise(S, "UserException"); + return true; + } + + altstep a_rcv() runs on GeneralComp { + var boolean v_guard := f_test(); + [v_guard] p.receive(integer:?) {} + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_275() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + connect(mtc:p, mtc:p); + connect(mtc:psig, v_ptc:psig); + v_ptc.start(f_ptcBehaviour()); + p.send(1); + psig.getcall(S:?); + a_rcv(); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_275()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_276.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_276.ttcn new file mode 100644 index 00000000..b20474ca --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_276.ttcn @@ -0,0 +1,63 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the catch operation cannot be used in altstep local definitions + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_276 { + type port P message { + inout integer; + } + + signature S() exception (charstring); + + type port PSig procedure { + inout S; + } + + type component GeneralComp { + port P p; + port PSig psig; + } + + function f_ptcBehaviour() runs on GeneralComp { + psig.getcall(S:?); + psig.raise(S, "UserException"); + } + + function f_test() runs on GeneralComp return boolean { + psig.catch(S, charstring:?); + return true; + } + + altstep a_rcv() runs on GeneralComp { + var boolean v_guard := f_test(); + [v_guard] p.receive(integer:?) {} + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_276() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + connect(mtc:p, mtc:p); + connect(mtc:psig, v_ptc:psig); + v_ptc.start(f_ptcBehaviour()); + psig.call(S:{}, nowait); + p.send(1); + a_rcv(); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_276()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_277.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_277.ttcn new file mode 100644 index 00000000..b07fda46 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_277.ttcn @@ -0,0 +1,47 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the check operation cannot be used in altstep local definitions + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_277 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return boolean { + p.check; + return true; + } + + altstep a_rcv() runs on GeneralComp { + var boolean v_guard := f_test(); + [v_guard] p.receive(integer:?) {} + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_277() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(1); + a_rcv(); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_277()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_278.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_278.ttcn new file mode 100644 index 00000000..14c9eab8 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_278.ttcn @@ -0,0 +1,47 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the connect operation cannot be used in altstep local definitions + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_278 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return boolean { + connect(mtc:p, mtc:p); + return true; + } + + altstep a_rcv() runs on GeneralComp { + var boolean v_guard := f_test(); + [v_guard] p.receive(integer:?) {} + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_278() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(1); + a_rcv(); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_278()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_279.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_279.ttcn new file mode 100644 index 00000000..802c00de --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_279.ttcn @@ -0,0 +1,47 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the disconnect operation cannot be used in altstep local definitions + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_279 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return boolean { + disconnect(mtc:p, mtc:p); + return true; + } + + altstep a_rcv() runs on GeneralComp { + var boolean v_guard := f_test(); + [v_guard] p.receive(integer:?) {} + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_279() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(1); + a_rcv(); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_279()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_280.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_280.ttcn new file mode 100644 index 00000000..a38a021a --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_280.ttcn @@ -0,0 +1,48 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the map operation cannot be used in altstep local definitions + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_280 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp system GeneralComp return boolean { + map(mtc:p, system:p); + return true; + } + + altstep a_rcv() runs on GeneralComp system GeneralComp { + var boolean v_guard := f_test(); + [v_guard] p.receive(integer:?) {} + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_280() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(1); + disconnect(mtc:p, mtc:p); + a_rcv(); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_280()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_281.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_281.ttcn new file mode 100644 index 00000000..9974b52c --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_281.ttcn @@ -0,0 +1,49 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the unmap operation cannot be used in altstep local definitions + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_281 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp system GeneralComp return boolean { + unmap(mtc:p, system:p); + return true; + } + + altstep a_rcv() runs on GeneralComp system GeneralComp { + var boolean v_guard := f_test(); + [v_guard] p.receive(integer:?) {} + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_281() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(1); + disconnect(mtc:p, mtc:p); + map(mtc:p, system:p); + a_rcv(); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_281()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_282.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_282.ttcn new file mode 100644 index 00000000..c4f37b81 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_282.ttcn @@ -0,0 +1,46 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the action operation cannot be used in altstep local definitions + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// c) The action operation (see notes 2 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_282 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return boolean { + action("My action"); + return true; + } + + altstep a_rcv() runs on GeneralComp { + var boolean v_guard := f_test(); + [v_guard] p.receive(integer:?) {} + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_282() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(1); + a_rcv(); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_282()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_283.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_283.ttcn new file mode 100644 index 00000000..739200f1 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_283.ttcn @@ -0,0 +1,47 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the timer.start operation cannot be used in altstep local definitions + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// d) All timer operations, i.e. start (timer), stop (timer), running (timer), read, timeout (see notes 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_283 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + timer tc_tmr := 0.1; + } + + function f_test() runs on GeneralComp return boolean { + tc_tmr.start; + return true; + } + + altstep a_rcv() runs on GeneralComp { + var boolean v_guard := f_test(); + [v_guard] p.receive(integer:?) {} + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_283() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(1); + a_rcv(); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_283()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_284.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_284.ttcn new file mode 100644 index 00000000..ed767a5b --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_284.ttcn @@ -0,0 +1,48 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the timer.stop operation cannot be used in altstep local definitions + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// d) All timer operations, i.e. start (timer), stop (timer), running (timer), read, timeout (see notes 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_284 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + timer tc_tmr := 0.1; + } + + function f_test() runs on GeneralComp return boolean { + tc_tmr.stop; + return true; + } + + altstep a_rcv() runs on GeneralComp { + var boolean v_guard := f_test(); + [v_guard] p.receive(integer:?) {} + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_284() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + tc_tmr.start; + p.send(1); + a_rcv(); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_284()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_285.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_285.ttcn new file mode 100644 index 00000000..12da5c15 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_285.ttcn @@ -0,0 +1,48 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the timer.running operation cannot be used in altstep local definitions + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// d) All timer operations, i.e. start (timer), stop (timer), running (timer), read, timeout (see notes 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_285 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + timer tc_tmr := 5.0; + } + + function f_test() runs on GeneralComp return boolean { + if (tc_tmr.running) { return true; } + else { return false; } + } + + altstep a_rcv() runs on GeneralComp { + var boolean v_guard := f_test(); + [v_guard] p.receive(integer:?) {} + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_285() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + tc_tmr.start; + p.send(1); + a_rcv(); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_285()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_286.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_286.ttcn new file mode 100644 index 00000000..a8ddadab --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_286.ttcn @@ -0,0 +1,48 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the read operation cannot be used in altstep local definitions + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// d) All timer operations, i.e. start (timer), stop (timer), running (timer), read, timeout (see notes 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_286 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + timer tc_tmr := 0.1; + } + + function f_test() runs on GeneralComp return boolean { + if (tc_tmr.read > 0.0) { return true; } + else { return false; } + } + + altstep a_rcv() runs on GeneralComp { + var boolean v_guard := f_test(); + [v_guard] p.receive(integer:?) {} + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_286() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + tc_tmr.start; + p.send(1); + a_rcv(); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_286()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_287.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_287.ttcn new file mode 100644 index 00000000..161a0943 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_287.ttcn @@ -0,0 +1,48 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the timeout operation cannot be used in altstep local definitions + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// d) All timer operations, i.e. start (timer), stop (timer), running (timer), read, timeout (see notes 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_287 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + timer tc_tmr := 0.1; + } + + function f_test() runs on GeneralComp return boolean { + any timer.timeout; + return true; + } + + altstep a_rcv() runs on GeneralComp { + var boolean v_guard := f_test(); + [v_guard] p.receive(integer:?) {} + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_287() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + tc_tmr.start; + p.send(1); + a_rcv(); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_287()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_288.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_288.ttcn new file mode 100644 index 00000000..1c197170 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_288.ttcn @@ -0,0 +1,54 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that a non-deterministic external function call cannot be used in altstep local definitions + ** @verdict pass reject + ** @configuration external_functions + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// e) Calling non-deterministic external functions, i.e. external functions where the resulting values for actual +// inout or out parameters or the return value may differ for different invocations with the same actual in and +// inout parameters (see notes 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_288 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + /** + * @return always true + */ + external function xf_NegSem_160104_invoking_functions_from_specific_places_001() return boolean; + + function f_test() runs on GeneralComp return boolean { + if (xf_NegSem_160104_invoking_functions_from_specific_places_001()) { return true; } + else { return true; } + } + + altstep a_rcv() runs on GeneralComp { + var boolean v_guard := f_test(); + [v_guard] p.receive(integer:?) {} + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_288() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(1); + a_rcv(); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_288()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_289.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_289.ttcn new file mode 100644 index 00000000..baf63e92 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_289.ttcn @@ -0,0 +1,46 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the predefined rnd function cannot be used in altstep local definitions + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// f) Calling the rnd predefined function (see notes 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_289 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return boolean { + if (rnd() > 0.5) { return true; } + else { return true; } + } + + altstep a_rcv() runs on GeneralComp { + var boolean v_guard := f_test(); + [v_guard] p.receive(integer:?) {} + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_289() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(1); + a_rcv(); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_289()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_290.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_290.ttcn new file mode 100644 index 00000000..12f943cd --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_290.ttcn @@ -0,0 +1,48 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify a function called in an altstep local definition cannot contain an assignment of a component variable + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// g) Changing of component variables, i.e. using component variables on the left-hand side of assignments, +// and in the instantiation of out and inout parameters (see notes 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_290 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + var integer vc_int; + } + + function f_test() runs on GeneralComp return boolean { + vc_int := 1; + return true; + } + + altstep a_rcv() runs on GeneralComp { + var boolean v_guard := f_test(); + [v_guard] p.receive(integer:?) {} + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_290() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(1); + a_rcv(); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_290()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_291.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_291.ttcn new file mode 100644 index 00000000..4612c05d --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_291.ttcn @@ -0,0 +1,52 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify a function called in an altstep local definition cannot contain a component variable used as an actual out parameter + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// g) Changing of component variables, i.e. using component variables on the left-hand side of assignments, +// and in the instantiation of out and inout parameters (see notes 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_291 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + var integer vc_int; + } + + function f_out (out integer p_out) { + p_out := 1; + } + + function f_test() runs on GeneralComp return boolean { + f_out(vc_int); + return true; + } + + altstep a_rcv() runs on GeneralComp { + var boolean v_guard := f_test(); + [v_guard] p.receive(integer:?) {} + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_291() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(1); + a_rcv(); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_291()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_292.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_292.ttcn new file mode 100644 index 00000000..e8babbe5 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_292.ttcn @@ -0,0 +1,52 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify a function called in an altstep local definition cannot contain a component variable used as an actual inout parameter + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// g) Changing of component variables, i.e. using component variables on the left-hand side of assignments, +// and in the instantiation of out and inout parameters (see notes 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_292 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + var integer vc_int := 0; + } + + function f_inout (inout integer p_inout) { + p_inout := 1; + } + + function f_test() runs on GeneralComp return boolean { + f_inout(vc_int); + return true; + } + + altstep a_rcv() runs on GeneralComp { + var boolean v_guard := f_test(); + [v_guard] p.receive(integer:?) {} + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_292() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(1); + a_rcv(); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_292()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_293.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_293.ttcn new file mode 100644 index 00000000..f34be5b5 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_293.ttcn @@ -0,0 +1,45 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the setverdict operation cannot be used in guard statements of altstep + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// h) Calling the setverdict operation (see notes 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_293 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return boolean { + setverdict(pass); + return true; + } + + altstep a_rcv() runs on GeneralComp { + var boolean v_guard := f_test(); + [v_guard] p.receive(integer:?) {} + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_293() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(1); + a_rcv(); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_293()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_294.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_294.ttcn new file mode 100644 index 00000000..be7cec73 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_294.ttcn @@ -0,0 +1,50 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the activate operation cannot be used in altstep local definitions + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// i) Activation and deactivation of defaults, i.e. the activate and deactivate statements (see notes 5 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_294 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + altstep a_anyTimer() runs on GeneralComp { + [] any timer.timeout {} + } + + function f_test() runs on GeneralComp return boolean { + activate(a_anyTimer()); + return true; + } + + altstep a_rcv() runs on GeneralComp { + var boolean v_guard := f_test(); + [v_guard] p.receive(integer:?) {} + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_294() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(1); + a_rcv(); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_294()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_295.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_295.ttcn new file mode 100644 index 00000000..8015874c --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_295.ttcn @@ -0,0 +1,51 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the deactivate operation cannot be used in altstep local definitions + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// i) Activation and deactivation of defaults, i.e. the activate and deactivate statements (see notes 5 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_295 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + altstep a_anyTimer() runs on GeneralComp { + [] any timer.timeout {} + } + + function f_test() runs on GeneralComp return boolean { + deactivate; + return true; + } + + altstep a_rcv() runs on GeneralComp { + var boolean v_guard := f_test(); + [v_guard] p.receive(integer:?) {} + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_295() runs on GeneralComp system GeneralComp { + activate(a_anyTimer()); + connect(mtc:p, mtc:p); + p.send(1); + a_rcv(); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_295()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_296.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_296.ttcn new file mode 100644 index 00000000..5665a8c8 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_296.ttcn @@ -0,0 +1,47 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that a function called in altstep local definitions cannot contain out parameters + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// j) Calling functions and deterministic external functions with out or inout parameters (see notes 7 and 8). + +module NegSem_160104_invoking_functions_from_specific_places_296 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + function f_test(out integer p_par) runs on GeneralComp return boolean { + p_par := 1; + return true; + } + + altstep a_rcv() runs on GeneralComp { + var integer v_int := 0; + var boolean v_guard := f_test(v_int); + [v_guard] p.receive(integer:?) {} + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_296() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(1); + a_rcv(); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_296()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_297.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_297.ttcn new file mode 100644 index 00000000..d05afbe8 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_297.ttcn @@ -0,0 +1,47 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that a function called in altstep local definitions cannot contain inout parameters + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// j) Calling functions and deterministic external functions with out or inout parameters (see notes 7 and 8). + +module NegSem_160104_invoking_functions_from_specific_places_297 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + function f_test(inout integer p_par) runs on GeneralComp return boolean { + p_par := 1; + return true; + } + + altstep a_rcv() runs on GeneralComp { + var integer v_int := 0; + var boolean v_guard := f_test(v_int); + [v_guard] p.receive(integer:?) {} + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_297() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(1); + a_rcv(); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_297()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_298.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_298.ttcn new file mode 100644 index 00000000..354ac323 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_298.ttcn @@ -0,0 +1,46 @@ +/*************************************************** + ** @author STF 548 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that a function called during receiving operation cannot contain fuzzy parameters (in templates) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// k) Calling functions and external functions with @fuzzy formal parameters and variables (see notes 4 and 9). + +module NegSem_160104_invoking_functions_from_specific_places_298 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + function f_test(@fuzzy integer p_par) return template integer { + return (0..p_par); + } + + function f_eval() return integer { + return 10; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_298() runs on GeneralComp system GeneralComp { + var @fuzzy integer v_int := f_eval(); + template @fuzzy integer mw_test := f_test(v_int); + connect(mtc:p, mtc:p); + p.send(1); + p.receive(mw_test); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_298()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_299.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_299.ttcn new file mode 100644 index 00000000..ba03b665 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_299.ttcn @@ -0,0 +1,44 @@ +/*************************************************** + ** @author STF 548 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that an external function called during receiving operation cannot contain fuzzy parameters (in templates) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// k) Calling functions and external functions with @fuzzy formal parameters and variables (see notes 4 and 9). + +module NegSem_160104_invoking_functions_from_specific_places_299 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + external function @deterministic f_test(@fuzzy integer p_par) return template integer; + + function f_eval() return integer { + return 10; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_299() runs on GeneralComp system GeneralComp { + var @fuzzy integer v_int := f_eval(); + template @fuzzy integer mw_test := f_test(v_int); + connect(mtc:p, mtc:p); + p.send(1); + p.receive(mw_test); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_299()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_300.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_300.ttcn new file mode 100644 index 00000000..a5701547 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_300.ttcn @@ -0,0 +1,46 @@ +/*************************************************** + ** @author STF 548 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that a function called during receiving operation cannot contain fuzzy variables (in templates) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// k) Calling functions and external functions with @fuzzy formal parameters and variables (see notes 4 and 9). + +module NegSem_160104_invoking_functions_from_specific_places_300 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + function f_test() return template integer { + var @fuzzy integer v_int := f_eval(); + return (0..v_int); + } + + function f_eval() return integer { + return 100; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_300() runs on GeneralComp system GeneralComp { + template @fuzzy integer mw_test := f_test(); + connect(mtc:p, mtc:p); + p.send(1); + p.receive(mw_test); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_300()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_301.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_301.ttcn new file mode 100644 index 00000000..24a50869 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_301.ttcn @@ -0,0 +1,42 @@ +/*************************************************** + ** @author STF 548 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that a function called during receiving operation cannot contain the setencode operation (in templates) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// l) The setencode operation (see note 8 and clause 27.9). + +module NegSem_160104_invoking_functions_from_specific_places_301 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return template integer { + p.setencode(integer, "Binary"); + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_301() runs on GeneralComp system GeneralComp { + template @fuzzy integer mw_test := f_test(); + connect(mtc:p, mtc:p); + p.send(1); + p.receive(mw_test); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_301()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_302.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_302.ttcn new file mode 100644 index 00000000..2442776e --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_302.ttcn @@ -0,0 +1,50 @@ +/*************************************************** + ** @author STF 548 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that a function called during receiving operation cannot contain fuzzy parameters (in template fields) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// k) Calling functions and external functions with @fuzzy formal parameters and variables (see notes 4 and 9). + +module NegSem_160104_invoking_functions_from_specific_places_302 { + type record R { + integer field1 + } + + type port P message { + inout R; + } + + type component GeneralComp { + port P p; + } + + function f_test(@fuzzy integer p_par) return template integer { + return (0..p_par); + } + + function f_eval() return integer { + return 10; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_302() runs on GeneralComp system GeneralComp { + var @fuzzy integer v_int := f_eval(); + template @fuzzy R mw_test := { field1 := f_test(v_int) }; + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + p.receive(mw_test); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_302()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_303.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_303.ttcn new file mode 100644 index 00000000..8ba6165e --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_303.ttcn @@ -0,0 +1,48 @@ +/*************************************************** + ** @author STF 548 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that an external function called during receiving operation cannot contain fuzzy parameters (in template fields) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// k) Calling functions and external functions with @fuzzy formal parameters and variables (see notes 4 and 9). + +module NegSem_160104_invoking_functions_from_specific_places_303 { + type record R { + integer field1 + } + + type port P message { + inout R; + } + + type component GeneralComp { + port P p; + } + + external function @deterministic f_test(@fuzzy integer p_par) return template integer; + + function f_eval() return integer { + return 10; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_303() runs on GeneralComp system GeneralComp { + var @fuzzy integer v_int := f_eval(); + template @fuzzy R mw_test := { field1 := f_test(v_int) }; + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + p.receive(mw_test); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_303()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_304.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_304.ttcn new file mode 100644 index 00000000..b4801837 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_304.ttcn @@ -0,0 +1,50 @@ +/*************************************************** + ** @author STF 548 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that a function called during receiving operation cannot contain fuzzy variables (in template fields) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// k) Calling functions and external functions with @fuzzy formal parameters and variables (see notes 4 and 9). + +module NegSem_160104_invoking_functions_from_specific_places_304 { + type record R { + integer field1 + } + + type port P message { + inout R; + } + + type component GeneralComp { + port P p; + } + + function f_test() return template integer { + var @fuzzy integer v_int := f_eval(); + return (0..v_int); + } + + function f_eval() return integer { + return 100; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_304() runs on GeneralComp system GeneralComp { + template @fuzzy R mw_test := { field1 := f_test() }; + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + p.receive(mw_test); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_304()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_305.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_305.ttcn new file mode 100644 index 00000000..2959af7c --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_305.ttcn @@ -0,0 +1,46 @@ +/*************************************************** + ** @author STF 548 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that a function called during receiving operation cannot contain the setencode operation (in template fields) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// l) The setencode operation (see note 8 and clause 27.9). + +module NegSem_160104_invoking_functions_from_specific_places_305 { + type record R { + integer field1 + } + + type port P message { + inout R; + } + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return template integer { + p.setencode(R, "Binary"); + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_305() runs on GeneralComp system GeneralComp { + template @fuzzy R mw_test := { field1 := f_test() }; + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + p.receive(mw_test); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_305()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_306.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_306.ttcn new file mode 100644 index 00000000..f1e7b780 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_306.ttcn @@ -0,0 +1,49 @@ +/*************************************************** + ** @author STF 548 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that a function called during receiving operation cannot contain fuzzy parameters (in in-line templates) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// k) Calling functions and external functions with @fuzzy formal parameters and variables (see notes 4 and 9). + +module NegSem_160104_invoking_functions_from_specific_places_306 { + type record R { + integer field1 + } + + type port P message { + inout R; + } + + type component GeneralComp { + port P p; + } + + function f_test(@fuzzy integer p_par) return template integer { + return (0..p_par); + } + + function f_eval() return integer { + return 10; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_306() runs on GeneralComp system GeneralComp { + var @fuzzy integer v_int := f_eval(); + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + p.receive(R:{ field1 := f_test(v_int) }); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_306()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_307.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_307.ttcn new file mode 100644 index 00000000..20f95c51 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_307.ttcn @@ -0,0 +1,47 @@ +/*************************************************** + ** @author STF 548 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that an external function called during receiving operation cannot contain fuzzy parameters (in in-line templates) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// k) Calling functions and external functions with @fuzzy formal parameters and variables (see notes 4 and 9). + +module NegSem_160104_invoking_functions_from_specific_places_307 { + type record R { + integer field1 + } + + type port P message { + inout R; + } + + type component GeneralComp { + port P p; + } + + external function @deterministic f_test(@fuzzy integer p_par) return template integer; + + function f_eval() return integer { + return 10; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_307() runs on GeneralComp system GeneralComp { + var @fuzzy integer v_int := f_eval(); + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + p.receive(R:{ field1 := f_test(v_int) }); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_307()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_308.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_308.ttcn new file mode 100644 index 00000000..b9a28c04 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_308.ttcn @@ -0,0 +1,49 @@ +/*************************************************** + ** @author STF 548 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that a function called during receiving operation cannot contain fuzzy variables (in in-line templates) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// k) Calling functions and external functions with @fuzzy formal parameters and variables (see notes 4 and 9). + +module NegSem_160104_invoking_functions_from_specific_places_308 { + type record R { + integer field1 + } + + type port P message { + inout R; + } + + type component GeneralComp { + port P p; + } + + function f_test() return template integer { + var @fuzzy integer v_int := f_eval(); + return (0..v_int); + } + + function f_eval() return integer { + return 100; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_308() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + p.receive(R:{ field1 := f_test() }); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_308()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_309.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_309.ttcn new file mode 100644 index 00000000..1e06b9aa --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_309.ttcn @@ -0,0 +1,45 @@ +/*************************************************** + ** @author STF 548 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that a function called during receiving operation cannot contain the setencode operation (in in-line templates) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// l) The setencode operation (see note 8 and clause 27.9). + +module NegSem_160104_invoking_functions_from_specific_places_309 { + type record R { + integer field1 + } + + type port P message { + inout R; + } + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return template integer { + p.setencode(R, "Binary"); + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_309() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + p.receive(R:{ field1 := f_test() }); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_309()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_310.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_310.ttcn new file mode 100644 index 00000000..ebeb59aa --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_310.ttcn @@ -0,0 +1,53 @@ +/*************************************************** + ** @author STF 548 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that a function called during receiving operation cannot contain fuzzy parameters (as actual parameters) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// k) Calling functions and external functions with @fuzzy formal parameters and variables (see notes 4 and 9). + +module NegSem_160104_invoking_functions_from_specific_places_310 { + type record R { + integer field1 + } + + type port P message { + inout R; + } + + type component GeneralComp { + port P p; + } + + function f_test(@fuzzy integer p_par) return template integer { + return (0..p_par); + } + + function f_eval() return integer { + return 10; + } + + template R m_msg (template integer p_par) := { + field1 := p_par + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_310() runs on GeneralComp system GeneralComp { + var @fuzzy integer v_int := f_eval(); + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + p.receive(m_msg(f_test(v_int))); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_310()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_311.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_311.ttcn new file mode 100644 index 00000000..57c30b75 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_311.ttcn @@ -0,0 +1,51 @@ +/*************************************************** + ** @author STF 548 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that an external function called during receiving operation cannot contain fuzzy parameters (as actual parameters) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// k) Calling functions and external functions with @fuzzy formal parameters and variables (see notes 4 and 9). + +module NegSem_160104_invoking_functions_from_specific_places_311 { + type record R { + integer field1 + } + + type port P message { + inout R; + } + + type component GeneralComp { + port P p; + } + + external function @deterministic f_test(@fuzzy integer p_par) return template integer; + + function f_eval() return integer { + return 10; + } + + template R m_msg (template integer p_par) := { + field1 := p_par + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_311() runs on GeneralComp system GeneralComp { + var @fuzzy integer v_int := f_eval(); + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + p.receive(m_msg(f_test(v_int))); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_311()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_312.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_312.ttcn new file mode 100644 index 00000000..554714b6 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_312.ttcn @@ -0,0 +1,53 @@ +/*************************************************** + ** @author STF 548 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that a function called during receiving operation cannot contain fuzzy variables (as actual parameters) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// k) Calling functions and external functions with @fuzzy formal parameters and variables (see notes 4 and 9). + +module NegSem_160104_invoking_functions_from_specific_places_312 { + type record R { + integer field1 + } + + type port P message { + inout R; + } + + type component GeneralComp { + port P p; + } + + function f_test() return template integer { + var @fuzzy integer v_int := f_eval(); + return (0..v_int); + } + + function f_eval() return integer { + return 100; + } + + template R m_msg (template integer p_par) := { + field1 := p_par + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_312() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + p.receive(m_msg(f_test())); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_312()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_313.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_313.ttcn new file mode 100644 index 00000000..96618942 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_313.ttcn @@ -0,0 +1,49 @@ +/*************************************************** + ** @author STF 548 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that a function called during receiving operation cannot contain the setencode operation (as actual parameters) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// l) The setencode operation (see note 8 and clause 27.9). + +module NegSem_160104_invoking_functions_from_specific_places_313 { + type record R { + integer field1 + } + + type port P message { + inout R; + } + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return template integer { + p.setencode(R, "Binary"); + return ?; + } + + template R m_msg (template integer p_par) := { + field1 := p_par + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_313() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + p.receive(m_msg(f_test())); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_313()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_314.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_314.ttcn new file mode 100644 index 00000000..7f44eff1 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_314.ttcn @@ -0,0 +1,51 @@ +/*************************************************** + ** @author STF 548 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that a function called in guards of alt statements cannot contain fuzzy parameters + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// k) Calling functions and external functions with @fuzzy formal parameters and variables (see notes 4 and 9). + +module NegSem_160104_invoking_functions_from_specific_places_314 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + function f_test(@fuzzy integer p_par) return boolean { + if (p_par > 0) { + return true; + } else { + return false; + } + } + + function f_eval() return integer { + return 10; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_314() runs on GeneralComp system GeneralComp { + var @fuzzy integer v_int := f_eval(); + connect(mtc:p, mtc:p); + p.send(1); + alt { + [f_test(v_int)] p.receive(integer:?) {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_314()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_315.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_315.ttcn new file mode 100644 index 00000000..24a61ddd --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_315.ttcn @@ -0,0 +1,45 @@ +/*************************************************** + ** @author STF 548 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that an external function called in guards of alt statements cannot contain fuzzy parameters + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// k) Calling functions and external functions with @fuzzy formal parameters and variables (see notes 4 and 9). + +module NegSem_160104_invoking_functions_from_specific_places_314 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + external function @deterministic f_test(@fuzzy integer p_par) return boolean; + + function f_eval() return integer { + return 10; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_314() runs on GeneralComp system GeneralComp { + var @fuzzy integer v_int := f_eval(); + connect(mtc:p, mtc:p); + p.send(1); + alt { + [f_test(v_int)] p.receive(integer:?) {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_314()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_316.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_316.ttcn new file mode 100644 index 00000000..f5ea0f78 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_316.ttcn @@ -0,0 +1,51 @@ +/*************************************************** + ** @author STF 548 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that a function called in guards of alt statements cannot contain fuzzy variables + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// k) Calling functions and external functions with @fuzzy formal parameters and variables (see notes 4 and 9). + +module NegSem_160104_invoking_functions_from_specific_places_316 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + function f_test() return boolean { + var @fuzzy integer v_int := f_eval(); + if (v_int > 0) { + return true; + } else { + return false; + } + } + + function f_eval() return integer { + return 100; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_316() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(1); + alt { + [f_test()] p.receive(integer:?) {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_316()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_317.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_317.ttcn new file mode 100644 index 00000000..294c720f --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_317.ttcn @@ -0,0 +1,43 @@ +/*************************************************** + ** @author STF 548 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that a function called in guards of alt statements cannot contain the setencode operation + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// l) The setencode operation (see note 8 and clause 27.9). + +module NegSem_160104_invoking_functions_from_specific_places_317 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return boolean { + p.setencode(integer, "Binary"); + return true; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_317() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(1); + alt { + [f_test()] p.receive(integer:?) {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_317()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_318.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_318.ttcn new file mode 100644 index 00000000..80547e9e --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_318.ttcn @@ -0,0 +1,53 @@ +/*************************************************** + ** @author STF 548 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that a function called in guards of altsteps cannot contain fuzzy parameters + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// k) Calling functions and external functions with @fuzzy formal parameters and variables (see notes 4 and 9). + +module NegSem_160104_invoking_functions_from_specific_places_318 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + var @fuzzy integer v_int := f_eval(); + } + + function f_test(@fuzzy integer p_par) return boolean { + if (p_par > 0) { + return true; + } else { + return false; + } + } + + function f_eval() return integer { + return 10; + } + + altstep a_rcv() runs on GeneralComp { + [f_test(v_int)] p.receive(integer:?) {} + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_318() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(1); + a_rcv(); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_318()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_319.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_319.ttcn new file mode 100644 index 00000000..3079d2b3 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_319.ttcn @@ -0,0 +1,47 @@ +/*************************************************** + ** @author STF 548 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that an external function called in guards of altsteps cannot contain fuzzy parameters + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// k) Calling functions and external functions with @fuzzy formal parameters and variables (see notes 4 and 9). + +module NegSem_160104_invoking_functions_from_specific_places_319 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + var @fuzzy integer v_int := f_eval(); + } + + external function @deterministic f_test(@fuzzy integer p_par) return boolean; + + function f_eval() return integer { + return 10; + } + + altstep a_rcv() runs on GeneralComp { + [f_test(v_int)] p.receive(integer:?) {} + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_319() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(1); + a_rcv(); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_319()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_320.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_320.ttcn new file mode 100644 index 00000000..a227b02d --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_320.ttcn @@ -0,0 +1,53 @@ +/*************************************************** + ** @author STF 548 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that a function called in guards of altsteps cannot contain fuzzy variables + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// k) Calling functions and external functions with @fuzzy formal parameters and variables (see notes 4 and 9). + +module NegSem_160104_invoking_functions_from_specific_places_320 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + function f_test() return boolean { + var @fuzzy integer v_int := f_eval(); + if (v_int > 0) { + return true; + } else { + return false; + } + } + + function f_eval() return integer { + return 100; + } + + altstep a_rcv() runs on GeneralComp { + [f_test()] p.receive(integer:?) {} + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_320() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(1); + a_rcv(); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_320()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_321.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_321.ttcn new file mode 100644 index 00000000..86cf3494 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_321.ttcn @@ -0,0 +1,45 @@ +/*************************************************** + ** @author STF 548 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that a function called in guards of altsteps cannot contain the setencode operation + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// l) The setencode operation (see note 8 and clause 27.9). + +module NegSem_160104_invoking_functions_from_specific_places_321 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return boolean { + p.setencode(integer, "Binary"); + return true; + } + + altstep a_rcv() runs on GeneralComp { + [f_test()] p.receive(integer:?) {} + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_321() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(1); + a_rcv(); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_321()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_322.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_322.ttcn new file mode 100644 index 00000000..9ef12ec3 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_322.ttcn @@ -0,0 +1,54 @@ +/*************************************************** + ** @author STF 548 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that a function called in local definitions of altsteps cannot contain fuzzy parameters + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// k) Calling functions and external functions with @fuzzy formal parameters and variables (see notes 4 and 9). + +module NegSem_160104_invoking_functions_from_specific_places_322 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + var @fuzzy integer v_int := f_eval(); + } + + function f_test(@fuzzy integer p_par) return boolean { + if (p_par > 0) { + return true; + } else { + return false; + } + } + + function f_eval() return integer { + return 10; + } + + altstep a_rcv() runs on GeneralComp { + var boolean v_guard := f_test(v_int); + [v_guard] p.receive(integer:?) {} + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_322() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(1); + a_rcv(); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_322()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_323.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_323.ttcn new file mode 100644 index 00000000..4943d5b5 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_323.ttcn @@ -0,0 +1,48 @@ +/*************************************************** + ** @author STF 548 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that an external function called in local definitions of altsteps cannot contain fuzzy parameters + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// k) Calling functions and external functions with @fuzzy formal parameters and variables (see notes 4 and 9). + +module NegSem_160104_invoking_functions_from_specific_places_323 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + var @fuzzy integer v_int := f_eval(); + } + + external function @deterministic f_test(@fuzzy integer p_par) return boolean; + + function f_eval() return integer { + return 10; + } + + altstep a_rcv() runs on GeneralComp { + var boolean v_guard := f_test(v_int); + [v_guard] p.receive(integer:?) {} + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_323() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(1); + a_rcv(); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_323()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_324.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_324.ttcn new file mode 100644 index 00000000..6e81ac84 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_324.ttcn @@ -0,0 +1,54 @@ +/*************************************************** + ** @author STF 548 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that a function called in local definitions of altsteps cannot contain fuzzy variables + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// k) Calling functions and external functions with @fuzzy formal parameters and variables (see notes 4 and 9). + +module NegSem_160104_invoking_functions_from_specific_places_324 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + function f_test() return boolean { + var @fuzzy integer v_int := f_eval(); + if (v_int > 0) { + return true; + } else { + return false; + } + } + + function f_eval() return integer { + return 100; + } + + altstep a_rcv() runs on GeneralComp { + var boolean v_guard := f_test(); + [v_guard] p.receive(integer:?) {} + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_324() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(1); + a_rcv(); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_324()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_325.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_325.ttcn new file mode 100644 index 00000000..94cce7af --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_325.ttcn @@ -0,0 +1,46 @@ +/*************************************************** + ** @author STF 548 + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that a function called in local definitions of altsteps cannot contain the setencode operation + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// l) The setencode operation (see note 8 and clause 27.9). + +module NegSem_160104_invoking_functions_from_specific_places_325 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return boolean { + p.setencode(integer, "Binary"); + return true; + } + + altstep a_rcv() runs on GeneralComp { + var boolean v_guard := f_test(); + [v_guard] p.receive(integer:?) {} + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_325() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(1); + a_rcv(); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_325()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/1601_toplevel/NegSem_1601_toplevel_001.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/1601_toplevel/NegSem_1601_toplevel_001.ttcn new file mode 100644 index 00000000..0c462acf --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/1601_toplevel/NegSem_1601_toplevel_001.ttcn @@ -0,0 +1,37 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:16.1, Ensure that the IUT correctly handles function definitions + ** @verdict pass reject + ***************************************************/ +module NegSem_1601_toplevel_001 { + + +type component GeneralComp { +} + +function f_test ( integer p_integer := 0 ) return float { + + return p_integer+1; // mismatch between return type and argument type + return p_integer+2; +} + +testcase TC_NegSem_1601_toplevel_001 () runs on GeneralComp { + + if(f_test(1)==2) { + setverdict(pass); + } + else { + setverdict(fail); + } + +} + + +control{ + + execute(TC_NegSem_1601_toplevel_001()); + +} + +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/1601_toplevel/NegSem_1601_toplevel_002.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/1601_toplevel/NegSem_1601_toplevel_002.ttcn new file mode 100644 index 00000000..942557da --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/1601_toplevel/NegSem_1601_toplevel_002.ttcn @@ -0,0 +1,28 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:16.1, Ensure that the IUT correctly handles function definitions + ** @verdict pass reject + ***************************************************/ +module NegSem_1601_toplevel_002 { + +type component GeneralComp { +} + +function f_test ( template octetstring p_ostring ) return octetstring { + return p_ostring; // mismatch between return type and template argument +} + +testcase TC_NegSem_1601_toplevel_002 () runs on GeneralComp { + if( match('FFFFFF'O, f_test('FF??'O)) ) { + setverdict(pass); + } else { + setverdict(fail); + } +} + +control{ + execute(TC_NegSem_1601_toplevel_002()); +} + +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/1601_toplevel/NegSem_1601_toplevel_003.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/1601_toplevel/NegSem_1601_toplevel_003.ttcn new file mode 100644 index 00000000..65c59045 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/1601_toplevel/NegSem_1601_toplevel_003.ttcn @@ -0,0 +1,43 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:16.1, Ensure that the IUT correctly handles function definitions + ** @verdict pass reject + ***************************************************/ +module NegSem_1601_toplevel_003 { + + +type component GeneralComp { + var integer v_comp:=1; +} + +function f_test ( integer p_integer := 0 ) return integer { + + return f_two(p_integer); //against restriction 16.1 / a) +} + +function f_two ( integer p_integer := 0 ) runs on GeneralComp return integer { + + return p_integer+v_comp; +} + + +testcase TC_NegSem_1601_toplevel_003 () runs on GeneralComp { + + if(f_test(1)==2) { + setverdict(pass); + } + else { + setverdict(fail); + } + +} + + +control{ + + execute(TC_NegSem_1601_toplevel_003()); + +} + +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/1601_toplevel/NegSem_1601_toplevel_004.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/1601_toplevel/NegSem_1601_toplevel_004.ttcn new file mode 100644 index 00000000..f227200c --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/1601_toplevel/NegSem_1601_toplevel_004.ttcn @@ -0,0 +1,37 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:16.1, Ensure that the IUT correctly handles function definitions + ** @verdict pass reject + ***************************************************/ +module NegSem_1601_toplevel_004 { + + +type component GeneralComp { +} + +function f_test ( integer p_integer := 0 ) runs on GeneralComp return integer { + + return p_integer+1; +} + +testcase TC_NegSem_1601_toplevel_004 () runs on GeneralComp { + + if(f_test(1)==2) { + setverdict(pass); + } + else { + setverdict(fail); + } + +} + + +control{ + + f_test(1); //attempt to invoke a function with runs on clause + execute(TC_NegSem_1601_toplevel_004()); + +} + +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/1601_toplevel/NegSem_1601_toplevel_005.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/1601_toplevel/NegSem_1601_toplevel_005.ttcn new file mode 100644 index 00000000..965a99f0 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/1601_toplevel/NegSem_1601_toplevel_005.ttcn @@ -0,0 +1,40 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:16.1, Ensure that the IUT correctly handles function definitions + ** @verdict pass reject + ***************************************************/ +module NegSem_1601_toplevel_005 { + + +type component GeneralComp { +} + +function f_test (inout integer p_integer := 10 ) return integer { + if (p_integer > 5) { + p_integer := 5; + return p_integer; + } + // there is no return value if comparison is false + +} + +testcase TC_NegSem_1601_toplevel_005 () runs on GeneralComp { + + if(f_test(2)==2) { + setverdict(pass); + } + else { + setverdict(fail); + } + +} + + +control{ + + execute(TC_NegSem_1601_toplevel_005()); + +} + +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/1601_toplevel/NegSem_1601_toplevel_006.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/1601_toplevel/NegSem_1601_toplevel_006.ttcn new file mode 100644 index 00000000..3f43e8f8 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/1601_toplevel/NegSem_1601_toplevel_006.ttcn @@ -0,0 +1,43 @@ +/*************************************************** + ** @author STF 451 + ** @version 0.0.1 + ** @purpose 1:16.1, Ensure that the IUT correctly handles function definitions + ** @verdict pass reject + ***************************************************/ +module NegSem_1601_toplevel_006 { + + +type component GeneralComp { + var integer v_comp:=1; +} + +function f_test ( integer p_integer := 0 ) runs on GeneralComp return integer { + + return f_two(p_integer); +} + +function f_two ( integer p_integer := 0 ) return integer { + + return p_integer+v_comp; //use of variable from a component but missing 'runs on' clause +} + + +testcase TC_NegSem_1601_toplevel_006 () runs on GeneralComp { + + if(f_test(1)==2) { + setverdict(pass); + } + else { + setverdict(fail); + } + +} + + +control{ + + execute(TC_NegSem_1601_toplevel_006()); + +} + +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/1601_toplevel/Sem_1601_toplevel_001.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/1601_toplevel/Sem_1601_toplevel_001.ttcn new file mode 100644 index 00000000..f59dd7af --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/1601_toplevel/Sem_1601_toplevel_001.ttcn @@ -0,0 +1,37 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:16.1, Ensure that the IUT correctly handles function definitions + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Sem_1601_toplevel_001 { + + +type component GeneralComp { +} + +function f_test ( integer p_integer := 0 ) return integer { + + return p_integer+1; + return p_integer+2; +} + +testcase TC_Sem_1601_toplevel_001 () runs on GeneralComp { + + if(f_test(1)==2) { + setverdict(pass); + } + else { + setverdict(fail); + } + +} + + +control{ + + execute(TC_Sem_1601_toplevel_001()); + +} + +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/1601_toplevel/Sem_1601_toplevel_002.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/1601_toplevel/Sem_1601_toplevel_002.ttcn new file mode 100644 index 00000000..453d11cf --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/1601_toplevel/Sem_1601_toplevel_002.ttcn @@ -0,0 +1,35 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:16.1, Ensure that the IUT correctly handles function definitions + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Sem_1601_toplevel_002 { + + type component GeneralComp { + } + + function f_test ( template octetstring p_ostring ) return template octetstring { + + return p_ostring & p_ostring; + } + + testcase TC_Sem_1601_toplevel_002 () runs on GeneralComp { + + if( match('FFFFFFFF'O, f_test('FF?'O)) ) { + setverdict(pass); + } + else { + setverdict(fail); + } + + } + + + control{ + + execute(TC_Sem_1601_toplevel_002()); + + } + +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/1601_toplevel/Sem_1601_toplevel_003.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/1601_toplevel/Sem_1601_toplevel_003.ttcn new file mode 100644 index 00000000..1fac01f1 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/1601_toplevel/Sem_1601_toplevel_003.ttcn @@ -0,0 +1,43 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:16.1, Ensure that the IUT correctly handles function definitions + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Sem_1601_toplevel_003 { + + +type component GeneralComp { + var integer v_comp:=1; +} + +function f_test ( integer p_integer := 0 ) runs on GeneralComp return integer { + + return f_two(p_integer); +} + +function f_two ( integer p_integer := 0 ) runs on GeneralComp return integer { + + return p_integer+v_comp; +} + + +testcase TC_Sem_1601_toplevel_003 () runs on GeneralComp { + + if(f_test(1)==2) { + setverdict(pass); + } + else { + setverdict(fail); + } + +} + + +control{ + + execute(TC_Sem_1601_toplevel_003()); + +} + +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/160201_invoking_altsteps/NegSem_160201_invoking_altsteps_001.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/160201_invoking_altsteps/NegSem_160201_invoking_altsteps_001.ttcn new file mode 100644 index 00000000..55ca6a1c --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/160201_invoking_altsteps/NegSem_160201_invoking_altsteps_001.ttcn @@ -0,0 +1,66 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:16.2.1, Ensure that the IUT recognizes altstep definitions and correctly evaluates them + ** @verdict pass reject + ***************************************************/ +module NegSem_160201_invoking_altsteps_001 { + + type record MessageType { + integer field1, + charstring field2 + } + + type port loopbackPort message { + inout MessageType + } + + type port simplePort message { + inout integer + } + + type component GeneralComp { + port loopbackPort messagePort + } + + type component AltComp { + port simplePort messagePort + } + + + +altstep AltSet1() runs on AltComp { //incompatible component with GeneralComp + + [] messagePort.receive { + setverdict(pass); + } + +} + +testcase TC_NegSem_160201_invoking_altsteps_001 () runs on GeneralComp { + var MessageType v_testMessage; + timer t_timer; + v_testMessage:= { + field1 := 1, + field2 := "test string" + } + + messagePort.send(v_testMessage); + t_timer.start( 1.0 ); + + alt { + [] AltSet1(); + [] t_timer.timeout { + setverdict(pass); + } + } + +} + +control{ + + execute(TC_NegSem_160201_invoking_altsteps_001()); + +} + +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/160201_invoking_altsteps/Sem_160201_invoking_altsteps_001.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/160201_invoking_altsteps/Sem_160201_invoking_altsteps_001.ttcn new file mode 100644 index 00000000..0c231433 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/160201_invoking_altsteps/Sem_160201_invoking_altsteps_001.ttcn @@ -0,0 +1,58 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:16.2.1, Ensure that the IUT recognizes altstep definitions and correctly evaluates them + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Sem_160201_invoking_altsteps_001 { + + type record MessageType { + integer field1, + charstring field2 + } + + type port loopbackPort message { + inout MessageType + } + + type component GeneralComp { + port loopbackPort messagePort + } + + + +altstep AltSet1() runs on GeneralComp { + + [] messagePort.receive { + setverdict(pass); + } + +} + +testcase TC_Sem_160201_invoking_altsteps_001 () runs on GeneralComp { + var MessageType v_testMessage; + timer t_timer; + v_testMessage:= { + field1 := 1, + field2 := "test string" + } + + messagePort.send(v_testMessage); + t_timer.start( 1.0 ); + + alt { + [] AltSet1(); + [] t_timer.timeout { + setverdict(pass); + } + } + +} + +control{ + + execute(TC_Sem_160201_invoking_altsteps_001()); + +} + +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/160201_invoking_altsteps/Sem_160201_invoking_altsteps_002.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/160201_invoking_altsteps/Sem_160201_invoking_altsteps_002.ttcn new file mode 100644 index 00000000..0de7e7e3 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/160201_invoking_altsteps/Sem_160201_invoking_altsteps_002.ttcn @@ -0,0 +1,67 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:16.2.1, Ensure that the IUT recognizes altstep definitions and correctly evaluates them + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +module Sem_160201_invoking_altsteps_002 { + + type record MessageType { + integer field1, + charstring field2 + } + + type port loopbackPort message { + inout MessageType + } + + type component GeneralComp { + port loopbackPort messagePort + } + + +altstep AltSet1() runs on GeneralComp { + + [] messagePort.check { + setverdict(inconc); + } + +} + +altstep AltSet2() runs on GeneralComp { + + [] messagePort.receive { + setverdict(pass); + } + +} + +testcase TC_Sem_160201_invoking_altsteps_002 () runs on GeneralComp { + var MessageType v_testMessage; + timer t_timer; + v_testMessage:= { + field1 := 1, + field2 := "test string" + } + + messagePort.send(v_testMessage); + t_timer.start( 1.0 ); + + alt { + [] AltSet2(); + [] AltSet1(); //evaluation of sequential altstep activations + [] t_timer.timeout { + setverdict(fail); + } + } + +} + +control{ + + execute(TC_Sem_160201_invoking_altsteps_002()); + +} + +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/160201_invoking_altsteps/Sem_160201_invoking_altsteps_003.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/160201_invoking_altsteps/Sem_160201_invoking_altsteps_003.ttcn new file mode 100644 index 00000000..72cd6cb4 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/160201_invoking_altsteps/Sem_160201_invoking_altsteps_003.ttcn @@ -0,0 +1,58 @@ +/*************************************************** + ** @author STF 451 + ** @version 0.0.1 + ** @purpose 1:16.2.1, Ensure that altsteps are correctly handled for dynamically mapped ports + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// Mycompport A is dynamically mapped +module Sem_160201_invoking_altsteps_003{ + + type port loopbackPort message { + inout integer + } + + type port IntegerOutputPortType message { + inout integer + } + +type component GeneralComp + { + + port IntegerOutputPortType MycomportA + } + +type component MyTestSystemInterface + { + port loopbackPort messagePort + } + +altstep AltStep1() runs on GeneralComp { + + [] MycomportA.receive { + } +} + + +// MyTestSystemInterface is the test system interface +testcase TC_Sem_160201_invoking_altsteps_003() runs on GeneralComp system MyTestSystemInterface { + timer tc_timer := 1.0; + map(mtc:MycomportA, system:messagePort); + + + MycomportA.send(2); + tc_timer.start; + unmap(mtc:MycomportA); + setverdict(pass); + + alt { + [] AltStep1(); + [] tc_timer.timeout { + setverdict(pass); + } + } +} +control{ + execute(TC_Sem_160201_invoking_altsteps_003()); +} +} \ No newline at end of file diff --git a/ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/160201_invoking_altsteps/Sem_160201_invoking_altsteps_004.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/160201_invoking_altsteps/Sem_160201_invoking_altsteps_004.ttcn new file mode 100644 index 00000000..5cdcfdee --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/160201_invoking_altsteps/Sem_160201_invoking_altsteps_004.ttcn @@ -0,0 +1,55 @@ +/*************************************************** + ** @author STF 451 + ** @version 0.0.1 + ** @purpose 1:16.2.1, Ensure that altsteps are correctly handled for dynamically mapped ports + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// Mycompport A is dynamically mapped +module Sem_160201_invoking_altsteps_004{ + + type port loopbackPort message { + inout integer + } + + type port IntegerOutputPortType message { + inout integer + } + +type component GeneralComp + { + timer tc_timer := 0.1; + port IntegerOutputPortType MycomportA + } + +type component MyTestSystemInterface + { + port loopbackPort messagePort + } + +altstep AltStep1() runs on GeneralComp { + + [] tc_timer.timeout { + MycomportA.clear; + setverdict(pass); + } +} + + +// MyTestSystemInterface is the test system interface +testcase TC_Sem_160201_invoking_altsteps_004() runs on GeneralComp system MyTestSystemInterface { + map(mtc:MycomportA, system:messagePort); + + + MycomportA.send(2); + tc_timer.start; + unmap(mtc:MycomportA); + + alt { + [] AltStep1(); + } +} +control{ + execute(TC_Sem_160201_invoking_altsteps_004()); +} +} \ No newline at end of file diff --git a/ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_001.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_001.ttcn new file mode 100644 index 00000000..deda6551 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_001.ttcn @@ -0,0 +1,58 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:16.2, Ensure that the IUT recognizes altstep definitions and correctly evaluates them + ** @verdict pass reject + ** @configuration external_functions + ***************************************************/ +module NegSem_1602_toplevel_001 { + + type record MessageType { + integer field1, + charstring field2 + } + + type port loopbackPort message { + inout MessageType + } + + type component GeneralComp { + port loopbackPort messagePort + } + + /** + * @desc function returns always 1 + * @return always 1 + */ + external function xf_NegSem_1602_toplevel_001() return integer; + + + altstep AltSet1() runs on GeneralComp { + var integer v_LocalVar := xf_NegSem_1602_toplevel_001(); //attempt to use external function for variable initialization + + [] messagePort.receive { + setverdict(pass); + } + + } + + testcase TC_NegSem_1602_toplevel_001 () runs on GeneralComp { + var MessageType v_testMessage; + v_testMessage:= { + field1 := 1, + field2 := "test string" + } + + messagePort.send(v_testMessage); + + AltSet1(); + + } + + control{ + + execute(TC_NegSem_1602_toplevel_001()); + + } + +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_002.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_002.ttcn new file mode 100644 index 00000000..812176b5 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_002.ttcn @@ -0,0 +1,51 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:16.2, Ensure that the IUT recognizes altstep definitions and correctly evaluates them + ** @verdict pass reject + ***************************************************/ +module NegSem_1602_toplevel_002 { + + type record MessageType { + integer field1, + charstring field2 + } + + type port loopbackPort message { + inout MessageType + } + + type component GeneralComp { + port loopbackPort messagePort + } + + + altstep AltSet1() runs on GeneralComp { + var float v_LocalVar := rnd(); //calling rnd for local variable initialization + + [] messagePort.receive { + setverdict(pass); + } + + } + + testcase TC_NegSem_1602_toplevel_002 () runs on GeneralComp { + var MessageType v_testMessage; + v_testMessage:= { + field1 := 1, + field2 := "test string" + } + + messagePort.send(v_testMessage); + + AltSet1(); + + } + + control{ + + execute(TC_NegSem_1602_toplevel_002()); + + } + +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_003.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_003.ttcn new file mode 100644 index 00000000..189e08f8 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_003.ttcn @@ -0,0 +1,56 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:16.2, Ensure that the IUT recognizes altstep definitions and correctly evaluates them + ** @verdict pass reject + ***************************************************/ +module NegSem_1602_toplevel_003 { + + type record MessageType { + integer field1, + charstring field2 + } + + type port loopbackPort message { + inout MessageType + } + + type component GeneralComp { + port loopbackPort messagePort + } + + function f_test() return boolean { + setverdict(inconc); //setting verdict within a function for altstep variable initialization + return true; + } + + + altstep AltSet1() runs on GeneralComp { + var boolean v_LocalVar := f_test(); + + [] messagePort.receive { + setverdict(pass); + } + + } + + testcase TC_NegSem_1602_toplevel_003 () runs on GeneralComp { + var MessageType v_testMessage; + v_testMessage:= { + field1 := 1, + field2 := "test string" + } + + messagePort.send(v_testMessage); + + AltSet1(); + + } + + control{ + + execute(TC_NegSem_1602_toplevel_003()); + + } + +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_004.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_004.ttcn new file mode 100644 index 00000000..b458ed48 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_004.ttcn @@ -0,0 +1,57 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:16.2, Ensure that the IUT recognizes altstep definitions and correctly evaluates them + ** @verdict pass reject + ***************************************************/ +module NegSem_1602_toplevel_004 { + + type record MessageType { + integer field1, + charstring field2 + } + + type port loopbackPort message { + inout MessageType + } + + type component GeneralComp { + port loopbackPort messagePort + } + + function f_test(inout integer p_int) return integer { + //use of inout parameter within a function called at altstep variable initialization + return p_int+1; + } + + + altstep AltSet1() runs on GeneralComp { + var integer v_LocalVar1 := 1; + var integer v_LocalVar2 := f_test(v_LocalVar1); // call of functions with inout params forbidden by 16.1.4 j) + 16.2.b) + + [] messagePort.receive { + setverdict(pass); + } + + } + + testcase TC_NegSem_1602_toplevel_004 () runs on GeneralComp { + var MessageType v_testMessage; + v_testMessage:= { + field1 := 1, + field2 := "test string" + } + + messagePort.send(v_testMessage); + + AltSet1(); + + } + + control{ + + execute(TC_NegSem_1602_toplevel_004()); + + } + +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_005.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_005.ttcn new file mode 100644 index 00000000..59ebcc43 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_005.ttcn @@ -0,0 +1,50 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:16.2, Ensure that the IUT recognizes altstep definitions and correctly evaluates them + ** @verdict pass reject + ***************************************************/ +module NegSem_1602_toplevel_005 { + + type record MessageType { + integer field1, + charstring field2 + } + + type port loopbackPort message { + inout MessageType + } + + type component GeneralComp { + port loopbackPort messagePort + } + + + altstep AltSet1() { //altstep port operations without corresponding component reference + + [] messagePort.receive { + setverdict(pass); + } + + } + + testcase TC_NegSem_1602_toplevel_005 () runs on GeneralComp { + var MessageType v_testMessage; + v_testMessage:= { + field1 := 1, + field2 := "test string" + } + + messagePort.send(v_testMessage); + + AltSet1(); + + } + + control{ + + execute(TC_NegSem_1602_toplevel_005()); + + } + +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_006.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_006.ttcn new file mode 100644 index 00000000..62195f32 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_006.ttcn @@ -0,0 +1,55 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:16.2, Ensure that the IUT recognizes altstep definitions and correctly evaluates them + ** @verdict pass reject + ***************************************************/ +module NegSem_1602_toplevel_006 { + + type record MessageType { + integer field1, + charstring field2 + } + + type port loopbackPort message { + inout MessageType + } + + type component GeneralComp { + port loopbackPort messagePort + } + + function f_test(integer p_int) runs on GeneralComp return boolean { //use of a function with runs on clause from an altstep without a runs on clause + if (p_int==1) { return true; } + } + + + altstep AltSet1() { + var integer v_LocalVar1 := 1; + + [] f_test(v_LocalVar1) { + setverdict(pass); + } + + } + + testcase TC_NegSem_1602_toplevel_006 () runs on GeneralComp { + var MessageType v_testMessage; + v_testMessage:= { + field1 := 1, + field2 := "test string" + } + + messagePort.send(v_testMessage); + + AltSet1(); + + } + + control{ + + execute(TC_NegSem_1602_toplevel_006()); + + } + +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_007.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_007.ttcn new file mode 100644 index 00000000..cbcaf2c8 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_007.ttcn @@ -0,0 +1,40 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1, verify that altstep without a runs on clause cannot be started as component behaviour + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Restriction f) +// Altsteps started by using the start test component operation shall always have a runs on clause (see clause 22.5) +// and are considered to be invoked in the component to be started, i.e. not locally. However, the start test component +// operation may be invoked within behaviours without a runs on clause. + +module NegSem_1602_toplevel_007 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + altstep a_test() { + [] any port.receive { + setverdict(pass); + } + } + + testcase TC_NegSem_1602_toplevel_007() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + connect(mtc:p, v_ptc:p); + p.send(1); + v_ptc.start(a_test()); + v_ptc.done; + } + + control { + execute(TC_NegSem_1602_toplevel_007()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_008.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_008.ttcn new file mode 100644 index 00000000..e855aafb --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_008.ttcn @@ -0,0 +1,47 @@ +/*************************************************** + ** @author STF 548 + ** @version 0.0.1 + ** @purpose 1:16.2, verify that the create operation cannot be used in default parameters of altsteps + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Restriction b) +// The evaluation of formal parameters' default values and initialization of local definitions by calling value returning +// functions may have side effects. To avoid side effects that cause an inconsistency between the actual snapshot and the +// state of the component, and to prevent different results of subsequent evaluations on an unchanged snapshot, +// restrictions given in clause 16.1.4 shall apply to the formal parameters' default values and the initialization of local +// definitions. + +module NegSem_1602_toplevel_008 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + function f_test() return boolean { + var GeneralComp v_ptc := GeneralComp.create; + return true; + } + + altstep a_rcv(boolean p_par := f_test()) runs on GeneralComp { + [] p.receive(integer:?) {} + } + + testcase TC_NegSem_1602_toplevel_008() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(1); + alt { + [] a_rcv(); + [] any timer.timeout {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_1602_toplevel_008()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_009.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_009.ttcn new file mode 100644 index 00000000..1ca59469 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_009.ttcn @@ -0,0 +1,53 @@ +/*************************************************** + ** @author STF 548 + ** @version 0.0.1 + ** @purpose 1:16.2, verify that the component.start operation cannot be used in default parameters of altsteps + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Restriction b) +// The evaluation of formal parameters' default values and initialization of local definitions by calling value returning +// functions may have side effects. To avoid side effects that cause an inconsistency between the actual snapshot and the +// state of the component, and to prevent different results of subsequent evaluations on an unchanged snapshot, +// restrictions given in clause 16.1.4 shall apply to the formal parameters' default values and the initialization of local +// definitions. + +module NegSem_1602_toplevel_009 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + var GeneralComp v_ptc; + } + + function f_ptcBehaviour() runs on GeneralComp { + log("PTC running"); + } + + function f_test(GeneralComp p_ptc) return boolean { + p_ptc.start(f_ptcBehaviour()); + return true; + } + + altstep a_rcv(boolean p_par := f_test(v_ptc)) runs on GeneralComp { + [] p.receive(integer:?) {} + } + + testcase TC_NegSem_1602_toplevel_009() runs on GeneralComp system GeneralComp { + v_ptc := GeneralComp.create; + connect(mtc:p, mtc:p); + p.send(1); + alt { + [] a_rcv(); + [] any timer.timeout {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_1602_toplevel_009()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_010.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_010.ttcn new file mode 100644 index 00000000..bf2022f3 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_010.ttcn @@ -0,0 +1,56 @@ +/*************************************************** + ** @author STF 548 + ** @version 0.0.1 + ** @purpose 1:16.2, verify that the component.stop operation cannot be used in default parameters of altsteps + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Restriction b) +// The evaluation of formal parameters' default values and initialization of local definitions by calling value returning +// functions may have side effects. To avoid side effects that cause an inconsistency between the actual snapshot and the +// state of the component, and to prevent different results of subsequent evaluations on an unchanged snapshot, +// restrictions given in clause 16.1.4 shall apply to the formal parameters' default values and the initialization of local +// definitions. + +module NegSem_1602_toplevel_010 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + var GeneralComp v_ptc; + } + + function f_ptcBehaviour() runs on GeneralComp { + timer t_tmr := 10.0; + t_tmr.start; + t_tmr.timeout; + } + + function f_test(GeneralComp p_ptc) return boolean { + p_ptc.stop; + return true; + } + + altstep a_rcv(boolean p_par := f_test(v_ptc)) runs on GeneralComp { + [] p.receive(integer:?) {} + } + + testcase TC_NegSem_1602_toplevel_010() runs on GeneralComp system GeneralComp { + v_ptc := GeneralComp.create; + v_ptc.start(f_ptcBehaviour()); + connect(mtc:p, mtc:p); + p.send(1); + alt { + [] a_rcv(); + [] any timer.timeout {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_1602_toplevel_010()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_011.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_011.ttcn new file mode 100644 index 00000000..1195adab --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_011.ttcn @@ -0,0 +1,56 @@ +/*************************************************** + ** @author STF 548 + ** @version 0.0.1 + ** @purpose 1:16.2, verify that the kill operation cannot be used in default parameters of altsteps + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Restriction b) +// The evaluation of formal parameters' default values and initialization of local definitions by calling value returning +// functions may have side effects. To avoid side effects that cause an inconsistency between the actual snapshot and the +// state of the component, and to prevent different results of subsequent evaluations on an unchanged snapshot, +// restrictions given in clause 16.1.4 shall apply to the formal parameters' default values and the initialization of local +// definitions. + +module NegSem_1602_toplevel_011 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + var GeneralComp v_ptc; + } + + function f_ptcBehaviour() runs on GeneralComp { + timer t_tmr := 10.0; + t_tmr.start; + t_tmr.timeout; + } + + function f_test(GeneralComp p_ptc) return boolean { + p_ptc.kill; + return true; + } + + altstep a_rcv(boolean p_par := f_test(v_ptc)) runs on GeneralComp { + [] p.receive(integer:?) {} + } + + testcase TC_NegSem_1602_toplevel_011() runs on GeneralComp system GeneralComp { + v_ptc := GeneralComp.create; + v_ptc.start(f_ptcBehaviour()); + connect(mtc:p, mtc:p); + p.send(1); + alt { + [] a_rcv(); + [] any timer.timeout {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_1602_toplevel_011()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_012.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_012.ttcn new file mode 100644 index 00000000..2a81615e --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_012.ttcn @@ -0,0 +1,56 @@ +/*************************************************** + ** @author STF 548 + ** @version 0.0.1 + ** @purpose 1:16.2, verify that the component.running operation cannot be used in parameters of altsteps invoked from an alt branch + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Restriction b) +// The evaluation of formal parameters' default values and initialization of local definitions by calling value returning +// functions may have side effects. To avoid side effects that cause an inconsistency between the actual snapshot and the +// state of the component, and to prevent different results of subsequent evaluations on an unchanged snapshot, +// restrictions given in clause 16.1.4 shall apply to the formal parameters' default values and the initialization of local +// definitions. + +module NegSem_1602_toplevel_012 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + var GeneralComp v_ptc; + } + + function f_ptcBehaviour() runs on GeneralComp { + timer t_tmr := 10.0; + t_tmr.start; + t_tmr.timeout; + } + + function f_test(GeneralComp p_ptc) return boolean { + if (p_ptc.running) { return true; } + else { return false; } + } + + altstep a_rcv(boolean p_par := f_test(v_ptc)) runs on GeneralComp { + [] p.receive(integer:?) {} + } + + testcase TC_NegSem_1602_toplevel_012() runs on GeneralComp system GeneralComp { + v_ptc := GeneralComp.create; + v_ptc.start(f_ptcBehaviour()); + connect(mtc:p, mtc:p); + p.send(1); + alt { + [] a_rcv(); + [] any timer.timeout {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_1602_toplevel_012()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_013.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_013.ttcn new file mode 100644 index 00000000..a63421d1 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_013.ttcn @@ -0,0 +1,56 @@ +/*************************************************** + ** @author STF 548 + ** @version 0.0.1 + ** @purpose 1:16.2, verify that the alive operation cannot be used in default parameters of altsteps + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Restriction b) +// The evaluation of formal parameters' default values and initialization of local definitions by calling value returning +// functions may have side effects. To avoid side effects that cause an inconsistency between the actual snapshot and the +// state of the component, and to prevent different results of subsequent evaluations on an unchanged snapshot, +// restrictions given in clause 16.1.4 shall apply to the formal parameters' default values and the initialization of local +// definitions. + +module NegSem_1602_toplevel_013 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + var GeneralComp v_ptc; + } + + function f_ptcBehaviour() runs on GeneralComp { + timer t_tmr := 10.0; + t_tmr.start; + t_tmr.timeout; + } + + function f_test(GeneralComp p_ptc) return boolean { + if (p_ptc.alive) { return true; } + else { return false; } + } + + altstep a_rcv(boolean p_par := f_test(v_ptc)) runs on GeneralComp { + [] p.receive(integer:?) {} + } + + testcase TC_NegSem_1602_toplevel_013() runs on GeneralComp system GeneralComp { + v_ptc := GeneralComp.create; + v_ptc.start(f_ptcBehaviour()); + connect(mtc:p, mtc:p); + p.send(1); + alt { + [] a_rcv(); + [] any timer.timeout {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_1602_toplevel_013()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_014.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_014.ttcn new file mode 100644 index 00000000..cf6f46ab --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_014.ttcn @@ -0,0 +1,53 @@ +/*************************************************** + ** @author STF 548 + ** @version 0.0.1 + ** @purpose 1:16.2, verify that the done operation cannot be used in default parameters of altsteps + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Restriction b) +// The evaluation of formal parameters' default values and initialization of local definitions by calling value returning +// functions may have side effects. To avoid side effects that cause an inconsistency between the actual snapshot and the +// state of the component, and to prevent different results of subsequent evaluations on an unchanged snapshot, +// restrictions given in clause 16.1.4 shall apply to the formal parameters' default values and the initialization of local +// definitions. + +module NegSem_1602_toplevel_014 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + var GeneralComp v_ptc; + } + + function f_ptcBehaviour() runs on GeneralComp { + } + + function f_test(GeneralComp p_ptc) return boolean { + p_ptc.done; + return true; + } + + altstep a_rcv(boolean p_par := f_test(v_ptc)) runs on GeneralComp { + [] p.receive(integer:?) {} + } + + testcase TC_NegSem_1602_toplevel_014() runs on GeneralComp system GeneralComp { + v_ptc := GeneralComp.create; + v_ptc.start(f_ptcBehaviour()); + connect(mtc:p, mtc:p); + p.send(1); + alt { + [] a_rcv(); + [] any timer.timeout {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_1602_toplevel_014()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_015.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_015.ttcn new file mode 100644 index 00000000..b4f757c6 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_015.ttcn @@ -0,0 +1,53 @@ +/*************************************************** + ** @author STF 548 + ** @version 0.0.1 + ** @purpose 1:16.2, verify that the killed operation cannot be used in default parameters of altsteps + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Restriction b) +// The evaluation of formal parameters' default values and initialization of local definitions by calling value returning +// functions may have side effects. To avoid side effects that cause an inconsistency between the actual snapshot and the +// state of the component, and to prevent different results of subsequent evaluations on an unchanged snapshot, +// restrictions given in clause 16.1.4 shall apply to the formal parameters' default values and the initialization of local +// definitions. + +module NegSem_1602_toplevel_015 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + var GeneralComp v_ptc; + } + + function f_ptcBehaviour() runs on GeneralComp { + } + + function f_test(GeneralComp p_ptc) return boolean { + p_ptc.killed; + return true; + } + + altstep a_rcv(boolean p_par := f_test(v_ptc)) runs on GeneralComp { + [] p.receive(integer:?) {} + } + + testcase TC_NegSem_1602_toplevel_015() runs on GeneralComp system GeneralComp { + v_ptc := GeneralComp.create; + v_ptc.start(f_ptcBehaviour()); + connect(mtc:p, mtc:p); + p.send(1); + alt { + [] a_rcv(); + [] any timer.timeout {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_1602_toplevel_015()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_016.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_016.ttcn new file mode 100644 index 00000000..a9fff76b --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_016.ttcn @@ -0,0 +1,49 @@ +/*************************************************** + ** @author STF 548 + ** @version 0.0.1 + ** @purpose 1:16.2, verify that the port.start operation cannot be used in default parameters of altsteps + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Restriction b) +// The evaluation of formal parameters' default values and initialization of local definitions by calling value returning +// functions may have side effects. To avoid side effects that cause an inconsistency between the actual snapshot and the +// state of the component, and to prevent different results of subsequent evaluations on an unchanged snapshot, +// restrictions given in clause 16.1.4 shall apply to the formal parameters' default values and the initialization of local +// definitions. + +module NegSem_1602_toplevel_016 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return boolean { + p.start; + return true; + } + + altstep a_rcv(boolean p_par := f_test()) runs on GeneralComp { + [] p.receive(integer:?) {} + } + + testcase TC_NegSem_1602_toplevel_016() runs on GeneralComp system GeneralComp { + timer t_tmr := 0.1; + t_tmr.start; + connect(mtc:p, mtc:p); + p.send(1); + alt { + [] a_rcv() {} + [] t_tmr.timeout {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_1602_toplevel_016()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_017.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_017.ttcn new file mode 100644 index 00000000..e8b50382 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_017.ttcn @@ -0,0 +1,49 @@ +/*************************************************** + ** @author STF 548 + ** @version 0.0.1 + ** @purpose 1:16.2, verify that the port.stop operation cannot be used in default parameters of altsteps + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Restriction b) +// The evaluation of formal parameters' default values and initialization of local definitions by calling value returning +// functions may have side effects. To avoid side effects that cause an inconsistency between the actual snapshot and the +// state of the component, and to prevent different results of subsequent evaluations on an unchanged snapshot, +// restrictions given in clause 16.1.4 shall apply to the formal parameters' default values and the initialization of local +// definitions. + +module NegSem_1602_toplevel_013 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return boolean { + p.stop; + return true; + } + + altstep a_rcv(boolean p_par := f_test()) runs on GeneralComp { + [] p.receive(integer:?) {} + } + + testcase TC_NegSem_1602_toplevel_013() runs on GeneralComp system GeneralComp { + timer t_tmr := 0.1; + t_tmr.start; + connect(mtc:p, mtc:p); + p.send(1); + alt { + [] a_rcv() {} + [] t_tmr.timeout {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_1602_toplevel_013()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_018.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_018.ttcn new file mode 100644 index 00000000..b505dec4 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_018.ttcn @@ -0,0 +1,49 @@ +/*************************************************** + ** @author STF 548 + ** @version 0.0.1 + ** @purpose 1:16.2, verify that the halt operation cannot be used in default parameters of altsteps + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Restriction b) +// The evaluation of formal parameters' default values and initialization of local definitions by calling value returning +// functions may have side effects. To avoid side effects that cause an inconsistency between the actual snapshot and the +// state of the component, and to prevent different results of subsequent evaluations on an unchanged snapshot, +// restrictions given in clause 16.1.4 shall apply to the formal parameters' default values and the initialization of local +// definitions. + +module NegSem_1602_toplevel_018 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return boolean { + p.halt; + return true; + } + + altstep a_rcv(boolean p_par := f_test()) runs on GeneralComp { + [] p.receive(integer:?) {} + } + + testcase TC_NegSem_1602_toplevel_018() runs on GeneralComp system GeneralComp { + timer t_tmr := 0.1; + t_tmr.start; + connect(mtc:p, mtc:p); + p.send(1); + alt { + [] a_rcv() {} + [] t_tmr.timeout {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_1602_toplevel_018()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_019.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_019.ttcn new file mode 100644 index 00000000..0fb90746 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_019.ttcn @@ -0,0 +1,49 @@ +/*************************************************** + ** @author STF 548 + ** @version 0.0.1 + ** @purpose 1:16.2, verify that the clear operation cannot be used in default parameters of altsteps + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Restriction b) +// The evaluation of formal parameters' default values and initialization of local definitions by calling value returning +// functions may have side effects. To avoid side effects that cause an inconsistency between the actual snapshot and the +// state of the component, and to prevent different results of subsequent evaluations on an unchanged snapshot, +// restrictions given in clause 16.1.4 shall apply to the formal parameters' default values and the initialization of local +// definitions. + +module NegSem_1602_toplevel_019 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return boolean { + p.clear; + return true; + } + + altstep a_rcv(boolean p_par := f_test()) runs on GeneralComp { + [] p.receive(integer:?) {} + } + + testcase TC_NegSem_1602_toplevel_019() runs on GeneralComp system GeneralComp { + timer t_tmr := 0.1; + t_tmr.start; + connect(mtc:p, mtc:p); + p.send(1); + alt { + [] a_rcv() {} + [] t_tmr.timeout {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_1602_toplevel_019()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_020.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_020.ttcn new file mode 100644 index 00000000..0c216185 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_020.ttcn @@ -0,0 +1,47 @@ +/*************************************************** + ** @author STF 548 + ** @version 0.0.1 + ** @purpose 1:16.2, verify that the checkstate operation cannot be used in default parameters of altsteps + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Restriction b) +// The evaluation of formal parameters' default values and initialization of local definitions by calling value returning +// functions may have side effects. To avoid side effects that cause an inconsistency between the actual snapshot and the +// state of the component, and to prevent different results of subsequent evaluations on an unchanged snapshot, +// restrictions given in clause 16.1.4 shall apply to the formal parameters' default values and the initialization of local +// definitions. + +module NegSem_1602_toplevel_020 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return boolean { + if (p.checkstate("Started")) { return true; } + else { return false; } + } + + altstep a_rcv(boolean p_par := f_test()) runs on GeneralComp { + [] p.receive(integer:?) {} + } + + testcase TC_NegSem_1602_toplevel_020() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(1); + alt { + [] a_rcv(); + [] any timer.timeout {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_1602_toplevel_020()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_021.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_021.ttcn new file mode 100644 index 00000000..755febcd --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_021.ttcn @@ -0,0 +1,47 @@ +/*************************************************** + ** @author STF 548 + ** @version 0.0.1 + ** @purpose 1:16.2, verify that the send operation cannot be used in default parameters of altsteps + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Restriction b) +// The evaluation of formal parameters' default values and initialization of local definitions by calling value returning +// functions may have side effects. To avoid side effects that cause an inconsistency between the actual snapshot and the +// state of the component, and to prevent different results of subsequent evaluations on an unchanged snapshot, +// restrictions given in clause 16.1.4 shall apply to the formal parameters' default values and the initialization of local +// definitions. + +module NegSem_1602_toplevel_021 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return boolean { + p.send(2); + return true; + } + + altstep a_rcv(boolean p_par := f_test()) runs on GeneralComp { + [] p.receive(integer:?) {} + } + + testcase TC_NegSem_1602_toplevel_021() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(1); + alt { + [] a_rcv(); + [] any timer.timeout {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_1602_toplevel_021()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_022.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_022.ttcn new file mode 100644 index 00000000..bddc4b86 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_022.ttcn @@ -0,0 +1,48 @@ +/*************************************************** + ** @author STF 548 + ** @version 0.0.1 + ** @purpose 1:16.2, verify that the receive operation cannot be used in default parameters of altsteps + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Restriction b) +// The evaluation of formal parameters' default values and initialization of local definitions by calling value returning +// functions may have side effects. To avoid side effects that cause an inconsistency between the actual snapshot and the +// state of the component, and to prevent different results of subsequent evaluations on an unchanged snapshot, +// restrictions given in clause 16.1.4 shall apply to the formal parameters' default values and the initialization of local +// definitions. + +module NegSem_1602_toplevel_022 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return boolean { + p.receive(integer:?); + return true; + } + + altstep a_rcv(boolean p_par := f_test()) runs on GeneralComp { + [] p.receive(integer:?) {} + } + + testcase TC_NegSem_1602_toplevel_022() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(1); + p.send(1); + alt { + [] a_rcv(); + [] any timer.timeout {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_1602_toplevel_022()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_023.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_023.ttcn new file mode 100644 index 00000000..b6ac8c21 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_023.ttcn @@ -0,0 +1,48 @@ +/*************************************************** + ** @author STF 548 + ** @version 0.0.1 + ** @purpose 1:16.2, verify that the trigger operation cannot be used in default parameters of altsteps + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Restriction b) +// The evaluation of formal parameters' default values and initialization of local definitions by calling value returning +// functions may have side effects. To avoid side effects that cause an inconsistency between the actual snapshot and the +// state of the component, and to prevent different results of subsequent evaluations on an unchanged snapshot, +// restrictions given in clause 16.1.4 shall apply to the formal parameters' default values and the initialization of local +// definitions. + +module NegSem_1602_toplevel_023 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return boolean { + p.trigger(integer:?); + return true; + } + + altstep a_rcv(boolean p_par := f_test()) runs on GeneralComp { + [] p.receive(integer:?) {} + } + + testcase TC_NegSem_1602_toplevel_023() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(1); + p.send(1); + alt { + [] a_rcv(); + [] any timer.timeout {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_1602_toplevel_023()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_024.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_024.ttcn new file mode 100644 index 00000000..92c88105 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_024.ttcn @@ -0,0 +1,56 @@ +/*************************************************** + ** @author STF 548 + ** @version 0.0.1 + ** @purpose 1:16.2, verify that the call operation cannot be used in default parameters of altsteps + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Restriction b) +// The evaluation of formal parameters' default values and initialization of local definitions by calling value returning +// functions may have side effects. To avoid side effects that cause an inconsistency between the actual snapshot and the +// state of the component, and to prevent different results of subsequent evaluations on an unchanged snapshot, +// restrictions given in clause 16.1.4 shall apply to the formal parameters' default values and the initialization of local +// definitions. + +module NegSem_1602_toplevel_024 { + type port P message { + inout integer; + } + + signature S(); + + type port PSig procedure { + inout S; + } + + type component GeneralComp { + port P p; + port PSig psig; + } + + function f_test() runs on GeneralComp return boolean { + psig.call(S:{}, nowait); + return true; + } + + altstep a_rcv(boolean p_par := f_test()) runs on GeneralComp { + [] p.receive(integer:?) {} + } + + testcase TC_NegSem_1602_toplevel_024() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + connect(mtc:p, mtc:p); + connect(mtc:psig, v_ptc:psig); + p.send(1); + alt { + [] a_rcv(); + [] any timer.timeout {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_1602_toplevel_024()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_025.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_025.ttcn new file mode 100644 index 00000000..c72ccfb2 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_025.ttcn @@ -0,0 +1,61 @@ +/*************************************************** + ** @author STF 548 + ** @version 0.0.1 + ** @purpose 1:16.2, verify that the getcall operation cannot be used in default parameters of altsteps + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Restriction b) +// The evaluation of formal parameters' default values and initialization of local definitions by calling value returning +// functions may have side effects. To avoid side effects that cause an inconsistency between the actual snapshot and the +// state of the component, and to prevent different results of subsequent evaluations on an unchanged snapshot, +// restrictions given in clause 16.1.4 shall apply to the formal parameters' default values and the initialization of local +// definitions. + +module NegSem_1602_toplevel_025 { + type port P message { + inout integer; + } + + signature S(); + + type port PSig procedure { + inout S; + } + + type component GeneralComp { + port P p; + port PSig psig; + } + + function f_ptcBehaviour() runs on GeneralComp { + psig.call(S:{}, nowait); + } + + function f_test() runs on GeneralComp return boolean { + psig.getcall(S:?); + return true; + } + + altstep a_rcv(boolean p_par := f_test()) runs on GeneralComp { + [] p.receive(integer:?) {} + } + + testcase TC_NegSem_1602_toplevel_025() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + connect(mtc:p, mtc:p); + connect(mtc:psig, v_ptc:psig); + v_ptc.start(f_ptcBehaviour()); + p.send(1); + alt { + [] a_rcv(); + [] any timer.timeout {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_1602_toplevel_025()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_026.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_026.ttcn new file mode 100644 index 00000000..de5dc525 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_026.ttcn @@ -0,0 +1,62 @@ +/*************************************************** + ** @author STF 548 + ** @version 0.0.1 + ** @purpose 1:16.2, verify that the reply operation cannot be used in default parameters of altsteps + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Restriction b) +// The evaluation of formal parameters' default values and initialization of local definitions by calling value returning +// functions may have side effects. To avoid side effects that cause an inconsistency between the actual snapshot and the +// state of the component, and to prevent different results of subsequent evaluations on an unchanged snapshot, +// restrictions given in clause 16.1.4 shall apply to the formal parameters' default values and the initialization of local +// definitions. + +module NegSem_1602_toplevel_026 { + type port P message { + inout integer; + } + + signature S(); + + type port PSig procedure { + inout S; + } + + type component GeneralComp { + port P p; + port PSig psig; + } + + function f_ptcBehaviour() runs on GeneralComp { + psig.call(S:{}, nowait); + } + + function f_test() runs on GeneralComp return boolean { + psig.reply(S:{}); + return true; + } + + altstep a_rcv(boolean p_par := f_test()) runs on GeneralComp { + [] p.receive(integer:?) {} + } + + testcase TC_NegSem_1602_toplevel_026() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + connect(mtc:p, mtc:p); + connect(mtc:psig, v_ptc:psig); + v_ptc.start(f_ptcBehaviour()); + p.send(1); + psig.getcall(S:?); + alt { + [] a_rcv(); + [] any timer.timeout {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_1602_toplevel_026()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_027.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_027.ttcn new file mode 100644 index 00000000..90ac4aca --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_027.ttcn @@ -0,0 +1,63 @@ +/*************************************************** + ** @author STF 548 + ** @version 0.0.1 + ** @purpose 1:16.2, verify that the getreply operation cannot be used in default parameters of altsteps + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Restriction b) +// The evaluation of formal parameters' default values and initialization of local definitions by calling value returning +// functions may have side effects. To avoid side effects that cause an inconsistency between the actual snapshot and the +// state of the component, and to prevent different results of subsequent evaluations on an unchanged snapshot, +// restrictions given in clause 16.1.4 shall apply to the formal parameters' default values and the initialization of local +// definitions. + +module NegSem_1602_toplevel_027 { + type port P message { + inout integer; + } + + signature S(); + + type port PSig procedure { + inout S; + } + + type component GeneralComp { + port P p; + port PSig psig; + } + + function f_ptcBehaviour() runs on GeneralComp { + psig.getcall(S:?); + psig.reply(S:{}); + } + + function f_test() runs on GeneralComp return boolean { + psig.getreply(S:?); + return true; + } + + altstep a_rcv(boolean p_par := f_test()) runs on GeneralComp { + [] p.receive(integer:?) {} + } + + testcase TC_NegSem_1602_toplevel_027() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + connect(mtc:p, mtc:p); + connect(mtc:psig, v_ptc:psig); + v_ptc.start(f_ptcBehaviour()); + psig.call(S:{}, nowait); + p.send(1); + alt { + [] a_rcv(); + [] any timer.timeout {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_1602_toplevel_027()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_028.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_028.ttcn new file mode 100644 index 00000000..8410fd34 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_028.ttcn @@ -0,0 +1,62 @@ +/*************************************************** + ** @author STF 548 + ** @version 0.0.1 + ** @purpose 1:16.2, verify that the raise operation cannot be used in default parameters of altsteps + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Restriction b) +// The evaluation of formal parameters' default values and initialization of local definitions by calling value returning +// functions may have side effects. To avoid side effects that cause an inconsistency between the actual snapshot and the +// state of the component, and to prevent different results of subsequent evaluations on an unchanged snapshot, +// restrictions given in clause 16.1.4 shall apply to the formal parameters' default values and the initialization of local +// definitions. + +module NegSem_1602_toplevel_028 { + type port P message { + inout integer; + } + + signature S() exception (charstring); + + type port PSig procedure { + inout S; + } + + type component GeneralComp { + port P p; + port PSig psig; + } + + function f_ptcBehaviour() runs on GeneralComp { + psig.call(S:{}, nowait); + } + + function f_test() runs on GeneralComp return boolean { + psig.raise(S, "UserException"); + return true; + } + + altstep a_rcv(boolean p_par := f_test()) runs on GeneralComp { + [] p.receive(integer:?) {} + } + + testcase TC_NegSem_1602_toplevel_028() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + connect(mtc:p, mtc:p); + connect(mtc:psig, v_ptc:psig); + v_ptc.start(f_ptcBehaviour()); + p.send(1); + psig.getcall(S:?); + alt { + [] a_rcv(); + [] any timer.timeout {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_1602_toplevel_028()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_029.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_029.ttcn new file mode 100644 index 00000000..7a842bab --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_029.ttcn @@ -0,0 +1,63 @@ +/*************************************************** + ** @author STF 548 + ** @version 0.0.1 + ** @purpose 1:16.2, verify that the catch operation cannot be used in default parameters of altsteps + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Restriction b) +// The evaluation of formal parameters' default values and initialization of local definitions by calling value returning +// functions may have side effects. To avoid side effects that cause an inconsistency between the actual snapshot and the +// state of the component, and to prevent different results of subsequent evaluations on an unchanged snapshot, +// restrictions given in clause 16.1.4 shall apply to the formal parameters' default values and the initialization of local +// definitions. + +module NegSem_1602_toplevel_029 { + type port P message { + inout integer; + } + + signature S() exception (charstring); + + type port PSig procedure { + inout S; + } + + type component GeneralComp { + port P p; + port PSig psig; + } + + function f_ptcBehaviour() runs on GeneralComp { + psig.getcall(S:?); + psig.raise(S, "UserException"); + } + + function f_test() runs on GeneralComp return boolean { + psig.catch(S, charstring:?); + return true; + } + + altstep a_rcv(boolean p_par := f_test()) runs on GeneralComp { + [] p.receive(integer:?) {} + } + + testcase TC_NegSem_1602_toplevel_029() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + connect(mtc:p, mtc:p); + connect(mtc:psig, v_ptc:psig); + v_ptc.start(f_ptcBehaviour()); + psig.call(S:{}, nowait); + p.send(1); + alt { + [] a_rcv(); + [] any timer.timeout {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_1602_toplevel_029()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_030.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_030.ttcn new file mode 100644 index 00000000..882ae950 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_030.ttcn @@ -0,0 +1,47 @@ +/*************************************************** + ** @author STF 548 + ** @version 0.0.1 + ** @purpose 1:16.2, verify that the check operation cannot be used in default parameters of altsteps + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Restriction b) +// The evaluation of formal parameters' default values and initialization of local definitions by calling value returning +// functions may have side effects. To avoid side effects that cause an inconsistency between the actual snapshot and the +// state of the component, and to prevent different results of subsequent evaluations on an unchanged snapshot, +// restrictions given in clause 16.1.4 shall apply to the formal parameters' default values and the initialization of local +// definitions. + +module NegSem_1602_toplevel_030 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return boolean { + p.check; + return true; + } + + altstep a_rcv(boolean p_par := f_test()) runs on GeneralComp { + [] p.receive(integer:?) {} + } + + testcase TC_NegSem_1602_toplevel_030() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(1); + alt { + [] a_rcv(); + [] any timer.timeout {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_1602_toplevel_030()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_031.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_031.ttcn new file mode 100644 index 00000000..35fc25e0 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_031.ttcn @@ -0,0 +1,47 @@ +/*************************************************** + ** @author STF 548 + ** @version 0.0.1 + ** @purpose 1:16.2, verify that the connect operation cannot be used in default parameters of altsteps + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Restriction b) +// The evaluation of formal parameters' default values and initialization of local definitions by calling value returning +// functions may have side effects. To avoid side effects that cause an inconsistency between the actual snapshot and the +// state of the component, and to prevent different results of subsequent evaluations on an unchanged snapshot, +// restrictions given in clause 16.1.4 shall apply to the formal parameters' default values and the initialization of local +// definitions. + +module NegSem_1602_toplevel_031 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return boolean { + connect(mtc:p, mtc:p); + return true; + } + + altstep a_rcv(boolean p_par := f_test()) runs on GeneralComp { + [] p.receive(integer:?) {} + } + + testcase TC_NegSem_1602_toplevel_031() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(1); + alt { + [] a_rcv(); + [] any timer.timeout {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_1602_toplevel_031()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_032.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_032.ttcn new file mode 100644 index 00000000..daae1349 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_032.ttcn @@ -0,0 +1,47 @@ +/*************************************************** + ** @author STF 548 + ** @version 0.0.1 + ** @purpose 1:16.2, verify that the disconnect operation cannot be used in default parameters of altsteps + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Restriction b) +// The evaluation of formal parameters' default values and initialization of local definitions by calling value returning +// functions may have side effects. To avoid side effects that cause an inconsistency between the actual snapshot and the +// state of the component, and to prevent different results of subsequent evaluations on an unchanged snapshot, +// restrictions given in clause 16.1.4 shall apply to the formal parameters' default values and the initialization of local +// definitions. + +module NegSem_1602_toplevel_032 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return boolean { + disconnect(mtc:p, mtc:p); + return true; + } + + altstep a_rcv(boolean p_par := f_test()) runs on GeneralComp { + [] p.receive(integer:?) {} + } + + testcase TC_NegSem_1602_toplevel_032() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(1); + alt { + [] a_rcv(); + [] any timer.timeout {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_1602_toplevel_032()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_033.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_033.ttcn new file mode 100644 index 00000000..77ea460c --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_033.ttcn @@ -0,0 +1,48 @@ +/*************************************************** + ** @author STF 548 + ** @version 0.0.1 + ** @purpose 1:16.2, verify that the map operation cannot be used in default parameters of altsteps + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Restriction b) +// The evaluation of formal parameters' default values and initialization of local definitions by calling value returning +// functions may have side effects. To avoid side effects that cause an inconsistency between the actual snapshot and the +// state of the component, and to prevent different results of subsequent evaluations on an unchanged snapshot, +// restrictions given in clause 16.1.4 shall apply to the formal parameters' default values and the initialization of local +// definitions. + +module NegSem_1602_toplevel_033 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp system GeneralComp return boolean { + map(mtc:p, system:p); + return true; + } + + altstep a_rcv(boolean p_par := f_test()) runs on GeneralComp system GeneralComp { + [] p.receive(integer:?) {} + } + + testcase TC_NegSem_1602_toplevel_033() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(1); + disconnect(mtc:p, mtc:p); + alt { + [] a_rcv(); + [] any timer.timeout {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_1602_toplevel_033()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_034.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_034.ttcn new file mode 100644 index 00000000..02732765 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_034.ttcn @@ -0,0 +1,49 @@ +/*************************************************** + ** @author STF 548 + ** @version 0.0.1 + ** @purpose 1:16.2, verify that the unmap operation cannot be used in default parameters of altsteps + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Restriction b) +// The evaluation of formal parameters' default values and initialization of local definitions by calling value returning +// functions may have side effects. To avoid side effects that cause an inconsistency between the actual snapshot and the +// state of the component, and to prevent different results of subsequent evaluations on an unchanged snapshot, +// restrictions given in clause 16.1.4 shall apply to the formal parameters' default values and the initialization of local +// definitions. + +module NegSem_1602_toplevel_034 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp system GeneralComp return boolean { + unmap(mtc:p, system:p); + return true; + } + + altstep a_rcv(boolean p_par := f_test()) runs on GeneralComp system GeneralComp { + [] p.receive(integer:?) {} + } + + testcase TC_NegSem_1602_toplevel_034() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(1); + disconnect(mtc:p, mtc:p); + map(mtc:p, system:p); + alt { + [] a_rcv(); + [] any timer.timeout {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_1602_toplevel_034()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_035.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_035.ttcn new file mode 100644 index 00000000..0ee49b87 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_035.ttcn @@ -0,0 +1,47 @@ +/*************************************************** + ** @author STF 548 + ** @version 0.0.1 + ** @purpose 1:16.2, verify that the action operation cannot be used in default parameters of altsteps + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Restriction b) +// The evaluation of formal parameters' default values and initialization of local definitions by calling value returning +// functions may have side effects. To avoid side effects that cause an inconsistency between the actual snapshot and the +// state of the component, and to prevent different results of subsequent evaluations on an unchanged snapshot, +// restrictions given in clause 16.1.4 shall apply to the formal parameters' default values and the initialization of local +// definitions. + +module NegSem_1602_toplevel_035 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return boolean { + action("My action"); + return true; + } + + altstep a_rcv(boolean p_par := f_test()) runs on GeneralComp { + [] p.receive(integer:?) {} + } + + testcase TC_NegSem_1602_toplevel_035() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(1); + alt { + [] a_rcv(); + [] any timer.timeout {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_1602_toplevel_035()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_036.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_036.ttcn new file mode 100644 index 00000000..6baf910f --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_036.ttcn @@ -0,0 +1,48 @@ +/*************************************************** + ** @author STF 548 + ** @version 0.0.1 + ** @purpose 1:16.2, verify that the timer.start operation cannot be used in default parameters of altsteps + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Restriction b) +// The evaluation of formal parameters' default values and initialization of local definitions by calling value returning +// functions may have side effects. To avoid side effects that cause an inconsistency between the actual snapshot and the +// state of the component, and to prevent different results of subsequent evaluations on an unchanged snapshot, +// restrictions given in clause 16.1.4 shall apply to the formal parameters' default values and the initialization of local +// definitions. + +module NegSem_1602_toplevel_036 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + timer tc_tmr := 0.1; + } + + function f_test() runs on GeneralComp return boolean { + tc_tmr.start; + return true; + } + + altstep a_rcv(boolean p_par := f_test()) runs on GeneralComp { + [] p.receive(integer:?) {} + } + + testcase TC_NegSem_1602_toplevel_036() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(1); + alt { + [] a_rcv(); + [] any timer.timeout {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_1602_toplevel_036()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_037.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_037.ttcn new file mode 100644 index 00000000..1c7ea786 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_037.ttcn @@ -0,0 +1,49 @@ +/*************************************************** + ** @author STF 548 + ** @version 0.0.1 + ** @purpose 1:16.2, verify that the timer.stop operation cannot be used in default parameters of altsteps + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Restriction b) +// The evaluation of formal parameters' default values and initialization of local definitions by calling value returning +// functions may have side effects. To avoid side effects that cause an inconsistency between the actual snapshot and the +// state of the component, and to prevent different results of subsequent evaluations on an unchanged snapshot, +// restrictions given in clause 16.1.4 shall apply to the formal parameters' default values and the initialization of local +// definitions. + +module NegSem_1602_toplevel_037 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + timer tc_tmr := 0.1; + } + + function f_test() runs on GeneralComp return boolean { + tc_tmr.stop; + return true; + } + + altstep a_rcv(boolean p_par := f_test()) runs on GeneralComp { + [] p.receive(integer:?) {} + } + + testcase TC_NegSem_1602_toplevel_037() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + tc_tmr.start; + p.send(1); + alt { + [] a_rcv(); + [] any timer.timeout {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_1602_toplevel_037()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_038.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_038.ttcn new file mode 100644 index 00000000..7f11efd2 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_038.ttcn @@ -0,0 +1,49 @@ +/*************************************************** + ** @author STF 548 + ** @version 0.0.1 + ** @purpose 1:16.2, verify that the timer.running operation cannot be used in default parameters of altsteps + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Restriction b) +// The evaluation of formal parameters' default values and initialization of local definitions by calling value returning +// functions may have side effects. To avoid side effects that cause an inconsistency between the actual snapshot and the +// state of the component, and to prevent different results of subsequent evaluations on an unchanged snapshot, +// restrictions given in clause 16.1.4 shall apply to the formal parameters' default values and the initialization of local +// definitions. + +module NegSem_1602_toplevel_038 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + timer tc_tmr := 5.0; + } + + function f_test() runs on GeneralComp return boolean { + if (tc_tmr.running) { return true; } + else { return false; } + } + + altstep a_rcv(boolean p_par := f_test()) runs on GeneralComp { + [] p.receive(integer:?) {} + } + + testcase TC_NegSem_1602_toplevel_038() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + tc_tmr.start; + p.send(1); + alt { + [] a_rcv(); + [] any timer.timeout {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_1602_toplevel_038()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_039.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_039.ttcn new file mode 100644 index 00000000..0f55a4a0 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_039.ttcn @@ -0,0 +1,49 @@ +/*************************************************** + ** @author STF 548 + ** @version 0.0.1 + ** @purpose 1:16.2, verify that the read operation cannot be used in default parameters of altsteps + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Restriction b) +// The evaluation of formal parameters' default values and initialization of local definitions by calling value returning +// functions may have side effects. To avoid side effects that cause an inconsistency between the actual snapshot and the +// state of the component, and to prevent different results of subsequent evaluations on an unchanged snapshot, +// restrictions given in clause 16.1.4 shall apply to the formal parameters' default values and the initialization of local +// definitions. + +module NegSem_1602_toplevel_039 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + timer tc_tmr := 0.1; + } + + function f_test() runs on GeneralComp return boolean { + if (tc_tmr.read > 0.0) { return true; } + else { return false; } + } + + altstep a_rcv(boolean p_par := f_test()) runs on GeneralComp { + [] p.receive(integer:?) {} + } + + testcase TC_NegSem_1602_toplevel_039() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + tc_tmr.start; + p.send(1); + alt { + [] a_rcv(); + [] any timer.timeout {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_1602_toplevel_039()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_040.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_040.ttcn new file mode 100644 index 00000000..ee9605fd --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_040.ttcn @@ -0,0 +1,49 @@ +/*************************************************** + ** @author STF 548 + ** @version 0.0.1 + ** @purpose 1:16.2, verify that the timeout operation cannot be used in default parameters of altsteps + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Restriction b) +// The evaluation of formal parameters' default values and initialization of local definitions by calling value returning +// functions may have side effects. To avoid side effects that cause an inconsistency between the actual snapshot and the +// state of the component, and to prevent different results of subsequent evaluations on an unchanged snapshot, +// restrictions given in clause 16.1.4 shall apply to the formal parameters' default values and the initialization of local +// definitions. + +module NegSem_1602_toplevel_040 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + timer tc_tmr := 0.1; + } + + function f_test() runs on GeneralComp return boolean { + any timer.timeout; + return true; + } + + altstep a_rcv(boolean p_par := f_test()) runs on GeneralComp { + [] p.receive(integer:?) {} + } + + testcase TC_NegSem_1602_toplevel_040() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + tc_tmr.start; + p.send(1); + alt { + [] a_rcv(); + [] any timer.timeout {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_1602_toplevel_040()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_041.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_041.ttcn new file mode 100644 index 00000000..f55971da --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_041.ttcn @@ -0,0 +1,53 @@ +/*************************************************** + ** @author STF 548 + ** @version 0.0.1 + ** @purpose 1:16.2, verify that a non-deterministic external function call cannot be used in default parameters of altsteps + ** @verdict pass reject + ** @configuration external_functions + ***************************************************/ + +// The following requirement is tested: +// Restriction b) +// The evaluation of formal parameters' default values and initialization of local definitions by calling value returning +// functions may have side effects. To avoid side effects that cause an inconsistency between the actual snapshot and the +// state of the component, and to prevent different results of subsequent evaluations on an unchanged snapshot, +// restrictions given in clause 16.1.4 shall apply to the formal parameters' default values and the initialization of local +// definitions. + +module NegSem_1602_toplevel_041 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + /** + * @return always true + */ + external function xf_NegSem_1602_toplevel_001() return boolean; + + function f_test() runs on GeneralComp return boolean { + if (xf_NegSem_1602_toplevel_001()) { return true; } + else { return true; } + } + + altstep a_rcv(boolean p_par := f_test()) runs on GeneralComp { + [] p.receive(integer:?) {} + } + + testcase TC_NegSem_1602_toplevel_041() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(1); + alt { + [] a_rcv(); + [] any timer.timeout {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_1602_toplevel_041()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_042.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_042.ttcn new file mode 100644 index 00000000..89e6af01 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_042.ttcn @@ -0,0 +1,47 @@ +/*************************************************** + ** @author STF 548 + ** @version 0.0.1 + ** @purpose 1:16.2, verify that the predefined rnd function cannot be used in default parameters of altsteps + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Restriction b) +// The evaluation of formal parameters' default values and initialization of local definitions by calling value returning +// functions may have side effects. To avoid side effects that cause an inconsistency between the actual snapshot and the +// state of the component, and to prevent different results of subsequent evaluations on an unchanged snapshot, +// restrictions given in clause 16.1.4 shall apply to the formal parameters' default values and the initialization of local +// definitions. + +module NegSem_1602_toplevel_042 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return boolean { + if (rnd() > 0.5) { return true; } + else { return true; } + } + + altstep a_rcv(boolean p_par := f_test()) runs on GeneralComp { + [] p.receive(integer:?) {} + } + + testcase TC_NegSem_1602_toplevel_042() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(1); + alt { + [] a_rcv(); + [] any timer.timeout {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_1602_toplevel_042()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_043.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_043.ttcn new file mode 100644 index 00000000..8b731552 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_043.ttcn @@ -0,0 +1,48 @@ +/*************************************************** + ** @author STF 548 + ** @version 0.0.1 + ** @purpose 1:16.2, verify a function called in a default parameter of an altstep cannot contain an assignment of a component variable + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Restriction b) +// The evaluation of formal parameters' default values and initialization of local definitions by calling value returning +// functions may have side effects. To avoid side effects that cause an inconsistency between the actual snapshot and the +// state of the component, and to prevent different results of subsequent evaluations on an unchanged snapshot, +// restrictions given in clause 16.1.4 shall apply to the formal parameters' default values and the initialization of local +// definitions. + +module NegSem_1602_toplevel_043 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + var integer vc_int; + } + + function f_test() runs on GeneralComp return boolean { + vc_int := 1; + return true; + } + + altstep a_rcv(boolean p_par := f_test()) runs on GeneralComp { + [] p.receive(integer:?) {} + } + + testcase TC_NegSem_1602_toplevel_043() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(1); + alt { + [] a_rcv(); + [] any timer.timeout {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_1602_toplevel_043()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_044.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_044.ttcn new file mode 100644 index 00000000..d7005e73 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_044.ttcn @@ -0,0 +1,52 @@ +/*************************************************** + ** @author STF 548 + ** @version 0.0.1 + ** @purpose 1:16.2, verify a function called in a default parameter of an altstep cannot contain a component variable used as an actual out parameter + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Restriction b) +// The evaluation of formal parameters' default values and initialization of local definitions by calling value returning +// functions may have side effects. To avoid side effects that cause an inconsistency between the actual snapshot and the +// state of the component, and to prevent different results of subsequent evaluations on an unchanged snapshot, +// restrictions given in clause 16.1.4 shall apply to the formal parameters' default values and the initialization of local +// definitions. + +module NegSem_1602_toplevel_044 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + var integer vc_int; + } + + function f_out (out integer p_out) { + p_out := 1; + } + + function f_test() runs on GeneralComp return boolean { + f_out(vc_int); + return true; + } + + altstep a_rcv(boolean p_par := f_test()) runs on GeneralComp { + [] p.receive(integer:?) {} + } + + testcase TC_NegSem_1602_toplevel_044() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(1); + alt { + [] a_rcv(); + [] any timer.timeout {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_1602_toplevel_044()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_045.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_045.ttcn new file mode 100644 index 00000000..1ef768e4 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_045.ttcn @@ -0,0 +1,52 @@ +/*************************************************** + ** @author STF 548 + ** @version 0.0.1 + ** @purpose 1:16.2, verify a function called in a default parameter of an altstep cannot contain a component variable used as an actual inout parameter + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Restriction b) +// The evaluation of formal parameters' default values and initialization of local definitions by calling value returning +// functions may have side effects. To avoid side effects that cause an inconsistency between the actual snapshot and the +// state of the component, and to prevent different results of subsequent evaluations on an unchanged snapshot, +// restrictions given in clause 16.1.4 shall apply to the formal parameters' default values and the initialization of local +// definitions. + +module NegSem_1602_toplevel_045 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + var integer vc_int := 0; + } + + function f_inout (inout integer p_inout) { + p_inout := 1; + } + + function f_test() runs on GeneralComp return boolean { + f_inout(vc_int); + return true; + } + + altstep a_rcv(boolean p_par := f_test()) runs on GeneralComp { + [] p.receive(integer:?) {} + } + + testcase TC_NegSem_1602_toplevel_045() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(1); + alt { + [] a_rcv(); + [] any timer.timeout {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_1602_toplevel_045()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_046.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_046.ttcn new file mode 100644 index 00000000..18228278 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_046.ttcn @@ -0,0 +1,47 @@ +/*************************************************** + ** @author STF 548 + ** @version 0.0.1 + ** @purpose 1:16.2, verify that the setverdict operation cannot be used in default parameter of altsteps + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Restriction b) +// The evaluation of formal parameters' default values and initialization of local definitions by calling value returning +// functions may have side effects. To avoid side effects that cause an inconsistency between the actual snapshot and the +// state of the component, and to prevent different results of subsequent evaluations on an unchanged snapshot, +// restrictions given in clause 16.1.4 shall apply to the formal parameters' default values and the initialization of local +// definitions. + +module NegSem_1602_toplevel_046 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return boolean { + setverdict(pass); + return true; + } + + altstep a_rcv(boolean p_par := f_test()) runs on GeneralComp { + [] p.receive(integer:?) {} + } + + testcase TC_NegSem_1602_toplevel_046() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(1); + alt { + [] a_rcv(); + [] any timer.timeout {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_1602_toplevel_046()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_047.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_047.ttcn new file mode 100644 index 00000000..a9b3ea7f --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_047.ttcn @@ -0,0 +1,51 @@ +/*************************************************** + ** @author STF 548 + ** @version 0.0.1 + ** @purpose 1:16.2, verify that the activate operation cannot be used in default parameters of altsteps + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Restriction b) +// The evaluation of formal parameters' default values and initialization of local definitions by calling value returning +// functions may have side effects. To avoid side effects that cause an inconsistency between the actual snapshot and the +// state of the component, and to prevent different results of subsequent evaluations on an unchanged snapshot, +// restrictions given in clause 16.1.4 shall apply to the formal parameters' default values and the initialization of local +// definitions. + +module NegSem_1602_toplevel_047 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + altstep a_anyTimer() runs on GeneralComp { + [] any timer.timeout {} + } + + function f_test() runs on GeneralComp return boolean { + activate(a_anyTimer()); + return true; + } + + altstep a_rcv(boolean p_par := f_test()) runs on GeneralComp { + [] p.receive(integer:?) {} + } + + testcase TC_NegSem_1602_toplevel_047() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(1); + alt { + [] a_rcv(); + [] any timer.timeout {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_1602_toplevel_047()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_048.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_048.ttcn new file mode 100644 index 00000000..56f2ff03 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_048.ttcn @@ -0,0 +1,52 @@ +/*************************************************** + ** @author STF 548 + ** @version 0.0.1 + ** @purpose 1:16.2, verify that the deactivate operation cannot be used in default parameters of altsteps + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Restriction b) +// The evaluation of formal parameters' default values and initialization of local definitions by calling value returning +// functions may have side effects. To avoid side effects that cause an inconsistency between the actual snapshot and the +// state of the component, and to prevent different results of subsequent evaluations on an unchanged snapshot, +// restrictions given in clause 16.1.4 shall apply to the formal parameters' default values and the initialization of local +// definitions. + +module NegSem_1602_toplevel_048 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + altstep a_anyTimer() runs on GeneralComp { + [] any timer.timeout {} + } + + function f_test() runs on GeneralComp return boolean { + deactivate; + return true; + } + + altstep a_rcv(boolean p_par := f_test()) runs on GeneralComp { + [] p.receive(integer:?) {} + } + + testcase TC_NegSem_1602_toplevel_048() runs on GeneralComp system GeneralComp { + activate(a_anyTimer()); + connect(mtc:p, mtc:p); + p.send(1); + alt { + [] a_rcv(); + [] any timer.timeout {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_1602_toplevel_048()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_049.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_049.ttcn new file mode 100644 index 00000000..a33d8341 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_049.ttcn @@ -0,0 +1,55 @@ +/*************************************************** + ** @author STF 548 + ** @version 0.0.1 + ** @purpose 1:16.2, verify that a function used in a default parameter of an altstep cannot contain fuzzy parameters + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Restriction b) +// The evaluation of formal parameters' default values and initialization of local definitions by calling value returning +// functions may have side effects. To avoid side effects that cause an inconsistency between the actual snapshot and the +// state of the component, and to prevent different results of subsequent evaluations on an unchanged snapshot, +// restrictions given in clause 16.1.4 shall apply to the formal parameters' default values and the initialization of local +// definitions. + +module NegSem_1602_toplevel_049 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + var @fuzzy integer v_int := f_eval(); + } + + function f_eval() return integer { + return 10; + } + + function f_test(@fuzzy integer p_par) return boolean { + if (p_par > 0) { + return true; + } else { + return false; + } + } + + altstep a_rcv(boolean p_par := f_test(v_int)) runs on GeneralComp { + [p_par] p.receive(integer:?) {} + } + + testcase TC_NegSem_1602_toplevel_049() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(1); + alt { + [] a_rcv() {} + [] any timer.timeout {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_1602_toplevel_049()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_050.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_050.ttcn new file mode 100644 index 00000000..97145138 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_050.ttcn @@ -0,0 +1,53 @@ +/*************************************************** + ** @author STF 548 + ** @version 0.0.1 + ** @purpose 1:16.2, verify that a external function used in a default parameter of an altstep cannot contain fuzzy parameters + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Restriction b) +// The evaluation of formal parameters' default values and initialization of local definitions by calling value returning +// functions may have side effects. To avoid side effects that cause an inconsistency between the actual snapshot and the +// state of the component, and to prevent different results of subsequent evaluations on an unchanged snapshot, +// restrictions given in clause 16.1.4 shall apply to the formal parameters' default values and the initialization of local +// definitions. + +module NegSem_1602_toplevel_050 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + var @fuzzy integer v_int := f_eval(); + } + + altstep a_anyTimer() runs on GeneralComp { + [] any timer.timeout {} + } + + external function @deterministic f_test(@fuzzy integer p_par) return boolean; + + altstep a_rcv(@fuzzy boolean p_par := f_test(v_int)) runs on GeneralComp { + [p_par] p.receive(integer:?) {} + } + + function f_eval() return integer { + return 10; + } + + testcase TC_NegSem_1602_toplevel_050() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(1); + alt { + [] a_rcv(); + [] any timer.timeout {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_1602_toplevel_050()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_051.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_051.ttcn new file mode 100644 index 00000000..0ab912e5 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_051.ttcn @@ -0,0 +1,52 @@ +/*************************************************** + ** @author STF 548 + ** @version 0.0.1 + ** @purpose 1:16.2, verify that a function used in a default parameter of an altstep cannot contain fuzzy variables + ** @verdict pass reject +***************************************************/ + +// The following requirement is tested: +// Restriction b) +// The evaluation of formal parameters' default values and initialization of local definitions by calling value returning +// functions may have side effects. To avoid side effects that cause an inconsistency between the actual snapshot and the +// state of the component, and to prevent different results of subsequent evaluations on an unchanged snapshot, +// restrictions given in clause 16.1.4 shall apply to the formal parameters' default values and the initialization of local +// definitions. + +module NegSem_1602_toplevel_051 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + function f_test() return integer { + var @fuzzy integer v_int := f_eval(); + return v_int; + } + + + altstep a_rcv(integer p_par := f_test()) runs on GeneralComp { + [] p.receive(p_par) {} + } + + function f_eval() return integer { + return 1; + } + + testcase TC_NegSem_1602_toplevel_051() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(1); + alt { + [] a_rcv(); + [] any timer.timeout {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_1602_toplevel_051()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_052.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_052.ttcn new file mode 100644 index 00000000..c7d39e0b --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_052.ttcn @@ -0,0 +1,47 @@ +/*************************************************** + ** @author STF 548 + ** @version 0.0.1 + ** @purpose 1:16.2, verify that a function used in a parameter of an altstep invoked from an alt branch cannot contain the setencode operation + ** @verdict pass reject +***************************************************/ + +// The following requirement is tested: +// Restriction b) +// The evaluation of formal parameters' default values and initialization of local definitions by calling value returning +// functions may have side effects. To avoid side effects that cause an inconsistency between the actual snapshot and the +// state of the component, and to prevent different results of subsequent evaluations on an unchanged snapshot, +// restrictions given in clause 16.1.4 shall apply to the formal parameters' default values and the initialization of local +// definitions. + +module NegSem_1602_toplevel_052 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return integer { + p.setencode(integer, "Binary"); + return 1; + } + + altstep a_rcv(integer p_par) runs on GeneralComp { + [] p.receive(p_par) {} + } + + testcase TC_NegSem_1602_toplevel_052() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(1); + alt { + [] a_rcv(f_test()); + [] any timer.timeout {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_1602_toplevel_052()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSyn_1602_toplevel_001.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSyn_1602_toplevel_001.ttcn new file mode 100644 index 00000000..2c427c43 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSyn_1602_toplevel_001.ttcn @@ -0,0 +1,57 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:16.2, Ensure that the IUT recognizes altstep definitions and correctly evaluates them + ** @verdict pass reject + ***************************************************/ +module NegSyn_1602_toplevel_001 { + + type record MessageType { + integer field1, + charstring field2 + } + + type port loopbackPort message { + inout MessageType + } + + type component GeneralComp { + port loopbackPort messagePort + } + + function f_test ( integer p_integer := 0 ) runs on GeneralComp return integer { + + return p_integer+1; + } + + + altstep AltSet1() runs on GeneralComp { + + [] messagePort.receive { + setverdict(pass); + } + + var integer v_LocalVar := f_test(); //late definition of a local variable + + } + + testcase TC_NegSyn_1602_toplevel_001 () runs on GeneralComp { + var MessageType v_testMessage; + v_testMessage:= { + field1 := 1, + field2 := "test string" + } + + messagePort.send(v_testMessage); + + AltSet1(); + + } + + control{ + + execute(TC_NegSyn_1602_toplevel_001()); + + } + +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/Sem_1602_toplevel_001.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/Sem_1602_toplevel_001.ttcn new file mode 100644 index 00000000..5aa9a294 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/Sem_1602_toplevel_001.ttcn @@ -0,0 +1,56 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:16.2, Ensure that the IUT recognizes altstep definitions and correctly evaluates them + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Sem_1602_toplevel_001 { + + type record MessageType { + integer field1, + charstring field2 + } + + type port loopbackPort message { + inout MessageType + } + + type component GeneralComp { + port loopbackPort messagePort + } + + function f_test ( integer p_integer := 0 ) runs on GeneralComp return integer { + + return p_integer+1; + } + + + altstep AltSet1() runs on GeneralComp { + var integer v_LocalVar := f_test(); // local variable + + [] messagePort.receive { + setverdict(pass); + } + + } + + testcase TC_Sem_1602_toplevel_001 () runs on GeneralComp { + var MessageType v_testMessage; + v_testMessage:= { + field1 := 1, + field2 := "test string" + } + + messagePort.send(v_testMessage); + + AltSet1(); + + } + + control{ + + execute(TC_Sem_1602_toplevel_001()); + + } + +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/Sem_1602_toplevel_002.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/Sem_1602_toplevel_002.ttcn new file mode 100644 index 00000000..5a3f56e4 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/Sem_1602_toplevel_002.ttcn @@ -0,0 +1,40 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1, verify that altstep with a runs on clause can be started as component behaviour + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Restriction f) +// Altsteps started by using the start test component operation shall always have a runs on clause (see clause 22.5) +// and are considered to be invoked in the component to be started, i.e. not locally. However, the start test component +// operation may be invoked within behaviours without a runs on clause. + +module Sem_1602_toplevel_002 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + altstep a_test() runs on GeneralComp{ + [] any port.receive { + setverdict(pass); + } + } + + testcase TC_Sem_1602_toplevel_002() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + connect(mtc:p, v_ptc:p); + p.send(1); + v_ptc.start(a_test()); + v_ptc.done; + } + + control { + execute(TC_Sem_1602_toplevel_002()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/Sem_1602_toplevel_003.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/Sem_1602_toplevel_003.ttcn new file mode 100644 index 00000000..9a0e8e49 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/Sem_1602_toplevel_003.ttcn @@ -0,0 +1,44 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:16.1, verify that altstep with a runs on clause can be started as component behaviour from a context without a runs on clause + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Restriction f) +// Altsteps started by using the start test component operation shall always have a runs on clause (see clause 22.5) +// and are considered to be invoked in the component to be started, i.e. not locally. However, the start test component +// operation may be invoked within behaviours without a runs on clause. + +module Sem_1602_toplevel_003 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + altstep a_test() runs on GeneralComp{ + [] any port.receive { + setverdict(pass); + } + } + + function f_startPtc(GeneralComp v_ptc) { + v_ptc.start(a_test()); + } + + testcase TC_Sem_1602_toplevel_003() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + connect(mtc:p, v_ptc:p); + p.send(1); + f_startPtc(v_ptc); + v_ptc.done; + } + + control { + execute(TC_Sem_1602_toplevel_003()); + } +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1603_testcases/NegSem_1603_testcases_001.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1603_testcases/NegSem_1603_testcases_001.ttcn new file mode 100644 index 00000000..3dd5f608 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1603_testcases/NegSem_1603_testcases_001.ttcn @@ -0,0 +1,29 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:16.3, Ensure that the IUT properly evaluates invocation of testcases + ** @verdict pass reject + ***************************************************/ +module NegSem_1603_testcases_001 { + +type component GeneralComp { +} + + +testcase TC_NegSem_1603_testcases_001 () runs on GeneralComp { + execute(TC_fail()); //testcases can only be invoked from the control part + setverdict(pass); +} + +testcase TC_fail () runs on GeneralComp { + setverdict(fail); +} + + +control{ + + execute(TC_NegSem_1603_testcases_001()); + +} + +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1603_testcases/NegSem_1603_testcases_002.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1603_testcases/NegSem_1603_testcases_002.ttcn new file mode 100644 index 00000000..c32b2cd0 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1603_testcases/NegSem_1603_testcases_002.ttcn @@ -0,0 +1,29 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:16.3, Ensure that the IUT properly evaluates invocation of testcases + ** @verdict pass reject + ***************************************************/ +module NegSem_1603_testcases_002 { + +type component GeneralComp { +} + + +testcase TC_NegSem_1603_testcases_002 () runs on GeneralComp { + TC_fail(); //testcases can only be invoked from the control part + setverdict(pass); +} + +testcase TC_fail () runs on GeneralComp { + setverdict(fail); +} + + +control{ + + execute(TC_NegSem_1603_testcases_002()); + +} + +} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1603_testcases/Syn_1603_testcases_001.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1603_testcases/Syn_1603_testcases_001.ttcn new file mode 100644 index 00000000..d4cda719 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1603_testcases/Syn_1603_testcases_001.ttcn @@ -0,0 +1,24 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:16.3, Ensure that the IUT properly evaluates invocation of testcases with system clause + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Syn_1603_testcases_001 { + +type component GeneralComp { +} + +testcase TC_Syn_1603_testcases_001 () runs on GeneralComp system GeneralComp { + + setverdict(pass); +} + + +control{ + + execute(TC_Syn_1603_testcases_001()); + +} + +} diff --git a/ATS/core_language/18_overview_program_statements_and_operations/NOTES b/ATS/core_language/18_overview_program_statements_and_operations/NOTES new file mode 100644 index 00000000..738791c6 --- /dev/null +++ b/ATS/core_language/18_overview_program_statements_and_operations/NOTES @@ -0,0 +1 @@ +- NOTE: this chapter contains only one table describing where statements are allowed to be used. All these elements were already tested by the other chapters \ No newline at end of file diff --git a/ATS/core_language/19_basic_program_statements/1901_assignments/NegSem_1901_assignments_001.ttcn b/ATS/core_language/19_basic_program_statements/1901_assignments/NegSem_1901_assignments_001.ttcn new file mode 100644 index 00000000..2d50e84d --- /dev/null +++ b/ATS/core_language/19_basic_program_statements/1901_assignments/NegSem_1901_assignments_001.ttcn @@ -0,0 +1,26 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:19.1, Ensure that the IUT properly evaluates assignment statements + ** @verdict pass reject + ***************************************************/ +module NegSem_1901_assignments_001 { + +type component GeneralComp { +} + +testcase TC_NegSem_1901_assignments_001 () runs on GeneralComp system GeneralComp { + var integer v_i; + var integer v_j; + + v_j:=v_i; //assignment of unbounded expression + +} + +control{ + + execute(TC_NegSem_1901_assignments_001()); + +} + +} diff --git a/ATS/core_language/19_basic_program_statements/1901_assignments/NegSem_1901_assignments_002.ttcn b/ATS/core_language/19_basic_program_statements/1901_assignments/NegSem_1901_assignments_002.ttcn new file mode 100644 index 00000000..59422d21 --- /dev/null +++ b/ATS/core_language/19_basic_program_statements/1901_assignments/NegSem_1901_assignments_002.ttcn @@ -0,0 +1,25 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:19.1, Ensure that the IUT properly evaluates assignment statements + ** @verdict pass reject + ***************************************************/ +module NegSem_1901_assignments_002 { + +type component GeneralComp { +} + +testcase TC_NegSem_1901_assignments_002 () runs on GeneralComp system GeneralComp { + var integer v_i; + + v_i:=1.5; //assignment of incompatible expression + +} + +control{ + + execute(TC_NegSem_1901_assignments_002()); + +} + +} diff --git a/ATS/core_language/19_basic_program_statements/1901_assignments/NegSem_1901_assignments_003.ttcn b/ATS/core_language/19_basic_program_statements/1901_assignments/NegSem_1901_assignments_003.ttcn new file mode 100644 index 00000000..f911027f --- /dev/null +++ b/ATS/core_language/19_basic_program_statements/1901_assignments/NegSem_1901_assignments_003.ttcn @@ -0,0 +1,25 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:19.1, Ensure that the IUT properly evaluates assignment statements + ** @verdict pass reject + ***************************************************/ +module NegSem_1901_assignments_003 { + +type component GeneralComp { +} + +testcase TC_NegSem_1901_assignments_003 () runs on GeneralComp system GeneralComp { + var charstring v_i; + + v_i:=pattern "a??b"; //assignment of incompatible expression + +} + +control{ + + execute(TC_NegSem_1901_assignments_003()); + +} + +} diff --git a/ATS/core_language/19_basic_program_statements/1901_assignments/NegSem_1901_assignments_004.ttcn b/ATS/core_language/19_basic_program_statements/1901_assignments/NegSem_1901_assignments_004.ttcn new file mode 100644 index 00000000..0fcdc069 --- /dev/null +++ b/ATS/core_language/19_basic_program_statements/1901_assignments/NegSem_1901_assignments_004.ttcn @@ -0,0 +1,39 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:19.1, Ensure that omit assignment to a record non-optional value is not allowed + ** @verdict pass reject + ***************************************************/ + +//Restriction c) +/*If the left-hand side of the assignment is a reference to a non-optional value object (i.e. a value definition, a mandatory field, a record/set of/array element, a union alternative, a value parameter), + * the right-hand side shall not be a reference to an omitted field or the omit symbol.*/ + +module NegSem_1901_assignments_004{ + +type component GeneralComp { +} + + type record Myrec{ + integer field1, + float field2 + }; + +testcase TC_NegSem_1901_assignments_004 () runs on GeneralComp system GeneralComp { + + var Myrec v_i; + + v_i:={11,omit}; //assignment not allowed + + setverdict(pass,v_i); + +} + + +control{ + + execute(TC_NegSem_1901_assignments_004()); + +} + +} diff --git a/ATS/core_language/19_basic_program_statements/1901_assignments/NegSem_1901_assignments_005.ttcn b/ATS/core_language/19_basic_program_statements/1901_assignments/NegSem_1901_assignments_005.ttcn new file mode 100644 index 00000000..1903a24a --- /dev/null +++ b/ATS/core_language/19_basic_program_statements/1901_assignments/NegSem_1901_assignments_005.ttcn @@ -0,0 +1,36 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:19.1, Ensure that omit assignment to set of non-optional value is not allowed + ** @verdict pass reject + ***************************************************/ + + //Restriction c) +/*If the left-hand side of the assignment is a reference to a non-optional value object (i.e. a value definition, a mandatory field, a record/set of/array element, a union alternative, a value parameter), +the right-hand side shall not be a reference to an omitted field or the omit symbol.*/ + +module NegSem_1901_assignments_005{ + +type component GeneralComp { +} + + type set of integer Myset; + +testcase TC_NegSem_1901_assignments_005 () runs on GeneralComp system GeneralComp { + + var Myset v_i; + + v_i:={11,omit}; //assignment not allowed + + setverdict(pass,v_i); + +} + + +control{ + + execute(TC_NegSem_1901_assignments_005()); + +} + +} diff --git a/ATS/core_language/19_basic_program_statements/1901_assignments/NegSem_1901_assignments_006.ttcn b/ATS/core_language/19_basic_program_statements/1901_assignments/NegSem_1901_assignments_006.ttcn new file mode 100644 index 00000000..73172abe --- /dev/null +++ b/ATS/core_language/19_basic_program_statements/1901_assignments/NegSem_1901_assignments_006.ttcn @@ -0,0 +1,36 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:19.1, Ensure that omit assignment to an array is not allowed + ** @verdict pass reject + ***************************************************/ + +//Restriction c) +/*If the left-hand side of the assignment is a reference to a non-optional value object (i.e. a value definition, a mandatory field, a record/set of/array element, a union alternative, a value parameter), +the right-hand side shall not be a reference to an omitted field or the omit symbol.*/ + +module NegSem_1901_assignments_006{ + +type component GeneralComp { +} + + + +testcase TC_NegSem_1901_assignments_006 () runs on GeneralComp system GeneralComp { + + var integer v_i[2]; + + v_i:={11,omit}; //assignment not allowed + + setverdict(pass,v_i); + +} + + +control{ + + execute(TC_NegSem_1901_assignments_006()); + +} + +} diff --git a/ATS/core_language/19_basic_program_statements/1901_assignments/NegSyn_1901_assignments_001.ttcn b/ATS/core_language/19_basic_program_statements/1901_assignments/NegSyn_1901_assignments_001.ttcn new file mode 100644 index 00000000..b63908f0 --- /dev/null +++ b/ATS/core_language/19_basic_program_statements/1901_assignments/NegSyn_1901_assignments_001.ttcn @@ -0,0 +1,28 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:19.1, Ensure that the IUT properly evaluates assignment statements + ** @verdict pass reject + ***************************************************/ +module NegSyn_1901_assignments_001 { + +type component GeneralComp { +} + +testcase TC_NegSyn_1901_assignments_001 () runs on GeneralComp system GeneralComp { + var integer v_i; + var integer v_j; + var integer v_k; + v_i:=1; + v_k:=(v_j:=v_i); //such sequential assignments are not allowed by the syntax + +} + + +control{ + + execute(TC_NegSyn_1901_assignments_001()); + +} + +} diff --git a/ATS/core_language/19_basic_program_statements/1901_assignments/Sem_1901_assignments_001.ttcn b/ATS/core_language/19_basic_program_statements/1901_assignments/Sem_1901_assignments_001.ttcn new file mode 100644 index 00000000..fd56e2ac --- /dev/null +++ b/ATS/core_language/19_basic_program_statements/1901_assignments/Sem_1901_assignments_001.ttcn @@ -0,0 +1,31 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:19.1, Ensure that the IUT properly evaluates assignment statements + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Sem_1901_assignments_001 { + +type component GeneralComp { +} + +testcase TC_Sem_1901_assignments_001 () runs on GeneralComp system GeneralComp { + var integer v_i; + v_i:=3*(2+3*3); //validation of the order of evaluating assignment expressions + + if ( v_i==33 ) { + setverdict(pass); + } + else { + setverdict(fail); + } +} + + +control{ + + execute(TC_Sem_1901_assignments_001()); + +} + +} diff --git a/ATS/core_language/19_basic_program_statements/1901_assignments/Sem_1901_assignments_002.ttcn b/ATS/core_language/19_basic_program_statements/1901_assignments/Sem_1901_assignments_002.ttcn new file mode 100644 index 00000000..3eb9d6e3 --- /dev/null +++ b/ATS/core_language/19_basic_program_statements/1901_assignments/Sem_1901_assignments_002.ttcn @@ -0,0 +1,39 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:19.1, Ensure that uninitialized at the right-hand side of the assignment shall also become uninitialized at the left-hand side + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +module Sem_1901_assignments_002{ + +type component GeneralComp { +} + + type record Myrec{ + integer field1, + float field2 + }; + +testcase TC_Sem_1901_assignments_002 () runs on GeneralComp system GeneralComp { + var Myrec v_i :={11,1.1}; //fully initialized variable + var Myrec v_j :={12}; //partly initialized variable + + v_i:=v_j; //assignment, v_i is now partly initialized variable + + if (isvalue(v_i)) { + setverdict(fail,v_i); + } + else { + setverdict(pass,v_i); + } +} + + +control{ + + execute(TC_Sem_1901_assignments_002()); + +} + +} diff --git a/ATS/core_language/19_basic_program_statements/1901_assignments/Sem_1901_assignments_003.ttcn b/ATS/core_language/19_basic_program_statements/1901_assignments/Sem_1901_assignments_003.ttcn new file mode 100644 index 00000000..f3a959d4 --- /dev/null +++ b/ATS/core_language/19_basic_program_statements/1901_assignments/Sem_1901_assignments_003.ttcn @@ -0,0 +1,39 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:19.1, Ensure that the right-hand side of the assignment of a structured value is evaulted correctly + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +module Sem_1901_assignments_003{ + +type component GeneralComp { +} + + type record Myrec{ + integer field1, + float field2 + }; + +testcase TC_Sem_1901_assignments_003 () runs on GeneralComp system GeneralComp { + var Myrec v_j :={11,1.1}; //fully initialized variable + var Myrec v_i; + + v_i:=v_j; //assignment + + if (match(v_i,v_j)) { + setverdict(pass,v_i); + } + else { + setverdict(fail,v_i); + } +} + + +control{ + + execute(TC_Sem_1901_assignments_003()); + +} + +} diff --git a/ATS/core_language/19_basic_program_statements/1901_assignments/Sem_1901_assignments_004.ttcn b/ATS/core_language/19_basic_program_statements/1901_assignments/Sem_1901_assignments_004.ttcn new file mode 100644 index 00000000..dbf11d76 --- /dev/null +++ b/ATS/core_language/19_basic_program_statements/1901_assignments/Sem_1901_assignments_004.ttcn @@ -0,0 +1,45 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:19.1, Ensure that Ensure that the right-hand side of the assignment of a structured value is evaulted correctly + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +//Restriction d) Using a reference to an omitted field in the right-hand side of the assignment has the same effect as using the omit keyword. + +module Sem_1901_assignments_004{ + +type component GeneralComp { +} + + type record Myrec{ + integer field1, + float field2 optional + }; + +type record Myrec_2{ + float field optional + }; + +testcase TC_Sem_1901_assignments_004 () runs on GeneralComp system GeneralComp { + var Myrec v_j :={11,omit}; + var Myrec_2 v_i; + + v_i.field:=v_j.field2; //assignment + + if (match(v_i.field,omit)) { + setverdict(pass,v_i); + } + else { + setverdict(fail,v_i); + } +} + + +control{ + + execute(TC_Sem_1901_assignments_004()); + +} + +} diff --git a/ATS/core_language/19_basic_program_statements/1902_if_else_statement/NegSyn_1902_if_else_statement_001.ttcn b/ATS/core_language/19_basic_program_statements/1902_if_else_statement/NegSyn_1902_if_else_statement_001.ttcn new file mode 100644 index 00000000..bd9d6a5f --- /dev/null +++ b/ATS/core_language/19_basic_program_statements/1902_if_else_statement/NegSyn_1902_if_else_statement_001.ttcn @@ -0,0 +1,29 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:19.2, If statement requires curly brackets for the body + ** @verdict pass reject + ***************************************************/ +module NegSyn_1902_if_else_statement_001 { + +type component GeneralComp { +} + +testcase TC_NegSyn_1902_if_else_statement_001 () runs on GeneralComp{ + + for(var integer v_i:=1; v_i<10; v_i:= j+1) { + } + + if(v_i==10) + setverdict(pass); // missing { } as defined by grammar rule 175 StatementBlock + +} + + +control{ + + execute(TC_NegSyn_1902_if_else_statement_001()); + +} + +} diff --git a/ATS/core_language/19_basic_program_statements/1902_if_else_statement/Sem_1902_if_else_statement_001.ttcn b/ATS/core_language/19_basic_program_statements/1902_if_else_statement/Sem_1902_if_else_statement_001.ttcn new file mode 100644 index 00000000..f00e9765 --- /dev/null +++ b/ATS/core_language/19_basic_program_statements/1902_if_else_statement/Sem_1902_if_else_statement_001.ttcn @@ -0,0 +1,36 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:19.2, Ensure that the IUT properly evaluates if-else statements + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Sem_1902_if_else_statement_001 { + +type component GeneralComp { +} + +testcase TC_Sem_1902_if_else_statement_001 () runs on GeneralComp{ + var integer v_i:=1; + var integer v_j:=2; + + if ( v_i==1 ) { //testing of nested if-else statement + if( v_j==1) { + setverdict(fail); + } + else { + setverdict(pass); + } + } + else { + setverdict(fail); + } +} + + +control{ + + execute(TC_Sem_1902_if_else_statement_001()); + +} + +} diff --git a/ATS/core_language/19_basic_program_statements/1902_if_else_statement/Sem_1902_if_else_statement_002.ttcn b/ATS/core_language/19_basic_program_statements/1902_if_else_statement/Sem_1902_if_else_statement_002.ttcn new file mode 100644 index 00000000..c67d33c5 --- /dev/null +++ b/ATS/core_language/19_basic_program_statements/1902_if_else_statement/Sem_1902_if_else_statement_002.ttcn @@ -0,0 +1,28 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:19.2, Ensure that the IUT properly evaluates if-else statements + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Sem_1902_if_else_statement_002 { + +type component GeneralComp { +} + +testcase TC_Sem_1902_if_else_statement_002 () runs on GeneralComp{ + var integer v_i:=1; + + if ( match(v_i, 2) ) { + setverdict(fail); + } + else if(match(v_i, 1)) { setverdict(pass) }; //else if shorthand notation +} + + +control{ + + execute(TC_Sem_1902_if_else_statement_002()); + +} + +} diff --git a/ATS/core_language/19_basic_program_statements/1903_select_statements/190301_select_case_statement/NegSem_190301_select_case_statement_001.ttcn b/ATS/core_language/19_basic_program_statements/1903_select_statements/190301_select_case_statement/NegSem_190301_select_case_statement_001.ttcn new file mode 100644 index 00000000..725f8d70 --- /dev/null +++ b/ATS/core_language/19_basic_program_statements/1903_select_statements/190301_select_case_statement/NegSem_190301_select_case_statement_001.ttcn @@ -0,0 +1,44 @@ +/*************************************************** + ** @author STF 548 + ** @version 0.0.1 + ** @purpose 1:19.3, Verify that two branches of the select-case statement cannot match the same value (simple case) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Restriction b: +// When all templateInstances of all branches can be statically evaluated in compile time to specific values or +// value ranges no two branches shall match the same value + +module NegSem_190301_select_case_statement_001 { + +type component GeneralComp { +} + +testcase TC_NegSem_190301_select_case_statement_001 () runs on GeneralComp{ + var integer v_i := 2; + + select (v_i) { + case(1) { + setverdict(fail); + } + case(2) { + setverdict(pass); + } + case(2) { + setverdict(fail); + } + case else { + setverdict(fail); + } + } +} + + +control{ + + execute(TC_NegSem_190301_select_case_statement_001()); + +} + +} diff --git a/ATS/core_language/19_basic_program_statements/1903_select_statements/190301_select_case_statement/NegSem_190301_select_case_statement_002.ttcn b/ATS/core_language/19_basic_program_statements/1903_select_statements/190301_select_case_statement/NegSem_190301_select_case_statement_002.ttcn new file mode 100644 index 00000000..61635606 --- /dev/null +++ b/ATS/core_language/19_basic_program_statements/1903_select_statements/190301_select_case_statement/NegSem_190301_select_case_statement_002.ttcn @@ -0,0 +1,44 @@ +/*************************************************** + ** @author STF 548 + ** @version 0.0.1 + ** @purpose 1:19.3, Verify that two branches of the select-case statement cannot match the same value (list case) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Restriction b: +// When all templateInstances of all branches can be statically evaluated in compile time to specific values or +// value ranges no two branches shall match the same value + +module NegSem_190301_select_case_statement_002 { + +type component GeneralComp { +} + +testcase TC_NegSem_190301_select_case_statement_002 () runs on GeneralComp{ + var integer v_i := 2; + + select (v_i) { + case(1) { + setverdict(fail); + } + case(0, 2) { + setverdict(pass); + } + case(4, 5, 2) { + setverdict(fail); + } + case else { + setverdict(fail); + } + } +} + + +control{ + + execute(TC_NegSem_190301_select_case_statement_002()); + +} + +} diff --git a/ATS/core_language/19_basic_program_statements/1903_select_statements/190301_select_case_statement/Sem_190301_select_case_statement_001.ttcn b/ATS/core_language/19_basic_program_statements/1903_select_statements/190301_select_case_statement/Sem_190301_select_case_statement_001.ttcn new file mode 100644 index 00000000..0ab3618b --- /dev/null +++ b/ATS/core_language/19_basic_program_statements/1903_select_statements/190301_select_case_statement/Sem_190301_select_case_statement_001.ttcn @@ -0,0 +1,38 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:19.3, Ensure that the IUT properly evaluates select-case statements + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Sem_190301_select_case_statement_001 { + +type component GeneralComp { +} + +testcase TC_Sem_190301_select_case_statement_001 () runs on GeneralComp{ + var integer v_i:=2; + + select (v_i) { + case(1) { + setverdict(fail); + } + case(2) { + setverdict(pass); + } + case(3) { + setverdict(fail); + } + case else { + setverdict(fail); + } + } +} + + +control{ + + execute(TC_Sem_190301_select_case_statement_001()); + +} + +} diff --git a/ATS/core_language/19_basic_program_statements/1903_select_statements/190301_select_case_statement/Sem_190301_select_case_statement_002.ttcn b/ATS/core_language/19_basic_program_statements/1903_select_statements/190301_select_case_statement/Sem_190301_select_case_statement_002.ttcn new file mode 100644 index 00000000..a3867806 --- /dev/null +++ b/ATS/core_language/19_basic_program_statements/1903_select_statements/190301_select_case_statement/Sem_190301_select_case_statement_002.ttcn @@ -0,0 +1,38 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:19.3, Ensure that the IUT properly evaluates select-case statements + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Sem_190301_select_case_statement_002 { + +type component GeneralComp { +} + +testcase TC_Sem_190301_select_case_statement_002 () runs on GeneralComp{ + var integer v_i:=5; + + select (v_i) { + case(1) { + setverdict(fail); + } + case(2) { + setverdict(fail); + } + case(3) { + setverdict(fail); + } + case else { + setverdict(pass); + } + } +} + + +control{ + + execute(TC_Sem_190301_select_case_statement_002()); + +} + +} diff --git a/ATS/core_language/19_basic_program_statements/1903_select_statements/190301_select_case_statement/Sem_190301_select_case_statement_003.ttcn b/ATS/core_language/19_basic_program_statements/1903_select_statements/190301_select_case_statement/Sem_190301_select_case_statement_003.ttcn new file mode 100644 index 00000000..e2e85771 --- /dev/null +++ b/ATS/core_language/19_basic_program_statements/1903_select_statements/190301_select_case_statement/Sem_190301_select_case_statement_003.ttcn @@ -0,0 +1,36 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:19.3, Ensure that the IUT properly evaluates select-case statements + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Sem_190301_select_case_statement_003 { + +type component GeneralComp { +} + +testcase TC_Sem_190301_select_case_statement_003 () runs on GeneralComp{ + var integer v_i:=5; + + setverdict(pass); + select (v_i) { + case(1) { + setverdict(fail); + } + case(2) { + setverdict(fail); + } + case(3) { + setverdict(fail); + } + } +} + + +control{ + + execute(TC_Sem_190301_select_case_statement_003()); + +} + +} diff --git a/ATS/core_language/19_basic_program_statements/1903_select_statements/190301_select_case_statement/Sem_190301_select_case_statement_004.ttcn b/ATS/core_language/19_basic_program_statements/1903_select_statements/190301_select_case_statement/Sem_190301_select_case_statement_004.ttcn new file mode 100644 index 00000000..e2aa582d --- /dev/null +++ b/ATS/core_language/19_basic_program_statements/1903_select_statements/190301_select_case_statement/Sem_190301_select_case_statement_004.ttcn @@ -0,0 +1,38 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:19.3, Ensure that the IUT properly evaluates select-case statements + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Sem_190301_select_case_statement_004 { + +type component GeneralComp { +} + +testcase TC_Sem_190301_select_case_statement_004 () runs on GeneralComp{ + var integer v_i:=2; + + select (v_i) { + case(1) { + setverdict(fail); + } + case(2) { + setverdict(pass); + } + case(3) { + setverdict(fail); + } + case else { + setverdict(fail); + } + } +} + + +control{ + + execute(TC_Sem_190301_select_case_statement_004()); + +} + +} diff --git a/ATS/core_language/19_basic_program_statements/1903_select_statements/190301_select_case_statement/Sem_190301_select_case_statement_005.ttcn b/ATS/core_language/19_basic_program_statements/1903_select_statements/190301_select_case_statement/Sem_190301_select_case_statement_005.ttcn new file mode 100644 index 00000000..65df49c3 --- /dev/null +++ b/ATS/core_language/19_basic_program_statements/1903_select_statements/190301_select_case_statement/Sem_190301_select_case_statement_005.ttcn @@ -0,0 +1,38 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:19.3, Ensure that the IUT properly evaluates select-case statements + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Sem_190301_select_case_statement_005 { + +type component GeneralComp { +} + +testcase TC_Sem_190301_select_case_statement_005 () runs on GeneralComp{ + var charstring v_i:="aBcDeFg"; + + select (v_i) { + case(charstring:"aBc") { + setverdict(fail); + } + case(charstring:"aBcDeFg") { + setverdict(pass); + } + case(charstring:"aBcD") { + setverdict(fail); + } + case else { + setverdict(fail); + } + } +} + + +control{ + + execute(TC_Sem_190301_select_case_statement_005()); + +} + +} diff --git a/ATS/core_language/19_basic_program_statements/1903_select_statements/190301_select_case_statement/Sem_190301_select_case_statement_006.ttcn b/ATS/core_language/19_basic_program_statements/1903_select_statements/190301_select_case_statement/Sem_190301_select_case_statement_006.ttcn new file mode 100644 index 00000000..40d4ceb2 --- /dev/null +++ b/ATS/core_language/19_basic_program_statements/1903_select_statements/190301_select_case_statement/Sem_190301_select_case_statement_006.ttcn @@ -0,0 +1,37 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:19.3, Ensure that the IUT properly evaluates select-case statements + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Sem_190301_select_case_statement_006 { +modulepar charstring c_par := "aBcDeFg"; + +type component GeneralComp { +} + +testcase TC_Sem_190301_select_case_statement_006 () runs on GeneralComp{ + + select (c_par) { + case(charstring:"aBc") { + setverdict(fail); + } + case(charstring:"aBcDeFg") { + setverdict(pass); + } + case(charstring:"aBcD") { + setverdict(fail); + } + case else { + setverdict(fail); + } +} +} + +control{ + + execute(TC_Sem_190301_select_case_statement_006()); + +} + +} diff --git a/ATS/core_language/19_basic_program_statements/1903_select_statements/190302_select_union_statement/NegSem_190302_select_union_statement_001.ttcn b/ATS/core_language/19_basic_program_statements/1903_select_statements/190302_select_union_statement/NegSem_190302_select_union_statement_001.ttcn new file mode 100644 index 00000000..ec76c88b --- /dev/null +++ b/ATS/core_language/19_basic_program_statements/1903_select_statements/190302_select_union_statement/NegSem_190302_select_union_statement_001.ttcn @@ -0,0 +1,39 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:19.3.2, verify that header part of select-union statements cannot contain anything else than union instances + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// In the header part of the select union statement a template instance of union +// type shall be given. + +module NegSem_190302_select_union_statement_001 { + + type component GeneralComp { + } + + type record R { + integer intOption optional, + charstring strOption optional, + boolean boolOption optional + } + + testcase TC_NegSem_190302_select_union_statement_001() runs on GeneralComp { + var R v_rec := { intOption := omit, strOption := "abc", boolOption := omit } + select union (v_rec) { + case (intOption) { + setverdict(pass); + } case (strOption) { + setverdict(pass); + } case (boolOption) { + setverdict(pass); + } + } + } + + control { + execute(TC_NegSem_190302_select_union_statement_001()); + } +} diff --git a/ATS/core_language/19_basic_program_statements/1903_select_statements/190302_select_union_statement/NegSem_190302_select_union_statement_002.ttcn b/ATS/core_language/19_basic_program_statements/1903_select_statements/190302_select_union_statement/NegSem_190302_select_union_statement_002.ttcn new file mode 100644 index 00000000..6582dbec --- /dev/null +++ b/ATS/core_language/19_basic_program_statements/1903_select_statements/190302_select_union_statement/NegSem_190302_select_union_statement_002.ttcn @@ -0,0 +1,48 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:19.3.2, verify that uninitialized value cannot be used in select union header + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// [The TemplateInstance in the header of the select union statement] shall be +// at least partially initialized. + +module NegSem_190302_select_union_statement_002 { + + type component GeneralComp { + } + + type union U { + integer intOption, + charstring strOption, + record { + integer field1, + integer field2 + } recOption + } + + type record R { + U field1, + integer field2 + } + + testcase TC_NegSem_190302_select_union_statement_002() runs on GeneralComp { + var R v_rec; + v_rec.field2 := 3; + select union (v_rec.field1) { + case (intOption) { + setverdict(fail); + } case (strOption) { + setverdict(fail); + } case (recOption) { + setverdict(pass); + } + } + } + + control { + execute(TC_NegSem_190302_select_union_statement_002()); + } +} diff --git a/ATS/core_language/19_basic_program_statements/1903_select_statements/190302_select_union_statement/NegSem_190302_select_union_statement_003.ttcn b/ATS/core_language/19_basic_program_statements/1903_select_statements/190302_select_union_statement/NegSem_190302_select_union_statement_003.ttcn new file mode 100644 index 00000000..577aa246 --- /dev/null +++ b/ATS/core_language/19_basic_program_statements/1903_select_statements/190302_select_union_statement/NegSem_190302_select_union_statement_003.ttcn @@ -0,0 +1,45 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:19.3.2, verify that unknown alternatives cannot be use in case statements + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Every Identifier in a case of the select union statement shall be an identifier +// of an alternative of the union type of the template instance given to the +// statement's header. + +module NegSem_190302_select_union_statement_003 { + + type component GeneralComp { + } + + type union U { + integer intOption, + charstring strOption, + record { + integer field1, + integer field2 + } recOption + } + + testcase TC_NegSem_190302_select_union_statement_003() runs on GeneralComp { + var U v_un := { intOption := 5 } + select union (v_un) { + case (intOption) { + setverdict(pass); + } case (strOption) { + setverdict(fail); + } case (recOption) { + setverdict(fail); + } case (boolOption) { + setverdict(fail); + } + } + } + + control { + execute(TC_NegSem_190302_select_union_statement_003()); + } +} diff --git a/ATS/core_language/19_basic_program_statements/1903_select_statements/190302_select_union_statement/NegSem_190302_select_union_statement_004.ttcn b/ATS/core_language/19_basic_program_statements/1903_select_statements/190302_select_union_statement/NegSem_190302_select_union_statement_004.ttcn new file mode 100644 index 00000000..d9aa62be --- /dev/null +++ b/ATS/core_language/19_basic_program_statements/1903_select_statements/190302_select_union_statement/NegSem_190302_select_union_statement_004.ttcn @@ -0,0 +1,43 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:19.3.2, verify that the same alternative cannot be used in two case statements (simple case) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// No two cases in a select union statement shall have the same case Identifier. + +module NegSem_190302_select_union_statement_004 { + + type component GeneralComp { + } + + type union U { + integer intOption, + charstring strOption, + record { + integer field1, + integer field2 + } recOption + } + + testcase TC_NegSem_190302_select_union_statement_004() runs on GeneralComp { + var U v_un := { recOption := { field1 := 1, field2 := 2 } } + select union (v_un) { + case (intOption) { + setverdict(pass); + } case (strOption) { + setverdict(fail); + } case (recOption) { + setverdict(fail); + } case (intOption) { + setverdict(pass); + } + } + } + + control { + execute(TC_NegSem_190302_select_union_statement_004()); + } +} diff --git a/ATS/core_language/19_basic_program_statements/1903_select_statements/190302_select_union_statement/NegSem_190302_select_union_statement_005.ttcn b/ATS/core_language/19_basic_program_statements/1903_select_statements/190302_select_union_statement/NegSem_190302_select_union_statement_005.ttcn new file mode 100644 index 00000000..c1e742cc --- /dev/null +++ b/ATS/core_language/19_basic_program_statements/1903_select_statements/190302_select_union_statement/NegSem_190302_select_union_statement_005.ttcn @@ -0,0 +1,39 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:19.3.2, verify that the same alternative cannot be used in two case statements (list item) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// No two cases in a select union statement shall have the same case Identifier. + +module NegSem_190302_select_union_statement_005 { + + type component GeneralComp { + } + + type union U { + integer intOption, + charstring strOption, + record { + integer field1, + integer field2 + } recOption + } + + testcase TC_NegSem_190302_select_union_statement_005() runs on GeneralComp { + var U v_un := { intOption := 10 } + select union (v_un) { + case (intOption, strOption) { + setverdict(pass); + } case (recOption, intOption) { + setverdict(fail); + } + } + } + + control { + execute(TC_NegSem_190302_select_union_statement_005()); + } +} diff --git a/ATS/core_language/19_basic_program_statements/1903_select_statements/190302_select_union_statement/NegSem_190302_select_union_statement_006.ttcn b/ATS/core_language/19_basic_program_statements/1903_select_statements/190302_select_union_statement/NegSem_190302_select_union_statement_006.ttcn new file mode 100644 index 00000000..49d83f1b --- /dev/null +++ b/ATS/core_language/19_basic_program_statements/1903_select_statements/190302_select_union_statement/NegSem_190302_select_union_statement_006.ttcn @@ -0,0 +1,41 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:19.3.2, verify that it is possible to use a select union statement with several branches + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// c) No two cases in a select union statement shall have the same caseIdentifier or TypeIdentifier. +module NegSem_190302_select_union_statement_006 { + + type component GeneralComp { + } + + testcase TC_NegSem_190302_select_union_statement_006() runs on GeneralComp { + var anytype v_any; + v_any.integer := 2; + v_any.charstring := "abc"; + v_any.float := 1.2; + + select union (v_any) { + case (charstring) { + if(match(v_any.charstring,"abc")) + {setverdict(pass, v_any.charstring);} + } case (integer) { + if(match(v_any.integer,2)) + {setverdict(pass, v_any.integer);} + } case (charstring) { // error + if(match(v_any.charstring,"abc")) + {setverdict(fail, v_any.charstring);} + } + case else { + setverdict(fail); + } + } + } + + control { + execute(TC_NegSem_190302_select_union_statement_006()); + } +} diff --git a/ATS/core_language/19_basic_program_statements/1903_select_statements/190302_select_union_statement/Sem_190302_select_union_statement_001.ttcn b/ATS/core_language/19_basic_program_statements/1903_select_statements/190302_select_union_statement/Sem_190302_select_union_statement_001.ttcn new file mode 100644 index 00000000..7103ede4 --- /dev/null +++ b/ATS/core_language/19_basic_program_statements/1903_select_statements/190302_select_union_statement/Sem_190302_select_union_statement_001.ttcn @@ -0,0 +1,38 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:19.3.2, verify that it is possible to use a select union statement with several branches + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// The statement contains a header part and zero or more branches. + +module Sem_190302_select_union_statement_001 { + + type component GeneralComp { + } + + type union U { + integer intOption, + charstring strOption, + boolean boolOption + } + + testcase TC_Sem_190302_select_union_statement_001() runs on GeneralComp { + var U v_un := { strOption := "abc" } + select union (v_un) { + case (intOption) { + setverdict(fail); + } case (strOption) { + setverdict(pass); + } case (boolOption) { + setverdict(fail); + } + } + } + + control { + execute(TC_Sem_190302_select_union_statement_001()); + } +} diff --git a/ATS/core_language/19_basic_program_statements/1903_select_statements/190302_select_union_statement/Sem_190302_select_union_statement_002.ttcn b/ATS/core_language/19_basic_program_statements/1903_select_statements/190302_select_union_statement/Sem_190302_select_union_statement_002.ttcn new file mode 100644 index 00000000..33f75c87 --- /dev/null +++ b/ATS/core_language/19_basic_program_statements/1903_select_statements/190302_select_union_statement/Sem_190302_select_union_statement_002.ttcn @@ -0,0 +1,39 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:19.3.2, verify that it is possible to use comma separated list of alternatives in case branches + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Each branch shall start with the case keyword followed by one or more identifiers +// of the alternatives (fields) of the union type (a list branch) or the else keyword +// (an else branch) and a statement block. + +module Sem_190302_select_union_statement_002 { + + type component GeneralComp { + } + + type union U { + integer intOption, + charstring strOption, + boolean boolOption, + bitstring bitOption + } + + testcase TC_Sem_190302_select_union_statement_002() runs on GeneralComp { + var U v_un := { strOption := "abc" } + select union (v_un) { + case (intOption, boolOption, strOption) { + setverdict(pass); + } case (bitOption) { + setverdict(fail); + } + } + } + + control { + execute(TC_Sem_190302_select_union_statement_002()); + } +} diff --git a/ATS/core_language/19_basic_program_statements/1903_select_statements/190302_select_union_statement/Sem_190302_select_union_statement_003.ttcn b/ATS/core_language/19_basic_program_statements/1903_select_statements/190302_select_union_statement/Sem_190302_select_union_statement_003.ttcn new file mode 100644 index 00000000..5d6afd03 --- /dev/null +++ b/ATS/core_language/19_basic_program_statements/1903_select_statements/190302_select_union_statement/Sem_190302_select_union_statement_003.ttcn @@ -0,0 +1,41 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:19.3.2, verify that it is possible to use an else branches + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Each branch shall start with the case keyword followed by one or more identifiers +// of the alternatives (fields) of the union type (a list branch) or the else keyword +// (an else branch) and a statement block. + +module Sem_190302_select_union_statement_003 { + + type component GeneralComp { + } + + type union U { + integer intOption, + charstring strOption, + boolean boolOption, + bitstring bitOption + } + + testcase TC_Sem_190302_select_union_statement_003() runs on GeneralComp { + var U v_un := { strOption := "abc" } + select union (v_un) { + case (strOption) { + setverdict(pass); + } case (bitOption) { + setverdict(fail); + } case else { + setverdict(fail); + } + } + } + + control { + execute(TC_Sem_190302_select_union_statement_003()); + } +} diff --git a/ATS/core_language/19_basic_program_statements/1903_select_statements/190302_select_union_statement/Sem_190302_select_union_statement_004.ttcn b/ATS/core_language/19_basic_program_statements/1903_select_statements/190302_select_union_statement/Sem_190302_select_union_statement_004.ttcn new file mode 100644 index 00000000..22de2cd6 --- /dev/null +++ b/ATS/core_language/19_basic_program_statements/1903_select_statements/190302_select_union_statement/Sem_190302_select_union_statement_004.ttcn @@ -0,0 +1,40 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:19.3.2, verify that else branch is executed if no case is defined for the selected alternative + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// If no case exists for the chosen alternative, the StatementBlock of the else +// branch, if it is present, is executed. + +module Sem_190302_select_union_statement_004 { + + type component GeneralComp { + } + + type union U { + integer intOption, + charstring strOption, + boolean boolOption, + bitstring bitOption + } + + testcase TC_Sem_190302_select_union_statement_004() runs on GeneralComp { + var U v_un := { strOption := "abc" } + select union (v_un) { + case (intOption) { + setverdict(fail); + } case (bitOption) { + setverdict(fail); + } case else { + setverdict(pass); + } + } + } + + control { + execute(TC_Sem_190302_select_union_statement_004()); + } +} diff --git a/ATS/core_language/19_basic_program_statements/1903_select_statements/190302_select_union_statement/Sem_190302_select_union_statement_005.ttcn b/ATS/core_language/19_basic_program_statements/1903_select_statements/190302_select_union_statement/Sem_190302_select_union_statement_005.ttcn new file mode 100644 index 00000000..4933f846 --- /dev/null +++ b/ATS/core_language/19_basic_program_statements/1903_select_statements/190302_select_union_statement/Sem_190302_select_union_statement_005.ttcn @@ -0,0 +1,39 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:19.3.2, verify that no branch is executed if the's no suitable case branch + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Otherwise [if no case exists for the chosen alternative and the else branch +// is not present], the select union statement has no effect. + +module Sem_190302_select_union_statement_005 { + + type component GeneralComp { + } + + type union U { + integer intOption, + charstring strOption, + boolean boolOption, + bitstring bitOption + } + + testcase TC_Sem_190302_select_union_statement_005() runs on GeneralComp { + var U v_un := { strOption := "abc" } + select union (v_un) { + case (intOption) { + setverdict(pass); + } case (bitOption) { + setverdict(fail); + } + } + setverdict(pass); + } + + control { + execute(TC_Sem_190302_select_union_statement_005()); + } +} diff --git a/ATS/core_language/19_basic_program_statements/1903_select_statements/190302_select_union_statement/Sem_190302_select_union_statement_006.ttcn b/ATS/core_language/19_basic_program_statements/1903_select_statements/190302_select_union_statement/Sem_190302_select_union_statement_006.ttcn new file mode 100644 index 00000000..6e37f447 --- /dev/null +++ b/ATS/core_language/19_basic_program_statements/1903_select_statements/190302_select_union_statement/Sem_190302_select_union_statement_006.ttcn @@ -0,0 +1,42 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:19.3.2, verify that partially initialized value can be used in select union header + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// [The TemplateInstance in the header of the select union statement] shall be +// at least partially initialized. + +module Sem_190302_select_union_statement_006 { + + type component GeneralComp { + } + + type union U { + integer intOption, + charstring strOption, + record { + integer field1, + integer field2 + } recOption + } + + testcase TC_Sem_190302_select_union_statement_006() runs on GeneralComp { + var U v_un := { recOption := { field1 := 1, field2 := - } } + select union (v_un) { + case (intOption) { + setverdict(fail); + } case (strOption) { + setverdict(fail); + } case (recOption) { + setverdict(pass); + } + } + } + + control { + execute(TC_Sem_190302_select_union_statement_006()); + } +} diff --git a/ATS/core_language/19_basic_program_statements/1904_for_statement/NegSem_1904_for_statement_001.ttcn b/ATS/core_language/19_basic_program_statements/1904_for_statement/NegSem_1904_for_statement_001.ttcn new file mode 100644 index 00000000..0cdd52a3 --- /dev/null +++ b/ATS/core_language/19_basic_program_statements/1904_for_statement/NegSem_1904_for_statement_001.ttcn @@ -0,0 +1,28 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:19.4, Ensure that the IUT properly evaluates for statements + ** @verdict pass reject + ***************************************************/ +module NegSem_1904_for_statement_001 { + +type component GeneralComp { +} + +testcase TC_NegSem_1904_for_statement_001 () runs on GeneralComp{ + + for(var integer v_i:=1; v_i<10; v_i:= j+1) { + } + + if(v_i==10) { setverdict(pass); } //v_i is not accessible from outside the loop + +} + + +control{ + + execute(TC_NegSem_1904_for_statement_001()); + +} + +} diff --git a/ATS/core_language/19_basic_program_statements/1904_for_statement/Sem_1904_for_statement_001.ttcn b/ATS/core_language/19_basic_program_statements/1904_for_statement/Sem_1904_for_statement_001.ttcn new file mode 100644 index 00000000..6e66f138 --- /dev/null +++ b/ATS/core_language/19_basic_program_statements/1904_for_statement/Sem_1904_for_statement_001.ttcn @@ -0,0 +1,33 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:19.4, Ensure that the IUT properly evaluates for statements + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Sem_1904_for_statement_001 { + +type component GeneralComp { +} + +testcase TC_Sem_1904_for_statement_001 () runs on GeneralComp{ + var integer v_i; + var integer v_j:=1; + + for(v_i:=1; v_i<10; v_i:= v_i+1) { + v_j:=v_j+1; + } + + if( match(v_i, 10) and match(v_j, 10) ) { setverdict(pass); } + else { setverdict(fail); } + + +} + + +control{ + + execute(TC_Sem_1904_for_statement_001()); + +} + +} diff --git a/ATS/core_language/19_basic_program_statements/1904_for_statement/Sem_1904_for_statement_002.ttcn b/ATS/core_language/19_basic_program_statements/1904_for_statement/Sem_1904_for_statement_002.ttcn new file mode 100644 index 00000000..af521b43 --- /dev/null +++ b/ATS/core_language/19_basic_program_statements/1904_for_statement/Sem_1904_for_statement_002.ttcn @@ -0,0 +1,32 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:19.4, Ensure that the IUT properly evaluates for statements + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Sem_1904_for_statement_002 { + +type component GeneralComp { +} + +testcase TC_Sem_1904_for_statement_002 () runs on GeneralComp{ + var integer v_i; + + for(v_i:=1; v_i<10; v_i:= v_i+1) { + if(v_i==5) { break; } + } + + if(v_i==5) { setverdict(pass); } + else { setverdict(fail); } + + +} + + +control{ + + execute(TC_Sem_1904_for_statement_002()); + +} + +} diff --git a/ATS/core_language/19_basic_program_statements/1904_for_statement/Sem_1904_for_statement_003.ttcn b/ATS/core_language/19_basic_program_statements/1904_for_statement/Sem_1904_for_statement_003.ttcn new file mode 100644 index 00000000..f46466ef --- /dev/null +++ b/ATS/core_language/19_basic_program_statements/1904_for_statement/Sem_1904_for_statement_003.ttcn @@ -0,0 +1,34 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:19.4, Ensure that the IUT properly evaluates for statements + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Sem_1904_for_statement_003 { + +type component GeneralComp { +} + +testcase TC_Sem_1904_for_statement_003 () runs on GeneralComp{ + var integer v_i; + + for(v_i:=1; v_i<10; v_i:= v_i+1) { + for(var integer v_j:=1; v_j<10; v_j:= v_j+1) { + if(v_i==5) { break; } //the break statement must only exit the inner loop + } + } + + if(v_i==10) { setverdict(pass); } + else { setverdict(fail); } + + +} + + +control{ + + execute(TC_Sem_1904_for_statement_003()); + +} + +} diff --git a/ATS/core_language/19_basic_program_statements/1905_while_statement/NegSem_1905_while_statement_001.ttcn b/ATS/core_language/19_basic_program_statements/1905_while_statement/NegSem_1905_while_statement_001.ttcn new file mode 100644 index 00000000..b3f1b2e0 --- /dev/null +++ b/ATS/core_language/19_basic_program_statements/1905_while_statement/NegSem_1905_while_statement_001.ttcn @@ -0,0 +1,31 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:19.5, Ensure that the IUT properly evaluates while statements + ** @verdict pass reject + ***************************************************/ +module NegSem_1905_while_statement_001 { + +type component GeneralComp { +} + +testcase TC_NegSem_1905_while_statement_001 () runs on GeneralComp{ + var integer v_i:=1; + + while(v_i<10) { + var integer v_j:=1; + v_i:=v_i+1; + } + + if(v_j==1) { setverdict(pass); } //v_j is not accessible from outside the loop + +} + + +control{ + + execute(TC_NegSem_1905_while_statement_001()); + +} + +} diff --git a/ATS/core_language/19_basic_program_statements/1905_while_statement/Sem_1905_while_statement_001.ttcn b/ATS/core_language/19_basic_program_statements/1905_while_statement/Sem_1905_while_statement_001.ttcn new file mode 100644 index 00000000..ded053ef --- /dev/null +++ b/ATS/core_language/19_basic_program_statements/1905_while_statement/Sem_1905_while_statement_001.ttcn @@ -0,0 +1,32 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:19.5, Ensure that the IUT properly evaluates while statements + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Sem_1905_while_statement_001 { + +type component GeneralComp { +} + +testcase TC_Sem_1905_while_statement_001 () runs on GeneralComp{ + var integer v_j:=1; + + while(v_j<10) { + v_j:=v_j+1; + } + + if( v_j==10 ) { setverdict(pass); } + else { setverdict(fail); } + + +} + + +control{ + + execute(TC_Sem_1905_while_statement_001()); + +} + +} diff --git a/ATS/core_language/19_basic_program_statements/1905_while_statement/Sem_1905_while_statement_002.ttcn b/ATS/core_language/19_basic_program_statements/1905_while_statement/Sem_1905_while_statement_002.ttcn new file mode 100644 index 00000000..6a9dff99 --- /dev/null +++ b/ATS/core_language/19_basic_program_statements/1905_while_statement/Sem_1905_while_statement_002.ttcn @@ -0,0 +1,32 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:19.5, Ensure that the IUT properly evaluates while statements + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Sem_1905_while_statement_002 { + +type component GeneralComp { +} + +testcase TC_Sem_1905_while_statement_002 () runs on GeneralComp{ + var integer v_i:=1; + + while(v_i<10) { + if(v_i==5) { break; } + v_i:=v_i+1; + } + + if(v_i==5) { setverdict(pass); } + else { setverdict(fail); } + +} + + +control{ + + execute(TC_Sem_1905_while_statement_002()); + +} + +} diff --git a/ATS/core_language/19_basic_program_statements/1905_while_statement/Sem_1905_while_statement_003.ttcn b/ATS/core_language/19_basic_program_statements/1905_while_statement/Sem_1905_while_statement_003.ttcn new file mode 100644 index 00000000..ca045a51 --- /dev/null +++ b/ATS/core_language/19_basic_program_statements/1905_while_statement/Sem_1905_while_statement_003.ttcn @@ -0,0 +1,36 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:19.5, Ensure that the IUT properly evaluates while statements + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Sem_1905_while_statement_003 { + +type component GeneralComp { +} + +testcase TC_Sem_1905_while_statement_003 () runs on GeneralComp{ + var integer v_i:=1; + var integer v_j:=1; + + while(v_i<10) { + while(v_j<10) { + if(v_i==5) { break; } + v_j:=v_j+1; + } + v_i:=v_i+1; + } + + if(v_i==10) { setverdict(pass); } + else { setverdict(fail); } + +} + + +control{ + + execute(TC_Sem_1905_while_statement_003()); + +} + +} diff --git a/ATS/core_language/19_basic_program_statements/1906_do_while_statement/NegSem_1906_do_while_statement_001.ttcn b/ATS/core_language/19_basic_program_statements/1906_do_while_statement/NegSem_1906_do_while_statement_001.ttcn new file mode 100644 index 00000000..56365d59 --- /dev/null +++ b/ATS/core_language/19_basic_program_statements/1906_do_while_statement/NegSem_1906_do_while_statement_001.ttcn @@ -0,0 +1,31 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:19.6, Ensure that the IUT properly evaluates do-while statements + ** @verdict pass reject + ***************************************************/ +module NegSem_1906_do_while_statement_001 { + +type component GeneralComp { +} + +testcase TC_NegSem_1906_do_while_statement_001 () runs on GeneralComp{ + var integer v_i:=1; + + do { + var integer v_j:=1; + v_i:=v_i+1; + } while(v_i<10); + + if(v_j==1) { setverdict(pass); } //v_j is not accessible from outside the loop + +} + + +control{ + + execute(TC_NegSem_1906_do_while_statement_001()); + +} + +} diff --git a/ATS/core_language/19_basic_program_statements/1906_do_while_statement/Sem_1906_do_while_statement_001.ttcn b/ATS/core_language/19_basic_program_statements/1906_do_while_statement/Sem_1906_do_while_statement_001.ttcn new file mode 100644 index 00000000..c5ac7d84 --- /dev/null +++ b/ATS/core_language/19_basic_program_statements/1906_do_while_statement/Sem_1906_do_while_statement_001.ttcn @@ -0,0 +1,32 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:19.6, Ensure that the IUT properly evaluates do-while statements + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Sem_1906_do_while_statement_001 { + +type component GeneralComp { +} + +testcase TC_Sem_1906_do_while_statement_001 () runs on GeneralComp{ + var integer v_j:=1; + + do { + v_j:=v_j+1; + } while(v_j<10); + + if( v_j==10 ) { setverdict(pass); } + else { setverdict(fail); } + + +} + + +control{ + + execute(TC_Sem_1906_do_while_statement_001()); + +} + +} diff --git a/ATS/core_language/19_basic_program_statements/1906_do_while_statement/Sem_1906_do_while_statement_002.ttcn b/ATS/core_language/19_basic_program_statements/1906_do_while_statement/Sem_1906_do_while_statement_002.ttcn new file mode 100644 index 00000000..9b15a07a --- /dev/null +++ b/ATS/core_language/19_basic_program_statements/1906_do_while_statement/Sem_1906_do_while_statement_002.ttcn @@ -0,0 +1,32 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:19.6, Ensure that the IUT properly evaluates do-while statements + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Sem_1906_do_while_statement_002 { + +type component GeneralComp { +} + +testcase TC_Sem_1906_do_while_statement_002 () runs on GeneralComp{ + var integer v_i:=1; + + do { + if(v_i==5) { break; } + v_i:=v_i+1; + } while(v_i<10); + + if(v_i==5) { setverdict(pass); } + else { setverdict(fail); } + +} + + +control{ + + execute(TC_Sem_1906_do_while_statement_002()); + +} + +} diff --git a/ATS/core_language/19_basic_program_statements/1906_do_while_statement/Sem_1906_do_while_statement_003.ttcn b/ATS/core_language/19_basic_program_statements/1906_do_while_statement/Sem_1906_do_while_statement_003.ttcn new file mode 100644 index 00000000..126a1b7b --- /dev/null +++ b/ATS/core_language/19_basic_program_statements/1906_do_while_statement/Sem_1906_do_while_statement_003.ttcn @@ -0,0 +1,36 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:19.6, Ensure that the IUT properly evaluates do-while statements + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Sem_1906_do_while_statement_003 { + +type component GeneralComp { +} + +testcase TC_Sem_1906_do_while_statement_003 () runs on GeneralComp{ + var integer v_i:=1; + var integer v_j:=1; + + do { + do { + if(v_i==5) { break; } + v_j:=v_j+1; + } while(v_j<10); + v_i:=v_i+1; + } while(v_i<10); + + if(v_i==10) { setverdict(pass); } + else { setverdict(fail); } + +} + + +control{ + + execute(TC_Sem_1906_do_while_statement_003()); + +} + +} diff --git a/ATS/core_language/19_basic_program_statements/1907_label_statement/NegSem_1907_label_statement_001.ttcn b/ATS/core_language/19_basic_program_statements/1907_label_statement/NegSem_1907_label_statement_001.ttcn new file mode 100644 index 00000000..2ce8d5ff --- /dev/null +++ b/ATS/core_language/19_basic_program_statements/1907_label_statement/NegSem_1907_label_statement_001.ttcn @@ -0,0 +1,71 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:19.7, Ensure that the IUT correctly handles label naming uniqueness. + ** @verdict pass reject + *****************************************************************/ + +module NegSem_1907_label_statement_001 { + + + type record MessageType { + integer field1, + charstring field2 + } + + type port loopbackPort message { + inout MessageType + } + +type component GeneralComp { + port loopbackPort messagePort +} + +function f_test ( integer p_integer := 0 ) runs on GeneralComp return integer { + label L1; + return p_integer+1; +} + + +altstep AltSet1() runs on GeneralComp { + var integer v_LocalVar := f_test(); // local variable + + [] messagePort.receive { + label L_A; + setverdict(pass); + label L_B; + } + +} + +testcase TC_NegSem_1907_label_statement_001 () runs on GeneralComp { + var MessageType v_testMessage; + timer t_timer; + + v_testMessage:= { + field1 := 1, + field2 := "test string" + } + + messagePort.send(v_testMessage); + t_timer.start( 1.0 ); + label L1; + + alt { + [] AltSet1(); + [] messagePort.receive { + label L2; + setverdict(pass); + } + [] t_timer.timeout { + label L3; + } + } + label L1; //conflicting label names +} + +control{ + execute(TC_NegSem_1907_label_statement_001()); +} + +} diff --git a/ATS/core_language/19_basic_program_statements/1907_label_statement/NegSyn_1907_label_statement_001.ttcn b/ATS/core_language/19_basic_program_statements/1907_label_statement/NegSyn_1907_label_statement_001.ttcn new file mode 100644 index 00000000..42a95611 --- /dev/null +++ b/ATS/core_language/19_basic_program_statements/1907_label_statement/NegSyn_1907_label_statement_001.ttcn @@ -0,0 +1,72 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:19.7, Ensure that the IUT correctly handles label syntax. + ** @verdict pass reject + *****************************************************************/ + +module NegSyn_1907_label_statement_001 { + + + type record MessageType { + integer field1, + charstring field2 + } + + type port loopbackPort message { + inout MessageType + } + +type component GeneralComp { + port loopbackPort messagePort +} + +function f_test ( integer p_integer := 0 ) runs on GeneralComp return integer { + label L1; + return p_integer+1; +} + + +altstep AltSet1() runs on GeneralComp { + var integer v_LocalVar := f_test(); // local variable + + [] messagePort.receive { + label L_A; + setverdict(pass); + label L_B; + } + +} + +testcase TC_NegSyn_1907_label_statement_001 () runs on GeneralComp { + var MessageType v_testMessage; + timer t_timer; + + v_testMessage:= { + field1 := 1, + field2 := "test string" + } + + messagePort.send(v_testMessage); + t_timer.start( 1.0 ); + label L1; + + alt { + [] AltSet1(); + label L_wrong; //wrong label on the alt toplevel + [] messagePort.receive { + label L2; + setverdict(pass); + } + [] t_timer.timeout { + label L3; + } + } + label L4; +} + +control{ + execute(TC_NegSyn_1907_label_statement_001()); +} + +} diff --git a/ATS/core_language/19_basic_program_statements/1907_label_statement/NegSyn_1907_label_statement_002.ttcn b/ATS/core_language/19_basic_program_statements/1907_label_statement/NegSyn_1907_label_statement_002.ttcn new file mode 100644 index 00000000..aa0997c0 --- /dev/null +++ b/ATS/core_language/19_basic_program_statements/1907_label_statement/NegSyn_1907_label_statement_002.ttcn @@ -0,0 +1,73 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:19.7, Ensure that the IUT correctly handles label syntax. + ** @verdict pass reject + *****************************************************************/ + +module NegSyn_1907_label_statement_002 { + + + type record MessageType { + integer field1, + charstring field2 + } + + type port loopbackPort message { + inout MessageType + } + +type component GeneralComp { + port loopbackPort messagePort +} + +function f_test ( integer p_integer := 0 ) runs on GeneralComp return integer { + label L1; + return p_integer+1; +} + + +altstep AltSet1() runs on GeneralComp { + var integer v_LocalVar := f_test(); // local variable + + label L_wrong; //wrong label on the altstep toplevel + + [] messagePort.receive { + label L_A; + setverdict(pass); + label L_B; + } + +} + +testcase TC_NegSyn_1907_label_statement_002 () runs on GeneralComp { + var MessageType v_testMessage; + timer t_timer; + + v_testMessage:= { + field1 := 1, + field2 := "test string" + } + + messagePort.send(v_testMessage); + t_timer.start( 1.0 ); + label L1; + + alt { + [] AltSet1(); + [] messagePort.receive { + label L2; + setverdict(pass); + } + [] t_timer.timeout { + label L3; + } + } + label L4; +} + +control{ + execute(TC_NegSyn_1907_label_statement_002()); +} + +} diff --git a/ATS/core_language/19_basic_program_statements/1907_label_statement/Syn_1907_label_statement_001.ttcn b/ATS/core_language/19_basic_program_statements/1907_label_statement/Syn_1907_label_statement_001.ttcn new file mode 100644 index 00000000..ac77ac9d --- /dev/null +++ b/ATS/core_language/19_basic_program_statements/1907_label_statement/Syn_1907_label_statement_001.ttcn @@ -0,0 +1,71 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:19.7, Ensure that the IUT correctly handles label syntax. + ** @verdict pass accept, noexecution + *****************************************************************/ + +module Syn_1907_label_statement_001 { + + + type record MessageType { + integer field1, + charstring field2 + } + + type port loopbackPort message { + inout MessageType + } + +type component GeneralComp { + port loopbackPort messagePort +} + +function f_test ( integer p_integer := 0 ) runs on GeneralComp return integer { + label L1; + return p_integer+1; +} + + +altstep AltSet1() runs on GeneralComp { + var integer v_LocalVar := f_test(); // local variable + + [] messagePort.receive { + label L_A; + setverdict(pass); + label L_B; + } + +} + +testcase TC_Syn_1907_label_statement_001 () runs on GeneralComp { + var MessageType v_testMessage; + timer t_timer; + + v_testMessage:= { + field1 := 1, + field2 := "test string" + } + + messagePort.send(v_testMessage); + t_timer.start( 1.0 ); + label L1; + + alt { + [] AltSet1(); + [] messagePort.receive { + label L2; + setverdict(pass); + } + [] t_timer.timeout { + label L3; + } + } + label L4; +} + +control{ + execute(TC_Syn_1907_label_statement_001()); +} + +} diff --git a/ATS/core_language/19_basic_program_statements/1908_goto_statement/NegSem_1908_goto_statement_001.ttcn b/ATS/core_language/19_basic_program_statements/1908_goto_statement/NegSem_1908_goto_statement_001.ttcn new file mode 100644 index 00000000..f3a2f725 --- /dev/null +++ b/ATS/core_language/19_basic_program_statements/1908_goto_statement/NegSem_1908_goto_statement_001.ttcn @@ -0,0 +1,73 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:19.8, Ensure that the IUT correctly handles goto statements. + ** @verdict pass reject + *****************************************************************/ + +module NegSem_1908_goto_statement_001 { + + + type record MessageType { + integer field1, + charstring field2 + } + + type port loopbackPort message { + inout MessageType + } + +type component GeneralComp { + port loopbackPort messagePort +} + +function f_test ( integer p_integer := 0 ) runs on GeneralComp return integer { + label L1; + return p_integer+1; +} + + +altstep AltSet1() runs on GeneralComp { + var integer v_LocalVar := f_test(); // local variable + + [] messagePort.receive { + label L_A; + label L_B; + } + +} + +testcase TC_NegSem_1908_goto_statement_001 () runs on GeneralComp { + var MessageType v_testMessage; + timer t_timer; + + v_testMessage:= { + field1 := 1, + field2 := "test string" + } + + messagePort.send(v_testMessage); + t_timer.start( 1.0 ); + label L1; + goto L2; //cannot jump into alt statements + + alt { + [] AltSet1(); + [] messagePort.receive { + label L2; + setverdict(pass); + } + [] t_timer.timeout { + label L2; + } + } + label L3; + setverdict(pass); + +} + +control{ + execute(TC_NegSem_1908_goto_statement_001()); +} + +} diff --git a/ATS/core_language/19_basic_program_statements/1908_goto_statement/NegSem_1908_goto_statement_002.ttcn b/ATS/core_language/19_basic_program_statements/1908_goto_statement/NegSem_1908_goto_statement_002.ttcn new file mode 100644 index 00000000..4d44bda8 --- /dev/null +++ b/ATS/core_language/19_basic_program_statements/1908_goto_statement/NegSem_1908_goto_statement_002.ttcn @@ -0,0 +1,30 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:19.8, Ensure that the IUT correctly handles goto statements. + ** @verdict pass reject + *****************************************************************/ +module NegSem_1908_goto_statement_002 { + +type component GeneralComp { +} + +testcase TC_NegSem_1908_goto_statement_002 () runs on GeneralComp{ + var integer v_i; + goto L1; //forbidden jump into a loop + + for(v_i:=1; v_i<10; v_i:= v_i+1) { + label L1; + if(v_i==5) { break; } + } + +} + + +control{ + + execute(TC_NegSem_1908_goto_statement_002()); + +} + +} diff --git a/ATS/core_language/19_basic_program_statements/1908_goto_statement/NegSem_1908_goto_statement_003.ttcn b/ATS/core_language/19_basic_program_statements/1908_goto_statement/NegSem_1908_goto_statement_003.ttcn new file mode 100644 index 00000000..ccdbfe26 --- /dev/null +++ b/ATS/core_language/19_basic_program_statements/1908_goto_statement/NegSem_1908_goto_statement_003.ttcn @@ -0,0 +1,33 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:19.8, Ensure that the IUT correctly handles goto statements. + ** @verdict pass reject + *****************************************************************/ +module NegSem_1908_goto_statement_003 { + +type component GeneralComp { +} + +testcase TC_NegSem_1908_goto_statement_003 () runs on GeneralComp{ + var integer v_i:=1; + goto L1; //forbidden jump into a loop + + if(v_i==2) { + label L1; + v_i:=1; + } + else { + v_i:=2; + goto L1; //forbidden jump into an if-else statement + } + +} + +control{ + + execute(TC_NegSem_1908_goto_statement_003()); + +} + +} diff --git a/ATS/core_language/19_basic_program_statements/1908_goto_statement/Sem_1908_goto_statement_001.ttcn b/ATS/core_language/19_basic_program_statements/1908_goto_statement/Sem_1908_goto_statement_001.ttcn new file mode 100644 index 00000000..6f2dde0c --- /dev/null +++ b/ATS/core_language/19_basic_program_statements/1908_goto_statement/Sem_1908_goto_statement_001.ttcn @@ -0,0 +1,32 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:19.8, Ensure that the IUT correctly handles goto statements. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +module Sem_1908_goto_statement_001 { + +type component GeneralComp { +} + +testcase TC_Sem_1908_goto_statement_001 () runs on GeneralComp{ + var integer v_i:=1; + goto L1; //jumping forward + v_i:=2; + + label L1; + + if( v_i==1 ) { setverdict(pass); } + else { setverdict(fail); } + + +} + + +control{ + + execute(TC_Sem_1908_goto_statement_001()); + +} + +} diff --git a/ATS/core_language/19_basic_program_statements/1908_goto_statement/Sem_1908_goto_statement_002.ttcn b/ATS/core_language/19_basic_program_statements/1908_goto_statement/Sem_1908_goto_statement_002.ttcn new file mode 100644 index 00000000..fc696a8b --- /dev/null +++ b/ATS/core_language/19_basic_program_statements/1908_goto_statement/Sem_1908_goto_statement_002.ttcn @@ -0,0 +1,33 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:19.8, Ensure that the IUT correctly handles goto statements. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +module Sem_1908_goto_statement_002 { + +type component GeneralComp { +} + +testcase TC_Sem_1908_goto_statement_002 () runs on GeneralComp{ + var integer v_i:=1; + + label L1; + v_i:=v_i+1; + + if(v_i==2) { goto L1; } //jumping backward + + if( v_i==3 ) { setverdict(pass); } + else { setverdict(fail); } + + +} + + +control{ + + execute(TC_Sem_1908_goto_statement_002()); + +} + +} diff --git a/ATS/core_language/19_basic_program_statements/1908_goto_statement/Sem_1908_goto_statement_003.ttcn b/ATS/core_language/19_basic_program_statements/1908_goto_statement/Sem_1908_goto_statement_003.ttcn new file mode 100644 index 00000000..60ff7c91 --- /dev/null +++ b/ATS/core_language/19_basic_program_statements/1908_goto_statement/Sem_1908_goto_statement_003.ttcn @@ -0,0 +1,34 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:19.8, Ensure that the IUT correctly handles goto statements. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +module Sem_1908_goto_statement_003 { + +type component GeneralComp { +} + +testcase TC_Sem_1908_goto_statement_003 () runs on GeneralComp{ + var integer v_i; + + for(v_i:=1; v_i<10; v_i:= v_i+1) { + if(v_i==5) { goto L1; } //jumping out of the loop + } + + label L1; + + if( v_i==5 ) { setverdict(pass); } + else { setverdict(fail); } + + +} + + +control{ + + execute(TC_Sem_1908_goto_statement_003()); + +} + +} diff --git a/ATS/core_language/19_basic_program_statements/1909_stop_statement/Sem_1909_stop_statement_001.ttcn b/ATS/core_language/19_basic_program_statements/1909_stop_statement/Sem_1909_stop_statement_001.ttcn new file mode 100644 index 00000000..e01a48e2 --- /dev/null +++ b/ATS/core_language/19_basic_program_statements/1909_stop_statement/Sem_1909_stop_statement_001.ttcn @@ -0,0 +1,26 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:19.9, Ensure that the IUT correctly handles stop statements. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +module Sem_1909_stop_statement_001 { + +type component GeneralComp { +} + +testcase TC_Sem_1909_stop_statement_001 () runs on GeneralComp{ + setverdict(pass); + stop; + setverdict(fail); + +} + + +control{ + + execute(TC_Sem_1909_stop_statement_001()); + +} + +} diff --git a/ATS/core_language/19_basic_program_statements/1909_stop_statement/Sem_1909_stop_statement_002.ttcn b/ATS/core_language/19_basic_program_statements/1909_stop_statement/Sem_1909_stop_statement_002.ttcn new file mode 100644 index 00000000..208756c0 --- /dev/null +++ b/ATS/core_language/19_basic_program_statements/1909_stop_statement/Sem_1909_stop_statement_002.ttcn @@ -0,0 +1,27 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:19.9, Ensure that the IUT correctly handles stop statements. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +module Sem_1909_stop_statement_002 { + +type component GeneralComp { +} + +testcase TC_Sem_1909_stop_statement_002 () runs on GeneralComp{ + setverdict(pass); +} + +testcase TC_not_to_be_executed () runs on GeneralComp{ + setverdict(fail); +} + + +control{ + execute(TC_Sem_1909_stop_statement_002()); + stop; + execute(TC_not_to_be_executed()); +} + +} diff --git a/ATS/core_language/19_basic_program_statements/1909_stop_statement/Sem_1909_stop_statement_003.ttcn b/ATS/core_language/19_basic_program_statements/1909_stop_statement/Sem_1909_stop_statement_003.ttcn new file mode 100644 index 00000000..710f85dd --- /dev/null +++ b/ATS/core_language/19_basic_program_statements/1909_stop_statement/Sem_1909_stop_statement_003.ttcn @@ -0,0 +1,38 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:19.9, stop statement in a function called from a PTC + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirement is tested: +// When invoked in a test case, altstep or function that are executed on a test +// component, it terminates the relevant test component. + +module Sem_1909_stop_statement_003 { + + type component GeneralComp { + } + + function f_stop() runs on GeneralComp { + setverdict(pass); + stop; + } + + function f_ptc() runs on GeneralComp { + f_stop(); + setverdict(fail); + } + + testcase TC_Sem_1909_stop_statement_003 () runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + v_ptc.start(f_ptc()); + v_ptc.done; + } + + + control { + execute(TC_Sem_1909_stop_statement_003()); + } + +} diff --git a/ATS/core_language/19_basic_program_statements/1909_stop_statement/Sem_1909_stop_statement_004.ttcn b/ATS/core_language/19_basic_program_statements/1909_stop_statement/Sem_1909_stop_statement_004.ttcn new file mode 100644 index 00000000..1946e5d8 --- /dev/null +++ b/ATS/core_language/19_basic_program_statements/1909_stop_statement/Sem_1909_stop_statement_004.ttcn @@ -0,0 +1,35 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:19.9, stop statement in a function called from a PTC + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirement is tested: +// When invoked in a test case, altstep or function that are executed on a test +// component, it terminates the relevant test component. + +module Sem_1909_stop_statement_004 { + + type component GeneralComp { + } + + testcase TC_Sem_1909_stop_statement_004 () runs on GeneralComp { + setverdict(pass); + } + + testcase TC_not_to_be_executed () runs on GeneralComp{ + setverdict(fail); + } + + function f_stop() { + execute(TC_Sem_1909_stop_statement_004()); + stop; + } + + control { + f_stop(); + execute(TC_not_to_be_executed()); + } + +} diff --git a/ATS/core_language/19_basic_program_statements/1910_return_statement/NOTES b/ATS/core_language/19_basic_program_statements/1910_return_statement/NOTES new file mode 100644 index 00000000..55cb17da --- /dev/null +++ b/ATS/core_language/19_basic_program_statements/1910_return_statement/NOTES @@ -0,0 +1,2 @@ +The functionality of the RETURN statement has been extensively tested in other sections. +This section contains only special cases which have not been tested elsewhere. \ No newline at end of file diff --git a/ATS/core_language/19_basic_program_statements/1910_return_statement/NegSem_1910_return_statement_001.ttcn b/ATS/core_language/19_basic_program_statements/1910_return_statement/NegSem_1910_return_statement_001.ttcn new file mode 100644 index 00000000..0da4056b --- /dev/null +++ b/ATS/core_language/19_basic_program_statements/1910_return_statement/NegSem_1910_return_statement_001.ttcn @@ -0,0 +1,26 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:19.10, Ensure that the IUT correctly handles return statements. + ** @verdict pass reject + *****************************************************************/ +module NegSem_1910_return_statement_001 { + + type component GeneralComp { + } + + + testcase TC_NegSem_1910_return_statement_001 () runs on GeneralComp{ + setverdict(pass); + return 0; //testcase cannot have a return statement + + } + + + control{ + + execute(TC_NegSem_1910_return_statement_001()); + + } + +} diff --git a/ATS/core_language/19_basic_program_statements/1910_return_statement/Sem_1910_return_statement_001.ttcn b/ATS/core_language/19_basic_program_statements/1910_return_statement/Sem_1910_return_statement_001.ttcn new file mode 100644 index 00000000..d54ea9cb --- /dev/null +++ b/ATS/core_language/19_basic_program_statements/1910_return_statement/Sem_1910_return_statement_001.ttcn @@ -0,0 +1,35 @@ +/***************************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:19.10, Ensure that the IUT correctly handles return statements. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +module Sem_1910_return_statement_001 { + + type component GeneralComp { + } + + function f_verdict_return() runs on GeneralComp return verdicttype { + setverdict(pass); + return getverdict; + } + + + testcase TC_Sem_1910_return_statement_001 () runs on GeneralComp { + if (f_verdict_return() != pass) { + setverdict(fail, "function return value wrong"); + } + if (getverdict != pass) { + setverdict(fail, "component verdict not set"); + } + + } + + + control{ + + execute(TC_Sem_1910_return_statement_001()); + + } + +} diff --git a/ATS/core_language/19_basic_program_statements/1910_return_statement/Sem_1910_return_statement_002.ttcn b/ATS/core_language/19_basic_program_statements/1910_return_statement/Sem_1910_return_statement_002.ttcn new file mode 100644 index 00000000..5cd72252 --- /dev/null +++ b/ATS/core_language/19_basic_program_statements/1910_return_statement/Sem_1910_return_statement_002.ttcn @@ -0,0 +1,35 @@ +/***************************************************************** + ** @author STF 451 + ** @version 0.0.1 + ** @purpose 1:19.10, Ensure that the IUT correctly handles return statements. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +module Sem_1910_return_statement_002 { + + type component GeneralComp { + } + + function f_template_return() return template charstring { + setverdict(pass); + return ?; + } + + + testcase TC_Sem_1910_return_statement_002 () runs on GeneralComp { + if ( match("A",f_template_return() ) ) { + setverdict(pass, "function return value correct"); + } + else { + setverdict(fail, "function return value wrong"); + } + + } + + + control{ + + execute(TC_Sem_1910_return_statement_002()); + + } + +} diff --git a/ATS/core_language/19_basic_program_statements/1911_log_statement/NegSem_1911_log_statement_001.ttcn b/ATS/core_language/19_basic_program_statements/1911_log_statement/NegSem_1911_log_statement_001.ttcn new file mode 100644 index 00000000..0469fd75 --- /dev/null +++ b/ATS/core_language/19_basic_program_statements/1911_log_statement/NegSem_1911_log_statement_001.ttcn @@ -0,0 +1,33 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:19.11, Ensure that the IUT properly evaluates log statements + ** @verdict pass reject + ***************************************************/ +module NegSem_1911_log_statement_001 { + +type component GeneralComp { +} + +function f_no_return(integer p_arg) { + var integer v_f; + v_f:=p_arg; +} + +testcase TC_NegSem_1911_log_statement_001 () runs on GeneralComp{ + var integer v_i; + + for(v_i:=1; v_i<10; v_i:= v_i+1) { + log("Function without return value: ", f_no_return(v_i) ); //not allowed to use function without return value + } + +} + + +control{ + + execute(TC_NegSem_1911_log_statement_001()); + +} + +} diff --git a/ATS/core_language/19_basic_program_statements/1911_log_statement/Sem_1911_log_statement_001.ttcn b/ATS/core_language/19_basic_program_statements/1911_log_statement/Sem_1911_log_statement_001.ttcn new file mode 100644 index 00000000..287c524c --- /dev/null +++ b/ATS/core_language/19_basic_program_statements/1911_log_statement/Sem_1911_log_statement_001.ttcn @@ -0,0 +1,30 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:19.11, Ensure that the IUT properly evaluates log statements + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Sem_1911_log_statement_001 { + +type component GeneralComp { +} + +testcase TC_Sem_1911_log_statement_001 () runs on GeneralComp{ + var integer v_i; + + for(v_i:=1; v_i<10; v_i:= v_i+1) { + log("Actual value of v_i: ", v_i); //actual value of v_i is expected, log output is not validated by the script + } + + setverdict(pass) + +} + + +control{ + + execute(TC_Sem_1911_log_statement_001()); + +} + +} diff --git a/ATS/core_language/19_basic_program_statements/1911_log_statement/Sem_1911_log_statement_002.ttcn b/ATS/core_language/19_basic_program_statements/1911_log_statement/Sem_1911_log_statement_002.ttcn new file mode 100644 index 00000000..1f9711d3 --- /dev/null +++ b/ATS/core_language/19_basic_program_statements/1911_log_statement/Sem_1911_log_statement_002.ttcn @@ -0,0 +1,28 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:19.11, Ensure that the IUT properly evaluates log statements + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Sem_1911_log_statement_002 { + +type component GeneralComp { +} + +testcase TC_Sem_1911_log_statement_002 () runs on GeneralComp{ + var integer v_i; + + log("Actual value of v_i: ", v_i); //expected to print "UNINITIALIZED" for the unbounded v_i value, log output is not validated by the script + + setverdict(pass) + +} + + +control{ + + execute(TC_Sem_1911_log_statement_002()); + +} + +} diff --git a/ATS/core_language/19_basic_program_statements/1911_log_statement/Sem_1911_log_statement_003.ttcn b/ATS/core_language/19_basic_program_statements/1911_log_statement/Sem_1911_log_statement_003.ttcn new file mode 100644 index 00000000..6b6a25f6 --- /dev/null +++ b/ATS/core_language/19_basic_program_statements/1911_log_statement/Sem_1911_log_statement_003.ttcn @@ -0,0 +1,28 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:19.11, Ensure that the IUT properly evaluates log statements + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Sem_1911_log_statement_003 { + +type component GeneralComp { +} + +testcase TC_Sem_1911_log_statement_003 () runs on GeneralComp{ + const integer c_i:=1; + + log("Actual value of c_i: ", c_i); //expected to print 1 for c_i constant value, log output is not validated by the script + + setverdict(pass) + +} + + +control{ + + execute(TC_Sem_1911_log_statement_003()); + +} + +} diff --git a/ATS/core_language/19_basic_program_statements/1911_log_statement/Sem_1911_log_statement_004.ttcn b/ATS/core_language/19_basic_program_statements/1911_log_statement/Sem_1911_log_statement_004.ttcn new file mode 100644 index 00000000..57dea567 --- /dev/null +++ b/ATS/core_language/19_basic_program_statements/1911_log_statement/Sem_1911_log_statement_004.ttcn @@ -0,0 +1,34 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:19.11, Ensure that the IUT properly evaluates log statements + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Sem_1911_log_statement_004 { + +type component GeneralComp { +} + +function f_square(integer p_arg) return integer { + return p_arg*p_arg; +} + +testcase TC_Sem_1911_log_statement_004 () runs on GeneralComp{ + var integer v_i; + + for(v_i:=1; v_i<10; v_i:= v_i+1) { + log("Actual value of v_i squared: ", f_square(v_i) ); //actual value of v_i squared is expected, log output is not validated by the script + } + + setverdict(pass) + +} + + +control{ + + execute(TC_Sem_1911_log_statement_004()); + +} + +} diff --git a/ATS/core_language/19_basic_program_statements/1911_log_statement/Sem_1911_log_statement_005.ttcn b/ATS/core_language/19_basic_program_statements/1911_log_statement/Sem_1911_log_statement_005.ttcn new file mode 100644 index 00000000..739abbef --- /dev/null +++ b/ATS/core_language/19_basic_program_statements/1911_log_statement/Sem_1911_log_statement_005.ttcn @@ -0,0 +1,39 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:19.11, Ensure that the IUT properly evaluates log statements + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Sem_1911_log_statement_005 { + +type component GeneralComp { +} + +testcase TC_Sem_1911_log_statement_005 () runs on GeneralComp{ + var integer v_i; + timer t_1; + + t_1.start(1.0); + log("Actual timer state: ", t_1); //running state is expected, log output is not validated by the script + log("Is timer running? ", t_1.running); //true is expected, log output is not validated by the script + + for(v_i:=1; v_i<10; v_i:= v_i+1) { + log("Actual timer value: ", t_1.read); //actual timer value is expected, log output is not validated by the script + } + + t_1.stop; + log("Actual timer state: ", t_1); //stopped state is expected, log output is not validated by the script + log("Is timer running? ", t_1.running); //false is expected, log output is not validated by the script + + setverdict(pass) + +} + + +control{ + + execute(TC_Sem_1911_log_statement_005()); + +} + +} diff --git a/ATS/core_language/19_basic_program_statements/1912_break_statement/NOTES b/ATS/core_language/19_basic_program_statements/1912_break_statement/NOTES new file mode 100644 index 00000000..e32353af --- /dev/null +++ b/ATS/core_language/19_basic_program_statements/1912_break_statement/NOTES @@ -0,0 +1,2 @@ +The functionality of the BREAK statement has been exhaustively tested in the preceding sections. +No further testing is required for this statement. \ No newline at end of file diff --git a/ATS/core_language/19_basic_program_statements/1913_continue_statement/Sem_1913_continue_statement_001.ttcn b/ATS/core_language/19_basic_program_statements/1913_continue_statement/Sem_1913_continue_statement_001.ttcn new file mode 100644 index 00000000..51d5a618 --- /dev/null +++ b/ATS/core_language/19_basic_program_statements/1913_continue_statement/Sem_1913_continue_statement_001.ttcn @@ -0,0 +1,33 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:19.13, Ensure that the IUT properly evaluates continue statements + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Sem_1913_continue_statement_001 { + +type component GeneralComp { +} + +testcase TC_Sem_1913_continue_statement_001 () runs on GeneralComp{ + var integer v_i; + + for(v_i:=1; v_i<10; v_i:= v_i+1) { + if(v_i==5) { continue; } + if(v_i==5) { break; } + } + + if( v_i==10 ) { setverdict(pass); } + else { setverdict(fail); } + + +} + + +control{ + + execute(TC_Sem_1913_continue_statement_001()); + +} + +} diff --git a/ATS/core_language/19_basic_program_statements/1914_statement_block/NOTES b/ATS/core_language/19_basic_program_statements/1914_statement_block/NOTES new file mode 100644 index 00000000..5469318e --- /dev/null +++ b/ATS/core_language/19_basic_program_statements/1914_statement_block/NOTES @@ -0,0 +1,2 @@ +The functionality of the statement blocks ( {...} ) has been exhaustively tested in the preceding sections. +No further testing is required in this section. \ No newline at end of file diff --git a/ATS/core_language/20_statement_and_operations_for_alt/2001_the_snapshot_mechanism/NOTES b/ATS/core_language/20_statement_and_operations_for_alt/2001_the_snapshot_mechanism/NOTES new file mode 100644 index 00000000..f6f92612 --- /dev/null +++ b/ATS/core_language/20_statement_and_operations_for_alt/2001_the_snapshot_mechanism/NOTES @@ -0,0 +1,2 @@ +- NOTE: currently untested. if this can be tested at all from within TTCN-3, we'll have to refer to + part 4 for details at this point as the description in 20.1 is pretty basic. \ No newline at end of file diff --git a/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NOTES b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NOTES new file mode 100644 index 00000000..66349743 --- /dev/null +++ b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NOTES @@ -0,0 +1,3 @@ +NOTES: +1. Side effects (restrictions b, c, d) related to function calls are tested in 16.1.4 +2. Side effects (restrictions b, c, d) related to direct calls of operations listed in 16.1.4 (such as create, running, alive etc.) are tested in this section diff --git a/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_001.ttcn b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_001.ttcn new file mode 100644 index 00000000..c933f5e6 --- /dev/null +++ b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_001.ttcn @@ -0,0 +1,43 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:20.2, dynamic error if a test component is completely blocked + ** @verdict pass reject + *****************************************************************/ + +// The following requirement is tested: +// The test case shall stop and indicate a dynamic error if a test component is +// completely blocked. This means none of the alternatives can be chosen, no +// relevant test component is running, no relevant timer is running and all +// relevant ports contain at least one message, call, reply or exception that +// do not match. + +module NegSem_2002_TheAltStatement_001 { + + type port MyPort message { + inout charstring + } + + type component GeneralComp { + port MyPort p; + } + + template charstring m_test := "ping"; + + testcase TC_NegSem_2002_TheAltStatement_001() runs on GeneralComp { + timer t_tmr1; + p.send(m_test); + alt { + [] p.receive("abc") { + setverdict(pass); + } + [] t_tmr1.timeout { + setverdict(pass); + } + } + } + + control { + execute(TC_NegSem_2002_TheAltStatement_001()); + } +} \ No newline at end of file diff --git a/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_002.ttcn b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_002.ttcn new file mode 100644 index 00000000..3cf1ae4a --- /dev/null +++ b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_002.ttcn @@ -0,0 +1,39 @@ +/***************************************************************** + ** @author STF 487 (updated by STF 521) + ** @version 0.0.2 + ** @purpose 1:20.2, verify that the create operation cannot be used in guard statements + ** @verdict pass reject + *****************************************************************/ + +// The following requirement is tested: +// b) The evaluation of a Boolean expression guarding an alternative shall not have side effects. To avoid side effects +// that cause an inconsistency between the actual snapshot and the state of the component, the same restrictions +// as the restrictions for the initialization of local definitions within altsteps (clause 16.2) and the restrictions +// imposed on the contents of functions called from special places (clause 16.1.4) shall apply. + +module NegSem_2002_TheAltStatement_002 { + + type port MyPort message { + inout charstring + } + + type component GeneralComp { + port MyPort p; + } + + template charstring m_test := "ping"; + + testcase TC_NegSem_2002_TheAltStatement_002() runs on GeneralComp system GeneralComp { + map(self:p, system: p); + p.send(m_test); + alt { + [GeneralComp.create != null] p.receive(charstring:?) { + setverdict(pass); + } + } + } + + control { + execute(TC_NegSem_2002_TheAltStatement_002()); + } +} \ No newline at end of file diff --git a/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_003.ttcn b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_003.ttcn new file mode 100644 index 00000000..98155344 --- /dev/null +++ b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_003.ttcn @@ -0,0 +1,40 @@ +/***************************************************************** + ** @author STF 487 (updated by STF 521) + ** @version 0.0.2 + ** @purpose 1:20.2, verify that the timer.running operation cannot be used in guard statements + ** @verdict pass reject + *****************************************************************/ + +// The following requirement is tested: +// b) The evaluation of a Boolean expression guarding an alternative shall not have side effects. To avoid side effects +// that cause an inconsistency between the actual snapshot and the state of the component, the same restrictions +// as the restrictions for the initialization of local definitions within altsteps (clause 16.2) and the restrictions +// imposed on the contents of functions called from special places (clause 16.1.4) shall apply. + +module NegSem_2002_TheAltStatement_003 { + + type port MyPort message { + inout charstring + } + + type component GeneralComp { + port MyPort p; + } + + template charstring m_test := "ping"; + + testcase TC_NegSem_2002_TheAltStatement_003() runs on GeneralComp { + timer t_tmr := 1.0; + t_tmr.start; + p.send(m_test); + alt { + [t_tmr.running] p.receive(charstring:?) { + setverdict(pass); + } + } + } + + control { + execute(TC_NegSem_2002_TheAltStatement_003()); + } +} \ No newline at end of file diff --git a/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_004.ttcn b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_004.ttcn new file mode 100644 index 00000000..ac892d13 --- /dev/null +++ b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_004.ttcn @@ -0,0 +1,39 @@ +/***************************************************************** + ** @author STF 487 (updated by STF 521) + ** @version 0.0.2 + ** @purpose 1:20.2, verify that the component.running operation cannot be used in guard statements + ** @verdict pass reject + *****************************************************************/ + +// The following requirement is tested: +// b) The evaluation of a Boolean expression guarding an alternative shall not have side effects. To avoid side effects +// that cause an inconsistency between the actual snapshot and the state of the component, the same restrictions +// as the restrictions for the initialization of local definitions within altsteps (clause 16.2) and the restrictions +// imposed on the contents of functions called from special places (clause 16.1.4) shall apply. + +module NegSem_2002_TheAltStatement_004 { + + type port MyPort message { + inout charstring + } + + type component GeneralComp { + port MyPort p; + } + + template charstring m_test := "ping"; + + testcase TC_NegSem_2002_TheAltStatement_004() runs on GeneralComp system GeneralComp { + map(self:p, system: p); + p.send(m_test); + alt { + [mtc.running] p.receive(charstring:?) { + setverdict(pass); + } + } + } + + control { + execute(TC_NegSem_2002_TheAltStatement_004()); + } +} \ No newline at end of file diff --git a/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_005.ttcn b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_005.ttcn new file mode 100644 index 00000000..fc0d3551 --- /dev/null +++ b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_005.ttcn @@ -0,0 +1,39 @@ +/***************************************************************** + ** @author STF 487 (updated by STF 521) + ** @version 0.0.2 + ** @purpose 1:20.2, verify that the alive operation cannot be used in guard statements + ** @verdict pass reject + *****************************************************************/ + +// The following requirement is tested: +// b) The evaluation of a Boolean expression guarding an alternative shall not have side effects. To avoid side effects +// that cause an inconsistency between the actual snapshot and the state of the component, the same restrictions +// as the restrictions for the initialization of local definitions within altsteps (clause 16.2) and the restrictions +// imposed on the contents of functions called from special places (clause 16.1.4) shall apply. + +module NegSem_2002_TheAltStatement_005 { + + type port MyPort message { + inout charstring + } + + type component GeneralComp { + port MyPort p; + } + + template charstring m_test := "ping"; + + testcase TC_NegSem_2002_TheAltStatement_005() runs on GeneralComp system GeneralComp { + map(self:p, system: p); + p.send(m_test); + alt { + [mtc.alive] p.receive(charstring:?) { + setverdict(pass); + } + } + } + + control { + execute(TC_NegSem_2002_TheAltStatement_005()); + } +} \ No newline at end of file diff --git a/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_006.ttcn b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_006.ttcn new file mode 100644 index 00000000..effa1354 --- /dev/null +++ b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_006.ttcn @@ -0,0 +1,44 @@ +/***************************************************************** + ** @author STF 487 (updated by STF 521) + ** @version 0.0.2 + ** @purpose 1:20.2, verify that the activate operation cannot be used in guard statements + ** @verdict pass reject + *****************************************************************/ + +// The following requirement is tested: +// b) The evaluation of a Boolean expression guarding an alternative shall not have side effects. To avoid side effects +// that cause an inconsistency between the actual snapshot and the state of the component, the same restrictions +// as the restrictions for the initialization of local definitions within altsteps (clause 16.2) and the restrictions +// imposed on the contents of functions called from special places (clause 16.1.4) shall apply. + +module NegSem_2002_TheAltStatement_006 { + + type port MyPort message { + inout charstring + } + + type component GeneralComp { + port MyPort p; + } + + template charstring m_test := "ping"; + + altstep a_timeout() { + [] any timer.timeout { + } + } + + testcase TC_NegSem_2002_TheAltStatement_006() runs on GeneralComp system GeneralComp { + map(self:p, system: p); + p.send(m_test); + alt { + [activate(a_timeout()) != null] p.receive(charstring:?) { + setverdict(pass); + } + } + } + + control { + execute(TC_NegSem_2002_TheAltStatement_006()); + } +} \ No newline at end of file diff --git a/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_007.ttcn b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_007.ttcn new file mode 100644 index 00000000..41c608e2 --- /dev/null +++ b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_007.ttcn @@ -0,0 +1,38 @@ +/***************************************************************** + ** @author STF 487 (updated by STF 521) + ** @version 0.0.2 + ** @purpose 1:20.2, verify that the create operation cannot be used in alt branch events (in inline template) + ** @verdict pass reject + *****************************************************************/ + +// The following requirement is tested: +// c) The evaluation of the event of an alt branch shall not have side effects. To avoid side effects that cause +// an inconsistency between the actual snapshot and the state of the component or introduce indeterminism +// in the evaluation of the following alt branches or the re-evaluation of the same alt branch, the restrictions +// imposed on the contents of functions called from special places (clause 16.1.4) shall apply to expressions +// occurring in the matching part of an alternative. + +module NegSem_2002_TheAltStatement_007 { + + type port MyPort message { + inout boolean + } + + type component GeneralComp { + port MyPort p; + } + + testcase TC_NegSem_2002_TheAltStatement_007() runs on GeneralComp system GeneralComp { + map(self:p, system: p); + p.send(true); + alt { + [] p.receive(boolean:GeneralComp.create != null) { + setverdict(pass); + } + } + } + + control { + execute(TC_NegSem_2002_TheAltStatement_007()); + } +} \ No newline at end of file diff --git a/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_008.ttcn b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_008.ttcn new file mode 100644 index 00000000..0edf5025 --- /dev/null +++ b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_008.ttcn @@ -0,0 +1,40 @@ +/***************************************************************** + ** @author STF 487 (updated by STF 521) + ** @version 0.0.2 + ** @purpose 1:20.2, verify that the timer.running operation cannot be used in alt branch events (in inline templates) + ** @verdict pass reject + *****************************************************************/ + +// The following requirement is tested: +// c) The evaluation of the event of an alt branch shall not have side effects. To avoid side effects that cause +// an inconsistency between the actual snapshot and the state of the component or introduce indeterminism +// in the evaluation of the following alt branches or the re-evaluation of the same alt branch, the restrictions +// imposed on the contents of functions called from special places (clause 16.1.4) shall apply to expressions +// occurring in the matching part of an alternative. + +module NegSem_2002_TheAltStatement_008 { + + type port MyPort message { + inout boolean + } + + type component GeneralComp { + port MyPort p; + } + + testcase TC_NegSem_2002_TheAltStatement_008() runs on GeneralComp system GeneralComp { + timer t_tmr := 1.0; + map(self:p, system: p); + t_tmr.start; + p.send(true); + alt { + [] p.receive(boolean:t_tmr.running) { + setverdict(pass); + } + } + } + + control { + execute(TC_NegSem_2002_TheAltStatement_008()); + } +} \ No newline at end of file diff --git a/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_009.ttcn b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_009.ttcn new file mode 100644 index 00000000..68e92de2 --- /dev/null +++ b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_009.ttcn @@ -0,0 +1,38 @@ +/***************************************************************** + ** @author STF 487 (updated by STF 521) + ** @version 0.0.2 + ** @purpose 1:20.2, verify that the component.running operation cannot be used in alt branch events (in inline templates) + ** @verdict pass reject + *****************************************************************/ + +// The following requirement is tested: +// c) The evaluation of the event of an alt branch shall not have side effects. To avoid side effects that cause +// an inconsistency between the actual snapshot and the state of the component or introduce indeterminism +// in the evaluation of the following alt branches or the re-evaluation of the same alt branch, the restrictions +// imposed on the contents of functions called from special places (clause 16.1.4) shall apply to expressions +// occurring in the matching part of an alternative. + +module NegSem_2002_TheAltStatement_009 { + + type port MyPort message { + inout boolean + } + + type component GeneralComp { + port MyPort p; + } + + testcase TC_NegSem_2002_TheAltStatement_009() runs on GeneralComp system GeneralComp { + map(self:p, system: p); + p.send(true); + alt { + [] p.receive(boolean:mtc.running) { + setverdict(pass); + } + } + } + + control { + execute(TC_NegSem_2002_TheAltStatement_009()); + } +} \ No newline at end of file diff --git a/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_010.ttcn b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_010.ttcn new file mode 100644 index 00000000..561ce948 --- /dev/null +++ b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_010.ttcn @@ -0,0 +1,38 @@ +/***************************************************************** + ** @author STF 487 (updated by STF 521) + ** @version 0.0.2 + ** @purpose 1:20.2, verify that the alive operation cannot be used in alt branch events (in inline templates) + ** @verdict pass reject + *****************************************************************/ + +// The following requirement is tested: +// c) The evaluation of the event of an alt branch shall not have side effects. To avoid side effects that cause +// an inconsistency between the actual snapshot and the state of the component or introduce indeterminism +// in the evaluation of the following alt branches or the re-evaluation of the same alt branch, the restrictions +// imposed on the contents of functions called from special places (clause 16.1.4) shall apply to expressions +// occurring in the matching part of an alternative. + +module NegSem_2002_TheAltStatement_010 { + + type port MyPort message { + inout boolean + } + + type component GeneralComp { + port MyPort p; + } + + testcase TC_NegSem_2002_TheAltStatement_010() runs on GeneralComp system GeneralComp { + map(self:p, system: p); + p.send(true); + alt { + [] p.receive(boolean:mtc.alive) { + setverdict(pass); + } + } + } + + control { + execute(TC_NegSem_2002_TheAltStatement_010()); + } +} \ No newline at end of file diff --git a/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_011.ttcn b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_011.ttcn new file mode 100644 index 00000000..14ae0d81 --- /dev/null +++ b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_011.ttcn @@ -0,0 +1,43 @@ +/***************************************************************** + ** @author STF 487 (updated by STF 521) + ** @version 0.0.2 + ** @purpose 1:20.2, verify that the activate operation cannot be used in alt branch events (in inline templates) + ** @verdict pass reject + *****************************************************************/ + +// The following requirement is tested: +// c) The evaluation of the event of an alt branch shall not have side effects. To avoid side effects that cause +// an inconsistency between the actual snapshot and the state of the component or introduce indeterminism +// in the evaluation of the following alt branches or the re-evaluation of the same alt branch, the restrictions +// imposed on the contents of functions called from special places (clause 16.1.4) shall apply to expressions +// occurring in the matching part of an alternative. + +module NegSem_2002_TheAltStatement_011 { + + type port MyPort message { + inout boolean + } + + type component GeneralComp { + port MyPort p; + } + + altstep a_timeout() { + [] any timer.timeout { + } + } + + testcase TC_NegSem_2002_TheAltStatement_011() runs on GeneralComp system GeneralComp { + map(self:p, system: p); + p.send(true); + alt { + [] p.receive(boolean:activate(a_timeout()) != null) { + setverdict(pass); + } + } + } + + control { + execute(TC_NegSem_2002_TheAltStatement_011()); + } +} \ No newline at end of file diff --git a/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_012.ttcn b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_012.ttcn new file mode 100644 index 00000000..3c345941 --- /dev/null +++ b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_012.ttcn @@ -0,0 +1,40 @@ +/***************************************************************** + ** @author STF 487 (updated by STF 521) + ** @version 0.0.2 + ** @purpose 1:20.2, verify that the create operation cannot be used in parameters of alt branch events + ** @verdict pass reject + *****************************************************************/ + +// The following requirement is tested: +// d) The evaluation of an altstep invoked from an alt branch, if none of the alternatives in the altstep is chosen, shall +// not have side effects. To avoid side effects the restrictions imposed on the contents of functions called from special +// places (clause 16.1.4) shall apply to the actual parameters of the invoked altstep. + +module NegSem_2002_TheAltStatement_012 { + + type port MyPort message { + inout boolean + } + + type component GeneralComp { + port MyPort p; + } + + altstep a_receive(boolean p_bool) runs on GeneralComp { + [] p.receive(p_bool) { + setverdict(pass); + } + } + + testcase TC_NegSem_2002_TheAltStatement_012() runs on GeneralComp system GeneralComp { + map(self:p, system: p); + p.send(true); + alt { + [] a_receive(GeneralComp.create != null); + } + } + + control { + execute(TC_NegSem_2002_TheAltStatement_012()); + } +} \ No newline at end of file diff --git a/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_013.ttcn b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_013.ttcn new file mode 100644 index 00000000..f37caf30 --- /dev/null +++ b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_013.ttcn @@ -0,0 +1,42 @@ +/***************************************************************** + ** @author STF 487 (updated by STF 521) + ** @version 0.0.1 + ** @purpose 1:20.2, verify that the timer.running operation cannot be used in parameters of alt branch events + ** @verdict pass reject + *****************************************************************/ + +// The following requirement is tested: +// d) The evaluation of an altstep invoked from an alt branch, if none of the alternatives in the altstep is chosen, shall +// not have side effects. To avoid side effects the restrictions imposed on the contents of functions called from special +// places (clause 16.1.4) shall apply to the actual parameters of the invoked altstep. + +module NegSem_2002_TheAltStatement_013 { + + type port MyPort message { + inout boolean + } + + type component GeneralComp { + port MyPort p; + } + + altstep a_receive(boolean p_bool) runs on GeneralComp { + [] p.receive(p_bool) { + setverdict(pass); + } + } + + testcase TC_NegSem_2002_TheAltStatement_013() runs on GeneralComp system GeneralComp { + timer t_tmr := 1.0; + map(self:p, system: p); + t_tmr.start; + p.send(true); + alt { + [] a_receive(t_tmr.running); + } + } + + control { + execute(TC_NegSem_2002_TheAltStatement_013()); + } +} \ No newline at end of file diff --git a/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_014.ttcn b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_014.ttcn new file mode 100644 index 00000000..92007f7e --- /dev/null +++ b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_014.ttcn @@ -0,0 +1,40 @@ +/***************************************************************** + ** @author STF 487 (updated by STF 521) + ** @version 0.0.2 + ** @purpose 1:20.2, verify that the component.running operation cannot be used in parameters of alt branch events + ** @verdict pass reject + *****************************************************************/ + +// The following requirement is tested: +// d) The evaluation of an altstep invoked from an alt branch, if none of the alternatives in the altstep is chosen, shall +// not have side effects. To avoid side effects the restrictions imposed on the contents of functions called from special +// places (clause 16.1.4) shall apply to the actual parameters of the invoked altstep. + +module NegSem_2002_TheAltStatement_014 { + + type port MyPort message { + inout boolean + } + + type component GeneralComp { + port MyPort p; + } + + altstep a_receive(boolean p_bool) runs on GeneralComp { + [] p.receive(p_bool) { + setverdict(pass); + } + } + + testcase TC_NegSem_2002_TheAltStatement_014() runs on GeneralComp system GeneralComp { + map(self:p, system: p); + p.send(true); + alt { + [] a_receive(mtc.running); + } + } + + control { + execute(TC_NegSem_2002_TheAltStatement_014()); + } +} \ No newline at end of file diff --git a/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_015.ttcn b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_015.ttcn new file mode 100644 index 00000000..f978f7df --- /dev/null +++ b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_015.ttcn @@ -0,0 +1,40 @@ +/***************************************************************** + ** @author STF 487 (updated by STF 521) + ** @version 0.0.2 + ** @purpose 1:20.2, verify that the alive operation cannot be used in parameters of alt branch events + ** @verdict pass reject + *****************************************************************/ + +// The following requirement is tested: +// d) The evaluation of an altstep invoked from an alt branch, if none of the alternatives in the altstep is chosen, shall +// not have side effects. To avoid side effects the restrictions imposed on the contents of functions called from special +// places (clause 16.1.4) shall apply to the actual parameters of the invoked altstep. + +module NegSem_2002_TheAltStatement_015 { + + type port MyPort message { + inout boolean + } + + type component GeneralComp { + port MyPort p; + } + + altstep a_receive(boolean p_bool) runs on GeneralComp { + [] p.receive(p_bool) { + setverdict(pass); + } + } + + testcase TC_NegSem_2002_TheAltStatement_015() runs on GeneralComp system GeneralComp { + map(self:p, system: p); + p.send(true); + alt { + [] a_receive(mtc.alive); + } + } + + control { + execute(TC_NegSem_2002_TheAltStatement_015()); + } +} \ No newline at end of file diff --git a/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_016.ttcn b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_016.ttcn new file mode 100644 index 00000000..2711ef90 --- /dev/null +++ b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_016.ttcn @@ -0,0 +1,45 @@ +/***************************************************************** + ** @author STF 487 (updated by STF 521) + ** @version 0.0.2 + ** @purpose 1:20.2, verify that the activate operation cannot be used in parameters of alt branch events + ** @verdict pass reject + *****************************************************************/ + +// The following requirement is tested: +// d) The evaluation of an altstep invoked from an alt branch, if none of the alternatives in the altstep is chosen, shall +// not have side effects. To avoid side effects the restrictions imposed on the contents of functions called from special +// places (clause 16.1.4) shall apply to the actual parameters of the invoked altstep. + +module NegSem_2002_TheAltStatement_016 { + + type port MyPort message { + inout boolean + } + + type component GeneralComp { + port MyPort p; + } + + altstep a_receive(boolean p_bool) runs on GeneralComp { + [] p.receive(p_bool) { + setverdict(pass); + } + } + + altstep a_timeout() { + [] any timer.timeout { + } + } + + testcase TC_NegSem_2002_TheAltStatement_016() runs on GeneralComp system GeneralComp { + map(self:p, system: p); + p.send(true); + alt { + [] a_receive(activate(a_timeout()) != null); + } + } + + control { + execute(TC_NegSem_2002_TheAltStatement_016()); + } +} \ No newline at end of file diff --git a/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_017.ttcn b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_017.ttcn new file mode 100644 index 00000000..8fb1042f --- /dev/null +++ b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_017.ttcn @@ -0,0 +1,44 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:20.2, verify that the create operation cannot be used in parameters of altsteps invoked from an alt branch + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// d) The evaluation of an altstep invoked from an alt branch, if none of the alternatives in the altstep is chosen, shall +// not have side effects. To avoid side effects the restrictions imposed on the contents of functions called from special +// places (clause 16.1.4) shall apply to the actual parameters of the invoked altstep. + +module NegSem_2002_TheAltStatement_017 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + function f_test() return boolean { + var GeneralComp v_ptc := GeneralComp.create; + return true; + } + + altstep a_rcv(boolean p_par) runs on GeneralComp { + [] p.receive(integer:?) {} + } + + testcase TC_NegSem_2002_TheAltStatement_017() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(1); + alt { + [] a_rcv(f_test()); + [] any timer.timeout {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_2002_TheAltStatement_017()); + } +} diff --git a/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_018.ttcn b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_018.ttcn new file mode 100644 index 00000000..c3ffb6e0 --- /dev/null +++ b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_018.ttcn @@ -0,0 +1,49 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:20.2, verify that the component.start operation cannot be used in parameters of altsteps invoked from an alt branch + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// d) The evaluation of an altstep invoked from an alt branch, if none of the alternatives in the altstep is chosen, shall +// not have side effects. To avoid side effects the restrictions imposed on the contents of functions called from special +// places (clause 16.1.4) shall apply to the actual parameters of the invoked altstep. + +module NegSem_2002_TheAltStatement_018 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + function f_ptcBehaviour() runs on GeneralComp { + log("PTC running"); + } + + function f_test(GeneralComp p_ptc) return boolean { + p_ptc.start(f_ptcBehaviour()); + return true; + } + + altstep a_rcv(boolean p_par) runs on GeneralComp { + [] p.receive(integer:?) {} + } + + testcase TC_NegSem_2002_TheAltStatement_018() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + connect(mtc:p, mtc:p); + p.send(1); + alt { + [] a_rcv(f_test(v_ptc)); + [] any timer.timeout {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_2002_TheAltStatement_018()); + } +} diff --git a/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_019.ttcn b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_019.ttcn new file mode 100644 index 00000000..ee2c9d68 --- /dev/null +++ b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_019.ttcn @@ -0,0 +1,52 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:20.2, verify that the component.stop operation cannot be used in parameters of altsteps invoked from an alt branch + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// d) The evaluation of an altstep invoked from an alt branch, if none of the alternatives in the altstep is chosen, shall +// not have side effects. To avoid side effects the restrictions imposed on the contents of functions called from special +// places (clause 16.1.4) shall apply to the actual parameters of the invoked altstep. + +module NegSem_2002_TheAltStatement_019 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + function f_ptcBehaviour() runs on GeneralComp { + timer t_tmr := 10.0; + t_tmr.start; + t_tmr.timeout; + } + + function f_test(GeneralComp p_ptc) return boolean { + p_ptc.stop; + return true; + } + + altstep a_rcv(boolean p_par) runs on GeneralComp { + [] p.receive(integer:?) {} + } + + testcase TC_NegSem_2002_TheAltStatement_019() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + v_ptc.start(f_ptcBehaviour()); + connect(mtc:p, mtc:p); + p.send(1); + alt { + [] a_rcv(f_test(v_ptc)); + [] any timer.timeout {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_2002_TheAltStatement_019()); + } +} diff --git a/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_020.ttcn b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_020.ttcn new file mode 100644 index 00000000..f8e3ddc8 --- /dev/null +++ b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_020.ttcn @@ -0,0 +1,52 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:20.2, verify that the kill operation cannot be used in parameters of altsteps invoked from an alt branch + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// d) The evaluation of an altstep invoked from an alt branch, if none of the alternatives in the altstep is chosen, shall +// not have side effects. To avoid side effects the restrictions imposed on the contents of functions called from special +// places (clause 16.1.4) shall apply to the actual parameters of the invoked altstep. + +module NegSem_2002_TheAltStatement_020 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + function f_ptcBehaviour() runs on GeneralComp { + timer t_tmr := 10.0; + t_tmr.start; + t_tmr.timeout; + } + + function f_test(GeneralComp p_ptc) return boolean { + p_ptc.kill; + return true; + } + + altstep a_rcv(boolean p_par) runs on GeneralComp { + [] p.receive(integer:?) {} + } + + testcase TC_NegSem_2002_TheAltStatement_020() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + v_ptc.start(f_ptcBehaviour()); + connect(mtc:p, mtc:p); + p.send(1); + alt { + [] a_rcv(f_test(v_ptc)); + [] any timer.timeout {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_2002_TheAltStatement_020()); + } +} diff --git a/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_021.ttcn b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_021.ttcn new file mode 100644 index 00000000..d481abca --- /dev/null +++ b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_021.ttcn @@ -0,0 +1,52 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:20.2, verify that the component.running operation cannot be used in parameters of altsteps invoked from an alt branch + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// d) The evaluation of an altstep invoked from an alt branch, if none of the alternatives in the altstep is chosen, shall +// not have side effects. To avoid side effects the restrictions imposed on the contents of functions called from special +// places (clause 16.1.4) shall apply to the actual parameters of the invoked altstep. + +module NegSem_2002_TheAltStatement_021 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + function f_ptcBehaviour() runs on GeneralComp { + timer t_tmr := 10.0; + t_tmr.start; + t_tmr.timeout; + } + + function f_test(GeneralComp p_ptc) return boolean { + if (p_ptc.running) { return true; } + else { return false; } + } + + altstep a_rcv(boolean p_par) runs on GeneralComp { + [] p.receive(integer:?) {} + } + + testcase TC_NegSem_2002_TheAltStatement_021() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + v_ptc.start(f_ptcBehaviour()); + connect(mtc:p, mtc:p); + p.send(1); + alt { + [] a_rcv(f_test(v_ptc)); + [] any timer.timeout {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_2002_TheAltStatement_021()); + } +} diff --git a/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_022.ttcn b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_022.ttcn new file mode 100644 index 00000000..be051bc5 --- /dev/null +++ b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_022.ttcn @@ -0,0 +1,52 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:20.2, verify that the alive operation cannot be used in parameters of altsteps invoked from an alt branch + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// d) The evaluation of an altstep invoked from an alt branch, if none of the alternatives in the altstep is chosen, shall +// not have side effects. To avoid side effects the restrictions imposed on the contents of functions called from special +// places (clause 16.1.4) shall apply to the actual parameters of the invoked altstep. + +module NegSem_2002_TheAltStatement_022 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + function f_ptcBehaviour() runs on GeneralComp { + timer t_tmr := 10.0; + t_tmr.start; + t_tmr.timeout; + } + + function f_test(GeneralComp p_ptc) return boolean { + if (p_ptc.alive) { return true; } + else { return false; } + } + + altstep a_rcv(boolean p_par) runs on GeneralComp { + [] p.receive(integer:?) {} + } + + testcase TC_NegSem_2002_TheAltStatement_022() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + v_ptc.start(f_ptcBehaviour()); + connect(mtc:p, mtc:p); + p.send(1); + alt { + [] a_rcv(f_test(v_ptc)); + [] any timer.timeout {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_2002_TheAltStatement_022()); + } +} diff --git a/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_023.ttcn b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_023.ttcn new file mode 100644 index 00000000..4681b049 --- /dev/null +++ b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_023.ttcn @@ -0,0 +1,49 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:20.2, verify that the done operation cannot be used in parameters of altsteps invoked from an alt branch + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// d) The evaluation of an altstep invoked from an alt branch, if none of the alternatives in the altstep is chosen, shall +// not have side effects. To avoid side effects the restrictions imposed on the contents of functions called from special +// places (clause 16.1.4) shall apply to the actual parameters of the invoked altstep. + +module NegSem_2002_TheAltStatement_023 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + function f_ptcBehaviour() runs on GeneralComp { + } + + function f_test(GeneralComp p_ptc) return boolean { + p_ptc.done; + return true; + } + + altstep a_rcv(boolean p_par) runs on GeneralComp { + [] p.receive(integer:?) {} + } + + testcase TC_NegSem_2002_TheAltStatement_023() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + v_ptc.start(f_ptcBehaviour()); + connect(mtc:p, mtc:p); + p.send(1); + alt { + [] a_rcv(f_test(v_ptc)); + [] any timer.timeout {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_2002_TheAltStatement_023()); + } +} diff --git a/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_024.ttcn b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_024.ttcn new file mode 100644 index 00000000..9beee456 --- /dev/null +++ b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_024.ttcn @@ -0,0 +1,49 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:20.2, verify that the killed operation cannot be used in parameters of altsteps invoked from an alt branch + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// d) The evaluation of an altstep invoked from an alt branch, if none of the alternatives in the altstep is chosen, shall +// not have side effects. To avoid side effects the restrictions imposed on the contents of functions called from special +// places (clause 16.1.4) shall apply to the actual parameters of the invoked altstep. + +module NegSem_2002_TheAltStatement_024 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + function f_ptcBehaviour() runs on GeneralComp { + } + + function f_test(GeneralComp p_ptc) return boolean { + p_ptc.killed; + return true; + } + + altstep a_rcv(boolean p_par) runs on GeneralComp { + [] p.receive(integer:?) {} + } + + testcase TC_NegSem_2002_TheAltStatement_024() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + v_ptc.start(f_ptcBehaviour()); + connect(mtc:p, mtc:p); + p.send(1); + alt { + [] a_rcv(f_test(v_ptc)); + [] any timer.timeout {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_2002_TheAltStatement_024()); + } +} diff --git a/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_025.ttcn b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_025.ttcn new file mode 100644 index 00000000..7b2320e1 --- /dev/null +++ b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_025.ttcn @@ -0,0 +1,46 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:20.2, verify that the port.start operation cannot be used in parameters of altsteps invoked from an alt branch + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// d) The evaluation of an altstep invoked from an alt branch, if none of the alternatives in the altstep is chosen, shall +// not have side effects. To avoid side effects the restrictions imposed on the contents of functions called from special +// places (clause 16.1.4) shall apply to the actual parameters of the invoked altstep. + +module NegSem_2002_TheAltStatement_025 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return boolean { + p.start; + return true; + } + + altstep a_rcv(boolean p_par) runs on GeneralComp { + [] p.receive(integer:?) {} + } + + testcase TC_NegSem_2002_TheAltStatement_025() runs on GeneralComp system GeneralComp { + timer t_tmr := 0.1; + t_tmr.start; + connect(mtc:p, mtc:p); + p.send(1); + alt { + [] a_rcv(f_test()) {} + [] t_tmr.timeout {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_2002_TheAltStatement_025()); + } +} diff --git a/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_026.ttcn b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_026.ttcn new file mode 100644 index 00000000..c02f3f82 --- /dev/null +++ b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_026.ttcn @@ -0,0 +1,46 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:20.2, verify that the port.stop operation cannot be used in parameters of altsteps invoked from an alt branch + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// d) The evaluation of an altstep invoked from an alt branch, if none of the alternatives in the altstep is chosen, shall +// not have side effects. To avoid side effects the restrictions imposed on the contents of functions called from special +// places (clause 16.1.4) shall apply to the actual parameters of the invoked altstep. + +module NegSem_2002_TheAltStatement_013 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return boolean { + p.stop; + return true; + } + + altstep a_rcv(boolean p_par) runs on GeneralComp { + [] p.receive(integer:?) {} + } + + testcase TC_NegSem_2002_TheAltStatement_013() runs on GeneralComp system GeneralComp { + timer t_tmr := 0.1; + t_tmr.start; + connect(mtc:p, mtc:p); + p.send(1); + alt { + [] a_rcv(f_test()) {} + [] t_tmr.timeout {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_2002_TheAltStatement_013()); + } +} diff --git a/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_027.ttcn b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_027.ttcn new file mode 100644 index 00000000..65efff9a --- /dev/null +++ b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_027.ttcn @@ -0,0 +1,46 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:20.2, verify that the halt operation cannot be used in parameters of altsteps invoked from an alt branch + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// d) The evaluation of an altstep invoked from an alt branch, if none of the alternatives in the altstep is chosen, shall +// not have side effects. To avoid side effects the restrictions imposed on the contents of functions called from special +// places (clause 16.1.4) shall apply to the actual parameters of the invoked altstep. + +module NegSem_2002_TheAltStatement_027 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return boolean { + p.halt; + return true; + } + + altstep a_rcv(boolean p_par) runs on GeneralComp { + [] p.receive(integer:?) {} + } + + testcase TC_NegSem_2002_TheAltStatement_027() runs on GeneralComp system GeneralComp { + timer t_tmr := 0.1; + t_tmr.start; + connect(mtc:p, mtc:p); + p.send(1); + alt { + [] a_rcv(f_test()) {} + [] t_tmr.timeout {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_2002_TheAltStatement_027()); + } +} diff --git a/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_028.ttcn b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_028.ttcn new file mode 100644 index 00000000..57f8e19b --- /dev/null +++ b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_028.ttcn @@ -0,0 +1,46 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:20.2, verify that the clear operation cannot be used in parameters of altsteps invoked from an alt branch + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// d) The evaluation of an altstep invoked from an alt branch, if none of the alternatives in the altstep is chosen, shall +// not have side effects. To avoid side effects the restrictions imposed on the contents of functions called from special +// places (clause 16.1.4) shall apply to the actual parameters of the invoked altstep. + +module NegSem_2002_TheAltStatement_028 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return boolean { + p.clear; + return true; + } + + altstep a_rcv(boolean p_par) runs on GeneralComp { + [] p.receive(integer:?) {} + } + + testcase TC_NegSem_2002_TheAltStatement_028() runs on GeneralComp system GeneralComp { + timer t_tmr := 0.1; + t_tmr.start; + connect(mtc:p, mtc:p); + p.send(1); + alt { + [] a_rcv(f_test()) {} + [] t_tmr.timeout {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_2002_TheAltStatement_028()); + } +} diff --git a/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_029.ttcn b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_029.ttcn new file mode 100644 index 00000000..f480d73b --- /dev/null +++ b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_029.ttcn @@ -0,0 +1,44 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:20.2, verify that the checkstate operation cannot be used in parameters of altsteps invoked from an alt branch + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// d) The evaluation of an altstep invoked from an alt branch, if none of the alternatives in the altstep is chosen, shall +// not have side effects. To avoid side effects the restrictions imposed on the contents of functions called from special +// places (clause 16.1.4) shall apply to the actual parameters of the invoked altstep. + +module NegSem_2002_TheAltStatement_029 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return boolean { + if (p.checkstate("Started")) { return true; } + else { return false; } + } + + altstep a_rcv(boolean p_par) runs on GeneralComp { + [] p.receive(integer:?) {} + } + + testcase TC_NegSem_2002_TheAltStatement_029() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(1); + alt { + [] a_rcv(f_test()); + [] any timer.timeout {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_2002_TheAltStatement_029()); + } +} diff --git a/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_030.ttcn b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_030.ttcn new file mode 100644 index 00000000..5834f587 --- /dev/null +++ b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_030.ttcn @@ -0,0 +1,44 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:20.2, verify that the send operation cannot be used in parameters of altsteps invoked from an alt branch + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// d) The evaluation of an altstep invoked from an alt branch, if none of the alternatives in the altstep is chosen, shall +// not have side effects. To avoid side effects the restrictions imposed on the contents of functions called from special +// places (clause 16.1.4) shall apply to the actual parameters of the invoked altstep. + +module NegSem_2002_TheAltStatement_030 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return boolean { + p.send(2); + return true; + } + + altstep a_rcv(boolean p_par) runs on GeneralComp { + [] p.receive(integer:?) {} + } + + testcase TC_NegSem_2002_TheAltStatement_030() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(1); + alt { + [] a_rcv(f_test()); + [] any timer.timeout {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_2002_TheAltStatement_030()); + } +} diff --git a/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_031.ttcn b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_031.ttcn new file mode 100644 index 00000000..0b9e8c61 --- /dev/null +++ b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_031.ttcn @@ -0,0 +1,45 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:20.2, verify that the receive operation cannot be used in parameters of altsteps invoked from an alt branch + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// d) The evaluation of an altstep invoked from an alt branch, if none of the alternatives in the altstep is chosen, shall +// not have side effects. To avoid side effects the restrictions imposed on the contents of functions called from special +// places (clause 16.1.4) shall apply to the actual parameters of the invoked altstep. + +module NegSem_2002_TheAltStatement_031 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return boolean { + p.receive(integer:?); + return true; + } + + altstep a_rcv(boolean p_par) runs on GeneralComp { + [] p.receive(integer:?) {} + } + + testcase TC_NegSem_2002_TheAltStatement_031() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(1); + p.send(1); + alt { + [] a_rcv(f_test()); + [] any timer.timeout {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_2002_TheAltStatement_031()); + } +} diff --git a/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_032.ttcn b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_032.ttcn new file mode 100644 index 00000000..a367e624 --- /dev/null +++ b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_032.ttcn @@ -0,0 +1,45 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:20.2, verify that the trigger operation cannot be used in parameters of altsteps invoked from an alt branch + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// d) The evaluation of an altstep invoked from an alt branch, if none of the alternatives in the altstep is chosen, shall +// not have side effects. To avoid side effects the restrictions imposed on the contents of functions called from special +// places (clause 16.1.4) shall apply to the actual parameters of the invoked altstep. + +module NegSem_2002_TheAltStatement_032 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return boolean { + p.trigger(integer:?); + return true; + } + + altstep a_rcv(boolean p_par) runs on GeneralComp { + [] p.receive(integer:?) {} + } + + testcase TC_NegSem_2002_TheAltStatement_032() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(1); + p.send(1); + alt { + [] a_rcv(f_test()); + [] any timer.timeout {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_2002_TheAltStatement_032()); + } +} diff --git a/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_033.ttcn b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_033.ttcn new file mode 100644 index 00000000..6b17e178 --- /dev/null +++ b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_033.ttcn @@ -0,0 +1,53 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:20.2, verify that the call operation cannot be used in parameters of altsteps invoked from an alt branch + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// d) The evaluation of an altstep invoked from an alt branch, if none of the alternatives in the altstep is chosen, shall +// not have side effects. To avoid side effects the restrictions imposed on the contents of functions called from special +// places (clause 16.1.4) shall apply to the actual parameters of the invoked altstep. + +module NegSem_2002_TheAltStatement_033 { + type port P message { + inout integer; + } + + signature S(); + + type port PSig procedure { + inout S; + } + + type component GeneralComp { + port P p; + port PSig psig; + } + + function f_test() runs on GeneralComp return boolean { + psig.call(S:{}, nowait); + return true; + } + + altstep a_rcv(boolean p_par) runs on GeneralComp { + [] p.receive(integer:?) {} + } + + testcase TC_NegSem_2002_TheAltStatement_033() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + connect(mtc:p, mtc:p); + connect(mtc:psig, v_ptc:psig); + p.send(1); + alt { + [] a_rcv(f_test()); + [] any timer.timeout {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_2002_TheAltStatement_033()); + } +} diff --git a/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_034.ttcn b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_034.ttcn new file mode 100644 index 00000000..85559169 --- /dev/null +++ b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_034.ttcn @@ -0,0 +1,58 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:20.2, verify that the getcall operation cannot be used in parameters of altsteps invoked from an alt branch + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// d) The evaluation of an altstep invoked from an alt branch, if none of the alternatives in the altstep is chosen, shall +// not have side effects. To avoid side effects the restrictions imposed on the contents of functions called from special +// places (clause 16.1.4) shall apply to the actual parameters of the invoked altstep. + +module NegSem_2002_TheAltStatement_034 { + type port P message { + inout integer; + } + + signature S(); + + type port PSig procedure { + inout S; + } + + type component GeneralComp { + port P p; + port PSig psig; + } + + function f_ptcBehaviour() runs on GeneralComp { + psig.call(S:{}, nowait); + } + + function f_test() runs on GeneralComp return boolean { + psig.getcall(S:?); + return true; + } + + altstep a_rcv(boolean p_par) runs on GeneralComp { + [] p.receive(integer:?) {} + } + + testcase TC_NegSem_2002_TheAltStatement_034() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + connect(mtc:p, mtc:p); + connect(mtc:psig, v_ptc:psig); + v_ptc.start(f_ptcBehaviour()); + p.send(1); + alt { + [] a_rcv(f_test()); + [] any timer.timeout {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_2002_TheAltStatement_034()); + } +} diff --git a/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_035.ttcn b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_035.ttcn new file mode 100644 index 00000000..7bf5f7cb --- /dev/null +++ b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_035.ttcn @@ -0,0 +1,59 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:20.2, verify that the reply operation cannot be used in parameters of altsteps invoked from an alt branch + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// d) The evaluation of an altstep invoked from an alt branch, if none of the alternatives in the altstep is chosen, shall +// not have side effects. To avoid side effects the restrictions imposed on the contents of functions called from special +// places (clause 16.1.4) shall apply to the actual parameters of the invoked altstep. + +module NegSem_2002_TheAltStatement_035 { + type port P message { + inout integer; + } + + signature S(); + + type port PSig procedure { + inout S; + } + + type component GeneralComp { + port P p; + port PSig psig; + } + + function f_ptcBehaviour() runs on GeneralComp { + psig.call(S:{}, nowait); + } + + function f_test() runs on GeneralComp return boolean { + psig.reply(S:{}); + return true; + } + + altstep a_rcv(boolean p_par) runs on GeneralComp { + [] p.receive(integer:?) {} + } + + testcase TC_NegSem_2002_TheAltStatement_035() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + connect(mtc:p, mtc:p); + connect(mtc:psig, v_ptc:psig); + v_ptc.start(f_ptcBehaviour()); + p.send(1); + psig.getcall(S:?); + alt { + [] a_rcv(f_test()); + [] any timer.timeout {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_2002_TheAltStatement_035()); + } +} diff --git a/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_036.ttcn b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_036.ttcn new file mode 100644 index 00000000..3270b557 --- /dev/null +++ b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_036.ttcn @@ -0,0 +1,60 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:20.2, verify that the getreply operation cannot be used in parameters of altsteps invoked from an alt branch + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// d) The evaluation of an altstep invoked from an alt branch, if none of the alternatives in the altstep is chosen, shall +// not have side effects. To avoid side effects the restrictions imposed on the contents of functions called from special +// places (clause 16.1.4) shall apply to the actual parameters of the invoked altstep. + +module NegSem_2002_TheAltStatement_036 { + type port P message { + inout integer; + } + + signature S(); + + type port PSig procedure { + inout S; + } + + type component GeneralComp { + port P p; + port PSig psig; + } + + function f_ptcBehaviour() runs on GeneralComp { + psig.getcall(S:?); + psig.reply(S:{}); + } + + function f_test() runs on GeneralComp return boolean { + psig.getreply(S:?); + return true; + } + + altstep a_rcv(boolean p_par) runs on GeneralComp { + [] p.receive(integer:?) {} + } + + testcase TC_NegSem_2002_TheAltStatement_036() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + connect(mtc:p, mtc:p); + connect(mtc:psig, v_ptc:psig); + v_ptc.start(f_ptcBehaviour()); + psig.call(S:{}, nowait); + p.send(1); + alt { + [] a_rcv(f_test()); + [] any timer.timeout {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_2002_TheAltStatement_036()); + } +} diff --git a/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_037.ttcn b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_037.ttcn new file mode 100644 index 00000000..e94d2a89 --- /dev/null +++ b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_037.ttcn @@ -0,0 +1,59 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:20.2, verify that the raise operation cannot be used in parameters of altsteps invoked from an alt branch + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// d) The evaluation of an altstep invoked from an alt branch, if none of the alternatives in the altstep is chosen, shall +// not have side effects. To avoid side effects the restrictions imposed on the contents of functions called from special +// places (clause 16.1.4) shall apply to the actual parameters of the invoked altstep. + +module NegSem_2002_TheAltStatement_037 { + type port P message { + inout integer; + } + + signature S() exception (charstring); + + type port PSig procedure { + inout S; + } + + type component GeneralComp { + port P p; + port PSig psig; + } + + function f_ptcBehaviour() runs on GeneralComp { + psig.call(S:{}, nowait); + } + + function f_test() runs on GeneralComp return boolean { + psig.raise(S, "UserException"); + return true; + } + + altstep a_rcv(boolean p_par) runs on GeneralComp { + [] p.receive(integer:?) {} + } + + testcase TC_NegSem_2002_TheAltStatement_037() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + connect(mtc:p, mtc:p); + connect(mtc:psig, v_ptc:psig); + v_ptc.start(f_ptcBehaviour()); + p.send(1); + psig.getcall(S:?); + alt { + [] a_rcv(f_test()); + [] any timer.timeout {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_2002_TheAltStatement_037()); + } +} diff --git a/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_038.ttcn b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_038.ttcn new file mode 100644 index 00000000..44a9a6e6 --- /dev/null +++ b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_038.ttcn @@ -0,0 +1,60 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:20.2, verify that the catch operation cannot be used in parameters of altsteps invoked from an alt branch + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// d) The evaluation of an altstep invoked from an alt branch, if none of the alternatives in the altstep is chosen, shall +// not have side effects. To avoid side effects the restrictions imposed on the contents of functions called from special +// places (clause 16.1.4) shall apply to the actual parameters of the invoked altstep. + +module NegSem_2002_TheAltStatement_038 { + type port P message { + inout integer; + } + + signature S() exception (charstring); + + type port PSig procedure { + inout S; + } + + type component GeneralComp { + port P p; + port PSig psig; + } + + function f_ptcBehaviour() runs on GeneralComp { + psig.getcall(S:?); + psig.raise(S, "UserException"); + } + + function f_test() runs on GeneralComp return boolean { + psig.catch(S, charstring:?); + return true; + } + + altstep a_rcv(boolean p_par) runs on GeneralComp { + [] p.receive(integer:?) {} + } + + testcase TC_NegSem_2002_TheAltStatement_038() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + connect(mtc:p, mtc:p); + connect(mtc:psig, v_ptc:psig); + v_ptc.start(f_ptcBehaviour()); + psig.call(S:{}, nowait); + p.send(1); + alt { + [] a_rcv(f_test()); + [] any timer.timeout {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_2002_TheAltStatement_038()); + } +} diff --git a/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_039.ttcn b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_039.ttcn new file mode 100644 index 00000000..7c5118bc --- /dev/null +++ b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_039.ttcn @@ -0,0 +1,44 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:20.2, verify that the check operation cannot be used in parameters of altsteps invoked from an alt branch + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// d) The evaluation of an altstep invoked from an alt branch, if none of the alternatives in the altstep is chosen, shall +// not have side effects. To avoid side effects the restrictions imposed on the contents of functions called from special +// places (clause 16.1.4) shall apply to the actual parameters of the invoked altstep. + +module NegSem_2002_TheAltStatement_039 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return boolean { + p.check; + return true; + } + + altstep a_rcv(boolean p_par) runs on GeneralComp { + [] p.receive(integer:?) {} + } + + testcase TC_NegSem_2002_TheAltStatement_039() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(1); + alt { + [] a_rcv(f_test()); + [] any timer.timeout {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_2002_TheAltStatement_039()); + } +} diff --git a/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_040.ttcn b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_040.ttcn new file mode 100644 index 00000000..6bf5c64a --- /dev/null +++ b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_040.ttcn @@ -0,0 +1,44 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:20.2, verify that the connect operation cannot be used in parameters of altsteps invoked from an alt branch + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// d) The evaluation of an altstep invoked from an alt branch, if none of the alternatives in the altstep is chosen, shall +// not have side effects. To avoid side effects the restrictions imposed on the contents of functions called from special +// places (clause 16.1.4) shall apply to the actual parameters of the invoked altstep. + +module NegSem_2002_TheAltStatement_040 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return boolean { + connect(mtc:p, mtc:p); + return true; + } + + altstep a_rcv(boolean p_par) runs on GeneralComp { + [] p.receive(integer:?) {} + } + + testcase TC_NegSem_2002_TheAltStatement_040() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(1); + alt { + [] a_rcv(f_test()); + [] any timer.timeout {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_2002_TheAltStatement_040()); + } +} diff --git a/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_041.ttcn b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_041.ttcn new file mode 100644 index 00000000..3945e062 --- /dev/null +++ b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_041.ttcn @@ -0,0 +1,44 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:20.2, verify that the disconnect operation cannot be used in parameters of altsteps invoked from an alt branch + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// d) The evaluation of an altstep invoked from an alt branch, if none of the alternatives in the altstep is chosen, shall +// not have side effects. To avoid side effects the restrictions imposed on the contents of functions called from special +// places (clause 16.1.4) shall apply to the actual parameters of the invoked altstep. + +module NegSem_2002_TheAltStatement_041 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return boolean { + disconnect(mtc:p, mtc:p); + return true; + } + + altstep a_rcv(boolean p_par) runs on GeneralComp { + [] p.receive(integer:?) {} + } + + testcase TC_NegSem_2002_TheAltStatement_041() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(1); + alt { + [] a_rcv(f_test()); + [] any timer.timeout {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_2002_TheAltStatement_041()); + } +} diff --git a/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_042.ttcn b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_042.ttcn new file mode 100644 index 00000000..89124e7e --- /dev/null +++ b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_042.ttcn @@ -0,0 +1,45 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:20.2, verify that the map operation cannot be used in parameters of altsteps invoked from an alt branch + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// d) The evaluation of an altstep invoked from an alt branch, if none of the alternatives in the altstep is chosen, shall +// not have side effects. To avoid side effects the restrictions imposed on the contents of functions called from special +// places (clause 16.1.4) shall apply to the actual parameters of the invoked altstep. + +module NegSem_2002_TheAltStatement_042 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp system GeneralComp return boolean { + map(mtc:p, system:p); + return true; + } + + altstep a_rcv(boolean p_par) runs on GeneralComp system GeneralComp { + [] p.receive(integer:?) {} + } + + testcase TC_NegSem_2002_TheAltStatement_042() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(1); + disconnect(mtc:p, mtc:p); + alt { + [] a_rcv(f_test()); + [] any timer.timeout {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_2002_TheAltStatement_042()); + } +} diff --git a/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_043.ttcn b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_043.ttcn new file mode 100644 index 00000000..c4449a65 --- /dev/null +++ b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_043.ttcn @@ -0,0 +1,46 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:20.2, verify that the unmap operation cannot be used in parameters of altsteps invoked from an alt branch + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// d) The evaluation of an altstep invoked from an alt branch, if none of the alternatives in the altstep is chosen, shall +// not have side effects. To avoid side effects the restrictions imposed on the contents of functions called from special +// places (clause 16.1.4) shall apply to the actual parameters of the invoked altstep. + +module NegSem_2002_TheAltStatement_043 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp system GeneralComp return boolean { + unmap(mtc:p, system:p); + return true; + } + + altstep a_rcv(boolean p_par) runs on GeneralComp system GeneralComp { + [] p.receive(integer:?) {} + } + + testcase TC_NegSem_2002_TheAltStatement_043() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(1); + disconnect(mtc:p, mtc:p); + map(mtc:p, system:p); + alt { + [] a_rcv(f_test()); + [] any timer.timeout {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_2002_TheAltStatement_043()); + } +} diff --git a/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_044.ttcn b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_044.ttcn new file mode 100644 index 00000000..dfab94f7 --- /dev/null +++ b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_044.ttcn @@ -0,0 +1,44 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:20.2, verify that the action operation cannot be used in parameters of altsteps invoked from an alt branch + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// d) The evaluation of an altstep invoked from an alt branch, if none of the alternatives in the altstep is chosen, shall +// not have side effects. To avoid side effects the restrictions imposed on the contents of functions called from special +// places (clause 16.1.4) shall apply to the actual parameters of the invoked altstep. + +module NegSem_2002_TheAltStatement_044 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return boolean { + action("My action"); + return true; + } + + altstep a_rcv(boolean p_par) runs on GeneralComp { + [] p.receive(integer:?) {} + } + + testcase TC_NegSem_2002_TheAltStatement_044() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(1); + alt { + [] a_rcv(f_test()); + [] any timer.timeout {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_2002_TheAltStatement_044()); + } +} diff --git a/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_045.ttcn b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_045.ttcn new file mode 100644 index 00000000..7e438d45 --- /dev/null +++ b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_045.ttcn @@ -0,0 +1,45 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:20.2, verify that the timer.start operation cannot be used in parameters of altsteps invoked from an alt branch + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// d) The evaluation of an altstep invoked from an alt branch, if none of the alternatives in the altstep is chosen, shall +// not have side effects. To avoid side effects the restrictions imposed on the contents of functions called from special +// places (clause 16.1.4) shall apply to the actual parameters of the invoked altstep. + +module NegSem_2002_TheAltStatement_045 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + timer tc_tmr := 0.1; + } + + function f_test() runs on GeneralComp return boolean { + tc_tmr.start; + return true; + } + + altstep a_rcv(boolean p_par) runs on GeneralComp { + [] p.receive(integer:?) {} + } + + testcase TC_NegSem_2002_TheAltStatement_045() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(1); + alt { + [] a_rcv(f_test()); + [] any timer.timeout {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_2002_TheAltStatement_045()); + } +} diff --git a/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_046.ttcn b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_046.ttcn new file mode 100644 index 00000000..43b4635b --- /dev/null +++ b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_046.ttcn @@ -0,0 +1,46 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:20.2, verify that the timer.stop operation cannot be used in parameters of altsteps invoked from an alt branch + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// d) The evaluation of an altstep invoked from an alt branch, if none of the alternatives in the altstep is chosen, shall +// not have side effects. To avoid side effects the restrictions imposed on the contents of functions called from special +// places (clause 16.1.4) shall apply to the actual parameters of the invoked altstep. + +module NegSem_2002_TheAltStatement_046 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + timer tc_tmr := 0.1; + } + + function f_test() runs on GeneralComp return boolean { + tc_tmr.stop; + return true; + } + + altstep a_rcv(boolean p_par) runs on GeneralComp { + [] p.receive(integer:?) {} + } + + testcase TC_NegSem_2002_TheAltStatement_046() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + tc_tmr.start; + p.send(1); + alt { + [] a_rcv(f_test()); + [] any timer.timeout {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_2002_TheAltStatement_046()); + } +} diff --git a/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_047.ttcn b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_047.ttcn new file mode 100644 index 00000000..78bcb4dd --- /dev/null +++ b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_047.ttcn @@ -0,0 +1,46 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:20.2, verify that the timer.running operation cannot be used in parameters of altsteps invoked from an alt branch + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// d) The evaluation of an altstep invoked from an alt branch, if none of the alternatives in the altstep is chosen, shall +// not have side effects. To avoid side effects the restrictions imposed on the contents of functions called from special +// places (clause 16.1.4) shall apply to the actual parameters of the invoked altstep. + +module NegSem_2002_TheAltStatement_047 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + timer tc_tmr := 5.0; + } + + function f_test() runs on GeneralComp return boolean { + if (tc_tmr.running) { return true; } + else { return false; } + } + + altstep a_rcv(boolean p_par) runs on GeneralComp { + [] p.receive(integer:?) {} + } + + testcase TC_NegSem_2002_TheAltStatement_047() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + tc_tmr.start; + p.send(1); + alt { + [] a_rcv(f_test()); + [] any timer.timeout {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_2002_TheAltStatement_047()); + } +} diff --git a/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_048.ttcn b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_048.ttcn new file mode 100644 index 00000000..0fcc2609 --- /dev/null +++ b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_048.ttcn @@ -0,0 +1,46 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:20.2, verify that the read operation cannot be used in parameters of altsteps invoked from an alt branch + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// d) The evaluation of an altstep invoked from an alt branch, if none of the alternatives in the altstep is chosen, shall +// not have side effects. To avoid side effects the restrictions imposed on the contents of functions called from special +// places (clause 16.1.4) shall apply to the actual parameters of the invoked altstep. + +module NegSem_2002_TheAltStatement_048 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + timer tc_tmr := 0.1; + } + + function f_test() runs on GeneralComp return boolean { + if (tc_tmr.read > 0.0) { return true; } + else { return false; } + } + + altstep a_rcv(boolean p_par) runs on GeneralComp { + [] p.receive(integer:?) {} + } + + testcase TC_NegSem_2002_TheAltStatement_048() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + tc_tmr.start; + p.send(1); + alt { + [] a_rcv(f_test()); + [] any timer.timeout {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_2002_TheAltStatement_048()); + } +} diff --git a/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_049.ttcn b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_049.ttcn new file mode 100644 index 00000000..f3419b9b --- /dev/null +++ b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_049.ttcn @@ -0,0 +1,46 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:20.2, verify that the timeout operation cannot be used in parameters of altsteps invoked from an alt branch + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// d) The evaluation of an altstep invoked from an alt branch, if none of the alternatives in the altstep is chosen, shall +// not have side effects. To avoid side effects the restrictions imposed on the contents of functions called from special +// places (clause 16.1.4) shall apply to the actual parameters of the invoked altstep. + +module NegSem_2002_TheAltStatement_049 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + timer tc_tmr := 0.1; + } + + function f_test() runs on GeneralComp return boolean { + any timer.timeout; + return true; + } + + altstep a_rcv(boolean p_par) runs on GeneralComp { + [] p.receive(integer:?) {} + } + + testcase TC_NegSem_2002_TheAltStatement_049() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + tc_tmr.start; + p.send(1); + alt { + [] a_rcv(f_test()); + [] any timer.timeout {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_2002_TheAltStatement_049()); + } +} diff --git a/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_050.ttcn b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_050.ttcn new file mode 100644 index 00000000..2bc6ff69 --- /dev/null +++ b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_050.ttcn @@ -0,0 +1,50 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:20.2, verify that a non-deterministic external function call cannot be used in parameters of altsteps invoked from an alt branch + ** @verdict pass reject + ** @configuration external_functions + ***************************************************/ + +// The following requirement is tested: +// d) The evaluation of an altstep invoked from an alt branch, if none of the alternatives in the altstep is chosen, shall +// not have side effects. To avoid side effects the restrictions imposed on the contents of functions called from special +// places (clause 16.1.4) shall apply to the actual parameters of the invoked altstep. + +module NegSem_2002_TheAltStatement_050 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + /** + * @return always true + */ + external function xf_NegSem_2002_TheAltStatement_001() return boolean; + + function f_test() runs on GeneralComp return boolean { + if (xf_NegSem_2002_TheAltStatement_001()) { return true; } + else { return true; } + } + + altstep a_rcv(boolean p_par) runs on GeneralComp { + [] p.receive(integer:?) {} + } + + testcase TC_NegSem_2002_TheAltStatement_050() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(1); + alt { + [] a_rcv(f_test()); + [] any timer.timeout {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_2002_TheAltStatement_050()); + } +} diff --git a/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_051.ttcn b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_051.ttcn new file mode 100644 index 00000000..9c4ad1b1 --- /dev/null +++ b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_051.ttcn @@ -0,0 +1,44 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:20.2, verify that the predefined rnd function cannot be used in parameters of altsteps invoked from an alt branch + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// d) The evaluation of an altstep invoked from an alt branch, if none of the alternatives in the altstep is chosen, shall +// not have side effects. To avoid side effects the restrictions imposed on the contents of functions called from special +// places (clause 16.1.4) shall apply to the actual parameters of the invoked altstep. + +module NegSem_2002_TheAltStatement_051 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return boolean { + if (rnd() > 0.5) { return true; } + else { return true; } + } + + altstep a_rcv(boolean p_par) runs on GeneralComp { + [] p.receive(integer:?) {} + } + + testcase TC_NegSem_2002_TheAltStatement_051() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(1); + alt { + [] a_rcv(f_test()); + [] any timer.timeout {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_2002_TheAltStatement_051()); + } +} diff --git a/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_052.ttcn b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_052.ttcn new file mode 100644 index 00000000..802b3ec8 --- /dev/null +++ b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_052.ttcn @@ -0,0 +1,45 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:20.2, verify a function called in a guard of an altstep cannot contain an assignment of a component variable + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// d) The evaluation of an altstep invoked from an alt branch, if none of the alternatives in the altstep is chosen, shall +// not have side effects. To avoid side effects the restrictions imposed on the contents of functions called from special +// places (clause 16.1.4) shall apply to the actual parameters of the invoked altstep. + +module NegSem_2002_TheAltStatement_052 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + var integer vc_int; + } + + function f_test() runs on GeneralComp return boolean { + vc_int := 1; + return true; + } + + altstep a_rcv(boolean p_par) runs on GeneralComp { + [] p.receive(integer:?) {} + } + + testcase TC_NegSem_2002_TheAltStatement_052() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(1); + alt { + [] a_rcv(f_test()); + [] any timer.timeout {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_2002_TheAltStatement_052()); + } +} diff --git a/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_053.ttcn b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_053.ttcn new file mode 100644 index 00000000..51c08971 --- /dev/null +++ b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_053.ttcn @@ -0,0 +1,49 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:20.2, verify a function called in a guard of an altstep cannot contain a component variable used as an actual out parameter + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// d) The evaluation of an altstep invoked from an alt branch, if none of the alternatives in the altstep is chosen, shall +// not have side effects. To avoid side effects the restrictions imposed on the contents of functions called from special +// places (clause 16.1.4) shall apply to the actual parameters of the invoked altstep. + +module NegSem_2002_TheAltStatement_053 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + var integer vc_int; + } + + function f_out (out integer p_out) { + p_out := 1; + } + + function f_test() runs on GeneralComp return boolean { + f_out(vc_int); + return true; + } + + altstep a_rcv(boolean p_par) runs on GeneralComp { + [] p.receive(integer:?) {} + } + + testcase TC_NegSem_2002_TheAltStatement_053() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(1); + alt { + [] a_rcv(f_test()); + [] any timer.timeout {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_2002_TheAltStatement_053()); + } +} diff --git a/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_054.ttcn b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_054.ttcn new file mode 100644 index 00000000..3b49b95d --- /dev/null +++ b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_054.ttcn @@ -0,0 +1,49 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:20.2, verify a function called in a guard of an altstep cannot contain a component variable used as an actual inout parameter + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// d) The evaluation of an altstep invoked from an alt branch, if none of the alternatives in the altstep is chosen, shall +// not have side effects. To avoid side effects the restrictions imposed on the contents of functions called from special +// places (clause 16.1.4) shall apply to the actual parameters of the invoked altstep. + +module NegSem_2002_TheAltStatement_054 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + var integer vc_int := 0; + } + + function f_inout (inout integer p_inout) { + p_inout := 1; + } + + function f_test() runs on GeneralComp return boolean { + f_inout(vc_int); + return true; + } + + altstep a_rcv(boolean p_par) runs on GeneralComp { + [] p.receive(integer:?) {} + } + + testcase TC_NegSem_2002_TheAltStatement_054() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(1); + alt { + [] a_rcv(f_test()); + [] any timer.timeout {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_2002_TheAltStatement_054()); + } +} diff --git a/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_055.ttcn b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_055.ttcn new file mode 100644 index 00000000..025699ad --- /dev/null +++ b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_055.ttcn @@ -0,0 +1,44 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:20.2, verify that the setverdict operation cannot be used in guard statements of altstep + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// d) The evaluation of an altstep invoked from an alt branch, if none of the alternatives in the altstep is chosen, shall +// not have side effects. To avoid side effects the restrictions imposed on the contents of functions called from special +// places (clause 16.1.4) shall apply to the actual parameters of the invoked altstep. + +module NegSem_2002_TheAltStatement_055 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return boolean { + setverdict(pass); + return true; + } + + altstep a_rcv(boolean p_par) runs on GeneralComp { + [] p.receive(integer:?) {} + } + + testcase TC_NegSem_2002_TheAltStatement_055() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(1); + alt { + [] a_rcv(f_test()); + [] any timer.timeout {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_2002_TheAltStatement_055()); + } +} diff --git a/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_056.ttcn b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_056.ttcn new file mode 100644 index 00000000..cd4196c0 --- /dev/null +++ b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_056.ttcn @@ -0,0 +1,48 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:20.2, verify that the activate operation cannot be used in parameters of altsteps invoked from an alt branch + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// d) The evaluation of an altstep invoked from an alt branch, if none of the alternatives in the altstep is chosen, shall +// not have side effects. To avoid side effects the restrictions imposed on the contents of functions called from special +// places (clause 16.1.4) shall apply to the actual parameters of the invoked altstep. + +module NegSem_2002_TheAltStatement_056 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + altstep a_anyTimer() runs on GeneralComp { + [] any timer.timeout {} + } + + function f_test() runs on GeneralComp return boolean { + activate(a_anyTimer()); + return true; + } + + altstep a_rcv(boolean p_par) runs on GeneralComp { + [] p.receive(integer:?) {} + } + + testcase TC_NegSem_2002_TheAltStatement_056() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(1); + alt { + [] a_rcv(f_test()); + [] any timer.timeout {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_2002_TheAltStatement_056()); + } +} diff --git a/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_057.ttcn b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_057.ttcn new file mode 100644 index 00000000..d0016dd0 --- /dev/null +++ b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_057.ttcn @@ -0,0 +1,49 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:20.2, verify that the deactivate operation cannot be used in parameters of altsteps invoked from an alt branch + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// d) The evaluation of an altstep invoked from an alt branch, if none of the alternatives in the altstep is chosen, shall +// not have side effects. To avoid side effects the restrictions imposed on the contents of functions called from special +// places (clause 16.1.4) shall apply to the actual parameters of the invoked altstep. + +module NegSem_2002_TheAltStatement_057 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + altstep a_anyTimer() runs on GeneralComp { + [] any timer.timeout {} + } + + function f_test() runs on GeneralComp return boolean { + deactivate; + return true; + } + + altstep a_rcv(boolean p_par) runs on GeneralComp { + [] p.receive(integer:?) {} + } + + testcase TC_NegSem_2002_TheAltStatement_057() runs on GeneralComp system GeneralComp { + activate(a_anyTimer()); + connect(mtc:p, mtc:p); + p.send(1); + alt { + [] a_rcv(f_test()); + [] any timer.timeout {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_2002_TheAltStatement_057()); + } +} diff --git a/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_058.ttcn b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_058.ttcn new file mode 100644 index 00000000..398652b3 --- /dev/null +++ b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_058.ttcn @@ -0,0 +1,45 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:20.2, verify that a function used in a parameter of an altstep invoked from an alt branch cannot contain out parameters + ** @verdict pass reject +***************************************************/ + +// The following requirement is tested: +// d) The evaluation of an altstep invoked from an alt branch, if none of the alternatives in the altstep is chosen, shall +// not have side effects. To avoid side effects the restrictions imposed on the contents of functions called from special +// places (clause 16.1.4) shall apply to the actual parameters of the invoked altstep. + +module NegSem_2002_TheAltStatement_058 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + function f_test(out integer p_par) runs on GeneralComp return boolean { + p_par := 1; + return true; + } + + altstep a_rcv(boolean p_par) runs on GeneralComp { + [] p.receive(integer:?) {} + } + + testcase TC_NegSem_2002_TheAltStatement_058() runs on GeneralComp system GeneralComp { + var integer v_int := 0; + connect(mtc:p, mtc:p); + p.send(1); + alt { + [] a_rcv(f_test(v_int)); + [] any timer.timeout {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_2002_TheAltStatement_058()); + } +} diff --git a/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_059.ttcn b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_059.ttcn new file mode 100644 index 00000000..fa2703a7 --- /dev/null +++ b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_059.ttcn @@ -0,0 +1,45 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:20.2, verify that a function used in a parameter of an altstep invoked from an alt branch cannot contain inout parameters + ** @verdict pass reject +***************************************************/ + +// The following requirement is tested: +// d) The evaluation of an altstep invoked from an alt branch, if none of the alternatives in the altstep is chosen, shall +// not have side effects. To avoid side effects the restrictions imposed on the contents of functions called from special +// places (clause 16.1.4) shall apply to the actual parameters of the invoked altstep. + +module NegSem_2002_TheAltStatement_059 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + function f_test(inout integer p_par) runs on GeneralComp return boolean { + p_par := 1; + return true; + } + + altstep a_rcv(boolean p_par) runs on GeneralComp { + [] p.receive(integer:?) {} + } + + testcase TC_NegSem_2002_TheAltStatement_059() runs on GeneralComp system GeneralComp { + var integer v_int := 0; + connect(mtc:p, mtc:p); + p.send(1); + alt { + [] a_rcv(f_test(v_int)); + [] any timer.timeout {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_2002_TheAltStatement_059()); + } +} diff --git a/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_060.ttcn b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_060.ttcn new file mode 100644 index 00000000..676b3792 --- /dev/null +++ b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_060.ttcn @@ -0,0 +1,40 @@ +/***************************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:20.2, verify that the read operation cannot be used in guard statements + ** @verdict pass reject + *****************************************************************/ + +// The following requirement is tested: +// b) The evaluation of a Boolean expression guarding an alternative shall not have side effects. To avoid side effects +// that cause an inconsistency between the actual snapshot and the state of the component, the same restrictions +// as the restrictions for the initialization of local definitions within altsteps (clause 16.2) and the restrictions +// imposed on the contents of functions called from special places (clause 16.1.4) shall apply. + +module NegSem_2002_TheAltStatement_060 { + + type port MyPort message { + inout charstring + } + + type component GeneralComp { + port MyPort p; + } + + template charstring m_test := "ping"; + + testcase TC_NegSem_2002_TheAltStatement_060() runs on GeneralComp { + timer t_tmr := 1.0; + t_tmr.start; + p.send(m_test); + alt { + [t_tmr.read > 0.0] p.receive(charstring:?) { + setverdict(pass); + } + } + } + + control { + execute(TC_NegSem_2002_TheAltStatement_060()); + } +} \ No newline at end of file diff --git a/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_061.ttcn b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_061.ttcn new file mode 100644 index 00000000..033444ff --- /dev/null +++ b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_061.ttcn @@ -0,0 +1,38 @@ +/***************************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:20.2, verify that the checkstate operation cannot be used in guard statements + ** @verdict pass reject + *****************************************************************/ + +// The following requirement is tested: +// b) The evaluation of a Boolean expression guarding an alternative shall not have side effects. To avoid side effects +// that cause an inconsistency between the actual snapshot and the state of the component, the same restrictions +// as the restrictions for the initialization of local definitions within altsteps (clause 16.2) and the restrictions +// imposed on the contents of functions called from special places (clause 16.1.4) shall apply. + +module NegSem_2002_TheAltStatement_061 { + + type port MyPort message { + inout charstring + } + + type component GeneralComp { + port MyPort p; + } + + template charstring m_test := "ping"; + + testcase TC_NegSem_2002_TheAltStatement_061() runs on GeneralComp { + p.send(m_test); + alt { + [p.checkstate("Started")] p.receive(charstring:?) { + setverdict(pass); + } + } + } + + control { + execute(TC_NegSem_2002_TheAltStatement_061()); + } +} \ No newline at end of file diff --git a/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_062.ttcn b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_062.ttcn new file mode 100644 index 00000000..004294c9 --- /dev/null +++ b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_062.ttcn @@ -0,0 +1,40 @@ +/***************************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:20.2, verify that the read operation cannot be used in alt branch events (in inline templates) + ** @verdict pass reject + *****************************************************************/ + +// The following requirement is tested: +// c) The evaluation of the event of an alt branch shall not have side effects. To avoid side effects that cause +// an inconsistency between the actual snapshot and the state of the component or introduce indeterminism +// in the evaluation of the following alt branches or the re-evaluation of the same alt branch, the restrictions +// imposed on the contents of functions called from special places (clause 16.1.4) shall apply to expressions +// occurring in the matching part of an alternative. + +module NegSem_2002_TheAltStatement_062 { + + type port MyPort message { + inout boolean + } + + type component GeneralComp { + port MyPort p; + } + + testcase TC_NegSem_2002_TheAltStatement_062() runs on GeneralComp system GeneralComp { + timer t_tmr := 1.0; + map(self:p, system: p); + t_tmr.start; + p.send(true); + alt { + [] p.receive(boolean:t_tmr.read > 0.0) { + setverdict(pass); + } + } + } + + control { + execute(TC_NegSem_2002_TheAltStatement_062()); + } +} \ No newline at end of file diff --git a/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_063.ttcn b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_063.ttcn new file mode 100644 index 00000000..34d441d5 --- /dev/null +++ b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_063.ttcn @@ -0,0 +1,38 @@ +/***************************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:20.2, verify that the checkstate operation cannot be used in alt branch events (in inline templates) + ** @verdict pass reject + *****************************************************************/ + +// The following requirement is tested: +// c) The evaluation of the event of an alt branch shall not have side effects. To avoid side effects that cause +// an inconsistency between the actual snapshot and the state of the component or introduce indeterminism +// in the evaluation of the following alt branches or the re-evaluation of the same alt branch, the restrictions +// imposed on the contents of functions called from special places (clause 16.1.4) shall apply to expressions +// occurring in the matching part of an alternative. + +module NegSem_2002_TheAltStatement_063 { + + type port MyPort message { + inout boolean + } + + type component GeneralComp { + port MyPort p; + } + + testcase TC_NegSem_2002_TheAltStatement_063() runs on GeneralComp system GeneralComp { + map(self:p, system: p); + p.send(true); + alt { + [] p.receive(boolean:p.checkstate("Started")) { + setverdict(pass); + } + } + } + + control { + execute(TC_NegSem_2002_TheAltStatement_063()); + } +} \ No newline at end of file diff --git a/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_064.ttcn b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_064.ttcn new file mode 100644 index 00000000..f1329dbb --- /dev/null +++ b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_064.ttcn @@ -0,0 +1,42 @@ +/***************************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:20.2, verify that the read operation cannot be used in parameters of alt branch events + ** @verdict pass reject + *****************************************************************/ + +// The following requirement is tested: +// d) The evaluation of an altstep invoked from an alt branch, if none of the alternatives in the altstep is chosen, shall +// not have side effects. To avoid side effects the restrictions imposed on the contents of functions called from special +// places (clause 16.1.4) shall apply to the actual parameters of the invoked altstep. + +module NegSem_2002_TheAltStatement_064 { + + type port MyPort message { + inout boolean + } + + type component GeneralComp { + port MyPort p; + } + + altstep a_receive(boolean p_bool) runs on GeneralComp { + [] p.receive(p_bool) { + setverdict(pass); + } + } + + testcase TC_NegSem_2002_TheAltStatement_064() runs on GeneralComp system GeneralComp { + timer t_tmr := 1.0; + map(self:p, system: p); + t_tmr.start; + p.send(true); + alt { + [] a_receive(t_tmr.read > 0.0); + } + } + + control { + execute(TC_NegSem_2002_TheAltStatement_064()); + } +} \ No newline at end of file diff --git a/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_065.ttcn b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_065.ttcn new file mode 100644 index 00000000..745d0d1b --- /dev/null +++ b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_065.ttcn @@ -0,0 +1,40 @@ +/***************************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:20.2, verify that the checkstate operation cannot be used in parameters of alt branch events + ** @verdict pass reject + *****************************************************************/ + +// The following requirement is tested: +// d) The evaluation of an altstep invoked from an alt branch, if none of the alternatives in the altstep is chosen, shall +// not have side effects. To avoid side effects the restrictions imposed on the contents of functions called from special +// places (clause 16.1.4) shall apply to the actual parameters of the invoked altstep. + +module NegSem_2002_TheAltStatement_065 { + + type port MyPort message { + inout boolean + } + + type component GeneralComp { + port MyPort p; + } + + altstep a_receive(boolean p_bool) runs on GeneralComp { + [] p.receive(p_bool) { + setverdict(pass); + } + } + + testcase TC_NegSem_2002_TheAltStatement_065() runs on GeneralComp system GeneralComp { + map(self:p, system: p); + p.send(true); + alt { + [] a_receive(p.checkstate("Started")); + } + } + + control { + execute(TC_NegSem_2002_TheAltStatement_065()); + } +} \ No newline at end of file diff --git a/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_066.ttcn b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_066.ttcn new file mode 100644 index 00000000..8b03e087 --- /dev/null +++ b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_066.ttcn @@ -0,0 +1,39 @@ +/***************************************************************** + ** @author STF 521 + ** @version 0.0.2 + ** @purpose 1:20.2, verify that the create operation cannot be used in alt branch events (in inline template) + ** @verdict pass reject + *****************************************************************/ + +// The following requirement is tested: +// c) The evaluation of the event of an alt branch shall not have side effects. To avoid side effects that cause +// an inconsistency between the actual snapshot and the state of the component or introduce indeterminism +// in the evaluation of the following alt branches or the re-evaluation of the same alt branch, the restrictions +// imposed on the contents of functions called from special places (clause 16.1.4) shall apply to expressions +// occurring in the matching part of an alternative. + +module NegSem_2002_TheAltStatement_066 { + + type port MyPort message { + inout boolean + } + + type component GeneralComp { + port MyPort p; + } + + testcase TC_NegSem_2002_TheAltStatement_066() runs on GeneralComp system GeneralComp { + template @fuzzy boolean mw_msg := GeneralComp.create != null; + map(self:p, system: p); + p.send(true); + alt { + [] p.receive(mw_msg) { + setverdict(pass); + } + } + } + + control { + execute(TC_NegSem_2002_TheAltStatement_066()); + } +} \ No newline at end of file diff --git a/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_067.ttcn b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_067.ttcn new file mode 100644 index 00000000..056e25ab --- /dev/null +++ b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_067.ttcn @@ -0,0 +1,39 @@ +/***************************************************************** + ** @author STF 521 + ** @version 0.0.2 + ** @purpose 1:20.2, verify that the component.running operation cannot be used in alt branch events (in templates) + ** @verdict pass reject + *****************************************************************/ + +// The following requirement is tested: +// c) The evaluation of the event of an alt branch shall not have side effects. To avoid side effects that cause +// an inconsistency between the actual snapshot and the state of the component or introduce indeterminism +// in the evaluation of the following alt branches or the re-evaluation of the same alt branch, the restrictions +// imposed on the contents of functions called from special places (clause 16.1.4) shall apply to expressions +// occurring in the matching part of an alternative. + +module NegSem_2002_TheAltStatement_067 { + + type port MyPort message { + inout boolean + } + + type component GeneralComp { + port MyPort p; + } + + testcase TC_NegSem_2002_TheAltStatement_067() runs on GeneralComp system GeneralComp { + template @fuzzy boolean mw_msg := mtc.running; + map(self:p, system: p); + p.send(true); + alt { + [] p.receive(mw_msg) { + setverdict(pass); + } + } + } + + control { + execute(TC_NegSem_2002_TheAltStatement_067()); + } +} \ No newline at end of file diff --git a/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_068.ttcn b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_068.ttcn new file mode 100644 index 00000000..c5c2a3e0 --- /dev/null +++ b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_068.ttcn @@ -0,0 +1,39 @@ +/***************************************************************** + ** @author STF 521 + ** @version 0.0.2 + ** @purpose 1:20.2, verify that the alive operation cannot be used in alt branch events (in templates) + ** @verdict pass reject + *****************************************************************/ + +// The following requirement is tested: +// c) The evaluation of the event of an alt branch shall not have side effects. To avoid side effects that cause +// an inconsistency between the actual snapshot and the state of the component or introduce indeterminism +// in the evaluation of the following alt branches or the re-evaluation of the same alt branch, the restrictions +// imposed on the contents of functions called from special places (clause 16.1.4) shall apply to expressions +// occurring in the matching part of an alternative. + +module NegSem_2002_TheAltStatement_068 { + + type port MyPort message { + inout boolean + } + + type component GeneralComp { + port MyPort p; + } + + testcase TC_NegSem_2002_TheAltStatement_068() runs on GeneralComp system GeneralComp { + template @fuzzy boolean mw_msg := mtc.alive; + map(self:p, system: p); + p.send(true); + alt { + [] p.receive(mw_msg) { + setverdict(pass); + } + } + } + + control { + execute(TC_NegSem_2002_TheAltStatement_068()); + } +} \ No newline at end of file diff --git a/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_069.ttcn b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_069.ttcn new file mode 100644 index 00000000..bf244206 --- /dev/null +++ b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_069.ttcn @@ -0,0 +1,39 @@ +/***************************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:20.2, verify that the checkstate operation cannot be used in alt branch events (in templates) + ** @verdict pass reject + *****************************************************************/ + +// The following requirement is tested: +// c) The evaluation of the event of an alt branch shall not have side effects. To avoid side effects that cause +// an inconsistency between the actual snapshot and the state of the component or introduce indeterminism +// in the evaluation of the following alt branches or the re-evaluation of the same alt branch, the restrictions +// imposed on the contents of functions called from special places (clause 16.1.4) shall apply to expressions +// occurring in the matching part of an alternative. + +module NegSem_2002_TheAltStatement_069 { + + type port MyPort message { + inout boolean + } + + type component GeneralComp { + port MyPort p; + } + + testcase TC_NegSem_2002_TheAltStatement_069() runs on GeneralComp system GeneralComp { + template @fuzzy boolean mw_msg := p.checkstate("Started"); + map(self:p, system: p); + p.send(true); + alt { + [] p.receive(mw_msg) { + setverdict(pass); + } + } + } + + control { + execute(TC_NegSem_2002_TheAltStatement_069()); + } +} \ No newline at end of file diff --git a/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_070.ttcn b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_070.ttcn new file mode 100644 index 00000000..e3973784 --- /dev/null +++ b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_070.ttcn @@ -0,0 +1,41 @@ +/***************************************************************** + ** @author STF 521 + ** @version 0.0.2 + ** @purpose 1:20.2, verify that the timer.running operation cannot be used in alt branch events (in templates) + ** @verdict pass reject + *****************************************************************/ + +// The following requirement is tested: +// c) The evaluation of the event of an alt branch shall not have side effects. To avoid side effects that cause +// an inconsistency between the actual snapshot and the state of the component or introduce indeterminism +// in the evaluation of the following alt branches or the re-evaluation of the same alt branch, the restrictions +// imposed on the contents of functions called from special places (clause 16.1.4) shall apply to expressions +// occurring in the matching part of an alternative. + +module NegSem_2002_TheAltStatement_070 { + + type port MyPort message { + inout boolean + } + + type component GeneralComp { + port MyPort p; + } + + testcase TC_NegSem_2002_TheAltStatement_070() runs on GeneralComp system GeneralComp { + timer t_tmr := 1.0; + template @fuzzy boolean mw_msg := t_tmr.running; + map(self:p, system: p); + t_tmr.start; + p.send(true); + alt { + [] p.receive(mw_msg) { + setverdict(pass); + } + } + } + + control { + execute(TC_NegSem_2002_TheAltStatement_070()); + } +} \ No newline at end of file diff --git a/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_071.ttcn b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_071.ttcn new file mode 100644 index 00000000..5360dca5 --- /dev/null +++ b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_071.ttcn @@ -0,0 +1,41 @@ +/***************************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:20.2, verify that the read operation cannot be used in alt branch events (in templates) + ** @verdict pass reject + *****************************************************************/ + +// The following requirement is tested: +// c) The evaluation of the event of an alt branch shall not have side effects. To avoid side effects that cause +// an inconsistency between the actual snapshot and the state of the component or introduce indeterminism +// in the evaluation of the following alt branches or the re-evaluation of the same alt branch, the restrictions +// imposed on the contents of functions called from special places (clause 16.1.4) shall apply to expressions +// occurring in the matching part of an alternative. + +module NegSem_2002_TheAltStatement_071 { + + type port MyPort message { + inout boolean + } + + type component GeneralComp { + port MyPort p; + } + + testcase TC_NegSem_2002_TheAltStatement_071() runs on GeneralComp system GeneralComp { + timer t_tmr := 1.0; + template @fuzzy boolean mw_msg := t_tmr.read > 0.0; + map(self:p, system: p); + t_tmr.start; + p.send(true); + alt { + [] p.receive(mw_msg) { + setverdict(pass); + } + } + } + + control { + execute(TC_NegSem_2002_TheAltStatement_071()); + } +} \ No newline at end of file diff --git a/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_072.ttcn b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_072.ttcn new file mode 100644 index 00000000..ae4d1cd5 --- /dev/null +++ b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_072.ttcn @@ -0,0 +1,44 @@ +/***************************************************************** + ** @author STF 521 + ** @version 0.0.2 + ** @purpose 1:20.2, verify that the activate operation cannot be used in alt branch events (in templates) + ** @verdict pass reject + *****************************************************************/ + +// The following requirement is tested: +// c) The evaluation of the event of an alt branch shall not have side effects. To avoid side effects that cause +// an inconsistency between the actual snapshot and the state of the component or introduce indeterminism +// in the evaluation of the following alt branches or the re-evaluation of the same alt branch, the restrictions +// imposed on the contents of functions called from special places (clause 16.1.4) shall apply to expressions +// occurring in the matching part of an alternative. + +module NegSem_2002_TheAltStatement_072 { + + type port MyPort message { + inout boolean + } + + type component GeneralComp { + port MyPort p; + } + + altstep a_timeout() { + [] any timer.timeout { + } + } + + testcase TC_NegSem_2002_TheAltStatement_072() runs on GeneralComp system GeneralComp { + template @fuzzy boolean mw_msg := activate(a_timeout()) != null; + map(self:p, system: p); + p.send(true); + alt { + [] p.receive(mw_msg) { + setverdict(pass); + } + } + } + + control { + execute(TC_NegSem_2002_TheAltStatement_072()); + } +} \ No newline at end of file diff --git a/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_073.ttcn b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_073.ttcn new file mode 100644 index 00000000..9e1c8b70 --- /dev/null +++ b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_073.ttcn @@ -0,0 +1,40 @@ +/***************************************************************** + ** @author STF 521 + ** @version 0.0.2 + ** @purpose 1:20.2, verify that the create operation cannot be used in alt branch events (in inline template) + ** @verdict pass reject + *****************************************************************/ + +// The following requirement is tested: +// c) The evaluation of the event of an alt branch shall not have side effects. To avoid side effects that cause +// an inconsistency between the actual snapshot and the state of the component or introduce indeterminism +// in the evaluation of the following alt branches or the re-evaluation of the same alt branch, the restrictions +// imposed on the contents of functions called from special places (clause 16.1.4) shall apply to expressions +// occurring in the matching part of an alternative. + +module NegSem_2002_TheAltStatement_073 { + + type port MyPort message { + inout boolean + } + + type component GeneralComp { + port MyPort p; + } + + template boolean mw_msg (boolean p_par) := (false, p_par); + + testcase TC_NegSem_2002_TheAltStatement_073() runs on GeneralComp system GeneralComp { + map(self:p, system: p); + p.send(true); + alt { + [] p.receive(mw_msg(GeneralComp.create != null)) { + setverdict(pass); + } + } + } + + control { + execute(TC_NegSem_2002_TheAltStatement_073()); + } +} \ No newline at end of file diff --git a/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_074.ttcn b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_074.ttcn new file mode 100644 index 00000000..35b9050f --- /dev/null +++ b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_074.ttcn @@ -0,0 +1,40 @@ +/***************************************************************** + ** @author STF 521 + ** @version 0.0.2 + ** @purpose 1:20.2, verify that the component.running operation cannot be used in alt branch events (in template parameters) + ** @verdict pass reject + *****************************************************************/ + +// The following requirement is tested: +// c) The evaluation of the event of an alt branch shall not have side effects. To avoid side effects that cause +// an inconsistency between the actual snapshot and the state of the component or introduce indeterminism +// in the evaluation of the following alt branches or the re-evaluation of the same alt branch, the restrictions +// imposed on the contents of functions called from special places (clause 16.1.4) shall apply to expressions +// occurring in the matching part of an alternative. + +module NegSem_2002_TheAltStatement_074 { + + type port MyPort message { + inout boolean + } + + type component GeneralComp { + port MyPort p; + } + + template boolean mw_msg (boolean p_par) := (false, p_par); + + testcase TC_NegSem_2002_TheAltStatement_074() runs on GeneralComp system GeneralComp { + map(self:p, system: p); + p.send(true); + alt { + [] p.receive(mw_msg(mtc.running)) { + setverdict(pass); + } + } + } + + control { + execute(TC_NegSem_2002_TheAltStatement_074()); + } +} \ No newline at end of file diff --git a/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_075.ttcn b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_075.ttcn new file mode 100644 index 00000000..c024cda9 --- /dev/null +++ b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_075.ttcn @@ -0,0 +1,40 @@ +/***************************************************************** + ** @author STF 521 + ** @version 0.0.2 + ** @purpose 1:20.2, verify that the alive operation cannot be used in alt branch events (in template parameters) + ** @verdict pass reject + *****************************************************************/ + +// The following requirement is tested: +// c) The evaluation of the event of an alt branch shall not have side effects. To avoid side effects that cause +// an inconsistency between the actual snapshot and the state of the component or introduce indeterminism +// in the evaluation of the following alt branches or the re-evaluation of the same alt branch, the restrictions +// imposed on the contents of functions called from special places (clause 16.1.4) shall apply to expressions +// occurring in the matching part of an alternative. + +module NegSem_2002_TheAltStatement_075 { + + type port MyPort message { + inout boolean + } + + type component GeneralComp { + port MyPort p; + } + + template boolean mw_msg (boolean p_par) := (false, p_par); + + testcase TC_NegSem_2002_TheAltStatement_075() runs on GeneralComp system GeneralComp { + map(self:p, system: p); + p.send(true); + alt { + [] p.receive(mw_msg(mtc.alive)) { + setverdict(pass); + } + } + } + + control { + execute(TC_NegSem_2002_TheAltStatement_075()); + } +} \ No newline at end of file diff --git a/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_076.ttcn b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_076.ttcn new file mode 100644 index 00000000..87bffcff --- /dev/null +++ b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_076.ttcn @@ -0,0 +1,40 @@ +/***************************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:20.2, verify that the checkstate operation cannot be used in alt branch events (in template parameters) + ** @verdict pass reject + *****************************************************************/ + +// The following requirement is tested: +// c) The evaluation of the event of an alt branch shall not have side effects. To avoid side effects that cause +// an inconsistency between the actual snapshot and the state of the component or introduce indeterminism +// in the evaluation of the following alt branches or the re-evaluation of the same alt branch, the restrictions +// imposed on the contents of functions called from special places (clause 16.1.4) shall apply to expressions +// occurring in the matching part of an alternative. + +module NegSem_2002_TheAltStatement_076 { + + type port MyPort message { + inout boolean + } + + type component GeneralComp { + port MyPort p; + } + + template boolean mw_msg (boolean p_par) := (false, p_par); + + testcase TC_NegSem_2002_TheAltStatement_076() runs on GeneralComp system GeneralComp { + map(self:p, system: p); + p.send(true); + alt { + [] p.receive(mw_msg(p.checkstate("Started"))) { + setverdict(pass); + } + } + } + + control { + execute(TC_NegSem_2002_TheAltStatement_076()); + } +} \ No newline at end of file diff --git a/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_077.ttcn b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_077.ttcn new file mode 100644 index 00000000..a3b11459 --- /dev/null +++ b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_077.ttcn @@ -0,0 +1,42 @@ +/***************************************************************** + ** @author STF 521 + ** @version 0.0.2 + ** @purpose 1:20.2, verify that the timer.running operation cannot be used in alt branch events (in template parameters) + ** @verdict pass reject + *****************************************************************/ + +// The following requirement is tested: +// c) The evaluation of the event of an alt branch shall not have side effects. To avoid side effects that cause +// an inconsistency between the actual snapshot and the state of the component or introduce indeterminism +// in the evaluation of the following alt branches or the re-evaluation of the same alt branch, the restrictions +// imposed on the contents of functions called from special places (clause 16.1.4) shall apply to expressions +// occurring in the matching part of an alternative. + +module NegSem_2002_TheAltStatement_077 { + + type port MyPort message { + inout boolean + } + + type component GeneralComp { + port MyPort p; + } + + template boolean mw_msg (boolean p_par) := (false, p_par); + + testcase TC_NegSem_2002_TheAltStatement_077() runs on GeneralComp system GeneralComp { + timer t_tmr := 1.0; + map(self:p, system: p); + t_tmr.start; + p.send(true); + alt { + [] p.receive(mw_msg(t_tmr.running)) { + setverdict(pass); + } + } + } + + control { + execute(TC_NegSem_2002_TheAltStatement_077()); + } +} \ No newline at end of file diff --git a/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_078.ttcn b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_078.ttcn new file mode 100644 index 00000000..98cc7882 --- /dev/null +++ b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_078.ttcn @@ -0,0 +1,42 @@ +/***************************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:20.2, verify that the read operation cannot be used in alt branch events (in template parameters) + ** @verdict pass reject + *****************************************************************/ + +// The following requirement is tested: +// c) The evaluation of the event of an alt branch shall not have side effects. To avoid side effects that cause +// an inconsistency between the actual snapshot and the state of the component or introduce indeterminism +// in the evaluation of the following alt branches or the re-evaluation of the same alt branch, the restrictions +// imposed on the contents of functions called from special places (clause 16.1.4) shall apply to expressions +// occurring in the matching part of an alternative. + +module NegSem_2002_TheAltStatement_078 { + + type port MyPort message { + inout boolean + } + + type component GeneralComp { + port MyPort p; + } + + template boolean mw_msg (boolean p_par) := (false, p_par); + + testcase TC_NegSem_2002_TheAltStatement_078() runs on GeneralComp system GeneralComp { + timer t_tmr := 1.0; + map(self:p, system: p); + t_tmr.start; + p.send(true); + alt { + [] p.receive(mw_msg(t_tmr.read > 0.0)) { + setverdict(pass); + } + } + } + + control { + execute(TC_NegSem_2002_TheAltStatement_078()); + } +} \ No newline at end of file diff --git a/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_079.ttcn b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_079.ttcn new file mode 100644 index 00000000..86e85c4c --- /dev/null +++ b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_079.ttcn @@ -0,0 +1,45 @@ +/***************************************************************** + ** @author STF 521 + ** @version 0.0.2 + ** @purpose 1:20.2, verify that the activate operation cannot be used in alt branch events (in template parameters) + ** @verdict pass reject + *****************************************************************/ + +// The following requirement is tested: +// c) The evaluation of the event of an alt branch shall not have side effects. To avoid side effects that cause +// an inconsistency between the actual snapshot and the state of the component or introduce indeterminism +// in the evaluation of the following alt branches or the re-evaluation of the same alt branch, the restrictions +// imposed on the contents of functions called from special places (clause 16.1.4) shall apply to expressions +// occurring in the matching part of an alternative. + +module NegSem_2002_TheAltStatement_079 { + + type port MyPort message { + inout boolean + } + + type component GeneralComp { + port MyPort p; + } + + altstep a_timeout() { + [] any timer.timeout { + } + } + + template boolean mw_msg (boolean p_par) := (false, p_par); + + testcase TC_NegSem_2002_TheAltStatement_079() runs on GeneralComp system GeneralComp { + map(self:p, system: p); + p.send(true); + alt { + [] p.receive(mw_msg(activate(a_timeout()) != null)) { + setverdict(pass); + } + } + } + + control { + execute(TC_NegSem_2002_TheAltStatement_079()); + } +} \ No newline at end of file diff --git a/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_080.ttcn b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_080.ttcn new file mode 100644 index 00000000..2fb29a61 --- /dev/null +++ b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_080.ttcn @@ -0,0 +1,43 @@ +/***************************************************************** + ** @author STF 521 + ** @version 0.0.2 + ** @purpose 1:20.2, verify that the create operation cannot be used in alt branch events (in inline template) + ** @verdict pass reject + *****************************************************************/ + +// The following requirement is tested: +// d) The evaluation of an altstep invoked from an alt branch, if none of the alternatives in the altstep is chosen, shall +// not have side effects. To avoid side effects the restrictions imposed on the contents of functions called from special +// places (clause 16.1.4) shall apply to the actual parameters of the invoked altstep. + +module NegSem_2002_TheAltStatement_080 { + + type port MyPort message { + inout boolean + } + + type component GeneralComp { + port MyPort p; + } + + altstep a_rcv() runs on GeneralComp { + var boolean v_bool := GeneralComp.create != null; + [v_bool] p.receive(boolean:?){ + } + } + + testcase TC_NegSem_2002_TheAltStatement_080() runs on GeneralComp system GeneralComp { + map(self:p, system: p); + p.send(true); + alt { + [] a_rcv(); + [] any timer.timeout { + } + } + setverdict(pass); + } + + control { + execute(TC_NegSem_2002_TheAltStatement_080()); + } +} \ No newline at end of file diff --git a/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_081.ttcn b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_081.ttcn new file mode 100644 index 00000000..d967cd7b --- /dev/null +++ b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_081.ttcn @@ -0,0 +1,43 @@ +/***************************************************************** + ** @author STF 521 + ** @version 0.0.2 + ** @purpose 1:20.2, verify that the component.running operation cannot be used in altstep declarations + ** @verdict pass reject + *****************************************************************/ + +// The following requirement is tested: +// d) The evaluation of an altstep invoked from an alt branch, if none of the alternatives in the altstep is chosen, shall +// not have side effects. To avoid side effects the restrictions imposed on the contents of functions called from special +// places (clause 16.1.4) shall apply to the actual parameters of the invoked altstep. + +module NegSem_2002_TheAltStatement_081 { + + type port MyPort message { + inout boolean + } + + type component GeneralComp { + port MyPort p; + } + + altstep a_rcv() runs on GeneralComp { + var boolean v_bool := mtc.running; + [v_bool] p.receive(boolean:?){ + } + } + + testcase TC_NegSem_2002_TheAltStatement_081() runs on GeneralComp system GeneralComp { + map(self:p, system: p); + p.send(true); + alt { + [] a_rcv(); + [] any timer.timeout { + } + } + setverdict(pass); + } + + control { + execute(TC_NegSem_2002_TheAltStatement_081()); + } +} \ No newline at end of file diff --git a/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_082.ttcn b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_082.ttcn new file mode 100644 index 00000000..bd3a3b80 --- /dev/null +++ b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_082.ttcn @@ -0,0 +1,43 @@ +/***************************************************************** + ** @author STF 521 + ** @version 0.0.2 + ** @purpose 1:20.2, verify that the alive operation cannot be used in altstep declarations + ** @verdict pass reject + *****************************************************************/ + +// The following requirement is tested: +// d) The evaluation of an altstep invoked from an alt branch, if none of the alternatives in the altstep is chosen, shall +// not have side effects. To avoid side effects the restrictions imposed on the contents of functions called from special +// places (clause 16.1.4) shall apply to the actual parameters of the invoked altstep. + +module NegSem_2002_TheAltStatement_082 { + + type port MyPort message { + inout boolean + } + + type component GeneralComp { + port MyPort p; + } + + altstep a_rcv() runs on GeneralComp { + var boolean v_bool := mtc.alive; + [v_bool] p.receive(boolean:?){ + } + } + + testcase TC_NegSem_2002_TheAltStatement_082() runs on GeneralComp system GeneralComp { + map(self:p, system: p); + p.send(true); + alt { + [] a_rcv(); + [] any timer.timeout { + } + } + setverdict(pass); + } + + control { + execute(TC_NegSem_2002_TheAltStatement_082()); + } +} \ No newline at end of file diff --git a/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_083.ttcn b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_083.ttcn new file mode 100644 index 00000000..63cd86ea --- /dev/null +++ b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_083.ttcn @@ -0,0 +1,43 @@ +/***************************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:20.2, verify that the checkstate operation cannot be used in altstep declarations + ** @verdict pass reject + *****************************************************************/ + +// The following requirement is tested: +// d) The evaluation of an altstep invoked from an alt branch, if none of the alternatives in the altstep is chosen, shall +// not have side effects. To avoid side effects the restrictions imposed on the contents of functions called from special +// places (clause 16.1.4) shall apply to the actual parameters of the invoked altstep. + +module NegSem_2002_TheAltStatement_083 { + + type port MyPort message { + inout boolean + } + + type component GeneralComp { + port MyPort p; + } + + altstep a_rcv() runs on GeneralComp { + var boolean v_bool := p.checkstate("Started"); + [v_bool] p.receive(boolean:?){ + } + } + + testcase TC_NegSem_2002_TheAltStatement_083() runs on GeneralComp system GeneralComp { + map(self:p, system: p); + p.send(true); + alt { + [] a_rcv(); + [] any timer.timeout { + } + } + setverdict(pass); + } + + control { + execute(TC_NegSem_2002_TheAltStatement_083()); + } +} \ No newline at end of file diff --git a/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_084.ttcn b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_084.ttcn new file mode 100644 index 00000000..ba69a961 --- /dev/null +++ b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_084.ttcn @@ -0,0 +1,45 @@ +/***************************************************************** + ** @author STF 521 + ** @version 0.0.2 + ** @purpose 1:20.2, verify that the timer.running operation cannot be used in altstep declarations + ** @verdict pass reject + *****************************************************************/ + +// The following requirement is tested: +// d) The evaluation of an altstep invoked from an alt branch, if none of the alternatives in the altstep is chosen, shall +// not have side effects. To avoid side effects the restrictions imposed on the contents of functions called from special +// places (clause 16.1.4) shall apply to the actual parameters of the invoked altstep. + +module NegSem_2002_TheAltStatement_084 { + + type port MyPort message { + inout boolean + } + + type component GeneralComp { + port MyPort p; + timer t_tmr := 1.0; + } + + altstep a_rcv() runs on GeneralComp { + var boolean v_bool := t_tmr.running; + [v_bool] p.receive(boolean:?){ + } + } + + testcase TC_NegSem_2002_TheAltStatement_084() runs on GeneralComp system GeneralComp { + map(self:p, system: p); + t_tmr.start; + p.send(true); + alt { + [] a_rcv(); + [] any timer.timeout { + } + } + setverdict(pass); + } + + control { + execute(TC_NegSem_2002_TheAltStatement_084()); + } +} \ No newline at end of file diff --git a/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_085.ttcn b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_085.ttcn new file mode 100644 index 00000000..f6661dba --- /dev/null +++ b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_085.ttcn @@ -0,0 +1,45 @@ +/***************************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:20.2, verify that the read operation cannot be used in altstep declarations + ** @verdict pass reject + *****************************************************************/ + +// The following requirement is tested: +// d) The evaluation of an altstep invoked from an alt branch, if none of the alternatives in the altstep is chosen, shall +// not have side effects. To avoid side effects the restrictions imposed on the contents of functions called from special +// places (clause 16.1.4) shall apply to the actual parameters of the invoked altstep. + +module NegSem_2002_TheAltStatement_085 { + + type port MyPort message { + inout boolean + } + + type component GeneralComp { + port MyPort p; + timer t_tmr := 1.0; + } + + altstep a_rcv() runs on GeneralComp { + var boolean v_bool := t_tmr.read > 0.0; + [v_bool] p.receive(boolean:?){ + } + } + + testcase TC_NegSem_2002_TheAltStatement_085() runs on GeneralComp system GeneralComp { + map(self:p, system: p); + t_tmr.start; + p.send(true); + alt { + [] a_rcv(); + [] any timer.timeout { + } + } + setverdict(pass); + } + + control { + execute(TC_NegSem_2002_TheAltStatement_085()); + } +} \ No newline at end of file diff --git a/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_086.ttcn b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_086.ttcn new file mode 100644 index 00000000..d89bda3f --- /dev/null +++ b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_086.ttcn @@ -0,0 +1,48 @@ +/***************************************************************** + ** @author STF 521 + ** @version 0.0.2 + ** @purpose 1:20.2, verify that the activate operation cannot be used in altstep declarations + ** @verdict pass reject + *****************************************************************/ + +// The following requirement is tested: +// d) The evaluation of an altstep invoked from an alt branch, if none of the alternatives in the altstep is chosen, shall +// not have side effects. To avoid side effects the restrictions imposed on the contents of functions called from special +// places (clause 16.1.4) shall apply to the actual parameters of the invoked altstep. + +module NegSem_2002_TheAltStatement_086 { + + type port MyPort message { + inout boolean + } + + type component GeneralComp { + port MyPort p; + } + + altstep a_timeout() { + [] any timer.timeout{ + } + } + + altstep a_rcv() runs on GeneralComp { + var boolean v_bool := activate(a_timeout()) != null; + [v_bool] p.receive(boolean:?){ + } + } + + testcase TC_NegSem_2002_TheAltStatement_086() runs on GeneralComp system GeneralComp { + map(self:p, system: p); + p.send(true); + alt { + [] a_rcv(); + [] any timer.timeout { + } + } + setverdict(pass); + } + + control { + execute(TC_NegSem_2002_TheAltStatement_086()); + } +} \ No newline at end of file diff --git a/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_087.ttcn b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_087.ttcn new file mode 100644 index 00000000..941fcfe6 --- /dev/null +++ b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_087.ttcn @@ -0,0 +1,52 @@ +/*************************************************** + ** @author STF 548 + ** @version 0.0.1 + ** @purpose 1:20.2, verify that a function used in a parameter of an altstep invoked from an alt branch cannot contain fuzzy parameters + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// d) The evaluation of an altstep invoked from an alt branch, if none of the alternatives in the altstep is chosen, shall +// not have side effects. To avoid side effects the restrictions imposed on the contents of functions called from special +// places (clause 16.1.4) shall apply to the actual parameters of the invoked altstep. + +module NegSem_2002_TheAltStatement_087 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + function f_eval() return integer { + return 10; + } + + function f_test(@fuzzy integer p_par) return boolean { + if (p_par > 0) { + return true; + } else { + return false; + } + } + + altstep a_rcv(boolean p_par) runs on GeneralComp { + [p_par] p.receive(integer:?) {} + } + + testcase TC_NegSem_2002_TheAltStatement_087() runs on GeneralComp system GeneralComp { + var @fuzzy integer v_int := f_eval(); + connect(mtc:p, mtc:p); + p.send(1); + alt { + [] a_rcv(f_test(v_int)) {} + [] any timer.timeout {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_2002_TheAltStatement_087()); + } +} diff --git a/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_088.ttcn b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_088.ttcn new file mode 100644 index 00000000..66c505d4 --- /dev/null +++ b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_088.ttcn @@ -0,0 +1,50 @@ +/*************************************************** + ** @author STF 548 + ** @version 0.0.1 + ** @purpose 1:20.2, verify that a external function used in a parameter of an altstep invoked from an alt branch cannot contain fuzzy parameters + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// d) The evaluation of an altstep invoked from an alt branch, if none of the alternatives in the altstep is chosen, shall +// not have side effects. To avoid side effects the restrictions imposed on the contents of functions called from special +// places (clause 16.1.4) shall apply to the actual parameters of the invoked altstep. + +module NegSem_2002_TheAltStatement_088 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + altstep a_anyTimer() runs on GeneralComp { + [] any timer.timeout {} + } + + external function @deterministic f_test(@fuzzy integer p_par) return boolean; + + altstep a_rcv(@fuzzy boolean p_par) runs on GeneralComp { + [p_par] p.receive(integer:?) {} + } + + function f_eval() return integer { + return 10; + } + + testcase TC_NegSem_2002_TheAltStatement_088() runs on GeneralComp system GeneralComp { + var @fuzzy integer v_int := f_eval(); + connect(mtc:p, mtc:p); + p.send(1); + alt { + [] a_rcv(f_test(v_int)); + [] any timer.timeout {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_2002_TheAltStatement_088()); + } +} diff --git a/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_089.ttcn b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_089.ttcn new file mode 100644 index 00000000..a333ee11 --- /dev/null +++ b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_089.ttcn @@ -0,0 +1,49 @@ +/*************************************************** + ** @author STF 548 + ** @version 0.0.1 + ** @purpose 1:20.2, verify that a function used in a parameter of an altstep invoked from an alt branch cannot contain fuzzy variables + ** @verdict pass reject +***************************************************/ + +// The following requirement is tested: +// d) The evaluation of an altstep invoked from an alt branch, if none of the alternatives in the altstep is chosen, shall +// not have side effects. To avoid side effects the restrictions imposed on the contents of functions called from special +// places (clause 16.1.4) shall apply to the actual parameters of the invoked altstep. + +module NegSem_2002_TheAltStatement_089 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + function f_test() return integer { + var @fuzzy integer v_int := f_eval(); + return v_int; + } + + + altstep a_rcv(integer p_par) runs on GeneralComp { + [] p.receive(p_par) {} + } + + function f_eval() return integer { + return 1; + } + + testcase TC_NegSem_2002_TheAltStatement_089() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(1); + alt { + [] a_rcv(f_test()); + [] any timer.timeout {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_2002_TheAltStatement_089()); + } +} diff --git a/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_090.ttcn b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_090.ttcn new file mode 100644 index 00000000..d79f5cdd --- /dev/null +++ b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_090.ttcn @@ -0,0 +1,44 @@ +/*************************************************** + ** @author STF 548 + ** @version 0.0.1 + ** @purpose 1:20.2, verify that a function used in a parameter of an altstep invoked from an alt branch cannot contain the setencode operation + ** @verdict pass reject +***************************************************/ + +// The following requirement is tested: +// d) The evaluation of an altstep invoked from an alt branch, if none of the alternatives in the altstep is chosen, shall +// not have side effects. To avoid side effects the restrictions imposed on the contents of functions called from special +// places (clause 16.1.4) shall apply to the actual parameters of the invoked altstep. + +module NegSem_2002_TheAltStatement_090 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return integer { + p.setencode(integer, "Binary"); + return 1; + } + + altstep a_rcv(integer p_par) runs on GeneralComp { + [] p.receive(p_par) {} + } + + testcase TC_NegSem_2002_TheAltStatement_090() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(1); + alt { + [] a_rcv(f_test()); + [] any timer.timeout {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_2002_TheAltStatement_090()); + } +} diff --git a/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/Sem_2002_TheAltStatement_001.ttcn b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/Sem_2002_TheAltStatement_001.ttcn new file mode 100644 index 00000000..15407b85 --- /dev/null +++ b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/Sem_2002_TheAltStatement_001.ttcn @@ -0,0 +1,33 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:20.2, Ensure that the alt-statement works as expected (loopback case). + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_2002_TheAltStatement_001 { + +type port MyPort message { + inout charstring +} + +type component GeneralComp { + port MyPort p; +} + +template charstring m_test := "ping"; + +testcase TC_Sem_2002_TheAltStatement_001() runs on GeneralComp { + p.send(m_test); + alt { + [] p.receive(m_test) { + setverdict(pass); + } + } +} + +control { + execute(TC_Sem_2002_TheAltStatement_001()); +} + +} \ No newline at end of file diff --git a/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/Sem_2002_TheAltStatement_002.ttcn b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/Sem_2002_TheAltStatement_002.ttcn new file mode 100644 index 00000000..59110e58 --- /dev/null +++ b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/Sem_2002_TheAltStatement_002.ttcn @@ -0,0 +1,34 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:20.2, Ensure that the alt-statement with a guard works as expected (loopback case). + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_2002_TheAltStatement_002 { + +type port MyPort message { + inout charstring +} + +type component GeneralComp { + port MyPort p; +} + +template charstring m_test := "ping"; + +testcase TC_Sem_2002_TheAltStatement_002() runs on GeneralComp { + var integer counter := 1; + p.send(m_test); + alt { + [counter == 1] p.receive(m_test) { + setverdict(pass); + } + } +} + +control { + execute(TC_Sem_2002_TheAltStatement_002()); +} + +} \ No newline at end of file diff --git a/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/Sem_2002_TheAltStatement_003.ttcn b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/Sem_2002_TheAltStatement_003.ttcn new file mode 100644 index 00000000..3fff372b --- /dev/null +++ b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/Sem_2002_TheAltStatement_003.ttcn @@ -0,0 +1,39 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:20.2, Ensure that the alt-statement processes the alternatives in order (loopback case). + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_2002_TheAltStatement_003 { + +type port MyPort message { + inout charstring +} + +type component GeneralComp { + port MyPort p; +} + +template charstring m_test := "ping"; + +testcase TC_Sem_2002_TheAltStatement_003() runs on GeneralComp { + p.send(m_test); + alt { + [] p.receive(m_test) { + setverdict(pass); + } + [] p.receive(m_test) { + setverdict(fail); + } + [] p.receive(m_test) { + setverdict(fail); + } + } +} + +control { + execute(TC_Sem_2002_TheAltStatement_003()); +} + +} \ No newline at end of file diff --git a/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/Sem_2002_TheAltStatement_004.ttcn b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/Sem_2002_TheAltStatement_004.ttcn new file mode 100644 index 00000000..eb455217 --- /dev/null +++ b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/Sem_2002_TheAltStatement_004.ttcn @@ -0,0 +1,52 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:20.2, Ensure that activated defaults are processed in the reverse order (loopback case). + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_2002_TheAltStatement_004 { + +type port MyPort message { + inout charstring +} + +type component GeneralComp { + port MyPort p; +} + +template charstring m_testOne := "ping1"; +template charstring m_testTwo := "ping2"; +template charstring m_testThree := "ping3"; // never sent! + +altstep a_first() runs on GeneralComp { + [] p.receive(m_testTwo) { + setverdict(fail); + } +} + +altstep a_second() runs on GeneralComp { + [] p.receive(m_testOne) { + setverdict(pass); + } +} + +testcase TC_Sem_2002_TheAltStatement_004() runs on GeneralComp { + var default v_defaultOne := activate(a_first()); + var default v_defaultTwo := activate(a_second()); + + p.send(m_testOne); + p.send(m_testTwo); + + alt { + [] p.receive(m_testThree) { + setverdict(fail); + } + } +} + +control { + execute(TC_Sem_2002_TheAltStatement_004(), 2.0); // if the altstep isn't handled after 2s, we raise an error +} + +} \ No newline at end of file diff --git a/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/Sem_2002_TheAltStatement_005.ttcn b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/Sem_2002_TheAltStatement_005.ttcn new file mode 100644 index 00000000..5b1cf965 --- /dev/null +++ b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/Sem_2002_TheAltStatement_005.ttcn @@ -0,0 +1,44 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:20.2, Ensure that the else branch is executed when nothing else matched (loopback case). + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_2002_TheAltStatement_005 { + +type port MyPort message { + inout charstring +} + +type component GeneralComp { + port MyPort p; +} + +template charstring m_testOne := "ping1"; +template charstring m_testTwo := "ping2"; + +testcase TC_Sem_2002_TheAltStatement_005() runs on GeneralComp { + p.send(m_testOne); + p.send(m_testOne); + + alt { + [] p.receive(m_testTwo) { + setverdict(fail); + } + [false] p.receive(m_testTwo) { + setverdict(fail); + } + [else] { + setverdict(pass); + } + } + + setverdict(pass); +} + +control { + execute(TC_Sem_2002_TheAltStatement_005(), 2.0); // if the altstep isn't handled after 2s, we raise an error +} + +} \ No newline at end of file diff --git a/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/Sem_2002_TheAltStatement_006.ttcn b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/Sem_2002_TheAltStatement_006.ttcn new file mode 100644 index 00000000..89dbad32 --- /dev/null +++ b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/Sem_2002_TheAltStatement_006.ttcn @@ -0,0 +1,46 @@ +/***************************************************************** + ** @author STF 409 (updated by STF 521) + ** @version 0.0.2 + ** @purpose 1:20.2, Ensure that an altstep invocation works as expected (loopback case). + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_2002_TheAltStatement_006 { + +type port MyPort message { + inout charstring +} + +type component GeneralComp { + port MyPort p; +} + +template charstring m_testOne := "ping1"; +template charstring m_testTwo := "ping2"; + +altstep a_test() runs on GeneralComp { + [] p.receive(m_testOne) { + setverdict(pass); + } +} + +testcase TC_Sem_2002_TheAltStatement_006() runs on GeneralComp { + timer t_tmr := 0.5; + t_tmr.start; + p.send(m_testOne); + t_tmr.timeout; // wait for some time for the answer + alt { + [] a_test(); + [else] { + setverdict(fail); + } + } + + setverdict(pass); +} + +control { + execute(TC_Sem_2002_TheAltStatement_006()); +} + +} \ No newline at end of file diff --git a/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/Sem_2002_TheAltStatement_007.ttcn b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/Sem_2002_TheAltStatement_007.ttcn new file mode 100644 index 00000000..5fa4a7fe --- /dev/null +++ b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/Sem_2002_TheAltStatement_007.ttcn @@ -0,0 +1,52 @@ +/***************************************************************** + ** @author STF 409 (updated by STF 521) + ** @version 0.0.2 + ** @purpose 1:20.2, Ensure that an altstep invocation works as expected and that the optional statement block is executed after the altstep staatement block (loopback case). + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_2002_TheAltStatement_007 { + +type port MyPort message { + inout charstring +} + +type component GeneralComp { + port MyPort p; + var boolean v_visitedAltstep := false; +} + +template charstring m_testOne := "ping1"; +template charstring m_testTwo := "ping2"; + +altstep a_test() runs on GeneralComp { + [] p.receive(m_testOne) { + v_visitedAltstep := true; + } +} + +testcase TC_Sem_2002_TheAltStatement_007() runs on GeneralComp { + timer t_tmr := 0.5; + t_tmr.start; + p.send(m_testOne); + t_tmr.timeout; // wait for some time for the answer + + alt { + [] a_test() { + if (v_visitedAltstep == true) { + setverdict(pass); + } + } + [else] { + setverdict(fail); + } + } + + setverdict(pass); +} + +control { + execute(TC_Sem_2002_TheAltStatement_007()); +} + +} \ No newline at end of file diff --git a/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/Sem_2002_TheAltStatement_008.ttcn b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/Sem_2002_TheAltStatement_008.ttcn new file mode 100644 index 00000000..f52bc895 --- /dev/null +++ b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/Sem_2002_TheAltStatement_008.ttcn @@ -0,0 +1,49 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:20.2, Ensure that the done-block in an alt-statement is triggered as expected (loopback case). + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_2002_TheAltStatement_008 { + +type port MyPort message { + inout charstring +} + +type component MTCComp { + port MyPort p; +} + +type component PTCComp { + port MyPort p; +} + +type component SystemComp { + port MyPort p; +} + +function f_secondComponent() runs on PTCComp { +} + +testcase TC_Sem_2002_TheAltStatement_008() runs on MTCComp system SystemComp { + var PTCComp v_ptc := PTCComp.create alive; + map(self:p, system:p); + v_ptc.start(f_secondComponent()); + + alt { + [] v_ptc.killed { + setverdict(fail); // as we have an alive component, it shouldn't have the killed status here + } + [] v_ptc.done { + setverdict(pass); + } + } + v_ptc.kill; +} + +control { + execute(TC_Sem_2002_TheAltStatement_008()); +} + +} \ No newline at end of file diff --git a/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/Sem_2002_TheAltStatement_009.ttcn b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/Sem_2002_TheAltStatement_009.ttcn new file mode 100644 index 00000000..45be3cdf --- /dev/null +++ b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/Sem_2002_TheAltStatement_009.ttcn @@ -0,0 +1,49 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:20.2, Ensure that the killed-block in an alt-statement is triggered as expected when the component is killed (loopback case). + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_2002_TheAltStatement_009 { + +type port MyPort message { + inout charstring +} + +type component SystemComp { + port MyPort p; +} + +type component MTCComp { + port MyPort p; +} + +type component PTCComp { + port MyPort p; +} + +function f_secondComponent() runs on PTCComp { +} + +testcase TC_Sem_2002_TheAltStatement_009() runs on MTCComp system SystemComp { + var PTCComp v_ptc := PTCComp.create; + map(self:p, system:p); + v_ptc.start(f_secondComponent()); + v_ptc.kill; + + alt { + [] v_ptc.killed { + setverdict(pass); + } + [else] { + setverdict(fail); + } + } +} + +control { + execute(TC_Sem_2002_TheAltStatement_009()); +} + +} \ No newline at end of file diff --git a/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/Sem_2002_TheAltStatement_010.ttcn b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/Sem_2002_TheAltStatement_010.ttcn new file mode 100644 index 00000000..55e86d8e --- /dev/null +++ b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/Sem_2002_TheAltStatement_010.ttcn @@ -0,0 +1,27 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:20.2, Ensure that the timeout branch is taken as expected (loopback case). + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_2002_TheAltStatement_010 { + +type component GeneralComp { } + +testcase TC_Sem_2002_TheAltStatement_010() runs on GeneralComp { + timer t_timer; + + t_timer.start(20E-3); + + alt { // block until a timeout happens in 20ms + [] t_timer.timeout { + setverdict(pass); + } + } +} + +control { + execute(TC_Sem_2002_TheAltStatement_010(), 200E-3); // timeout in 100ms, then error +} +} \ No newline at end of file diff --git a/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/Sem_2002_TheAltStatement_011.ttcn b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/Sem_2002_TheAltStatement_011.ttcn new file mode 100644 index 00000000..06982c20 --- /dev/null +++ b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/Sem_2002_TheAltStatement_011.ttcn @@ -0,0 +1,33 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:20.2, Ensure that the behavior continues after the alt-statement (loopback case). + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_2002_TheAltStatement_011 { + +type component GeneralComp { } + +testcase TC_Sem_2002_TheAltStatement_011() runs on GeneralComp { + timer t_timer; + var boolean v_altVisited := false; + + t_timer.start(20E-3); + alt { // block until a timeout happens in 20ms + [] t_timer.timeout { + v_altVisited := true; + } + } + + if (v_altVisited == true) { + setverdict(pass); + } else { + setverdict(fail); // for some reason the alt has not been processed correctly. + } +} + +control { + execute(TC_Sem_2002_TheAltStatement_011(), 200E-3); // timeout in 100ms, then error +} +} \ No newline at end of file diff --git a/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/Sem_2002_TheAltStatement_012.ttcn b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/Sem_2002_TheAltStatement_012.ttcn new file mode 100644 index 00000000..0b4c16ad --- /dev/null +++ b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/Sem_2002_TheAltStatement_012.ttcn @@ -0,0 +1,52 @@ +/*************************************************** + ** @author STF 451 + ** @version 0.0.1 + ** @purpose 1:20.2, Ensure that alt statements are correctly handled for dynamically mapped ports + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// Mycompport A is dynamically mapped +module Sem_2002_TheAltStatement_012{ + + type port loopbackPort message { + inout integer + } + + type port IntegerOutputPortType message { + inout integer + } + +type component GeneralComp + { + + port IntegerOutputPortType MycomportA + } + +type component MyTestSystemInterface + { + port loopbackPort messagePort + } + +// MyTestSystemInterface is the test system interface +testcase TC_Sem_2002_TheAltStatement_012() runs on GeneralComp system MyTestSystemInterface { + timer tc_timer := 0.1; + map(mtc:MycomportA, system:messagePort); + + + MycomportA.send(2); + tc_timer.start; + unmap(mtc:MycomportA); + setverdict(pass); + + alt { + [] MycomportA.receive { + } + [] tc_timer.timeout { + setverdict(pass); + } + } +} +control{ + execute(TC_Sem_2002_TheAltStatement_012()); +} +} \ No newline at end of file diff --git a/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/Sem_2002_TheAltStatement_013.ttcn b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/Sem_2002_TheAltStatement_013.ttcn new file mode 100644 index 00000000..664ebf3d --- /dev/null +++ b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/Sem_2002_TheAltStatement_013.ttcn @@ -0,0 +1,50 @@ +/*************************************************** + ** @author STF 451 + ** @version 0.0.1 + ** @purpose 1:20.2, Ensure that alt statements are correctly handled for dynamically mapped ports + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// Mycompport A is dynamically mapped +module Sem_2002_TheAltStatement_013{ + + type port loopbackPort message { + inout integer + } + + type port IntegerOutputPortType message { + inout integer + } + +type component GeneralComp + { + + port IntegerOutputPortType MycomportA + } + +type component MyTestSystemInterface + { + port loopbackPort messagePort + } + +// MyTestSystemInterface is the test system interface +testcase TC_Sem_2002_TheAltStatement_013() runs on GeneralComp system MyTestSystemInterface { + timer tc_timer := 0.1; + map(mtc:MycomportA, system:messagePort); + + + MycomportA.send(2); + tc_timer.start; + unmap(mtc:MycomportA); + + alt { + [] tc_timer.timeout { + MycomportA.clear; + setverdict(pass); + } + } +} +control{ + execute(TC_Sem_2002_TheAltStatement_013()); +} +} \ No newline at end of file diff --git a/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/Sem_2002_TheAltStatement_014.ttcn b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/Sem_2002_TheAltStatement_014.ttcn new file mode 100644 index 00000000..ebb8cfc7 --- /dev/null +++ b/ATS/core_language/20_statement_and_operations_for_alt/2002_the_alt_statement/Sem_2002_TheAltStatement_014.ttcn @@ -0,0 +1,45 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:20.2, no default activation after else + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirement is tested: +// If an else branch is defined, the default mechanism will never be called, +// i.e. active defaults will never be entered. + +module Sem_2002_TheAltStatement_014 { + + type port MyPort message { + inout charstring + } + + type component GeneralComp { + port MyPort p; + } + + altstep a_receive() runs on GeneralComp { + [] p.receive { + setverdict(fail); + } + } + + testcase TC_Sem_2002_TheAltStatement_014() runs on GeneralComp system GeneralComp { + map(self:p, system: p); + p.send(charstring:"abc"); + activate(a_receive()); + alt { + [] p.receive(charstring:"def") { + setverdict(fail); + } + [else] { + setverdict(pass); + } + } + } + + control { + execute(TC_Sem_2002_TheAltStatement_014()); + } +} \ No newline at end of file diff --git a/ATS/core_language/20_statement_and_operations_for_alt/2003_the_repeat_statement/NegSem_2003_the_repeat_statement_001.ttcn b/ATS/core_language/20_statement_and_operations_for_alt/2003_the_repeat_statement/NegSem_2003_the_repeat_statement_001.ttcn new file mode 100644 index 00000000..aa560617 --- /dev/null +++ b/ATS/core_language/20_statement_and_operations_for_alt/2003_the_repeat_statement/NegSem_2003_the_repeat_statement_001.ttcn @@ -0,0 +1,40 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:20.3, Ensure that the IUT correctly processes repeat statements + ** @verdict pass reject + *****************************************************************/ + +module NegSem_2003_the_repeat_statement_001 { + + type port MyPort message { + inout charstring + } + + type component GeneralComp { + port MyPort p; + } + + template charstring m_test := "ping"; + + testcase TC_NegSem_2003_the_repeat_statement_001() runs on GeneralComp { + var integer counter := 1; + p.send(m_test); + p.send(m_test); + alt { + [counter == 1] p.receive(m_test) { + counter := 2; + repeat; + } + [counter == 2] p.receive(m_test) { + setverdict(pass); + } + } + repeat; //repeat statement is used outside of an alt or call structure + } + + control { + execute(TC_NegSem_2003_the_repeat_statement_001()); + } + +} \ No newline at end of file diff --git a/ATS/core_language/20_statement_and_operations_for_alt/2003_the_repeat_statement/Sem_2003_the_repeat_statement_001.ttcn b/ATS/core_language/20_statement_and_operations_for_alt/2003_the_repeat_statement/Sem_2003_the_repeat_statement_001.ttcn new file mode 100644 index 00000000..03205f01 --- /dev/null +++ b/ATS/core_language/20_statement_and_operations_for_alt/2003_the_repeat_statement/Sem_2003_the_repeat_statement_001.ttcn @@ -0,0 +1,46 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:20.3, Ensure that the IUT correctly processes repeat statements + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_2003_the_repeat_statement_001 { + + type port loopbackPort message { + inout charstring + } + + type component GeneralComp { + port loopbackPort p; + } + + template charstring m_test := "ping"; + + testcase TC_Sem_2003_the_repeat_statement_001() runs on GeneralComp { + timer t:= 5.0; + var integer counter := 1; + + p.send(m_test); + p.send(m_test); + + t.start; + alt { + [counter == 1] p.receive(m_test) { + counter := 2; + repeat; + } + [counter == 2] p.receive(m_test) { + setverdict(pass); + } + [] t.timeout { + setverdict(fail); + } + } + } + + control { + execute(TC_Sem_2003_the_repeat_statement_001()); + } + +} \ No newline at end of file diff --git a/ATS/core_language/20_statement_and_operations_for_alt/2003_the_repeat_statement/Sem_2003_the_repeat_statement_002.ttcn b/ATS/core_language/20_statement_and_operations_for_alt/2003_the_repeat_statement/Sem_2003_the_repeat_statement_002.ttcn new file mode 100644 index 00000000..f5aec0d1 --- /dev/null +++ b/ATS/core_language/20_statement_and_operations_for_alt/2003_the_repeat_statement/Sem_2003_the_repeat_statement_002.ttcn @@ -0,0 +1,50 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:20.2, repeat in procedure call block + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirement is tested: +// When used in statement blocks of the response and exception handling parts +// of blocking procedure calls, the repeat statement causes the re-evaluation +// of the response and exception handling part of the call (see clause 22.3.1). + +module Sem_2003_the_repeat_statement_002 { + + signature S(); + + type port MyPort procedure { + inout S; + } + + type component GeneralComp { + port MyPort p; + } + + function f_mirror() runs on GeneralComp { + p.getcall(S:?); + p.reply(S:{}); + } + + testcase TC_Sem_2003_the_repeat_statement_002() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc[2]; + var integer v_counter := 0; + for(var integer i := 0; i < 2; i := i + 1) { + v_ptc[i] := GeneralComp.create; + connect(self:p, v_ptc[i]:p); + v_ptc[i].start(f_mirror()); + } + p.call(S:{}) to all component { // broadcast call (several replies expected) + [] p.getreply(S:?) { + v_counter := v_counter + 1; + if (v_counter < lengthof(v_ptc)) { repeat; } // tested repeat + else { setverdict(pass); } + } + } + } + + control { + execute(TC_Sem_2003_the_repeat_statement_002()); + } +} \ No newline at end of file diff --git a/ATS/core_language/20_statement_and_operations_for_alt/2003_the_repeat_statement/Sem_2003_the_repeat_statement_003.ttcn b/ATS/core_language/20_statement_and_operations_for_alt/2003_the_repeat_statement/Sem_2003_the_repeat_statement_003.ttcn new file mode 100644 index 00000000..e05c51d7 --- /dev/null +++ b/ATS/core_language/20_statement_and_operations_for_alt/2003_the_repeat_statement/Sem_2003_the_repeat_statement_003.ttcn @@ -0,0 +1,45 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:20.2, repeat in alstep branch of alt statements + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirement is tested: +// If a repeat statement is used in a top alternative in an altstep definition, +// it causes a new snapshot and the re-evaluation of the alt statement from +// which the altstep has been called. The call of the altstep may either be +// done implicitly by the default mechanism (see clause 20.5.1) or explicitly +// in the alt statement (see clause 20.2). + +module Sem_2003_the_repeat_statement_003 { + + type port MyPort message { + inout charstring; + } + + type component GeneralComp { + port MyPort p; + } + + altstep a_receiveAny() runs on GeneralComp { + [] p.receive(charstring:?) { + repeat; + } + } + + testcase TC_Sem_2003_the_repeat_statement_003() runs on GeneralComp { + p.send(charstring:"foo"); + p.send(charstring:"bar"); + alt { + [] p.receive(charstring:"bar") { + setverdict(pass); + } + [] a_receiveAny(); + } + } + + control { + execute(TC_Sem_2003_the_repeat_statement_003()); + } +} \ No newline at end of file diff --git a/ATS/core_language/20_statement_and_operations_for_alt/2003_the_repeat_statement/Sem_2003_the_repeat_statement_004.ttcn b/ATS/core_language/20_statement_and_operations_for_alt/2003_the_repeat_statement/Sem_2003_the_repeat_statement_004.ttcn new file mode 100644 index 00000000..f75ca7f5 --- /dev/null +++ b/ATS/core_language/20_statement_and_operations_for_alt/2003_the_repeat_statement/Sem_2003_the_repeat_statement_004.ttcn @@ -0,0 +1,45 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:20.2, repeat in executed default + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirement is tested: +// If a repeat statement is used in a top alternative in an altstep definition, +// it causes a new snapshot and the re-evaluation of the alt statement from +// which the altstep has been called. The call of the altstep may either be +// done implicitly by the default mechanism (see clause 20.5.1) or explicitly +// in the alt statement (see clause 20.2). + +module Sem_2003_the_repeat_statement_004 { + + type port MyPort message { + inout charstring; + } + + type component GeneralComp { + port MyPort p; + } + + altstep a_receiveAny() runs on GeneralComp { + [] p.receive(charstring:?) { + repeat; + } + } + + testcase TC_Sem_2003_the_repeat_statement_004() runs on GeneralComp { + p.send(charstring:"foo"); + p.send(charstring:"bar"); + activate(a_receiveAny()); + alt { + [] p.receive(charstring:"bar") { + setverdict(pass); + } + } + } + + control { + execute(TC_Sem_2003_the_repeat_statement_004()); + } +} \ No newline at end of file diff --git a/ATS/core_language/20_statement_and_operations_for_alt/2004_the_interleave_statement/NegSem_2004_InterleaveStatement_001.ttcn b/ATS/core_language/20_statement_and_operations_for_alt/2004_the_interleave_statement/NegSem_2004_InterleaveStatement_001.ttcn new file mode 100644 index 00000000..a09b2b8d --- /dev/null +++ b/ATS/core_language/20_statement_and_operations_for_alt/2004_the_interleave_statement/NegSem_2004_InterleaveStatement_001.ttcn @@ -0,0 +1,63 @@ +/***************************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:20.4, Validate that interleave statements are properly handled. + ** @verdict pass reject + *****************************************************************/ + +module NegSem_2004_InterleaveStatement_001 { + + type port loopbackPort message { + inout MyMessageType + } + + type component GeneralComp { + port loopbackPort pt_myPort1,pt_myPort2; + } + + type record MyMessageType { + integer field1, + charstring field2, + boolean field3 + } + + testcase TC_NegSem_2004_InterleaveStatement_001() runs on GeneralComp { + + template MyMessageType MySig1 := {1,"aaa",true}; + template MyMessageType MySig2 := {2,"bbb",true}; + template MyMessageType MySig3 := {3,"ccc",true}; + + var integer v_i; + timer t_timer; + pt_myPort1.send(MyMessageType:{1, "aaa", true}); + t_timer.start(1.0); + + interleave { + [] pt_myPort1.receive(MySig1) + { + for(v_i:=1; v_i<10; v_i:= v_i+1) { //control transfer statement is not allowed + pt_myPort2.send(MySig2); + } + alt { + [] pt_myPort1.receive(MySig3) { + setverdict(pass); + } + [] t_timer.timeout { + setverdict(fail); + } + } + } + [] pt_myPort2.receive(MySig2) //boolean guard must be empty + { + pt_myPort1.send(MySig3); + } + + } + + + } + + control{ + execute(TC_NegSem_2004_InterleaveStatement_001()); + } +} \ No newline at end of file diff --git a/ATS/core_language/20_statement_and_operations_for_alt/2004_the_interleave_statement/NegSem_2004_InterleaveStatement_002.ttcn b/ATS/core_language/20_statement_and_operations_for_alt/2004_the_interleave_statement/NegSem_2004_InterleaveStatement_002.ttcn new file mode 100644 index 00000000..5d832aca --- /dev/null +++ b/ATS/core_language/20_statement_and_operations_for_alt/2004_the_interleave_statement/NegSem_2004_InterleaveStatement_002.ttcn @@ -0,0 +1,49 @@ +/***************************************************************** + ** @author STF 584 + ** @version 0.0.2 + ** @purpose 1:20.4, verify a while loop cannot be used inside interleave together with reception statements + ** @verdict pass reject + *****************************************************************/ + +// The following requirement is tested: +// Restriction d) +// The restricted use of the control transfer statements for, while, do-while, and goto within interleave +// statements is allowed under the following conditions: +// a. The loop statements for, while, and do-while can be used within statements blocks that do not +// contain reception statements. + +module NegSem_2004_InterleaveStatement_002 { + + type port MyPort message { + inout charstring + } + + type component GeneralComp { + port MyPort p; + } + + testcase TC_NegSem_2004_InterleaveStatement_002() runs on GeneralComp { + p.send(charstring:"foo"); + p.send(charstring:"bar"); + for(var integer i := 0; i < 5; i := i + 1) { + p.send("ding"); + } + + interleave { + [] p.receive(charstring:"bar") { + var integer v_counter := 0; + while(v_counter < 5) { + v_counter := v_counter + 1; + p.receive; + } + } + [] p.receive(charstring:"foo") { + } + } + setverdict(pass); + } + + control{ + execute(TC_NegSem_2004_InterleaveStatement_002()); + } +} \ No newline at end of file diff --git a/ATS/core_language/20_statement_and_operations_for_alt/2004_the_interleave_statement/NegSem_2004_InterleaveStatement_003.ttcn b/ATS/core_language/20_statement_and_operations_for_alt/2004_the_interleave_statement/NegSem_2004_InterleaveStatement_003.ttcn new file mode 100644 index 00000000..cdf95437 --- /dev/null +++ b/ATS/core_language/20_statement_and_operations_for_alt/2004_the_interleave_statement/NegSem_2004_InterleaveStatement_003.ttcn @@ -0,0 +1,48 @@ +/***************************************************************** + ** @author STF 584 + ** @version 0.0.2 + ** @purpose 1:20.4, verify a do-while loop cannot be used inside interleave together with reception statements + ** @verdict pass reject + *****************************************************************/ + +// The following requirement is tested: +// Restriction d) +// The restricted use of the control transfer statements for, while, do-while, and goto within interleave +// statements is allowed under the following conditions: +// a. The loop statements for, while, and do-while can be used within statements blocks that do not +// contain reception statements. + +module NegSem_2004_InterleaveStatement_003 { + + type port MyPort message { + inout charstring + } + + type component GeneralComp { + port MyPort p; + } + + testcase TC_NegSem_2004_InterleaveStatement_003() runs on GeneralComp { + p.send(charstring:"foo"); + p.send(charstring:"bar"); + for(var integer i := 0; i < 5; i := i + 1) { + p.send("ding"); + } + interleave { + [] p.receive(charstring:"bar") { + var integer v_counter := 0; + do { + v_counter := v_counter + 1; + p.receive; + } while(v_counter < 5); + } + [] p.receive(charstring:"foo") { + } + } + setverdict(pass); + } + + control{ + execute(TC_NegSem_2004_InterleaveStatement_003()); + } +} \ No newline at end of file diff --git a/ATS/core_language/20_statement_and_operations_for_alt/2004_the_interleave_statement/NegSem_2004_InterleaveStatement_004.ttcn b/ATS/core_language/20_statement_and_operations_for_alt/2004_the_interleave_statement/NegSem_2004_InterleaveStatement_004.ttcn new file mode 100644 index 00000000..67378a27 --- /dev/null +++ b/ATS/core_language/20_statement_and_operations_for_alt/2004_the_interleave_statement/NegSem_2004_InterleaveStatement_004.ttcn @@ -0,0 +1,45 @@ +/***************************************************************** + ** @author STF 584 + ** @version 0.0.2 + ** @purpose 1:20.4, verify that goto cannot be inside interleave if used together with reception statements + ** @verdict pass reject + *****************************************************************/ + +// The following requirement is tested: +// Restriction d) +// The restricted use of the control transfer statements for, while, do-while, and goto within interleave +// statements is allowed under the following conditions: +// b. The goto statement can be used for defining unconditional jumps within statements blocks that do not +// contain reception statements and for specifying unconditional jumps out of interleave statements. + +module NegSem_2004_InterleaveStatement_004 { + + type port MyPort message { + inout charstring + } + + type component GeneralComp { + port MyPort p; + } + + testcase TC_NegSem_2004_InterleaveStatement_004() runs on GeneralComp { + p.send(charstring:"foo"); + p.send(charstring:"bar"); + p.send(charstring:"ding"); + + interleave { + [] p.receive(charstring:"bar") { + goto L1; + label L1; + p.receive(charstring:"ding"); + } + [] p.receive(charstring:"foo") { + } + } + setverdict(pass); + } + + control{ + execute(TC_NegSem_2004_InterleaveStatement_004()); + } +} \ No newline at end of file diff --git a/ATS/core_language/20_statement_and_operations_for_alt/2004_the_interleave_statement/NegSem_2004_InterleaveStatement_005.ttcn b/ATS/core_language/20_statement_and_operations_for_alt/2004_the_interleave_statement/NegSem_2004_InterleaveStatement_005.ttcn new file mode 100644 index 00000000..aaba1f2e --- /dev/null +++ b/ATS/core_language/20_statement_and_operations_for_alt/2004_the_interleave_statement/NegSem_2004_InterleaveStatement_005.ttcn @@ -0,0 +1,46 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:20.4, activate call inside interleave + ** @verdict pass reject + *****************************************************************/ + +// The following requirement is tested: +// Control transfer statements for, while, do-while, goto, activate, +// deactivate, stop, repeat, return, direct call of altsteps as alternatives +// and (direct and indirect) calls of user-defined functions, which include +// reception statements, shall not be used in interleave statements. + +module NegSem_2004_InterleaveStatement_005 { + + type port MyPort message { + inout charstring + } + + type component GeneralComp { + port MyPort p; + } + + altstep a_timeout() { + [] any timer.timeout { + } + } + + testcase TC_NegSem_2004_InterleaveStatement_005() runs on GeneralComp { + p.send(charstring:"foo"); + p.send(charstring:"bar"); + + interleave { + [] p.receive(charstring:"bar") { + activate(a_timeout()); + } + [] p.receive(charstring:"foo") { + } + } + setverdict(pass); + } + + control{ + execute(TC_NegSem_2004_InterleaveStatement_005()); + } +} \ No newline at end of file diff --git a/ATS/core_language/20_statement_and_operations_for_alt/2004_the_interleave_statement/NegSem_2004_InterleaveStatement_006.ttcn b/ATS/core_language/20_statement_and_operations_for_alt/2004_the_interleave_statement/NegSem_2004_InterleaveStatement_006.ttcn new file mode 100644 index 00000000..f226dbcb --- /dev/null +++ b/ATS/core_language/20_statement_and_operations_for_alt/2004_the_interleave_statement/NegSem_2004_InterleaveStatement_006.ttcn @@ -0,0 +1,41 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:20.4, deactivate call inside interleave + ** @verdict pass reject + *****************************************************************/ + +// The following requirement is tested: +// Control transfer statements for, while, do-while, goto, activate, +// deactivate, stop, repeat, return, direct call of altsteps as alternatives +// and (direct and indirect) calls of user-defined functions, which include +// reception statements, shall not be used in interleave statements. + +module NegSem_2004_InterleaveStatement_006 { + + type port MyPort message { + inout charstring + } + + type component GeneralComp { + port MyPort p; + } + + testcase TC_NegSem_2004_InterleaveStatement_006() runs on GeneralComp { + p.send(charstring:"foo"); + p.send(charstring:"bar"); + + interleave { + [] p.receive(charstring:"bar") { + deactivate; + } + [] p.receive(charstring:"foo") { + } + } + setverdict(pass); + } + + control{ + execute(TC_NegSem_2004_InterleaveStatement_006()); + } +} \ No newline at end of file diff --git a/ATS/core_language/20_statement_and_operations_for_alt/2004_the_interleave_statement/NegSem_2004_InterleaveStatement_008.ttcn b/ATS/core_language/20_statement_and_operations_for_alt/2004_the_interleave_statement/NegSem_2004_InterleaveStatement_008.ttcn new file mode 100644 index 00000000..35ec46cf --- /dev/null +++ b/ATS/core_language/20_statement_and_operations_for_alt/2004_the_interleave_statement/NegSem_2004_InterleaveStatement_008.ttcn @@ -0,0 +1,41 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:20.4, repeat inside interleave + ** @verdict pass reject + *****************************************************************/ + +// The following requirement is tested: +// Control transfer statements for, while, do-while, goto, activate, +// deactivate, stop, repeat, return, direct call of altsteps as alternatives +// and (direct and indirect) calls of user-defined functions, which include +// reception statements, shall not be used in interleave statements. + +module NegSem_2004_InterleaveStatement_008 { + + type port MyPort message { + inout charstring + } + + type component GeneralComp { + port MyPort p; + } + + testcase TC_NegSem_2004_InterleaveStatement_008() runs on GeneralComp { + p.send(charstring:"foo"); + p.send(charstring:"bar"); + + interleave { + [] p.receive(charstring:"bar") { + repeat; + } + [] p.receive(charstring:"foo") { + } + } + setverdict(pass); + } + + control{ + execute(TC_NegSem_2004_InterleaveStatement_008()); + } +} \ No newline at end of file diff --git a/ATS/core_language/20_statement_and_operations_for_alt/2004_the_interleave_statement/NegSem_2004_InterleaveStatement_010.ttcn b/ATS/core_language/20_statement_and_operations_for_alt/2004_the_interleave_statement/NegSem_2004_InterleaveStatement_010.ttcn new file mode 100644 index 00000000..a235a184 --- /dev/null +++ b/ATS/core_language/20_statement_and_operations_for_alt/2004_the_interleave_statement/NegSem_2004_InterleaveStatement_010.ttcn @@ -0,0 +1,47 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:20.4, explicit altstep call inside interleave + ** @verdict pass reject + *****************************************************************/ + +// The following requirement is tested: +// Control transfer statements for, while, do-while, goto, activate, +// deactivate, stop, repeat, return, direct call of altsteps as alternatives +// and (direct and indirect) calls of user-defined functions, which include +// reception statements, shall not be used in interleave statements. + +module NegSem_2004_InterleaveStatement_010 { + + type port MyPort message { + inout charstring + } + + type component GeneralComp { + port MyPort p; + } + + altstep a_receive() runs on GeneralComp { + [] p.receive(charstring:?) { + } + } + + testcase TC_NegSem_2004_InterleaveStatement_010() runs on GeneralComp { + p.send(charstring:"foo"); + p.send(charstring:"bar"); + p.send(charstring:"ding"); + + interleave { + [] p.receive(charstring:"bar") { + a_receive(); + } + [] p.receive(charstring:"foo") { + } + } + setverdict(pass); + } + + control{ + execute(TC_NegSem_2004_InterleaveStatement_010()); + } +} \ No newline at end of file diff --git a/ATS/core_language/20_statement_and_operations_for_alt/2004_the_interleave_statement/NegSem_2004_InterleaveStatement_011.ttcn b/ATS/core_language/20_statement_and_operations_for_alt/2004_the_interleave_statement/NegSem_2004_InterleaveStatement_011.ttcn new file mode 100644 index 00000000..48b25946 --- /dev/null +++ b/ATS/core_language/20_statement_and_operations_for_alt/2004_the_interleave_statement/NegSem_2004_InterleaveStatement_011.ttcn @@ -0,0 +1,46 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:20.4, direct function call containing reception statement inside interleave + ** @verdict pass reject + *****************************************************************/ + +// The following requirement is tested: +// Control transfer statements for, while, do-while, goto, activate, +// deactivate, stop, repeat, return, direct call of altsteps as alternatives +// and (direct and indirect) calls of user-defined functions, which include +// reception statements, shall not be used in interleave statements. + +module NegSem_2004_InterleaveStatement_011 { + + type port MyPort message { + inout charstring + } + + type component GeneralComp { + port MyPort p; + } + + function f_receive() runs on GeneralComp { + p.receive(charstring:?); + } + + testcase TC_NegSem_2004_InterleaveStatement_011() runs on GeneralComp { + p.send(charstring:"foo"); + p.send(charstring:"bar"); + p.send(charstring:"ding"); + + interleave { + [] p.receive(charstring:"bar") { + f_receive(); + } + [] p.receive(charstring:"foo") { + } + } + setverdict(pass); + } + + control{ + execute(TC_NegSem_2004_InterleaveStatement_011()); + } +} \ No newline at end of file diff --git a/ATS/core_language/20_statement_and_operations_for_alt/2004_the_interleave_statement/NegSem_2004_InterleaveStatement_012.ttcn b/ATS/core_language/20_statement_and_operations_for_alt/2004_the_interleave_statement/NegSem_2004_InterleaveStatement_012.ttcn new file mode 100644 index 00000000..7b58b178 --- /dev/null +++ b/ATS/core_language/20_statement_and_operations_for_alt/2004_the_interleave_statement/NegSem_2004_InterleaveStatement_012.ttcn @@ -0,0 +1,52 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:20.4, indirect function call containing reception statement inside interleave + ** @verdict pass reject + *****************************************************************/ + +// The following requirement is tested: +// Control transfer statements for, while, do-while, goto, activate, +// deactivate, stop, repeat, return, direct call of altsteps as alternatives +// and (direct and indirect) calls of user-defined functions, which include +// reception statements, shall not be used in interleave statements. + +module NegSem_2004_InterleaveStatement_012 { + + type port MyPort message { + inout charstring + } + + type component GeneralComp { + port MyPort p; + } + + function f_receive() runs on GeneralComp { + p.receive(charstring:?); + } + + function f_caller(boolean p_choice) runs on GeneralComp { + if (p_choice) { + f_receive(); + } + } + + testcase TC_NegSem_2004_InterleaveStatement_012() runs on GeneralComp { + p.send(charstring:"foo"); + p.send(charstring:"bar"); + p.send(charstring:"ding"); + + interleave { + [] p.receive(charstring:"bar") { + f_caller(true); + } + [] p.receive(charstring:"foo") { + } + } + setverdict(pass); + } + + control{ + execute(TC_NegSem_2004_InterleaveStatement_012()); + } +} \ No newline at end of file diff --git a/ATS/core_language/20_statement_and_operations_for_alt/2004_the_interleave_statement/NegSem_2004_InterleaveStatement_013.ttcn b/ATS/core_language/20_statement_and_operations_for_alt/2004_the_interleave_statement/NegSem_2004_InterleaveStatement_013.ttcn new file mode 100644 index 00000000..ed84d30b --- /dev/null +++ b/ATS/core_language/20_statement_and_operations_for_alt/2004_the_interleave_statement/NegSem_2004_InterleaveStatement_013.ttcn @@ -0,0 +1,46 @@ +/***************************************************************** + ** @author STF 584 + ** @version 0.0.1 + ** @purpose 1:20.4, verify that conditional goto cannot be inside interleave + ** @verdict pass reject + *****************************************************************/ + +// The following requirement is tested: +// Restriction d) +// The restricted use of the control transfer statements for, while, do-while, and goto within interleave +// statements is allowed under the following conditions: +// b. The goto statement can be used for defining unconditional jumps within statements blocks that do not +// contain reception statements and for specifying unconditional jumps out of interleave statements. + +module NegSem_2004_InterleaveStatement_013 { + + type port MyPort message { + inout charstring + } + + type component GeneralComp { + port MyPort p; + } + + testcase TC_NegSem_2004_InterleaveStatement_013() runs on GeneralComp { + var boolean v_cond := true; + p.send(charstring:"foo"); + p.send(charstring:"bar"); + + interleave { + [] p.receive(charstring:"bar") { + if (v_cond) { + goto L1; + } + } + [] p.receive(charstring:"foo") { + } + } + label L1; + setverdict(pass); + } + + control{ + execute(TC_NegSem_2004_InterleaveStatement_013()); + } +} \ No newline at end of file diff --git a/ATS/core_language/20_statement_and_operations_for_alt/2004_the_interleave_statement/NegSyn_2004_InterleaveStatement_001.ttcn b/ATS/core_language/20_statement_and_operations_for_alt/2004_the_interleave_statement/NegSyn_2004_InterleaveStatement_001.ttcn new file mode 100644 index 00000000..1dd1c7a2 --- /dev/null +++ b/ATS/core_language/20_statement_and_operations_for_alt/2004_the_interleave_statement/NegSyn_2004_InterleaveStatement_001.ttcn @@ -0,0 +1,62 @@ +/***************************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:20.4, Validate that interleave statements are properly handled. + ** @verdict pass reject + *****************************************************************/ + +module NegSyn_2004_InterleaveStatement_001 { + + type port loopbackPort message { + inout MyMessageType + } + + type component GeneralComp { + port loopbackPort pt_myPort1,pt_myPort2; + } + + type record MyMessageType { + integer field1, + charstring field2, + boolean field3 + } + + testcase TC_NegSyn_2004_InterleaveStatement_001() runs on GeneralComp { + + template MyMessageType MySig1 := {1,"aaa",true}; + template MyMessageType MySig2 := {2,"bbb",true}; + template MyMessageType MySig3 := {3,"ccc",true}; + + timer t_timer; + pt_myPort1.send(MyMessageType:{1, "aaa", true}); + t_timer.start(1.0); + + interleave { + [] pt_myPort1.receive(MySig1) + { + pt_myPort2.send(MySig2); + alt { + [] pt_myPort1.receive(MySig3) { + setverdict(pass); + } + [] t_timer.timeout { + setverdict(fail); + } + } + } + [] pt_myPort2.receive(MySig2) + { + pt_myPort1.send(MySig3); + } + [else] { + setverdict(pass); + } + } + + + } + + control{ + execute(TC_NegSyn_2004_InterleaveStatement_001()); + } +} \ No newline at end of file diff --git a/ATS/core_language/20_statement_and_operations_for_alt/2004_the_interleave_statement/NegSyn_2004_InterleaveStatement_002.ttcn b/ATS/core_language/20_statement_and_operations_for_alt/2004_the_interleave_statement/NegSyn_2004_InterleaveStatement_002.ttcn new file mode 100644 index 00000000..ab077c9a --- /dev/null +++ b/ATS/core_language/20_statement_and_operations_for_alt/2004_the_interleave_statement/NegSyn_2004_InterleaveStatement_002.ttcn @@ -0,0 +1,61 @@ +/***************************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:20.4, Validate that interleave statements are properly handled. + ** @verdict pass reject + *****************************************************************/ + +module NegSyn_2004_InterleaveStatement_002 { + + type port loopbackPort message { + inout MyMessageType + } + + type component GeneralComp { + port loopbackPort pt_myPort1,pt_myPort2; + } + + type record MyMessageType { + integer field1, + charstring field2, + boolean field3 + } + + testcase TC_NegSyn_2004_InterleaveStatement_002() runs on GeneralComp { + + template MyMessageType MySig1 := {1,"aaa",true}; + template MyMessageType MySig2 := {2,"bbb",true}; + template MyMessageType MySig3 := {3,"ccc",true}; + + timer t_timer; + var integer v:=1; + t_timer.start(1.0); + pt_myPort1.send(MyMessageType:{1, "aaa", true}); + + interleave { + [v>0] pt_myPort1.receive(MySig1) //boolean guard must be empty + { + pt_myPort2.send(MySig2); + alt { + [] pt_myPort1.receive(MySig3) { + setverdict(pass); + } + [] t_timer.timeout { + setverdict(fail); + } + } + } + [v<0] pt_myPort2.receive(MySig2) //boolean guard must be empty + { + pt_myPort1.send(MySig3); + } + + } + + + } + + control{ + execute(TC_NegSyn_2004_InterleaveStatement_002()); + } +} \ No newline at end of file diff --git a/ATS/core_language/20_statement_and_operations_for_alt/2004_the_interleave_statement/Sem_2004_InterleaveStatement_001.ttcn b/ATS/core_language/20_statement_and_operations_for_alt/2004_the_interleave_statement/Sem_2004_InterleaveStatement_001.ttcn new file mode 100644 index 00000000..17c02182 --- /dev/null +++ b/ATS/core_language/20_statement_and_operations_for_alt/2004_the_interleave_statement/Sem_2004_InterleaveStatement_001.ttcn @@ -0,0 +1,66 @@ +/***************************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:20.4, Validate that interleave statements are properly handled. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_2004_InterleaveStatement_001 { + + type port loopbackPort message { + inout MyMessageType + } + + type component GeneralComp { + port loopbackPort pt_myPort1,pt_myPort2; + timer t_timer; + } + + type record MyMessageType { + integer field1, + charstring field2, + boolean field3 + } + + altstep checkTimeout(timer t_timer){ + [] t_timer.timeout { + setverdict(fail); + } + } + + testcase TC_Sem_2004_InterleaveStatement_001() runs on GeneralComp system GeneralComp { + + template MyMessageType MySig1 := {1,"aaa",true}; + template MyMessageType MySig2 := {2,"bbb",true}; + template MyMessageType MySig3 := {3,"ccc",true}; + + map(mtc:pt_myPort1, system:pt_myPort1); + map(mtc:pt_myPort2, system:pt_myPort2); + + activate(checkTimeout(t_timer)); + pt_myPort1.send(MyMessageType:{1, "aaa", true}); + t_timer.start(3.0); + + interleave { + [] pt_myPort1.receive(MySig1) + { + pt_myPort2.send(MySig2); + alt { + [] pt_myPort1.receive(MySig3) { + setverdict(pass); + } + } + } + [] pt_myPort2.receive(MySig2) + { + pt_myPort1.send(MySig3); + } + } + + + } + + control{ + execute(TC_Sem_2004_InterleaveStatement_001()); + } +} \ No newline at end of file diff --git a/ATS/core_language/20_statement_and_operations_for_alt/2004_the_interleave_statement/Sem_2004_InterleaveStatement_002.ttcn b/ATS/core_language/20_statement_and_operations_for_alt/2004_the_interleave_statement/Sem_2004_InterleaveStatement_002.ttcn new file mode 100644 index 00000000..8b6f34dc --- /dev/null +++ b/ATS/core_language/20_statement_and_operations_for_alt/2004_the_interleave_statement/Sem_2004_InterleaveStatement_002.ttcn @@ -0,0 +1,67 @@ +/***************************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:20.4, Validate that interleave statements are properly handled. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_2004_InterleaveStatement_002 { + + type port loopbackPort message { + inout MyMessageType + } + + type component GeneralComp { + port loopbackPort pt_myPort1,pt_myPort2; + } + + type record MyMessageType { + integer field1, + charstring field2, + boolean field3 + } + + altstep checkTimeout(timer t_timer){ + [] t_timer.timeout { + setverdict(fail); + } + } + + testcase TC_Sem_2004_InterleaveStatement_002() runs on GeneralComp { + + template MyMessageType MySig1 := {1,"aaa",true}; + template MyMessageType MySig2 := {2,"bbb",true}; + template MyMessageType MySig3 := {3,"ccc",true}; + + timer t_timer; + + pt_myPort1.send(MyMessageType:{1, "aaa", true}); + + t_timer.start(1.0); + + interleave { + [] pt_myPort1.receive(MySig1) + { + pt_myPort2.send(MySig2); + alt { + [] pt_myPort1.receive(MySig3) { + setverdict(fail); + } + } + } + [] pt_myPort2.receive(MySig2) + { + setverdict(pass); + break; //evaluation of correct exit from interleave + pt_myPort1.send(MySig3); + setverdict(fail); + } + } + + + } + + control{ + execute(TC_Sem_2004_InterleaveStatement_002()); + } +} \ No newline at end of file diff --git a/ATS/core_language/20_statement_and_operations_for_alt/2004_the_interleave_statement/Sem_2004_InterleaveStatement_003.ttcn b/ATS/core_language/20_statement_and_operations_for_alt/2004_the_interleave_statement/Sem_2004_InterleaveStatement_003.ttcn new file mode 100644 index 00000000..a6d8fabd --- /dev/null +++ b/ATS/core_language/20_statement_and_operations_for_alt/2004_the_interleave_statement/Sem_2004_InterleaveStatement_003.ttcn @@ -0,0 +1,50 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:20.4, while loop inside interleave + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirement is tested: +// If none of the alternatives of the interleave statement can be executed, +// the default mechanism will be invoked. This means, according to the +// semantics of the default mechanism, the actual snapshot will be used to +// evaluate those altsteps that have been activated before entering the +// interleave statement. + +module Sem_2004_InterleaveStatement_003 { + + type port MyPort message { + inout charstring + } + + type component GeneralComp { + port MyPort p; + } + + altstep a_receive() runs on GeneralComp { + [] p.receive(charstring:?) { + setverdict(pass, "default called"); + } + } + + testcase TC_Sem_2004_InterleaveStatement_003() runs on GeneralComp { + p.send(charstring:"foo"); + p.send(charstring:"ding"); + p.send(charstring:"bar"); + activate(a_receive()); + + interleave { + [] p.receive(charstring:"bar") { // should not be called, because the default is invoked instead + setverdict(fail, "default not used properly!!!"); + } + [] p.receive(charstring:"foo") { + setverdict(pass, "foo received"); + } + } + } + + control{ + execute(TC_Sem_2004_InterleaveStatement_003()); + } +} \ No newline at end of file diff --git a/ATS/core_language/20_statement_and_operations_for_alt/2004_the_interleave_statement/Sem_2004_InterleaveStatement_004.ttcn b/ATS/core_language/20_statement_and_operations_for_alt/2004_the_interleave_statement/Sem_2004_InterleaveStatement_004.ttcn new file mode 100644 index 00000000..b7017bbb --- /dev/null +++ b/ATS/core_language/20_statement_and_operations_for_alt/2004_the_interleave_statement/Sem_2004_InterleaveStatement_004.ttcn @@ -0,0 +1,65 @@ +/***************************************************************** + ** @author STF 584 + ** @version 0.0.1 + ** @purpose 1:20.4, verify that a for loop can be used inside interleave + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirement is tested: +// Restriction d) +// The restricted use of the control transfer statements for, while, do-while, and goto within interleave +// statements is allowed under the following conditions: +// a. The loop statements for, while, and do-while can be used within statements blocks that do not +// contain reception statements. + + +module Sem_2004_InterleaveStatement_004 { + + type port loopbackPort message { + inout MyMessageType + } + + type component GeneralComp { + port loopbackPort pt_myPort1,pt_myPort2; + } + + type record MyMessageType { + integer field1, + charstring field2, + boolean field3 + } + + testcase TC_Sem_2004_InterleaveStatement_004() runs on GeneralComp { + + template MyMessageType MySig1 := {1,"aaa",true}; + template MyMessageType MySig2 := {2,"bbb",true}; + template MyMessageType MySig3 := {3,"ccc",true}; + + var integer v_i; + timer t_timer; + pt_myPort1.send(MyMessageType:{1, "aaa", true}); + t_timer.start(1.0); + + interleave { + [] pt_myPort1.receive(MySig1) + { + var integer v_counter := 0; + for(v_i:=1; v_i<10; v_i:= v_i+1) { //control transfer statement is not allowed + v_counter := v_counter + 1; + } + log (v_counter); + } + [] pt_myPort2.receive(MySig2) //boolean guard must be empty + { + pt_myPort1.send(MySig3); + } + + } + + + } + + control{ + execute(TC_Sem_2004_InterleaveStatement_004()); + } +} \ No newline at end of file diff --git a/ATS/core_language/20_statement_and_operations_for_alt/2004_the_interleave_statement/Sem_2004_InterleaveStatement_005.ttcn b/ATS/core_language/20_statement_and_operations_for_alt/2004_the_interleave_statement/Sem_2004_InterleaveStatement_005.ttcn new file mode 100644 index 00000000..1b17f4d7 --- /dev/null +++ b/ATS/core_language/20_statement_and_operations_for_alt/2004_the_interleave_statement/Sem_2004_InterleaveStatement_005.ttcn @@ -0,0 +1,45 @@ +/***************************************************************** + ** @author STF 548 + ** @version 0.0.1 + ** @purpose 1:20.4, verify that while loop can be used inside interleave + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirement is tested: +// Restriction d) +// The restricted use of the control transfer statements for, while, do-while, and goto within interleave +// statements is allowed under the following conditions: +// a. The loop statements for, while, and do-while can be used within statements blocks that do not +// contain reception statements. + +module Sem_2004_InterleaveStatement_005 { + + type port MyPort message { + inout charstring + } + + type component GeneralComp { + port MyPort p; + } + + testcase TC_Sem_2004_InterleaveStatement_005() runs on GeneralComp { + p.send(charstring:"foo"); + p.send(charstring:"bar"); + + interleave { + [] p.receive(charstring:"bar") { + var integer v_counter := 0; + while(v_counter < 5) { + v_counter := v_counter + 1; + } + } + [] p.receive(charstring:"foo") { + } + } + setverdict(pass); + } + + control{ + execute(TC_Sem_2004_InterleaveStatement_005()); + } +} \ No newline at end of file diff --git a/ATS/core_language/20_statement_and_operations_for_alt/2004_the_interleave_statement/Sem_2004_InterleaveStatement_006.ttcn b/ATS/core_language/20_statement_and_operations_for_alt/2004_the_interleave_statement/Sem_2004_InterleaveStatement_006.ttcn new file mode 100644 index 00000000..8e73f641 --- /dev/null +++ b/ATS/core_language/20_statement_and_operations_for_alt/2004_the_interleave_statement/Sem_2004_InterleaveStatement_006.ttcn @@ -0,0 +1,45 @@ +/***************************************************************** + ** @author STF 584 + ** @version 0.0.1 + ** @purpose 1:20.4, verify that a do-while loop can be used inside interleave + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirement is tested: +// Restriction d) +// The restricted use of the control transfer statements for, while, do-while, and goto within interleave +// statements is allowed under the following conditions: +// a. The loop statements for, while, and do-while can be used within statements blocks that do not +// contain reception statements. + +module Sem_2004_InterleaveStatement_006 { + + type port MyPort message { + inout charstring + } + + type component GeneralComp { + port MyPort p; + } + + testcase TC_Sem_2004_InterleaveStatement_006() runs on GeneralComp { + p.send(charstring:"foo"); + p.send(charstring:"bar"); + + interleave { + [] p.receive(charstring:"bar") { + var integer v_counter := 0; + do { + v_counter := v_counter + 1; + } while(v_counter < 5); + } + [] p.receive(charstring:"foo") { + } + } + setverdict(pass); + } + + control{ + execute(TC_Sem_2004_InterleaveStatement_006()); + } +} \ No newline at end of file diff --git a/ATS/core_language/20_statement_and_operations_for_alt/2004_the_interleave_statement/Sem_2004_InterleaveStatement_007.ttcn b/ATS/core_language/20_statement_and_operations_for_alt/2004_the_interleave_statement/Sem_2004_InterleaveStatement_007.ttcn new file mode 100644 index 00000000..06b5a283 --- /dev/null +++ b/ATS/core_language/20_statement_and_operations_for_alt/2004_the_interleave_statement/Sem_2004_InterleaveStatement_007.ttcn @@ -0,0 +1,43 @@ +/***************************************************************** + ** @author STF 584 + ** @version 0.0.1 + ** @purpose 1:20.4, verify that goto can be used for jumps out of interleave + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirement is tested: +// Restriction d) +// The restricted use of the control transfer statements for, while, do-while, and goto within interleave +// statements is allowed under the following conditions: +// b. The goto statement can be used for defining unconditional jumps within statements blocks that do not +// contain reception statements and for specifying unconditional jumps out of interleave statements. + +module Sem_2004_InterleaveStatement_007 { + + type port MyPort message { + inout charstring + } + + type component GeneralComp { + port MyPort p; + } + + testcase TC_Sem_2004_InterleaveStatement_007() runs on GeneralComp { + p.send(charstring:"foo"); + p.send(charstring:"bar"); + + interleave { + [] p.receive(charstring:"bar") { + goto L1; + } + [] p.receive(charstring:"foo") { + } + } + label L1; + setverdict(pass); + } + + control{ + execute(TC_Sem_2004_InterleaveStatement_007()); + } +} \ No newline at end of file diff --git a/ATS/core_language/20_statement_and_operations_for_alt/2004_the_interleave_statement/Sem_2004_InterleaveStatement_008.ttcn b/ATS/core_language/20_statement_and_operations_for_alt/2004_the_interleave_statement/Sem_2004_InterleaveStatement_008.ttcn new file mode 100644 index 00000000..b434f665 --- /dev/null +++ b/ATS/core_language/20_statement_and_operations_for_alt/2004_the_interleave_statement/Sem_2004_InterleaveStatement_008.ttcn @@ -0,0 +1,44 @@ +/***************************************************************** + ** @author STF 584 + ** @version 0.0.1 + ** @purpose 1:20.4, verify that goto can be used inside interleave for jumps within statement blocks + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirement is tested: +// Restriction d) +// The restricted use of the control transfer statements for, while, do-while, and goto within interleave +// statements is allowed under the following conditions: +// b. The goto statement can be used for defining unconditional jumps within statements blocks that do not +// contain reception statements and for specifying unconditional jumps out of interleave statements. + +module Sem_2004_InterleaveStatement_008 { + + type port MyPort message { + inout charstring + } + + type component GeneralComp { + port MyPort p; + } + + testcase TC_Sem_2004_InterleaveStatement_008() runs on GeneralComp { + p.send(charstring:"foo"); + p.send(charstring:"bar"); + + interleave { + [] p.receive(charstring:"bar") { + log ("inside interleave"); + goto L1; + label L1; + } + [] p.receive(charstring:"foo") { + } + } + setverdict(pass); + } + + control{ + execute(TC_Sem_2004_InterleaveStatement_008()); + } +} \ No newline at end of file diff --git a/ATS/core_language/20_statement_and_operations_for_alt/2004_the_interleave_statement/Sem_2004_InterleaveStatement_009.ttcn b/ATS/core_language/20_statement_and_operations_for_alt/2004_the_interleave_statement/Sem_2004_InterleaveStatement_009.ttcn new file mode 100644 index 00000000..4f253d11 --- /dev/null +++ b/ATS/core_language/20_statement_and_operations_for_alt/2004_the_interleave_statement/Sem_2004_InterleaveStatement_009.ttcn @@ -0,0 +1,38 @@ +/***************************************************************** + ** @author STF 584 + ** @version 0.0.2 + ** @purpose 1:20.4, stop inside interleave + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// Background: +// The stop statement was forbidden inside interleave in TTCN-3:2016 and older + +module Sem_2004_InterleaveStatement_009 { + + type port MyPort message { + inout charstring + } + + type component GeneralComp { + port MyPort p; + } + + testcase TC_Sem_2004_InterleaveStatement_009() runs on GeneralComp { + p.send(charstring:"foo"); + p.send(charstring:"bar"); + + interleave { + [] p.receive(charstring:"bar") { + setverdict(pass); + stop; + } + [] p.receive(charstring:"foo") { + } + } + } + + control{ + execute(TC_Sem_2004_InterleaveStatement_009()); + } +} \ No newline at end of file diff --git a/ATS/core_language/20_statement_and_operations_for_alt/2004_the_interleave_statement/Sem_2004_InterleaveStatement_010.ttcn b/ATS/core_language/20_statement_and_operations_for_alt/2004_the_interleave_statement/Sem_2004_InterleaveStatement_010.ttcn new file mode 100644 index 00000000..dba2077d --- /dev/null +++ b/ATS/core_language/20_statement_and_operations_for_alt/2004_the_interleave_statement/Sem_2004_InterleaveStatement_010.ttcn @@ -0,0 +1,41 @@ +/***************************************************************** + ** @author STF 584 + ** @version 0.0.2 + ** @purpose 1:20.4, return inside interleave + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// Background: +// The return statement was forbidden inside interleave in TTCN-3:2016 and older + +module Sem_2004_InterleaveStatement_010 { + + type port MyPort message { + inout charstring + } + + type component GeneralComp { + port MyPort p; + } + + function f_interleave() runs on GeneralComp { + interleave { + [] p.receive(charstring:"bar") { + setverdict(pass); + return; + } + [] p.receive(charstring:"foo") { + } + } + } + + testcase TC_Sem_2004_InterleaveStatement_010() runs on GeneralComp { + p.send(charstring:"foo"); + p.send(charstring:"bar"); + f_interleave(); + } + + control{ + execute(TC_Sem_2004_InterleaveStatement_010()); + } +} \ No newline at end of file diff --git a/ATS/core_language/20_statement_and_operations_for_alt/2004_the_interleave_statement/Syn_2004_InterleaveStatement_001.ttcn b/ATS/core_language/20_statement_and_operations_for_alt/2004_the_interleave_statement/Syn_2004_InterleaveStatement_001.ttcn new file mode 100644 index 00000000..4e9abd60 --- /dev/null +++ b/ATS/core_language/20_statement_and_operations_for_alt/2004_the_interleave_statement/Syn_2004_InterleaveStatement_001.ttcn @@ -0,0 +1,53 @@ +/***************************************************************** + ** @author STF 433 (updated by STF 521) + ** @version 0.0.2 + ** @purpose 1:20.4, Validate that interleave statements are properly handled. + ** @verdict pass accept, noexecution + *****************************************************************/ +module Syn_2004_InterleaveStatement_001 { + type port MyMessagePortType message { + inout MyMessageType; + } + + type component GeneralComp { + port MyMessagePortType pt_myPort1, pt_myPort2; + } + + type record MyMessageType { + integer field1, + charstring field2, + boolean field3 + } + + testcase TC_Syn_2004_InterleaveStatement_001() runs on GeneralComp { + + template MyMessageType MySig1 := {1, "abc", true} + template MyMessageType MySig2 := MySig1; + template MyMessageType MySig3 := MySig1; + template MyMessageType MySig4 := MySig1; + template MyMessageType MySig5 := MySig1; + template MyMessageType MySig6 := MySig1; + + pt_myPort1 + .send(MyMessageType: + { + 2, + "abcxyz", + true + }); + + interleave { + [] pt_myPort1.receive(MySig1) { + pt_myPort1.send(MySig2); + pt_myPort1.receive(MySig3); + } + [] pt_myPort2.receive(MySig4) { + pt_myPort2.send(MySig5); + pt_myPort2.receive(MySig6); + } + } + } + control { + execute(TC_Syn_2004_InterleaveStatement_001()); + } +} \ No newline at end of file diff --git a/ATS/core_language/20_statement_and_operations_for_alt/2005_default_handling/200501_the_default_mechanism/NegSem_200501_the_default_mechanism_001.ttcn b/ATS/core_language/20_statement_and_operations_for_alt/2005_default_handling/200501_the_default_mechanism/NegSem_200501_the_default_mechanism_001.ttcn new file mode 100644 index 00000000..341bdf2f --- /dev/null +++ b/ATS/core_language/20_statement_and_operations_for_alt/2005_default_handling/200501_the_default_mechanism/NegSem_200501_the_default_mechanism_001.ttcn @@ -0,0 +1,63 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:20.5.1, verify unsuccessful default termination + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// For each test component the defaults, i.e. activated altsteps, are stored as an ordered +// list. The defaults are listed in the reversed order of their activation i.e. the last +// activated default is the first element in the list of active defaults. + +// The default mechanism is evoked at the end of each alt statement, if due to the +// actual snapshot none of the specified alternatives could be executed. An evoked +// default mechanism invokes the first altstep in the list of defaults, i.e. the last +// activated default, and waits for the result of its termination. The termination can +// be successful or unsuccessful. + +// In the case of an unsuccessful termination, the default mechanism invokes the next +// default in the list. If the last default in the list has terminated unsuccessfully, +// the default mechanism will return to the place in the alt statement in which it +// has been invoked, i.e. at the end of the alt statement, and indicate an unsuccessful +// default execution. An unsuccessful default execution will also be indicated if the list +// of defaults is empty. An unsuccessful default execution may cause a new snapshot or +// a dynamic error if the test component is blocked. + +module NegSem_200501_the_default_mechanism_001 { + + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + altstep a1() runs on GeneralComp { + [] p.receive(integer:2) { // no match + setverdict(pass, "First default"); + } + } + + altstep a2() runs on GeneralComp { + [] p.receive(integer:1) { // no match + setverdict(fail, "Last default"); + } + } + + testcase TC_NegSem_200501_the_default_mechanism_001() runs on GeneralComp { + activate(a1()); + activate(a2()); + p.send(integer:5); + alt { + [] p.receive(integer:0) { // not expected: leads to default invocation + setverdict(fail); + } + } // defaults are terminated unsuccessfully -> dynamic test case error + } + + control{ + execute(TC_NegSem_200501_the_default_mechanism_001(), 1.0); + } +} diff --git a/ATS/core_language/20_statement_and_operations_for_alt/2005_default_handling/200501_the_default_mechanism/Sem_200501_the_default_mechanism_001.ttcn b/ATS/core_language/20_statement_and_operations_for_alt/2005_default_handling/200501_the_default_mechanism/Sem_200501_the_default_mechanism_001.ttcn new file mode 100644 index 00000000..e8ad75bc --- /dev/null +++ b/ATS/core_language/20_statement_and_operations_for_alt/2005_default_handling/200501_the_default_mechanism/Sem_200501_the_default_mechanism_001.ttcn @@ -0,0 +1,44 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:20.5.1, verify that activated default is invoked + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// The default mechanism is evoked at the end of each alt statement, if due to the +// actual snapshot none of the specified alternatives could be executed. An evoked +// default mechanism invokes the first altstep in the list of defaults, i.e. the last +// activated default, and waits for the result of its termination. The termination can +// be successful or unsuccessful. + +module Sem_200501_the_default_mechanism_001 { + + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + altstep a() runs on GeneralComp { + [] p.receive(integer:?) { + setverdict(pass); + } + } + + testcase TC_Sem_200501_the_default_mechanism_001() runs on GeneralComp { + activate(a()); + p.send(integer:5); + alt { + [] p.receive(integer:0) { // not expected: leads to default invocation + setverdict(fail); + } + } + } + + control{ + execute(TC_Sem_200501_the_default_mechanism_001()); + } +} diff --git a/ATS/core_language/20_statement_and_operations_for_alt/2005_default_handling/200501_the_default_mechanism/Sem_200501_the_default_mechanism_002.ttcn b/ATS/core_language/20_statement_and_operations_for_alt/2005_default_handling/200501_the_default_mechanism/Sem_200501_the_default_mechanism_002.ttcn new file mode 100644 index 00000000..e2bea9ac --- /dev/null +++ b/ATS/core_language/20_statement_and_operations_for_alt/2005_default_handling/200501_the_default_mechanism/Sem_200501_the_default_mechanism_002.ttcn @@ -0,0 +1,55 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:20.5.1, verify that default are processed in interleave + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// The default mechanism is evoked at the end of each alt statement, if due to the +// actual snapshot none of the specified alternatives could be executed. An evoked +// default mechanism invokes the first altstep in the list of defaults, i.e. the last +// activated default, and waits for the result of its termination. The termination can +// be successful or unsuccessful. + +// In particular, the test case is related to the NOTE 1: +// An interleave statement is semantically equivalent to a nested set of alt statements +// and the default mechanism also applies to each of these alt statements. This means, +// the default mechanism also applies to interleave statements. Furthermore, the restrictions +// imposed on interleave statements in clause 20.4 do not apply to altsteps that are +// activated as default behaviour for interleave statements. + +module Sem_200501_the_default_mechanism_002 { + + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + altstep a() runs on GeneralComp { + [] p.receive(integer:?) { + setverdict(pass); + } + } + + testcase TC_Sem_200501_the_default_mechanism_002() runs on GeneralComp { + activate(a()); + p.send(integer:1); + p.send(integer:2); + interleave { + [] p.receive(integer:5) { // not expected: leads to default invocation + setverdict(fail); + } + [] p.receive(integer:2) { // not expected: the first default causes exit from interleave + setverdict(fail); + } + } + } + + control{ + execute(TC_Sem_200501_the_default_mechanism_002()); + } +} diff --git a/ATS/core_language/20_statement_and_operations_for_alt/2005_default_handling/200501_the_default_mechanism/Sem_200501_the_default_mechanism_003.ttcn b/ATS/core_language/20_statement_and_operations_for_alt/2005_default_handling/200501_the_default_mechanism/Sem_200501_the_default_mechanism_003.ttcn new file mode 100644 index 00000000..0c0cff50 --- /dev/null +++ b/ATS/core_language/20_statement_and_operations_for_alt/2005_default_handling/200501_the_default_mechanism/Sem_200501_the_default_mechanism_003.ttcn @@ -0,0 +1,55 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:20.5.1, verify than default are processed in interleave + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// The default mechanism is evoked at the end of each alt statement, if due to the +// actual snapshot none of the specified alternatives could be executed. An evoked +// default mechanism invokes the first altstep in the list of defaults, i.e. the last +// activated default, and waits for the result of its termination. The termination can +// be successful or unsuccessful. + +// In particular, the test case is related to the NOTE 1: +// An interleave statement is semantically equivalent to a nested set of alt statements +// and the default mechanism also applies to each of these alt statements. This means, +// the default mechanism also applies to interleave statements. Furthermore, the restrictions +// imposed on interleave statements in clause 20.4 do not apply to altsteps that are +// activated as default behaviour for interleave statements. + +module Sem_200501_the_default_mechanism_003 { + + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + altstep a() runs on GeneralComp { + [] p.receive(integer:?) { + setverdict(pass); + } + } + + testcase TC_Sem_200501_the_default_mechanism_003() runs on GeneralComp { + activate(a()); + p.send(integer:1); + p.send(integer:2); + interleave { + [] p.receive(integer:1) { // expected, no default in this case + setverdict(pass); + } + [] p.receive(integer:3) { // not expected: leads to default invocation + setverdict(fail); + } + } + } + + control{ + execute(TC_Sem_200501_the_default_mechanism_003()); + } +} diff --git a/ATS/core_language/20_statement_and_operations_for_alt/2005_default_handling/200501_the_default_mechanism/Sem_200501_the_default_mechanism_004.ttcn b/ATS/core_language/20_statement_and_operations_for_alt/2005_default_handling/200501_the_default_mechanism/Sem_200501_the_default_mechanism_004.ttcn new file mode 100644 index 00000000..4c16b3de --- /dev/null +++ b/ATS/core_language/20_statement_and_operations_for_alt/2005_default_handling/200501_the_default_mechanism/Sem_200501_the_default_mechanism_004.ttcn @@ -0,0 +1,64 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:20.5.1, verify that default processing order is correct + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// For each test component the defaults, i.e. activated altsteps, are stored as an ordered +// list. The defaults are listed in the reversed order of their activation i.e. the last +// activated default is the first element in the list of active defaults. + +// The default mechanism is evoked at the end of each alt statement, if due to the +// actual snapshot none of the specified alternatives could be executed. An evoked +// default mechanism invokes the first altstep in the list of defaults, i.e. the last +// activated default, and waits for the result of its termination. The termination can +// be successful or unsuccessful. + +// In the case of a successful termination, the default ... the main control flow of the +// test component will continue immediately after the alt statement from which the default +// mechanism was called... + +// Note: +// In this test case, two altsteps are activated as defaults. The sooner activated +// default leads to a test case failure, but because the last activated default takes +// precedence, it should never happen. + +module Sem_200501_the_default_mechanism_004 { + + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + altstep a1() runs on GeneralComp { + [] p.receive(integer:?) { + setverdict(fail, "First default"); + } + } + + altstep a2() runs on GeneralComp { + [] p.receive(integer:?) { + setverdict(pass, "Last default"); + } + } + + testcase TC_Sem_200501_the_default_mechanism_004() runs on GeneralComp { + activate(a1()); + activate(a2()); + p.send(integer:5); + alt { + [] p.receive(integer:0) { // not expected: leads to default invocation + setverdict(fail); + } + } + } + + control{ + execute(TC_Sem_200501_the_default_mechanism_004()); + } +} diff --git a/ATS/core_language/20_statement_and_operations_for_alt/2005_default_handling/200501_the_default_mechanism/Sem_200501_the_default_mechanism_005.ttcn b/ATS/core_language/20_statement_and_operations_for_alt/2005_default_handling/200501_the_default_mechanism/Sem_200501_the_default_mechanism_005.ttcn new file mode 100644 index 00000000..7973c8a8 --- /dev/null +++ b/ATS/core_language/20_statement_and_operations_for_alt/2005_default_handling/200501_the_default_mechanism/Sem_200501_the_default_mechanism_005.ttcn @@ -0,0 +1,66 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:20.5.1, verify that default processing order is correct + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// For each test component the defaults, i.e. activated altsteps, are stored as an ordered +// list. The defaults are listed in the reversed order of their activation i.e. the last +// activated default is the first element in the list of active defaults. + +// The default mechanism is evoked at the end of each alt statement, if due to the +// actual snapshot none of the specified alternatives could be executed. An evoked +// default mechanism invokes the first altstep in the list of defaults, i.e. the last +// activated default, and waits for the result of its termination. The termination can +// be successful or unsuccessful. + +// In the case of an unsuccessful termination, the default mechanism invokes the next +// default in the list. + +// In the case of a successful termination, the default ... the main control flow of the +// test component will continue immediately after the alt statement from which the default +// mechanism was called... + +// Note: +// In this test case, two altsteps are activated as defaults. The last activated doesn't +// match, which should lead to invokation of the default activated as the first one. + +module Sem_200501_the_default_mechanism_005 { + + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + altstep a1() runs on GeneralComp { + [] p.receive(integer:?) { + setverdict(pass, "First default"); + } + } + + altstep a2() runs on GeneralComp { + [] p.receive(integer:1) { // no match + setverdict(fail, "Last default"); + } + } + + testcase TC_Sem_200501_the_default_mechanism_005() runs on GeneralComp { + activate(a1()); + activate(a2()); + p.send(integer:5); + alt { + [] p.receive(integer:0) { // not expected: leads to default invocation + setverdict(fail); + } + } + } + + control{ + execute(TC_Sem_200501_the_default_mechanism_005()); + } +} diff --git a/ATS/core_language/20_statement_and_operations_for_alt/2005_default_handling/200501_the_default_mechanism/Sem_200501_the_default_mechanism_006.ttcn b/ATS/core_language/20_statement_and_operations_for_alt/2005_default_handling/200501_the_default_mechanism/Sem_200501_the_default_mechanism_006.ttcn new file mode 100644 index 00000000..fd516ecd --- /dev/null +++ b/ATS/core_language/20_statement_and_operations_for_alt/2005_default_handling/200501_the_default_mechanism/Sem_200501_the_default_mechanism_006.ttcn @@ -0,0 +1,50 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:20.5.1, verify repeat command behaviour in invoked default + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// In the case of a successful termination, ... the test component will take new +// snapshot and re-evaluate the alt statement. The latter has to be specified by +// means of a repeat statement. + +module Sem_200501_the_default_mechanism_006 { + + type port P message { + inout integer; + } + + type component GeneralComp { + var integer vc_messageCounter := 0; + port P p; + } + + altstep a() runs on GeneralComp { + [] p.receive(integer:?) { + vc_messageCounter := vc_messageCounter + 1; + setverdict(pass, "Default value -> repeating alt"); + repeat; + } + } + + testcase TC_Sem_200501_the_default_mechanism_006() runs on GeneralComp { + activate(a()); + p.send(integer:5); + p.send(integer:1); + alt { + [] p.receive(integer:1) { + vc_messageCounter := vc_messageCounter + 1; + setverdict(pass); + } + } + if (vc_messageCounter != 2) { + setverdict(fail, "Different number of received messages (", vc_messageCounter, ") than expected (2)"); + } + } + + control{ + execute(TC_Sem_200501_the_default_mechanism_006()); + } +} diff --git a/ATS/core_language/20_statement_and_operations_for_alt/2005_default_handling/200501_the_default_mechanism/Sem_200501_the_default_mechanism_007.ttcn b/ATS/core_language/20_statement_and_operations_for_alt/2005_default_handling/200501_the_default_mechanism/Sem_200501_the_default_mechanism_007.ttcn new file mode 100644 index 00000000..5ca741e6 --- /dev/null +++ b/ATS/core_language/20_statement_and_operations_for_alt/2005_default_handling/200501_the_default_mechanism/Sem_200501_the_default_mechanism_007.ttcn @@ -0,0 +1,54 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:20.5.1, verify break command behaviour in invoked default + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// If the execution of the selected top alternative of the default ends with a break statement +// the control flow of the test component will continue immediately after the alt statement. + +module Sem_200501_the_default_mechanism_007 { + + type port P message { + inout integer; + } + + type component GeneralComp { + var integer vc_messageCounter := 0; + port P p; + } + + altstep a() runs on GeneralComp { + [] p.receive(integer:?) { + vc_messageCounter := vc_messageCounter + 1; + if (vc_messageCounter == 2) { + setverdict(pass, "Message count full, terminating alt"); + break; + } + setverdict(pass, "Default value -> repeating alt"); + repeat; + } + } + + testcase TC_Sem_200501_the_default_mechanism_007() runs on GeneralComp { + activate(a()); + p.send(integer:5); + p.send(integer:0); + p.send(integer:1); + alt { + [] p.receive(integer:1) { // not expected: break should occur first + vc_messageCounter := vc_messageCounter + 1; + setverdict(fail); + } + } + if (vc_messageCounter != 2) { + setverdict(fail, "Different number of received messages (", vc_messageCounter, ") than expected (2)"); + } + } + + control{ + execute(TC_Sem_200501_the_default_mechanism_007()); + } +} diff --git a/ATS/core_language/20_statement_and_operations_for_alt/2005_default_handling/200501_the_default_mechanism/Sem_200501_the_default_mechanism_008.ttcn b/ATS/core_language/20_statement_and_operations_for_alt/2005_default_handling/200501_the_default_mechanism/Sem_200501_the_default_mechanism_008.ttcn new file mode 100644 index 00000000..b02ad561 --- /dev/null +++ b/ATS/core_language/20_statement_and_operations_for_alt/2005_default_handling/200501_the_default_mechanism/Sem_200501_the_default_mechanism_008.ttcn @@ -0,0 +1,43 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:20.5.1, verify stop command behaviour in invoked default + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// In the case of a successful termination, the default may either stop the test component +// by means of a stop statement + +module Sem_200501_the_default_mechanism_008 { + + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + altstep a() runs on GeneralComp { + [] p.receive(integer:?) { + setverdict(pass, "Default value -> stopping component"); + stop; + } + } + + testcase TC_Sem_200501_the_default_mechanism_008() runs on GeneralComp { + activate(a()); + p.send(integer:5); + alt { + [] p.receive(integer:1) { // not expected: invoking default + setverdict(fail); + } + } + setverdict(fail, "Component stop expected"); + } + + control{ + execute(TC_Sem_200501_the_default_mechanism_008()); + } +} diff --git a/ATS/core_language/20_statement_and_operations_for_alt/2005_default_handling/200502_the_activate_operation/NegSem_200502_the_activate_operation_001.ttcn b/ATS/core_language/20_statement_and_operations_for_alt/2005_default_handling/200502_the_activate_operation/NegSem_200502_the_activate_operation_001.ttcn new file mode 100644 index 00000000..6cbc2f4b --- /dev/null +++ b/ATS/core_language/20_statement_and_operations_for_alt/2005_default_handling/200502_the_activate_operation/NegSem_200502_the_activate_operation_001.ttcn @@ -0,0 +1,38 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:20.5.2, verify error is generated if activated alstep runs on incompatible component + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// An activate operation will put the referenced altstep as the first element into the list +// of defaults and return a default reference. +// The effect of an activate operation is local to the test component in which it is called. + +module NegSem_200502_the_activate_operation_001 { + + type component GeneralComp { + } + + type port P message { + inout integer; + } + + type component TestComp { + port P p; + } + + altstep a() runs on TestComp { + [] p.receive {} + } + + testcase TC_NegSem_200502_the_activate_operation_001() runs on GeneralComp { + activate(a()); + setverdict(pass); + } + + control{ + execute(TC_NegSem_200502_the_activate_operation_001()); + } +} diff --git a/ATS/core_language/20_statement_and_operations_for_alt/2005_default_handling/200502_the_activate_operation/NegSem_200502_the_activate_operation_002.ttcn b/ATS/core_language/20_statement_and_operations_for_alt/2005_default_handling/200502_the_activate_operation/NegSem_200502_the_activate_operation_002.ttcn new file mode 100644 index 00000000..5f7e43d8 --- /dev/null +++ b/ATS/core_language/20_statement_and_operations_for_alt/2005_default_handling/200502_the_activate_operation/NegSem_200502_the_activate_operation_002.ttcn @@ -0,0 +1,33 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:20.5.2, verify error is generated when passing local timer + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// All timer instances in the actual parameter list shall be declared as component type local timers. + +module NegSem_200502_the_activate_operation_002 { + + type component GeneralComp { + } + + altstep a(timer t_tmr) runs on GeneralComp { + [] t_tmr.timeout {} + } + + testcase TC_NegSem_200502_the_activate_operation_002() runs on GeneralComp { + if (true) { + timer t_local := 0.5; + t_local.start; + activate(a(t_local)); + } + any port.receive; + setverdict(pass); + } + + control{ + execute(TC_NegSem_200502_the_activate_operation_002()); + } +} diff --git a/ATS/core_language/20_statement_and_operations_for_alt/2005_default_handling/200502_the_activate_operation/NegSem_200502_the_activate_operation_003.ttcn b/ATS/core_language/20_statement_and_operations_for_alt/2005_default_handling/200502_the_activate_operation/NegSem_200502_the_activate_operation_003.ttcn new file mode 100644 index 00000000..4bc70575 --- /dev/null +++ b/ATS/core_language/20_statement_and_operations_for_alt/2005_default_handling/200502_the_activate_operation/NegSem_200502_the_activate_operation_003.ttcn @@ -0,0 +1,28 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:20.5.2, verify error is generated when activating altstep with out parameters + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// An altstep that is activated as a default shall only have in parameters, port parameters, or timer parameters. + +module NegSem_200502_the_activate_operation_003 { + + type component GeneralComp { + } + + altstep a(out integer p_val) runs on GeneralComp { + [] any port.receive {} + } + + testcase TC_NegSem_200502_the_activate_operation_003() runs on GeneralComp { + var integer v_val; + activate(a(v_val)); + } + + control{ + execute(TC_NegSem_200502_the_activate_operation_003()); + } +} diff --git a/ATS/core_language/20_statement_and_operations_for_alt/2005_default_handling/200502_the_activate_operation/NegSem_200502_the_activate_operation_004.ttcn b/ATS/core_language/20_statement_and_operations_for_alt/2005_default_handling/200502_the_activate_operation/NegSem_200502_the_activate_operation_004.ttcn new file mode 100644 index 00000000..a610d3a5 --- /dev/null +++ b/ATS/core_language/20_statement_and_operations_for_alt/2005_default_handling/200502_the_activate_operation/NegSem_200502_the_activate_operation_004.ttcn @@ -0,0 +1,28 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:20.5.2, verify error is generated when activating altstep with inout parameters + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// An altstep that is activated as a default shall only have in parameters, port parameters, or timer parameters. + +module NegSem_200502_the_activate_operation_004 { + + type component GeneralComp { + } + + altstep a(inout integer p_val) runs on GeneralComp { + [] any port.receive {} + } + + testcase TC_NegSem_200502_the_activate_operation_004() runs on GeneralComp { + var integer v_val := 1; + activate(a(v_val)); + } + + control{ + execute(TC_NegSem_200502_the_activate_operation_004()); + } +} diff --git a/ATS/core_language/20_statement_and_operations_for_alt/2005_default_handling/200502_the_activate_operation/NegSem_200502_the_activate_operation_005.ttcn b/ATS/core_language/20_statement_and_operations_for_alt/2005_default_handling/200502_the_activate_operation/NegSem_200502_the_activate_operation_005.ttcn new file mode 100644 index 00000000..1fde6514 --- /dev/null +++ b/ATS/core_language/20_statement_and_operations_for_alt/2005_default_handling/200502_the_activate_operation/NegSem_200502_the_activate_operation_005.ttcn @@ -0,0 +1,31 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:20.5.2, verify error is generated when activating function + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// An activate operation will put the referenced altstep as the first element into the list of defaults +// and return a default reference. + +module NegSem_200502_the_activate_operation_005 { + + type component GeneralComp { + } + + function f() runs on GeneralComp { + alt { + [] any port.receive {} + } + } + + testcase TC_NegSem_200502_the_activate_operation_005() runs on GeneralComp { + activate(f()); + setverdict(pass); + } + + control{ + execute(TC_NegSem_200502_the_activate_operation_005()); + } +} diff --git a/ATS/core_language/20_statement_and_operations_for_alt/2005_default_handling/200502_the_activate_operation/NegSem_200502_the_activate_operation_006.ttcn b/ATS/core_language/20_statement_and_operations_for_alt/2005_default_handling/200502_the_activate_operation/NegSem_200502_the_activate_operation_006.ttcn new file mode 100644 index 00000000..3e7ae319 --- /dev/null +++ b/ATS/core_language/20_statement_and_operations_for_alt/2005_default_handling/200502_the_activate_operation/NegSem_200502_the_activate_operation_006.ttcn @@ -0,0 +1,47 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:20.5.2, local timer as a parameter of activated altstep in module control + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// For altsteps activated in module control or in functions or altsteps invoked +// directly or indirectly from module control, all timer instances in the actual +// parameter list shall be declared in the highest scope of the module control +// part (see clause 26.2). Timers from lower scopes of the module control part +// (i.e. from the nested statement blocks) are not allowed to occur in the actual +// parameter list. + +module NegSem_200502_the_activate_operation_006 { + + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + altstep a(timer t_tmr) { + [] t_tmr.timeout { log ("Timeout in default"); } + } + + testcase TC_NegSem_200502_the_activate_operation_006() runs on GeneralComp { + setverdict(pass); + } + + function f_test() { + timer t_tmr := 1.0, t_tmr2; + t_tmr.start; + activate(a(t_tmr)); + alt { + [] t_tmr2.timeout { } + } + } + + control{ + f_test(); + execute(TC_NegSem_200502_the_activate_operation_006()); + } +} diff --git a/ATS/core_language/20_statement_and_operations_for_alt/2005_default_handling/200502_the_activate_operation/NegSem_200502_the_activate_operation_007.ttcn b/ATS/core_language/20_statement_and_operations_for_alt/2005_default_handling/200502_the_activate_operation/NegSem_200502_the_activate_operation_007.ttcn new file mode 100644 index 00000000..61efe063 --- /dev/null +++ b/ATS/core_language/20_statement_and_operations_for_alt/2005_default_handling/200502_the_activate_operation/NegSem_200502_the_activate_operation_007.ttcn @@ -0,0 +1,52 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:20.5.2, local timer (referenced through timer parameter) as a parameter of activated altstep in module control + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// For altsteps activated in module control or in functions or altsteps invoked +// directly or indirectly from module control, all timer instances in the actual +// parameter list shall be declared in the highest scope of the module control +// part (see clause 26.2). Timers from lower scopes of the module control part +// (i.e. from the nested statement blocks) are not allowed to occur in the actual +// parameter list. + +module NegSem_200502_the_activate_operation_007 { + + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + altstep a(timer t_tmr) { + [] t_tmr.timeout { log ("Timeout in default"); } + } + + testcase TC_NegSem_200502_the_activate_operation_007() runs on GeneralComp { + setverdict(pass); + } + + function f_activate(timer t_tmr) { + activate(a(t_tmr)); + } + + function f_test() { + timer t_tmr := 1.0; + t_tmr.start; + f_activate(t_tmr); // t_tmr is a local timer, this should lead to an activation error in f_activate + } + + control{ + timer t_tmr2; + f_test(); + alt { + [] t_tmr2.timeout { } + } + execute(TC_NegSem_200502_the_activate_operation_007()); + } +} diff --git a/ATS/core_language/20_statement_and_operations_for_alt/2005_default_handling/200502_the_activate_operation/Sem_200502_the_activate_operation_001.ttcn b/ATS/core_language/20_statement_and_operations_for_alt/2005_default_handling/200502_the_activate_operation/Sem_200502_the_activate_operation_001.ttcn new file mode 100644 index 00000000..68591ee4 --- /dev/null +++ b/ATS/core_language/20_statement_and_operations_for_alt/2005_default_handling/200502_the_activate_operation/Sem_200502_the_activate_operation_001.ttcn @@ -0,0 +1,36 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:20.5.2, verify that activate operation can be used as standalone statement + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// The activate operation can be called without saving the returned default reference. +// This form is useful in test cases which do not require explicit deactivation +// of the activated default, i.e. deactivation of a default is done implicitly at +// MTC termination. + +// Note: +// An activate operation saving the returned default reference is tested in the section +// 6.2.8. + +module Sem_200502_the_activate_operation_001 { + + type component GeneralComp { + } + + altstep a() runs on GeneralComp + { + [] any port.receive {} + } + + testcase TC_Sem_200502_the_activate_operation_001() runs on GeneralComp { + activate(a()); + setverdict(pass); + } + + control{ + execute(TC_Sem_200502_the_activate_operation_001()); + } +} diff --git a/ATS/core_language/20_statement_and_operations_for_alt/2005_default_handling/200502_the_activate_operation/Sem_200502_the_activate_operation_002.ttcn b/ATS/core_language/20_statement_and_operations_for_alt/2005_default_handling/200502_the_activate_operation/Sem_200502_the_activate_operation_002.ttcn new file mode 100644 index 00000000..2eb7a272 --- /dev/null +++ b/ATS/core_language/20_statement_and_operations_for_alt/2005_default_handling/200502_the_activate_operation/Sem_200502_the_activate_operation_002.ttcn @@ -0,0 +1,48 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:20.5.2, verify that parameters are passed at activation time + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// The actual parameters of a parameterized altstep (see clause 16.2.1) that should +// be activated as a default, shall be provided in the corresponding activate statement. +// This means the actual parameters are bound to the default at the time of its activation +// (and not e.g. at the time of its invocation by the default mechanism). + +module Sem_200502_the_activate_operation_002 { + + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + const integer c_defaultParValue := 1; + + altstep a(integer p_par) runs on GeneralComp { + [] p.receive(integer:?) { + if (p_par == c_defaultParValue) { setverdict(pass); } + else { setverdict(fail); } + } + } + + testcase TC_Sem_200502_the_activate_operation_002() runs on GeneralComp { + var integer v_num := c_defaultParValue; + activate(a(v_num)); + v_num := v_num + 1; + p.send(integer:5); + alt { + [] p.receive(integer:0) { // not expected: leads to default evocation + setverdict(fail); + } + } + } + + control{ + execute(TC_Sem_200502_the_activate_operation_002()); + } +} diff --git a/ATS/core_language/20_statement_and_operations_for_alt/2005_default_handling/200502_the_activate_operation/Sem_200502_the_activate_operation_003.ttcn b/ATS/core_language/20_statement_and_operations_for_alt/2005_default_handling/200502_the_activate_operation/Sem_200502_the_activate_operation_003.ttcn new file mode 100644 index 00000000..88d8015b --- /dev/null +++ b/ATS/core_language/20_statement_and_operations_for_alt/2005_default_handling/200502_the_activate_operation/Sem_200502_the_activate_operation_003.ttcn @@ -0,0 +1,31 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:20.5.2, verify that passing component timer to activated altstep + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// All timer instances in the actual parameter list shall be declared as component type local timers. + +module Sem_200502_the_activate_operation_003 { + + type component GeneralComp { + timer tc_tmr := 0.5; + } + + altstep a(timer t_tmr) runs on GeneralComp { + [] t_tmr.timeout {} + } + + testcase TC_Sem_200502_the_activate_operation_003() runs on GeneralComp { + tc_tmr.start; + activate(a(tc_tmr)); + any port.receive; + setverdict(pass); + } + + control{ + execute(TC_Sem_200502_the_activate_operation_003()); + } +} diff --git a/ATS/core_language/20_statement_and_operations_for_alt/2005_default_handling/200502_the_activate_operation/Sem_200502_the_activate_operation_004.ttcn b/ATS/core_language/20_statement_and_operations_for_alt/2005_default_handling/200502_the_activate_operation/Sem_200502_the_activate_operation_004.ttcn new file mode 100644 index 00000000..03f3bf13 --- /dev/null +++ b/ATS/core_language/20_statement_and_operations_for_alt/2005_default_handling/200502_the_activate_operation/Sem_200502_the_activate_operation_004.ttcn @@ -0,0 +1,36 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:20.5.2, verify passing port parameter to activated altstep + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// An altstep that is activated as a default shall only have in parameters, port parameters, or timer parameters. + +module Sem_200502_the_activate_operation_004 { + + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + altstep a(P p_port) runs on GeneralComp { + [] p_port.receive(integer:?) { setverdict(pass); } + } + + testcase TC_Sem_200502_the_activate_operation_004() runs on GeneralComp { + activate(a(p)); + p.send(integer:1); + alt { + [] p.receive(integer:0) { setverdict(fail); } + } + } + + control{ + execute(TC_Sem_200502_the_activate_operation_004()); + } +} diff --git a/ATS/core_language/20_statement_and_operations_for_alt/2005_default_handling/200502_the_activate_operation/Sem_200502_the_activate_operation_005.ttcn b/ATS/core_language/20_statement_and_operations_for_alt/2005_default_handling/200502_the_activate_operation/Sem_200502_the_activate_operation_005.ttcn new file mode 100644 index 00000000..1ea9034e --- /dev/null +++ b/ATS/core_language/20_statement_and_operations_for_alt/2005_default_handling/200502_the_activate_operation/Sem_200502_the_activate_operation_005.ttcn @@ -0,0 +1,43 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:20.5.2, control block timer as a parameter of activated altstep + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// For altsteps activated in module control or in functions or altsteps invoked +// directly or indirectly from module control, all timer instances in the actual +// parameter list shall be declared in the highest scope of the module control +// part (see clause 26.2). Timers from lower scopes of the module control part +// (i.e. from the nested statement blocks) are not allowed to occur in the actual +// parameter list. + +module Sem_200502_the_activate_operation_005 { + + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + altstep a(timer t_tmr) { + [] t_tmr.timeout { log ("Timeout in default"); } + } + + testcase TC_Sem_200502_the_activate_operation_005() runs on GeneralComp { + setverdict(pass); + } + + control{ + timer t_tmr := 1.0, t_tmr2; + t_tmr.start; + activate(a(t_tmr)); + alt { + [] t_tmr2.timeout { } + } + execute(TC_Sem_200502_the_activate_operation_005()); + } +} diff --git a/ATS/core_language/20_statement_and_operations_for_alt/2005_default_handling/200502_the_activate_operation/Sem_200502_the_activate_operation_006.ttcn b/ATS/core_language/20_statement_and_operations_for_alt/2005_default_handling/200502_the_activate_operation/Sem_200502_the_activate_operation_006.ttcn new file mode 100644 index 00000000..8dfaa5ca --- /dev/null +++ b/ATS/core_language/20_statement_and_operations_for_alt/2005_default_handling/200502_the_activate_operation/Sem_200502_the_activate_operation_006.ttcn @@ -0,0 +1,48 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:20.5.2, control block timer (referenced through timer parameter) as a parameter of activated altstep + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// For altsteps activated in module control or in functions or altsteps invoked +// directly or indirectly from module control, all timer instances in the actual +// parameter list shall be declared in the highest scope of the module control +// part (see clause 26.2). Timers from lower scopes of the module control part +// (i.e. from the nested statement blocks) are not allowed to occur in the actual +// parameter list. + +module Sem_200502_the_activate_operation_006 { + + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + altstep a(timer t_tmr) { + [] t_tmr.timeout { log ("Timeout in default"); } + } + + testcase TC_Sem_200502_the_activate_operation_006() runs on GeneralComp { + setverdict(pass); + } + + function f_test(timer t_tmr) { + //timer t_tmr2; + t_tmr.start; + activate(a(t_tmr)); + alt { + [] t_tmr.timeout { } + } + } + + control{ + timer t_tmr := 1.0; + f_test(t_tmr); + execute(TC_Sem_200502_the_activate_operation_006()); + } +} diff --git a/ATS/core_language/20_statement_and_operations_for_alt/2005_default_handling/200503_the_deactivate_operation/NegSem_200503_the_deactivate_operation_001.ttcn b/ATS/core_language/20_statement_and_operations_for_alt/2005_default_handling/200503_the_deactivate_operation/NegSem_200503_the_deactivate_operation_001.ttcn new file mode 100644 index 00000000..730023d4 --- /dev/null +++ b/ATS/core_language/20_statement_and_operations_for_alt/2005_default_handling/200503_the_deactivate_operation/NegSem_200503_the_deactivate_operation_001.ttcn @@ -0,0 +1,43 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:20.5.1, verify that deactivate deactivated default causes error + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Calling a deactivate operation with an undefined default reference, e.g. an old reference +// to a default that has already been deactivated, shall cause a runtime error. + +module NegSem_200503_the_deactivate_operation_001 { + + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + altstep a1() runs on GeneralComp { + [] p.receive(integer:?) { + setverdict(pass); + } + } + + testcase TC_NegSem_200503_the_deactivate_operation_001() runs on GeneralComp { + var default v_default := activate(a1()); + p.send(integer:1); + deactivate(v_default); // correct deactivation + deactivate(v_default); // v_default is deactivated at this point -> runtime error + alt { + [] p.receive(integer:0) { // not expected: leads to default invocation + setverdict(fail); + } + } + } + + control{ + execute(TC_NegSem_200503_the_deactivate_operation_001(), 1.0); + } +} diff --git a/ATS/core_language/20_statement_and_operations_for_alt/2005_default_handling/200503_the_deactivate_operation/NegSem_200503_the_deactivate_operation_002.ttcn b/ATS/core_language/20_statement_and_operations_for_alt/2005_default_handling/200503_the_deactivate_operation/NegSem_200503_the_deactivate_operation_002.ttcn new file mode 100644 index 00000000..6383993b --- /dev/null +++ b/ATS/core_language/20_statement_and_operations_for_alt/2005_default_handling/200503_the_deactivate_operation/NegSem_200503_the_deactivate_operation_002.ttcn @@ -0,0 +1,47 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:20.5.1, verify that deactivate uninitialized default causes error + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Calling a deactivate operation with an uninitialized default reference variable +// shall cause a runtime error. + +module NegSem_200503_the_deactivate_operation_002 { + + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + altstep a1() runs on GeneralComp { + [] p.receive(integer:?) { + setverdict(pass); + } + } + + + testcase TC_NegSem_200503_the_deactivate_operation_002() runs on GeneralComp { + var default v_default; + var boolean v_flag := false; + if (v_flag) { + v_default := activate(a1()); + } + p.send(integer:1); + deactivate(v_default); // uninitialized -> runtime error + alt { + [] p.receive(integer:0) { // not expected: leads to default invocation + setverdict(fail); + } + } + } + + control{ + execute(TC_NegSem_200503_the_deactivate_operation_002(), 1.0); + } +} diff --git a/ATS/core_language/20_statement_and_operations_for_alt/2005_default_handling/200503_the_deactivate_operation/NegSem_200503_the_deactivate_operation_003.ttcn b/ATS/core_language/20_statement_and_operations_for_alt/2005_default_handling/200503_the_deactivate_operation/NegSem_200503_the_deactivate_operation_003.ttcn new file mode 100644 index 00000000..f78d5905 --- /dev/null +++ b/ATS/core_language/20_statement_and_operations_for_alt/2005_default_handling/200503_the_deactivate_operation/NegSem_200503_the_deactivate_operation_003.ttcn @@ -0,0 +1,41 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:20.5.1, verify that error is generated when deactivated reference is on incorrect type + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// A deactivate operation will remove the referenced default from the list of defaults. + +module NegSem_200503_the_deactivate_operation_003 { + + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + altstep a1() runs on GeneralComp { + [] p.receive(integer:?) { + setverdict(pass); + } + } + + testcase TC_NegSem_200503_the_deactivate_operation_003() runs on GeneralComp { + var GeneralComp v_ptc := null; + p.send(integer:1); + deactivate(v_ptc); // incorrect type -> error + alt { + [] p.receive(integer:0) { // not expected: leads to default invocation + setverdict(fail); + } + } + } + + control{ + execute(TC_NegSem_200503_the_deactivate_operation_003()); + } +} diff --git a/ATS/core_language/20_statement_and_operations_for_alt/2005_default_handling/200503_the_deactivate_operation/Sem_200503_the_deactivate_operation_001.ttcn b/ATS/core_language/20_statement_and_operations_for_alt/2005_default_handling/200503_the_deactivate_operation/Sem_200503_the_deactivate_operation_001.ttcn new file mode 100644 index 00000000..d7a3b1dd --- /dev/null +++ b/ATS/core_language/20_statement_and_operations_for_alt/2005_default_handling/200503_the_deactivate_operation/Sem_200503_the_deactivate_operation_001.ttcn @@ -0,0 +1,49 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:20.5.1, verify that deactivate removes default from list of defaults + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// A deactivate operation will remove the referenced default from the list of defaults. + +module Sem_200503_the_deactivate_operation_001 { + + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + altstep a1() runs on GeneralComp { + [] p.receive(integer:?) { + setverdict(pass); + } + } + + altstep a2() runs on GeneralComp { + [] p.receive(integer:?) { + setverdict(fail, "Deactivated"); // should be deactivated at the time of default processing + } + } + + testcase TC_Sem_200503_the_deactivate_operation_001() runs on GeneralComp { + var default v_default; + activate(a1()); + v_default := activate(a2()); + p.send(integer:1); + deactivate(v_default); + alt { + [] p.receive(integer:0) { // not expected: leads to default invocation + setverdict(fail); + } + } + } + + control{ + execute(TC_Sem_200503_the_deactivate_operation_001()); + } +} diff --git a/ATS/core_language/20_statement_and_operations_for_alt/2005_default_handling/200503_the_deactivate_operation/Sem_200503_the_deactivate_operation_002.ttcn b/ATS/core_language/20_statement_and_operations_for_alt/2005_default_handling/200503_the_deactivate_operation/Sem_200503_the_deactivate_operation_002.ttcn new file mode 100644 index 00000000..3f552f37 --- /dev/null +++ b/ATS/core_language/20_statement_and_operations_for_alt/2005_default_handling/200503_the_deactivate_operation/Sem_200503_the_deactivate_operation_002.ttcn @@ -0,0 +1,57 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:20.5.1, verify that deactivate removes default from list of defaults + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// A deactivate operation will remove the referenced default from the list of defaults. + +// Note: +// The test verifies syntactical variant with a function instance passed as a parameter +// to the deactivate operation. + +module Sem_200503_the_deactivate_operation_002 { + + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + altstep a1() runs on GeneralComp { + [] p.receive(integer:?) { + setverdict(pass); + } + } + + altstep a2() runs on GeneralComp { + [] p.receive(integer:?) { + setverdict(fail, "Deactivated"); // should be deactivated at the time of default processing + } + } + + function f(default p_default) return default { + return p_default; + } + + testcase TC_Sem_200503_the_deactivate_operation_002() runs on GeneralComp { + var default v_default; + activate(a1()); + v_default := activate(a2()); + p.send(integer:1); + deactivate(f(v_default)); + alt { + [] p.receive(integer:0) { // not expected: leads to default invocation + setverdict(fail); + } + } + } + + control{ + execute(TC_Sem_200503_the_deactivate_operation_002()); + } +} diff --git a/ATS/core_language/20_statement_and_operations_for_alt/2005_default_handling/200503_the_deactivate_operation/Sem_200503_the_deactivate_operation_003.ttcn b/ATS/core_language/20_statement_and_operations_for_alt/2005_default_handling/200503_the_deactivate_operation/Sem_200503_the_deactivate_operation_003.ttcn new file mode 100644 index 00000000..9b0bd724 --- /dev/null +++ b/ATS/core_language/20_statement_and_operations_for_alt/2005_default_handling/200503_the_deactivate_operation/Sem_200503_the_deactivate_operation_003.ttcn @@ -0,0 +1,53 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:20.5.1, verify that deactivate without parameter clear list of defaults + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// A deactivate operation without parameter deactivates all defaults of a test component. + +module Sem_200503_the_deactivate_operation_003 { + + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + altstep a1() runs on GeneralComp { + [] p.receive(integer:1) { + setverdict(fail, "Deactivated"); // should be deactivated at the time of default processing + } + } + + altstep a2() runs on GeneralComp { + [] p.receive(integer:?) { + setverdict(fail, "Deactivated"); // should be deactivated at the time of default processing + } + } + + testcase TC_Sem_200503_the_deactivate_operation_003() runs on GeneralComp { + timer t := 0.5; + t.start; + activate(a1()); + activate(a2()); + p.send(integer:1); + deactivate; + alt { + [] p.receive(integer:0) { // not expected: leads to default invocation + setverdict(fail); + } + [] t.timeout { // timer should provide enough time to take at least one snapshot + setverdict(pass); + } + } + } + + control{ + execute(TC_Sem_200503_the_deactivate_operation_003()); + } +} diff --git a/ATS/core_language/20_statement_and_operations_for_alt/2005_default_handling/200503_the_deactivate_operation/Sem_200503_the_deactivate_operation_004.ttcn b/ATS/core_language/20_statement_and_operations_for_alt/2005_default_handling/200503_the_deactivate_operation/Sem_200503_the_deactivate_operation_004.ttcn new file mode 100644 index 00000000..ac857c77 --- /dev/null +++ b/ATS/core_language/20_statement_and_operations_for_alt/2005_default_handling/200503_the_deactivate_operation/Sem_200503_the_deactivate_operation_004.ttcn @@ -0,0 +1,42 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:20.5.1, verify that deactivate null works correctly + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Calling a deactivate operation with the special value null has no effect. + +module Sem_200503_the_deactivate_operation_004 { + + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + altstep a1() runs on GeneralComp { + [] p.receive(integer:?) { + setverdict(pass); + } + } + + testcase TC_Sem_200503_the_deactivate_operation_004() runs on GeneralComp { + var default v_default := null; + activate(a1()); + p.send(integer:1); + deactivate(v_default); // v_default is null: there should be no error and no deactivation + alt { + [] p.receive(integer:0) { // not expected: leads to default invocation + setverdict(fail); + } + } + } + + control{ + execute(TC_Sem_200503_the_deactivate_operation_004()); + } +} diff --git a/ATS/core_language/20_statement_and_operations_for_alt/20_toplevel/Syn_20_TopLevel_001.ttcn b/ATS/core_language/20_statement_and_operations_for_alt/20_toplevel/Syn_20_TopLevel_001.ttcn new file mode 100644 index 00000000..71e8b7d1 --- /dev/null +++ b/ATS/core_language/20_statement_and_operations_for_alt/20_toplevel/Syn_20_TopLevel_001.ttcn @@ -0,0 +1,36 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:20, Ensure that alt-statements are accepted. + ** @verdict pass accept, noexecution + *****************************************************************/ + +module Syn_20_TopLevel_001 { + +type port MyPort message { + inout charstring +} + +type component GeneralComp { + port MyPort p; +} + +template charstring m_test := "ping"; + +testcase TC_Syn_20_TopLevel_001() runs on GeneralComp { + var boolean guard := false; + p.send(m_test); + alt { + [] p.receive(m_test) { + setverdict(pass); + } + [guard == true] p.receive(m_test) { + setverdict(fail); + } + [else] { + setverdict(fail); + } + } +} + +} \ No newline at end of file diff --git a/ATS/core_language/20_statement_and_operations_for_alt/20_toplevel/Syn_20_TopLevel_002.ttcn b/ATS/core_language/20_statement_and_operations_for_alt/20_toplevel/Syn_20_TopLevel_002.ttcn new file mode 100644 index 00000000..257113bf --- /dev/null +++ b/ATS/core_language/20_statement_and_operations_for_alt/20_toplevel/Syn_20_TopLevel_002.ttcn @@ -0,0 +1,34 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:20, Ensure that repeat in an alt-statement is accepted. + ** @verdict pass accept, noexecution + *****************************************************************/ + +module Syn_20_TopLevel_002 { + +type port MyPort message { + inout charstring +} + +type component GeneralComp { + port MyPort p; +} + +template charstring m_test := "ping"; + +testcase TC_Syn_20_TopLevel_002() runs on GeneralComp { + var integer counter := 1; + p.send(m_test); + alt { + [counter == 1] p.receive(m_test) { + counter := counter + 1; + repeat; + } + [else] { + setverdict(pass); + } + } +} + +} \ No newline at end of file diff --git a/ATS/core_language/20_statement_and_operations_for_alt/20_toplevel/Syn_20_TopLevel_003.ttcn b/ATS/core_language/20_statement_and_operations_for_alt/20_toplevel/Syn_20_TopLevel_003.ttcn new file mode 100644 index 00000000..58027294 --- /dev/null +++ b/ATS/core_language/20_statement_and_operations_for_alt/20_toplevel/Syn_20_TopLevel_003.ttcn @@ -0,0 +1,33 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:20, Ensure that the interleave-statement is accepted. + ** @verdict pass accept, noexecution + *****************************************************************/ + +module Syn_20_TopLevel_003 { + +type port MyPort message { + inout charstring +} + +type component GeneralComp { + port MyPort p; +} + +template charstring m_testOne := "ping1"; +template charstring m_testTwo := "ping2"; + +testcase TC_Syn_20_TopLevel_003() runs on GeneralComp { + p.send(m_testOne); + p.send(m_testTwo); + interleave { + [] p.receive(m_testOne) { + } + [] p.receive(m_testTwo) { + } + } + setverdict(pass); +} + +} \ No newline at end of file diff --git a/ATS/core_language/20_statement_and_operations_for_alt/20_toplevel/Syn_20_TopLevel_004.ttcn b/ATS/core_language/20_statement_and_operations_for_alt/20_toplevel/Syn_20_TopLevel_004.ttcn new file mode 100644 index 00000000..91218ec3 --- /dev/null +++ b/ATS/core_language/20_statement_and_operations_for_alt/20_toplevel/Syn_20_TopLevel_004.ttcn @@ -0,0 +1,36 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:20, Ensure that defaults and the activate statement is accepted. + ** @verdict pass accept, noexecution + *****************************************************************/ + +module Syn_20_TopLevel_004 { + +type port MyPort message { + inout charstring +} + +type component GeneralComp { + port MyPort p; +} + +template charstring m_testOne := "ping1"; +template charstring m_testTwo := "ping2"; + +altstep a_catchError() runs on GeneralComp { + [] any port.receive { + } +} + +testcase TC_Syn_20_TopLevel_004() runs on GeneralComp { + var default v_errorDefault := activate(a_catchError()); + p.send(m_testOne); + alt { + [] p.receive(m_testOne) { + } + } + setverdict(pass); +} + +} \ No newline at end of file diff --git a/ATS/core_language/20_statement_and_operations_for_alt/20_toplevel/Syn_20_TopLevel_005.ttcn b/ATS/core_language/20_statement_and_operations_for_alt/20_toplevel/Syn_20_TopLevel_005.ttcn new file mode 100644 index 00000000..7f0341eb --- /dev/null +++ b/ATS/core_language/20_statement_and_operations_for_alt/20_toplevel/Syn_20_TopLevel_005.ttcn @@ -0,0 +1,37 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:20, Ensure that defaults and the activate statement is accepted. + ** @verdict pass accept, noexecution + *****************************************************************/ + +module Syn_20_TopLevel_005 { + +type port MyPort message { + inout charstring +} + +type component GeneralComp { + port MyPort p; +} + +template charstring m_testOne := "ping1"; +template charstring m_testTwo := "ping2"; + +altstep a_catchError() runs on GeneralComp { + [] any port.receive { + } +} + +testcase TC_Syn_20_TopLevel_005() runs on GeneralComp { + var default v_errorDefault := activate(a_catchError()); + p.send(m_testOne); + alt { + [] p.receive(m_testOne) { + } + } + deactivate(v_errorDefault); + setverdict(pass); +} + +} \ No newline at end of file diff --git a/ATS/core_language/21_configuration_operations/2101_connection_operations/210101_connect_and_map_operations/NOTES b/ATS/core_language/21_configuration_operations/2101_connection_operations/210101_connect_and_map_operations/NOTES new file mode 100644 index 00000000..f49c96ae --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2101_connection_operations/210101_connect_and_map_operations/NOTES @@ -0,0 +1 @@ +More connect and map test are given in section 9.1 \ No newline at end of file diff --git a/ATS/core_language/21_configuration_operations/2101_connection_operations/210101_connect_and_map_operations/NegSem_210101_connect_and_map_operations_001.ttcn b/ATS/core_language/21_configuration_operations/2101_connection_operations/210101_connect_and_map_operations/NegSem_210101_connect_and_map_operations_001.ttcn new file mode 100644 index 00000000..484693f8 --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2101_connection_operations/210101_connect_and_map_operations/NegSem_210101_connect_and_map_operations_001.ttcn @@ -0,0 +1,58 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:21.1.1, Verify that connect operation rejects ports with incompatible message type lists + ** @verdict pass reject + ***************************************************/ + +// The following requirements are tested: +// For the connect operations, only consistent connections are allowed. +// a) Assuming the following: +// 1) ports PORT1 and PORT2 are the ports to be connected; +// 2) inlist-PORT1 defines the messages or procedures of the in-direction of PORT1; +// 3) outlist-PORT1defines the messages or procedures of the out-direction of PORT1; +// 4) inlist-PORT2 defines the messages or procedures of the in-direction of PORT2; and +// 5) outlist-PORT2 defines the messages or procedures of the out-direction of PORT2. +// b) The connect operation is allowed if and only if: +// outlist-PORT1 ⊆ inlist-PORT2 and outlist-PORT2 ⊆ inlist-PORT1. +// +// In this test, inlists and outlists are completely incompatible + +module NegSem_210101_connect_and_map_operations_001 { + type record R { + integer field1, + charstring field2 + } + + type port P1 message { + inout integer; + in R; + } + + type port P2 message { + out bitstring; + in boolean; + } + + type component GeneralComp { + } + + type component C1 { + port P1 p; + } + + type component C2 { + port P2 p; + } + + testcase TC_NegSem_210101_connect_and_map_operations_001() runs on GeneralComp system GeneralComp { + var C1 v_ptc1 := C1.create; + var C2 v_ptc2 := C2.create; + connect(v_ptc1:p, v_ptc2:p); // incompatible message types: error expected + setverdict(pass); + } + + control{ + execute(TC_NegSem_210101_connect_and_map_operations_001()); + } +} diff --git a/ATS/core_language/21_configuration_operations/2101_connection_operations/210101_connect_and_map_operations/NegSem_210101_connect_and_map_operations_002.ttcn b/ATS/core_language/21_configuration_operations/2101_connection_operations/210101_connect_and_map_operations/NegSem_210101_connect_and_map_operations_002.ttcn new file mode 100644 index 00000000..3a9dd4da --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2101_connection_operations/210101_connect_and_map_operations/NegSem_210101_connect_and_map_operations_002.ttcn @@ -0,0 +1,65 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:21.1.1, Verify that connect operation rejects ports with only partially compatible message type lists + ** @verdict pass reject + ***************************************************/ + +// The following requirements are tested: +// For the connect operations, only consistent connections are allowed. +// a) Assuming the following: +// 1) ports PORT1 and PORT2 are the ports to be connected; +// 2) inlist-PORT1 defines the messages or procedures of the in-direction of PORT1; +// 3) outlist-PORT1defines the messages or procedures of the out-direction of PORT1; +// 4) inlist-PORT2 defines the messages or procedures of the in-direction of PORT2; and +// 5) outlist-PORT2 defines the messages or procedures of the out-direction of PORT2. +// b) The connect operation is allowed if and only if: +// outlist-PORT1 ⊆ inlist-PORT2 and outlist-PORT2 ⊆ inlist-PORT1. +// +// In this test, one pair in outlist-PORT1 and inlist-PORT2 is incompatible (using +// strong typing rules) + +module NegSem_210101_connect_and_map_operations_002 { + type record R { + integer field1, + charstring field2 + } + + type record R2 { + integer field1, + charstring field2 + } + + type port P1 message { + inout integer; + out R; + } + + type port P2 message { + in R2, integer; + out integer; + } + + type component GeneralComp { + } + + type component C1 { + port P1 p; + } + + type component C2 { + port P2 p; + } + + testcase TC_NegSem_210101_connect_and_map_operations_002() runs on GeneralComp system GeneralComp { + var C1 v_ptc1 := C1.create; + var C2 v_ptc2 := C2.create; + // R2 and R are compatible types, but strong typing is required in case of connection operation + connect(v_ptc1:p, v_ptc2:p); // incompatible message types: error expected + setverdict(pass); + } + + control{ + execute(TC_NegSem_210101_connect_and_map_operations_002()); + } +} diff --git a/ATS/core_language/21_configuration_operations/2101_connection_operations/210101_connect_and_map_operations/NegSem_210101_connect_and_map_operations_003.ttcn b/ATS/core_language/21_configuration_operations/2101_connection_operations/210101_connect_and_map_operations/NegSem_210101_connect_and_map_operations_003.ttcn new file mode 100644 index 00000000..2481f7b9 --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2101_connection_operations/210101_connect_and_map_operations/NegSem_210101_connect_and_map_operations_003.ttcn @@ -0,0 +1,54 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:21.1.1, Verify that map operation rejects ports with incompatible message type lists + ** @verdict pass reject + ***************************************************/ + +// The following requirements are tested: +// For the connect operations, only consistent connections are allowed. +// a) Assuming the following: +// 1) ports PORT1 and PORT2 are the ports to be connected; +// 2) inlist-PORT1 defines the messages or procedures of the in-direction of PORT1; +// 3) outlist-PORT1defines the messages or procedures of the out-direction of PORT1; +// 4) inlist-PORT2 defines the messages or procedures of the in-direction of PORT2; and +// 5) outlist-PORT2 defines the messages or procedures of the out-direction of PORT2. +// c) The map operation (assuming PORT2 is the test system interface port) is allowed if +// and only if: +// outlist-PORT1 ⊆ outlist-PORT2 and inlist-PORT2 ⊆ inlist-PORT1. +// +// In this test, inlists and outlists are completely incompatible + +module NegSem_210101_connect_and_map_operations_003 { + type record R { + integer field1, + charstring field2 + } + + type port P1 message { + inout integer; + out R; + } + + type port P2 message { + out boolean; + in bitstring; + } + + type component GeneralComp { + port P1 p + } + + type component SystemComp { + port P2 p; + } + + testcase TC_NegSem_210101_connect_and_map_operations_003() runs on GeneralComp system SystemComp { + map(system:p, self:p); // incompatible message types: error expected + setverdict(pass); + } + + control{ + execute(TC_NegSem_210101_connect_and_map_operations_003()); + } +} diff --git a/ATS/core_language/21_configuration_operations/2101_connection_operations/210101_connect_and_map_operations/NegSem_210101_connect_and_map_operations_004.ttcn b/ATS/core_language/21_configuration_operations/2101_connection_operations/210101_connect_and_map_operations/NegSem_210101_connect_and_map_operations_004.ttcn new file mode 100644 index 00000000..2ecd7452 --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2101_connection_operations/210101_connect_and_map_operations/NegSem_210101_connect_and_map_operations_004.ttcn @@ -0,0 +1,61 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:21.1.1, Verify that connect operation rejects ports with only partially compatible message type lists + ** @verdict pass reject + ***************************************************/ + +// The following requirements are tested: +// For the connect operations, only consistent connections are allowed. +// a) Assuming the following: +// 1) ports PORT1 and PORT2 are the ports to be connected; +// 2) inlist-PORT1 defines the messages or procedures of the in-direction of PORT1; +// 3) outlist-PORT1defines the messages or procedures of the out-direction of PORT1; +// 4) inlist-PORT2 defines the messages or procedures of the in-direction of PORT2; and +// 5) outlist-PORT2 defines the messages or procedures of the out-direction of PORT2. +// c) The map operation (assuming PORT2 is the test system interface port) is allowed if +// and only if: +// outlist-PORT1 ⊆ outlist-PORT2 and inlist-PORT2 ⊆ inlist-PORT1. +// +// In this test, one pair in outlist-PORT1 and inlist-PORT2 is incompatible (using +// strong typing rules) + +module NegSem_210101_connect_and_map_operations_004 { + type record R { + integer field1, + charstring field2 + } + + type record R2 { + integer field1, + charstring field2 + } + + type port P1 message { + in integer; + inout R; + } + + type port P2 message { + in integer, R; + out R2; + } + + type component GeneralComp { + port P1 p + } + + type component SystemComp { + port P2 p; + } + + testcase TC_NegSem_210101_connect_and_map_operations_004() runs on GeneralComp system SystemComp { + // R2 and R are compatible types, but strong typing is required in case of connection operation + map(system:p, self:p); // incompatible message types: error expected + setverdict(pass); + } + + control{ + execute(TC_NegSem_210101_connect_and_map_operations_004()); + } +} diff --git a/ATS/core_language/21_configuration_operations/2101_connection_operations/210101_connect_and_map_operations/NegSem_210101_connect_and_map_operations_005.ttcn b/ATS/core_language/21_configuration_operations/2101_connection_operations/210101_connect_and_map_operations/NegSem_210101_connect_and_map_operations_005.ttcn new file mode 100644 index 00000000..83bc4b29 --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2101_connection_operations/210101_connect_and_map_operations/NegSem_210101_connect_and_map_operations_005.ttcn @@ -0,0 +1,31 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:21.1.1, Verify that map parameters cannot be used when not declared in the port type + ** @verdict pass reject + ***************************************************/ + +// The following requirements are tested: +// Restriction g: +// If in a map operation a param clause is present, the actual parameters shall conform +// to the map param clause of the port type declaration of the system port used. + +module NegSem_210101_connect_and_map_operations_005 { + + type port P message { + inout integer; + } + + type component GeneralComp { + port P p + } + + testcase TC_NegSem_210101_connect_and_map_operations_005() runs on GeneralComp system GeneralComp { + map(system:p, self:p) param(5); + setverdict(pass); + } + + control{ + execute(TC_NegSem_210101_connect_and_map_operations_005()); + } +} diff --git a/ATS/core_language/21_configuration_operations/2101_connection_operations/210101_connect_and_map_operations/NegSem_210101_connect_and_map_operations_006.ttcn b/ATS/core_language/21_configuration_operations/2101_connection_operations/210101_connect_and_map_operations/NegSem_210101_connect_and_map_operations_006.ttcn new file mode 100644 index 00000000..9476d376 --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2101_connection_operations/210101_connect_and_map_operations/NegSem_210101_connect_and_map_operations_006.ttcn @@ -0,0 +1,32 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:21.1.1, Verify that type incompatibility in map parameters is detected + ** @verdict pass reject + ***************************************************/ + +// The following requirements are tested: +// Restriction g: +// If in a map operation a param clause is present, the actual parameters shall conform +// to the map param clause of the port type declaration of the system port used. + +module NegSem_210101_connect_and_map_operations_006 { + + type port P message { + inout integer; + map param (integer p_par1); + } + + type component GeneralComp { + port P p + } + + testcase TC_NegSem_210101_connect_and_map_operations_006() runs on GeneralComp system GeneralComp { + map(system:p, self:p) param("5"); + setverdict(pass); + } + + control{ + execute(TC_NegSem_210101_connect_and_map_operations_006()); + } +} diff --git a/ATS/core_language/21_configuration_operations/2101_connection_operations/210101_connect_and_map_operations/NegSem_210101_connect_and_map_operations_007.ttcn b/ATS/core_language/21_configuration_operations/2101_connection_operations/210101_connect_and_map_operations/NegSem_210101_connect_and_map_operations_007.ttcn new file mode 100644 index 00000000..a82f2b10 --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2101_connection_operations/210101_connect_and_map_operations/NegSem_210101_connect_and_map_operations_007.ttcn @@ -0,0 +1,32 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:21.1.1, Verify that parameter count mismatch in map param clause is detected + ** @verdict pass reject + ***************************************************/ + +// The following requirements are tested: +// Restriction g: +// If in a map operation a param clause is present, the actual parameters shall conform +// to the map param clause of the port type declaration of the system port used. + +module NegSem_210101_connect_and_map_operations_007 { + + type port P message { + inout integer; + map param (integer p_par1); + } + + type component GeneralComp { + port P p + } + + testcase TC_NegSem_210101_connect_and_map_operations_007() runs on GeneralComp system GeneralComp { + map(system:p, self:p) param(5, 3); + setverdict(pass); + } + + control{ + execute(TC_NegSem_210101_connect_and_map_operations_007()); + } +} diff --git a/ATS/core_language/21_configuration_operations/2101_connection_operations/210101_connect_and_map_operations/NegSem_210101_connect_and_map_operations_008.ttcn b/ATS/core_language/21_configuration_operations/2101_connection_operations/210101_connect_and_map_operations/NegSem_210101_connect_and_map_operations_008.ttcn new file mode 100644 index 00000000..d8b6c571 --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2101_connection_operations/210101_connect_and_map_operations/NegSem_210101_connect_and_map_operations_008.ttcn @@ -0,0 +1,42 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:21.1.1, violation of strong typing rules for local ports in connect operations + ** @verdict pass reject + ***************************************************/ + +// The following requirements are tested: +// If the type of the component referenced in a connection operation is known (either +// when the component reference is a variable or value returned from a function or the +// type is defined in the runs on, mtc or system clause of the calling function), the +// referenced port declaration shall be present in this component type. + +module NegSem_210101_connect_and_map_operations_008 { + + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + type component GeneralCompEx extends GeneralComp { + port P p2; + } + + function f_connect() runs on GeneralComp { + connect(self:p, self:p2); // although the actual instance of self contains the p2 port, + // it cannot be referenced as the "runs on" clause contains the GeneralComp type and + // not GeneralCompEx + } + + testcase TC_NegSem_210101_connect_and_map_operations_008() runs on GeneralCompEx system GeneralComp { + f_connect(); + setverdict(pass); + } + + control{ + execute(TC_NegSem_210101_connect_and_map_operations_008()); + } +} diff --git a/ATS/core_language/21_configuration_operations/2101_connection_operations/210101_connect_and_map_operations/NegSem_210101_connect_and_map_operations_009.ttcn b/ATS/core_language/21_configuration_operations/2101_connection_operations/210101_connect_and_map_operations/NegSem_210101_connect_and_map_operations_009.ttcn new file mode 100644 index 00000000..32ed46be --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2101_connection_operations/210101_connect_and_map_operations/NegSem_210101_connect_and_map_operations_009.ttcn @@ -0,0 +1,42 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:21.1.1, violation of strong typing rules for MTC ports in connect operations + ** @verdict pass reject + ***************************************************/ + +// The following requirements are tested: +// If the type of the component referenced in a connection operation is known (either +// when the component reference is a variable or value returned from a function or the +// type is defined in the runs on, mtc or system clause of the calling function), the +// referenced port declaration shall be present in this component type. + +module NegSem_210101_connect_and_map_operations_009 { + + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + type component GeneralCompEx extends GeneralComp { + port P p2; + } + + function f_connect() runs on GeneralCompEx mtc GeneralComp { + connect(mtc:p2, self:p); // although the actual instance of MTC contains the p2 port, + // it cannot be referenced as the mtc clause of the f_connect function contains + // the GeneralComp type and not GeneralCompEx + } + + testcase TC_NegSem_210101_connect_and_map_operations_009() runs on GeneralCompEx system GeneralComp { + f_connect(); + setverdict(pass); + } + + control{ + execute(TC_NegSem_210101_connect_and_map_operations_009()); + } +} diff --git a/ATS/core_language/21_configuration_operations/2101_connection_operations/210101_connect_and_map_operations/NegSem_210101_connect_and_map_operations_010.ttcn b/ATS/core_language/21_configuration_operations/2101_connection_operations/210101_connect_and_map_operations/NegSem_210101_connect_and_map_operations_010.ttcn new file mode 100644 index 00000000..db4e97f6 --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2101_connection_operations/210101_connect_and_map_operations/NegSem_210101_connect_and_map_operations_010.ttcn @@ -0,0 +1,39 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:21.1.1, violation of strong typing rules for PTC ports in connect operations + ** @verdict pass reject + ***************************************************/ + +// The following requirements are tested: +// If the type of the component referenced in a connection operation is known (either +// when the component reference is a variable or value returned from a function or the +// type is defined in the runs on, mtc or system clause of the calling function), the +// referenced port declaration shall be present in this component type. + +module NegSem_210101_connect_and_map_operations_010 { + + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + type component GeneralCompEx extends GeneralComp { + port P p2; + } + + testcase TC_NegSem_210101_connect_and_map_operations_010() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralCompEx.create; + connect(self:p, v_ptc:p2); // although the actual PTC instance contains the p2 port, + // it cannot be referenced as the variable v_ptc is of the GeneralComp type and + // not GeneralCompEx + setverdict(pass); + } + + control{ + execute(TC_NegSem_210101_connect_and_map_operations_010()); + } +} diff --git a/ATS/core_language/21_configuration_operations/2101_connection_operations/210101_connect_and_map_operations/NegSem_210101_connect_and_map_operations_011.ttcn b/ATS/core_language/21_configuration_operations/2101_connection_operations/210101_connect_and_map_operations/NegSem_210101_connect_and_map_operations_011.ttcn new file mode 100644 index 00000000..f273a5b8 --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2101_connection_operations/210101_connect_and_map_operations/NegSem_210101_connect_and_map_operations_011.ttcn @@ -0,0 +1,42 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:21.1.1, violation of strong typing rules for local ports in map operations + ** @verdict pass reject + ***************************************************/ + +// The following requirements are tested: +// If the type of the component referenced in a connection operation is known (either +// when the component reference is a variable or value returned from a function or the +// type is defined in the runs on, mtc or system clause of the calling function), the +// referenced port declaration shall be present in this component type. + +module NegSem_210101_connect_and_map_operations_011 { + + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + type component GeneralCompEx extends GeneralComp { + port P p2; + } + + function f_map() runs on GeneralComp system GeneralComp { + map(system:p, self:p2); // although the actual instance of self contains the p2 port, + // it cannot be referenced as the "runs on" clause contains the GeneralComp type and + // not GeneralCompEx + } + + testcase TC_NegSem_210101_connect_and_map_operations_011() runs on GeneralCompEx system GeneralComp { + f_map(); + setverdict(pass); + } + + control{ + execute(TC_NegSem_210101_connect_and_map_operations_011()); + } +} diff --git a/ATS/core_language/21_configuration_operations/2101_connection_operations/210101_connect_and_map_operations/NegSem_210101_connect_and_map_operations_012.ttcn b/ATS/core_language/21_configuration_operations/2101_connection_operations/210101_connect_and_map_operations/NegSem_210101_connect_and_map_operations_012.ttcn new file mode 100644 index 00000000..945ed584 --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2101_connection_operations/210101_connect_and_map_operations/NegSem_210101_connect_and_map_operations_012.ttcn @@ -0,0 +1,42 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:21.1.1, violation of strong typing rules for MTC ports in map operations + ** @verdict pass reject + ***************************************************/ + +// The following requirements are tested: +// If the type of the component referenced in a connection operation is known (either +// when the component reference is a variable or value returned from a function or the +// type is defined in the runs on, mtc or system clause of the calling function), the +// referenced port declaration shall be present in this component type. + +module NegSem_210101_connect_and_map_operations_012 { + + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + type component GeneralCompEx extends GeneralComp { + port P p2; + } + + function f_map() runs on GeneralCompEx mtc GeneralComp system GeneralComp { + map(mtc:p2, system:p); // although the actual instance of MTC contains the p2 port, + // it cannot be referenced as the mtc clause of the f_connect function contains + // the GeneralComp type and not GeneralCompEx + } + + testcase TC_NegSem_210101_connect_and_map_operations_012() runs on GeneralCompEx system GeneralComp { + f_map(); + setverdict(pass); + } + + control{ + execute(TC_NegSem_210101_connect_and_map_operations_012()); + } +} diff --git a/ATS/core_language/21_configuration_operations/2101_connection_operations/210101_connect_and_map_operations/NegSem_210101_connect_and_map_operations_013.ttcn b/ATS/core_language/21_configuration_operations/2101_connection_operations/210101_connect_and_map_operations/NegSem_210101_connect_and_map_operations_013.ttcn new file mode 100644 index 00000000..0df7183b --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2101_connection_operations/210101_connect_and_map_operations/NegSem_210101_connect_and_map_operations_013.ttcn @@ -0,0 +1,40 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:21.1.1, violation of strong typing rules for PTC ports in map operations + ** @verdict pass reject + ***************************************************/ + +// The following requirements are tested: +// If the type of the component referenced in a connection operation is known (either +// when the component reference is a variable or value returned from a function or the +// type is defined in the runs on, mtc or system clause of the calling function), the +// referenced port declaration shall be present in this component type. + +module NegSem_210101_connect_and_map_operations_013 { + + type port P message { + inout integer; + map param (integer p_par1); + } + + type component GeneralComp { + port P p; + } + + type component GeneralCompEx extends GeneralComp { + port P p2; + } + + testcase TC_NegSem_210101_connect_and_map_operations_013() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralCompEx.create; + map(system:p, v_ptc:p2); // although the actual PTC instance contains the p2 port, + // it cannot be referenced as the variable v_ptc is of the GeneralComp type and + // not GeneralCompEx + setverdict(pass); + } + + control{ + execute(TC_NegSem_210101_connect_and_map_operations_013()); + } +} diff --git a/ATS/core_language/21_configuration_operations/2101_connection_operations/210101_connect_and_map_operations/NegSem_210101_connect_and_map_operations_014.ttcn b/ATS/core_language/21_configuration_operations/2101_connection_operations/210101_connect_and_map_operations/NegSem_210101_connect_and_map_operations_014.ttcn new file mode 100644 index 00000000..ac0c444a --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2101_connection_operations/210101_connect_and_map_operations/NegSem_210101_connect_and_map_operations_014.ttcn @@ -0,0 +1,42 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:21.1.1, violation of strong typing rules for system ports in map operations + ** @verdict pass reject + ***************************************************/ + +// The following requirements are tested: +// If the type of the component referenced in a connection operation is known (either +// when the component reference is a variable or value returned from a function or the +// type is defined in the runs on, mtc or system clause of the calling function), the +// referenced port declaration shall be present in this component type. + +module NegSem_210101_connect_and_map_operations_014 { + + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + type component GeneralCompEx extends GeneralComp { + port P p2; + } + + function f_map() runs on GeneralComp system GeneralComp { + map(self:p, system:p2); // although the actual instance of TSI contains the p2 port, + // it cannot be referenced as the system clause of the f_map function contains + // the GeneralComp type and not GeneralCompEx + } + + testcase TC_NegSem_210101_connect_and_map_operations_014() runs on GeneralComp system GeneralCompEx { + f_map(); + setverdict(pass); + } + + control{ + execute(TC_NegSem_210101_connect_and_map_operations_014()); + } +} diff --git a/ATS/core_language/21_configuration_operations/2101_connection_operations/210101_connect_and_map_operations/NegSem_210101_connect_operation_001.ttcn b/ATS/core_language/21_configuration_operations/2101_connection_operations/210101_connect_and_map_operations/NegSem_210101_connect_operation_001.ttcn new file mode 100644 index 00000000..32371298 --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2101_connection_operations/210101_connect_and_map_operations/NegSem_210101_connect_operation_001.ttcn @@ -0,0 +1,33 @@ +/*************************************************** + ** @author STF 451 + ** @version 0.0.1 + ** @purpose 1:21.1.1, Ensure that the the IUT does not allows two output port connection + ** @verdict pass reject + ***************************************************/ +//Test the two output port cannot connect +module NegSem_210101_connect_operation_001{ + + type port myport message { + out integer + } + + +type component Mysystem + { + port myport messagePort; + } + +testcase TC_NegSem_210101_connect_operation_001() runs on Mysystem system Mysystem { + var Mysystem MyCompA; + var Mysystem MyCompB; + +MyCompA:=Mysystem.create; +MyCompB:=Mysystem.create; +connect(MyCompA:messagePort,MyCompB:messagePort); //not allowed messageports are output + +} +control{ + execute(TC_NegSem_210101_connect_operation_001()); +} +} + diff --git a/ATS/core_language/21_configuration_operations/2101_connection_operations/210101_connect_and_map_operations/NegSem_210101_map_operation_002.ttcn b/ATS/core_language/21_configuration_operations/2101_connection_operations/210101_connect_and_map_operations/NegSem_210101_map_operation_002.ttcn new file mode 100644 index 00000000..ba90504a --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2101_connection_operations/210101_connect_and_map_operations/NegSem_210101_map_operation_002.ttcn @@ -0,0 +1,37 @@ +/*************************************************** + ** @author STF 451 (updated by STF 521) + ** @version 0.0.2 + ** @purpose 1:21.1.1, Ensure that IUT cannot map input port with output port + ** @verdict pass reject + ***************************************************/ + +// Mycompport A P1 is output port mapped to SUT in port +module NegSem_210101_map_operation_002{ + + type port loopbackPort message { + inout integer + } +type port IntegerOutputPortType message { + out integer + } + +type component GeneralComp + { + + port IntegerOutputPortType MycomportA + } + +type component MyTestSystemInterface + { + port loopbackPort messagePort + } +// MyTestSystemInterface is the test system interface +testcase TC_NegSem_210101_map_operation_002() runs on GeneralComp system MyTestSystemInterface { +// establishing the port connections +map(mtc:MycomportA, system:messagePort); //not allowed: MycomportA is out port, meanwhile MySysteminterface port is input + +} +control{ + execute(TC_NegSem_210101_map_operation_002()); +} +} \ No newline at end of file diff --git a/ATS/core_language/21_configuration_operations/2101_connection_operations/210101_connect_and_map_operations/Sem_210101_connect_and_map_operations_001.ttcn b/ATS/core_language/21_configuration_operations/2101_connection_operations/210101_connect_and_map_operations/Sem_210101_connect_and_map_operations_001.ttcn new file mode 100644 index 00000000..6223dab6 --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2101_connection_operations/210101_connect_and_map_operations/Sem_210101_connect_and_map_operations_001.ttcn @@ -0,0 +1,84 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:21.1.1, Connect operation accepts ports with compatible message type list containing several types + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirements are tested: +// For the connect operations, only consistent connections are allowed. +// a) Assuming the following: +// 1) ports PORT1 and PORT2 are the ports to be connected; +// 2) inlist-PORT1 defines the messages or procedures of the in-direction of PORT1; +// 3) outlist-PORT1defines the messages or procedures of the out-direction of PORT1; +// 4) inlist-PORT2 defines the messages or procedures of the in-direction of PORT2; and +// 5) outlist-PORT2 defines the messages or procedures of the out-direction of PORT2. +// b) The connect operation is allowed if and only if: +// outlist-PORT1 ⊆ inlist-PORT2 and outlist-PORT2 ⊆ inlist-PORT1. +// +// In this test, outlist-PORT1 == inlist-PORT2 and outlist-PORT2 == inlist-PORT1 + +module Sem_210101_connect_and_map_operations_001 { + type record R { + integer field1, + charstring field2 + } + + type port P1 message { + inout integer; + out R, charstring; + } + + type port P2 message { + in charstring, R, integer; + out integer; + } + + type component GeneralComp { + } + + type component C1 { + port P1 p; + } + + type component C2 { + port P2 p; + } + + function f1() runs on C1 + { + timer t := 1.0; + t.start; + if(p.checkstate("Connected")) { + setverdict(pass); + } else { + setverdict(fail); + } + t.timeout; // keep alive for 1 second + } + + function f2() runs on C2 + { + timer t := 1.0; + t.start; + if(p.checkstate("Connected")) { + setverdict(pass); + } else { + setverdict(fail); + } + t.timeout; // keep alive for 1 second + } + + testcase TC_Sem_210101_connect_and_map_operations_001() runs on GeneralComp system GeneralComp { + var C1 v_ptc1 := C1.create; + var C2 v_ptc2 := C2.create; + connect(v_ptc1:p, v_ptc2:p); // compatible, 1:1 mapping + v_ptc1.start(f1()); + v_ptc2.start(f2()); + all component.done; + } + + control{ + execute(TC_Sem_210101_connect_and_map_operations_001()); + } +} diff --git a/ATS/core_language/21_configuration_operations/2101_connection_operations/210101_connect_and_map_operations/Sem_210101_connect_and_map_operations_002.ttcn b/ATS/core_language/21_configuration_operations/2101_connection_operations/210101_connect_and_map_operations/Sem_210101_connect_and_map_operations_002.ttcn new file mode 100644 index 00000000..ef894c61 --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2101_connection_operations/210101_connect_and_map_operations/Sem_210101_connect_and_map_operations_002.ttcn @@ -0,0 +1,86 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:21.1.1, Connect operation accepts ports where outlist of the 1st port is a subset of inlist of the 2nd port + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirements are tested: +// For the connect operations, only consistent connections are allowed. +// a) Assuming the following: +// 1) ports PORT1 and PORT2 are the ports to be connected; +// 2) inlist-PORT1 defines the messages or procedures of the in-direction of PORT1; +// 3) outlist-PORT1defines the messages or procedures of the out-direction of PORT1; +// 4) inlist-PORT2 defines the messages or procedures of the in-direction of PORT2; and +// 5) outlist-PORT2 defines the messages or procedures of the out-direction of PORT2. +// b) The connect operation is allowed if and only if: +// outlist-PORT1 ⊆ inlist-PORT2 and outlist-PORT2 ⊆ inlist-PORT1. +// +// In this test, outlist-PORT1 ⊂ inlist-PORT2 and outlist-PORT2 == inlist-PORT1 + +module Sem_210101_connect_and_map_operations_002 { + type record R { + integer field1, + charstring field2 + } + + type port P1 message { + inout integer; + out R; + } + + type port P2 message { + in charstring, boolean, R, integer; + out integer; + } + + type component GeneralComp { + } + + type component C1 { + port P1 p; + } + + type component C2 { + port P2 p; + } + + function f1() runs on C1 + { + timer t := 1.0; + t.start; + if(p.checkstate("Connected")) { + setverdict(pass); + } else { + setverdict(fail); + } + t.timeout; // keep alive for 1 second + } + + function f2() runs on C2 + { + timer t := 1.0; + t.start; + if(p.checkstate("Connected")) { + setverdict(pass); + } else { + setverdict(fail); + } + t.timeout; // keep alive for 1 second + } + + + testcase TC_Sem_210101_connect_and_map_operations_002() runs on GeneralComp system GeneralComp { + var C1 v_ptc1 := C1.create; + var C2 v_ptc2 := C2.create; + // v_ptc1:p outlist is (integer, R) and v_ptc2:p inlist is (charstring, boolean, R, integer) + connect(v_ptc1:p, v_ptc2:p); + v_ptc1.start(f1()); + v_ptc2.start(f2()); + all component.done; + } + + control{ + execute(TC_Sem_210101_connect_and_map_operations_002()); + } +} diff --git a/ATS/core_language/21_configuration_operations/2101_connection_operations/210101_connect_and_map_operations/Sem_210101_connect_and_map_operations_003.ttcn b/ATS/core_language/21_configuration_operations/2101_connection_operations/210101_connect_and_map_operations/Sem_210101_connect_and_map_operations_003.ttcn new file mode 100644 index 00000000..5effe556 --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2101_connection_operations/210101_connect_and_map_operations/Sem_210101_connect_and_map_operations_003.ttcn @@ -0,0 +1,86 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:21.1.1, Connect operation accepts ports where outlist of the 2nd port is a subset of inlist of the 1st port + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirements are tested: +// For the connect operations, only consistent connections are allowed. +// a) Assuming the following: +// 1) ports PORT1 and PORT2 are the ports to be connected; +// 2) inlist-PORT1 defines the messages or procedures of the in-direction of PORT1; +// 3) outlist-PORT1defines the messages or procedures of the out-direction of PORT1; +// 4) inlist-PORT2 defines the messages or procedures of the in-direction of PORT2; and +// 5) outlist-PORT2 defines the messages or procedures of the out-direction of PORT2. +// b) The connect operation is allowed if and only if: +// outlist-PORT1 ⊆ inlist-PORT2 and outlist-PORT2 ⊆ inlist-PORT1. +// +// In this test, outlist-PORT1 == inlist-PORT2 and outlist-PORT2 ⊂ inlist-PORT1 + +module Sem_210101_connect_and_map_operations_003 { + type record R { + integer field1, + charstring field2 + } + + type port P1 message { + inout integer; + out R; + } + + type port P2 message { + in charstring, boolean, R, integer; + out integer; + } + + type component GeneralComp { + } + + type component C1 { + port P1 p; + } + + type component C2 { + port P2 p; + } + + function f1() runs on C1 + { + timer t := 1.0; + t.start; + if(p.checkstate("Connected")) { + setverdict(pass); + } else { + setverdict(fail); + } + t.timeout; // keep alive for 1 second + } + + function f2() runs on C2 + { + timer t := 1.0; + t.start; + if(p.checkstate("Connected")) { + setverdict(pass); + } else { + setverdict(fail); + } + t.timeout; // keep alive for 1 second + } + + + testcase TC_Sem_210101_connect_and_map_operations_003() runs on GeneralComp system GeneralComp { + var C1 v_ptc1 := C1.create; + var C2 v_ptc2 := C2.create; + // v_ptc2:p inlist is (charstring, boolean, R, integer) and v_ptc1:p outlist is (integer, R) + connect(v_ptc2:p, v_ptc1:p); + v_ptc1.start(f1()); + v_ptc2.start(f2()); + all component.done; + } + + control{ + execute(TC_Sem_210101_connect_and_map_operations_003()); + } +} diff --git a/ATS/core_language/21_configuration_operations/2101_connection_operations/210101_connect_and_map_operations/Sem_210101_connect_and_map_operations_004.ttcn b/ATS/core_language/21_configuration_operations/2101_connection_operations/210101_connect_and_map_operations/Sem_210101_connect_and_map_operations_004.ttcn new file mode 100644 index 00000000..02f487ce --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2101_connection_operations/210101_connect_and_map_operations/Sem_210101_connect_and_map_operations_004.ttcn @@ -0,0 +1,86 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:21.1.1, Connect operation accepts ports where outlist of both ports are subsets of inlist of the counterpart ports + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirements are tested: +// For the connect operations, only consistent connections are allowed. +// a) Assuming the following: +// 1) ports PORT1 and PORT2 are the ports to be connected; +// 2) inlist-PORT1 defines the messages or procedures of the in-direction of PORT1; +// 3) outlist-PORT1defines the messages or procedures of the out-direction of PORT1; +// 4) inlist-PORT2 defines the messages or procedures of the in-direction of PORT2; and +// 5) outlist-PORT2 defines the messages or procedures of the out-direction of PORT2. +// b) The connect operation is allowed if and only if: +// outlist-PORT1 ⊆ inlist-PORT2 and outlist-PORT2 ⊆ inlist-PORT1. +// +// In this test, outlist-PORT1 ⊂inlist-PORT2 and outlist-PORT2 ⊂ inlist-PORT1 + +module Sem_210101_connect_and_map_operations_004 { + type record R { + integer field1, + charstring field2 + } + + type port P1 message { + inout integer, R; + in bitstring; + } + + type port P2 message { + in charstring, boolean, R, integer; + out integer; + } + + type component GeneralComp { + } + + type component C1 { + port P1 p; + } + + type component C2 { + port P2 p; + } + + function f1() runs on C1 + { + timer t := 1.0; + t.start; + if(p.checkstate("Connected")) { + setverdict(pass); + } else { + setverdict(fail); + } + t.timeout; // keep alive for 1 second + } + + function f2() runs on C2 + { + timer t := 1.0; + t.start; + if(p.checkstate("Connected")) { + setverdict(pass); + } else { + setverdict(fail); + } + t.timeout; // keep alive for 1 second + } + + testcase TC_Sem_210101_connect_and_map_operations_004() runs on GeneralComp system GeneralComp { + var C1 v_ptc1 := C1.create; + var C2 v_ptc2 := C2.create; + // v_ptc1:p outlist is (integer, R) and v_ptc2:p inlist is (charstring, boolean, R, integer) + // v_ptc2:p outlist is (integer) and v_ptc2:p inlist is (R, integer, bitstring) + connect(v_ptc1:p, v_ptc2:p); + v_ptc1.start(f1()); + v_ptc2.start(f2()); + all component.done; + } + + control{ + execute(TC_Sem_210101_connect_and_map_operations_004()); + } +} diff --git a/ATS/core_language/21_configuration_operations/2101_connection_operations/210101_connect_and_map_operations/Sem_210101_connect_and_map_operations_005.ttcn b/ATS/core_language/21_configuration_operations/2101_connection_operations/210101_connect_and_map_operations/Sem_210101_connect_and_map_operations_005.ttcn new file mode 100644 index 00000000..e5638c77 --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2101_connection_operations/210101_connect_and_map_operations/Sem_210101_connect_and_map_operations_005.ttcn @@ -0,0 +1,58 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:21.1.1, Map operation accepts ports with compatible message type list containing several types + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirements are tested: +// For the connect operations, only consistent connections are allowed. +// a) Assuming the following: +// 1) ports PORT1 and PORT2 are the ports to be connected; +// 2) inlist-PORT1 defines the messages or procedures of the in-direction of PORT1; +// 3) outlist-PORT1defines the messages or procedures of the out-direction of PORT1; +// 4) inlist-PORT2 defines the messages or procedures of the in-direction of PORT2; and +// 5) outlist-PORT2 defines the messages or procedures of the out-direction of PORT2. +// c) The map operation (assuming PORT2 is the test system interface port) is allowed if +// and only if: +// outlist-PORT1 ⊆ outlist-PORT2 and inlist-PORT2 ⊆ inlist-PORT1. +// +// In this test, outlist-PORT1 == outlist-PORT2 and inlist-PORT2 == inlist-PORT1 + +module Sem_210101_connect_and_map_operations_005 { + type record R { + integer field1, + charstring field2 + } + + type port P1 message { + inout integer; + out R, charstring; + } + + type port P2 message { + out charstring, R, integer; + in integer; + } + + type component GeneralComp { + port P1 p + } + + type component SystemComp { + port P2 p; + } + + testcase TC_Sem_210101_connect_and_map_operations_005() runs on GeneralComp system SystemComp { + map(self:p, system:p); // compatible, 1:1 mapping + if(p.checkstate("Mapped")) { + setverdict(pass); + } else { + setverdict(fail); + } + } + + control{ + execute(TC_Sem_210101_connect_and_map_operations_005()); + } +} diff --git a/ATS/core_language/21_configuration_operations/2101_connection_operations/210101_connect_and_map_operations/Sem_210101_connect_and_map_operations_006.ttcn b/ATS/core_language/21_configuration_operations/2101_connection_operations/210101_connect_and_map_operations/Sem_210101_connect_and_map_operations_006.ttcn new file mode 100644 index 00000000..019c2146 --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2101_connection_operations/210101_connect_and_map_operations/Sem_210101_connect_and_map_operations_006.ttcn @@ -0,0 +1,59 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:21.1.1, Map operation accepts ports with compatible message type list containing several types + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirements are tested: +// For the connect operations, only consistent connections are allowed. +// a) Assuming the following: +// 1) ports PORT1 and PORT2 are the ports to be connected; +// 2) inlist-PORT1 defines the messages or procedures of the in-direction of PORT1; +// 3) outlist-PORT1defines the messages or procedures of the out-direction of PORT1; +// 4) inlist-PORT2 defines the messages or procedures of the in-direction of PORT2; and +// 5) outlist-PORT2 defines the messages or procedures of the out-direction of PORT2. +// c) The map operation (assuming PORT2 is the test system interface port) is allowed if +// and only if: +// outlist-PORT1 ⊆ outlist-PORT2 and inlist-PORT2 ⊆ inlist-PORT1. +// +// In this test, outlist-PORT1 ⊂ outlist-PORT2 and inlist-PORT2 == inlist-PORT1 + +module Sem_210101_connect_and_map_operations_006 { + type record R { + integer field1, + charstring field2 + } + + type port P1 message { + inout integer; + out R; + } + + type port P2 message { + out charstring, R, integer, bitstring; + in integer; + } + + type component GeneralComp { + port P1 p + } + + type component SystemComp { + port P2 p; + } + + testcase TC_Sem_210101_connect_and_map_operations_006() runs on GeneralComp system SystemComp { + // self:p outlist is (integer, R) and system:p outlist is (charstring, boolean, R, integer) + map(self:p, system:p); + if(p.checkstate("Mapped")) { + setverdict(pass); + } else { + setverdict(fail); + } + } + + control{ + execute(TC_Sem_210101_connect_and_map_operations_006()); + } +} diff --git a/ATS/core_language/21_configuration_operations/2101_connection_operations/210101_connect_and_map_operations/Sem_210101_connect_and_map_operations_007.ttcn b/ATS/core_language/21_configuration_operations/2101_connection_operations/210101_connect_and_map_operations/Sem_210101_connect_and_map_operations_007.ttcn new file mode 100644 index 00000000..e48f1296 --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2101_connection_operations/210101_connect_and_map_operations/Sem_210101_connect_and_map_operations_007.ttcn @@ -0,0 +1,61 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:21.1.1, Map operation accepts ports with compatible message type list containing several types + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirements are tested: +// For the connect operations, only consistent connections are allowed. +// a) Assuming the following: +// 1) ports PORT1 and PORT2 are the ports to be connected; +// 2) inlist-PORT1 defines the messages or procedures of the in-direction of PORT1; +// 3) outlist-PORT1defines the messages or procedures of the out-direction of PORT1; +// 4) inlist-PORT2 defines the messages or procedures of the in-direction of PORT2; and +// 5) outlist-PORT2 defines the messages or procedures of the out-direction of PORT2. +// c) The map operation (assuming PORT2 is the test system interface port) is allowed if +// and only if: +// outlist-PORT1 ⊆ outlist-PORT2 and inlist-PORT2 ⊆ inlist-PORT1. +// +// In this test, outlist-PORT1 == outlist-PORT2 and inlist-PORT2 ⊂ inlist-PORT1 + +module Sem_210101_connect_and_map_operations_007 { + type record R { + integer field1, + charstring field2 + } + + type port P1 message { + in charstring, bitstring; + inout integer; + out R; + } + + type port P2 message { + out R, integer; + in integer; + } + + type component GeneralComp { + port P1 p + } + + type component SystemComp { + port P2 p; + } + + testcase TC_Sem_210101_connect_and_map_operations_007() runs on GeneralComp system SystemComp { + // self:p inlist is (integer, charstring, bitstring) and system:p inlist is (integer) + map(system:p, self:p); + if(p.checkstate("Mapped")) { + setverdict(pass); + } else { + setverdict(fail); + } + + } + + control{ + execute(TC_Sem_210101_connect_and_map_operations_007()); + } +} diff --git a/ATS/core_language/21_configuration_operations/2101_connection_operations/210101_connect_and_map_operations/Sem_210101_connect_and_map_operations_008.ttcn b/ATS/core_language/21_configuration_operations/2101_connection_operations/210101_connect_and_map_operations/Sem_210101_connect_and_map_operations_008.ttcn new file mode 100644 index 00000000..27f6143a --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2101_connection_operations/210101_connect_and_map_operations/Sem_210101_connect_and_map_operations_008.ttcn @@ -0,0 +1,61 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:21.1.1, Map operation accepts ports with compatible message type list containing several types + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirements are tested: +// For the connect operations, only consistent connections are allowed. +// a) Assuming the following: +// 1) ports PORT1 and PORT2 are the ports to be connected; +// 2) inlist-PORT1 defines the messages or procedures of the in-direction of PORT1; +// 3) outlist-PORT1defines the messages or procedures of the out-direction of PORT1; +// 4) inlist-PORT2 defines the messages or procedures of the in-direction of PORT2; and +// 5) outlist-PORT2 defines the messages or procedures of the out-direction of PORT2. +// c) The map operation (assuming PORT2 is the test system interface port) is allowed if +// and only if: +// outlist-PORT1 ⊆ outlist-PORT2 and inlist-PORT2 ⊆ inlist-PORT1. +// +// In this test, outlist-PORT1 ⊂ outlist-PORT2 and inlist-PORT2 ⊂ inlist-PORT1 + +module Sem_210101_connect_and_map_operations_008 { + type record R { + integer field1, + charstring field2 + } + + type port P1 message { + in charstring, bitstring; + inout integer; + out R; + } + + type port P2 message { + out R, integer, boolean; + in integer; + } + + type component GeneralComp { + port P1 p + } + + type component SystemComp { + port P2 p; + } + + testcase TC_Sem_210101_connect_and_map_operations_008() runs on GeneralComp system SystemComp { + // self:p inlist is (integer, charstring, bitstring) and system:p inlist is (integer) + // self:p outlist is (integer, R) and system:p outlist is (integer, R, boolean) + map(system:p, self:p); + if(p.checkstate("Mapped")) { + setverdict(pass); + } else { + setverdict(fail); + } + } + + control{ + execute(TC_Sem_210101_connect_and_map_operations_008()); + } +} diff --git a/ATS/core_language/21_configuration_operations/2101_connection_operations/210101_connect_and_map_operations/Sem_210101_connect_and_map_operations_009.ttcn b/ATS/core_language/21_configuration_operations/2101_connection_operations/210101_connect_and_map_operations/Sem_210101_connect_and_map_operations_009.ttcn new file mode 100644 index 00000000..faa8c44a --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2101_connection_operations/210101_connect_and_map_operations/Sem_210101_connect_and_map_operations_009.ttcn @@ -0,0 +1,53 @@ +/***************************************************************** + ** @author STF 433, STF 470 + ** @version 0.0.2 + ** @purpose 1:21.1.1, Ensure that map param statements are allowed in testcase block + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_210101_connect_and_map_operations_009 { + + type component GeneralComp { + port MyMessagePortType pt_myPort; + } + + type record MyMessageType1 { + integer field1, + charstring field2, + boolean field3 + } + + type port MyMessagePortType message { + inout integer; + map param (in MyMessageType1 p1, inout charstring p2); + } + + const MyMessageType1 c_myTemplate1 := { + field1 := 2, + field2 := "foobar", + field3 := true + } + + testcase TC_Sem_210101_connect_and_map_operations_009() runs on GeneralComp system GeneralComp { + var charstring v_varString := "foobar"; + + map(mtc:pt_myPort, system:pt_myPort) param(c_myTemplate1, v_varString); + + pt_myPort.send(13); + log("Map inout parameter: ", v_varString); + + if(pt_myPort.checkstate("Mapped")) { + setverdict(pass); + } else { + setverdict(fail); + } + + unmap(mtc:pt_myPort, system:pt_myPort); + + setverdict(pass); + } + + control{ + execute(TC_Sem_210101_connect_and_map_operations_009()); + } +} \ No newline at end of file diff --git a/ATS/core_language/21_configuration_operations/2101_connection_operations/210101_connect_and_map_operations/Sem_210101_connect_and_map_operations_010.ttcn b/ATS/core_language/21_configuration_operations/2101_connection_operations/210101_connect_and_map_operations/Sem_210101_connect_and_map_operations_010.ttcn new file mode 100644 index 00000000..7461c6de --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2101_connection_operations/210101_connect_and_map_operations/Sem_210101_connect_and_map_operations_010.ttcn @@ -0,0 +1,36 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:21.1.1, Verify that the param part can be skipped in map operations + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirements are tested: +// Restriction g: +// In map operations, param clauses are optional. + +module Sem_210101_connect_and_map_operations_010 { + + type port P message { + inout integer; + map param (integer p_par1); + } + + type component GeneralComp { + port P p + } + + testcase TC_Sem_210101_connect_and_map_operations_010() runs on GeneralComp system GeneralComp { + map(system:p, self:p); + if(p.checkstate("Mapped")) { + setverdict(pass); + } else { + setverdict(fail); + } + + } + + control{ + execute(TC_Sem_210101_connect_and_map_operations_010()); + } +} diff --git a/ATS/core_language/21_configuration_operations/2101_connection_operations/210101_connect_and_map_operations/Sem_210101_connect_and_map_operations_011.ttcn b/ATS/core_language/21_configuration_operations/2101_connection_operations/210101_connect_and_map_operations/Sem_210101_connect_and_map_operations_011.ttcn new file mode 100644 index 00000000..e77b5652 --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2101_connection_operations/210101_connect_and_map_operations/Sem_210101_connect_and_map_operations_011.ttcn @@ -0,0 +1,34 @@ +/*************************************************** + ** @author STF 451 (updated by STF 521) + ** @version 0.0.2 + ** @purpose 1:21.1.1, Ensure that the the IUT allows connecting ports with empty outlists + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +// NOTE: the test shall pass as empty set (in this case a list of allowed out types) is always a subset +// of another set (in this case a list of allowed in types). For that reason, the test was changed +// into a positive one as it does not violate any TTCN-3 requirement. +// Of course it doesn't make much sense to connect these two ports as communication is not possible +// between them. A CR7607 was submitted to mantis to add a new restriction to the core language standard. + +module Sem_210101_connect_and_map_operations_011 { + + type port myport message { + in integer + } + + type component Mysystem { + port myport messagePort; + } + + testcase TC_Sem_210101_connect_and_map_operations_011() runs on Mysystem system Mysystem { + var Mysystem MyCompA := Mysystem.create, + MyCompB := Mysystem.create; + connect(MyCompA:messagePort, MyCompB:messagePort); + setverdict(pass); + } + + control { + execute(TC_Sem_210101_connect_and_map_operations_011(), 5.0); + } +} + diff --git a/ATS/core_language/21_configuration_operations/2101_connection_operations/210101_connect_and_map_operations/Sem_210101_connect_and_map_operations_012.ttcn b/ATS/core_language/21_configuration_operations/2101_connection_operations/210101_connect_and_map_operations/Sem_210101_connect_and_map_operations_012.ttcn new file mode 100644 index 00000000..ece3db26 --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2101_connection_operations/210101_connect_and_map_operations/Sem_210101_connect_and_map_operations_012.ttcn @@ -0,0 +1,40 @@ +/*************************************************** + ** @author STF 451 (updated by STF 521) + ** @version 0.0.1 + ** @purpose 1:21.1.1, Ensure that IUT can map ports with empty outlist-PORT1 and inlist-PORT2 + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +// NOTE: the test shall pass as empty set (in this case outlist-PORT1 and inlist-PORT2) is always a subset +// of another set (in this case outlist-PORT2 and inlist-PORT1). For that reason, the test was changed +// into a positive one as it does not violate any TTCN-3 requirement. +// Of course it doesn't make much sense to map these two ports as communication is not possible +// between them. A CR7607 was submitted to mantis to add a new restriction to the core language standard. + +module Sem_210101_connect_and_map_operations_012 { + + type port LoopbackPort message { + out integer + } + type port IntegerOutputPortType message { + in integer + } + + type component GeneralComp { + port IntegerOutputPortType MycomportA + } + + type component MyTestSystemInterface { + port LoopbackPort messagePort + } + + // MyTestSystemInterface is the test system interface + testcase TC_Sem_210101_connect_and_map_operations_012() runs on GeneralComp system MyTestSystemInterface { + // establishing the port connections + map(mtc:MycomportA, system:messagePort); //not allowed: MycomportA is in port, meanwhile MySysteminterface port is output + setverdict(pass); + } + + control { + execute(TC_Sem_210101_connect_and_map_operations_012()); + } +} \ No newline at end of file diff --git a/ATS/core_language/21_configuration_operations/2101_connection_operations/210102_disconnect_and_unmap_operations/NegSem_210102_disconnect_and_unmap_operations_001.ttcn b/ATS/core_language/21_configuration_operations/2101_connection_operations/210102_disconnect_and_unmap_operations/NegSem_210102_disconnect_and_unmap_operations_001.ttcn new file mode 100644 index 00000000..de035cf7 --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2101_connection_operations/210102_disconnect_and_unmap_operations/NegSem_210102_disconnect_and_unmap_operations_001.ttcn @@ -0,0 +1,35 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:21.1.2, Verify that unmap operation cannot contain a system port reference + ** @verdict pass reject + ***************************************************/ + +// The following requirements are tested: +// The disconnect and unmap operations are the opposite operations of connect and map. +// (21.1) The ports of a test component can be connected to other components or to the +// ports of the test system interface. When connecting a test component to a test system +// interface the map operation shall be used. + +module NegSem_210102_disconnect_and_unmap_operations_001 { + + type port P message { + inout integer + } + + type component GeneralComp + { + port P p; + } + + testcase TC_NegSem_210102_disconnect_and_unmap_operations_001() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + + connect(self:p, v_ptc:p); + unmap(self:p, v_ptc:p); // no system port reference: error expected + } + control{ + execute(TC_NegSem_210102_disconnect_and_unmap_operations_001()); + } +} + diff --git a/ATS/core_language/21_configuration_operations/2101_connection_operations/210102_disconnect_and_unmap_operations/NegSem_210102_disconnect_and_unmap_operations_002.ttcn b/ATS/core_language/21_configuration_operations/2101_connection_operations/210102_disconnect_and_unmap_operations/NegSem_210102_disconnect_and_unmap_operations_002.ttcn new file mode 100644 index 00000000..671e5c7b --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2101_connection_operations/210102_disconnect_and_unmap_operations/NegSem_210102_disconnect_and_unmap_operations_002.ttcn @@ -0,0 +1,37 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:21.1.2, Verify that disconnecting all ports of all components is not possible in PTC + ** @verdict pass reject + ***************************************************/ + +// The following requirements are tested: +// The all component keyword ... shall only be used by the MTC. + +module NegSem_210102_disconnect_and_unmap_operations_002 { + + type port P message { + inout integer + } + + type component GeneralComp + { + port P p; + } + + function f() runs on GeneralComp { + disconnect(all component:all port); // error: allowed in PTC only + setverdict(pass); + } + + testcase TC_NegSem_210102_disconnect_and_unmap_operations_002() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + connect(self:p, v_ptc:p); + v_ptc.start(f()); + v_ptc.done; // wait for the PTC to finish + } + control{ + execute(TC_NegSem_210102_disconnect_and_unmap_operations_002()); + } +} + diff --git a/ATS/core_language/21_configuration_operations/2101_connection_operations/210102_disconnect_and_unmap_operations/NegSem_210102_disconnect_and_unmap_operations_003.ttcn b/ATS/core_language/21_configuration_operations/2101_connection_operations/210102_disconnect_and_unmap_operations/NegSem_210102_disconnect_and_unmap_operations_003.ttcn new file mode 100644 index 00000000..d8ab7ef8 --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2101_connection_operations/210102_disconnect_and_unmap_operations/NegSem_210102_disconnect_and_unmap_operations_003.ttcn @@ -0,0 +1,38 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:21.1.2, Verify that unmapping all ports of all components is not possible in PTC + ** @verdict pass reject + ***************************************************/ + +// The following requirements are tested: +// The all component keyword ... shall only be used by the MTC. + +module NegSem_210102_disconnect_and_unmap_operations_003 { + + type port P message { + inout integer + } + + type component GeneralComp + { + port P p; + } + + function f() runs on GeneralComp { + unmap(all component:all port); // error: allowed in PTC only + setverdict(pass); + } + + testcase TC_NegSem_210102_disconnect_and_unmap_operations_003() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + map(self:p, system:p); + map(v_ptc:p, system:p); + v_ptc.start(f()); + v_ptc.done; // wait for the PTC to finish + } + control{ + execute(TC_NegSem_210102_disconnect_and_unmap_operations_003()); + } +} + diff --git a/ATS/core_language/21_configuration_operations/2101_connection_operations/210102_disconnect_and_unmap_operations/NegSem_210102_disconnect_and_unmap_operations_004.ttcn b/ATS/core_language/21_configuration_operations/2101_connection_operations/210102_disconnect_and_unmap_operations/NegSem_210102_disconnect_and_unmap_operations_004.ttcn new file mode 100644 index 00000000..d8de452a --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2101_connection_operations/210102_disconnect_and_unmap_operations/NegSem_210102_disconnect_and_unmap_operations_004.ttcn @@ -0,0 +1,32 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:21.1.2, Verify that unmap parameters cannot be used when not declared in the port type + ** @verdict pass reject + ***************************************************/ + +// The following requirements are tested: +// Restriction b: +// If in a unmap operation a param clause is present, the actual parameters shall conform +// to the unmap param clause of the port type declaration of the system port used. + +module NegSem_210102_disconnect_and_unmap_operations_004 { + + type port P message { + inout integer; + } + + type component GeneralComp { + port P p + } + + testcase TC_NegSem_210102_disconnect_and_unmap_operations_004() runs on GeneralComp system GeneralComp { + map(system:p, self:p); + unmap(system:p, self:p) param(5); + setverdict(pass); + } + + control{ + execute(TC_NegSem_210102_disconnect_and_unmap_operations_004()); + } +} diff --git a/ATS/core_language/21_configuration_operations/2101_connection_operations/210102_disconnect_and_unmap_operations/NegSem_210102_disconnect_and_unmap_operations_005.ttcn b/ATS/core_language/21_configuration_operations/2101_connection_operations/210102_disconnect_and_unmap_operations/NegSem_210102_disconnect_and_unmap_operations_005.ttcn new file mode 100644 index 00000000..0569c2f1 --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2101_connection_operations/210102_disconnect_and_unmap_operations/NegSem_210102_disconnect_and_unmap_operations_005.ttcn @@ -0,0 +1,33 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:21.1.2, Verify that type incompatibility in unmap parameters is detected + ** @verdict pass reject + ***************************************************/ + +// The following requirements are tested: +// Restriction b: +// If in a unmap operation a param clause is present, the actual parameters shall conform +// to the unmap param clause of the port type declaration of the system port used. + +module NegSem_210102_disconnect_and_unmap_operations_005 { + + type port P message { + inout integer; + unmap param (integer p_par1); + } + + type component GeneralComp { + port P p + } + + testcase TC_NegSem_210102_disconnect_and_unmap_operations_005() runs on GeneralComp system GeneralComp { + map(system:p, self:p); + unmap(self:p, system:p) param("5"); + setverdict(pass); + } + + control{ + execute(TC_NegSem_210102_disconnect_and_unmap_operations_005()); + } +} diff --git a/ATS/core_language/21_configuration_operations/2101_connection_operations/210102_disconnect_and_unmap_operations/NegSem_210102_disconnect_and_unmap_operations_006.ttcn b/ATS/core_language/21_configuration_operations/2101_connection_operations/210102_disconnect_and_unmap_operations/NegSem_210102_disconnect_and_unmap_operations_006.ttcn new file mode 100644 index 00000000..6ce02f5f --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2101_connection_operations/210102_disconnect_and_unmap_operations/NegSem_210102_disconnect_and_unmap_operations_006.ttcn @@ -0,0 +1,33 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:21.1.2, Verify that parameter count mismatch in unmap param clause is detected + ** @verdict pass reject + ***************************************************/ + +// The following requirements are tested: +// Restriction b: +// If in a unmap operation a param clause is present, the actual parameters shall conform +// to the unmap param clause of the port type declaration of the system port used. + +module NegSem_210102_disconnect_and_unmap_operations_006 { + + type port P message { + inout integer; + unmap param (integer p_par1); + } + + type component GeneralComp { + port P p + } + + testcase TC_NegSem_210102_disconnect_and_unmap_operations_006() runs on GeneralComp system GeneralComp { + map(system:p, self:p); + unmap(self:p, system:p) param(5, 3); + setverdict(pass); + } + + control{ + execute(TC_NegSem_210102_disconnect_and_unmap_operations_006()); + } +} diff --git a/ATS/core_language/21_configuration_operations/2101_connection_operations/210102_disconnect_and_unmap_operations/NegSem_210102_disconnect_and_unmap_operations_007.ttcn b/ATS/core_language/21_configuration_operations/2101_connection_operations/210102_disconnect_and_unmap_operations/NegSem_210102_disconnect_and_unmap_operations_007.ttcn new file mode 100644 index 00000000..f07a3164 --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2101_connection_operations/210102_disconnect_and_unmap_operations/NegSem_210102_disconnect_and_unmap_operations_007.ttcn @@ -0,0 +1,38 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:21.1.2, Verify that the param clause cannot be used when unmap contains no system port reference + ** @verdict pass reject + ***************************************************/ + +// The following requirements are tested: +// Restriction a: +// In an unmap operation, a param clause shall only be present if the system port to +// which the param clause belongs to is explicitly referenced. + +module NegSem_210102_disconnect_and_unmap_operations_007 { + + type port P message { + inout integer; + unmap param (integer p_par1); + } + + type component GeneralComp { + port P p + } + + testcase TC_NegSem_210102_disconnect_and_unmap_operations_007() runs on GeneralComp system GeneralComp { + map(system:p, self:p); + unmap(self:p) param(3); + if(not p.checkstate("Mapped")) { + setverdict(pass); + } else { + setverdict(fail); + } + + } + + control{ + execute(TC_NegSem_210102_disconnect_and_unmap_operations_007()); + } +} diff --git a/ATS/core_language/21_configuration_operations/2101_connection_operations/210102_disconnect_and_unmap_operations/NegSem_210102_disconnect_and_unmap_operations_008.ttcn b/ATS/core_language/21_configuration_operations/2101_connection_operations/210102_disconnect_and_unmap_operations/NegSem_210102_disconnect_and_unmap_operations_008.ttcn new file mode 100644 index 00000000..19f594a2 --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2101_connection_operations/210102_disconnect_and_unmap_operations/NegSem_210102_disconnect_and_unmap_operations_008.ttcn @@ -0,0 +1,43 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:21.1.2, violation of strong typing rules for local ports in disconnect operations + ** @verdict pass reject + ***************************************************/ + +// The following requirements are tested: +// If the type of the component referenced in a connection operation is known (either +// when the component reference is a variable or value returned from a function or the +// type is defined the runs on, mtc or system clause of the calling function), the +// referenced port declaration shall be present in this component type. + +module NegSem_210102_disconnect_and_unmap_operations_008 { + + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + type component GeneralCompEx extends GeneralComp { + port P p2; + } + + function f_disconnect() runs on GeneralComp { + disconnect(self:p, self:p2); // although the actual instance of self contains the p2 port, + // it cannot be referenced as the "runs on" clause contains the GeneralComp type and + // not GeneralCompEx + } + + testcase TC_NegSem_210102_disconnect_and_unmap_operations_008() runs on GeneralCompEx system GeneralComp { + connect(self:p, self:p2); + f_disconnect(); + setverdict(pass); + } + + control{ + execute(TC_NegSem_210102_disconnect_and_unmap_operations_008()); + } +} diff --git a/ATS/core_language/21_configuration_operations/2101_connection_operations/210102_disconnect_and_unmap_operations/NegSem_210102_disconnect_and_unmap_operations_009.ttcn b/ATS/core_language/21_configuration_operations/2101_connection_operations/210102_disconnect_and_unmap_operations/NegSem_210102_disconnect_and_unmap_operations_009.ttcn new file mode 100644 index 00000000..c53eb6f6 --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2101_connection_operations/210102_disconnect_and_unmap_operations/NegSem_210102_disconnect_and_unmap_operations_009.ttcn @@ -0,0 +1,43 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:21.1.2, violation of strong typing rules for MTC ports in disconnect operations + ** @verdict pass reject + ***************************************************/ + +// The following requirements are tested: +// If the type of the component referenced in a connection operation is known (either +// when the component reference is a variable or value returned from a function or the +// type is defined the runs on, mtc or system clause of the calling function), the +// referenced port declaration shall be present in this component type. + +module NegSem_210102_disconnect_and_unmap_operations_009 { + + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + type component GeneralCompEx extends GeneralComp { + port P p2; + } + + function f_disconnect() runs on GeneralCompEx mtc GeneralComp { + disconnect(mtc:p2, self:p); // although the actual instance of MTC contains the p2 port, + // it cannot be referenced as the mtc clause of the f_connect function contains + // the GeneralComp type and not GeneralCompEx + } + + testcase TC_NegSem_210102_disconnect_and_unmap_operations_009() runs on GeneralCompEx system GeneralComp { + connect(mtc:p2, self:p); + f_disconnect(); + setverdict(pass); + } + + control{ + execute(TC_NegSem_210102_disconnect_and_unmap_operations_009()); + } +} diff --git a/ATS/core_language/21_configuration_operations/2101_connection_operations/210102_disconnect_and_unmap_operations/NegSem_210102_disconnect_and_unmap_operations_010.ttcn b/ATS/core_language/21_configuration_operations/2101_connection_operations/210102_disconnect_and_unmap_operations/NegSem_210102_disconnect_and_unmap_operations_010.ttcn new file mode 100644 index 00000000..6dca544c --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2101_connection_operations/210102_disconnect_and_unmap_operations/NegSem_210102_disconnect_and_unmap_operations_010.ttcn @@ -0,0 +1,41 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:21.1.2, violation of strong typing rules for PTC ports in disconnect operations + ** @verdict pass reject + ***************************************************/ + +// The following requirements are tested: +// If the type of the component referenced in a connection operation is known (either +// when the component reference is a variable or value returned from a function or the +// type is defined the runs on, mtc or system clause of the calling function), the +// referenced port declaration shall be present in this component type. + +module NegSem_210102_disconnect_and_unmap_operations_010 { + + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + type component GeneralCompEx extends GeneralComp { + port P p2; + } + + testcase TC_NegSem_210102_disconnect_and_unmap_operations_010() runs on GeneralComp system GeneralComp { + var GeneralCompEx v_ptc := GeneralCompEx.create; + var GeneralComp v_ptcAlias := v_ptc; + connect(self:p, v_ptc:p2); + disconnect(self:p, v_ptcAlias:p2);// although the actual PTC instance contains the p2 port, + // it cannot be referenced as the variable v_ptc is of the GeneralComp type and + // not GeneralCompEx + setverdict(pass); + } + + control{ + execute(TC_NegSem_210102_disconnect_and_unmap_operations_010()); + } +} diff --git a/ATS/core_language/21_configuration_operations/2101_connection_operations/210102_disconnect_and_unmap_operations/NegSem_210102_disconnect_and_unmap_operations_011.ttcn b/ATS/core_language/21_configuration_operations/2101_connection_operations/210102_disconnect_and_unmap_operations/NegSem_210102_disconnect_and_unmap_operations_011.ttcn new file mode 100644 index 00000000..f6ad58da --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2101_connection_operations/210102_disconnect_and_unmap_operations/NegSem_210102_disconnect_and_unmap_operations_011.ttcn @@ -0,0 +1,43 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:21.1.2, violation of strong typing rules for local ports in unmap operations + ** @verdict pass reject + ***************************************************/ + +// The following requirements are tested: +// If the type of the component referenced in a connection operation is known (either +// when the component reference is a variable or value returned from a function or the +// type is defined the runs on, mtc or system clause of the calling function), the +// referenced port declaration shall be present in this component type. + +module NegSem_210102_disconnect_and_unmap_operations_011 { + + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + type component GeneralCompEx extends GeneralComp { + port P p2; + } + + function f_unmap() runs on GeneralComp system GeneralComp { + unmap(self:p2, system:p); // although the actual instance of self contains the p2 port, + // it cannot be referenced as the "runs on" clause contains the GeneralComp type and + // not GeneralCompEx + } + + testcase TC_NegSem_210102_disconnect_and_unmap_operations_011() runs on GeneralCompEx system GeneralComp { + map(self:p2, system:p); + f_unmap(); + setverdict(pass); + } + + control{ + execute(TC_NegSem_210102_disconnect_and_unmap_operations_011()); + } +} diff --git a/ATS/core_language/21_configuration_operations/2101_connection_operations/210102_disconnect_and_unmap_operations/NegSem_210102_disconnect_and_unmap_operations_012.ttcn b/ATS/core_language/21_configuration_operations/2101_connection_operations/210102_disconnect_and_unmap_operations/NegSem_210102_disconnect_and_unmap_operations_012.ttcn new file mode 100644 index 00000000..d6c92480 --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2101_connection_operations/210102_disconnect_and_unmap_operations/NegSem_210102_disconnect_and_unmap_operations_012.ttcn @@ -0,0 +1,43 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:21.1.2, violation of strong typing rules for MTC ports in unmap operations + ** @verdict pass reject + ***************************************************/ + +// The following requirements are tested: +// If the type of the component referenced in a connection operation is known (either +// when the component reference is a variable or value returned from a function or the +// type is defined the runs on, mtc or system clause of the calling function), the +// referenced port declaration shall be present in this component type. + +module NegSem_210102_disconnect_and_unmap_operations_012 { + + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + type component GeneralCompEx extends GeneralComp { + port P p2; + } + + function f_unmap() runs on GeneralCompEx mtc GeneralComp system GeneralComp { + unmap(mtc:p2, system:p); // although the actual instance of MTC contains the p2 port, + // it cannot be referenced as the mtc clause of the f_connect function contains + // the GeneralComp type and not GeneralCompEx + } + + testcase TC_NegSem_210102_disconnect_and_unmap_operations_012() runs on GeneralCompEx system GeneralComp { + map(mtc:p2, system:p); + f_unmap(); + setverdict(pass); + } + + control{ + execute(TC_NegSem_210102_disconnect_and_unmap_operations_012()); + } +} diff --git a/ATS/core_language/21_configuration_operations/2101_connection_operations/210102_disconnect_and_unmap_operations/NegSem_210102_disconnect_and_unmap_operations_013.ttcn b/ATS/core_language/21_configuration_operations/2101_connection_operations/210102_disconnect_and_unmap_operations/NegSem_210102_disconnect_and_unmap_operations_013.ttcn new file mode 100644 index 00000000..7037344b --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2101_connection_operations/210102_disconnect_and_unmap_operations/NegSem_210102_disconnect_and_unmap_operations_013.ttcn @@ -0,0 +1,41 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:21.1.2, violation of strong typing rules for PTC ports in unmap operations + ** @verdict pass reject + ***************************************************/ + +// The following requirements are tested: +// If the type of the component referenced in a connection operation is known (either +// when the component reference is a variable or value returned from a function or the +// type is defined the runs on, mtc or system clause of the calling function), the +// referenced port declaration shall be present in this component type. + +module NegSem_210102_disconnect_and_unmap_operations_013 { + + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + type component GeneralCompEx extends GeneralComp { + port P p2; + } + + testcase TC_NegSem_210102_disconnect_and_unmap_operations_013() runs on GeneralComp system GeneralComp { + var GeneralCompEx v_ptc := GeneralCompEx.create; + var GeneralComp v_ptcAlias := v_ptc; + map(system:p, v_ptc:p2); + unmap(system:p, v_ptcAlias:p2);// although the actual PTC instance contains the p2 port, + // it cannot be referenced as the variable v_ptc is of the GeneralComp type and + // not GeneralCompEx + setverdict(pass); + } + + control{ + execute(TC_NegSem_210102_disconnect_and_unmap_operations_013()); + } +} diff --git a/ATS/core_language/21_configuration_operations/2101_connection_operations/210102_disconnect_and_unmap_operations/NegSem_210102_disconnect_and_unmap_operations_014.ttcn b/ATS/core_language/21_configuration_operations/2101_connection_operations/210102_disconnect_and_unmap_operations/NegSem_210102_disconnect_and_unmap_operations_014.ttcn new file mode 100644 index 00000000..0c16a50f --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2101_connection_operations/210102_disconnect_and_unmap_operations/NegSem_210102_disconnect_and_unmap_operations_014.ttcn @@ -0,0 +1,43 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:21.1.2, violation of strong typing rules for system ports in unmap operations + ** @verdict pass reject + ***************************************************/ + +// The following requirements are tested: +// If the type of the component referenced in a connection operation is known (either +// when the component reference is a variable or value returned from a function or the +// type is defined the runs on, mtc or system clause of the calling function), the +// referenced port declaration shall be present in this component type. + +module NegSem_210102_disconnect_and_unmap_operations_014 { + + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + type component GeneralCompEx extends GeneralComp { + port P p2; + } + + function f_unmap() runs on GeneralComp system GeneralComp { + unmap(self:p, system:p2); // although the actual instance of TSI contains the p2 port, + // it cannot be referenced as the system clause contains the GeneralComp type and + // not GeneralCompEx + } + + testcase TC_NegSem_210102_disconnect_and_unmap_operations_014() runs on GeneralComp system GeneralCompEx { + map(self:p, system:p2); + f_unmap(); + setverdict(pass); + } + + control{ + execute(TC_NegSem_210102_disconnect_and_unmap_operations_014()); + } +} diff --git a/ATS/core_language/21_configuration_operations/2101_connection_operations/210102_disconnect_and_unmap_operations/Sem_210102_disconnect_and_unmap_operations_001.ttcn b/ATS/core_language/21_configuration_operations/2101_connection_operations/210102_disconnect_and_unmap_operations/Sem_210102_disconnect_and_unmap_operations_001.ttcn new file mode 100644 index 00000000..d5f5338d --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2101_connection_operations/210102_disconnect_and_unmap_operations/Sem_210102_disconnect_and_unmap_operations_001.ttcn @@ -0,0 +1,52 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:21.1.2, Ensure that disconnect operation with two parameters works correctly + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirements are tested: +// The disconnect ... operations perform the disconnection (of previously connected) +// ports of test components... + +module Sem_210102_disconnect_and_unmap_operations_001{ + + type port P message { + inout integer + } + + type component GeneralComp + { + port P p; + } + + function checkConnected(boolean p_stateActive) runs on GeneralComp + { + if(p.checkstate("Connected") xor not p_stateActive) { + setverdict(pass); + } else { + setverdict(fail); + } + } + + testcase TC_Sem_210102_disconnect_and_unmap_operations_001() runs on GeneralComp system GeneralComp { + // components are created alive so that their connections are not destroyed when behaviour stops + var GeneralComp v_ptc1 := GeneralComp.create alive, + v_ptc2 := GeneralComp.create alive, + v_ptc3 := GeneralComp.create alive; + + connect(v_ptc1:p, v_ptc2:p); + connect(v_ptc1:p, v_ptc3:p); + + disconnect(v_ptc1:p, v_ptc2:p); + + // verity that ports are really disconnected + v_ptc1.start(checkConnected(true)); // still connectected to v_ptc3:p + v_ptc2.start(checkConnected(false)); // no active connection + all component.done; + } + control{ + execute(TC_Sem_210102_disconnect_and_unmap_operations_001()); + } +} + diff --git a/ATS/core_language/21_configuration_operations/2101_connection_operations/210102_disconnect_and_unmap_operations/Sem_210102_disconnect_and_unmap_operations_002.ttcn b/ATS/core_language/21_configuration_operations/2101_connection_operations/210102_disconnect_and_unmap_operations/Sem_210102_disconnect_and_unmap_operations_002.ttcn new file mode 100644 index 00000000..6398ce01 --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2101_connection_operations/210102_disconnect_and_unmap_operations/Sem_210102_disconnect_and_unmap_operations_002.ttcn @@ -0,0 +1,53 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:21.1.2, Ensure that disconnect operation with one parameter works correctly + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirements are tested: +// To ease disconnect ... operations related to all connections ... of ... a port, it is +// allowed to use disconnect ... operations with one argument only. This one argument +// specifies one side of the connections to be disconnected... + +module Sem_210102_disconnect_and_unmap_operations_002{ + + type port P message { + inout integer + } + + type component GeneralComp + { + port P p; + } + + function checkDisconnected() runs on GeneralComp + { + if(not p.checkstate("Connected")) { + setverdict(pass); + } else { + setverdict(fail); + } + } + + testcase TC_Sem_210102_disconnect_and_unmap_operations_002() runs on GeneralComp system GeneralComp { + // components are created alive so that their connections are not destroyed when behaviour stops + var GeneralComp v_ptc1 := GeneralComp.create alive, + v_ptc2 := GeneralComp.create alive, + v_ptc3 := GeneralComp.create alive; + + connect(v_ptc1:p, v_ptc2:p); + connect(v_ptc1:p, v_ptc3:p); + + disconnect(v_ptc1:p); + + // verity that ports are really disconnected + v_ptc2.start(checkDisconnected()); + v_ptc3.start(checkDisconnected()); + all component.done; + } + control{ + execute(TC_Sem_210102_disconnect_and_unmap_operations_002()); + } +} + diff --git a/ATS/core_language/21_configuration_operations/2101_connection_operations/210102_disconnect_and_unmap_operations/Sem_210102_disconnect_and_unmap_operations_003.ttcn b/ATS/core_language/21_configuration_operations/2101_connection_operations/210102_disconnect_and_unmap_operations/Sem_210102_disconnect_and_unmap_operations_003.ttcn new file mode 100644 index 00000000..5830abea --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2101_connection_operations/210102_disconnect_and_unmap_operations/Sem_210102_disconnect_and_unmap_operations_003.ttcn @@ -0,0 +1,68 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:21.1.2, Ensure that disconnect operation with all ports of a component works correctly + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirements are tested: +// To ease disconnect ... operations related to all connections ... of a component ..., +// it is allowed to use disconnect ... operations with one argument only. This one argument +// specifies one side of the connections to be disconnected... The all port keyword can be +// used to denote all ports of a component. + +module Sem_210102_disconnect_and_unmap_operations_003{ + + type port P message { + inout integer + } + + type component GeneralComp + { + port P p1, p2; + } + + function checkAllDisconnected() runs on GeneralComp + { + timer t := 1.0; + t.start; + if(not p1.checkstate("Connected") and not p2.checkstate("Connected")) { + setverdict(pass); + } else { + setverdict(fail); + } + t.timeout; // keep alive for 1 second + } + + function checkSecondConnected() runs on GeneralComp + { + if(not p1.checkstate("Connected") and p2.checkstate("Connected")) { + setverdict(pass); + } else { + setverdict(fail); + } + } + + testcase TC_Sem_210102_disconnect_and_unmap_operations_003() runs on GeneralComp system GeneralComp { + // components are created alive so that their connections are not destroyed when behaviour stops + var GeneralComp v_ptc1 := GeneralComp.create alive, + v_ptc2 := GeneralComp.create alive, + v_ptc3 := GeneralComp.create alive; + + connect(v_ptc1:p1, v_ptc2:p1); + connect(v_ptc1:p2, v_ptc3:p1); + connect(v_ptc2:p2, v_ptc3:p2); + + disconnect(v_ptc1:all port); + + // verity that ports are really disconnected + v_ptc1.start(checkAllDisconnected()); + v_ptc2.start(checkSecondConnected()); + v_ptc3.start(checkSecondConnected()); + all component.done; + } + control{ + execute(TC_Sem_210102_disconnect_and_unmap_operations_003()); + } +} + diff --git a/ATS/core_language/21_configuration_operations/2101_connection_operations/210102_disconnect_and_unmap_operations/Sem_210102_disconnect_and_unmap_operations_004.ttcn b/ATS/core_language/21_configuration_operations/2101_connection_operations/210102_disconnect_and_unmap_operations/Sem_210102_disconnect_and_unmap_operations_004.ttcn new file mode 100644 index 00000000..ffaaeb85 --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2101_connection_operations/210102_disconnect_and_unmap_operations/Sem_210102_disconnect_and_unmap_operations_004.ttcn @@ -0,0 +1,58 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:21.1.2, Ensure that disconnect operation with no argument works correctly + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirements are tested: +// The usage of a disconnect ... operation without any parameters is a shorthand +// form for using the operation with the parameter self:all port. It disconnects +// ... all ports of the component that calls the operation. + +module Sem_210102_disconnect_and_unmap_operations_004{ + + type port P message { + inout integer + } + + type component GeneralComp + { + port P p1, p2; + } + + function checkSecondConnected() runs on GeneralComp + { + if(not p1.checkstate("Connected") and p2.checkstate("Connected")) { + setverdict(pass); + } else { + setverdict(fail); + } + } + + testcase TC_Sem_210102_disconnect_and_unmap_operations_004() runs on GeneralComp system GeneralComp { + // components are created alive so that their connections are not destroyed when behaviour stops + var GeneralComp v_ptc1 := GeneralComp.create alive, + v_ptc2 := GeneralComp.create alive; + + connect(self:p1, v_ptc1:p1); + connect(self:p2, v_ptc2:p1); + connect(v_ptc1:p2, v_ptc2:p2); + + disconnect; + + // verity that ports are really disconnected + v_ptc1.start(checkSecondConnected()); + v_ptc2.start(checkSecondConnected()); + if(not p1.checkstate("Connected") and not p2.checkstate("Connected")) { + setverdict(pass); + } else { + setverdict(fail); + } + all component.done; + } + control{ + execute(TC_Sem_210102_disconnect_and_unmap_operations_004()); + } +} + diff --git a/ATS/core_language/21_configuration_operations/2101_connection_operations/210102_disconnect_and_unmap_operations/Sem_210102_disconnect_and_unmap_operations_005.ttcn b/ATS/core_language/21_configuration_operations/2101_connection_operations/210102_disconnect_and_unmap_operations/Sem_210102_disconnect_and_unmap_operations_005.ttcn new file mode 100644 index 00000000..8431847d --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2101_connection_operations/210102_disconnect_and_unmap_operations/Sem_210102_disconnect_and_unmap_operations_005.ttcn @@ -0,0 +1,50 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:21.1.2, Ensure that unmap operation with one system port as a parameter works correctly + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirements are tested: +// To ease ... map operations related to all ... mappings of ... a port, it is +// allowed to use ... unmap operations with one argument only. This one argument +// specifies one side of the connections to be ... unmapped. + +module Sem_210102_disconnect_and_unmap_operations_005 { + + type port P message { + inout integer + } + + type component GeneralComp + { + port P p; + } + + function checkUnmapped() runs on GeneralComp + { + if(not p.checkstate("Mapped")) { + setverdict(pass); + } else { + setverdict(fail); + } + } + + testcase TC_Sem_210102_disconnect_and_unmap_operations_005() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc1 := GeneralComp.create; + + map(self:p, system:p); + map(v_ptc1:p, system:p); + + unmap(system:p); + + // verity that ports are really unmapped + checkUnmapped(); + v_ptc1.start(checkUnmapped()); + all component.done; + } + control{ + execute(TC_Sem_210102_disconnect_and_unmap_operations_005()); + } +} + diff --git a/ATS/core_language/21_configuration_operations/2101_connection_operations/210102_disconnect_and_unmap_operations/Sem_210102_disconnect_and_unmap_operations_006.ttcn b/ATS/core_language/21_configuration_operations/2101_connection_operations/210102_disconnect_and_unmap_operations/Sem_210102_disconnect_and_unmap_operations_006.ttcn new file mode 100644 index 00000000..0a9d9712 --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2101_connection_operations/210102_disconnect_and_unmap_operations/Sem_210102_disconnect_and_unmap_operations_006.ttcn @@ -0,0 +1,50 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:21.1.2, Ensure that unmap operation with one component port as a parameter works correctly + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirements are tested: +// To ease ... map operations related to all ... mappings of ... a port, it is +// allowed to use ... unmap operations with one argument only. This one argument +// specifies one side of the connections to be ... unmapped. + +module Sem_210102_disconnect_and_unmap_operations_006 { + + type port P message { + inout integer + } + + type component GeneralComp + { + port P p; + } + + function checkMapped(boolean p_stateActive) runs on GeneralComp + { + if(p.checkstate("Mapped") xor not p_stateActive) { + setverdict(pass); + } else { + setverdict(fail); + } + } + + testcase TC_Sem_210102_disconnect_and_unmap_operations_006() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc1 := GeneralComp.create; + + map(self:p, system:p); + map(v_ptc1:p, system:p); + + unmap(v_ptc1:p); + + // verity that ports are really unmapped + checkMapped(true); // still mapped to system:p + v_ptc1.start(checkMapped(false)); // no active mapping + all component.done; + } + control{ + execute(TC_Sem_210102_disconnect_and_unmap_operations_006()); + } +} + diff --git a/ATS/core_language/21_configuration_operations/2101_connection_operations/210102_disconnect_and_unmap_operations/Sem_210102_disconnect_and_unmap_operations_007.ttcn b/ATS/core_language/21_configuration_operations/2101_connection_operations/210102_disconnect_and_unmap_operations/Sem_210102_disconnect_and_unmap_operations_007.ttcn new file mode 100644 index 00000000..7044d3da --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2101_connection_operations/210102_disconnect_and_unmap_operations/Sem_210102_disconnect_and_unmap_operations_007.ttcn @@ -0,0 +1,58 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:21.1.2, Ensure that unmap operation with all ports of a component works correctly + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirements are tested: +// To ease ... map operations related to all ... mappings of a component ..., it is +// allowed to use ... unmap operations with one argument only. This one argument +// specifies one side of the connections to be ... unmapped. The all port keyword +// can be used to denote all ports of a component. + +module Sem_210102_disconnect_and_unmap_operations_007 { + + type port P message { + inout integer + } + + type component GeneralComp + { + port P p1, p2; + } + + function checkPortMapped(boolean p_stateActive, P p_port) + { + if(p_port.checkstate("Mapped") xor not p_stateActive) { + setverdict(pass); + } else { + setverdict(fail); + } + } + function checkMapped(boolean p_stateActive) runs on GeneralComp + { + checkPortMapped(p_stateActive, p1); + checkPortMapped(p_stateActive, p2); + } + + testcase TC_Sem_210102_disconnect_and_unmap_operations_007() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc1 := GeneralComp.create; + + map(self:p1, system:p1); + map(self:p2, system:p2); + map(v_ptc1:p1, system:p1); + map(v_ptc1:p2, system:p2); + + unmap(v_ptc1:all port); + + // verity that ports are really unmapped + checkMapped(true); // still mapped to system:p1 and system:p2 + v_ptc1.start(checkMapped(false)); // no active mapping + all component.done; + } + control{ + execute(TC_Sem_210102_disconnect_and_unmap_operations_007()); + } +} + diff --git a/ATS/core_language/21_configuration_operations/2101_connection_operations/210102_disconnect_and_unmap_operations/Sem_210102_disconnect_and_unmap_operations_008.ttcn b/ATS/core_language/21_configuration_operations/2101_connection_operations/210102_disconnect_and_unmap_operations/Sem_210102_disconnect_and_unmap_operations_008.ttcn new file mode 100644 index 00000000..c4df0033 --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2101_connection_operations/210102_disconnect_and_unmap_operations/Sem_210102_disconnect_and_unmap_operations_008.ttcn @@ -0,0 +1,57 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:21.1.2, Ensure that unmap operation with no parameters works correctly + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirements are tested: +// The usage of an ... unmap operation without any parameters is a shorthand +// form for using the operation with the parameter self:all port. It ... +// unmaps all ports of the component that calls the operation. + +module Sem_210102_disconnect_and_unmap_operations_008 { + + type port P message { + inout integer + } + + type component GeneralComp + { + port P p1, p2; + } + + function checkPortMapped(boolean p_stateActive, P p_port) + { + if(p_port.checkstate("Mapped") xor not p_stateActive) { + setverdict(pass); + } else { + setverdict(fail); + } + } + function checkMapped(boolean p_stateActive) runs on GeneralComp + { + checkPortMapped(p_stateActive, p1); + checkPortMapped(p_stateActive, p2); + } + + testcase TC_Sem_210102_disconnect_and_unmap_operations_008() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc1 := GeneralComp.create; + + map(self:p1, system:p1); + map(self:p2, system:p2); + map(v_ptc1:p1, system:p1); + map(v_ptc1:p2, system:p2); + + unmap; + + // verity that ports are really unmapped + checkMapped(false); // no active mapping + v_ptc1.start(checkMapped(true)); // still mapped to system:p1 and system:p2 + all component.done; + } + control{ + execute(TC_Sem_210102_disconnect_and_unmap_operations_008()); + } +} + diff --git a/ATS/core_language/21_configuration_operations/2101_connection_operations/210102_disconnect_and_unmap_operations/Sem_210102_disconnect_and_unmap_operations_009.ttcn b/ATS/core_language/21_configuration_operations/2101_connection_operations/210102_disconnect_and_unmap_operations/Sem_210102_disconnect_and_unmap_operations_009.ttcn new file mode 100644 index 00000000..eac5aa8f --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2101_connection_operations/210102_disconnect_and_unmap_operations/Sem_210102_disconnect_and_unmap_operations_009.ttcn @@ -0,0 +1,54 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:21.1.2, Ensure that all component notation works correctly in unmap operations + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirements are tested: +// The all component keyword shall only be used in combination with the all port +// keyword, i.e. all component:all port, and shall only be used by the MTC. Furthermore, +// the all component:all port argument shall be used as the one and only argument of a +// disconnect or unmap operation and it allows to release all connections and mappings +// of the test configuration. + +module Sem_210102_disconnect_and_unmap_operations_009 { + + type port P message { + inout integer + } + + type component GeneralComp + { + port P p1, p2; + } + + function checkUnmapped() runs on GeneralComp + { + if(not p1.checkstate("Mapped") and not p2.checkstate("Mapped")) { + setverdict(pass); + } else { + setverdict(fail); + } + } + + testcase TC_Sem_210102_disconnect_and_unmap_operations_009() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc1 := GeneralComp.create; + + map(self:p1, system:p1); + map(self:p2, system:p2); + map(v_ptc1:p1, system:p1); + map(v_ptc1:p2, system:p2); + + unmap(all component:all port); + + // verity that ports are really unmapped + checkUnmapped(); + v_ptc1.start(checkUnmapped()); + all component.done; + } + control{ + execute(TC_Sem_210102_disconnect_and_unmap_operations_009()); + } +} + diff --git a/ATS/core_language/21_configuration_operations/2101_connection_operations/210102_disconnect_and_unmap_operations/Sem_210102_disconnect_and_unmap_operations_010.ttcn b/ATS/core_language/21_configuration_operations/2101_connection_operations/210102_disconnect_and_unmap_operations/Sem_210102_disconnect_and_unmap_operations_010.ttcn new file mode 100644 index 00000000..79f30a5c --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2101_connection_operations/210102_disconnect_and_unmap_operations/Sem_210102_disconnect_and_unmap_operations_010.ttcn @@ -0,0 +1,34 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:21.1.2, Verify that no error is generated when unmapping ports that are not mapped + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirements are tested: +// An ... unmap operation has only an effect if the ... mapping to be removed +// has been created beforehand. + +module Sem_210102_disconnect_and_unmap_operations_010 { + + type port P message { + inout integer + } + + type component GeneralComp + { + port P p; + } + + testcase TC_Sem_210102_disconnect_and_unmap_operations_010() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc1 := GeneralComp.create; + + connect(self:p, v_ptc1:p); + unmap( v_ptc1:p, system:p); //no effect, ports not mapped + setverdict(pass); + } + control{ + execute(TC_Sem_210102_disconnect_and_unmap_operations_010()); + } +} + diff --git a/ATS/core_language/21_configuration_operations/2101_connection_operations/210102_disconnect_and_unmap_operations/Sem_210102_disconnect_and_unmap_operations_011.ttcn b/ATS/core_language/21_configuration_operations/2101_connection_operations/210102_disconnect_and_unmap_operations/Sem_210102_disconnect_and_unmap_operations_011.ttcn new file mode 100644 index 00000000..f30bbf41 --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2101_connection_operations/210102_disconnect_and_unmap_operations/Sem_210102_disconnect_and_unmap_operations_011.ttcn @@ -0,0 +1,60 @@ +/***************************************************************** + ** @author STF 433 (updated by STF 470 and STF 521) + ** @version 0.0.3 + ** @purpose 1:21.1.2, Ensure that unmap param statements are allowed in testcase block + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_210102_disconnect_and_unmap_operations_011 { + + type component GeneralComp { + port MyMessagePortType pt_myPort; + } + + type record MyMessageType1 { + boolean h1, + MyMessageType1 h2 optional + } + + type record MyMessageType2 { + integer g1, + charstring g2 + } + + type port MyMessagePortType message { + inout all; + unmap param (in MyMessageType1 p1, inout MyMessageType2 p2); + } + + const MyMessageType1 c_myTemplate1 := { + h1 := false, + h2 := { + h1:= true, + h2 := omit + } + } + + const MyMessageType2 c_myTemplate2 := { + g1 := 2, + g2 := "foo" + } + + testcase TC_Sem_210102_disconnect_and_unmap_operations_011() runs on GeneralComp system GeneralComp { + var MyMessageType2 v_myTemplate2 := c_myTemplate2; + timer t_tmr := 0.2; + t_tmr.start; + map(mtc:pt_myPort, system:pt_myPort); + + pt_myPort.send(13); + t_tmr.timeout; // give adapter some time to enqueue the message + + unmap(mtc:pt_myPort, system:pt_myPort) param(c_myTemplate1, v_myTemplate2); + log("Unmap inout parameter", v_myTemplate2); + + setverdict(pass); + } + + control{ + execute(TC_Sem_210102_disconnect_and_unmap_operations_011()); + } +} \ No newline at end of file diff --git a/ATS/core_language/21_configuration_operations/2101_connection_operations/210102_disconnect_and_unmap_operations/Sem_210102_disconnect_and_unmap_operations_012.ttcn b/ATS/core_language/21_configuration_operations/2101_connection_operations/210102_disconnect_and_unmap_operations/Sem_210102_disconnect_and_unmap_operations_012.ttcn new file mode 100644 index 00000000..31eb95f3 --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2101_connection_operations/210102_disconnect_and_unmap_operations/Sem_210102_disconnect_and_unmap_operations_012.ttcn @@ -0,0 +1,37 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:21.1.2, Verify that the param part can be skipped in unmap operations + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirements are tested: +// Restriction b: +// In unmap operations, param clauses are optional. + +module Sem_210102_disconnect_and_unmap_operations_012 { + + type port P message { + inout integer; + unmap param (integer p_par1); + } + + type component GeneralComp { + port P p + } + + testcase TC_Sem_210102_disconnect_and_unmap_operations_012() runs on GeneralComp system GeneralComp { + map(system:p, self:p); + unmap(self:p, system:p); + if(not p.checkstate("Mapped")) { + setverdict(pass); + } else { + setverdict(fail); + } + + } + + control{ + execute(TC_Sem_210102_disconnect_and_unmap_operations_012()); + } +} diff --git a/ATS/core_language/21_configuration_operations/2101_connection_operations/210102_disconnect_and_unmap_operations/Sem_210102_disconnect_and_unmap_operations_013.ttcn b/ATS/core_language/21_configuration_operations/2101_connection_operations/210102_disconnect_and_unmap_operations/Sem_210102_disconnect_and_unmap_operations_013.ttcn new file mode 100644 index 00000000..6ab5dc57 --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2101_connection_operations/210102_disconnect_and_unmap_operations/Sem_210102_disconnect_and_unmap_operations_013.ttcn @@ -0,0 +1,38 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:21.1.2, Verify that the param clause can be used when unmap contains a single system port parameter + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirements are tested: +// Restriction a: +// In an unmap operation, a param clause shall only be present if the system port to +// which the param clause belongs to is explicitly referenced. + +module Sem_210102_disconnect_and_unmap_operations_013 { + + type port P message { + inout integer; + unmap param (integer p_par1); + } + + type component GeneralComp { + port P p + } + + testcase TC_Sem_210102_disconnect_and_unmap_operations_013() runs on GeneralComp system GeneralComp { + map(system:p, self:p); + unmap(system:p) param(1); + if(not p.checkstate("Mapped")) { + setverdict(pass); + } else { + setverdict(fail); + } + + } + + control{ + execute(TC_Sem_210102_disconnect_and_unmap_operations_013()); + } +} diff --git a/ATS/core_language/21_configuration_operations/2101_connection_operations/210102_disconnect_and_unmap_operations/Sem_210102_disconnect_operation_001.ttcn b/ATS/core_language/21_configuration_operations/2101_connection_operations/210102_disconnect_and_unmap_operations/Sem_210102_disconnect_operation_001.ttcn new file mode 100644 index 00000000..367d8671 --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2101_connection_operations/210102_disconnect_and_unmap_operations/Sem_210102_disconnect_operation_001.ttcn @@ -0,0 +1,59 @@ +/*************************************************** + ** @author STF 451, STF 470 + ** @version 0.0.2 + ** @purpose 1:21.1.2, Ensure that all component notation work correctly in disconnect operation + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirements are tested: +// The all component keyword shall only be used in combination with the all port +// keyword, i.e. all component:all port, and shall only be used by the MTC. Furthermore, +// the all component:all port argument shall be used as the one and only argument of a +// disconnect or unmap operation and it allows to release all connections and mappings +// of the test configuration. + +module Sem_210102_disconnect_operation_001{ + + type port P message { + inout integer + } + + type component GeneralComp + { + port P p; + } + + function f() runs on GeneralComp + { + timer t := 1.0; + t.start; + if(not p.checkstate("Connected")) { + setverdict(pass); + } else { + setverdict(fail); + } + t.timeout; // keep alive for 1 second + } + + testcase TC_Sem_210102_disconnect_operation_001() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc1 := GeneralComp.create, + v_ptc2 := GeneralComp.create, + v_ptc3 := GeneralComp.create; + + connect(v_ptc1:p, v_ptc2:p); + connect(v_ptc1:p, v_ptc3:p); + connect(v_ptc2:p, v_ptc3:p); + + disconnect(all component:all port); + + // verity that ports are really disconnected + v_ptc1.start(f()); + v_ptc2.start(f()); + v_ptc3.start(f()); + all component.done; + } + control{ + execute(TC_Sem_210102_disconnect_operation_001()); + } +} + diff --git a/ATS/core_language/21_configuration_operations/2101_connection_operations/210102_disconnect_and_unmap_operations/Sem_210102_disconnect_operation_002.ttcn b/ATS/core_language/21_configuration_operations/2101_connection_operations/210102_disconnect_and_unmap_operations/Sem_210102_disconnect_operation_002.ttcn new file mode 100644 index 00000000..77136545 --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2101_connection_operations/210102_disconnect_and_unmap_operations/Sem_210102_disconnect_operation_002.ttcn @@ -0,0 +1,43 @@ +/*************************************************** + ** @author STF 451, STF 470 + ** @version 0.0.2 + ** @purpose 1:21.1.1, Ensure that disconnect has no effect on components that are not connected + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +module Sem_210102_disconnect_operation_002{ + + type port P message { + inout integer + } + + type component GeneralComp + { + port P p; + } + + function f() runs on GeneralComp + { + if(p.checkstate("Mapped")) { + setverdict(pass); + } else { + setverdict(fail); + } + } + + testcase TC_Sem_210102_disconnect_operation_002() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc1 := GeneralComp.create, + v_ptc2 := GeneralComp.create; + + map(v_ptc1:p, system:p); + + disconnect(v_ptc1:p, v_ptc2:p); // acceptable even when not connected + + v_ptc1.start(f()); + all component.done; + } + control{ + execute(TC_Sem_210102_disconnect_operation_002()); + } +} + diff --git a/ATS/core_language/21_configuration_operations/2101_connection_operations/210102_disconnect_and_unmap_operations/Sem_210102_disconnect_operation_003.ttcn b/ATS/core_language/21_configuration_operations/2101_connection_operations/210102_disconnect_and_unmap_operations/Sem_210102_disconnect_operation_003.ttcn new file mode 100644 index 00000000..fb7e1f48 --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2101_connection_operations/210102_disconnect_and_unmap_operations/Sem_210102_disconnect_operation_003.ttcn @@ -0,0 +1,37 @@ +/*************************************************** + ** @author STF 451 (updated by STF 521) + ** @version 0.0.2 + ** @purpose 1:21.1.2, Ensure that mapped port cannot disconnect + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +// System and component interface cannot disconnect +module Sem_210102_disconnect_operation_003 { + + type port myport message { + inout integer + } + + + type component Mysystem + { + port myport messagePort; + } + function f() runs on Mysystem {} + + testcase TC_Sem_210102_disconnect_operation_003() runs on Mysystem system Mysystem { + var Mysystem MyCompA; + + MyCompA:=Mysystem.create; + + map(MyCompA:messagePort,system:messagePort); + + MyCompA.start(f()); + + disconnect(MyCompA:messagePort); // should not cause any error + setverdict(pass); + } + control{ + execute(TC_Sem_210102_disconnect_operation_003()); + } +} + diff --git a/ATS/core_language/21_configuration_operations/2101_connection_operations/210102_disconnect_and_unmap_operations/Sem_210102_unmap_operation_001.ttcn b/ATS/core_language/21_configuration_operations/2101_connection_operations/210102_disconnect_and_unmap_operations/Sem_210102_unmap_operation_001.ttcn new file mode 100644 index 00000000..833827e4 --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2101_connection_operations/210102_disconnect_and_unmap_operations/Sem_210102_unmap_operation_001.ttcn @@ -0,0 +1,50 @@ +/*************************************************** + ** @author STF 451, STF 470 + ** @version 0.0.2 + ** @purpose 1:21.1.2, Ensure that umnap operation of a system and component port works correctly + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirements are tested: +// The ... unmap operations perform ... the unmapping of (previously mapped) ports of +// test components and ports in the test system interface. + +module Sem_210102_unmap_operation_001 { + + type port P message { + inout integer + } + + type component GeneralComp + { + port P p; + } + + function checkMapped(boolean p_stateActive) runs on GeneralComp + { + if(p.checkstate("Mapped") xor not p_stateActive) { + setverdict(pass); + } else { + setverdict(fail); + } + } + + testcase TC_Sem_210102_unmap_operation_001() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc1 := GeneralComp.create; + + map(self:p, system:p); + map(v_ptc1:p, system:p); + + unmap(system:p, v_ptc1:p); + + // verity that ports are really unmapped + checkMapped(true); // still mapped to system:p + v_ptc1.start(checkMapped(false)); // no active mapping + v_ptc1.done; + } + + control{ + execute(TC_Sem_210102_unmap_operation_001()); + } +} + diff --git a/ATS/core_language/21_configuration_operations/2101_connection_operations/210102_disconnect_and_unmap_operations/Sem_210102_unmap_operation_002.ttcn b/ATS/core_language/21_configuration_operations/2101_connection_operations/210102_disconnect_and_unmap_operations/Sem_210102_unmap_operation_002.ttcn new file mode 100644 index 00000000..b1a38616 --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2101_connection_operations/210102_disconnect_and_unmap_operations/Sem_210102_unmap_operation_002.ttcn @@ -0,0 +1,50 @@ +/*************************************************** + ** @author STF 451, STF 470 + ** @version 0.0.2 + ** @purpose 1:21.1.2, Ensure that umnap operation of a component and system port works correctly + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirements are tested: +// The ... unmap operations perform ... the unmapping of (previously mapped) ports of +// test components and ports in the test system interface. + +module Sem_210102_unmap_operation_002 { + + type port P message { + inout integer + } + + type component GeneralComp + { + port P p; + } + + function checkMapped(boolean p_stateActive) runs on GeneralComp + { + if(p.checkstate("Mapped") xor not p_stateActive) { + setverdict(pass); + } else { + setverdict(fail); + } + } + + testcase TC_Sem_210102_unmap_operation_001() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc1 := GeneralComp.create; + + map(self:p, system:p); + map(v_ptc1:p, system:p); + + unmap(v_ptc1:p, system:p); + + // verity that ports are really unmapped + checkMapped(true); // still mapped to system:p + v_ptc1.start(checkMapped(false)); // no active mapping + v_ptc1.done; + } + + control{ + execute(TC_Sem_210102_unmap_operation_001()); + } +} + diff --git a/ATS/core_language/21_configuration_operations/2101_connection_operations/2101_toplevel/NegSem_2101_TopLevel_001.ttcn b/ATS/core_language/21_configuration_operations/2101_connection_operations/2101_toplevel/NegSem_2101_TopLevel_001.ttcn new file mode 100644 index 00000000..15590619 --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2101_connection_operations/2101_toplevel/NegSem_2101_TopLevel_001.ttcn @@ -0,0 +1,28 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:21.1, Verify that connect operation cannot contain a system port + ** @verdict pass reject + ***************************************************/ + +// The following requirements are tested: +// In the case of connections between two test components, the connect operation shall be used. + +module NegSem_2101_TopLevel_001 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + testcase TC_NegSem_210101_TopLevel_001() runs on GeneralComp system GeneralComp { + connect(self:p, system:p); // error expected + setverdict(pass); + } + + control{ + execute(TC_NegSem_210101_TopLevel_001()); + } +} diff --git a/ATS/core_language/21_configuration_operations/2101_connection_operations/2101_toplevel/NegSem_2101_TopLevel_002.ttcn b/ATS/core_language/21_configuration_operations/2101_connection_operations/2101_toplevel/NegSem_2101_TopLevel_002.ttcn new file mode 100644 index 00000000..063dd48c --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2101_connection_operations/2101_toplevel/NegSem_2101_TopLevel_002.ttcn @@ -0,0 +1,29 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:21.1, Verify that map operation fails if both operands are component ports + ** @verdict pass reject + ***************************************************/ + +// The following requirements are tested: +// When connecting a test component to a test system interface the map operation shall be used. + +module NegSem_2101_TopLevel_002 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + testcase TC_NegSem_210101_TopLevel_002() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + map(self:p, v_ptc:p); // error expected + setverdict(pass); + } + + control{ + execute(TC_NegSem_210101_TopLevel_002()); + } +} diff --git a/ATS/core_language/21_configuration_operations/2102_test_case_operations/NegSem_2102_testcase_stop_001.ttcn b/ATS/core_language/21_configuration_operations/2102_test_case_operations/NegSem_2102_testcase_stop_001.ttcn new file mode 100644 index 00000000..7de401fa --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2102_test_case_operations/NegSem_2102_testcase_stop_001.ttcn @@ -0,0 +1,22 @@ +/*************************************************** + ** @author STF 451 (updated by STF 521) + ** @version 0.0.2 + ** @purpose 1:21.2, Stopping test case + ** @verdict pass accept, ttcn3verdict:error + ***************************************************/ +// Explicit test case termination test +module NegSem_2102_testcase_stop_001 { + type component GeneralComp {} + + testcase TC_NegSem_2102_testcase_stop_001() runs on GeneralComp { + var boolean v_b := true; + + setverdict(pass, "Unexpected termination with verdict pass"); + + testcase.stop("Expected Termination with verdict error"); // stop runing test case now with verdict error + } + + control { + execute(TC_NegSem_2102_testcase_stop_001()); + } +} \ No newline at end of file diff --git a/ATS/core_language/21_configuration_operations/2103_test_component_operations/210301_create_operation/NegSem_210301_CreateOperation_001.ttcn b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210301_create_operation/NegSem_210301_CreateOperation_001.ttcn new file mode 100644 index 00000000..fd39ef73 --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210301_create_operation/NegSem_210301_CreateOperation_001.ttcn @@ -0,0 +1,19 @@ +/***************************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:21.3.1, Ensure that named components on hosts are accepted + ** @verdict pass reject + *****************************************************************/ +module NegSem_210301_CreateOperation_001 { + + type component GeneralComp { } + + testcase TC_NegSem_210301_CreateOperation_001() runs on GeneralComp system GeneralComp { + var GeneralComp ptc := GeneralComp.create(5); // it should expect charstring + setverdict(pass); + } + + control { + execute(TC_NegSem_210301_CreateOperation_001()); + } +} \ No newline at end of file diff --git a/ATS/core_language/21_configuration_operations/2103_test_component_operations/210301_create_operation/NegSem_210301_CreateOperation_002.ttcn b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210301_create_operation/NegSem_210301_CreateOperation_002.ttcn new file mode 100644 index 00000000..543052d4 --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210301_create_operation/NegSem_210301_CreateOperation_002.ttcn @@ -0,0 +1,19 @@ +/***************************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:21.3.1, Ensure that named components on hosts are accepted + ** @verdict pass reject + *****************************************************************/ +module NegSem_210301_CreateOperation_002 { + + type component GeneralComp { } + + testcase TC_NegSem_210301_CreateOperation_002() runs on GeneralComp system GeneralComp { + var GeneralComp ptc := GeneralComp.create(true); // it should expect charstring + setverdict(pass); + } + + control { + execute(TC_NegSem_210301_CreateOperation_002()); + } +} \ No newline at end of file diff --git a/ATS/core_language/21_configuration_operations/2103_test_component_operations/210301_create_operation/NegSem_210301_CreateOperation_003.ttcn b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210301_create_operation/NegSem_210301_CreateOperation_003.ttcn new file mode 100644 index 00000000..7a546da0 --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210301_create_operation/NegSem_210301_CreateOperation_003.ttcn @@ -0,0 +1,19 @@ +/***************************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:21.3.1, Ensure that named components on hosts are accepted + ** @verdict pass reject + *****************************************************************/ +module NegSem_210301_CreateOperation_003 { + + type component GeneralComp { } + + testcase TC_NegSem_210301_CreateOperation_003() runs on GeneralComp system GeneralComp { + var GeneralComp ptc := GeneralComp.create(-, 'CAFFEE'O); // it should expect charstring + setverdict(pass); + } + + control { + execute(TC_NegSem_210301_CreateOperation_003()); + } +} \ No newline at end of file diff --git a/ATS/core_language/21_configuration_operations/2103_test_component_operations/210301_create_operation/Sem_210301_CreateOperation_001.ttcn b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210301_create_operation/Sem_210301_CreateOperation_001.ttcn new file mode 100644 index 00000000..2d29cb58 --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210301_create_operation/Sem_210301_CreateOperation_001.ttcn @@ -0,0 +1,43 @@ +/***************************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:21.3.1, Ensure that unnamed components can be created + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_210301_CreateOperation_001 { + + type component GeneralComp { + var NewComp vc_NewComp; + timer t := 5.0; + } + type component NewComp { } + + function f_testComp() runs on GeneralComp { + var NewComp v_NewComp := NewComp.create; + t.start; + a_createComp(); + setverdict(pass); + } + + function f_createComp() return NewComp { + return NewComp.create; + } + + altstep a_createComp() runs on GeneralComp { + [] t.timeout { + vc_NewComp := NewComp.create; + setverdict(pass); + } + } + + testcase TC_Sem_210301_CreateOperation_001() runs on GeneralComp system GeneralComp { + var GeneralComp ptc := GeneralComp.create; + ptc.start(f_testComp()); + setverdict(pass); + } + + control { + execute(TC_Sem_210301_CreateOperation_001()); + } +} \ No newline at end of file diff --git a/ATS/core_language/21_configuration_operations/2103_test_component_operations/210301_create_operation/Sem_210301_CreateOperation_002.ttcn b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210301_create_operation/Sem_210301_CreateOperation_002.ttcn new file mode 100644 index 00000000..0d064983 --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210301_create_operation/Sem_210301_CreateOperation_002.ttcn @@ -0,0 +1,45 @@ +/***************************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:21.3.1, Ensure that named components can be created + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_210301_CreateOperation_002 { + + type component GeneralComp { + var NewComp vc_NewComp; + timer t := 5.0; + } + + type component NewComp { } + + function f_testComp() runs on GeneralComp { + var NewComp v_NewComp := NewComp.create("1 & * 5abc"); + t.start; + a_createComp(); + setverdict(pass); + } + + function f_createComp() return NewComp { + return NewComp.create("some name"); + } + + altstep a_createComp() runs on GeneralComp { + [] t.timeout { + vc_NewComp := NewComp.create("component#" & int2str(2)); + setverdict(pass); + } + } + + testcase TC_Sem_210301_CreateOperation_002() runs on GeneralComp system GeneralComp { + var GeneralComp ptc := GeneralComp.create("a component name"); + ptc.start(f_testComp()); + setverdict(pass); + } + + control { + execute(TC_Sem_210301_CreateOperation_002()); + } + +} \ No newline at end of file diff --git a/ATS/core_language/21_configuration_operations/2103_test_component_operations/210301_create_operation/Sem_210301_CreateOperation_003.ttcn b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210301_create_operation/Sem_210301_CreateOperation_003.ttcn new file mode 100644 index 00000000..39d08741 --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210301_create_operation/Sem_210301_CreateOperation_003.ttcn @@ -0,0 +1,44 @@ +/***************************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:21.3.1, Ensure that unnamed alive components on hosts can be created + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_210301_CreateOperation_003 { + + type component GeneralComp { + var NewComp vc_NewComp; + timer t := 5.0; + } + + type component NewComp { } + + function f_testComp() runs on GeneralComp { + var NewComp v_NewComp := NewComp.create alive; + t.start; + a_createComp(); + setverdict(pass); + } + + function f_createComp() return NewComp { + return NewComp.create alive; + } + + altstep a_createComp() runs on GeneralComp { + [] t.timeout { + vc_NewComp := NewComp.create alive; + setverdict(pass); + } + } + + testcase TC_Sem_210301_CreateOperation_003() runs on GeneralComp system GeneralComp { + var GeneralComp ptc := GeneralComp.create alive; + ptc.start(f_testComp()); + setverdict(pass); + } + + control { + execute(TC_Sem_210301_CreateOperation_003()); + } +} \ No newline at end of file diff --git a/ATS/core_language/21_configuration_operations/2103_test_component_operations/210301_create_operation/Sem_210301_CreateOperation_004.ttcn b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210301_create_operation/Sem_210301_CreateOperation_004.ttcn new file mode 100644 index 00000000..00f82b19 --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210301_create_operation/Sem_210301_CreateOperation_004.ttcn @@ -0,0 +1,46 @@ +/***************************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:21.3.1, Ensure that named alive components can be created + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_210301_CreateOperation_004 { + const charstring componentName := "component#"; + + type component GeneralComp { + var NewComp vc_NewComp; + timer t := 5.0; + } + + type component NewComp { } + + function f_testComp() runs on GeneralComp { + var NewComp v_NewComp := NewComp.create("1 & * 5abc") alive; + t.start; + a_createComp(); + setverdict(pass); + } + + function f_createComp() return NewComp { + return NewComp.create("some name") alive; + } + + altstep a_createComp() runs on GeneralComp { + [] t.timeout { + vc_NewComp := NewComp.create(componentName & int2str(2)) alive; + setverdict(pass); + } + } + + testcase TC_Sem_210301_CreateOperation_004() runs on GeneralComp system GeneralComp { + var GeneralComp ptc := GeneralComp.create("a component name") alive; + ptc.start(f_testComp()); + setverdict(pass); + } + + control { + execute(TC_Sem_210301_CreateOperation_004()); + } + +} \ No newline at end of file diff --git a/ATS/core_language/21_configuration_operations/2103_test_component_operations/210301_create_operation/Syn_210301_CreateOperation_001.ttcn b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210301_create_operation/Syn_210301_CreateOperation_001.ttcn new file mode 100644 index 00000000..46b224c1 --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210301_create_operation/Syn_210301_CreateOperation_001.ttcn @@ -0,0 +1,45 @@ +/***************************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:21.3.1, Ensure that named components on hosts are accepted + ** @verdict pass accept, noexecution + *****************************************************************/ +// only syntactic test since it cannot be tested if "localhost" is not supported for component creation +module Syn_210301_CreateOperation_001 { + const charstring hostname := "localhost"; + + type component GeneralComp { + var NewComp vc_NewComp; + timer t := 5.0; + } + + type component NewComp { } + + function f_testComp() runs on GeneralComp { + var NewComp v_NewComp := NewComp.create("1 & * 5abc", hostname); + t.start; + a_createComp(); + setverdict(pass); + } + + function f_createComp() return NewComp { + return NewComp.create(-, "localhost"); + } + + altstep a_createComp() runs on GeneralComp { + [] t.timeout { + vc_NewComp := NewComp.create("component#" & int2str(2), hostname); + setverdict(pass); + } + } + + testcase TC_Syn_210301_CreateOperation_001() runs on GeneralComp system GeneralComp { + var GeneralComp ptc := GeneralComp.create("a component name", "localhost"); + ptc.start(f_testComp()); + setverdict(pass); + } + + control { + execute(TC_Syn_210301_CreateOperation_001()); + } +} \ No newline at end of file diff --git a/ATS/core_language/21_configuration_operations/2103_test_component_operations/210302_start_test_component/NegSem_210302_Start_test_component_001.ttcn b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210302_start_test_component/NegSem_210302_Start_test_component_001.ttcn new file mode 100644 index 00000000..73058d19 --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210302_start_test_component/NegSem_210302_Start_test_component_001.ttcn @@ -0,0 +1,28 @@ +/***************************************************************** + ** @author STF 451 + ** @version 0.0.1 + ** @purpose 1:21.3.2, Ensure that non-alive ptc cannot start again + ** @verdict pass reject + *****************************************************************/ +//Non alive test component cannot start another function behavior +module NegSem_210302_Start_test_component_001 { + + type component GeneralComp { } + function f() runs on GeneralComp {} + function f2() runs on GeneralComp {} + + testcase TC_NegSem_210302_Start_test_component_001() runs on GeneralComp system GeneralComp { + var GeneralComp ptc; + ptc:=GeneralComp.create; + + ptc.start(f()); + ptc.done; + ptc.start(f2()); // test case error, ptc is non-alive + + setverdict(pass); + } + + control { + execute(TC_NegSem_210302_Start_test_component_001()); + } +} \ No newline at end of file diff --git a/ATS/core_language/21_configuration_operations/2103_test_component_operations/210302_start_test_component/NegSem_210302_Start_test_component_002.ttcn b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210302_start_test_component/NegSem_210302_Start_test_component_002.ttcn new file mode 100644 index 00000000..fdadc235 --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210302_start_test_component/NegSem_210302_Start_test_component_002.ttcn @@ -0,0 +1,25 @@ +/***************************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:21.3.2, Ensure that only component type is allowed for ptc declaration + ** @verdict pass reject + *****************************************************************/ +// VariableRef (being a component type variable, a component type parameter +module NegSem_210302_Start_test_component_002 { + + type component GeneralComp { } + type record Rectype{} + function f() runs on GeneralComp {} + testcase TC_NegSem_210302_Start_test_component_002() runs on GeneralComp system GeneralComp { + var Rectype ptc; + ptc:=GeneralComp.create; // VariableRef (being a component type variable, a component type parameter + + ptc.start(f()); + + setverdict(pass); + } + + control { + execute(TC_NegSem_210302_Start_test_component_002()); + } +} \ No newline at end of file diff --git a/ATS/core_language/21_configuration_operations/2103_test_component_operations/210302_start_test_component/NegSem_210302_Start_test_component_004.ttcn b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210302_start_test_component/NegSem_210302_Start_test_component_004.ttcn new file mode 100644 index 00000000..f13f4419 --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210302_start_test_component/NegSem_210302_Start_test_component_004.ttcn @@ -0,0 +1,33 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:21.3.2, starting behaviour on already running non-alive component + ** @verdict pass reject + ***************************************************/ + +// The following requirements are tested: +// Starting a second behaviour function on a non-alive PTC or starting a function +// on a PTC that is still running results in a test case error. + +module NegSem_210302_Start_test_component_004 { + + type component GeneralComp { + } + + function f_ptcBehaviour() runs on GeneralComp { + timer t_tmr := 10.0; + t_tmr.start; + t_tmr.timeout; + } + + testcase TC_NegSem_210302_Start_test_component_004() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create("PTC") alive; + v_ptc.start(f_ptcBehaviour()); + v_ptc.start(f_ptcBehaviour()); + setverdict(pass); + } + + control{ + execute(TC_NegSem_210302_Start_test_component_004()); + } +} diff --git a/ATS/core_language/21_configuration_operations/2103_test_component_operations/210302_start_test_component/NegSem_210302_Start_test_component_005.ttcn b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210302_start_test_component/NegSem_210302_Start_test_component_005.ttcn new file mode 100644 index 00000000..a8e65c1c --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210302_start_test_component/NegSem_210302_Start_test_component_005.ttcn @@ -0,0 +1,33 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:21.3.2, starting behaviour on already running non-alive component + ** @verdict pass reject + ***************************************************/ + +// The following requirements are tested: +// Starting a second behaviour function on a non-alive PTC or starting a function +// on a PTC that is still running results in a test case error. + +module NegSem_210302_Start_test_component_005 { + + type component GeneralComp { + } + + function f_ptcBehaviour() runs on GeneralComp { + timer t_tmr := 10.0; + t_tmr.start; + t_tmr.timeout; + } + + testcase TC_NegSem_210302_Start_test_component_005() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create("PTC"); + v_ptc.start(f_ptcBehaviour()); + v_ptc.start(f_ptcBehaviour()); + setverdict(pass); + } + + control{ + execute(TC_NegSem_210302_Start_test_component_005()); + } +} diff --git a/ATS/core_language/21_configuration_operations/2103_test_component_operations/210302_start_test_component/NegSem_210302_Start_test_component_006.ttcn b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210302_start_test_component/NegSem_210302_Start_test_component_006.ttcn new file mode 100644 index 00000000..ecda5db8 --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210302_start_test_component/NegSem_210302_Start_test_component_006.ttcn @@ -0,0 +1,38 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:21.3.2, function invocation in the start operation doesn't return a component + ** @verdict pass reject + ***************************************************/ + +// The following requirements are tested: +// The variable associated with VariableRef (being a component type variable, +// a component type parameter, etc.) or the return type associated with +// FunctionInstance shall be of component type. + +module NegSem_210302_Start_test_component_006 { + + type component GeneralComp { + } + + type record R { + GeneralComp comp + } + + function f_create() return R { + var R v_rec := { GeneralComp.create("PTC") } + return v_rec; + } + + function f_ptcBehaviour() runs on GeneralComp { + } + + testcase TC_NegSem_210302_Start_test_component_006() runs on GeneralComp system GeneralComp { + f_create().start(f_ptcBehaviour()); + setverdict(pass); + } + + control{ + execute(TC_NegSem_210302_Start_test_component_006()); + } +} diff --git a/ATS/core_language/21_configuration_operations/2103_test_component_operations/210302_start_test_component/NegSem_210302_Start_test_component_007.ttcn b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210302_start_test_component/NegSem_210302_Start_test_component_007.ttcn new file mode 100644 index 00000000..0a568efb --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210302_start_test_component/NegSem_210302_Start_test_component_007.ttcn @@ -0,0 +1,38 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:21.3.2, starting function with incompatible "runs on" clause + ** @verdict pass reject + ***************************************************/ + +// The following requirements are tested: +// The function invoked in a start test component operation shall have a runs on +// definition referencing a component type that is compatible with the newly +// created component (see clause 6.3.3). + +module NegSem_210302_Start_test_component_007 { + + type component GeneralComp { + var charstring vc_str := "abc"; + } + + type component DifferentComp { + var integer vc_int := 0; + } + + + function f_ptcBehaviour() runs on DifferentComp { + setverdict(pass, "Executing PTC behaviour..."); + } + + testcase TC_NegSem_210302_Start_test_component_007() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create("PTC") alive; + v_ptc.start(f_ptcBehaviour()); + v_ptc.done; + setverdict(pass); + } + + control{ + execute(TC_NegSem_210302_Start_test_component_007()); + } +} diff --git a/ATS/core_language/21_configuration_operations/2103_test_component_operations/210302_start_test_component/NegSem_210302_Start_test_component_008.ttcn b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210302_start_test_component/NegSem_210302_Start_test_component_008.ttcn new file mode 100644 index 00000000..d614298d --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210302_start_test_component/NegSem_210302_Start_test_component_008.ttcn @@ -0,0 +1,39 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:21.3.2, passing port to started component function + ** @verdict pass reject + ***************************************************/ + +// The following requirements are tested: +// Ports, defaults and timers shall not be passed into a function invoked in a start +// test component operation. + +module NegSem_210302_Start_test_component_008 { + + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + function f_behaviour(P p_port) runs on GeneralComp { + p_port.receive(integer:?); + setverdict(pass); + } + + testcase TC_NegSem_210302_Start_test_component_008() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create("PTC"); + connect(self:p, self:p); + p.send(1); + v_ptc.start(f_behaviour(p)); + v_ptc.done; + setverdict(pass); + } + + control{ + execute(TC_NegSem_210302_Start_test_component_008()); + } +} diff --git a/ATS/core_language/21_configuration_operations/2103_test_component_operations/210302_start_test_component/NegSem_210302_Start_test_component_009.ttcn b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210302_start_test_component/NegSem_210302_Start_test_component_009.ttcn new file mode 100644 index 00000000..95aac9a1 --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210302_start_test_component/NegSem_210302_Start_test_component_009.ttcn @@ -0,0 +1,36 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:21.3.2, passing default to started component function + ** @verdict pass reject + ***************************************************/ + +// The following requirements are tested: +// Ports, defaults and timers shall not be passed into a function invoked in a start +// test component operation. + +module NegSem_210302_Start_test_component_009 { + + type component GeneralComp { + } + + function f_behaviour(default p_default) runs on GeneralComp { + setverdict(pass); + } + + altstep a_timeout() { + [] any timer.timeout { } + } + + testcase TC_NegSem_210302_Start_test_component_009() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create("PTC"); + var default v_def := activate(a_timeout()); + v_ptc.start(f_behaviour(v_def)); + v_ptc.done; + setverdict(pass); + } + + control{ + execute(TC_NegSem_210302_Start_test_component_009()); + } +} diff --git a/ATS/core_language/21_configuration_operations/2103_test_component_operations/210302_start_test_component/NegSem_210302_Start_test_component_010.ttcn b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210302_start_test_component/NegSem_210302_Start_test_component_010.ttcn new file mode 100644 index 00000000..cdb496a4 --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210302_start_test_component/NegSem_210302_Start_test_component_010.ttcn @@ -0,0 +1,34 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:21.3.2, passing timer to started component function + ** @verdict pass reject + ***************************************************/ + +// The following requirements are tested: +// Ports, defaults and timers shall not be passed into a function invoked in a start +// test component operation. + +module NegSem_210302_Start_test_component_010 { + + type component GeneralComp { + } + + function f_behaviour(timer t_tmr) runs on GeneralComp { + t_tmr.timeout; + setverdict(pass); + } + + testcase TC_NegSem_210302_Start_test_component_010() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create("PTC"); + timer t_tmr := 0.0; + t_tmr.start; + v_ptc.start(f_behaviour(t_tmr)); + v_ptc.done; + setverdict(pass); + } + + control{ + execute(TC_NegSem_210302_Start_test_component_010()); + } +} diff --git a/ATS/core_language/21_configuration_operations/2103_test_component_operations/210302_start_test_component/NegSem_210302_Start_test_component_011.ttcn b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210302_start_test_component/NegSem_210302_Start_test_component_011.ttcn new file mode 100644 index 00000000..f01f3dd1 --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210302_start_test_component/NegSem_210302_Start_test_component_011.ttcn @@ -0,0 +1,41 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:21.3.2, passing structured value containing ports to started component function + ** @verdict pass reject + ***************************************************/ + +// The following requirements are tested: +// All formal parameter types of the function shall neither be of port or default type +// or should contain a direct or indirect element or field of port or default type. + +module NegSem_210302_Start_test_component_011 { + + type port P message { + inout integer; + } + + type P PortArray[2]; + + type component GeneralComp { + port P p[2]; + } + + function f_behaviour(PortArray p_ports) runs on GeneralComp { + p_ports[0].receive(integer:?); + setverdict(pass); + } + + testcase TC_NegSem_210302_Start_test_component_011() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create("PTC"); + connect(self:p[0], self:p[0]); + p[0].send(1); + v_ptc.start(f_behaviour(p)); + v_ptc.done; + setverdict(pass); + } + + control{ + execute(TC_NegSem_210302_Start_test_component_011()); + } +} diff --git a/ATS/core_language/21_configuration_operations/2103_test_component_operations/210302_start_test_component/NegSem_210302_Start_test_component_012.ttcn b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210302_start_test_component/NegSem_210302_Start_test_component_012.ttcn new file mode 100644 index 00000000..f803ddff --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210302_start_test_component/NegSem_210302_Start_test_component_012.ttcn @@ -0,0 +1,40 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:21.3.2, passing default to started component function + ** @verdict pass reject + ***************************************************/ + +// The following requirements are tested: +// All formal parameter types of the function shall neither be of port or default type +// or should contain a direct or indirect element or field of port or default type. + +module NegSem_210302_Start_test_component_012 { + + type record R { + default def + } + + type component GeneralComp { + } + + function f_behaviour(R p_def) runs on GeneralComp { + setverdict(pass); + } + + altstep a_timeout() { + [] any timer.timeout { } + } + + testcase TC_NegSem_210302_Start_test_component_012() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create("PTC"); + var R v_def := { def := activate(a_timeout()) }; + v_ptc.start(f_behaviour(v_def)); + v_ptc.done; + setverdict(pass); + } + + control{ + execute(TC_NegSem_210302_Start_test_component_012()); + } +} diff --git a/ATS/core_language/21_configuration_operations/2103_test_component_operations/210302_start_test_component/Sem_210302_Start_test_component_001.ttcn b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210302_start_test_component/Sem_210302_Start_test_component_001.ttcn new file mode 100644 index 00000000..23f934f2 --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210302_start_test_component/Sem_210302_Start_test_component_001.ttcn @@ -0,0 +1,28 @@ +/***************************************************************** + ** @author STF 451 + ** @version 0.0.1 + ** @purpose 1:21.3.2, Ensure that alive test components are allowed to start another function + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +// Alive test component starts another function +module Sem_210302_Start_test_component_001 { + + type component GeneralComp { } + function f() runs on GeneralComp {} + function f2() runs on GeneralComp {} + + testcase TC_Sem_210302_Start_test_component_001() runs on GeneralComp system GeneralComp { + var GeneralComp ptc; + ptc:=GeneralComp.create alive; + + ptc.start(f()); + ptc.done; + ptc.start(f2()); // allowed since ptc is alive + + setverdict(pass); + } + + control { + execute(TC_Sem_210302_Start_test_component_001()); + } +} \ No newline at end of file diff --git a/ATS/core_language/21_configuration_operations/2103_test_component_operations/210302_start_test_component/Sem_210302_Start_test_component_002.ttcn b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210302_start_test_component/Sem_210302_Start_test_component_002.ttcn new file mode 100644 index 00000000..1e0e1b16 --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210302_start_test_component/Sem_210302_Start_test_component_002.ttcn @@ -0,0 +1,31 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:21.3.2, component variable reference in start operation + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirements are tested: +// The start operation shall bind the required behaviour to the test component. This +// behaviour is defined by reference to an already defined function. + +module Sem_210302_Start_test_component_002 { + + type component GeneralComp { + } + + function f_ptcBehaviour() runs on GeneralComp { + setverdict(pass, "Executing PTC behaviour..."); + } + + testcase TC_Sem_210302_Start_test_component_002() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create("PTC"); + v_ptc.start(f_ptcBehaviour()); + v_ptc.done; + setverdict(pass); + } + + control{ + execute(TC_Sem_210302_Start_test_component_002()); + } +} diff --git a/ATS/core_language/21_configuration_operations/2103_test_component_operations/210302_start_test_component/Sem_210302_Start_test_component_003.ttcn b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210302_start_test_component/Sem_210302_Start_test_component_003.ttcn new file mode 100644 index 00000000..75269f2a --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210302_start_test_component/Sem_210302_Start_test_component_003.ttcn @@ -0,0 +1,34 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:21.3.2, test component as a result of function invocation in start operation + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirements are tested: +// The start operation shall bind the required behaviour to the test component. This +// behaviour is defined by reference to an already defined function. + +module Sem_210302_Start_test_component_003 { + + type component GeneralComp { + } + + function f_ptcBehaviour() runs on GeneralComp { + setverdict(pass, "Executing PTC behaviour..."); + } + + function f_create() return GeneralComp { + return GeneralComp.create("PTC"); + } + + testcase TC_Sem_210302_Start_test_component_003() runs on GeneralComp system GeneralComp { + f_create().start(f_ptcBehaviour()); + all component.done; + setverdict(pass); + } + + control{ + execute(TC_Sem_210302_Start_test_component_003()); + } +} diff --git a/ATS/core_language/21_configuration_operations/2103_test_component_operations/210302_start_test_component/Sem_210302_Start_test_component_004.ttcn b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210302_start_test_component/Sem_210302_Start_test_component_004.ttcn new file mode 100644 index 00000000..a3f9245a --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210302_start_test_component/Sem_210302_Start_test_component_004.ttcn @@ -0,0 +1,41 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:21.3.2, component variable value reuse in alive component + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirements are tested: +// If a function is started on an alive-type PTC after termination of a previous +// function, it uses variable values, timers, ports, and the local verdict as they +// were left after termination of the previous function. + +module Sem_210302_Start_test_component_004 { + + type component GeneralComp { + var integer vc_val := 0; + } + + function f_ptcBehaviour() runs on GeneralComp { + vc_val := 1; + } + + function f_ptcSecondBehaviour() runs on GeneralComp { + if (vc_val == 1) { setverdict(pass); } + else { setverdict(fail); } + } + + + testcase TC_Sem_210302_Start_test_component_004() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create("PTC") alive; + v_ptc.start(f_ptcBehaviour()); + v_ptc.done; + v_ptc.start(f_ptcSecondBehaviour()); + v_ptc.done; + setverdict(pass); + } + + control{ + execute(TC_Sem_210302_Start_test_component_004()); + } +} diff --git a/ATS/core_language/21_configuration_operations/2103_test_component_operations/210302_start_test_component/Sem_210302_Start_test_component_005.ttcn b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210302_start_test_component/Sem_210302_Start_test_component_005.ttcn new file mode 100644 index 00000000..a680c506 --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210302_start_test_component/Sem_210302_Start_test_component_005.ttcn @@ -0,0 +1,41 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:21.3.2, timer reuse in alive component + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirements are tested: +// If a function is started on an alive-type PTC after termination of a previous +// function, it uses variable values, timers, ports, and the local verdict as they +// were left after termination of the previous function. + +module Sem_210302_Start_test_component_005 { + + type component GeneralComp { + timer tc_tmr := 30.0; + } + + function f_ptcBehaviour() runs on GeneralComp { + tc_tmr.start; + } + + function f_ptcSecondBehaviour() runs on GeneralComp { + if (tc_tmr.running) { setverdict(pass); } + else { setverdict(fail); } + } + + + testcase TC_Sem_210302_Start_test_component_005() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create("PTC") alive; + v_ptc.start(f_ptcBehaviour()); + v_ptc.done; + v_ptc.start(f_ptcSecondBehaviour()); + v_ptc.done; + setverdict(pass); + } + + control{ + execute(TC_Sem_210302_Start_test_component_005()); + } +} diff --git a/ATS/core_language/21_configuration_operations/2103_test_component_operations/210302_start_test_component/Sem_210302_Start_test_component_006.ttcn b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210302_start_test_component/Sem_210302_Start_test_component_006.ttcn new file mode 100644 index 00000000..c2f3b2ef --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210302_start_test_component/Sem_210302_Start_test_component_006.ttcn @@ -0,0 +1,45 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:21.3.2, port reuse in alive component + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirements are tested: +// If a function is started on an alive-type PTC after termination of a previous +// function, it uses variable values, timers, ports, and the local verdict as they +// were left after termination of the previous function. + +module Sem_210302_Start_test_component_006 { + + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + function f_ptcBehaviour() runs on GeneralComp { + connect(self:p, self:p); // loopback + p.send(1); + } + + function f_ptcSecondBehaviour() runs on GeneralComp { + p.receive(integer:?); + } + + + testcase TC_Sem_210302_Start_test_component_006() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create("PTC") alive; + v_ptc.start(f_ptcBehaviour()); + v_ptc.done; + v_ptc.start(f_ptcSecondBehaviour()); + v_ptc.done; + setverdict(pass); + } + + control{ + execute(TC_Sem_210302_Start_test_component_006()); + } +} diff --git a/ATS/core_language/21_configuration_operations/2103_test_component_operations/210302_start_test_component/Sem_210302_Start_test_component_007.ttcn b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210302_start_test_component/Sem_210302_Start_test_component_007.ttcn new file mode 100644 index 00000000..8f95f890 --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210302_start_test_component/Sem_210302_Start_test_component_007.ttcn @@ -0,0 +1,39 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:21.3.2, verdict value reuse in alive component + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirements are tested: +// If a function is started on an alive-type PTC after termination of a previous +// function, it uses variable values, timers, ports, and the local verdict as they +// were left after termination of the previous function. + +module Sem_210302_Start_test_component_007 { + + type component GeneralComp { + } + + function f_ptcBehaviour() runs on GeneralComp { + setverdict(pass); + } + + function f_ptcSecondBehaviour() runs on GeneralComp { + if (getverdict != pass) { setverdict(fail); } + } + + + testcase TC_Sem_210302_Start_test_component_007() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create("PTC") alive; + v_ptc.start(f_ptcBehaviour()); + v_ptc.done; + v_ptc.start(f_ptcSecondBehaviour()); + v_ptc.done; + setverdict(pass); + } + + control{ + execute(TC_Sem_210302_Start_test_component_007()); + } +} diff --git a/ATS/core_language/21_configuration_operations/2103_test_component_operations/210302_start_test_component/Sem_210302_Start_test_component_008.ttcn b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210302_start_test_component/Sem_210302_Start_test_component_008.ttcn new file mode 100644 index 00000000..709cea98 --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210302_start_test_component/Sem_210302_Start_test_component_008.ttcn @@ -0,0 +1,42 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:21.3.2, timer reuse in alive component + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirements are tested: +// If a function is started on an alive-type PTC after termination of a previous +// function, it uses variable values, timers, ports, and the local verdict as they +// were left after termination of the previous function. + +module Sem_210302_Start_test_component_008 { + + type component GeneralComp { + timer tc_tmr := 30.0; + } + + function f_ptcBehaviour() runs on GeneralComp { + tc_tmr.start; + } + + function f_ptcSecondBehaviour() runs on GeneralComp { + if (tc_tmr.running) { setverdict(pass); } + else { setverdict(fail); } + } + + + testcase TC_Sem_210302_Start_test_component_008() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create("PTC") alive; + v_ptc.start(f_ptcBehaviour()); + v_ptc.done; + v_ptc.start(f_ptcSecondBehaviour()); + v_ptc.done; + setverdict(pass); + } + + control{ + execute(TC_Sem_210302_Start_test_component_008()); + } +} + diff --git a/ATS/core_language/21_configuration_operations/2103_test_component_operations/210302_start_test_component/Sem_210302_Start_test_component_009.ttcn b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210302_start_test_component/Sem_210302_Start_test_component_009.ttcn new file mode 100644 index 00000000..9190fa45 --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210302_start_test_component/Sem_210302_Start_test_component_009.ttcn @@ -0,0 +1,54 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:21.3.2, deactivation of defaults in alive components + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirements are tested: +// In contrast to that, all active defaults are deactivated when the behaviour of +// an alive-type PTC is stopped. This means no default is activated when a new +// behaviour is started on an alive-type PTC. + +module Sem_210302_Start_test_component_009 { + + type port P message { + inout integer; + } + + type component GeneralComp { + timer tc_tmr := 1.0; + port P p; + } + + altstep a_receive() runs on GeneralComp { + [] p.receive(integer:?) { setverdict(fail); } + } + + function f_ptcBehaviour() runs on GeneralComp { + activate(a_receive()); + } + + function f_ptcSecondBehaviour() runs on GeneralComp { + tc_tmr.start; + alt { + [] tc_tmr.timeout { setverdict(pass); } + } + } + + + testcase TC_Sem_210302_Start_test_component_009() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create("PTC") alive; + connect(self:p, v_ptc:p); + v_ptc.start(f_ptcBehaviour()); + v_ptc.done; + p.send(2); + v_ptc.start(f_ptcSecondBehaviour()); + v_ptc.done; + setverdict(pass); + } + + control{ + execute(TC_Sem_210302_Start_test_component_009()); + } +} \ No newline at end of file diff --git a/ATS/core_language/21_configuration_operations/2103_test_component_operations/210302_start_test_component/Sem_210302_Start_test_component_010.ttcn b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210302_start_test_component/Sem_210302_Start_test_component_010.ttcn new file mode 100644 index 00000000..daf8e07c --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210302_start_test_component/Sem_210302_Start_test_component_010.ttcn @@ -0,0 +1,37 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:21.3.2, starting function with compatible "runs on" clause + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirements are tested: +// The function invoked in a start test component operation shall have a runs on +// definition referencing a component type that is compatible with the newly +// created component (see clause 6.3.3). + +module Sem_210302_Start_test_component_010 { + + type component GeneralComp { + } + + type component GeneralCompEx extends GeneralComp { + var integer vc_int := 0; + } + + + function f_ptcBehaviour() runs on GeneralComp { + setverdict(pass, "Executing PTC behaviour..."); + } + + testcase TC_Sem_210302_Start_test_component_010() runs on GeneralComp system GeneralComp { + var GeneralCompEx v_ptc := GeneralCompEx.create("PTC") alive; + v_ptc.start(f_ptcBehaviour()); + v_ptc.done; + setverdict(pass); + } + + control{ + execute(TC_Sem_210302_Start_test_component_010()); + } +} diff --git a/ATS/core_language/21_configuration_operations/2103_test_component_operations/210302_start_test_component/Sem_210302_Start_test_component_011.ttcn b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210302_start_test_component/Sem_210302_Start_test_component_011.ttcn new file mode 100644 index 00000000..8fd664b5 --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210302_start_test_component/Sem_210302_Start_test_component_011.ttcn @@ -0,0 +1,41 @@ +/*************************************************** + ** @author STF 487 (updated by STF 521) + ** @version 0.0.2 + ** @purpose 1:21.3.2, altstep in test component start operation + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirements are tested: +// The start operation shall bind the required behaviour to the test component. This +// behaviour is defined by reference to an already defined function or altstep. +// NOTE: altstep support added in TTCN-3:2016 -> the test was changed to positive one. + +module Sem_210302_Start_test_component_011 { + + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + altstep a_test() runs on GeneralComp { + [] p.receive(integer:?) { + setverdict(pass); + } + } + + testcase TC_Sem_210302_Start_test_component_011() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create("PTC"); + connect(self:p, v_ptc:p); + p.send(1); + v_ptc.start(a_test()); + v_ptc.done; + setverdict(pass); + } + + control{ + execute(TC_Sem_210302_Start_test_component_011()); + } +} diff --git a/ATS/core_language/21_configuration_operations/2103_test_component_operations/210302_start_test_component/Sem_210302_Start_test_component_012.ttcn b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210302_start_test_component/Sem_210302_Start_test_component_012.ttcn new file mode 100644 index 00000000..e6c8012b --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210302_start_test_component/Sem_210302_Start_test_component_012.ttcn @@ -0,0 +1,46 @@ +/***************************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:21.3.2, Ensure that start operation works with parametered altsteps + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +// The following requirement is tested: The start operation shall bind the required behaviour to the test component. +// This behaviour is defined by reference to an already defined function or altstep. + +module Sem_210302_Start_test_component_012 { + + type port myPortType message { + inout integer; + } + + type component GeneralCompSystem { } + type component GeneralComp { + port myPortType myPort; + } + + altstep a_myBehaviour() runs on GeneralComp { + + [] any port.receive { + setverdict(pass); + } + } + + + testcase TC_Sem_210302_Start_test_component_012() runs on GeneralComp system GeneralCompSystem { + var GeneralComp ptc; + + ptc:=GeneralComp.create alive; + + connect(mtc:myPort, ptc:myPort); + myPort.send(1); + + ptc.start(a_myBehaviour()); + ptc.done; + + setverdict(pass); + } + + control { + execute(TC_Sem_210302_Start_test_component_012()); + } +} \ No newline at end of file diff --git a/ATS/core_language/21_configuration_operations/2103_test_component_operations/210302_start_test_component/Sem_210302_Start_test_component_013.ttcn b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210302_start_test_component/Sem_210302_Start_test_component_013.ttcn new file mode 100644 index 00000000..e832f71e --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210302_start_test_component/Sem_210302_Start_test_component_013.ttcn @@ -0,0 +1,28 @@ +/***************************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:21.3.2, Ensure that inout parameters will be passed to the function by value, i.e. like in-parameters. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +// Actual inout parameters will be passed to the function by value, i.e. like in-parameters. + +module Sem_210302_Start_test_component_013 { + + type component GeneralComp { } + function f(inout integer v_in) runs on GeneralComp { + if(match(v_in,5)){ setverdict(pass); } + + } + + testcase TC_Sem_210302_Start_test_component_013() runs on GeneralComp system GeneralComp { + var GeneralComp ptc; + var integer v_var:=5; + ptc:=GeneralComp.create alive; + ptc.start(f(v_var)); + setverdict(pass); + } + + control { + execute(TC_Sem_210302_Start_test_component_013()); + } +} \ No newline at end of file diff --git a/ATS/core_language/21_configuration_operations/2103_test_component_operations/210302_start_test_component/Sem_210302_Start_test_component_014.ttcn b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210302_start_test_component/Sem_210302_Start_test_component_014.ttcn new file mode 100644 index 00000000..f3720ab8 --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210302_start_test_component/Sem_210302_Start_test_component_014.ttcn @@ -0,0 +1,39 @@ +/***************************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:21.3.2, Ensure that inout parameters will be passed to the function by value, i.e. like in-parameters. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +// Possible return values of a function invoked in a start test component operation, +// i.e. templates denoted by return keyword or inout and out parameters, have no effect +// when the started test component terminates. + +module Sem_210302_Start_test_component_014 { + + type component GeneralComp { + var integer v_var:=5; + } + + function f() runs on GeneralComp return integer { + v_var:=1; + return v_var; // return value v_var:=1 + } + + testcase TC_Sem_210302_Start_test_component_014() runs on GeneralComp system GeneralComp { + var GeneralComp ptc; + + ptc:=GeneralComp.create alive; + ptc.start(f()); + + if(match(v_var,5)){ + setverdict(pass); + } + else { + setverdict(fail,v_var); + } + } + + control { + execute(TC_Sem_210302_Start_test_component_014()); + } +} \ No newline at end of file diff --git a/ATS/core_language/21_configuration_operations/2103_test_component_operations/210303_stop_test_component/NegSem_210303_Stop_test_component_001.ttcn b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210303_stop_test_component/NegSem_210303_Stop_test_component_001.ttcn new file mode 100644 index 00000000..48e948f7 --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210303_stop_test_component/NegSem_210303_Stop_test_component_001.ttcn @@ -0,0 +1,37 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:21.3.3, restarting explicitly stopped non-alive component + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// Stopping a non-alive-type test component (implicitly or explicitly) shall destroy +// it and all resources associated with the test component shall be released. + +module NegSem_210303_Stop_test_component_001 { + + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + function f() runs on GeneralComp { + p.receive(integer:?); + } + + testcase TC_NegSem_210303_Stop_test_component_001() runs on GeneralComp system GeneralComp { + var GeneralComp ptc := GeneralComp.create; + ptc.start(f()); + ptc.stop; + ptc.start(f()); + setverdict(pass); + } + + control { + execute(TC_NegSem_210303_Stop_test_component_001()); + } +} \ No newline at end of file diff --git a/ATS/core_language/21_configuration_operations/2103_test_component_operations/210303_stop_test_component/NegSem_210303_Stop_test_component_002.ttcn b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210303_stop_test_component/NegSem_210303_Stop_test_component_002.ttcn new file mode 100644 index 00000000..ca494de6 --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210303_stop_test_component/NegSem_210303_Stop_test_component_002.ttcn @@ -0,0 +1,36 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:21.3.3, stopping all PTCs from a PTC + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// The all keyword can be used by the MTC only in order to stop all running PTCs but +// the MTC itself. + +module NegSem_210303_Stop_test_component_002 { + + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + function f() runs on GeneralComp { + all component.stop; + } + + testcase TC_NegSem_210303_Stop_test_component_002() runs on GeneralComp system GeneralComp { + var GeneralComp ptc := GeneralComp.create; + ptc.start(f()); + ptc.done; + setverdict(pass); + } + + control { + execute(TC_NegSem_210303_Stop_test_component_002()); + } +} \ No newline at end of file diff --git a/ATS/core_language/21_configuration_operations/2103_test_component_operations/210303_stop_test_component/NegSem_210303_Stop_test_component_003.ttcn b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210303_stop_test_component/NegSem_210303_Stop_test_component_003.ttcn new file mode 100644 index 00000000..3d31c32d --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210303_stop_test_component/NegSem_210303_Stop_test_component_003.ttcn @@ -0,0 +1,40 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:21.3.3, applying stop operation to a variable of a different than component type + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// The variable associated with VariableRef (being a component type variable, a component +// type parameter, etc.) or the return type associated with FunctionInstance shall be of +// component type. + +module NegSem_210303_Stop_test_component_003 { + + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + function f_behaviour() runs on GeneralComp { + p.receive(integer:?); // infinite blocking + } + + testcase TC_NegSem_210303_Stop_test_component_003() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc[2]; + v_ptc[0] := GeneralComp.create; + v_ptc[1] := GeneralComp.create; + v_ptc[0].start(f_behaviour()); + v_ptc[1].start(f_behaviour()); + v_ptc.stop; + setverdict(pass); + } + + control { + execute(TC_NegSem_210303_Stop_test_component_003()); + } +} \ No newline at end of file diff --git a/ATS/core_language/21_configuration_operations/2103_test_component_operations/210303_stop_test_component/NegSem_210303_Stop_test_component_004.ttcn b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210303_stop_test_component/NegSem_210303_Stop_test_component_004.ttcn new file mode 100644 index 00000000..3ca8dedd --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210303_stop_test_component/NegSem_210303_Stop_test_component_004.ttcn @@ -0,0 +1,46 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:21.3.3, applying stop operation to a function call result of a different than component type + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// The variable associated with VariableRef (being a component type variable, a component +// type parameter, etc.) or the return type associated with FunctionInstance shall be of +// component type. + +module NegSem_210303_Stop_test_component_004 { + + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + type GeneralComp CompArray[2]; + + function f_behaviour() runs on GeneralComp { + p.receive(integer:?); // infinite blocking + } + + function f_createComponents() return CompArray { + var CompArray v_ptc; + v_ptc[0] := GeneralComp.create; + v_ptc[1] := GeneralComp.create; + v_ptc[0].start(f_behaviour()); + v_ptc[1].start(f_behaviour()); + return v_ptc; + } + + testcase TC_NegSem_210303_Stop_test_component_004() runs on GeneralComp system GeneralComp { + f_createComponents().stop; + setverdict(pass); + } + + control { + execute(TC_NegSem_210303_Stop_test_component_004()); + } +} \ No newline at end of file diff --git a/ATS/core_language/21_configuration_operations/2103_test_component_operations/210303_stop_test_component/Sem_210303_Stop_test_component_001.ttcn b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210303_stop_test_component/Sem_210303_Stop_test_component_001.ttcn new file mode 100644 index 00000000..a781610b --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210303_stop_test_component/Sem_210303_Stop_test_component_001.ttcn @@ -0,0 +1,46 @@ +/***************************************************************** + ** @author STF 451 + ** @version 0.0.1 + ** @purpose 1:21.3.3, Ensure that component.stop causes the stopping of the target component. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_210303_Stop_test_component_001 { + + type component GeneralComp { } + + function f() runs on GeneralComp { + // wait until component is stopped from outside + while (true) {} + } + + + testcase TC_Sem_210303_Stop_test_component_001() runs on GeneralComp system GeneralComp { + timer t := 1.0; + var GeneralComp ptc; + ptc:=GeneralComp.create; + + ptc.start(f()); + + // wait until component started + t.start; + t.timeout; + + ptc.stop; + + // Test ptc behavior after stop + if (ptc.running==false) + { + setverdict(pass); + } + else + { + setverdict(fail, "Component still running"); + } + + } + + control { + execute(TC_Sem_210303_Stop_test_component_001()); + } +} \ No newline at end of file diff --git a/ATS/core_language/21_configuration_operations/2103_test_component_operations/210303_stop_test_component/Sem_210303_Stop_test_component_002.ttcn b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210303_stop_test_component/Sem_210303_Stop_test_component_002.ttcn new file mode 100644 index 00000000..d59e1a88 --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210303_stop_test_component/Sem_210303_Stop_test_component_002.ttcn @@ -0,0 +1,35 @@ +/***************************************************************** + ** @author STF 451, updated by STF 487 + ** @version 0.0.1 + ** @purpose 1:21.3.3, Ensure that self.stop stops current component + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirements are tested: +// A component can stop its own behaviour by using a simple stop execution statement +// (see clause 19.9) or by addressing itself in the stop operation, e.g. by using +// the self operation. + +module Sem_210303_Stop_test_component_002 { + + type component GeneralComp { + } + function f() runs on GeneralComp { + var boolean v_cond := true; + if (v_cond) { + setverdict(pass); + self.stop; //stops the ptc + } + setverdict(fail); // in case the stop operation doesn't work + } + + testcase TC_Sem_210303_Stop_test_component_002() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + v_ptc.start(f()); + v_ptc.done; + } + + control { + execute(TC_Sem_210303_Stop_test_component_002()); + } +} \ No newline at end of file diff --git a/ATS/core_language/21_configuration_operations/2103_test_component_operations/210303_stop_test_component/Sem_210303_Stop_test_component_003.ttcn b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210303_stop_test_component/Sem_210303_Stop_test_component_003.ttcn new file mode 100644 index 00000000..9d2420fa --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210303_stop_test_component/Sem_210303_Stop_test_component_003.ttcn @@ -0,0 +1,43 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:21.3.3, stopping MTC from PTC + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirements are tested: +// By using the stop test component statement a test component can stop the execution +// of its own currently running test behaviour or the execution of the test behaviour +// running on another test component. If a component does not stop its own behaviour, +// but the behaviour running on another test component in the test system, the component +// to be stopped has to be identified by using its component reference. +// +// If the stopped test component is the MTC, resources of all existing PTCs shall be +// released, the PTCs shall be removed from the test system and the test case shall +// terminate (see clause 26.1). + +module Sem_210303_Stop_test_component_003 { + + type component GeneralComp { + } + + function f() runs on GeneralComp { + var boolean v_cond := true; + if (v_cond) { // to prevent "unreachable statement" errors + setverdict(pass); + mtc.stop; //stops the MTC and as a consequence the PTC is stopped too + } + setverdict(fail); // in case the stop operation doesn't work + } + + testcase TC_Sem_210303_Stop_test_component_003() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + v_ptc.start(f()); + v_ptc.done; + setverdict(fail); // this statement shall never be reached + } + + control { + execute(TC_Sem_210303_Stop_test_component_003()); + } +} \ No newline at end of file diff --git a/ATS/core_language/21_configuration_operations/2103_test_component_operations/210303_stop_test_component/Sem_210303_Stop_test_component_004.ttcn b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210303_stop_test_component/Sem_210303_Stop_test_component_004.ttcn new file mode 100644 index 00000000..a17777dd --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210303_stop_test_component/Sem_210303_Stop_test_component_004.ttcn @@ -0,0 +1,52 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:21.3.3, stop.self in MTC + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirements are tested: +// A component can stop its own behaviour by using a simple stop execution statement +// (see clause 19.9) or by addressing itself in the stop operation, e.g. by using the +// self operation. +// +// If the stopped test component is the MTC, resources of all existing PTCs shall be +// released, the PTCs shall be removed from the test system and the test case shall +// terminate (see clause 26.1). + +module Sem_210303_Stop_test_component_004 { + + type component GeneralComp { + } + + function f() runs on GeneralComp { + timer t_tmr := 2.0; + t_tmr.start; + t_tmr.timeout; + setverdict(fail); // in case the stop operation doesn't work + } + + testcase TC_Sem_210303_Stop_test_component_004() runs on GeneralComp system GeneralComp { + var boolean v_cond := true; + var GeneralComp v_ptc := GeneralComp.create; + v_ptc.start(f()); + if (v_cond) { // to prevent "unreachable statement" errors + setverdict(pass); + self.stop; // stops the MTC and as a consequence the PTC is stopped too + } + setverdict(fail); // this statement shall never be reached + } + + testcase TC_Sem_210303_Stop_test_component_004_next() runs on GeneralComp system GeneralComp { + timer t_tmr := 2.5; + t_tmr.start; + t_tmr.timeout; + setverdict(pass); + } + + control { + execute(TC_Sem_210303_Stop_test_component_004()); + // run another test case to make sure the PTC is not active and doesn't influence its result + execute(TC_Sem_210303_Stop_test_component_004_next()); + } +} \ No newline at end of file diff --git a/ATS/core_language/21_configuration_operations/2103_test_component_operations/210303_stop_test_component/Sem_210303_Stop_test_component_005.ttcn b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210303_stop_test_component/Sem_210303_Stop_test_component_005.ttcn new file mode 100644 index 00000000..93e40cf6 --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210303_stop_test_component/Sem_210303_Stop_test_component_005.ttcn @@ -0,0 +1,40 @@ +/*************************************************** + ** @author STF 487 (updated by STF 521) + ** @version 0.0.2 + ** @purpose 1:21.3.3, alive component restart after explicit stop + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirements are tested: +// Stopping an alive-type component shall stop the currently running behaviour only +// but the component continues to exist and can execute new behaviour (started on +// it using the start operation). + +module Sem_210303_Stop_test_component_005 { + + type component GeneralComp { + } + + function f_ptcBehaviour() runs on GeneralComp { + timer t_tmr := 1.0; + t_tmr.start; + t_tmr.timeout; + } + + function f_ptcSecondBehaviour() runs on GeneralComp { + setverdict(pass); + } + + + testcase TC_Sem_210303_Stop_test_component_005() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create("PTC") alive; + v_ptc.start(f_ptcBehaviour()); + v_ptc.stop; + v_ptc.start(f_ptcSecondBehaviour()); + v_ptc.done; + } + + control{ + execute(TC_Sem_210303_Stop_test_component_005()); + } +} diff --git a/ATS/core_language/21_configuration_operations/2103_test_component_operations/210303_stop_test_component/Sem_210303_Stop_test_component_006.ttcn b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210303_stop_test_component/Sem_210303_Stop_test_component_006.ttcn new file mode 100644 index 00000000..f8df3b82 --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210303_stop_test_component/Sem_210303_Stop_test_component_006.ttcn @@ -0,0 +1,52 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:21.3.3, component variable value reuse in alive component after explicit stop + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirements are tested: +// Stopping an alive-type component means that all variables, timers and ports +// declared in the component type definition of the alive-type component keep their +// value, contents or state. + +module Sem_210303_Stop_test_component_006 { + + type port P message { + inout charstring; + } + + type component GeneralComp { + var integer vc_val := 0; + port P p; + } + + function f_ptcBehaviour() runs on GeneralComp { + vc_val := 1; + p.send("PTC started"); + p.receive(charstring:?); // this will never come + setverdict(fail); + } + + function f_ptcSecondBehaviour() runs on GeneralComp { + if (vc_val == 1) { setverdict(pass); } + else { setverdict(fail); } + } + + + testcase TC_Sem_210303_Stop_test_component_006() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create("PTC") alive; + connect(self:p, v_ptc:p); + v_ptc.start(f_ptcBehaviour()); + p.receive(charstring:?); + v_ptc.stop; + p.send("greetings from the MTC"); + v_ptc.start(f_ptcSecondBehaviour()); + v_ptc.done; + setverdict(pass); + } + + control{ + execute(TC_Sem_210303_Stop_test_component_006()); + } +} diff --git a/ATS/core_language/21_configuration_operations/2103_test_component_operations/210303_stop_test_component/Sem_210303_Stop_test_component_007.ttcn b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210303_stop_test_component/Sem_210303_Stop_test_component_007.ttcn new file mode 100644 index 00000000..64aa184a --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210303_stop_test_component/Sem_210303_Stop_test_component_007.ttcn @@ -0,0 +1,51 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:21.3.3, timer reuse in alive component after explicit stop + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirements are tested: +// Stopping an alive-type component means that all variables, timers and ports +// declared in the component type definition of the alive-type component keep their +// value, contents or state. + +module Sem_210303_Stop_test_component_007 { + + type port P message { + inout integer; + } + + type component GeneralComp { + timer tc_tmr := 2.0; + port P p; + } + + function f_ptcBehaviour() runs on GeneralComp { + tc_tmr.start; + p.send(1); + p.receive(integer:?); + setverdict(fail); + } + + function f_ptcSecondBehaviour() runs on GeneralComp { + tc_tmr.timeout; + setverdict(pass); + } + + + testcase TC_Sem_210303_Stop_test_component_007() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create("PTC") alive; + connect(self:p, v_ptc:p); + v_ptc.start(f_ptcBehaviour()); + p.receive(integer:?); + v_ptc.stop; + v_ptc.start(f_ptcSecondBehaviour()); + v_ptc.done; + } + + control{ + execute(TC_Sem_210303_Stop_test_component_007()); + } +} + diff --git a/ATS/core_language/21_configuration_operations/2103_test_component_operations/210303_stop_test_component/Sem_210303_Stop_test_component_008.ttcn b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210303_stop_test_component/Sem_210303_Stop_test_component_008.ttcn new file mode 100644 index 00000000..2e9505d1 --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210303_stop_test_component/Sem_210303_Stop_test_component_008.ttcn @@ -0,0 +1,50 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:21.3.3, port reuse in alive component after explicit stop + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirements are tested: +// Stopping an alive-type component means that all variables, timers and ports +// declared in the component type definition of the alive-type component keep their +// value, contents or state. + +module Sem_210303_Stop_test_component_008 { + + type port P message { + inout integer; + } + + type component GeneralComp { + port P p1, p2; + } + + function f_ptcBehaviour() runs on GeneralComp { + connect(self:p1, self:p1); // loopback + connect(mtc:p2, self:p2); // mtc + p1.send(1); + p2.send(2); + p2.receive(integer:?); + setverdict(fail); + } + + function f_ptcSecondBehaviour() runs on GeneralComp { + p1.receive(integer:?); + setverdict(pass); + } + + + testcase TC_Sem_210303_Stop_test_component_008() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create("PTC") alive; + v_ptc.start(f_ptcBehaviour()); + p2.receive(integer:?); + v_ptc.stop; + v_ptc.start(f_ptcSecondBehaviour()); + v_ptc.done; + } + + control{ + execute(TC_Sem_210303_Stop_test_component_008()); + } +} diff --git a/ATS/core_language/21_configuration_operations/2103_test_component_operations/210303_stop_test_component/Sem_210303_Stop_test_component_009.ttcn b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210303_stop_test_component/Sem_210303_Stop_test_component_009.ttcn new file mode 100644 index 00000000..70d789be --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210303_stop_test_component/Sem_210303_Stop_test_component_009.ttcn @@ -0,0 +1,46 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:21.3.2, verdict value reuse in alive component after explicit stop + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirements are tested: +// Furthermore, the local verdict of the component keeps its value. + +module Sem_210303_Stop_test_component_009 { + + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + function f_ptcBehaviour() runs on GeneralComp { + setverdict(pass); + p.send(1); + p.receive(integer:?); + setverdict(fail); + } + + function f_ptcSecondBehaviour() runs on GeneralComp { + if (getverdict != pass) { setverdict(fail); } + } + + + testcase TC_Sem_210303_Stop_test_component_009() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create("PTC") alive; + connect(self:p, v_ptc:p); + v_ptc.start(f_ptcBehaviour()); + p.receive(integer:?); + v_ptc.stop; + v_ptc.start(f_ptcSecondBehaviour()); + v_ptc.done; + } + + control{ + execute(TC_Sem_210303_Stop_test_component_009()); + } +} diff --git a/ATS/core_language/21_configuration_operations/2103_test_component_operations/210303_stop_test_component/Sem_210303_Stop_test_component_010.ttcn b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210303_stop_test_component/Sem_210303_Stop_test_component_010.ttcn new file mode 100644 index 00000000..daa3af97 --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210303_stop_test_component/Sem_210303_Stop_test_component_010.ttcn @@ -0,0 +1,57 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:21.3.3, deactivation of defaults in alive components after explicit stop + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirements are tested: +// In contrast to that, all active defaults are automatically deactivated when +// the alive-type component is stopped. + +module Sem_210303_Stop_test_component_010 { + + type port P message { + inout integer; + } + + type component GeneralComp { + timer tc_tmr := 1.0; + port P p; + } + + altstep a_receive() runs on GeneralComp { + [] p.receive(integer:?) { setverdict(fail); } + } + + function f_ptcBehaviour() runs on GeneralComp { + activate(a_receive()); + p.send(1); + p.receive(integer:?); // infinite blocking as MTC doesn't send anything + setverdict(fail); + } + + function f_ptcSecondBehaviour() runs on GeneralComp { + tc_tmr.start; + alt { + [] tc_tmr.timeout { setverdict(pass); } + } + } + + + testcase TC_Sem_210303_Stop_test_component_010() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create("PTC") alive; + connect(self:p, v_ptc:p); + v_ptc.start(f_ptcBehaviour()); + p.receive(integer:?); + v_ptc.stop; + p.send(2); + v_ptc.start(f_ptcSecondBehaviour()); + v_ptc.done; + setverdict(pass); + } + + control{ + execute(TC_Sem_210303_Stop_test_component_010()); + } +} \ No newline at end of file diff --git a/ATS/core_language/21_configuration_operations/2103_test_component_operations/210303_stop_test_component/Sem_210303_Stop_test_component_011.ttcn b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210303_stop_test_component/Sem_210303_Stop_test_component_011.ttcn new file mode 100644 index 00000000..1e5a51ee --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210303_stop_test_component/Sem_210303_Stop_test_component_011.ttcn @@ -0,0 +1,41 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:21.3.3, stopping all PTCs + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirements are tested: +// The all keyword can be used by the MTC only in order to stop all running PTCs but +// the MTC itself. + +module Sem_210303_Stop_test_component_011 { + + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + function f() runs on GeneralComp { + p.receive(integer:?); // infinite blocking + } + + testcase TC_Sem_210303_Stop_test_component_011() runs on GeneralComp system GeneralComp { + var GeneralComp ptc1 := GeneralComp.create, ptc2 := GeneralComp.create; + ptc1.start(f()); + ptc2.start(f()); + all component.stop; + interleave { + [] ptc1.done {} + [] ptc2.done {} + } + setverdict(pass); + } + + control { + execute(TC_Sem_210303_Stop_test_component_011()); + } +} \ No newline at end of file diff --git a/ATS/core_language/21_configuration_operations/2103_test_component_operations/210304_kill_test_component_operation/NegSem_210304_kill_test_component_001.ttcn b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210304_kill_test_component_operation/NegSem_210304_kill_test_component_001.ttcn new file mode 100644 index 00000000..3dff8492 --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210304_kill_test_component_operation/NegSem_210304_kill_test_component_001.ttcn @@ -0,0 +1,39 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:21.3.4, restarting explicitly killed non-alive component + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// The kill operation applied on a test component stops the execution of the currently +// running behaviour - if any - of that component and frees all resources associated +// to it (including all port connections of the killed component) and removes the +// component from the test system. + +module NegSem_210304_kill_test_component_001 { + + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + function f() runs on GeneralComp { + p.receive(integer:?); + } + + testcase TC_NegSem_210304_kill_test_component_001() runs on GeneralComp system GeneralComp { + var GeneralComp ptc := GeneralComp.create; + ptc.start(f()); + ptc.kill; + ptc.start(f()); + setverdict(pass); + } + + control { + execute(TC_NegSem_210304_kill_test_component_001()); + } +} \ No newline at end of file diff --git a/ATS/core_language/21_configuration_operations/2103_test_component_operations/210304_kill_test_component_operation/NegSem_210304_kill_test_component_002.ttcn b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210304_kill_test_component_operation/NegSem_210304_kill_test_component_002.ttcn new file mode 100644 index 00000000..3cde8d71 --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210304_kill_test_component_operation/NegSem_210304_kill_test_component_002.ttcn @@ -0,0 +1,39 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:21.3.3, restarting explicitly killed alive component + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// The kill operation applied on a test component stops the execution of the currently +// running behaviour - if any - of that component and frees all resources associated +// to it (including all port connections of the killed component) and removes the +// component from the test system. + +module NegSem_210304_kill_test_component_002 { + + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + function f() runs on GeneralComp { + p.receive(integer:?); + } + + testcase TC_NegSem_210304_kill_test_component_002() runs on GeneralComp system GeneralComp { + var GeneralComp ptc := GeneralComp.create alive; + ptc.start(f()); + ptc.kill; + ptc.start(f()); + setverdict(pass); + } + + control { + execute(TC_NegSem_210304_kill_test_component_002()); + } +} \ No newline at end of file diff --git a/ATS/core_language/21_configuration_operations/2103_test_component_operations/210304_kill_test_component_operation/NegSem_210304_kill_test_component_003.ttcn b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210304_kill_test_component_operation/NegSem_210304_kill_test_component_003.ttcn new file mode 100644 index 00000000..17912e9b --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210304_kill_test_component_operation/NegSem_210304_kill_test_component_003.ttcn @@ -0,0 +1,36 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:21.3.4, killing all PTCs from a PTC + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// The all keyword can be used by the MTC only in order to stop and kill all running PTCs +// but the MTC itself. + +module NegSem_210304_kill_test_component_003 { + + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + function f() runs on GeneralComp { + all component.kill; + } + + testcase TC_NegSem_210304_kill_test_component_003() runs on GeneralComp system GeneralComp { + var GeneralComp ptc := GeneralComp.create; + ptc.start(f()); + ptc.done; + setverdict(pass); + } + + control { + execute(TC_NegSem_210304_kill_test_component_003()); + } +} \ No newline at end of file diff --git a/ATS/core_language/21_configuration_operations/2103_test_component_operations/210304_kill_test_component_operation/NegSem_210304_kill_test_component_004.ttcn b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210304_kill_test_component_operation/NegSem_210304_kill_test_component_004.ttcn new file mode 100644 index 00000000..c37c048f --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210304_kill_test_component_operation/NegSem_210304_kill_test_component_004.ttcn @@ -0,0 +1,40 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:21.3.4, applying kill operation to a variable of a different than component type + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// The variable associated with VariableRef (being a component type variable, a component +// type parameter, etc.) or the return type associated with FunctionInstance shall be of +// component type. + +module NegSem_210304_kill_test_component_004 { + + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + function f_behaviour() runs on GeneralComp { + p.receive(integer:?); // infinite blocking + } + + testcase TC_NegSem_210304_kill_test_component_004() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc[2]; + v_ptc[0] := GeneralComp.create; + v_ptc[1] := GeneralComp.create; + v_ptc[0].start(f_behaviour()); + v_ptc[1].start(f_behaviour()); + v_ptc.kill; + setverdict(pass); + } + + control { + execute(TC_NegSem_210304_kill_test_component_004()); + } +} \ No newline at end of file diff --git a/ATS/core_language/21_configuration_operations/2103_test_component_operations/210304_kill_test_component_operation/NegSem_210304_kill_test_component_005.ttcn b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210304_kill_test_component_operation/NegSem_210304_kill_test_component_005.ttcn new file mode 100644 index 00000000..66b8567a --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210304_kill_test_component_operation/NegSem_210304_kill_test_component_005.ttcn @@ -0,0 +1,46 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:21.3.4, applying kill operation to a function call result of a different than component type + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// The variable associated with VariableRef (being a component type variable, a component +// type parameter, etc.) or the return type associated with FunctionInstance shall be of +// component type. + +module NegSem_210304_kill_test_component_005 { + + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + type GeneralComp CompArray[2]; + + function f_behaviour() runs on GeneralComp { + p.receive(integer:?); // infinite blocking + } + + function f_createComponents() return CompArray { + var CompArray v_ptc; + v_ptc[0] := GeneralComp.create; + v_ptc[1] := GeneralComp.create; + v_ptc[0].start(f_behaviour()); + v_ptc[1].start(f_behaviour()); + return v_ptc; + } + + testcase TC_NegSem_210304_kill_test_component_005() runs on GeneralComp system GeneralComp { + f_createComponents().kill; + setverdict(pass); + } + + control { + execute(TC_NegSem_210304_kill_test_component_005()); + } +} \ No newline at end of file diff --git a/ATS/core_language/21_configuration_operations/2103_test_component_operations/210304_kill_test_component_operation/Sem_210304_kill_test_component_001.ttcn b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210304_kill_test_component_operation/Sem_210304_kill_test_component_001.ttcn new file mode 100644 index 00000000..9e49ba93 --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210304_kill_test_component_operation/Sem_210304_kill_test_component_001.ttcn @@ -0,0 +1,44 @@ +/***************************************************************** + ** @author STF 451, modified by STF 487 + ** @version 0.0.1 + ** @purpose 1:21.3.4, Ensure that kill operator stops a non alive test components. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirements are tested: +// The kill operation applied on a test component stops the execution of the currently +// running behaviour - if any - of that component and frees all resources associated +// to it (including all port connections of the killed component) and removes the +// component from the test system. +// +// The kill operation can also be applied to another test component. In this case the +// component to be killed shall be addressed using its component reference. + +module Sem_210304_kill_test_component_001 { + + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + function f() runs on GeneralComp { + p.receive(integer:?); + } + + testcase TC_Sem_210304_kill_test_component_001() runs on GeneralComp system GeneralComp { + var GeneralComp ptc; + ptc:=GeneralComp.create; + + ptc.start(f()); + ptc.kill; + ptc.killed; + setverdict(pass); + } + + control { + execute(TC_Sem_210304_kill_test_component_001()); + } +} \ No newline at end of file diff --git a/ATS/core_language/21_configuration_operations/2103_test_component_operations/210304_kill_test_component_operation/Sem_210304_kill_test_component_002.ttcn b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210304_kill_test_component_operation/Sem_210304_kill_test_component_002.ttcn new file mode 100644 index 00000000..e2ba6442 --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210304_kill_test_component_operation/Sem_210304_kill_test_component_002.ttcn @@ -0,0 +1,39 @@ +/***************************************************************** + ** @author STF 451 + ** @version 0.0.1 + ** @purpose 1:21.3.4, Ensure that all component kill stop all ptcs + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +//Kill all component (ptc and ptc2) with all component.kill +module Sem_210304_kill_test_component_002 { + + type component GeneralComp { + var integer v_gc:=0; + var integer v_res:=0;} + function f1 ( ) runs on GeneralComp {} + + testcase TC_Sem_210304_kill_test_component_002() runs on GeneralComp system GeneralComp { + var GeneralComp ptc; + var GeneralComp ptc2; + ptc:=GeneralComp.create alive; + ptc2:=GeneralComp.create alive; + + ptc.start(f1()); + ptc2.start(f1()); + + all component.kill; + + if (all component.alive==false) { + setverdict(pass); + } + else + { + setverdict(fail); + } + + } + + control { + execute(TC_Sem_210304_kill_test_component_002()); + } +} \ No newline at end of file diff --git a/ATS/core_language/21_configuration_operations/2103_test_component_operations/210304_kill_test_component_operation/Sem_210304_kill_test_component_003.ttcn b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210304_kill_test_component_operation/Sem_210304_kill_test_component_003.ttcn new file mode 100644 index 00000000..7ae1b9f5 --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210304_kill_test_component_operation/Sem_210304_kill_test_component_003.ttcn @@ -0,0 +1,39 @@ +/***************************************************************** + ** @author STF 451 + ** @version 0.0.1 + ** @purpose 1:21.3.4, Ensure that kill operator stops only non alive test components + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +//Kill only stops non alive test components +module Sem_210304_kill_test_component_003 { + + type component GeneralComp { + var integer v_gc:=0; + var integer v_res:=0;} + function f1 ( ) runs on GeneralComp {} + + testcase TC_Sem_210304_kill_test_component_003() runs on GeneralComp system GeneralComp { + var GeneralComp ptc; + var GeneralComp ptc2; + ptc:=GeneralComp.create alive; + ptc2:=GeneralComp.create alive; + + ptc.start(f1()); + ptc2.start(f1()); + ptc.kill; + + + if (match(ptc.alive, false) and match(ptc2.alive, true)) { + setverdict(pass); + } + else + { + setverdict(fail); + } + + } + + control { + execute(TC_Sem_210304_kill_test_component_003()); + } +} \ No newline at end of file diff --git a/ATS/core_language/21_configuration_operations/2103_test_component_operations/210304_kill_test_component_operation/Sem_210304_kill_test_component_004.ttcn b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210304_kill_test_component_operation/Sem_210304_kill_test_component_004.ttcn new file mode 100644 index 00000000..07f1d1aa --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210304_kill_test_component_operation/Sem_210304_kill_test_component_004.ttcn @@ -0,0 +1,34 @@ +/***************************************************************** + ** @author STF 451, modified by STF 487 + ** @version 0.0.1 + ** @purpose 1:21.3.4, Ensure that self kill called in a functions stops non alive test comp. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +// non alive test component calls function with self.kill + +module Sem_210304_kill_test_component_004 { + + type component GeneralComp { + timer t; + } + function f() runs on GeneralComp { + self.kill; + setverdict(fail); + } + + + testcase TC_Sem_210304_kill_test_component_004() runs on GeneralComp system GeneralComp { + var GeneralComp ptc := GeneralComp.create; + + ptc.start(f()); + t.start(5.0); + alt { + [] ptc.killed { setverdict(pass); } + [] t.timeout { setverdict(fail); } + } + } + + control { + execute(TC_Sem_210304_kill_test_component_004()); + } +} \ No newline at end of file diff --git a/ATS/core_language/21_configuration_operations/2103_test_component_operations/210304_kill_test_component_operation/Sem_210304_kill_test_component_005.ttcn b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210304_kill_test_component_operation/Sem_210304_kill_test_component_005.ttcn new file mode 100644 index 00000000..efd4ce7e --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210304_kill_test_component_operation/Sem_210304_kill_test_component_005.ttcn @@ -0,0 +1,40 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:21.3.4, standalone kill in alive PTC + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirements are tested: +// The kill operation can be applied on the current test component itself by a simple +// kill statement or by addressing itself using the self operation in conjunction with +// the kill operation. + + +module Sem_210304_kill_test_component_005 { + + type component GeneralComp { + timer t; + } + + function f() runs on GeneralComp { + var boolean v_bCond := true; + if (v_bCond) { kill; } // to bypass possible "unreachable statement" errors + setverdict(fail); + } + + testcase TC_Sem_210304_kill_test_component_005() runs on GeneralComp system GeneralComp { + var GeneralComp ptc := GeneralComp.create alive; + + ptc.start(f()); + t.start(5.0); + alt { + [] ptc.killed { setverdict(pass); } + [] t.timeout { setverdict(fail); } + } + } + + control { + execute(TC_Sem_210304_kill_test_component_005()); + } +} \ No newline at end of file diff --git a/ATS/core_language/21_configuration_operations/2103_test_component_operations/210304_kill_test_component_operation/Sem_210304_kill_test_component_006.ttcn b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210304_kill_test_component_operation/Sem_210304_kill_test_component_006.ttcn new file mode 100644 index 00000000..23142d65 --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210304_kill_test_component_operation/Sem_210304_kill_test_component_006.ttcn @@ -0,0 +1,39 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:21.3.4, killing MTC from PTC + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirements are tested: +// The kill operation can be applied on the current test component itself by a simple +// kill statement or by addressing itself using the self operation in conjunction with +// the kill operation. + + +module Sem_210304_kill_test_component_006 { + + type component GeneralComp { + timer t; + } + + function f() runs on GeneralComp { + var boolean v_bCond := true; + setverdict(pass); + if (v_bCond) { mtc.kill; } // to bypass possible "unreachable statement" errors + setverdict(fail); + } + + testcase TC_Sem_210304_kill_test_component_006() runs on GeneralComp system GeneralComp { + var GeneralComp ptc := GeneralComp.create alive; + + ptc.start(f()); + t.start(5.0); + t.timeout; + setverdict(fail); + } + + control { + execute(TC_Sem_210304_kill_test_component_006()); + } +} \ No newline at end of file diff --git a/ATS/core_language/21_configuration_operations/2103_test_component_operations/210305_alive_operation/NegSem_210305_alive_operation_001.ttcn b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210305_alive_operation/NegSem_210305_alive_operation_001.ttcn new file mode 100644 index 00000000..e690cf5e --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210305_alive_operation/NegSem_210305_alive_operation_001.ttcn @@ -0,0 +1,35 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:21.3.5, Verify that error occurs when any from alive is applied to single component + ** @verdict pass reject + *****************************************************************/ +// The following requirements are tested: +// Restriction b +// The ComponentArrayRef shall be a reference to a component array variable identifier. +module NegSem_210305_alive_operation_001 { + + type component GeneralComp {} + + function f() runs on GeneralComp { + timer t := 100.0; + t.start; + t.timeout; + } + + testcase TC_NegSem_210305_alive_operation_001() runs on GeneralComp system GeneralComp { + var boolean v_isAlive; + var GeneralComp v_ptc := GeneralComp.create; + v_ptc.start(f()); + v_isAlive := any from v_ptc.alive; + if(v_isAlive){ + setverdict(pass); + } else { + setverdict(fail, "The any from alive operation didn't find alive components"); + } + } + + control { + execute(TC_NegSem_210305_alive_operation_001(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/21_configuration_operations/2103_test_component_operations/210305_alive_operation/NegSem_210305_alive_operation_002.ttcn b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210305_alive_operation/NegSem_210305_alive_operation_002.ttcn new file mode 100644 index 00000000..2a8ed704 --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210305_alive_operation/NegSem_210305_alive_operation_002.ttcn @@ -0,0 +1,42 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:21.3.5, Verify that error occurs when any from alive is applied to 1D array and index target is array + ** @verdict pass reject + *****************************************************************/ +// The following requirements are tested: +// Restriction d +// If the index redirection is used for single-dimensional component arrays, the type +// of the integer variable shall allow storing the highest index of the respective array. +module NegSem_210305_alive_operation_002 { + + type component GeneralComp {} + + function f() runs on GeneralComp { + timer t := 100.0; + t.start; + t.timeout; + } + + testcase TC_NegSem_210305_alive_operation_002() runs on GeneralComp system GeneralComp { + var boolean v_isAlive; + const integer c_size := 4; + var GeneralComp v_ptc[c_size]; + var integer v_index[1]; + for (var integer i := 0; i < c_size; i := i + 1) { + v_ptc[i] := GeneralComp.create; // created components are inactive + if (i mod 2 == 0) { v_ptc[i].kill; } // kill components on even indices + else { v_ptc[i].start(f());} // activate v_ptc + } + v_isAlive := any from v_ptc.alive -> @index value v_index; + if(v_index[0] == 1){ + setverdict(pass); + } else { + setverdict(fail, "The any from alive operation didn't find alive components"); + } + } + + control { + execute(TC_NegSem_210305_alive_operation_002(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/21_configuration_operations/2103_test_component_operations/210305_alive_operation/NegSem_210305_alive_operation_003.ttcn b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210305_alive_operation/NegSem_210305_alive_operation_003.ttcn new file mode 100644 index 00000000..e23bc301 --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210305_alive_operation/NegSem_210305_alive_operation_003.ttcn @@ -0,0 +1,42 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:21.3.5, Verify that error occurs when any from alive is applied to 1D array and index target has wrong type + ** @verdict pass reject + *****************************************************************/ +// The following requirements are tested: +// Restriction d +// If the index redirection is used for single-dimensional component arrays, the type +// of the integer variable shall allow storing the highest index of the respective array. +module NegSem_210305_alive_operation_003 { + + type component GeneralComp {} + + function f() runs on GeneralComp { + timer t := 100.0; + t.start; + t.timeout; + } + + testcase TC_NegSem_210305_alive_operation_003() runs on GeneralComp system GeneralComp { + var boolean v_isAlive; + const integer c_size := 4; + var GeneralComp v_ptc[c_size]; + var float v_index; + for (var integer i := 0; i < c_size; i := i + 1) { + v_ptc[i] := GeneralComp.create; // created components are inactive + if (i mod 2 == 0) { v_ptc[i].kill; } // kill components on even indices + else { v_ptc[i].start(f());} // activate v_ptc + } + v_isAlive := any from v_ptc.alive -> @index value v_index; + if(v_index == 1.0){ + setverdict(pass); + } else { + setverdict(fail, "The any from alive operation didn't find alive components"); + } + } + + control { + execute(TC_NegSem_210305_alive_operation_003(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/21_configuration_operations/2103_test_component_operations/210305_alive_operation/NegSem_210305_alive_operation_004.ttcn b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210305_alive_operation/NegSem_210305_alive_operation_004.ttcn new file mode 100644 index 00000000..cddd4633 --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210305_alive_operation/NegSem_210305_alive_operation_004.ttcn @@ -0,0 +1,46 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:21.3.5, Verify that any from alive index redirection for multi-D arrays requires arrays of correct size + ** @verdict pass reject + *****************************************************************/ +// The following requirements are tested: +// Restriction e: +// If the index redirection is used for multi-dimensional component arrays, the size +// of the integer array or record of integer type shall exactly be the same as the dimension +// of the respective array, and its type shall allow storing the highest index (from all +// dimensions) of the array. +module NegSem_210305_alive_operation_004 { + + type component GeneralComp {} + + function f() runs on GeneralComp { + timer t := 100.0; + t.start; + t.timeout; + } + + testcase TC_NegSem_210305_alive_operation_004() runs on GeneralComp system GeneralComp { + var boolean v_isAlive; + const integer c_size := 3; + var GeneralComp v_ptc[c_size][c_size]; + var integer v_index[1]; + for (var integer i := 0; i < c_size; i := i + 1) { + for (var integer j := 0; j < c_size; j := j + 1) { + v_ptc[i][j] := GeneralComp.create; // created components are inactive + if (i mod 2 == 0 or j mod 2 == 1) { v_ptc[i][j].kill; } // kill components on even i or odd j + else { v_ptc[i][j].start(f());} // activate v_ptc + } + } + v_isAlive := any from v_ptc.alive -> @index value v_index; + if(v_index[0] == 1 and v_index[1] == 0){ + setverdict(pass); + } else { + setverdict(fail, "Index incorrectly assigned"); + } + } + + control { + execute(TC_NegSem_210305_alive_operation_004(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/21_configuration_operations/2103_test_component_operations/210305_alive_operation/NegSem_210305_alive_operation_005.ttcn b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210305_alive_operation/NegSem_210305_alive_operation_005.ttcn new file mode 100644 index 00000000..c6f33ab7 --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210305_alive_operation/NegSem_210305_alive_operation_005.ttcn @@ -0,0 +1,46 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:21.3.5, Verify that any from alive index redirection for multi-D arrays requires arrays + ** @verdict pass reject + *****************************************************************/ +// The following requirements are tested: +// Restriction e: +// If the index redirection is used for multi-dimensional component arrays, the size +// of the integer array or record of integer type shall exactly be the same as the dimension +// of the respective array, and its type shall allow storing the highest index (from all +// dimensions) of the array. +module NegSem_210305_alive_operation_005 { + + type component GeneralComp {} + + function f() runs on GeneralComp { + timer t := 100.0; + t.start; + t.timeout; + } + + testcase TC_NegSem_210305_alive_operation_005() runs on GeneralComp system GeneralComp { + var boolean v_isAlive; + const integer c_size := 3; + var GeneralComp v_ptc[c_size][c_size]; + var integer v_index; + for (var integer i := 0; i < c_size; i := i + 1) { + for (var integer j := 0; j < c_size; j := j + 1) { + v_ptc[i][j] := GeneralComp.create; // created components are inactive + if (i mod 2 == 0 or j mod 2 == 1) { v_ptc[i][j].kill; } // kill components on even i or odd j + else { v_ptc[i][j].start(f());} // activate v_ptc + } + } + v_isAlive := any from v_ptc.alive -> @index value v_index; + if(v_index == 1){ + setverdict(pass); + } else { + setverdict(fail, "Index incorrectly assigned"); + } + } + + control { + execute(TC_NegSem_210305_alive_operation_005(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/21_configuration_operations/2103_test_component_operations/210305_alive_operation/NegSem_210305_alive_operation_006.ttcn b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210305_alive_operation/NegSem_210305_alive_operation_006.ttcn new file mode 100644 index 00000000..132cbd3f --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210305_alive_operation/NegSem_210305_alive_operation_006.ttcn @@ -0,0 +1,37 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:21.3.5, partially initialized array in any from ComponentArrayRef.alive + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// The ComponentArrayRef shall be a reference to a completely initialized component array. + +module NegSem_210305_alive_operation_006 { + + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + function f() runs on GeneralComp { + p.receive(integer:?); + } + + testcase TC_NegSem_210305_alive_operation_006() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptcs[2]; + v_ptcs[0] := GeneralComp.create alive; + v_ptcs[0].start(f()); + if (any from v_ptcs.alive) { + setverdict(pass); + } + } + + control { + execute(TC_NegSem_210305_alive_operation_006(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/21_configuration_operations/2103_test_component_operations/210305_alive_operation/NegSyn_210305_alive_operation_001.ttcn b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210305_alive_operation/NegSyn_210305_alive_operation_001.ttcn new file mode 100644 index 00000000..39bab15f --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210305_alive_operation/NegSyn_210305_alive_operation_001.ttcn @@ -0,0 +1,37 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:21.3.5, Verify that error occurs when using index redirection in component.alive operation + ** @verdict pass reject + *****************************************************************/ +// The following requirements are tested: +// Restriction c +// The index redirection shall only be used when the operation is used on an any from +// component array construct. +module NegSyn_210305_alive_operation_001 { + + type component GeneralComp {} + + function f() runs on GeneralComp { + timer t := 100.0; + t.start; + t.timeout; + } + + testcase TC_NegSyn_210305_alive_operation_001() runs on GeneralComp system GeneralComp { + var boolean v_isAlive; + var integer v_index; + var GeneralComp v_ptc := GeneralComp.create; + v_ptc.start(f()); + v_isAlive := v_ptc.alive -> @index value v_index; + if(v_isAlive){ + setverdict(pass); + } else { + setverdict(fail, "The any from alive operation didn't find alive components"); + } + } + + control { + execute(TC_NegSyn_210305_alive_operation_001(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/21_configuration_operations/2103_test_component_operations/210305_alive_operation/NegSyn_210305_alive_operation_002.ttcn b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210305_alive_operation/NegSyn_210305_alive_operation_002.ttcn new file mode 100644 index 00000000..c1aa14ef --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210305_alive_operation/NegSyn_210305_alive_operation_002.ttcn @@ -0,0 +1,37 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:21.3.5, Verify that error occurs when using index redirection in any component.alive operation + ** @verdict pass reject + *****************************************************************/ +// The following requirements are tested: +// Restriction c +// The index redirection shall only be used when the operation is used on an any from +// component array construct. +module NegSyn_210305_alive_operation_002 { + + type component GeneralComp {} + + function f() runs on GeneralComp { + timer t := 100.0; + t.start; + t.timeout; + } + + testcase TC_NegSyn_210305_alive_operation_002() runs on GeneralComp system GeneralComp { + var boolean v_isAlive; + var integer v_index; + var GeneralComp v_ptc := GeneralComp.create; + v_ptc.start(f()); + v_isAlive := any component.alive -> @index value v_index; + if(v_isAlive){ + setverdict(pass); + } else { + setverdict(fail, "The any from alive operation didn't find alive components"); + } + } + + control { + execute(TC_NegSyn_210305_alive_operation_002(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/21_configuration_operations/2103_test_component_operations/210305_alive_operation/NegSyn_210305_alive_operation_003.ttcn b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210305_alive_operation/NegSyn_210305_alive_operation_003.ttcn new file mode 100644 index 00000000..b3703c36 --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210305_alive_operation/NegSyn_210305_alive_operation_003.ttcn @@ -0,0 +1,37 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:21.3.5, Verify that error occurs when using index redirection in all component.alive operation + ** @verdict pass reject + *****************************************************************/ +// The following requirements are tested: +// Restriction c +// The index redirection shall only be used when the operation is used on an any from +// component array construct. +module NegSyn_210305_alive_operation_003 { + + type component GeneralComp {} + + function f() runs on GeneralComp { + timer t := 100.0; + t.start; + t.timeout; + } + + testcase TC_NegSyn_210305_alive_operation_003() runs on GeneralComp system GeneralComp { + var boolean v_isAlive; + var integer v_index; + var GeneralComp v_ptc := GeneralComp.create; + v_ptc.start(f()); + v_isAlive := all component.alive -> @index value v_index; + if(v_isAlive){ + setverdict(pass); + } else { + setverdict(fail, "The any from alive operation didn't find alive components"); + } + } + + control { + execute(TC_NegSyn_210305_alive_operation_003(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/21_configuration_operations/2103_test_component_operations/210305_alive_operation/NegSyn_210305_alive_operation_004.ttcn b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210305_alive_operation/NegSyn_210305_alive_operation_004.ttcn new file mode 100644 index 00000000..a458bd09 --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210305_alive_operation/NegSyn_210305_alive_operation_004.ttcn @@ -0,0 +1,41 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:21.3.5, Verify that error occurs when using index redirection in function instance.alive operation + ** @verdict pass reject + *****************************************************************/ +// The following requirements are tested: +// Restriction c +// The index redirection shall only be used when the operation is used on an any from +// component array construct. +module NegSyn_210305_alive_operation_004 { + + type component GeneralComp {} + + function f() runs on GeneralComp { + timer t := 100.0; + t.start; + t.timeout; + } + + function initComp() return GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + v_ptc.start(f()); + return v_ptc; + } + + testcase TC_NegSyn_210305_alive_operation_004() runs on GeneralComp system GeneralComp { + var boolean v_isAlive; + var integer v_index; + v_isAlive := initComp().alive -> @index value v_index; + if(v_isAlive){ + setverdict(pass); + } else { + setverdict(fail, "The any from alive operation didn't find alive components"); + } + } + + control { + execute(TC_NegSyn_210305_alive_operation_004(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/21_configuration_operations/2103_test_component_operations/210305_alive_operation/Sem_210305_alive_operation_001.ttcn b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210305_alive_operation/Sem_210305_alive_operation_001.ttcn new file mode 100644 index 00000000..45dc4a90 --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210305_alive_operation/Sem_210305_alive_operation_001.ttcn @@ -0,0 +1,47 @@ +/***************************************************************** + ** @author STF 451 + ** @version 0.0.1 + ** @purpose 1:21.3.5, Testing alive operator with an alive test component + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +// Alive test component calls a function f1. Afterwards calls f2 function + +module Sem_210305_alive_operation_001 { + + type component GeneralComp { + var integer v_gc:=0; + var integer v_res:=0;} + function f1 ( ) runs on GeneralComp {} + + function f2 ( integer p_integer ) runs on GeneralComp return integer { + v_gc:=p_integer*p_integer; + return v_gc; + } + testcase TC_Sem_210305_alive_operation_001() runs on GeneralComp system GeneralComp { + var GeneralComp ptc; + ptc:=GeneralComp.create alive; + + ptc.start(f1()); + + ptc.done; + + if (ptc.alive) { + ptc.start(f2(3)); + v_res:=f2(3); +} + + if(v_res==9) + { + setverdict(pass); + } + else + { + setverdict(fail); + } + + } + + control { + execute(TC_Sem_210305_alive_operation_001()); + } +} \ No newline at end of file diff --git a/ATS/core_language/21_configuration_operations/2103_test_component_operations/210305_alive_operation/Sem_210305_alive_operation_002.ttcn b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210305_alive_operation/Sem_210305_alive_operation_002.ttcn new file mode 100644 index 00000000..9a7b9777 --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210305_alive_operation/Sem_210305_alive_operation_002.ttcn @@ -0,0 +1,39 @@ +/***************************************************************** + ** @author STF 451 + ** @version 0.0.1 + ** @purpose 1:21.3.5, Test all component alive operator with alive test components + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +//Test all component alive operator in case when two alive test components is already running + +module Sem_210305_alive_operation_002 { + + type component GeneralComp { + var integer v_gc:=0; + var integer v_res:=0;} + function f1 ( ) runs on GeneralComp {} + + testcase TC_Sem_210305_alive_operation_002() runs on GeneralComp system GeneralComp { + var GeneralComp ptc; + var GeneralComp ptc2; + ptc:=GeneralComp.create alive; + ptc2:=GeneralComp.create alive; + + ptc.start(f1()); + ptc2.start(f1()); + ptc.done; + + if (all component.alive) { + setverdict(pass); + } + else + { + setverdict(fail); + } + + } + + control { + execute(TC_Sem_210305_alive_operation_002()); + } +} \ No newline at end of file diff --git a/ATS/core_language/21_configuration_operations/2103_test_component_operations/210305_alive_operation/Sem_210305_alive_operation_003.ttcn b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210305_alive_operation/Sem_210305_alive_operation_003.ttcn new file mode 100644 index 00000000..aee60c4e --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210305_alive_operation/Sem_210305_alive_operation_003.ttcn @@ -0,0 +1,38 @@ +/***************************************************************** + ** @author STF 451 + ** @version 0.0.1 + ** @purpose 1:21.3.5, Ensure that alive operator gives a correct boolean result + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +// Two alive test components.ptc killed, than the alive check. +module Sem_210305_alive_operation_003 { + + type component GeneralComp { + var integer v_gc:=0; + var integer v_res:=0;} + function f1 ( ) runs on GeneralComp {} + + testcase TC_Sem_210305_alive_operation_003() runs on GeneralComp system GeneralComp { + var GeneralComp ptc; + var GeneralComp ptc2; + ptc:=GeneralComp.create alive; + ptc2:=GeneralComp.create alive; + + ptc.start(f1()); + ptc2.start(f1()); + ptc.kill; + + if (match(ptc.alive, false) and match(ptc2.alive, true)) { + setverdict(pass); + } + else + { + setverdict(fail); + } + + } + + control { + execute(TC_Sem_210305_alive_operation_003()); + } +} \ No newline at end of file diff --git a/ATS/core_language/21_configuration_operations/2103_test_component_operations/210305_alive_operation/Sem_210305_alive_operation_004.ttcn b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210305_alive_operation/Sem_210305_alive_operation_004.ttcn new file mode 100644 index 00000000..95d76cbf --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210305_alive_operation/Sem_210305_alive_operation_004.ttcn @@ -0,0 +1,39 @@ +/***************************************************************** + ** @author STF 451 + ** @version 0.0.1 + ** @purpose 1:21.3.5, Test any component alive operator with multiple test components + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +// Any component alive test with two test components. + +module Sem_210305_alive_operation_004 { + + type component GeneralComp { + var integer v_gc:=0; + var integer v_res:=0;} + function f1 ( ) runs on GeneralComp {} + + testcase TC_Sem_210305_alive_operation_004() runs on GeneralComp system GeneralComp { + var GeneralComp ptc; + var GeneralComp ptc2; + ptc:=GeneralComp.create alive; + ptc2:=GeneralComp.create alive; + + ptc.start(f1()); + ptc2.start(f1()); + ptc.kill; + + if (any component.alive) { + setverdict(pass); + } + else + { + setverdict(fail); + } + + } + + control { + execute(TC_Sem_210305_alive_operation_004()); + } +} \ No newline at end of file diff --git a/ATS/core_language/21_configuration_operations/2103_test_component_operations/210305_alive_operation/Sem_210305_alive_operation_005.ttcn b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210305_alive_operation/Sem_210305_alive_operation_005.ttcn new file mode 100644 index 00000000..e5afd1ff --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210305_alive_operation/Sem_210305_alive_operation_005.ttcn @@ -0,0 +1,36 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:21.3.5, Verify that any from alive returns false if no component is alive + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +// The following requirements are tested: +// When the any from component array notation is used, the components from the referenced array +// are iterated over and individually checked for being inactive or running a function from +// innermost to outermost dimension from lowest to highest index for each dimension. The first +// component to be found being inactive or running a function causes the alive operation to +// return the true value. +module Sem_210305_alive_operation_005 { + + type component GeneralComp {} + + testcase TC_Sem_210305_alive_operation_005() runs on GeneralComp system GeneralComp { + var boolean v_isAlive; + const integer c_size := 4; + var GeneralComp v_ptc[c_size]; + for (var integer i := 0; i < c_size; i := i + 1) { + v_ptc[i] := GeneralComp.create; + v_ptc[i].kill; + } + v_isAlive := any from v_ptc.alive; + if(not v_isAlive){ + setverdict(pass); + } else { + setverdict(fail, "The any from alive operation incorrectly detected an alive component"); + } + } + + control { + execute(TC_Sem_210305_alive_operation_005(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/21_configuration_operations/2103_test_component_operations/210305_alive_operation/Sem_210305_alive_operation_006.ttcn b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210305_alive_operation/Sem_210305_alive_operation_006.ttcn new file mode 100644 index 00000000..6842e55a --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210305_alive_operation/Sem_210305_alive_operation_006.ttcn @@ -0,0 +1,36 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:21.3.5, Verify that any from alive returns true if at least one component is inactive + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +// The following requirements are tested: +// When the any from component array notation is used, the components from the referenced array +// are iterated over and individually checked for being inactive or running a function from +// innermost to outermost dimension from lowest to highest index for each dimension. The first +// component to be found being inactive or running a function causes the alive operation to +// return the true value. +module Sem_210305_alive_operation_006 { + + type component GeneralComp {} + + testcase TC_Sem_210305_alive_operation_006() runs on GeneralComp system GeneralComp { + var boolean v_isAlive; + const integer c_size := 4; + var GeneralComp v_ptc[c_size]; + for (var integer i := 0; i < c_size; i := i + 1) { + v_ptc[i] := GeneralComp.create; // created components are inactive + if (i mod 2 == 0) { v_ptc[i].kill; } // kill components on even indices + } + v_isAlive := any from v_ptc.alive; + if(v_isAlive){ + setverdict(pass); + } else { + setverdict(fail, "The any from alive operation didn't find alive components"); + } + } + + control { + execute(TC_Sem_210305_alive_operation_006(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/21_configuration_operations/2103_test_component_operations/210305_alive_operation/Sem_210305_alive_operation_007.ttcn b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210305_alive_operation/Sem_210305_alive_operation_007.ttcn new file mode 100644 index 00000000..2239e83d --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210305_alive_operation/Sem_210305_alive_operation_007.ttcn @@ -0,0 +1,43 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:21.3.5, Verify that any from alive returns true if at least one component is running + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +// The following requirements are tested: +// When the any from component array notation is used, the components from the referenced array +// are iterated over and individually checked for being inactive or running a function from +// innermost to outermost dimension from lowest to highest index for each dimension. The first +// component to be found being inactive or running a function causes the alive operation to +// return the true value. +module Sem_210305_alive_operation_007 { + + type component GeneralComp {} + + function f() runs on GeneralComp { + timer t := 100.0; + t.start; + t.timeout; + } + + testcase TC_Sem_210305_alive_operation_007() runs on GeneralComp system GeneralComp { + var boolean v_isAlive; + const integer c_size := 4; + var GeneralComp v_ptc[c_size]; + for (var integer i := 0; i < c_size; i := i + 1) { + v_ptc[i] := GeneralComp.create; // created components are inactive + if (i mod 2 == 0) { v_ptc[i].kill; } // kill components on even indices + else { v_ptc[i].start(f());} // activate v_ptc + } + v_isAlive := any from v_ptc.alive; + if(v_isAlive){ + setverdict(pass); + } else { + setverdict(fail, "The any from alive operation didn't find alive components"); + } + } + + control { + execute(TC_Sem_210305_alive_operation_007(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/21_configuration_operations/2103_test_component_operations/210305_alive_operation/Sem_210305_alive_operation_008.ttcn b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210305_alive_operation/Sem_210305_alive_operation_008.ttcn new file mode 100644 index 00000000..98169062 --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210305_alive_operation/Sem_210305_alive_operation_008.ttcn @@ -0,0 +1,34 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:21.3.5, Verify that any from alive doesn't assign index when no component is alive + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +// The following requirements are tested: +// The index of the first component found alive can optionally be assigned to an integer +// variable for single-dimensional component arrays +module Sem_210305_alive_operation_008 { + + type component GeneralComp {} + + testcase TC_Sem_210305_alive_operation_008() runs on GeneralComp system GeneralComp { + var boolean v_isAlive; + const integer c_size := 4; + var GeneralComp v_ptc[c_size]; + var integer v_index; + for (var integer i := 0; i < c_size; i := i + 1) { + v_ptc[i] := GeneralComp.create; + v_ptc[i].kill; + } + v_isAlive := any from v_ptc.alive -> @index value v_index; + if(not isbound(v_index)){ + setverdict(pass); + } else { + setverdict(fail, "Index incorrectly assigned"); + } + } + + control { + execute(TC_Sem_210305_alive_operation_008(), 5000.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/21_configuration_operations/2103_test_component_operations/210305_alive_operation/Sem_210305_alive_operation_009.ttcn b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210305_alive_operation/Sem_210305_alive_operation_009.ttcn new file mode 100644 index 00000000..771dfa9b --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210305_alive_operation/Sem_210305_alive_operation_009.ttcn @@ -0,0 +1,41 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:21.3.5, Verify that any from alive assigns index + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +// The following requirements are tested: +// The index of the first component found alive can optionally be assigned to an integer +// variable for single-dimensional component arrays. +module Sem_210305_alive_operation_009 { + + type component GeneralComp {} + + function f() runs on GeneralComp { + timer t := 100.0; + t.start; + t.timeout; + } + + testcase TC_Sem_210305_alive_operation_009() runs on GeneralComp system GeneralComp { + var boolean v_isAlive; + const integer c_size := 4; + var GeneralComp v_ptc[c_size]; + var integer v_index; + for (var integer i := 0; i < c_size; i := i + 1) { + v_ptc[i] := GeneralComp.create; // created components are inactive + if (i mod 2 == 0) { v_ptc[i].kill; } // kill components on even indices + else { v_ptc[i].start(f());} // activate v_ptc + } + v_isAlive := any from v_ptc.alive -> @index value v_index; + if(v_index == 1){ + setverdict(pass); + } else { + setverdict(fail, "Index incorrectly assigned"); + } + } + + control { + execute(TC_Sem_210305_alive_operation_009(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/21_configuration_operations/2103_test_component_operations/210305_alive_operation/Sem_210305_alive_operation_010.ttcn b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210305_alive_operation/Sem_210305_alive_operation_010.ttcn new file mode 100644 index 00000000..d52452ab --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210305_alive_operation/Sem_210305_alive_operation_010.ttcn @@ -0,0 +1,41 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:21.3.5, Verify that any from alive can be used inside expressions + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +// The following requirements are tested: +// The index of the first component found alive can optionally be assigned to an integer +// variable for single-dimensional component arrays. +module Sem_210305_alive_operation_010 { + + type component GeneralComp {} + + function f() runs on GeneralComp { + timer t := 100.0; + t.start; + t.timeout; + } + + testcase TC_Sem_210305_alive_operation_010() runs on GeneralComp system GeneralComp { + var boolean v_isAlive; + const integer c_size := 4; + var GeneralComp v_ptc[c_size]; + var integer v_index; + for (var integer i := 0; i < c_size; i := i + 1) { + v_ptc[i] := GeneralComp.create; // created components are inactive + if (i mod 2 == 0) { v_ptc[i].kill; } // kill components on even indices + else { v_ptc[i].start(f());} // activate PTC + } + v_isAlive := any from v_ptc.alive -> @index value v_index and v_index == 1; + if(v_isAlive){ + setverdict(pass); + } else { + setverdict(fail, "The any from alive operation didn't find alive components"); + } + } + + control { + execute(TC_Sem_210305_alive_operation_010(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/21_configuration_operations/2103_test_component_operations/210305_alive_operation/Sem_210305_alive_operation_011.ttcn b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210305_alive_operation/Sem_210305_alive_operation_011.ttcn new file mode 100644 index 00000000..0ceebd49 --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210305_alive_operation/Sem_210305_alive_operation_011.ttcn @@ -0,0 +1,46 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:21.3.5, Verify that any from alive index redirection works for multidimensional arrays + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +// The following requirements are tested: +// Restriction e: +// If the index redirection is used for multi-dimensional component arrays, the size +// of the integer array or record of integer type shall exactly be the same as the dimension +// of the respective array, and its type shall allow storing the highest index (from all +// dimensions) of the array. +module Sem_210305_alive_operation_011 { + + type component GeneralComp {} + + function f() runs on GeneralComp { + timer t := 100.0; + t.start; + t.timeout; + } + + testcase TC_Sem_210305_alive_operation_011() runs on GeneralComp system GeneralComp { + var boolean v_isAlive; + const integer c_size := 3; + var GeneralComp v_ptc[c_size][c_size]; + var integer v_index[2]; + for (var integer i := 0; i < c_size; i := i + 1) { + for (var integer j := 0; j < c_size; j := j + 1) { + v_ptc[i][j] := GeneralComp.create; // created components are inactive + if (i mod 2 == 0 or j mod 2 == 1) { v_ptc[i][j].kill; } // kill components on even i or odd j + else { v_ptc[i][j].start(f());} // activate v_ptc + } + } + v_isAlive := any from v_ptc.alive -> @index value v_index; + if(v_index[0] == 1 and v_index[1] == 0){ + setverdict(pass); + } else { + setverdict(fail, "Index incorrectly assigned"); + } + } + + control { + execute(TC_Sem_210305_alive_operation_011(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/21_configuration_operations/2103_test_component_operations/210305_alive_operation/Sem_210305_alive_operation_012.ttcn b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210305_alive_operation/Sem_210305_alive_operation_012.ttcn new file mode 100644 index 00000000..dd057360 --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210305_alive_operation/Sem_210305_alive_operation_012.ttcn @@ -0,0 +1,34 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:21.3.5, Verify that any from alive doesn't change index variable when no component is alive + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +// The following requirements are tested: +// The index of the first component found alive can optionally be assigned to an integer +// variable for single-dimensional component arrays +module Sem_210305_alive_operation_012 { + + type component GeneralComp {} + + testcase TC_Sem_210305_alive_operation_012() runs on GeneralComp system GeneralComp { + var boolean v_isAlive; + const integer c_size := 4; + var GeneralComp v_ptc[c_size]; + var integer v_index := 99; + for (var integer i := 0; i < c_size; i := i + 1) { + v_ptc[i] := GeneralComp.create; + v_ptc[i].kill; + } + v_isAlive := any from v_ptc.alive -> @index value v_index; + if(v_index == 99){ + setverdict(pass); + } else { + setverdict(fail, "Index incorrectly assigned"); + } + } + + control { + execute(TC_Sem_210305_alive_operation_012(), 5000.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/21_configuration_operations/2103_test_component_operations/210305_alive_operation/Sem_210305_alive_operation_013.ttcn b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210305_alive_operation/Sem_210305_alive_operation_013.ttcn new file mode 100644 index 00000000..5372053f --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210305_alive_operation/Sem_210305_alive_operation_013.ttcn @@ -0,0 +1,45 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:21.3.5, Verify any from alive index redirection to lazy variable + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +// The following requirements are tested: +// Restriction f +// If a variable referenced in the @index clause is a lazy or fuzzy variable, the expression +// assigned to this variable is equal to the result produced by the alive operation. Later +// evaluation of the lazy or fuzzy variable does not lead to repeated invocation of the alive +// operation. +module Sem_210305_alive_operation_013 { + + type component GeneralComp {} + + function f() runs on GeneralComp { + timer t := 100.0; + t.start; + t.timeout; + } + + testcase TC_Sem_210305_alive_operation_013() runs on GeneralComp system GeneralComp { + var boolean v_isAlive; + const integer c_size := 4; + var GeneralComp v_ptc[c_size]; + var @lazy integer v_index; + for (var integer i := 0; i < c_size; i := i + 1) { + v_ptc[i] := GeneralComp.create; // created components are inactive + if (i mod 2 == 0) { v_ptc[i].kill; } // kill components on even indices + else { v_ptc[i].start(f());} // activate v_ptc + } + v_isAlive := any from v_ptc.alive -> @index value v_index; + v_ptc[1].kill; // component at position 1 is killed after the redirect assignment + if(v_index == 1) { // no alive call during evaluation, v_index remains equal to 1 + setverdict(pass); + } else { + setverdict(fail, "Index incorrectly assigned"); + } + } + + control { + execute(TC_Sem_210305_alive_operation_013(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/21_configuration_operations/2103_test_component_operations/210305_alive_operation/Sem_210305_alive_operation_014.ttcn b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210305_alive_operation/Sem_210305_alive_operation_014.ttcn new file mode 100644 index 00000000..48347fa4 --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210305_alive_operation/Sem_210305_alive_operation_014.ttcn @@ -0,0 +1,45 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:21.3.5, Verify any from alive index redirection to fuzzy variable + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +// The following requirements are tested: +// Restriction f +// If a variable referenced in the @index clause is a lazy or fuzzy variable, the expression +// assigned to this variable is equal to the result produced by the alive operation. Later +// evaluation of the lazy or fuzzy variable does not lead to repeated invocation of the alive +// operation. +module Sem_210305_alive_operation_014 { + + type component GeneralComp {} + + function f() runs on GeneralComp { + timer t := 100.0; + t.start; + t.timeout; + } + + testcase TC_Sem_210305_alive_operation_014() runs on GeneralComp system GeneralComp { + var boolean v_isAlive; + const integer c_size := 4; + var GeneralComp v_ptc[c_size]; + var @fuzzy integer v_index; + for (var integer i := 0; i < c_size; i := i + 1) { + v_ptc[i] := GeneralComp.create; // created components are inactive + if (i mod 2 == 0) { v_ptc[i].kill; } // kill components on even indices + else { v_ptc[i].start(f());} // activate v_ptc + } + v_isAlive := any from v_ptc.alive -> @index value v_index; + v_ptc[1].kill; // component at position 1 is killed after the redirect assignment + if(v_index == 1) { // no alive call during evaluation, v_index remains equal to 1 + setverdict(pass); + } else { + setverdict(fail, "Index incorrectly assigned"); + } + } + + control { + execute(TC_Sem_210305_alive_operation_014(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/21_configuration_operations/2103_test_component_operations/210305_alive_operation/Sem_210305_alive_operation_015.ttcn b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210305_alive_operation/Sem_210305_alive_operation_015.ttcn new file mode 100644 index 00000000..7e4e2bd4 --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210305_alive_operation/Sem_210305_alive_operation_015.ttcn @@ -0,0 +1,28 @@ +/***************************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:21.3.5, Ensure that alive applied on the mtc the operation returns true. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +//// The following requirement is tested: Alive operation applied on the mtc the operation returns true. + +module Sem_210305_alive_operation_015 { + + type component GeneralComp {} + + testcase TC_Sem_210305_alive_operation_015() runs on GeneralComp system GeneralComp { + + if (mtc.alive) { + setverdict(pass); + } + else + { + setverdict(fail); + } + + } + + control { + execute(TC_Sem_210305_alive_operation_015()); + } +} \ No newline at end of file diff --git a/ATS/core_language/21_configuration_operations/2103_test_component_operations/210306_running_operation/NegSem_210306_running_operation_001.ttcn b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210306_running_operation/NegSem_210306_running_operation_001.ttcn new file mode 100644 index 00000000..1b2fadc9 --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210306_running_operation/NegSem_210306_running_operation_001.ttcn @@ -0,0 +1,35 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:21.3.6, Verify that error occurs when any from running is applied to single component + ** @verdict pass reject + *****************************************************************/ +// The following requirements are tested: +// Restriction b +// The ComponentArrayRef shall be a reference to a component array variable identifier. +module NegSem_210306_running_operation_001 { + + type component GeneralComp {} + + function f() runs on GeneralComp { + timer t := 100.0; + t.start; + t.timeout; + } + + testcase TC_NegSem_210306_running_operation_001() runs on GeneralComp system GeneralComp { + var boolean v_isRunning; + var GeneralComp v_ptc := GeneralComp.create; + v_ptc.start(f()); + v_isRunning := any from v_ptc.running; + if(v_isRunning){ + setverdict(pass); + } else { + setverdict(fail, "The any from running operation didn't find running components"); + } + } + + control { + execute(TC_NegSem_210306_running_operation_001(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/21_configuration_operations/2103_test_component_operations/210306_running_operation/NegSem_210306_running_operation_002.ttcn b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210306_running_operation/NegSem_210306_running_operation_002.ttcn new file mode 100644 index 00000000..acc8e481 --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210306_running_operation/NegSem_210306_running_operation_002.ttcn @@ -0,0 +1,42 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:21.3.6, Verify that error occurs when any from running is applied to 1D array and index target is array + ** @verdict pass reject + *****************************************************************/ +// The following requirements are tested: +// Restriction d +// If the index redirection is used for single-dimensional component arrays, the type +// of the integer variable shall allow storing the highest index of the respective array. +module NegSem_210306_running_operation_002 { + + type component GeneralComp {} + + function f() runs on GeneralComp { + timer t := 100.0; + t.start; + t.timeout; + } + + testcase TC_NegSem_210306_running_operation_002() runs on GeneralComp system GeneralComp { + var boolean v_isRunning; + const integer c_size := 4; + var GeneralComp v_ptc[c_size]; + var integer v_index[1]; + for (var integer i := 0; i < c_size; i := i + 1) { + v_ptc[i] := GeneralComp.create; // created components are inactive + if (i mod 2 == 0) { v_ptc[i].kill; } // kill components on even indices + else { v_ptc[i].start(f());} // activate v_ptc + } + v_isRunning := any from v_ptc.running -> @index value v_index; + if(v_index[0] == 1){ + setverdict(pass); + } else { + setverdict(fail, "The any from running operation didn't find running components"); + } + } + + control { + execute(TC_NegSem_210306_running_operation_002(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/21_configuration_operations/2103_test_component_operations/210306_running_operation/NegSem_210306_running_operation_003.ttcn b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210306_running_operation/NegSem_210306_running_operation_003.ttcn new file mode 100644 index 00000000..9fb587c0 --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210306_running_operation/NegSem_210306_running_operation_003.ttcn @@ -0,0 +1,42 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:21.3.6, Verify that error occurs when any from running is applied to 1D array and index target has wrong type + ** @verdict pass reject + *****************************************************************/ +// The following requirements are tested: +// Restriction d +// If the index redirection is used for single-dimensional component arrays, the type +// of the integer variable shall allow storing the highest index of the respective array. +module NegSem_210306_running_operation_003 { + + type component GeneralComp {} + + function f() runs on GeneralComp { + timer t := 100.0; + t.start; + t.timeout; + } + + testcase TC_NegSem_210306_running_operation_003() runs on GeneralComp system GeneralComp { + var boolean v_isRunning; + const integer c_size := 4; + var GeneralComp v_ptc[c_size]; + var float v_index; + for (var integer i := 0; i < c_size; i := i + 1) { + v_ptc[i] := GeneralComp.create; // created components are inactive + if (i mod 2 == 0) { v_ptc[i].kill; } // kill components on even indices + else { v_ptc[i].start(f());} // activate v_ptc + } + v_isRunning := any from v_ptc.running -> @index value v_index; + if(v_index == 1.0){ + setverdict(pass); + } else { + setverdict(fail, "The any from running operation didn't find running components"); + } + } + + control { + execute(TC_NegSem_210306_running_operation_003(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/21_configuration_operations/2103_test_component_operations/210306_running_operation/NegSem_210306_running_operation_004.ttcn b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210306_running_operation/NegSem_210306_running_operation_004.ttcn new file mode 100644 index 00000000..06e86dd2 --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210306_running_operation/NegSem_210306_running_operation_004.ttcn @@ -0,0 +1,46 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:21.3.6, Verify that any from running index redirection for multi-D arrays requires arrays of correct size + ** @verdict pass reject + *****************************************************************/ +// The following requirements are tested: +// Restriction e: +// If the index redirection is used for multi-dimensional component arrays, the size +// of the integer array or record of integer type shall exactly be the same as the dimension +// of the respective array, and its type shall allow storing the highest index (from all +// dimensions) of the array. +module NegSem_210306_running_operation_004 { + + type component GeneralComp {} + + function f() runs on GeneralComp { + timer t := 100.0; + t.start; + t.timeout; + } + + testcase TC_NegSem_210306_running_operation_004() runs on GeneralComp system GeneralComp { + var boolean v_isRunning; + const integer c_size := 3; + var GeneralComp v_ptc[c_size][c_size]; + var integer v_index[1]; + for (var integer i := 0; i < c_size; i := i + 1) { + for (var integer j := 0; j < c_size; j := j + 1) { + v_ptc[i][j] := GeneralComp.create; // created components are inactive + if (i mod 2 == 0 or j mod 2 == 1) { v_ptc[i][j].kill; } // kill components on even i or odd j + else { v_ptc[i][j].start(f());} // activate v_ptc + } + } + v_isRunning := any from v_ptc.running -> @index value v_index; + if(v_index[0] == 1 and v_index[1] == 0){ + setverdict(pass); + } else { + setverdict(fail, "Index incorrectly assigned"); + } + } + + control { + execute(TC_NegSem_210306_running_operation_004(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/21_configuration_operations/2103_test_component_operations/210306_running_operation/NegSem_210306_running_operation_005.ttcn b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210306_running_operation/NegSem_210306_running_operation_005.ttcn new file mode 100644 index 00000000..4f5c1ad4 --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210306_running_operation/NegSem_210306_running_operation_005.ttcn @@ -0,0 +1,46 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:21.3.6, Verify that any from running index redirection for multi-D arrays requires arrays + ** @verdict pass reject + *****************************************************************/ +// The following requirements are tested: +// Restriction e: +// If the index redirection is used for multi-dimensional component arrays, the size +// of the integer array or record of integer type shall exactly be the same as the dimension +// of the respective array, and its type shall allow storing the highest index (from all +// dimensions) of the array. +module NegSem_210306_running_operation_005 { + + type component GeneralComp {} + + function f() runs on GeneralComp { + timer t := 100.0; + t.start; + t.timeout; + } + + testcase TC_NegSem_210306_running_operation_005() runs on GeneralComp system GeneralComp { + var boolean v_isRunning; + const integer c_size := 3; + var GeneralComp v_ptc[c_size][c_size]; + var integer v_index; + for (var integer i := 0; i < c_size; i := i + 1) { + for (var integer j := 0; j < c_size; j := j + 1) { + v_ptc[i][j] := GeneralComp.create; // created components are inactive + if (i mod 2 == 0 or j mod 2 == 1) { v_ptc[i][j].kill; } // kill components on even i or odd j + else { v_ptc[i][j].start(f());} // activate v_ptc + } + } + v_isRunning := any from v_ptc.running -> @index value v_index; + if(v_index == 1){ + setverdict(pass); + } else { + setverdict(fail, "Index incorrectly assigned"); + } + } + + control { + execute(TC_NegSem_210306_running_operation_005(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/21_configuration_operations/2103_test_component_operations/210306_running_operation/NegSem_210306_running_operation_006.ttcn b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210306_running_operation/NegSem_210306_running_operation_006.ttcn new file mode 100644 index 00000000..c38d347e --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210306_running_operation/NegSem_210306_running_operation_006.ttcn @@ -0,0 +1,37 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:21.3.6, partially initialized array in any from ComponentArrayRef.running + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// The ComponentArrayRef shall be a reference to a completely initialized component array. + +module NegSem_210306_running_operation_006 { + + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + function f() runs on GeneralComp { + p.receive(integer:?); + } + + testcase TC_NegSem_210306_running_operation_006() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptcs[2]; + v_ptcs[0] := GeneralComp.create; + v_ptcs[0].start(f()); + if (any from v_ptcs.running) { + setverdict(pass); + } + } + + control { + execute(TC_NegSem_210306_running_operation_006(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/21_configuration_operations/2103_test_component_operations/210306_running_operation/NegSyn_210306_running_operation_001.ttcn b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210306_running_operation/NegSyn_210306_running_operation_001.ttcn new file mode 100644 index 00000000..bdfe135a --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210306_running_operation/NegSyn_210306_running_operation_001.ttcn @@ -0,0 +1,37 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:21.3.6, Verify that error occurs when using index redirection in component.running operation + ** @verdict pass reject + *****************************************************************/ +// The following requirements are tested: +// Restriction c +// The index redirection shall only be used when the operation is used on an any from +// component array construct. +module NegSyn_210306_running_operation_001 { + + type component GeneralComp {} + + function f() runs on GeneralComp { + timer t := 100.0; + t.start; + t.timeout; + } + + testcase TC_NegSyn_210306_running_operation_001() runs on GeneralComp system GeneralComp { + var boolean v_isRunning; + var integer v_index; + var GeneralComp v_ptc := GeneralComp.create; + v_ptc.start(f()); + v_isRunning := v_ptc.running -> @index value v_index; + if(v_isRunning){ + setverdict(pass); + } else { + setverdict(fail, "The any from running operation didn't find running components"); + } + } + + control { + execute(TC_NegSyn_210306_running_operation_001(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/21_configuration_operations/2103_test_component_operations/210306_running_operation/NegSyn_210306_running_operation_002.ttcn b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210306_running_operation/NegSyn_210306_running_operation_002.ttcn new file mode 100644 index 00000000..332d9f0b --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210306_running_operation/NegSyn_210306_running_operation_002.ttcn @@ -0,0 +1,37 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:21.3.6, Verify that error occurs when using index redirection in any component.running operation + ** @verdict pass reject + *****************************************************************/ +// The following requirements are tested: +// Restriction c +// The index redirection shall only be used when the operation is used on an any from +// component array construct. +module NegSyn_210306_running_operation_002 { + + type component GeneralComp {} + + function f() runs on GeneralComp { + timer t := 100.0; + t.start; + t.timeout; + } + + testcase TC_NegSyn_210306_running_operation_002() runs on GeneralComp system GeneralComp { + var boolean v_isRunning; + var integer v_index; + var GeneralComp v_ptc := GeneralComp.create; + v_ptc.start(f()); + v_isRunning := any component.running -> @index value v_index; + if(v_isRunning){ + setverdict(pass); + } else { + setverdict(fail, "The any from running operation didn't find running components"); + } + } + + control { + execute(TC_NegSyn_210306_running_operation_002(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/21_configuration_operations/2103_test_component_operations/210306_running_operation/NegSyn_210306_running_operation_003.ttcn b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210306_running_operation/NegSyn_210306_running_operation_003.ttcn new file mode 100644 index 00000000..45c8acca --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210306_running_operation/NegSyn_210306_running_operation_003.ttcn @@ -0,0 +1,37 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:21.3.6, Verify that error occurs when using index redirection in all component.running operation + ** @verdict pass reject + *****************************************************************/ +// The following requirements are tested: +// Restriction c +// The index redirection shall only be used when the operation is used on an any from +// component array construct. +module NegSyn_210306_running_operation_003 { + + type component GeneralComp {} + + function f() runs on GeneralComp { + timer t := 100.0; + t.start; + t.timeout; + } + + testcase TC_NegSyn_210306_running_operation_003() runs on GeneralComp system GeneralComp { + var boolean v_isRunning; + var integer v_index; + var GeneralComp v_ptc := GeneralComp.create; + v_ptc.start(f()); + v_isRunning := all component.running -> @index value v_index; + if(v_isRunning){ + setverdict(pass); + } else { + setverdict(fail, "The any from running operation didn't find running components"); + } + } + + control { + execute(TC_NegSyn_210306_running_operation_003(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/21_configuration_operations/2103_test_component_operations/210306_running_operation/NegSyn_210306_running_operation_004.ttcn b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210306_running_operation/NegSyn_210306_running_operation_004.ttcn new file mode 100644 index 00000000..ac82332a --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210306_running_operation/NegSyn_210306_running_operation_004.ttcn @@ -0,0 +1,41 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:21.3.6, Verify that error occurs when using index redirection in function instance.running operation + ** @verdict pass reject + *****************************************************************/ +// The following requirements are tested: +// Restriction c +// The index redirection shall only be used when the operation is used on an any from +// component array construct. +module NegSyn_210306_running_operation_004 { + + type component GeneralComp {} + + function f() runs on GeneralComp { + timer t := 100.0; + t.start; + t.timeout; + } + + function initComp() return GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + v_ptc.start(f()); + return v_ptc; + } + + testcase TC_NegSyn_210306_running_operation_004() runs on GeneralComp system GeneralComp { + var boolean v_isRunning; + var integer v_index; + v_isRunning := initComp().running -> @index value v_index; + if(v_isRunning){ + setverdict(pass); + } else { + setverdict(fail, "The any from running operation didn't find running components"); + } + } + + control { + execute(TC_NegSyn_210306_running_operation_004(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/21_configuration_operations/2103_test_component_operations/210306_running_operation/Sem_210306_running_operation_001.ttcn b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210306_running_operation/Sem_210306_running_operation_001.ttcn new file mode 100644 index 00000000..36542643 --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210306_running_operation/Sem_210306_running_operation_001.ttcn @@ -0,0 +1,36 @@ +/***************************************************************** + ** @author STF 451 + ** @version 0.0.1 + ** @purpose 1:21.3.6, Check that running operator provides information about test components. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +module Sem_210306_running_operation_001 { + + type component GeneralComp {} + + function f1 ( ) runs on GeneralComp { + while (true) {} // block forever + } + + testcase TC_Sem_210306_running_operation_001() runs on GeneralComp system GeneralComp { + var GeneralComp ptc; + var GeneralComp ptc2; + ptc:=GeneralComp.create alive; + ptc2:=GeneralComp.create alive; + + ptc.start(f1()); + ptc2.start(f1()); + ptc.stop; + + // Check that ptc is not running, and ptc2 component is running + if (match(ptc.running, false) and match(ptc2.running, true)) { + setverdict(pass); + } else { + setverdict(fail, "either stopped ptc is running or not stopped ptc2 is not running"); + } + } + + control { + execute(TC_Sem_210306_running_operation_001(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/21_configuration_operations/2103_test_component_operations/210306_running_operation/Sem_210306_running_operation_002.ttcn b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210306_running_operation/Sem_210306_running_operation_002.ttcn new file mode 100644 index 00000000..41998ce4 --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210306_running_operation/Sem_210306_running_operation_002.ttcn @@ -0,0 +1,37 @@ +/***************************************************************** + ** @author STF 451 + ** @version 0.0.1 + ** @purpose 1:21.3.6, Any component with running can check the status of the test components + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +module Sem_210306_running_operation_002 { + + type component GeneralComp {} + + function f1 ( ) runs on GeneralComp { + while (true) {} // block forever + } + + testcase TC_Sem_210306_running_operation_002() runs on GeneralComp system GeneralComp { + var GeneralComp ptc; + var GeneralComp ptc2; + ptc:=GeneralComp.create; + ptc2:=GeneralComp.create; + + ptc.start(f1()); + ptc2.start(f1()); + + ptc.kill; + + // Any component running test that from two test components at least one is running or not + if (any component.running == true) { //ptc2 running + setverdict(pass); + } else { + setverdict(fail, "ptc2 should still be running"); + } + } + + control { + execute(TC_Sem_210306_running_operation_002(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/21_configuration_operations/2103_test_component_operations/210306_running_operation/Sem_210306_running_operation_003.ttcn b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210306_running_operation/Sem_210306_running_operation_003.ttcn new file mode 100644 index 00000000..7c5efbc3 --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210306_running_operation/Sem_210306_running_operation_003.ttcn @@ -0,0 +1,35 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:21.3.6, Verify that any from running returns false if no component is running + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +// The following requirements are tested: +// When the any from component array notation is used, the components from the referenced array +// are iterated over and individually checked for executing currently from innermost to outermost +// dimension from lowest to highest index for each dimension. The first component to be found +// executing causes the running operation to succeed. +module Sem_210306_running_operation_003 { + + type component GeneralComp {} + + testcase TC_Sem_210306_running_operation_003() runs on GeneralComp system GeneralComp { + var boolean v_isRunning; + const integer c_size := 4; + var GeneralComp v_ptc[c_size]; + for (var integer i := 0; i < c_size; i := i + 1) { + v_ptc[i] := GeneralComp.create; + v_ptc[i].kill; + } + v_isRunning := any from v_ptc.running; + if(not v_isRunning){ + setverdict(pass); + } else { + setverdict(fail, "The any from running operation incorrectly detected an running component"); + } + } + + control { + execute(TC_Sem_210306_running_operation_003(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/21_configuration_operations/2103_test_component_operations/210306_running_operation/Sem_210306_running_operation_004.ttcn b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210306_running_operation/Sem_210306_running_operation_004.ttcn new file mode 100644 index 00000000..1099c6c7 --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210306_running_operation/Sem_210306_running_operation_004.ttcn @@ -0,0 +1,42 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:21.3.6, Verify that any from running returns true if at least one component is running + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +// The following requirements are tested: +// When the any from component array notation is used, the components from the referenced array +// are iterated over and individually checked for executing currently from innermost to outermost +// dimension from lowest to highest index for each dimension. The first component to be found +// executing causes the running operation to succeed. +module Sem_210306_running_operation_004 { + + type component GeneralComp {} + + function f() runs on GeneralComp { + timer t := 100.0; + t.start; + t.timeout; + } + + testcase TC_Sem_210306_running_operation_004() runs on GeneralComp system GeneralComp { + var boolean v_isRunning; + const integer c_size := 4; + var GeneralComp v_ptc[c_size]; + for (var integer i := 0; i < c_size; i := i + 1) { + v_ptc[i] := GeneralComp.create; // created components are inactive + if (i mod 2 == 0) { v_ptc[i].kill; } // kill components on even indices + else { v_ptc[i].start(f());} // activate v_ptc + } + v_isRunning := any from v_ptc.running; + if(v_isRunning){ + setverdict(pass); + } else { + setverdict(fail, "The any from running operation didn't find running components"); + } + } + + control { + execute(TC_Sem_210306_running_operation_004(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/21_configuration_operations/2103_test_component_operations/210306_running_operation/Sem_210306_running_operation_005.ttcn b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210306_running_operation/Sem_210306_running_operation_005.ttcn new file mode 100644 index 00000000..fe7f1690 --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210306_running_operation/Sem_210306_running_operation_005.ttcn @@ -0,0 +1,34 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:21.3.6, Verify that any from running doesn't assign index when no component is running + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +// The following requirements are tested: +// The index of the matched component can optionally be assigned to an integer variable +// for single-dimensional component arrays... +module Sem_210306_running_operation_005 { + + type component GeneralComp {} + + testcase TC_Sem_210306_running_operation_005() runs on GeneralComp system GeneralComp { + var boolean v_isRunning; + const integer c_size := 4; + var GeneralComp v_ptc[c_size]; + var integer v_index; + for (var integer i := 0; i < c_size; i := i + 1) { + v_ptc[i] := GeneralComp.create; + v_ptc[i].kill; + } + v_isRunning := any from v_ptc.running -> @index value v_index; + if(not isbound(v_index)){ + setverdict(pass); + } else { + setverdict(fail, "Index incorrectly assigned"); + } + } + + control { + execute(TC_Sem_210306_running_operation_005(), 5000.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/21_configuration_operations/2103_test_component_operations/210306_running_operation/Sem_210306_running_operation_006.ttcn b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210306_running_operation/Sem_210306_running_operation_006.ttcn new file mode 100644 index 00000000..626f0ea2 --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210306_running_operation/Sem_210306_running_operation_006.ttcn @@ -0,0 +1,34 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:21.3.6, Verify that any from running doesn't change index variable when no component is running + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +// The following requirements are tested: +// The index of the matched component can optionally be assigned to an integer variable +// for single-dimensional component arrays... +module Sem_210306_running_operation_006 { + + type component GeneralComp {} + + testcase TC_Sem_210306_running_operation_006() runs on GeneralComp system GeneralComp { + var boolean v_isRunning; + const integer c_size := 4; + var GeneralComp v_ptc[c_size]; + var integer v_index := 99; + for (var integer i := 0; i < c_size; i := i + 1) { + v_ptc[i] := GeneralComp.create; + v_ptc[i].kill; + } + v_isRunning := any from v_ptc.running -> @index value v_index; + if(v_index == 99){ + setverdict(pass); + } else { + setverdict(fail, "Index incorrectly assigned"); + } + } + + control { + execute(TC_Sem_210306_running_operation_006(), 5000.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/21_configuration_operations/2103_test_component_operations/210306_running_operation/Sem_210306_running_operation_007.ttcn b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210306_running_operation/Sem_210306_running_operation_007.ttcn new file mode 100644 index 00000000..0be424e8 --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210306_running_operation/Sem_210306_running_operation_007.ttcn @@ -0,0 +1,41 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:21.3.6, Verify that any from running assigns index + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +// The following requirements are tested: +// The index of the matched component can optionally be assigned to an integer variable +// for single-dimensional component arrays... +module Sem_210306_running_operation_007 { + + type component GeneralComp {} + + function f() runs on GeneralComp { + timer t := 100.0; + t.start; + t.timeout; + } + + testcase TC_Sem_210306_running_operation_007() runs on GeneralComp system GeneralComp { + var boolean v_isRunning; + const integer c_size := 4; + var GeneralComp v_ptc[c_size]; + var integer v_index; + for (var integer i := 0; i < c_size; i := i + 1) { + v_ptc[i] := GeneralComp.create; // created components are inactive + if (i mod 2 == 0) { v_ptc[i].kill; } // kill components on even indices + else { v_ptc[i].start(f());} // activate v_ptc + } + v_isRunning := any from v_ptc.running -> @index value v_index; + if(v_index == 1){ + setverdict(pass); + } else { + setverdict(fail, "Index incorrectly assigned"); + } + } + + control { + execute(TC_Sem_210306_running_operation_007(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/21_configuration_operations/2103_test_component_operations/210306_running_operation/Sem_210306_running_operation_008.ttcn b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210306_running_operation/Sem_210306_running_operation_008.ttcn new file mode 100644 index 00000000..b1b0501f --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210306_running_operation/Sem_210306_running_operation_008.ttcn @@ -0,0 +1,41 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:21.3.6, Verify that any from running can be used inside expressions + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +// The following requirements are tested: +// The index of the matched component can optionally be assigned to an integer variable +// for single-dimensional component arrays... +module Sem_210306_running_operation_008 { + + type component GeneralComp {} + + function f() runs on GeneralComp { + timer t := 100.0; + t.start; + t.timeout; + } + + testcase TC_Sem_210306_running_operation_008() runs on GeneralComp system GeneralComp { + var boolean v_isRunning; + const integer c_size := 4; + var GeneralComp v_ptc[c_size]; + var integer v_index; + for (var integer i := 0; i < c_size; i := i + 1) { + v_ptc[i] := GeneralComp.create; // created components are inactive + if (i mod 2 == 0) { v_ptc[i].kill; } // kill components on even indices + else { v_ptc[i].start(f());} // activate PTC + } + v_isRunning := any from v_ptc.running -> @index value v_index and v_index == 1; + if(v_isRunning){ + setverdict(pass); + } else { + setverdict(fail, "The any from running operation didn't find running components"); + } + } + + control { + execute(TC_Sem_210306_running_operation_008(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/21_configuration_operations/2103_test_component_operations/210306_running_operation/Sem_210306_running_operation_009.ttcn b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210306_running_operation/Sem_210306_running_operation_009.ttcn new file mode 100644 index 00000000..a1db7ff6 --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210306_running_operation/Sem_210306_running_operation_009.ttcn @@ -0,0 +1,46 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:21.3.6, Verify that any from running index redirection works for multidimensional arrays + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +// The following requirements are tested: +// Restriction e: +// If the index redirection is used for multi-dimensional component arrays, the size +// of the integer array or record of integer type shall exactly be the same as the dimension +// of the respective array, and its type shall allow storing the highest index (from all +// dimensions) of the array. +module Sem_210306_running_operation_009 { + + type component GeneralComp {} + + function f() runs on GeneralComp { + timer t := 100.0; + t.start; + t.timeout; + } + + testcase TC_Sem_210306_running_operation_009() runs on GeneralComp system GeneralComp { + var boolean v_isRunning; + const integer c_size := 3; + var GeneralComp v_ptc[c_size][c_size]; + var integer v_index[2]; + for (var integer i := 0; i < c_size; i := i + 1) { + for (var integer j := 0; j < c_size; j := j + 1) { + v_ptc[i][j] := GeneralComp.create; // created components are inactive + if (i mod 2 == 0 or j mod 2 == 1) { v_ptc[i][j].kill; } // kill components on even i or odd j + else { v_ptc[i][j].start(f());} // activate v_ptc + } + } + v_isRunning := any from v_ptc.running -> @index value v_index; + if(v_index[0] == 1 and v_index[1] == 0){ + setverdict(pass); + } else { + setverdict(fail, "Index incorrectly assigned"); + } + } + + control { + execute(TC_Sem_210306_running_operation_009(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/21_configuration_operations/2103_test_component_operations/210306_running_operation/Sem_210306_running_operation_010.ttcn b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210306_running_operation/Sem_210306_running_operation_010.ttcn new file mode 100644 index 00000000..ef659d75 --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210306_running_operation/Sem_210306_running_operation_010.ttcn @@ -0,0 +1,45 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:21.3.6, Verify any from running index redirection to lazy variable + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +// The following requirements are tested: +// Restriction f +// If a variable referenced in the @index clause is a lazy or fuzzy variable, the expression +// assigned to this variable is equal to the result produced by the running operation. Later +// evaluation of the lazy or fuzzy variable does not lead to repeated invocation of the +// running operation. +module Sem_210306_running_operation_010 { + + type component GeneralComp {} + + function f() runs on GeneralComp { + timer t := 100.0; + t.start; + t.timeout; + } + + testcase TC_Sem_210306_running_operation_010() runs on GeneralComp system GeneralComp { + var boolean v_isRunning; + const integer c_size := 4; + var GeneralComp v_ptc[c_size]; + var @lazy integer v_index; + for (var integer i := 0; i < c_size; i := i + 1) { + v_ptc[i] := GeneralComp.create; // created components are inactive + if (i mod 2 == 0) { v_ptc[i].kill; } // kill components on even indices + else { v_ptc[i].start(f());} // activate v_ptc + } + v_isRunning := any from v_ptc.running -> @index value v_index; + v_ptc[1].kill; // component at position 1 is killed after the redirect assignment + if(v_index == 1) { // no running call during evaluation, v_index remains equal to 1 + setverdict(pass); + } else { + setverdict(fail, "Index incorrectly assigned"); + } + } + + control { + execute(TC_Sem_210306_running_operation_010(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/21_configuration_operations/2103_test_component_operations/210306_running_operation/Sem_210306_running_operation_011.ttcn b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210306_running_operation/Sem_210306_running_operation_011.ttcn new file mode 100644 index 00000000..089941d0 --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210306_running_operation/Sem_210306_running_operation_011.ttcn @@ -0,0 +1,45 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:21.3.6, Verify any from running index redirection to fuzzy variable + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +// The following requirements are tested: +// Restriction f +// If a variable referenced in the @index clause is a lazy or fuzzy variable, the expression +// assigned to this variable is equal to the result produced by the running operation. Later +// evaluation of the lazy or fuzzy variable does not lead to repeated invocation of the +// running operation. +module Sem_210306_running_operation_011 { + + type component GeneralComp {} + + function f() runs on GeneralComp { + timer t := 100.0; + t.start; + t.timeout; + } + + testcase TC_Sem_210306_running_operation_011() runs on GeneralComp system GeneralComp { + var boolean v_isRunning; + const integer c_size := 4; + var GeneralComp v_ptc[c_size]; + var @fuzzy integer v_index; + for (var integer i := 0; i < c_size; i := i + 1) { + v_ptc[i] := GeneralComp.create; // created components are inactive + if (i mod 2 == 0) { v_ptc[i].kill; } // kill components on even indices + else { v_ptc[i].start(f());} // activate v_ptc + } + v_isRunning := any from v_ptc.running -> @index value v_index; + v_ptc[1].kill; // component at position 1 is killed after the redirect assignment + if(v_index == 1) { // no running call during evaluation, v_index remains equal to 1 + setverdict(pass); + } else { + setverdict(fail, "Index incorrectly assigned"); + } + } + + control { + execute(TC_Sem_210306_running_operation_011(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/21_configuration_operations/2103_test_component_operations/210306_running_operation/Sem_210306_running_operation_012.ttcn b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210306_running_operation/Sem_210306_running_operation_012.ttcn new file mode 100644 index 00000000..dcb0b80f --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210306_running_operation/Sem_210306_running_operation_012.ttcn @@ -0,0 +1,45 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:21.3.6, Verify that all component.running produces true if some components haven't been started + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +// The following requirements are tested: +// When the all keyword is used with the running operation, it will return true if all PTCs started +// but not stopped explicitly by another component are executing their behaviour. Otherwise it +// returns false. +// Interpretation according to the following note: +// The difference between the running operation applied to a single ptc and the usage of the all +// keyword leads to the situation that ptc.running is false if the ptc has never been started but +// all component.running is true at the same time as it considers only those components that ever +// have been started. +module Sem_210306_running_operation_012 { + + type component GeneralComp {} + + function f() runs on GeneralComp { + timer t := 100.0; + t.start; + t.timeout; + } + + testcase TC_Sem_210306_running_operation_012() runs on GeneralComp system GeneralComp { + var boolean v_isRunning; + const integer c_size := 4; + var GeneralComp v_ptc[c_size]; + for (var integer i := 0; i < c_size; i := i + 1) { + v_ptc[i] := GeneralComp.create; // created components are inactive + if (i mod 2 == 1) { v_ptc[i].start(f());} // start only components with odd index + } + v_isRunning := all component.running; // only once started components shall be considered + if(v_isRunning){ + setverdict(pass); + } else { + setverdict(fail, "The any from running operation didn't find running components"); + } + } + + control { + execute(TC_Sem_210306_running_operation_012(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/21_configuration_operations/2103_test_component_operations/210306_running_operation/Sem_210306_running_operation_013.ttcn b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210306_running_operation/Sem_210306_running_operation_013.ttcn new file mode 100644 index 00000000..63e4901a --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210306_running_operation/Sem_210306_running_operation_013.ttcn @@ -0,0 +1,33 @@ +/***************************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:21.3.6, Check that running operator provides information about mtc. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +// // The following requirement is tested: The running operation returns true for the mtc and PTCs that have been started but not yet terminated or stopped. + +module Sem_210306_running_operation_013 { + + type component GeneralComp {} + + function f1 ( ) runs on GeneralComp { + while (true) {} // block forever + } + + testcase TC_Sem_210306_running_operation_013() runs on GeneralComp system GeneralComp { + var GeneralComp ptc; + ptc:=GeneralComp.create alive; + + ptc.start(f1()); + + // Check that ptc is running, and mtc component is running + if (match(ptc.running, true) and match(mtc.running, true)) { + setverdict(pass); + } else { + setverdict(fail); + } + } + control { + execute(TC_Sem_210306_running_operation_013()); + } +} \ No newline at end of file diff --git a/ATS/core_language/21_configuration_operations/2103_test_component_operations/210307_done_operation/NegSem_210307_done_operation_001.ttcn b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210307_done_operation/NegSem_210307_done_operation_001.ttcn new file mode 100644 index 00000000..211891e8 --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210307_done_operation/NegSem_210307_done_operation_001.ttcn @@ -0,0 +1,29 @@ +/***************************************************************** + ** @author STF 451 + ** @version 0.0.1 + ** @purpose 1:21.3.7, Ensure that done operator can be used only for ptcs. + ** @verdict pass reject + *****************************************************************/ +// Done operator can be used only for ptcs, not for mtcs. + +module NegSem_210307_done_operation_001 { + + type component GeneralComp {} + function f1 ( ) runs on GeneralComp {} + + testcase TC_NegSem_210307_done_operation_001() runs on GeneralComp system GeneralComp { + var GeneralComp ptc; + var GeneralComp ptc2; + ptc:=GeneralComp.create alive; + ptc2:=GeneralComp.create alive; + + ptc.start(f1()); + + GeneralComp.done; // not allowed. Done only allowed for ptcs. + + } + + control { + execute(TC_NegSem_210307_done_operation_001()); + } +} \ No newline at end of file diff --git a/ATS/core_language/21_configuration_operations/2103_test_component_operations/210307_done_operation/NegSem_210307_done_operation_002.ttcn b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210307_done_operation/NegSem_210307_done_operation_002.ttcn new file mode 100644 index 00000000..81bc778d --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210307_done_operation/NegSem_210307_done_operation_002.ttcn @@ -0,0 +1,33 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:21.3.7, Verify that error occurs when any from done is applied to single component + ** @verdict pass reject + *****************************************************************/ +// The following requirements are tested: +// Restriction c +// The ComponentArrayRef shall be a reference to a component array variable identifier. +module NegSem_210307_done_operation_002 { + + type component GeneralComp {} + + function f() runs on GeneralComp { + timer t := 100.0; + t.start; + t.timeout; + } + + testcase TC_NegSem_210307_done_operation_002() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + v_ptc.start(f()); + alt + { + [] any from v_ptc.done { setverdict(pass); } + [else] { setverdict(fail, "The any from done operation didn't find done components"); } + } + } + + control { + execute(TC_NegSem_210307_done_operation_002(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/21_configuration_operations/2103_test_component_operations/210307_done_operation/NegSem_210307_done_operation_003.ttcn b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210307_done_operation/NegSem_210307_done_operation_003.ttcn new file mode 100644 index 00000000..f26e8bd0 --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210307_done_operation/NegSem_210307_done_operation_003.ttcn @@ -0,0 +1,48 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:21.3.7, Verify that error occurs when any from done is applied to 1D array and index target is array + ** @verdict pass reject + *****************************************************************/ +// The following requirements are tested: +// Restriction e +// If the index redirection is used for single-dimensional component arrays, the type +// of the integer variable shall allow storing the highest index of the respective array. +module NegSem_210307_done_operation_003 { + + type component GeneralComp {} + + function f() runs on GeneralComp { + timer t := 100.0; + t.start; + t.timeout; + } + + testcase TC_NegSem_210307_done_operation_003() runs on GeneralComp system GeneralComp { + const integer c_size := 4; + var GeneralComp v_ptc[c_size]; + var integer v_index[1]; + for (var integer i := 0; i < c_size; i := i + 1) { + v_ptc[i] := GeneralComp.create; // created components are inactive + if (i mod 2 == 0) { v_ptc[i].kill; } // kill components on even indices + else { v_ptc[i].start(f());} // activate v_ptc + } + alt + { + [] any from v_ptc.done -> @index value v_index + { + if(v_index[0] == 1){ + setverdict(pass); + } else { + setverdict(fail, "Invalid index value"); + } + setverdict(pass); + } + [else] { setverdict(fail, "The any from done operation didn't find done components"); } + } + } + + control { + execute(TC_NegSem_210307_done_operation_003(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/21_configuration_operations/2103_test_component_operations/210307_done_operation/NegSem_210307_done_operation_004.ttcn b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210307_done_operation/NegSem_210307_done_operation_004.ttcn new file mode 100644 index 00000000..4671d3dc --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210307_done_operation/NegSem_210307_done_operation_004.ttcn @@ -0,0 +1,48 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:21.3.7, Verify that error occurs when any from done is applied to 1D array and index target has wrong type + ** @verdict pass reject + *****************************************************************/ +// The following requirements are tested: +// Restriction e +// If the index redirection is used for single-dimensional component arrays, the type +// of the integer variable shall allow storing the highest index of the respective array. +module NegSem_210307_done_operation_004 { + + type component GeneralComp {} + + function f() runs on GeneralComp { + timer t := 100.0; + t.start; + t.timeout; + } + + testcase TC_NegSem_210307_done_operation_004() runs on GeneralComp system GeneralComp { + const integer c_size := 4; + var GeneralComp v_ptc[c_size]; + var float v_index; + for (var integer i := 0; i < c_size; i := i + 1) { + v_ptc[i] := GeneralComp.create; // created components are inactive + if (i mod 2 == 0) { v_ptc[i].kill; } // kill components on even indices + else { v_ptc[i].start(f());} // activate v_ptc + } + alt + { + [] any from v_ptc.done -> @index value v_index + { + if(v_index == 1.0){ + setverdict(pass); + } else { + setverdict(fail, "Invalid index value"); + } + setverdict(pass); + } + [else] { setverdict(fail, "The any from done operation didn't find done components"); } + } + } + + control { + execute(TC_NegSem_210307_done_operation_004(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/21_configuration_operations/2103_test_component_operations/210307_done_operation/NegSem_210307_done_operation_005.ttcn b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210307_done_operation/NegSem_210307_done_operation_005.ttcn new file mode 100644 index 00000000..3fdd32aa --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210307_done_operation/NegSem_210307_done_operation_005.ttcn @@ -0,0 +1,52 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:21.3.7, Verify that any from done index redirection for multi-D arrays requires arrays of correct size + ** @verdict pass reject + *****************************************************************/ +// The following requirements are tested: +// Restriction f: +// If the index redirection is used for multi-dimensional component arrays, the size +// of the integer array or record of integer type shall exactly be the same as the dimension +// of the respective array, and its type shall allow storing the highest index (from all +// dimensions) of the array. +module NegSem_210307_done_operation_005 { + + type component GeneralComp {} + + function f() runs on GeneralComp { + timer t := 100.0; + t.start; + t.timeout; + } + + testcase TC_NegSem_210307_done_operation_005() runs on GeneralComp system GeneralComp { + const integer c_size := 3; + var GeneralComp v_ptc[c_size][c_size]; + var integer v_index[1]; + for (var integer i := 0; i < c_size; i := i + 1) { + for (var integer j := 0; j < c_size; j := j + 1) { + v_ptc[i][j] := GeneralComp.create; // created components are inactive + if (i mod 2 == 0 or j mod 2 == 1) { v_ptc[i][j].kill; } // kill components on even i or odd j + else { v_ptc[i][j].start(f());} // activate v_ptc + } + } + alt + { + [] any from v_ptc.done -> @index value v_index + { + if(v_index[0] == 1 and v_index[1] == 0){ + setverdict(pass); + } else { + setverdict(fail, "Invalid index value"); + } + setverdict(pass); + } + [else] { setverdict(fail, "The any from done operation didn't find done components"); } + } + } + + control { + execute(TC_NegSem_210307_done_operation_005(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/21_configuration_operations/2103_test_component_operations/210307_done_operation/NegSem_210307_done_operation_006.ttcn b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210307_done_operation/NegSem_210307_done_operation_006.ttcn new file mode 100644 index 00000000..ceb586f1 --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210307_done_operation/NegSem_210307_done_operation_006.ttcn @@ -0,0 +1,52 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:21.3.7, Verify that any from done index redirection for multi-D arrays requires arrays + ** @verdict pass reject + *****************************************************************/ +// The following requirements are tested: +// Restriction f: +// If the index redirection is used for multi-dimensional component arrays, the size +// of the integer array or record of integer type shall exactly be the same as the dimension +// of the respective array, and its type shall allow storing the highest index (from all +// dimensions) of the array. +module NegSem_210307_done_operation_006 { + + type component GeneralComp {} + + function f() runs on GeneralComp { + timer t := 100.0; + t.start; + t.timeout; + } + + testcase TC_NegSem_210307_done_operation_006() runs on GeneralComp system GeneralComp { + const integer c_size := 3; + var GeneralComp v_ptc[c_size][c_size]; + var integer v_index; + for (var integer i := 0; i < c_size; i := i + 1) { + for (var integer j := 0; j < c_size; j := j + 1) { + v_ptc[i][j] := GeneralComp.create; // created components are inactive + if (i mod 2 == 0 or j mod 2 == 1) { v_ptc[i][j].kill; } // kill components on even i or odd j + else { v_ptc[i][j].start(f());} // activate v_ptc + } + } + alt + { + [] any from v_ptc.done -> @index value v_index + { + if(v_index == 1){ + setverdict(pass); + } else { + setverdict(fail, "Invalid index value"); + } + setverdict(pass); + } + [else] { setverdict(fail, "The any from done operation didn't find done components"); } + } + } + + control { + execute(TC_NegSem_210307_done_operation_006(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/21_configuration_operations/2103_test_component_operations/210307_done_operation/NegSem_210307_done_operation_007.ttcn b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210307_done_operation/NegSem_210307_done_operation_007.ttcn new file mode 100644 index 00000000..c9a9ca50 --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210307_done_operation/NegSem_210307_done_operation_007.ttcn @@ -0,0 +1,34 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:21.3.7, variable of incorrect type used for storing verdict in done operation + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// The variable used in the (optional) value clause for storing the final local verdict +// of a PTC shall be of the type verdicttype. + +module NegSem_210307_done_operation_007 { + + type component GeneralComp {} + + function f() runs on GeneralComp { + setverdict(pass); + } + + testcase TC_NegSem_210307_done_operation_007() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + var boolean v_verdict; + v_ptc.start(f()); + alt { + [] v_ptc.done -> value v_verdict { + setverdict(pass); + } + } + } + + control { + execute(TC_NegSem_210307_done_operation_007(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/21_configuration_operations/2103_test_component_operations/210307_done_operation/NegSem_210307_done_operation_008.ttcn b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210307_done_operation/NegSem_210307_done_operation_008.ttcn new file mode 100644 index 00000000..fe961ceb --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210307_done_operation/NegSem_210307_done_operation_008.ttcn @@ -0,0 +1,34 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:21.3.7, storing verdict in any component.done operation + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// The (optional) value clause for storing the final local verdict of a PTC shall not be used +// in combination with all component or any component. + +module NegSem_210307_done_operation_008 { + + type component GeneralComp {} + + function f() runs on GeneralComp { + setverdict(pass); + } + + testcase TC_NegSem_210307_done_operation_008() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + var verdicttype v_verdict; + v_ptc.start(f()); + alt { + [] any component.done -> value v_verdict { + setverdict(pass); + } + } + } + + control { + execute(TC_NegSem_210307_done_operation_008(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/21_configuration_operations/2103_test_component_operations/210307_done_operation/NegSem_210307_done_operation_009.ttcn b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210307_done_operation/NegSem_210307_done_operation_009.ttcn new file mode 100644 index 00000000..4e9f63e9 --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210307_done_operation/NegSem_210307_done_operation_009.ttcn @@ -0,0 +1,34 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:21.3.7, storing verdict in all component.done operation + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// The (optional) value clause for storing the final local verdict of a PTC shall not be used +// in combination with all component or any component. + +module NegSem_210307_done_operation_009 { + + type component GeneralComp {} + + function f() runs on GeneralComp { + setverdict(pass); + } + + testcase TC_NegSem_210307_done_operation_009() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + var verdicttype v_verdict; + v_ptc.start(f()); + alt { + [] all component.done -> value v_verdict { + setverdict(pass); + } + } + } + + control { + execute(TC_NegSem_210307_done_operation_009(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/21_configuration_operations/2103_test_component_operations/210307_done_operation/NegSem_210307_done_operation_010.ttcn b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210307_done_operation/NegSem_210307_done_operation_010.ttcn new file mode 100644 index 00000000..cd1eb1ca --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210307_done_operation/NegSem_210307_done_operation_010.ttcn @@ -0,0 +1,34 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:21.3.7, partially initialized array in any from ComponentArrayRef.done + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// The ComponentArrayRef shall be a reference to a completely initialized component array. + +module NegSem_210307_done_operation_010 { + + type component GeneralComp {} + + function f() runs on GeneralComp { + setverdict(pass); + } + + testcase TC_NegSem_210307_done_operation_010() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptcs[2]; + var verdicttype v_verdict; + v_ptcs[0] := GeneralComp.create; + v_ptcs[0].start(f()); + alt { + [] any from v_ptcs.done { + setverdict(pass); + } + } + } + + control { + execute(TC_NegSem_210307_done_operation_010(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/21_configuration_operations/2103_test_component_operations/210307_done_operation/NegSyn_210307_done_operation_001.ttcn b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210307_done_operation/NegSyn_210307_done_operation_001.ttcn new file mode 100644 index 00000000..78915fb3 --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210307_done_operation/NegSyn_210307_done_operation_001.ttcn @@ -0,0 +1,35 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:21.3.7, Verify that error occurs when using index redirection in component.done operation + ** @verdict pass reject + *****************************************************************/ +// The following requirements are tested: +// Restriction d +// The index redirection shall only be used when the operation is used on an any from +// component array construct. +module NegSyn_210307_done_operation_001 { + + type component GeneralComp {} + + function f() runs on GeneralComp { + timer t := 1.0; + t.start; + t.timeout; + } + + testcase TC_NegSyn_210307_done_operation_001() runs on GeneralComp system GeneralComp { + var integer v_index; + var GeneralComp v_ptc := GeneralComp.create; + v_ptc.start(f()); + alt + { + [] v_ptc.done -> @index value v_index { setverdict(pass); } + [else] { setverdict(fail, "The any from done operation didn't find done components"); } + } + } + + control { + execute(TC_NegSyn_210307_done_operation_001(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/21_configuration_operations/2103_test_component_operations/210307_done_operation/NegSyn_210307_done_operation_002.ttcn b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210307_done_operation/NegSyn_210307_done_operation_002.ttcn new file mode 100644 index 00000000..68f576cb --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210307_done_operation/NegSyn_210307_done_operation_002.ttcn @@ -0,0 +1,35 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:21.3.7, Verify that error occurs when using index redirection in any component.done operation + ** @verdict pass reject + *****************************************************************/ +// The following requirements are tested: +// Restriction d +// The index redirection shall only be used when the operation is used on an any from +// component array construct. +module NegSyn_210307_done_operation_002 { + + type component GeneralComp {} + + function f() runs on GeneralComp { + timer t := 1.0; + t.start; + t.timeout; + } + + testcase TC_NegSyn_210307_done_operation_002() runs on GeneralComp system GeneralComp { + var integer v_index; + var GeneralComp v_ptc := GeneralComp.create; + v_ptc.start(f()); + alt + { + [] any component.done -> @index value v_index { setverdict(pass); } + [else] { setverdict(fail, "The any from done operation didn't find done components"); } + } + } + + control { + execute(TC_NegSyn_210307_done_operation_002(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/21_configuration_operations/2103_test_component_operations/210307_done_operation/NegSyn_210307_done_operation_003.ttcn b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210307_done_operation/NegSyn_210307_done_operation_003.ttcn new file mode 100644 index 00000000..4a4d78c2 --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210307_done_operation/NegSyn_210307_done_operation_003.ttcn @@ -0,0 +1,35 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:21.3.7, Verify that error occurs when using index redirection in all component.done operation + ** @verdict pass reject + *****************************************************************/ +// The following requirements are tested: +// Restriction d +// The index redirection shall only be used when the operation is used on an any from +// component array construct. +module NegSyn_210307_done_operation_003 { + + type component GeneralComp {} + + function f() runs on GeneralComp { + timer t := 1.0; + t.start; + t.timeout; + } + + testcase TC_NegSyn_210307_done_operation_003() runs on GeneralComp system GeneralComp { + var integer v_index; + var GeneralComp v_ptc := GeneralComp.create; + v_ptc.start(f()); + alt + { + [] all component.done -> @index value v_index { setverdict(pass); } + [else] { setverdict(fail, "The any from done operation didn't find done components"); } + } + } + + control { + execute(TC_NegSyn_210307_done_operation_003(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/21_configuration_operations/2103_test_component_operations/210307_done_operation/NegSyn_210307_done_operation_004.ttcn b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210307_done_operation/NegSyn_210307_done_operation_004.ttcn new file mode 100644 index 00000000..1bf61bd3 --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210307_done_operation/NegSyn_210307_done_operation_004.ttcn @@ -0,0 +1,38 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:21.3.7, Verify that error occurs when using index redirection in function instance.done operation + ** @verdict pass reject + *****************************************************************/ +// The following requirements are tested: +// Restriction d +// The index redirection shall only be used when the operation is used on an any from +// component array construct. +module NegSyn_210307_done_operation_004 { + + type component GeneralComp {} + + function f() runs on GeneralComp { + timer t := 1.0; + t.start; + t.timeout; + } + + function f_getComp(GeneralComp p_ptc) return GeneralComp { + return p_ptc; + } + + testcase TC_NegSyn_210307_done_operation_004() runs on GeneralComp system GeneralComp { + var integer v_index; + var GeneralComp v_ptc := GeneralComp.create; + alt + { + [] any from f_getComp(v_ptc).done -> @index value v_index { setverdict(pass); } + [else] { setverdict(fail, "The any from done operation didn't find done components"); } + } + } + + control { + execute(TC_NegSyn_210307_done_operation_004(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/21_configuration_operations/2103_test_component_operations/210307_done_operation/Sem_210307_done_operation_001.ttcn b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210307_done_operation/Sem_210307_done_operation_001.ttcn new file mode 100644 index 00000000..db40d4bf --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210307_done_operation/Sem_210307_done_operation_001.ttcn @@ -0,0 +1,35 @@ +/***************************************************************** + ** @author STF 451 + ** @version 0.0.1 + ** @purpose 1:21.3.7, Ensure that all component with done can check that at least one test component is not done + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +// Any component done to check that two test component finished. + +module Sem_210307_done_operation_001 { + + type component GeneralComp {} + function f1 ( ) runs on GeneralComp {} + + testcase TC_Sem_210307_done_operation_001() runs on GeneralComp system GeneralComp { + var GeneralComp ptc; + var GeneralComp ptc2; + ptc:=GeneralComp.create alive; + ptc2:=GeneralComp.create alive; + + ptc.start(f1()); + ptc2.start(f1()); + + all component.done; + + alt { + [] all component.done {setverdict(pass);} + } + + + } + + control { + execute(TC_Sem_210307_done_operation_001()); + } +} \ No newline at end of file diff --git a/ATS/core_language/21_configuration_operations/2103_test_component_operations/210307_done_operation/Sem_210307_done_operation_002.ttcn b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210307_done_operation/Sem_210307_done_operation_002.ttcn new file mode 100644 index 00000000..b7bdeddf --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210307_done_operation/Sem_210307_done_operation_002.ttcn @@ -0,0 +1,32 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:21.3.7, Verify that any from done is not triggered if no component has been started + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +// The following requirements are tested: +// When the any from component array notation is used, the components from the referenced array +// are iterated over and individually checked for being stopped or killed from innermost to +// outermost dimension from lowest to highest index for each dimension. The first component to +// be found stopped or killed causes the done operation to succeed. +module Sem_210307_done_operation_002 { + + type component GeneralComp {} + + testcase TC_Sem_210307_done_operation_002() runs on GeneralComp system GeneralComp { + const integer c_size := 4; + var GeneralComp v_ptc[c_size]; + for (var integer i := 0; i < c_size; i := i + 1) { + v_ptc[i] := GeneralComp.create; + } + alt + { + [] any from v_ptc.done { setverdict(fail, "The any from done operation found stopped or killed component"); } + [else] { setverdict(pass); } + } + } + + control { + execute(TC_Sem_210307_done_operation_002(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/21_configuration_operations/2103_test_component_operations/210307_done_operation/Sem_210307_done_operation_003.ttcn b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210307_done_operation/Sem_210307_done_operation_003.ttcn new file mode 100644 index 00000000..7d8e91fb --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210307_done_operation/Sem_210307_done_operation_003.ttcn @@ -0,0 +1,43 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:21.3.7, Verify that any from done matches if at least one component is stopped or killed + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +// The following requirements are tested: +// When the any from component array notation is used, the components from the referenced array +// are iterated over and individually checked for executing currently from innermost to outermost +// dimension from lowest to highest index for each dimension. The first component to be found +// executing causes the done operation to succeed. +module Sem_210307_done_operation_003 { + + type component GeneralComp {} + + function f(float p_time) runs on GeneralComp { + timer t := p_time; + t.start; + t.timeout; + } + + testcase TC_Sem_210307_done_operation_003() runs on GeneralComp system GeneralComp { + const integer c_size := 4; + var GeneralComp v_ptc[c_size]; + timer t := 2.0; + for (var integer i := 0; i < c_size; i := i + 1) { + v_ptc[i] := GeneralComp.create; // created components are inactive + if (i == 3) { v_ptc[i].start(f(1.0)); } + else { v_ptc[i].start(f(100.0)); } + } + t.start; + t.timeout; + alt + { + [] any from v_ptc.done { setverdict(pass); } + [else] { setverdict(fail, "The any from done operation didn't found stopped or killed component"); } + } + } + + control { + execute(TC_Sem_210307_done_operation_003(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/21_configuration_operations/2103_test_component_operations/210307_done_operation/Sem_210307_done_operation_004.ttcn b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210307_done_operation/Sem_210307_done_operation_004.ttcn new file mode 100644 index 00000000..06879514 --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210307_done_operation/Sem_210307_done_operation_004.ttcn @@ -0,0 +1,43 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:21.3.7, Verify that any from done doesn't assign index when no component has been stopped or killed + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +// The following requirements are tested: +// The index of the matched component can optionally be assigned to an integer variable +// for single-dimensional component arrays... +module Sem_210307_done_operation_004 { + + type component GeneralComp {} + + function f() runs on GeneralComp { + timer t := 100.0; + t.start; + t.timeout; + } + + testcase TC_Sem_210307_done_operation_004() runs on GeneralComp system GeneralComp { + const integer c_size := 4; + var GeneralComp v_ptc[c_size]; + var integer v_index; + for (var integer i := 0; i < c_size; i := i + 1) { + v_ptc[i] := GeneralComp.create; + v_ptc[i].start(f()); + } + alt + { + [] any from v_ptc.done -> @index value v_index { setverdict(fail, "The any from done operation didn't found stopped or killed component"); } + [else] { setverdict(pass); } + } + if(not isbound(v_index)){ + setverdict(pass); + } else { + setverdict(fail, "Index incorrectly assigned"); + } + } + + control { + execute(TC_Sem_210307_done_operation_004(), 5000.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/21_configuration_operations/2103_test_component_operations/210307_done_operation/Sem_210307_done_operation_005.ttcn b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210307_done_operation/Sem_210307_done_operation_005.ttcn new file mode 100644 index 00000000..70e475f5 --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210307_done_operation/Sem_210307_done_operation_005.ttcn @@ -0,0 +1,43 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:21.3.7, Verify that any from done doesn't change index variable when no component has been stopped or killed + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +// The following requirements are tested: +// The index of the matched component can optionally be assigned to an integer variable +// for single-dimensional component arrays... +module Sem_210307_done_operation_005 { + + type component GeneralComp {} + + function f() runs on GeneralComp { + timer t := 100.0; + t.start; + t.timeout; + } + + testcase TC_Sem_210307_done_operation_005() runs on GeneralComp system GeneralComp { + const integer c_size := 4; + var GeneralComp v_ptc[c_size]; + var integer v_index := 99; + for (var integer i := 0; i < c_size; i := i + 1) { + v_ptc[i] := GeneralComp.create; + v_ptc[i].start(f()); + } + alt + { + [] any from v_ptc.done -> @index value v_index { setverdict(fail, "The any from done operation didn't found stopped or killed component"); } + [else] { setverdict(pass); } + } + if(v_index == 99){ + setverdict(pass); + } else { + setverdict(fail, "Index incorrectly assigned"); + } + } + + control { + execute(TC_Sem_210307_done_operation_005(), 5000.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/21_configuration_operations/2103_test_component_operations/210307_done_operation/Sem_210307_done_operation_006.ttcn b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210307_done_operation/Sem_210307_done_operation_006.ttcn new file mode 100644 index 00000000..20508e59 --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210307_done_operation/Sem_210307_done_operation_006.ttcn @@ -0,0 +1,48 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:21.3.7, Verify that any from done assigns index + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +// The following requirements are tested: +// The index of the matched component can optionally be assigned to an integer variable +// for single-dimensional component arrays... +module Sem_210307_done_operation_006 { + + type component GeneralComp {} + + function f(float f_time) runs on GeneralComp { + timer t := f_time; + t.start; + t.timeout; + } + + testcase TC_Sem_210307_done_operation_006() runs on GeneralComp system GeneralComp { + const integer c_size := 4; + var GeneralComp v_ptc[c_size]; + var integer v_index; + timer t := 2.0; + for (var integer i := 0; i < c_size; i := i + 1) { + v_ptc[i] := GeneralComp.create; // created components are inactive + if (i == 2) { v_ptc[i].start(f(1.0)); } + else { v_ptc[i].start(f(100.0)); } + } + t.start; + t.timeout; + alt + { + [] any from v_ptc.done -> @index value v_index { + if(v_index == 2){ + setverdict(pass); + } else { + setverdict(fail, "Index incorrectly assigned"); + } + } + [else] { setverdict(fail, "The any from done operation didn't found stopped or killed component"); } + } + } + + control { + execute(TC_Sem_210307_done_operation_006(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/21_configuration_operations/2103_test_component_operations/210307_done_operation/Sem_210307_done_operation_007.ttcn b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210307_done_operation/Sem_210307_done_operation_007.ttcn new file mode 100644 index 00000000..ddb1fab1 --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210307_done_operation/Sem_210307_done_operation_007.ttcn @@ -0,0 +1,39 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:21.3.7, Verify that any from done is not triggered if all components are executing function + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +// The following requirements are tested: +// When the any from component array notation is used, the components from the referenced array +// are iterated over and individually checked for being stopped or killed from innermost to +// outermost dimension from lowest to highest index for each dimension. The first component to +// be found stopped or killed causes the done operation to succeed. +module Sem_210307_done_operation_007 { + + type component GeneralComp {} + + function f() runs on GeneralComp { + timer t := 100.0; + t.start; + t.timeout; + } + + testcase TC_Sem_210307_done_operation_007() runs on GeneralComp system GeneralComp { + const integer c_size := 4; + var GeneralComp v_ptc[c_size]; + for (var integer i := 0; i < c_size; i := i + 1) { + v_ptc[i] := GeneralComp.create; + v_ptc[i].start(f()); + } + alt + { + [] any from v_ptc.done { setverdict(fail, "The any from done operation found stopped or killed component"); } + [else] { setverdict(pass); } + } + } + + control { + execute(TC_Sem_210307_done_operation_007(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/21_configuration_operations/2103_test_component_operations/210307_done_operation/Sem_210307_done_operation_008.ttcn b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210307_done_operation/Sem_210307_done_operation_008.ttcn new file mode 100644 index 00000000..9877849f --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210307_done_operation/Sem_210307_done_operation_008.ttcn @@ -0,0 +1,54 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:21.3.7, Verify that any from done index redirection works for multidimensional arrays + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +// The following requirements are tested: +// Restriction e: +// If the index redirection is used for multi-dimensional component arrays, the size +// of the integer array or record of integer type shall exactly be the same as the dimension +// of the respective array, and its type shall allow storing the highest index (from all +// dimensions) of the array. +module Sem_210307_done_operation_008 { + + type component GeneralComp {} + + function f(float p_time) runs on GeneralComp { + timer t := p_time; + t.start; + t.timeout; + } + + testcase TC_Sem_210307_done_operation_008() runs on GeneralComp system GeneralComp { + var boolean v_isRunning; + const integer c_size := 3; + var GeneralComp v_ptc[c_size][c_size]; + var integer v_index[2]; + timer t := 2.0; + for (var integer i := 0; i < c_size; i := i + 1) { + for (var integer j := 0; j < c_size; j := j + 1) { + v_ptc[i][j] := GeneralComp.create; // created components are inactive + if (i == 2 and j == 1) { v_ptc[i][j].start(f(1.0)); } + else { v_ptc[i][j].start(f(100.0));} // activate v_ptc + } + } + t.start; + t.timeout; + alt + { + [] any from v_ptc.done -> @index value v_index { + if(v_index[0] == 2 and v_index[1] == 1){ + setverdict(pass); + } else { + setverdict(fail, "Index incorrectly assigned"); + } + } + [else] { setverdict(fail, "The any from done operation didn't found stopped or killed component"); } + } + } + + control { + execute(TC_Sem_210307_done_operation_008(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/21_configuration_operations/2103_test_component_operations/210307_done_operation/Sem_210307_done_operation_009.ttcn b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210307_done_operation/Sem_210307_done_operation_009.ttcn new file mode 100644 index 00000000..9b54adbf --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210307_done_operation/Sem_210307_done_operation_009.ttcn @@ -0,0 +1,52 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:21.3.7, Verify any from done index redirection to lazy variable + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +// The following requirements are tested: +// Restriction g +// If a variable referenced in the @index clause is a lazy or fuzzy variable, the expression +// assigned to this variable is equal to the result produced by the done operation. Later +// evaluation of the lazy or fuzzy variable does not lead to repeated invocation of the +// done operation. +module Sem_210307_done_operation_009 { + + type component GeneralComp {} + + function f(float p_time) runs on GeneralComp { + timer t := p_time; + t.start; + t.timeout; + } + + testcase TC_Sem_210307_done_operation_009() runs on GeneralComp system GeneralComp { + const integer c_size := 4; + var GeneralComp v_ptc[c_size]; + var @lazy integer v_index; + timer t := 2.0; + for (var integer i := 0; i < c_size; i := i + 1) { + v_ptc[i] := GeneralComp.create; // created components are inactive + if (i == 2) { v_ptc[i].start(f(1.0)); } + else { v_ptc[i].start(f(100.0)); } + } + t.start; + t.timeout; + alt + { + [] any from v_ptc.done -> @index value v_index { + v_ptc[0].kill; // component at position 0 is killed after the redirect assignment + if(v_index == 2){ // no done call during evaluation, v_index remains equal to 2 + setverdict(pass); + } else { + setverdict(fail, "Index incorrectly assigned"); + } + } + [else] { setverdict(fail, "The any from done operation didn't found stopped or killed component"); } + } + } + + control { + execute(TC_Sem_210307_done_operation_009(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/21_configuration_operations/2103_test_component_operations/210307_done_operation/Sem_210307_done_operation_010.ttcn b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210307_done_operation/Sem_210307_done_operation_010.ttcn new file mode 100644 index 00000000..f8682b80 --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210307_done_operation/Sem_210307_done_operation_010.ttcn @@ -0,0 +1,52 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:21.3.7, Verify any from done index redirection to fuzzy variable + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +// The following requirements are tested: +// Restriction g +// If a variable referenced in the @index clause is a lazy or fuzzy variable, the expression +// assigned to this variable is equal to the result produced by the done operation. Later +// evaluation of the lazy or fuzzy variable does not lead to repeated invocation of the +// done operation. +module Sem_210307_done_operation_010 { + + type component GeneralComp {} + + function f(float p_time) runs on GeneralComp { + timer t := p_time; + t.start; + t.timeout; + } + + testcase TC_Sem_210307_done_operation_010() runs on GeneralComp system GeneralComp { + const integer c_size := 4; + var GeneralComp v_ptc[c_size]; + var @fuzzy integer v_index; + timer t := 2.0; + for (var integer i := 0; i < c_size; i := i + 1) { + v_ptc[i] := GeneralComp.create; // created components are inactive + if (i == 2) { v_ptc[i].start(f(1.0)); } + else { v_ptc[i].start(f(100.0)); } + } + t.start; + t.timeout; + alt + { + [] any from v_ptc.done -> @index value v_index { + v_ptc[0].kill; // component at position 0 is killed after the redirect assignment + if(v_index == 2){ // no done call during evaluation, v_index remains equal to 2 + setverdict(pass); + } else { + setverdict(fail, "Index incorrectly assigned"); + } + } + [else] { setverdict(fail, "The any from done operation didn't found stopped or killed component"); } + } + } + + control { + execute(TC_Sem_210307_done_operation_010(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/21_configuration_operations/2103_test_component_operations/210307_done_operation/Sem_210307_done_operation_011.ttcn b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210307_done_operation/Sem_210307_done_operation_011.ttcn new file mode 100644 index 00000000..47a25863 --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210307_done_operation/Sem_210307_done_operation_011.ttcn @@ -0,0 +1,39 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:21.3.7, Verify that all component.done produces true if some components haven't been started + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +// The following requirements are tested: +// When the all keyword is used with the done operation, it matches if no one PTC is executing its +// behaviour. It also matches if no PTC has been created. +// Interpretation according to the following note: +// The difference between the done operation applied to a single ptc and the usage of the all +// keyword leads to the situation that ptc.done does not match if the ptc has never been started +// but all component.done matches at the same time as it considers only those components that +// ever have been started . +module Sem_210307_done_operation_011 { + + type component GeneralComp {} + + function f() runs on GeneralComp { + timer t := 100.0; + t.start; + t.timeout; + } + + testcase TC_Sem_210307_done_operation_011() runs on GeneralComp system GeneralComp { + var boolean v_isRunning; + const integer c_size := 4; + var GeneralComp v_ptc := GeneralComp.create; + alt { + [] v_ptc.done { setverdict(fail, "PTC is not done yet (it actually hasn't been started yet)" )} + [] all component.done { setverdict(pass); } + [else] { setverdict(fail, "all component.done wasn't triggered"); } + } + } + + control { + execute(TC_Sem_210307_done_operation_011(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/21_configuration_operations/2103_test_component_operations/210307_done_operation/Sem_210307_done_operation_012.ttcn b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210307_done_operation/Sem_210307_done_operation_012.ttcn new file mode 100644 index 00000000..048e7dd4 --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210307_done_operation/Sem_210307_done_operation_012.ttcn @@ -0,0 +1,36 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:21.3.7, storing verdict in done operation + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirements are tested: +// When the done operation is applied to a PTC and matches, the final local verdict of the PTC +// can be retrieved and stored in variable of the type verdicttype. This is denoted by the +// symbol '->' the keyword value followed by the name of the variable into which the verdict +// is stored. + +module Sem_210307_done_operation_012 { + + type component GeneralComp {} + + function f() runs on GeneralComp { + setverdict(pass); + } + + testcase TC_Sem_210307_done_operation_012() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + var verdicttype v_verdict; + v_ptc.start(f()); + alt { + [] v_ptc.done -> value v_verdict { + if (v_verdict != pass) { setverdict(fail, "Invalid PTC verdict"); } + } + } + } + + control { + execute(TC_Sem_210307_done_operation_012(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/21_configuration_operations/2103_test_component_operations/210308_killed_operation/NegSem_210308_killed_operation_001.ttcn b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210308_killed_operation/NegSem_210308_killed_operation_001.ttcn new file mode 100644 index 00000000..71f7c1d3 --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210308_killed_operation/NegSem_210308_killed_operation_001.ttcn @@ -0,0 +1,32 @@ +/***************************************************************** + ** @author STF 451 + ** @version 0.0.1 + ** @purpose 1:21.3.8, Ensure that killed operator is only valid for ptcs. + ** @verdict pass reject + *****************************************************************/ +// killed operator is not allowed for mtc check. + +module NegSem_210308_killed_operation_001 { + + type component GeneralComp {} + function f1 ( ) runs on GeneralComp {} + + testcase TC_NegSem_210308_killed_operation_001() runs on GeneralComp system GeneralComp { + var GeneralComp ptc; + var GeneralComp ptc2; + ptc:=GeneralComp.create alive; + ptc2:=GeneralComp.create alive; + + ptc.start(f1()); + + mtc.kill; + + alt { + [] any component killed {setverdict(pass);} // not allowed. killed only allowed for ptcs. + } + } + + control { + execute(TC_NegSem_210308_killed_operation_001()); + } +} \ No newline at end of file diff --git a/ATS/core_language/21_configuration_operations/2103_test_component_operations/210308_killed_operation/NegSem_210308_killed_operation_002.ttcn b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210308_killed_operation/NegSem_210308_killed_operation_002.ttcn new file mode 100644 index 00000000..21aea665 --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210308_killed_operation/NegSem_210308_killed_operation_002.ttcn @@ -0,0 +1,33 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:21.3.8, Verify that error occurs when any from killed is applied to single component + ** @verdict pass reject + *****************************************************************/ +// The following requirements are tested: +// Restriction b +// The ComponentArrayRef shall be a reference to a component array variable identifier. +module NegSem_210308_killed_operation_002 { + + type component GeneralComp {} + + function f() runs on GeneralComp { + timer t := 100.0; + t.start; + t.timeout; + } + + testcase TC_NegSem_210308_killed_operation_002() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + v_ptc.kill; + alt + { + [] any from v_ptc.killed { setverdict(pass); } + [else] { setverdict(fail, "The any from killed operation didn't find killed components"); } + } + } + + control { + execute(TC_NegSem_210308_killed_operation_002(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/21_configuration_operations/2103_test_component_operations/210308_killed_operation/NegSem_210308_killed_operation_003.ttcn b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210308_killed_operation/NegSem_210308_killed_operation_003.ttcn new file mode 100644 index 00000000..991b7e41 --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210308_killed_operation/NegSem_210308_killed_operation_003.ttcn @@ -0,0 +1,48 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:21.3.8, Verify that error occurs when any from killed is applied to 1D array and index target is array + ** @verdict pass reject + *****************************************************************/ +// The following requirements are tested: +// Restriction d +// If the index redirection is used for single-dimensional component arrays, the type +// of the integer variable shall allow storing the highest index of the respective array. +module NegSem_210308_killed_operation_003 { + + type component GeneralComp {} + + function f() runs on GeneralComp { + timer t := 100.0; + t.start; + t.timeout; + } + + testcase TC_NegSem_210308_killed_operation_003() runs on GeneralComp system GeneralComp { + const integer c_size := 4; + var GeneralComp v_ptc[c_size]; + var integer v_index[1]; + for (var integer i := 0; i < c_size; i := i + 1) { + v_ptc[i] := GeneralComp.create; // created components are inactive + if (i mod 2 == 0) { v_ptc[i].kill; } // kill components on even indices + else { v_ptc[i].start(f());} // activate v_ptc + } + alt + { + [] any from v_ptc.killed -> @index value v_index + { + if(v_index[0] == 1){ + setverdict(pass); + } else { + setverdict(fail, "Invalid index value"); + } + setverdict(pass); + } + [else] { setverdict(fail, "The any from killed operation didn't find killed components"); } + } + } + + control { + execute(TC_NegSem_210308_killed_operation_003(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/21_configuration_operations/2103_test_component_operations/210308_killed_operation/NegSem_210308_killed_operation_004.ttcn b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210308_killed_operation/NegSem_210308_killed_operation_004.ttcn new file mode 100644 index 00000000..3460b503 --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210308_killed_operation/NegSem_210308_killed_operation_004.ttcn @@ -0,0 +1,48 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:21.3.8, Verify that error occurs when any from killed is applied to 1D array and index target has wrong type + ** @verdict pass reject + *****************************************************************/ +// The following requirements are tested: +// Restriction d +// If the index redirection is used for single-dimensional component arrays, the type +// of the integer variable shall allow storing the highest index of the respective array. +module NegSem_210308_killed_operation_004 { + + type component GeneralComp {} + + function f() runs on GeneralComp { + timer t := 100.0; + t.start; + t.timeout; + } + + testcase TC_NegSem_210308_killed_operation_004() runs on GeneralComp system GeneralComp { + const integer c_size := 4; + var GeneralComp v_ptc[c_size]; + var float v_index; + for (var integer i := 0; i < c_size; i := i + 1) { + v_ptc[i] := GeneralComp.create; // created components are inactive + if (i mod 2 == 0) { v_ptc[i].kill; } // kill components on even indices + else { v_ptc[i].start(f());} // activate v_ptc + } + alt + { + [] any from v_ptc.killed -> @index value v_index + { + if(v_index == 1.0){ + setverdict(pass); + } else { + setverdict(fail, "Invalid index value"); + } + setverdict(pass); + } + [else] { setverdict(fail, "The any from killed operation didn't find killed components"); } + } + } + + control { + execute(TC_NegSem_210308_killed_operation_004(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/21_configuration_operations/2103_test_component_operations/210308_killed_operation/NegSem_210308_killed_operation_005.ttcn b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210308_killed_operation/NegSem_210308_killed_operation_005.ttcn new file mode 100644 index 00000000..e5516a3b --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210308_killed_operation/NegSem_210308_killed_operation_005.ttcn @@ -0,0 +1,52 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:21.3.8, Verify that any from killed index redirection for multi-D arrays requires arrays of correct size + ** @verdict pass reject + *****************************************************************/ +// The following requirements are tested: +// Restriction e: +// If the index redirection is used for multi-dimensional component arrays, the size +// of the integer array or record of integer type shall exactly be the same as the dimension +// of the respective array, and its type shall allow storing the highest index (from all +// dimensions) of the array. +module NegSem_210308_killed_operation_005 { + + type component GeneralComp {} + + function f() runs on GeneralComp { + timer t := 100.0; + t.start; + t.timeout; + } + + testcase TC_NegSem_210308_killed_operation_005() runs on GeneralComp system GeneralComp { + const integer c_size := 3; + var GeneralComp v_ptc[c_size][c_size]; + var integer v_index[1]; + for (var integer i := 0; i < c_size; i := i + 1) { + for (var integer j := 0; j < c_size; j := j + 1) { + v_ptc[i][j] := GeneralComp.create; // created components are inactive + if (i mod 2 == 0 or j mod 2 == 1) { v_ptc[i][j].kill; } // kill components on even i or odd j + else { v_ptc[i][j].start(f());} // activate v_ptc + } + } + alt + { + [] any from v_ptc.killed -> @index value v_index + { + if(v_index[0] == 1 and v_index[1] == 0){ + setverdict(pass); + } else { + setverdict(fail, "Invalid index value"); + } + setverdict(pass); + } + [else] { setverdict(fail, "The any from killed operation didn't find killed components"); } + } + } + + control { + execute(TC_NegSem_210308_killed_operation_005(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/21_configuration_operations/2103_test_component_operations/210308_killed_operation/NegSem_210308_killed_operation_006.ttcn b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210308_killed_operation/NegSem_210308_killed_operation_006.ttcn new file mode 100644 index 00000000..c2b536a4 --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210308_killed_operation/NegSem_210308_killed_operation_006.ttcn @@ -0,0 +1,52 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:21.3.8, Verify that any from killed index redirection for multi-D arrays requires arrays + ** @verdict pass reject + *****************************************************************/ +// The following requirements are tested: +// Restriction e: +// If the index redirection is used for multi-dimensional component arrays, the size +// of the integer array or record of integer type shall exactly be the same as the dimension +// of the respective array, and its type shall allow storing the highest index (from all +// dimensions) of the array. +module NegSem_210308_killed_operation_006 { + + type component GeneralComp {} + + function f() runs on GeneralComp { + timer t := 100.0; + t.start; + t.timeout; + } + + testcase TC_NegSem_210308_killed_operation_006() runs on GeneralComp system GeneralComp { + const integer c_size := 3; + var GeneralComp v_ptc[c_size][c_size]; + var integer v_index; + for (var integer i := 0; i < c_size; i := i + 1) { + for (var integer j := 0; j < c_size; j := j + 1) { + v_ptc[i][j] := GeneralComp.create; // created components are inactive + if (i mod 2 == 0 or j mod 2 == 1) { v_ptc[i][j].kill; } // kill components on even i or odd j + else { v_ptc[i][j].start(f());} // activate v_ptc + } + } + alt + { + [] any from v_ptc.killed -> @index value v_index + { + if(v_index == 1){ + setverdict(pass); + } else { + setverdict(fail, "Invalid index value"); + } + setverdict(pass); + } + [else] { setverdict(fail, "The any from killed operation didn't find killed components"); } + } + } + + control { + execute(TC_NegSem_210308_killed_operation_006(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/21_configuration_operations/2103_test_component_operations/210308_killed_operation/NegSem_210308_killed_operation_007.ttcn b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210308_killed_operation/NegSem_210308_killed_operation_007.ttcn new file mode 100644 index 00000000..d0c082b4 --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210308_killed_operation/NegSem_210308_killed_operation_007.ttcn @@ -0,0 +1,34 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:21.3.8, variable of incorrect type used for storing verdict in killed operation + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// The variable used in the (optional) value clause for storing the final local verdict +// of a PTC shall be of the type verdicttype. + +module NegSem_210308_killed_operation_007 { + + type component GeneralComp {} + + function f() runs on GeneralComp { + setverdict(pass); + } + + testcase TC_NegSem_210308_killed_operation_007() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + var boolean v_verdict; + v_ptc.start(f()); + alt { + [] v_ptc.killed -> value v_verdict { + setverdict(pass); + } + } + } + + control { + execute(TC_NegSem_210308_killed_operation_007(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/21_configuration_operations/2103_test_component_operations/210308_killed_operation/NegSem_210308_killed_operation_008.ttcn b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210308_killed_operation/NegSem_210308_killed_operation_008.ttcn new file mode 100644 index 00000000..a7ec6d04 --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210308_killed_operation/NegSem_210308_killed_operation_008.ttcn @@ -0,0 +1,34 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:21.3.8, storing verdict in any component.killed operation + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// The (optional) value clause for storing the final local verdict of a PTC shall not be used +// in combination with all component or any component. + +module NegSem_210308_killed_operation_008 { + + type component GeneralComp {} + + function f() runs on GeneralComp { + setverdict(pass); + } + + testcase TC_NegSem_210308_killed_operation_008() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + var verdicttype v_verdict; + v_ptc.start(f()); + alt { + [] any component.killed -> value v_verdict { + setverdict(pass); + } + } + } + + control { + execute(TC_NegSem_210308_killed_operation_008(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/21_configuration_operations/2103_test_component_operations/210308_killed_operation/NegSem_210308_killed_operation_009.ttcn b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210308_killed_operation/NegSem_210308_killed_operation_009.ttcn new file mode 100644 index 00000000..a9372332 --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210308_killed_operation/NegSem_210308_killed_operation_009.ttcn @@ -0,0 +1,34 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:21.3.8, storing verdict in all component.killed operation + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// The (optional) value clause for storing the final local verdict of a PTC shall not be used +// in combination with all component or any component. + +module NegSem_210308_killed_operation_009 { + + type component GeneralComp {} + + function f() runs on GeneralComp { + setverdict(pass); + } + + testcase TC_NegSem_210308_killed_operation_009() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + var verdicttype v_verdict; + v_ptc.start(f()); + alt { + [] all component.killed -> value v_verdict { + setverdict(pass); + } + } + } + + control { + execute(TC_NegSem_210308_killed_operation_009(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/21_configuration_operations/2103_test_component_operations/210308_killed_operation/NegSem_210308_killed_operation_010.ttcn b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210308_killed_operation/NegSem_210308_killed_operation_010.ttcn new file mode 100644 index 00000000..8e653249 --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210308_killed_operation/NegSem_210308_killed_operation_010.ttcn @@ -0,0 +1,34 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:21.3.7, partially initialized array in any from ComponentArrayRef.killed + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// The ComponentArrayRef shall be a reference to a completely initialized component array. + +module NegSem_210307_done_operation_010 { + + type component GeneralComp {} + + function f() runs on GeneralComp { + setverdict(pass); + } + + testcase TC_NegSem_210307_done_operation_010() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptcs[2]; + var verdicttype v_verdict; + v_ptcs[0] := GeneralComp.create; + v_ptcs[0].start(f()); + alt { + [] any from v_ptcs.killed { + setverdict(pass); + } + } + } + + control { + execute(TC_NegSem_210307_done_operation_010(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/21_configuration_operations/2103_test_component_operations/210308_killed_operation/NegSyn_210308_killed_operation_001.ttcn b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210308_killed_operation/NegSyn_210308_killed_operation_001.ttcn new file mode 100644 index 00000000..6ece700b --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210308_killed_operation/NegSyn_210308_killed_operation_001.ttcn @@ -0,0 +1,35 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:21.3.8, Verify that error occurs when using index redirection in component.killed operation + ** @verdict pass reject + *****************************************************************/ +// The following requirements are tested: +// Restriction c +// The index redirection shall only be used when the operation is used on an any from +// component array construct. +module NegSyn_210308_killed_operation_001 { + + type component GeneralComp {} + + function f() runs on GeneralComp { + timer t := 1.0; + t.start; + t.timeout; + } + + testcase TC_NegSyn_210308_killed_operation_001() runs on GeneralComp system GeneralComp { + var integer v_index; + var GeneralComp v_ptc := GeneralComp.create; + v_ptc.start(f()); + alt + { + [] v_ptc.killed -> @index value v_index { setverdict(pass); } + [else] { setverdict(fail, "The any from killed operation didn't find killed components"); } + } + } + + control { + execute(TC_NegSyn_210308_killed_operation_001(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/21_configuration_operations/2103_test_component_operations/210308_killed_operation/NegSyn_210308_killed_operation_002.ttcn b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210308_killed_operation/NegSyn_210308_killed_operation_002.ttcn new file mode 100644 index 00000000..74d0d94e --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210308_killed_operation/NegSyn_210308_killed_operation_002.ttcn @@ -0,0 +1,35 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:21.3.8, Verify that error occurs when using index redirection in any component.killed operation + ** @verdict pass reject + *****************************************************************/ +// The following requirements are tested: +// Restriction c +// The index redirection shall only be used when the operation is used on an any from +// component array construct. +module NegSyn_210308_killed_operation_002 { + + type component GeneralComp {} + + function f() runs on GeneralComp { + timer t := 1.0; + t.start; + t.timeout; + } + + testcase TC_NegSyn_210308_killed_operation_002() runs on GeneralComp system GeneralComp { + var integer v_index; + var GeneralComp v_ptc := GeneralComp.create; + v_ptc.start(f()); + alt + { + [] any component.killed -> @index value v_index { setverdict(pass); } + [else] { setverdict(fail, "The any from killed operation didn't find killed components"); } + } + } + + control { + execute(TC_NegSyn_210308_killed_operation_002(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/21_configuration_operations/2103_test_component_operations/210308_killed_operation/NegSyn_210308_killed_operation_003.ttcn b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210308_killed_operation/NegSyn_210308_killed_operation_003.ttcn new file mode 100644 index 00000000..f296300a --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210308_killed_operation/NegSyn_210308_killed_operation_003.ttcn @@ -0,0 +1,35 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:21.3.8, Verify that error occurs when using index redirection in all component.killed operation + ** @verdict pass reject + *****************************************************************/ +// The following requirements are tested: +// Restriction c +// The index redirection shall only be used when the operation is used on an any from +// component array construct. +module NegSyn_210308_killed_operation_003 { + + type component GeneralComp {} + + function f() runs on GeneralComp { + timer t := 1.0; + t.start; + t.timeout; + } + + testcase TC_NegSyn_210308_killed_operation_003() runs on GeneralComp system GeneralComp { + var integer v_index; + var GeneralComp v_ptc := GeneralComp.create; + v_ptc.start(f()); + alt + { + [] all component.killed -> @index value v_index { setverdict(pass); } + [else] { setverdict(fail, "The any from killed operation didn't find killed components"); } + } + } + + control { + execute(TC_NegSyn_210308_killed_operation_003(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/21_configuration_operations/2103_test_component_operations/210308_killed_operation/NegSyn_210308_killed_operation_004.ttcn b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210308_killed_operation/NegSyn_210308_killed_operation_004.ttcn new file mode 100644 index 00000000..081a0d7c --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210308_killed_operation/NegSyn_210308_killed_operation_004.ttcn @@ -0,0 +1,38 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:21.3.8, Verify that error occurs when using index redirection in function instance.killed operation + ** @verdict pass reject + *****************************************************************/ +// The following requirements are tested: +// Restriction c +// The index redirection shall only be used when the operation is used on an any from +// component array construct. +module NegSyn_210308_killed_operation_004 { + + type component GeneralComp {} + + function f() runs on GeneralComp { + timer t := 1.0; + t.start; + t.timeout; + } + + function f_getComp(GeneralComp p_ptc) return GeneralComp { + return p_ptc; + } + + testcase TC_NegSyn_210308_killed_operation_004() runs on GeneralComp system GeneralComp { + var integer v_index; + var GeneralComp v_ptc := GeneralComp.create; + alt + { + [] any from f_getComp(v_ptc).killed -> @index value v_index { setverdict(pass); } + [else] { setverdict(fail, "The any from killed operation didn't find killed components"); } + } + } + + control { + execute(TC_NegSyn_210308_killed_operation_004(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/21_configuration_operations/2103_test_component_operations/210308_killed_operation/Sem_210308_killed_operation_001.ttcn b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210308_killed_operation/Sem_210308_killed_operation_001.ttcn new file mode 100644 index 00000000..d8e7e946 --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210308_killed_operation/Sem_210308_killed_operation_001.ttcn @@ -0,0 +1,35 @@ +/***************************************************************** + ** @author STF 451 + ** @version 0.0.1 + ** @purpose 1:21.3.8, Ensure that all component kill can be checked with killed operator + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +// all components are killed, than check the status with killed operator + +module Sem_210308_killed_operation_001 { + + type component GeneralComp {} + function f1 ( ) runs on GeneralComp {} + + testcase TC_Sem_210308_killed_operation_001() runs on GeneralComp system GeneralComp { + var GeneralComp ptc; + var GeneralComp ptc2; + ptc:=GeneralComp.create alive; + ptc2:=GeneralComp.create alive; + + ptc.start(f1()); + ptc2.start(f1()); + + all component.kill; + + alt { + [] all component.killed {setverdict(pass);} + } + + + } + + control { + execute(TC_Sem_210308_killed_operation_001()); + } +} \ No newline at end of file diff --git a/ATS/core_language/21_configuration_operations/2103_test_component_operations/210308_killed_operation/Sem_210308_killed_operation_002.ttcn b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210308_killed_operation/Sem_210308_killed_operation_002.ttcn new file mode 100644 index 00000000..effba159 --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210308_killed_operation/Sem_210308_killed_operation_002.ttcn @@ -0,0 +1,34 @@ +/***************************************************************** + ** @author STF 451 + ** @version 0.0.1 + ** @purpose 1:21.3.8, check that any component and killed operator can check that at least one test component is running or not + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +// Check that at least one test component is still running or not +module Sem_210308_killed_operation_002 { + + type component GeneralComp {} + function f1 ( ) runs on GeneralComp {} + + testcase TC_Sem_210308_killed_operation_002() runs on GeneralComp system GeneralComp { + var GeneralComp ptc; + var GeneralComp ptc2; + ptc:=GeneralComp.create alive; + ptc2:=GeneralComp.create alive; + + ptc.start(f1()); + ptc2.start(f1()); + + ptc.kill; + + alt { + [] any component.killed {setverdict(pass);} + } + + + } + + control { + execute(TC_Sem_210308_killed_operation_002()); + } +} \ No newline at end of file diff --git a/ATS/core_language/21_configuration_operations/2103_test_component_operations/210308_killed_operation/Sem_210308_killed_operation_003.ttcn b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210308_killed_operation/Sem_210308_killed_operation_003.ttcn new file mode 100644 index 00000000..e2b0263f --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210308_killed_operation/Sem_210308_killed_operation_003.ttcn @@ -0,0 +1,35 @@ +/***************************************************************** + ** @author STF 451 + ** @version 0.0.1 + ** @purpose 1:21.3.8, Ensure that the alive keyword is properly evaluated + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +module Sem_210308_killed_operation_003 { + + type component GeneralComp {} + function f1 ( ) runs on GeneralComp {} + + testcase TC_Sem_210308_killed_operation_003() runs on GeneralComp system GeneralComp { + var GeneralComp ptc; + var GeneralComp ptc2; + ptc:=GeneralComp.create alive; + ptc2:=GeneralComp.create; + + ptc.start(f1()); + ptc2.start(f1()); + + ptc.stop; + ptc2.stop; + + alt { + [] all component.killed {setverdict(fail);} //ptc is alive only kill stops it + [] ptc2.killed {setverdict(pass);} + } + + + } + + control { + execute(TC_Sem_210308_killed_operation_003()); + } +} \ No newline at end of file diff --git a/ATS/core_language/21_configuration_operations/2103_test_component_operations/210308_killed_operation/Sem_210308_killed_operation_004.ttcn b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210308_killed_operation/Sem_210308_killed_operation_004.ttcn new file mode 100644 index 00000000..78ed2528 --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210308_killed_operation/Sem_210308_killed_operation_004.ttcn @@ -0,0 +1,32 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:21.3.8, Verify that any from killed is not triggered if no component has been started + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +// The following requirements are tested: +// When the any from component array notation is used, the components from the referenced array +// are iterated over and individually checked for being killed from innermost to outermost +// dimension from lowest to highest index for each dimension. The first component to be found +// killed causes the killed operation to succeed. +module Sem_210308_killed_operation_004 { + + type component GeneralComp {} + + testcase TC_Sem_210308_killed_operation_004() runs on GeneralComp system GeneralComp { + const integer c_size := 4; + var GeneralComp v_ptc[c_size]; + for (var integer i := 0; i < c_size; i := i + 1) { + v_ptc[i] := GeneralComp.create; + } + alt + { + [] any from v_ptc.killed { setverdict(fail, "The any from killed operation found killed component"); } + [else] { setverdict(pass); } + } + } + + control { + execute(TC_Sem_210308_killed_operation_004(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/21_configuration_operations/2103_test_component_operations/210308_killed_operation/Sem_210308_killed_operation_005.ttcn b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210308_killed_operation/Sem_210308_killed_operation_005.ttcn new file mode 100644 index 00000000..191759cc --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210308_killed_operation/Sem_210308_killed_operation_005.ttcn @@ -0,0 +1,43 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:21.3.8, Verify that any from killed matches if at least one component is stopped or killed + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +// The following requirements are tested: +// When the any from component array notation is used, the components from the referenced array +// are iterated over and individually checked for being killed from innermost to outermost +// dimension from lowest to highest index for each dimension. The first component to be found +// killed causes the killed operation to succeed. +module Sem_210308_killed_operation_005 { + + type component GeneralComp {} + + function f(float p_time) runs on GeneralComp { + timer t := p_time; + t.start; + t.timeout; + } + + testcase TC_Sem_210308_killed_operation_005() runs on GeneralComp system GeneralComp { + const integer c_size := 4; + var GeneralComp v_ptc[c_size]; + timer t := 2.0; + for (var integer i := 0; i < c_size; i := i + 1) { + v_ptc[i] := GeneralComp.create; + if (i == 3) { v_ptc[i].start(f(1.0)); } + else { v_ptc[i].start(f(100.0)); } + } + t.start; + t.timeout; + alt + { + [] any from v_ptc.killed { setverdict(pass); } + [else] { setverdict(fail, "The any from killed operation didn't found killed component"); } + } + } + + control { + execute(TC_Sem_210308_killed_operation_005(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/21_configuration_operations/2103_test_component_operations/210308_killed_operation/Sem_210308_killed_operation_006.ttcn b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210308_killed_operation/Sem_210308_killed_operation_006.ttcn new file mode 100644 index 00000000..461c5864 --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210308_killed_operation/Sem_210308_killed_operation_006.ttcn @@ -0,0 +1,43 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:21.3.8, Verify that any from killed doesn't assign index when no component has been killed + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +// The following requirements are tested: +// The index of the matched component can optionally be assigned to an integer variable +// for single-dimensional component arrays... +module Sem_210308_killed_operation_006 { + + type component GeneralComp {} + + function f() runs on GeneralComp { + timer t := 100.0; + t.start; + t.timeout; + } + + testcase TC_Sem_210308_killed_operation_006() runs on GeneralComp system GeneralComp { + const integer c_size := 4; + var GeneralComp v_ptc[c_size]; + var integer v_index; + for (var integer i := 0; i < c_size; i := i + 1) { + v_ptc[i] := GeneralComp.create alive; + v_ptc[i].start(f()); + } + alt + { + [] any from v_ptc.killed -> @index value v_index { setverdict(fail, "The any from killed operation didn't found killed component"); } + [else] { setverdict(pass); } + } + if(not isbound(v_index)){ + setverdict(pass); + } else { + setverdict(fail, "Index incorrectly assigned"); + } + } + + control { + execute(TC_Sem_210308_killed_operation_006(), 5000.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/21_configuration_operations/2103_test_component_operations/210308_killed_operation/Sem_210308_killed_operation_007.ttcn b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210308_killed_operation/Sem_210308_killed_operation_007.ttcn new file mode 100644 index 00000000..35ffc892 --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210308_killed_operation/Sem_210308_killed_operation_007.ttcn @@ -0,0 +1,43 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:21.3.8, Verify that any from killed doesn't change index variable when no component has been killed + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +// The following requirements are tested: +// The index of the matched component can optionally be assigned to an integer variable +// for single-dimensional component arrays... +module Sem_210308_killed_operation_007 { + + type component GeneralComp {} + + function f() runs on GeneralComp { + timer t := 100.0; + t.start; + t.timeout; + } + + testcase TC_Sem_210308_killed_operation_007() runs on GeneralComp system GeneralComp { + const integer c_size := 4; + var GeneralComp v_ptc[c_size]; + var integer v_index := 99; + for (var integer i := 0; i < c_size; i := i + 1) { + v_ptc[i] := GeneralComp.create alive; + v_ptc[i].start(f()); + } + alt + { + [] any from v_ptc.killed -> @index value v_index { setverdict(fail, "The any from killed operation didn't found killed component"); } + [else] { setverdict(pass); } + } + if(v_index == 99){ + setverdict(pass); + } else { + setverdict(fail, "Index incorrectly assigned"); + } + } + + control { + execute(TC_Sem_210308_killed_operation_007(), 5000.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/21_configuration_operations/2103_test_component_operations/210308_killed_operation/Sem_210308_killed_operation_008.ttcn b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210308_killed_operation/Sem_210308_killed_operation_008.ttcn new file mode 100644 index 00000000..58f5f8aa --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210308_killed_operation/Sem_210308_killed_operation_008.ttcn @@ -0,0 +1,49 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:21.3.8, Verify that any from killed assigns index + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +// The following requirements are tested: +// The index of the matched component can optionally be assigned to an integer variable +// for single-dimensional component arrays... +module Sem_210308_killed_operation_008 { + + type component GeneralComp {} + + function f(float f_time) runs on GeneralComp { + timer t := f_time; + t.start; + t.timeout; + kill; + } + + testcase TC_Sem_210308_killed_operation_008() runs on GeneralComp system GeneralComp { + const integer c_size := 4; + var GeneralComp v_ptc[c_size]; + var integer v_index; + timer t := 2.0; + for (var integer i := 0; i < c_size; i := i + 1) { + v_ptc[i] := GeneralComp.create alive; + if (i == 2) { v_ptc[i].start(f(1.0)); } + else { v_ptc[i].start(f(100.0)); } + } + t.start; + t.timeout; + alt + { + [] any from v_ptc.killed -> @index value v_index { + if(v_index == 2){ + setverdict(pass); + } else { + setverdict(fail, "Index incorrectly assigned"); + } + } + [else] { setverdict(fail, "The any from killed operation didn't found killed component"); } + } + } + + control { + execute(TC_Sem_210308_killed_operation_008(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/21_configuration_operations/2103_test_component_operations/210308_killed_operation/Sem_210308_killed_operation_009.ttcn b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210308_killed_operation/Sem_210308_killed_operation_009.ttcn new file mode 100644 index 00000000..e00820cd --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210308_killed_operation/Sem_210308_killed_operation_009.ttcn @@ -0,0 +1,39 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:21.3.8, Verify that any from killed is not triggered if all components are executing function + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +// The following requirements are tested: +// When the any from component array notation is used, the components from the referenced array +// are iterated over and individually checked for being killed from innermost to outermost +// dimension from lowest to highest index for each dimension. The first component to be found +// killed causes the killed operation to succeed. +module Sem_210308_killed_operation_009 { + + type component GeneralComp {} + + function f() runs on GeneralComp { + timer t := 100.0; + t.start; + t.timeout; + } + + testcase TC_Sem_210308_killed_operation_009() runs on GeneralComp system GeneralComp { + const integer c_size := 4; + var GeneralComp v_ptc[c_size]; + for (var integer i := 0; i < c_size; i := i + 1) { + v_ptc[i] := GeneralComp.create alive; + v_ptc[i].start(f()); + } + alt + { + [] any from v_ptc.killed { setverdict(fail, "The any from killed operation found killed component"); } + [else] { setverdict(pass); } + } + } + + control { + execute(TC_Sem_210308_killed_operation_009(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/21_configuration_operations/2103_test_component_operations/210308_killed_operation/Sem_210308_killed_operation_010.ttcn b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210308_killed_operation/Sem_210308_killed_operation_010.ttcn new file mode 100644 index 00000000..3dfdceab --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210308_killed_operation/Sem_210308_killed_operation_010.ttcn @@ -0,0 +1,55 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:21.3.8, Verify that any from killed index redirection works for multidimensional arrays + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +// The following requirements are tested: +// Restriction d: +// If the index redirection is used for multi-dimensional component arrays, the size +// of the integer array or record of integer type shall exactly be the same as the dimension +// of the respective array, and its type shall allow storing the highest index (from all +// dimensions) of the array. +module Sem_210308_killed_operation_010 { + + type component GeneralComp {} + + function f(float p_time) runs on GeneralComp { + timer t := p_time; + t.start; + t.timeout; + kill; + } + + testcase TC_Sem_210308_killed_operation_010() runs on GeneralComp system GeneralComp { + var boolean v_isRunning; + const integer c_size := 3; + var GeneralComp v_ptc[c_size][c_size]; + var integer v_index[2]; + timer t := 2.0; + for (var integer i := 0; i < c_size; i := i + 1) { + for (var integer j := 0; j < c_size; j := j + 1) { + v_ptc[i][j] := GeneralComp.create alive; // created components are inactive + if (i == 2 and j == 1) { v_ptc[i][j].start(f(1.0)); } + else { v_ptc[i][j].start(f(100.0));} // activate v_ptc + } + } + t.start; + t.timeout; + alt + { + [] any from v_ptc.killed -> @index value v_index { + if(v_index[0] == 2 and v_index[1] == 1){ + setverdict(pass); + } else { + setverdict(fail, "Index incorrectly assigned"); + } + } + [else] { setverdict(fail, "The any from killed operation didn't found killed component"); } + } + } + + control { + execute(TC_Sem_210308_killed_operation_010(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/21_configuration_operations/2103_test_component_operations/210308_killed_operation/Sem_210308_killed_operation_011.ttcn b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210308_killed_operation/Sem_210308_killed_operation_011.ttcn new file mode 100644 index 00000000..1b7340f7 --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210308_killed_operation/Sem_210308_killed_operation_011.ttcn @@ -0,0 +1,52 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:21.3.8, Verify any from killed index redirection to lazy variable + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +// The following requirements are tested: +// Restriction f +// If a variable referenced in the @index clause is a lazy or fuzzy variable, the expression +// assigned to this variable is equal to the result produced by the killed operation. Later +// evaluation of the lazy or fuzzy variable does not lead to repeated invocation of the +// killed operation. +module Sem_210308_killed_operation_011 { + + type component GeneralComp {} + + function f(float p_time) runs on GeneralComp { + timer t := p_time; + t.start; + t.timeout; + } + + testcase TC_Sem_210308_killed_operation_011() runs on GeneralComp system GeneralComp { + const integer c_size := 4; + var GeneralComp v_ptc[c_size]; + var @lazy integer v_index; + timer t := 2.0; + for (var integer i := 0; i < c_size; i := i + 1) { + v_ptc[i] := GeneralComp.create; // created components are inactive + if (i == 2) { v_ptc[i].start(f(1.0)); } + else { v_ptc[i].start(f(100.0)); } + } + t.start; + t.timeout; + alt + { + [] any from v_ptc.killed -> @index value v_index { + v_ptc[0].kill; // component at position 0 is killed after the redirect assignment + if(v_index == 2){ // no killed call during evaluation, v_index remains equal to 2 + setverdict(pass); + } else { + setverdict(fail, "Index incorrectly assigned"); + } + } + [else] { setverdict(fail, "The any from killed operation didn't found killed component"); } + } + } + + control { + execute(TC_Sem_210308_killed_operation_011(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/21_configuration_operations/2103_test_component_operations/210308_killed_operation/Sem_210308_killed_operation_012.ttcn b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210308_killed_operation/Sem_210308_killed_operation_012.ttcn new file mode 100644 index 00000000..5ea2485e --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210308_killed_operation/Sem_210308_killed_operation_012.ttcn @@ -0,0 +1,52 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:21.3.8, Verify any from killed index redirection to fuzzy variable + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +// The following requirements are tested: +// Restriction f +// If a variable referenced in the @index clause is a lazy or fuzzy variable, the expression +// assigned to this variable is equal to the result produced by the killed operation. Later +// evaluation of the lazy or fuzzy variable does not lead to repeated invocation of the +// killed operation. +module Sem_210308_killed_operation_012 { + + type component GeneralComp {} + + function f(float p_time) runs on GeneralComp { + timer t := p_time; + t.start; + t.timeout; + } + + testcase TC_Sem_210308_killed_operation_012() runs on GeneralComp system GeneralComp { + const integer c_size := 4; + var GeneralComp v_ptc[c_size]; + var @fuzzy integer v_index; + timer t := 2.0; + for (var integer i := 0; i < c_size; i := i + 1) { + v_ptc[i] := GeneralComp.create; // created components are inactive + if (i == 2) { v_ptc[i].start(f(1.0)); } + else { v_ptc[i].start(f(100.0)); } + } + t.start; + t.timeout; + alt + { + [] any from v_ptc.killed -> @index value v_index { + v_ptc[0].kill; // component at position 0 is killed after the redirect assignment + if(v_index == 2){ // no killed call during evaluation, v_index remains equal to 2 + setverdict(pass); + } else { + setverdict(fail, "Index incorrectly assigned"); + } + } + [else] { setverdict(fail, "The any from killed operation didn't found killed component"); } + } + } + + control { + execute(TC_Sem_210308_killed_operation_012(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/21_configuration_operations/2103_test_component_operations/210308_killed_operation/Sem_210308_killed_operation_013.ttcn b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210308_killed_operation/Sem_210308_killed_operation_013.ttcn new file mode 100644 index 00000000..3cdf8273 --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210308_killed_operation/Sem_210308_killed_operation_013.ttcn @@ -0,0 +1,42 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:21.3.8, Verify that any from killed is not triggered if when alive component has stopped execution + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +// The following requirements are tested: +// When the any from component array notation is used, the components from the referenced array +// are iterated over and individually checked for being killed from innermost to outermost +// dimension from lowest to highest index for each dimension. The first component to be found +// killed causes the killed operation to succeed. +module Sem_210308_killed_operation_013 { + + type component GeneralComp {} + + function f() runs on GeneralComp { + timer t := 1.0; + t.start; + t.timeout; + } + + testcase TC_Sem_210308_killed_operation_013() runs on GeneralComp system GeneralComp { + const integer c_size := 4; + var GeneralComp v_ptc[c_size]; + timer t := 2.0; + for (var integer i := 0; i < c_size; i := i + 1) { + v_ptc[i] := GeneralComp.create alive; + v_ptc[i].start(f()); + } + t.start; + t.timeout; + alt + { + [] any from v_ptc.killed { setverdict(fail, "The any from killed operation found killed component"); } + [else] { setverdict(pass); } + } + } + + control { + execute(TC_Sem_210308_killed_operation_013(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/21_configuration_operations/2103_test_component_operations/210308_killed_operation/Sem_210308_killed_operation_014.ttcn b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210308_killed_operation/Sem_210308_killed_operation_014.ttcn new file mode 100644 index 00000000..e01ff8bf --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210308_killed_operation/Sem_210308_killed_operation_014.ttcn @@ -0,0 +1,36 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:21.3.8, storing verdict in killed operation + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirements are tested: +// When the killed operation is applied to a PTC and matches, the final local verdict of the PTC +// can be retrieved and stored in variable of the type verdicttype. This is denoted by the +// symbol '->' the keyword value followed by the name of the variable into which the verdict +// is stored. + +module Sem_210308_killed_operation_014 { + + type component GeneralComp {} + + function f() runs on GeneralComp { + setverdict(pass); + } + + testcase TC_Sem_210308_killed_operation_014() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + var verdicttype v_verdict; + v_ptc.start(f()); + alt { + [] v_ptc.killed -> value v_verdict { + if (v_verdict != pass) { setverdict(fail, "Invalid PTC verdict"); } + } + } + } + + control { + execute(TC_Sem_210308_killed_operation_014(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/21_configuration_operations/2103_test_component_operations/210309_any_and_all_components/NOTES b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210309_any_and_all_components/NOTES new file mode 100644 index 00000000..0dd0cba1 --- /dev/null +++ b/ATS/core_language/21_configuration_operations/2103_test_component_operations/210309_any_and_all_components/NOTES @@ -0,0 +1 @@ +Test cases using all and any keywords are already present in preceding subsections of 21.03. \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2202_message_based_communication/220201_send_operation/NegSem_220201_SendOperation_001.ttcn b/ATS/core_language/22_communication_operations/2202_message_based_communication/220201_send_operation/NegSem_220201_SendOperation_001.ttcn new file mode 100644 index 00000000..97662bfd --- /dev/null +++ b/ATS/core_language/22_communication_operations/2202_message_based_communication/220201_send_operation/NegSem_220201_SendOperation_001.ttcn @@ -0,0 +1,104 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:22.2.1, Ensure that the IUT correctly handles message sending operations + ** @verdict pass reject + ***************************************************/ + +module NegSem_220201_SendOperation_001 { + + type enumerated EnumeratedType {e_black, e_white}; + + type record RecordType { + integer a optional, + integer b optional, + boolean c + } + + type set SetType { + integer a optional, + integer b optional, + boolean c + } + + type record length (1..2) of integer IntegerList; + + type set length (1..2) of integer IntegerUList; + + type union UnionType { + integer a, + EnumeratedType b, + boolean c + } + + type record MessageType { + integer field1, + charstring field2, + boolean field3, + integer field4[4], + EnumeratedType field5, + RecordType field6, + SetType field7, + UnionType field8, + IntegerList field9, + IntegerUList field10 + } + + type port loopbackPort message { + inout MessageType + } + + +type component GeneralComp { + port loopbackPort messagePort +} + +testcase TC_NegSem_220201_SendOperation_001() runs on GeneralComp { + + var MessageType v_testMessage; + + template MessageType mw_matchingTemplate:= + { + field1 := 1, + field2 := "test string", + field3 := true, + field4 := {1,2,3,4}, + field5 := e_black, + field6 := {a:=1,b:=2,c:=true}, + field7 := {a:=1,b:=2,c:=true}, + field8 := {a:=1}, + field9 := {1}, + field10 := {1,2} + } + + template MessageType mw_sendingTemplate:= + { + field1 := 1, + field2 := "test string", + field3 := true, + field4 := {1,2,3,4}, + field5 := e_black, + field6 := {a:=*,b:=2,c:=true}, + field7 := {a:=1,b:=*,c:=true}, + field8 := {a:=1}, + field9 := {1}, + field10 := {1,2} + } + + messagePort.send(mw_sendingTemplate); //can only send specific values + + alt { + [] messagePort.receive(mw_matchingTemplate) { + setverdict(pass); + } + [] messagePort.receive { + setverdict(fail); + } + } +} + +control{ + execute(TC_NegSem_220201_SendOperation_001()); +} + +} diff --git a/ATS/core_language/22_communication_operations/2202_message_based_communication/220201_send_operation/NegSem_220201_SendOperation_002.ttcn b/ATS/core_language/22_communication_operations/2202_message_based_communication/220201_send_operation/NegSem_220201_SendOperation_002.ttcn new file mode 100644 index 00000000..6341dc46 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2202_message_based_communication/220201_send_operation/NegSem_220201_SendOperation_002.ttcn @@ -0,0 +1,104 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:22.2.1, Ensure that the IUT correctly handles message sending operations + ** @verdict pass reject + ***************************************************/ + +module NegSem_220201_SendOperation_002 { + + type enumerated EnumeratedType {e_black, e_white}; + + type record RecordType { + integer a optional, + integer b optional, + boolean c + } + + type set SetType { + integer a optional, + integer b optional, + boolean c + } + + type record length (1..2) of integer IntegerList; + + type set length (1..2) of integer IntegerUList; + + type union UnionType { + integer a, + EnumeratedType b, + boolean c + } + + type record MessageType { + integer field1, + charstring field2, + boolean field3, + integer field4[4], + EnumeratedType field5, + RecordType field6, + SetType field7, + UnionType field8, + IntegerList field9, + IntegerUList field10 + } + + type port loopbackPort message { + inout MessageType + } + + +type component GeneralComp { + port loopbackPort messagePort +} + +testcase TC_NegSem_220201_SendOperation_002() runs on GeneralComp { + + var MessageType v_testMessage; + + template MessageType mw_matchingTemplate:= + { + field1 := 1, + field2 := "test string", + field3 := true, + field4 := {1,2,3,4}, + field5 := e_black, + field6 := {a:=1,b:=2,c:=true}, + field7 := {a:=1,b:=2,c:=true}, + field8 := {a:=1}, + field9 := {1}, + field10 := {1,2} + } + + template MessageType mw_sendingTemplate:= + { + field1 := 1, + field2 := "test string", + field3 := true, + field4 := {1,2,3,4}, + field5 := e_black, + field6 := {a:=?,b:=2,c:=true}, + field7 := {a:=1,b:=?,c:=true}, + field8 := {a:=1}, + field9 := {1}, + field10 := {1,2} + } + + messagePort.send(mw_sendingTemplate); //can only send specific values + + alt { + [] messagePort.receive(mw_matchingTemplate) { + setverdict(pass); + } + [] messagePort.receive { + setverdict(fail); + } + } +} + +control{ + execute(TC_NegSem_220201_SendOperation_002()); +} + +} diff --git a/ATS/core_language/22_communication_operations/2202_message_based_communication/220201_send_operation/NegSem_220201_SendOperation_003.ttcn b/ATS/core_language/22_communication_operations/2202_message_based_communication/220201_send_operation/NegSem_220201_SendOperation_003.ttcn new file mode 100644 index 00000000..5a4bed08 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2202_message_based_communication/220201_send_operation/NegSem_220201_SendOperation_003.ttcn @@ -0,0 +1,39 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:22.2.1, Ensure that the IUT correctly handles message sending operations + ** @verdict pass reject + ***************************************************/ + +module NegSem_220201_SendOperation_003 { + + + type port loopbackPort message { + inout integer + } + + +type component GeneralComp { + port loopbackPort messagePort +} + +testcase TC_NegSem_220201_SendOperation_003() runs on GeneralComp { + + + messagePort.send(float:2.0); //sent type does not match port specification + + alt { + [] messagePort.receive(2) { + setverdict(pass); + } + [] messagePort.receive { + setverdict(fail); + } + } +} + +control{ + execute(TC_NegSem_220201_SendOperation_003()); +} + +} diff --git a/ATS/core_language/22_communication_operations/2202_message_based_communication/220201_send_operation/NegSem_220201_SendOperation_004.ttcn b/ATS/core_language/22_communication_operations/2202_message_based_communication/220201_send_operation/NegSem_220201_SendOperation_004.ttcn new file mode 100644 index 00000000..983057b1 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2202_message_based_communication/220201_send_operation/NegSem_220201_SendOperation_004.ttcn @@ -0,0 +1,63 @@ +/***************************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:22.2.1, Ensure that the IUT correctly handles message sending operations + ** @verdict pass reject + *****************************************************************/ + +module NegSem_220201_SendOperation_004 { + +signature p_NegSem_220201_SendOperation_004(in integer p_par1, out integer p_par2, inout integer p_par3) return integer; + +template p_NegSem_220201_SendOperation_004 s_baseTemplate := { + p_par1 := -, + p_par2 := 4, + p_par3 := ? +} + +template p_NegSem_220201_SendOperation_004 s_returnTemplate modifies s_baseTemplate := { + p_par3 := 5 +} + +template p_NegSem_220201_SendOperation_004 s_wrongTemplate modifies s_baseTemplate := { + p_par3 := 3 +} + +template p_NegSem_220201_SendOperation_004 s_callTemplate := { + p_par1 := 1, + p_par2 := -, + p_par3 := 3 +} + + type port remotePort procedure { + out p_NegSem_220201_SendOperation_004; + } + +type component GeneralComp { + port remotePort PCO; +} + +testcase NegSem_220201_SendOperation_004() runs on GeneralComp { + + PCO.send(p_NegSem_220201_SendOperation_004:s_callTemplate, 5.0) { //cannot use send operation on a procedure based port + + [] PCO.getreply(p_NegSem_220201_SendOperation_004:s_wrongTemplate value 1) { + setverdict(fail); + } + [] PCO.getreply(p_NegSem_220201_SendOperation_004:s_returnTemplate value 2) { + setverdict(fail); + } + [] PCO.getreply(p_NegSem_220201_SendOperation_004:s_returnTemplate value 1) { + setverdict(pass); + } + [] PCO.catch (timeout) { + setverdict(fail); + } + } +} + +control{ + execute(NegSem_220201_SendOperation_004()); +} + +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2202_message_based_communication/220201_send_operation/NegSem_220201_SendOperation_005.ttcn b/ATS/core_language/22_communication_operations/2202_message_based_communication/220201_send_operation/NegSem_220201_SendOperation_005.ttcn new file mode 100644 index 00000000..7954aa5c --- /dev/null +++ b/ATS/core_language/22_communication_operations/2202_message_based_communication/220201_send_operation/NegSem_220201_SendOperation_005.ttcn @@ -0,0 +1,51 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:22.2.1, missing to clause in case of one-to-many connections + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// Unicast, multicast and broadcast communication can be determined by the optional to clause +// in the send operation. A to clause can be omitted in case of a one-to-one connection where +// unicast communication is used and the message receiver is uniquely determined by the test +// system structure. +// A to clause shall be present in case of one-to-many connections. + +module NegSem_220201_SendOperation_005 { + + type port P message { + inout integer; + } + + type component GeneralComp + { + port P p; + } + + function f(integer p_expected) runs on GeneralComp + { + alt { + [] p.receive(p_expected) { setverdict(pass); } + [] p.receive { setverdict(fail); } + } + } + + const integer c_ptcCount := 2; + + testcase TC_NegSem_220201_SendOperation_005() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptcs[c_ptcCount]; + for (var integer i := 0; i < c_ptcCount; i := i + 1) { + v_ptcs[i] := GeneralComp.create; + connect(self:p, v_ptcs[i]:p); + v_ptcs[i].start(f(0)); + } + p.send(0); + all component.done; + setverdict(pass); + } + + control { + execute(TC_NegSem_220201_SendOperation_005(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2202_message_based_communication/220201_send_operation/NegSem_220201_SendOperation_006.ttcn b/ATS/core_language/22_communication_operations/2202_message_based_communication/220201_send_operation/NegSem_220201_SendOperation_006.ttcn new file mode 100644 index 00000000..9c9caf6c --- /dev/null +++ b/ATS/core_language/22_communication_operations/2202_message_based_communication/220201_send_operation/NegSem_220201_SendOperation_006.ttcn @@ -0,0 +1,35 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:22.2.1, partially initialized template + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// The TemplateInstance (and all parts of it) shall have a specific value i.e. the use +// of matching mechanisms such as AnyValue is not allowed. + +module NegSem_220201_SendOperation_006 { + + type record of integer RoI; + + type port P message { + inout RoI; + } + + type component GeneralComp + { + port P p; + } + + testcase TC_NegSem_220201_SendOperation_006() runs on GeneralComp { + var template RoI vm_msg := {1, -, 2}; + p.send(vm_msg); + p.receive; + setverdict(pass); + } + + control { + execute(TC_NegSem_220201_SendOperation_006(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2202_message_based_communication/220201_send_operation/NegSem_220201_SendOperation_007.ttcn b/ATS/core_language/22_communication_operations/2202_message_based_communication/220201_send_operation/NegSem_220201_SendOperation_007.ttcn new file mode 100644 index 00000000..ea3f8bbc --- /dev/null +++ b/ATS/core_language/22_communication_operations/2202_message_based_communication/220201_send_operation/NegSem_220201_SendOperation_007.ttcn @@ -0,0 +1,41 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:22.2.1, no type prefix in inline template + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// When defining the message in-line, the optional type part shall be used if there is +// ambiguity of the type of the message being sent. + + +module NegSem_220201_SendOperation_007 { + + type record R1 + { + integer field1, + integer field2 + } + + type record of integer RoI; + + type port P message { + inout R1, RoI; + } + + type component GeneralComp + { + port P p; + } + + testcase TC_NegSem_220201_SendOperation_007() runs on GeneralComp { + p.send({1, 2}); + p.receive; + setverdict(pass); + } + + control { + execute(TC_NegSem_220201_SendOperation_007(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2202_message_based_communication/220201_send_operation/NegSem_220201_SendOperation_008.ttcn b/ATS/core_language/22_communication_operations/2202_message_based_communication/220201_send_operation/NegSem_220201_SendOperation_008.ttcn new file mode 100644 index 00000000..2b22e5b2 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2202_message_based_communication/220201_send_operation/NegSem_220201_SendOperation_008.ttcn @@ -0,0 +1,34 @@ +/***************************************************************** + ** @author STF 487 (updated by STF 521) + ** @version 0.0.2 + ** @purpose 1:22.2.1, incompatible address value in send operation + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// All AddressRef items in the to clause shall be of type address, component or of the +// address type bound to the port type (see clause 6.2.9) of the port instance referenced +// in the send operation. + +module NegSem_220201_SendOperation_008 { + + type port P message { + inout integer; + address integer; + } + + type component GeneralComp + { + port P p; + } + + testcase TC_NegSem_220201_SendOperation_008() runs on GeneralComp { + p.send(1) to "127.0.0.1"; + p.receive(integer:?); + setverdict(pass); + } + + control { + execute(TC_NegSem_220201_SendOperation_008(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2202_message_based_communication/220201_send_operation/NegSem_220201_SendOperation_009.ttcn b/ATS/core_language/22_communication_operations/2202_message_based_communication/220201_send_operation/NegSem_220201_SendOperation_009.ttcn new file mode 100644 index 00000000..75dc3edd --- /dev/null +++ b/ATS/core_language/22_communication_operations/2202_message_based_communication/220201_send_operation/NegSem_220201_SendOperation_009.ttcn @@ -0,0 +1,35 @@ +/***************************************************************** + ** @author STF 487 (updated by STF 521) + ** @version 0.0.2 + ** @purpose 1:22.2.1, null address in the to clause of send operation + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// No AddressRef in the to clause shall contain the special value null at the time +// of the operation. + +module NegSem_220201_SendOperation_009 { + + type port P message { + inout integer; + } + + type integer address; + + type component GeneralComp + { + port P p; + } + + testcase TC_NegSem_220201_SendOperation_009() runs on GeneralComp { + var address v_addr := null; + p.send(1) to v_addr; + p.receive(integer:?); + setverdict(pass); + } + + control { + execute(TC_NegSem_220201_SendOperation_009(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2202_message_based_communication/220201_send_operation/NegSem_220201_SendOperation_010.ttcn b/ATS/core_language/22_communication_operations/2202_message_based_communication/220201_send_operation/NegSem_220201_SendOperation_010.ttcn new file mode 100644 index 00000000..b70f5a35 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2202_message_based_communication/220201_send_operation/NegSem_220201_SendOperation_010.ttcn @@ -0,0 +1,34 @@ +/***************************************************************** + ** @author STF 487 (updated by STF 521) + ** @version 0.0.2 + ** @purpose 1:22.2.1, null component in the to clause of send operation + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// No AddressRef in the to clause shall contain the special value null at the time +// of the operation. + +module NegSem_220201_SendOperation_010 { + + type port P message { + inout integer; + } + + type component GeneralComp + { + port P p; + } + + testcase TC_NegSem_220201_SendOperation_010() runs on GeneralComp system GeneralComp { + var GeneralComp v_comp := null; + connect(self:p, self:p); + p.send(0) to v_comp; + p.receive(integer:?); + setverdict(pass); + } + + control { + execute(TC_NegSem_220201_SendOperation_010(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2202_message_based_communication/220201_send_operation/NegSem_220201_SendOperation_011.ttcn b/ATS/core_language/22_communication_operations/2202_message_based_communication/220201_send_operation/NegSem_220201_SendOperation_011.ttcn new file mode 100644 index 00000000..6acabc06 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2202_message_based_communication/220201_send_operation/NegSem_220201_SendOperation_011.ttcn @@ -0,0 +1,31 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:22.2.1, send operation on disconnected and unmapped ports + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// Applying a send operation to an unmapped or disconnected port shall cause a test case +// error. + +module NegSem_220201_SendOperation_011 { + + type port P message { + inout integer; + } + + type component GeneralComp + { + port P p; + } + + testcase TC_NegSem_220201_SendOperation_011() runs on GeneralComp system GeneralComp { + p.send(0); + setverdict(pass); + } + + control { + execute(TC_NegSem_220201_SendOperation_011(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2202_message_based_communication/220201_send_operation/Sem_220201_SendOperation_001.ttcn b/ATS/core_language/22_communication_operations/2202_message_based_communication/220201_send_operation/Sem_220201_SendOperation_001.ttcn new file mode 100644 index 00000000..db11f94a --- /dev/null +++ b/ATS/core_language/22_communication_operations/2202_message_based_communication/220201_send_operation/Sem_220201_SendOperation_001.ttcn @@ -0,0 +1,104 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:22.2.1, Ensure that the IUT correctly handles message sending operations + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +module Sem_220201_SendOperation_001 { + + type enumerated EnumeratedType {e_black, e_white}; + + type record RecordType { + integer a optional, + integer b optional, + boolean c + } + + type set SetType { + integer a optional, + integer b optional, + boolean c + } + + type record length (1..2) of integer IntegerList; + + type set length (1..2) of integer IntegerUList; + + type union UnionType { + integer a, + EnumeratedType b, + boolean c + } + + type record MessageType { + integer field1, + charstring field2, + boolean field3, + integer field4[4], + EnumeratedType field5, + RecordType field6, + SetType field7, + UnionType field8, + IntegerList field9, + IntegerUList field10 + } + + type port loopbackPort message { + inout MessageType + } + + +type component GeneralComp { + port loopbackPort messagePort +} + +testcase TC_Sem_220201_SendOperation_001() runs on GeneralComp { + + var MessageType v_testMessage; + + template MessageType mw_matchingTemplate:= + { + field1 := 1, + field2 := "test string", + field3 := true, + field4 := {1,2,3,4}, + field5 := e_black, + field6 := {a:=1,b:=2,c:=true}, + field7 := {a:=1,b:=2,c:=true}, + field8 := {a:=1}, + field9 := {1}, + field10 := {1,2} + } + + template MessageType mw_sendingTemplate:= + { + field1 := 1, + field2 := "test string", + field3 := true, + field4 := {1,2,3,4}, + field5 := e_black, + field6 := {a:=1,b:=2,c:=true}, + field7 := {a:=1,b:=2,c:=true}, + field8 := {a:=1}, + field9 := {1}, + field10 := {1,2} + } + + messagePort.send(mw_sendingTemplate); //can send also template with specific values + + alt { + [] messagePort.receive(mw_matchingTemplate) { + setverdict(pass); + } + [] messagePort.receive { + setverdict(fail); + } + } +} + +control{ + execute(TC_Sem_220201_SendOperation_001()); +} + +} diff --git a/ATS/core_language/22_communication_operations/2202_message_based_communication/220201_send_operation/Sem_220201_SendOperation_002.ttcn b/ATS/core_language/22_communication_operations/2202_message_based_communication/220201_send_operation/Sem_220201_SendOperation_002.ttcn new file mode 100644 index 00000000..8622a9ad --- /dev/null +++ b/ATS/core_language/22_communication_operations/2202_message_based_communication/220201_send_operation/Sem_220201_SendOperation_002.ttcn @@ -0,0 +1,39 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:22.2.1, Ensure that the IUT correctly handles message sending operations + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +module Sem_220201_SendOperation_002 { + + + type port loopbackPort message { + inout integer + } + + +type component GeneralComp { + port loopbackPort messagePort +} + +testcase TC_Sem_220201_SendOperation_002() runs on GeneralComp { + + + messagePort.send(2); //can send also in-line template + + alt { + [] messagePort.receive(2) { + setverdict(pass); + } + [] messagePort.receive { + setverdict(fail); + } + } +} + +control{ + execute(TC_Sem_220201_SendOperation_002()); +} + +} diff --git a/ATS/core_language/22_communication_operations/2202_message_based_communication/220201_send_operation/Sem_220201_SendOperation_003.ttcn b/ATS/core_language/22_communication_operations/2202_message_based_communication/220201_send_operation/Sem_220201_SendOperation_003.ttcn new file mode 100644 index 00000000..16bffe37 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2202_message_based_communication/220201_send_operation/Sem_220201_SendOperation_003.ttcn @@ -0,0 +1,50 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:22.2.1, Ensure that the IUT correctly handles message sending operations + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +module Sem_220201_SendOperation_003 { + + type record RecordType { + integer a optional, + integer b optional, + boolean c + } + + type set SetType { + integer a optional, + integer b optional, + boolean c + } + + type port loopbackPort message { + inout RecordType, SetType + } + + +type component GeneralComp { + port loopbackPort messagePort +} + +testcase TC_Sem_220201_SendOperation_003() runs on GeneralComp { + + + messagePort.send(RecordType:{1,2,true}); //can send also in-line template + + alt { + [] messagePort.receive(RecordType:{1,2,true}) { + setverdict(pass); + } + [] messagePort.receive { + setverdict(fail); + } + } +} + +control{ + execute(TC_Sem_220201_SendOperation_003()); +} + +} diff --git a/ATS/core_language/22_communication_operations/2202_message_based_communication/220201_send_operation/Sem_220201_SendOperation_004.ttcn b/ATS/core_language/22_communication_operations/2202_message_based_communication/220201_send_operation/Sem_220201_SendOperation_004.ttcn new file mode 100644 index 00000000..c375ee27 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2202_message_based_communication/220201_send_operation/Sem_220201_SendOperation_004.ttcn @@ -0,0 +1,39 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:22.2.1, Ensure that the IUT correctly handles message sending operations + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +module Sem_220201_SendOperation_004 { + + + type port loopbackPort message { + inout integer + } + + +type component GeneralComp { + port loopbackPort messagePort +} + +testcase TC_Sem_220201_SendOperation_004() runs on GeneralComp { + var integer v_1:=2, v_2:=3; + + messagePort.send(v_1*v_2+1); //can send also the results of operations + + alt { + [] messagePort.receive(7) { + setverdict(pass); + } + [] messagePort.receive { + setverdict(fail); + } + } +} + +control{ + execute(TC_Sem_220201_SendOperation_004()); +} + +} diff --git a/ATS/core_language/22_communication_operations/2202_message_based_communication/220201_send_operation/Sem_220201_SendOperation_005.ttcn b/ATS/core_language/22_communication_operations/2202_message_based_communication/220201_send_operation/Sem_220201_SendOperation_005.ttcn new file mode 100644 index 00000000..609ef00c --- /dev/null +++ b/ATS/core_language/22_communication_operations/2202_message_based_communication/220201_send_operation/Sem_220201_SendOperation_005.ttcn @@ -0,0 +1,49 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:22.2.1, unicast send operation + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirements are tested: +// Unicast communication is specified, if the to clause addresses one communication partner +// only. + +module Sem_220201_SendOperation_005 { + + type port P message { + inout integer; + } + + type component GeneralComp + { + port P p; + } + + function f(integer p_expected) runs on GeneralComp + { + alt { + [] p.receive(p_expected) { setverdict(pass); } + [] p.receive { setverdict(fail); } + } + } + + const integer c_ptcCount := 2; + + testcase TC_Sem_220201_SendOperation_005() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptcs[c_ptcCount]; + for (var integer i := 0; i < c_ptcCount; i := i + 1) { + v_ptcs[i] := GeneralComp.create; + connect(self:p, v_ptcs[i]:p); + v_ptcs[i].start(f(i)); + } + p.send(0) to v_ptcs[0]; + p.send(1) to v_ptcs[1]; + all component.done; + setverdict(pass); + } + + control { + execute(TC_Sem_220201_SendOperation_005(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2202_message_based_communication/220201_send_operation/Sem_220201_SendOperation_006.ttcn b/ATS/core_language/22_communication_operations/2202_message_based_communication/220201_send_operation/Sem_220201_SendOperation_006.ttcn new file mode 100644 index 00000000..da082079 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2202_message_based_communication/220201_send_operation/Sem_220201_SendOperation_006.ttcn @@ -0,0 +1,49 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:22.2.1, multicast send operation + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirements are tested: +// Multicast communication is used, if the to clause includes a list of communication +// partners. + +module Sem_220201_SendOperation_006 { + + type port P message { + inout integer; + } + + type component GeneralComp + { + port P p; + } + + function f(integer p_expected) runs on GeneralComp + { + alt { + [] p.receive(p_expected) { setverdict(pass); } + [] p.receive { setverdict(fail); } + } + } + + const integer c_ptcCount := 4; + + testcase TC_Sem_220201_SendOperation_006() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptcs[c_ptcCount]; + for (var integer i := 0; i < c_ptcCount; i := i + 1) { + v_ptcs[i] := GeneralComp.create; + connect(self:p, v_ptcs[i]:p); + v_ptcs[i].start(f(i mod 2)); + } + p.send(0) to (v_ptcs[0], v_ptcs[2]); + p.send(1) to (v_ptcs[1], v_ptcs[3]); + all component.done; + setverdict(pass); + } + + control { + execute(TC_Sem_220201_SendOperation_006(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2202_message_based_communication/220201_send_operation/Sem_220201_SendOperation_007.ttcn b/ATS/core_language/22_communication_operations/2202_message_based_communication/220201_send_operation/Sem_220201_SendOperation_007.ttcn new file mode 100644 index 00000000..edb52391 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2202_message_based_communication/220201_send_operation/Sem_220201_SendOperation_007.ttcn @@ -0,0 +1,47 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:22.2.1, broadcast send operation + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirements are tested: +// Broadcast is defined by using the to clause with all component keyword. + +module Sem_220201_SendOperation_007 { + + type port P message { + inout integer; + } + + type component GeneralComp + { + port P p; + } + + function f(integer p_expected) runs on GeneralComp + { + alt { + [] p.receive(p_expected) { setverdict(pass); } + [] p.receive { setverdict(fail); } + } + } + + const integer c_ptcCount := 3; + + testcase TC_Sem_220201_SendOperation_007() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptcs[c_ptcCount]; + for (var integer i := 0; i < c_ptcCount; i := i + 1) { + v_ptcs[i] := GeneralComp.create; + connect(self:p, v_ptcs[i]:p); + v_ptcs[i].start(f(0)); + } + p.send(0) to all component; + all component.done; + setverdict(pass); + } + + control { + execute(TC_Sem_220201_SendOperation_007(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/NegSem_220202_ReceiveOperation_001.ttcn b/ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/NegSem_220202_ReceiveOperation_001.ttcn new file mode 100644 index 00000000..02cd81a5 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/NegSem_220202_ReceiveOperation_001.ttcn @@ -0,0 +1,63 @@ +/***************************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:22.2.2, Ensure that the IUT correctly handles message receiving operations + ** @verdict pass reject + *****************************************************************/ + +module NegSem_220202_ReceiveOperation_001 { + +signature p_NegSem_220202_ReceiveOperation_001(in integer p_par1, out integer p_par2, inout integer p_par3) return integer; + +template p_NegSem_220202_ReceiveOperation_001 s_baseTemplate := { + p_par1 := -, + p_par2 := 4, + p_par3 := ? +} + +template p_NegSem_220202_ReceiveOperation_001 s_returnTemplate modifies s_baseTemplate := { + p_par3 := 5 +} + +template p_NegSem_220202_ReceiveOperation_001 s_wrongTemplate modifies s_baseTemplate := { + p_par3 := 3 +} + +template p_NegSem_220202_ReceiveOperation_001 s_callTemplate := { + p_par1 := 1, + p_par2 := -, + p_par3 := 3 +} + + type port remotePort procedure { + out p_NegSem_220202_ReceiveOperation_001; + } + +type component GeneralComp { + port remotePort PCO; +} + +testcase NegSem_220202_ReceiveOperation_001() runs on GeneralComp { + + PCO.call(p_NegSem_220202_ReceiveOperation_001:s_callTemplate, 5.0) { + + [] PCO.receive(p_NegSem_220202_ReceiveOperation_001:s_wrongTemplate value 1) { //cannot receive from procedure based port + setverdict(fail); + } + [] PCO.receive(p_NegSem_220202_ReceiveOperation_001:s_returnTemplate value 2) { + setverdict(fail); + } + [] PCO.receive(p_NegSem_220202_ReceiveOperation_001:s_returnTemplate value 1) { + setverdict(pass); + } + [] PCO.catch (timeout) { + setverdict(fail); + } + } +} + +control{ + execute(NegSem_220202_ReceiveOperation_001()); +} + +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/NegSem_220202_ReceiveOperation_002.ttcn b/ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/NegSem_220202_ReceiveOperation_002.ttcn new file mode 100644 index 00000000..b35c07dd --- /dev/null +++ b/ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/NegSem_220202_ReceiveOperation_002.ttcn @@ -0,0 +1,40 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:22.2.2, no type prefix in ambiguous inline template + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// An optional type field in the matching criteria to the receive operation shall +// be used to avoid any ambiguity of the type of the value being received. + +module NegSem_220202_ReceiveOperation_002 { + + type record of integer RoI; + type record R { + integer field1, + integer field2 + } + + type port P message { + inout R, RoI; + } + + type component GeneralComp + { + port P p; + } + + testcase TC_NegSem_220202_ReceiveOperation_002() runs on GeneralComp { + p.send(R:{1, 2}); + alt { + [] p.receive({?, 2}) { setverdict(pass); } // error (ambiguous type) + [] p.receive { setverdict(pass); } + } + } + + control { + execute(TC_NegSem_220202_ReceiveOperation_002(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/NegSem_220202_ReceiveOperation_003.ttcn b/ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/NegSem_220202_ReceiveOperation_003.ttcn new file mode 100644 index 00000000..b3ff4125 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/NegSem_220202_ReceiveOperation_003.ttcn @@ -0,0 +1,34 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:22.2.2, type mismatch in redirect value assignment + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// The variable or formal parameter shall be type compatible with the received message. + +module NegSem_220202_ReceiveOperation_003 { + + type port P message { + inout integer, charstring; + } + + type component GeneralComp + { + port P p; + } + + testcase TC_NegSem_220202_ReceiveOperation_003() runs on GeneralComp { + var charstring v_str; + p.send(1); + alt { + [] p.receive(integer:?) -> value v_str { setverdict(pass); } // error (type mismatch in redirect assignment) + [] p.receive { setverdict(pass); } + } + } + + control { + execute(TC_NegSem_220202_ReceiveOperation_003(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/NegSem_220202_ReceiveOperation_004.ttcn b/ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/NegSem_220202_ReceiveOperation_004.ttcn new file mode 100644 index 00000000..9e325296 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/NegSem_220202_ReceiveOperation_004.ttcn @@ -0,0 +1,43 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:22.2.2, type mismatch in redirect assignment of message fields + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// The variable or formal parameter shall be type compatible with the type on the +// right hand side of the assignment symbol. + +module NegSem_220202_ReceiveOperation_004 { + type record R + { + integer field1[2], + charstring field2 + } + + type port P message { + inout R; + } + + type component GeneralComp + { + port P p; + } + + testcase TC_NegSem_220202_ReceiveOperation_004() runs on GeneralComp { + var integer v_int; + var bitstring v_str; + p.send(R:{ field1 := { 1, 2 }, field2 := "abc" }); + alt { + [] p.receive(R:?) -> value ( v_int := field1[1], v_str := field2) { + setverdict (pass); + } + [] p.receive { setverdict(pass); } + } + } + + control { + execute(TC_NegSem_220202_ReceiveOperation_004(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/NegSem_220202_ReceiveOperation_005.ttcn b/ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/NegSem_220202_ReceiveOperation_005.ttcn new file mode 100644 index 00000000..9f29c7bc --- /dev/null +++ b/ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/NegSem_220202_ReceiveOperation_005.ttcn @@ -0,0 +1,46 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:22.2.2, applying @decoded to a forbidden field + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// When assigning individual fields of a message, encoded payload fields can be +// decoded prior to assignment using the @decoded modifier. In this case, the +// referenced field on the right hand sided of the assignment shall be one of the +// bitstring, hexstring, octetstring, charstring or universal charstring types. It +// shall be decoded into a value of the same type as the variable on the left hand +// side of the assignment. + +module NegSem_220202_ReceiveOperation_005 { + type record R + { + integer id, + record of integer payload (0..255) + } + + type port P message { + inout R; + } + + type component GeneralComp + { + port P p; + } + + testcase TC_NegSem_220202_ReceiveOperation_005() runs on GeneralComp { + var integer v_res with { encode "32bit" }; + p.send(R:{ id := 1, payload := {0, 0, 0, 0} }); + alt { + [] p.receive(R:?) -> value (v_res := @decoded payload) { + setverdict (pass); + } + [] p.receive { setverdict(pass); } + } + } + + control { + execute(TC_NegSem_220202_ReceiveOperation_005(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/NegSem_220202_ReceiveOperation_006.ttcn b/ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/NegSem_220202_ReceiveOperation_006.ttcn new file mode 100644 index 00000000..f710ceea --- /dev/null +++ b/ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/NegSem_220202_ReceiveOperation_006.ttcn @@ -0,0 +1,42 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:22.2.2, decoding error in @decoded redirect assignment + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// Failure of this decoding shall cause a test case error. + +module NegSem_220202_ReceiveOperation_006 { + type record R + { + integer id, + charstring payload + } + + type port P message { + inout R; + } + + type component GeneralComp + { + port P p; + } + + testcase TC_NegSem_220202_ReceiveOperation_006() runs on GeneralComp { + var integer v_src := 1953719668, v_res with { encode "32bit" }; + var charstring v_str := encvalue_unichar(v_src) & "abcdefgij"; + p.send(R:{ id := 1, payload := v_str }); + alt { + [] p.receive(R:?) -> value (v_res := @decoded payload) { + setverdict (pass); + } + [] p.receive { setverdict(pass); } + } + } + + control { + execute(TC_NegSem_220202_ReceiveOperation_006(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/NegSem_220202_ReceiveOperation_007.ttcn b/ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/NegSem_220202_ReceiveOperation_007.ttcn new file mode 100644 index 00000000..aa5ed7a9 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/NegSem_220202_ReceiveOperation_007.ttcn @@ -0,0 +1,42 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:22.2.2, invalid format value in @decoded redirect assignment + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// Any other value shall cause an error. + +module NegSem_220202_ReceiveOperation_007 { + type record R + { + integer id, + universal charstring payload + } + + type port P message { + inout R; + } + + type component GeneralComp + { + port P p; + } + + testcase TC_NegSem_220202_ReceiveOperation_007() runs on GeneralComp { + var integer v_src := 1953719668, v_res with { encode "32bit" }; + var universal charstring v_str := encvalue_unichar(v_src); + p.send(R:{ id := 1, payload := v_str }); + alt { + [] p.receive(R:?) -> value (v_res := @decoded("proprietary") payload) { + setverdict (pass); + } + [] p.receive { setverdict(pass); } + } + } + + control { + execute(TC_NegSem_220202_ReceiveOperation_007(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/NegSem_220202_ReceiveOperation_008.ttcn b/ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/NegSem_220202_ReceiveOperation_008.ttcn new file mode 100644 index 00000000..cf813fbd --- /dev/null +++ b/ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/NegSem_220202_ReceiveOperation_008.ttcn @@ -0,0 +1,42 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:22.2.2, value of wrong type in @decoded redirect assignment + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// Any other value shall cause an error. + +module NegSem_220202_ReceiveOperation_008 { + type record R + { + integer id, + universal charstring payload + } + + type port P message { + inout R; + } + + type component GeneralComp + { + port P p; + } + + testcase TC_NegSem_220202_ReceiveOperation_008() runs on GeneralComp { + var integer v_src := 1953719668, v_res with { encode "32bit" }; + var universal charstring v_str := encvalue_unichar(v_src); + p.send(R:{ id := 1, payload := v_str }); + alt { + [] p.receive(R:?) -> value (v_res := @decoded(v_src) payload) { + setverdict (pass); + } + [] p.receive { setverdict(pass); } + } + } + + control { + execute(TC_NegSem_220202_ReceiveOperation_008(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/NegSem_220202_ReceiveOperation_009.ttcn b/ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/NegSem_220202_ReceiveOperation_009.ttcn new file mode 100644 index 00000000..94bcd3e8 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/NegSem_220202_ReceiveOperation_009.ttcn @@ -0,0 +1,43 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:22.2.2, encoding parameter of @decoded redirect assignment applied to incorrect type + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// In case the referenced field is not a universal charstring, the optional +// parameter shall not be present. + +module NegSem_220202_ReceiveOperation_009 { + type record R + { + integer id, + octetstring payload + } + + type port P message { + inout R; + } + + type component GeneralComp + { + port P p; + } + + testcase TC_NegSem_220202_ReceiveOperation_009() runs on GeneralComp { + var charstring v_src := "abc", v_res; + var octetstring v_os := bit2oct(encvalue(v_src)); + p.send(R:{ id := 1, payload := v_os }); + alt { + [] p.receive(R:?) -> value (v_res := @decoded("UTF-8") payload) { + setverdict (pass); + } + [] p.receive { setverdict(pass); } + } + } + + control { + execute(TC_NegSem_220202_ReceiveOperation_009(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/NegSem_220202_ReceiveOperation_010.ttcn b/ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/NegSem_220202_ReceiveOperation_010.ttcn new file mode 100644 index 00000000..bf863a4d --- /dev/null +++ b/ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/NegSem_220202_ReceiveOperation_010.ttcn @@ -0,0 +1,36 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:22.2.2, attempting to store component name in redirect assignment + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// When the message is received on a connected port, only the component reference is +// stored in the following the sender keyword, but the test system shall internally +// store the component name too, if any (to be used in logging). + +module NegSem_220202_ReceiveOperation_010 { + + type port P message { + inout integer; + } + + type component GeneralComp + { + port P p; + } + + testcase TC_NegSem_220202_ReceiveOperation_010() runs on GeneralComp system GeneralComp { + var charstring v_name; + connect(self:p, self:p); + p.send(10); + p.receive(integer:?) -> sender v_name; + if (v_name == "MTC") { setverdict(pass); } + else { setverdict(fail); } + } + + control { + execute(TC_NegSem_220202_ReceiveOperation_010(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/NegSem_220202_ReceiveOperation_011.ttcn b/ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/NegSem_220202_ReceiveOperation_011.ttcn new file mode 100644 index 00000000..1020165e --- /dev/null +++ b/ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/NegSem_220202_ReceiveOperation_011.ttcn @@ -0,0 +1,37 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:22.2.2, attempting to receive a type missing from the port list + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// The receive operation shall only be used on message-based ports and the type of the +// value to be received shall be included in the list of incoming types of the port type +// definition. + + +module NegSem_220202_ReceiveOperation_011 { + + type port P message { + inout integer; + } + + type component GeneralComp + { + port P p; + } + + testcase TC_NegSem_220202_ReceiveOperation_011() runs on GeneralComp { + var integer v_index; + p.send(10); + alt { + [] p.receive(charstring:?) { setverdict(pass); } + [] any port.receive { setverdict(pass); } + } + } + + control { + execute(TC_NegSem_220202_ReceiveOperation_011(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/NegSem_220202_ReceiveOperation_012.ttcn b/ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/NegSem_220202_ReceiveOperation_012.ttcn new file mode 100644 index 00000000..83aa91f7 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/NegSem_220202_ReceiveOperation_012.ttcn @@ -0,0 +1,34 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:22.2.2, value redirect assignment in receive any message statement + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// AddressRef for retrieving the sending entity shall be of type address, component or +// of the type provided in the address declaration of the port type of the port instance +// referenced in the receive operation. + +module NegSem_220202_ReceiveOperation_012 { + + type port P message { + inout integer; + } + + type component GeneralComp + { + port P p; + } + + testcase TC_NegSem_220202_ReceiveOperation_012() runs on GeneralComp { + var integer v_val; + p.send(10); + p.receive -> value v_val; + setverdict(pass); + } + + control { + execute(TC_NegSem_220202_ReceiveOperation_012(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/NegSem_220202_ReceiveOperation_013.ttcn b/ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/NegSem_220202_ReceiveOperation_013.ttcn new file mode 100644 index 00000000..9b31c663 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/NegSem_220202_ReceiveOperation_013.ttcn @@ -0,0 +1,35 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:22.2.2, trying to store address when receiving on connected port + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// Type mismatch at storing the received value or parts of the received value and storing +// the sender shall cause an error. + +module NegSem_220202_ReceiveOperation_013 { + + type port P message { + inout integer; + address integer; + } + + type component GeneralComp + { + port P p; + } + + testcase TC_NegSem_220202_ReceiveOperation_013() runs on GeneralComp system GeneralComp { + var P.address v_addr; + connect(self:p, self:p); + p.send(10); + p.receive -> sender v_addr; + setverdict(pass); + } + + control { + execute(TC_NegSem_220202_ReceiveOperation_013(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/NegSem_220202_ReceiveOperation_014.ttcn b/ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/NegSem_220202_ReceiveOperation_014.ttcn new file mode 100644 index 00000000..cff07a8f --- /dev/null +++ b/ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/NegSem_220202_ReceiveOperation_014.ttcn @@ -0,0 +1,36 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:22.2.2, type mismatch in sender redirect assignment + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// AddressRef for retrieving the sending entity shall be of type address, component or +// of the type provided in the address declaration of the port type of the port instance +// referenced in the receive operation. + + +module NegSem_220202_ReceiveOperation_014 { + + type port P message { + inout integer; + address integer; + } + + type component GeneralComp + { + port P p; + } + + testcase TC_NegSem_220202_ReceiveOperation_014() runs on GeneralComp { + var charstring v_addr; + p.send(10); + p.receive -> sender v_addr; + setverdict(pass); + } + + control { + execute(TC_NegSem_220202_ReceiveOperation_014(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/NegSem_220202_ReceiveOperation_015.ttcn b/ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/NegSem_220202_ReceiveOperation_015.ttcn new file mode 100644 index 00000000..67be17d0 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/NegSem_220202_ReceiveOperation_015.ttcn @@ -0,0 +1,37 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:22.2.2, null component reference in from clause of receive operation + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// No AddressRef shall contain the special value null at the time of the operation. + +module NegSem_220202_ReceiveOperation_015 { + + type port P message { + inout integer; + address integer; + } + + type component GeneralComp + { + port P p; + } + + testcase TC_NegSem_220202_ReceiveOperation_015() runs on GeneralComp system GeneralComp { + var GeneralComp v_comp := null; + connect(self:p, self:p); + p.send(10); + alt { + [] p.receive from v_comp {} + [] p.receive {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_220202_ReceiveOperation_015(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/NegSem_220202_ReceiveOperation_016.ttcn b/ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/NegSem_220202_ReceiveOperation_016.ttcn new file mode 100644 index 00000000..f9e57d08 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/NegSem_220202_ReceiveOperation_016.ttcn @@ -0,0 +1,36 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:22.2.2, null address reference in from clause of receive operation + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// No AddressRef shall contain the special value null at the time of the operation. + +module NegSem_220202_ReceiveOperation_016 { + + type port P message { + inout integer; + address integer; + } + + type component GeneralComp + { + port P p; + } + + testcase TC_NegSem_220202_ReceiveOperation_016() runs on GeneralComp { + var P.address v_addr1 := 1, v_addr2 := 2, v_addr3 := null; + p.send(10); + alt { + [] p.receive from (v_addr1, v_addr2, v_addr3) {} + [] p.receive {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_220202_ReceiveOperation_016(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/NegSem_220202_ReceiveOperation_017.ttcn b/ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/NegSem_220202_ReceiveOperation_017.ttcn new file mode 100644 index 00000000..5d728e26 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/NegSem_220202_ReceiveOperation_017.ttcn @@ -0,0 +1,33 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:22.2.2, index redirection in standard port.receive + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// The index redirection shall only be used when the operation is used on an any from port +// array construct. + +module NegSem_220202_ReceiveOperation_017 { + + type port P message { + inout integer; + } + + type component GeneralComp + { + port P p; + } + + testcase TC_NegSem_220202_ReceiveOperation_017() runs on GeneralComp { + var integer v_int; + p.send(10); + p.receive(integer:?) -> @index value v_int; + setverdict(pass); + } + + control { + execute(TC_NegSem_220202_ReceiveOperation_017(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/NegSem_220202_ReceiveOperation_018.ttcn b/ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/NegSem_220202_ReceiveOperation_018.ttcn new file mode 100644 index 00000000..81165062 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/NegSem_220202_ReceiveOperation_018.ttcn @@ -0,0 +1,33 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:22.2.2, index redirection in any port.receive + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// The index redirection shall only be used when the operation is used on an any from port +// array construct. + +module NegSem_220202_ReceiveOperation_018 { + + type port P message { + inout integer; + } + + type component GeneralComp + { + port P p; + } + + testcase TC_NegSem_220202_ReceiveOperation_018() runs on GeneralComp { + var integer v_int; + p.send(10); + any port.receive(integer:?) -> @index value v_int; + setverdict(pass); + } + + control { + execute(TC_NegSem_220202_ReceiveOperation_018(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/NegSem_220202_ReceiveOperation_019.ttcn b/ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/NegSem_220202_ReceiveOperation_019.ttcn new file mode 100644 index 00000000..851ec4a6 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/NegSem_220202_ReceiveOperation_019.ttcn @@ -0,0 +1,32 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:22.2.2, insufficient value range of variable in index redirection + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// If the index redirection is used for single-dimensional port arrays, the type of the +// integer variable shall allow storing the highest index of the respective array. + +module NegSem_220202_ReceiveOperation_019 { + type integer RestrInt(0..2); + type port P message { + inout integer; + } + + type component GeneralComp { + port P p[10]; + } + + testcase TC_NegSem_220202_ReceiveOperation_019() runs on GeneralComp { + var RestrInt v_int; + p[5].send(100); + any from p.receive(integer:?) -> @index value v_int; + setverdict(pass); + } + + control { + execute(TC_NegSem_220202_ReceiveOperation_019(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/NegSem_220202_ReceiveOperation_020.ttcn b/ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/NegSem_220202_ReceiveOperation_020.ttcn new file mode 100644 index 00000000..dda8914f --- /dev/null +++ b/ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/NegSem_220202_ReceiveOperation_020.ttcn @@ -0,0 +1,33 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:22.2.2, insufficient array dimension of variable in index redirection + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// If the index redirection is used for multi-dimensional port arrays, the size of the +// integer array or record of integer type shall exactly be the same as the dimension of +// the respective array, and its type shall allow storing the highest index (from all +// dimensions) of the array. + +module NegSem_220202_ReceiveOperation_020 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p[3][2][3]; + } + + testcase TC_NegSem_220202_ReceiveOperation_020() runs on GeneralComp { + var integer v_indices[2]; + p[0][1][2].send(100); + any from p.receive(integer:?) -> @index value v_indices; + setverdict(pass); + } + + control { + execute(TC_NegSem_220202_ReceiveOperation_020(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/NegSem_220202_ReceiveOperation_021.ttcn b/ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/NegSem_220202_ReceiveOperation_021.ttcn new file mode 100644 index 00000000..4bb6c901 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/NegSem_220202_ReceiveOperation_021.ttcn @@ -0,0 +1,34 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:22.2.2, insufficient element value range of variable in index redirection + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// If the index redirection is used for multi-dimensional port arrays, the size of the +// integer array or record of integer type shall exactly be the same as the dimension of +// the respective array, and its type shall allow storing the highest index (from all +// dimensions) of the array. + +module NegSem_220202_ReceiveOperation_021 { + type integer RestrInt(0..2); + type port P message { + inout integer; + } + + type component GeneralComp { + port P p[4][2][3]; + } + + testcase TC_NegSem_220202_ReceiveOperation_021() runs on GeneralComp { + var RestrInt v_indices[3]; + p[3][1][2].send(100); + any from p.receive(integer:?) -> @index value v_indices; + setverdict(pass); + } + + control { + execute(TC_NegSem_220202_ReceiveOperation_021(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/NegSem_220202_ReceiveOperation_022.ttcn b/ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/NegSem_220202_ReceiveOperation_022.ttcn new file mode 100644 index 00000000..ba7113a9 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/NegSem_220202_ReceiveOperation_022.ttcn @@ -0,0 +1,38 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:22.2.2, incompatible from and sender clause + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// If the receive operation contains both from and sender clause, the variable or parameter +// referenced in the sender clause shall be type compatible with the template in the from +// clause. + +module NegSem_220202_ReceiveOperation_022 { + + type integer address; + + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + testcase TC_NegSem_220202_ReceiveOperation_022() runs on GeneralComp { + var address v_addr; + p.send(100); + alt { + [] p.receive(integer:?) from GeneralComp:? -> sender v_addr { } + [] p.receive {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_220202_ReceiveOperation_022(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/NegSem_220202_ReceiveOperation_023.ttcn b/ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/NegSem_220202_ReceiveOperation_023.ttcn new file mode 100644 index 00000000..4710c671 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/NegSem_220202_ReceiveOperation_023.ttcn @@ -0,0 +1,47 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:22.2.2, incompatible decmatch and @decoded value redirect + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// When assigning implicitly decoded message fields (by using the @decoded modifier) in +// cases where the value or template to be matched uses the MatchDecodedContent (decmatch) +// matching for the field to be stored, the type of the template in the MatchDecodedContent +// matching shall be type-compatible to the type of the variable the decoded field is stored into. + +module NegSem_220202_ReceiveOperation_023 { + + type record R { + integer id, + octetstring payload + } + + type record Wrapped { + integer num + } + + type port P message { + inout R; + } + + type component GeneralComp { + port P p; + } + + testcase TC_NegSem_220202_ReceiveOperation_023() runs on GeneralComp { + var Wrapped v_res; + var R v_rec := { id := 0, payload := bit2oct(encvalue(5)) }; + p.send(v_rec); + alt { + [] p.receive(R:{ id := ?, payload := decmatch integer:? }) -> value (v_res := @decoded payload) {} + [] p.receive {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_220202_ReceiveOperation_023(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/NegSem_220202_ReceiveOperation_024.ttcn b/ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/NegSem_220202_ReceiveOperation_024.ttcn new file mode 100644 index 00000000..e7ad9136 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/NegSem_220202_ReceiveOperation_024.ttcn @@ -0,0 +1,41 @@ +/***************************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:22.2.2, trying to store an incompatible component value in the sender clause of a receive operation + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// Type mismatch at storing the received value or parts of the received value and storing +// the sender shall cause an error. + +module NegSem_220202_ReceiveOperation_024 { + + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + type component CustomComp { + var integer vc_int; + } + + testcase TC_NegSem_220202_ReceiveOperation_024() runs on GeneralComp system GeneralComp { + var CustomComp v_sender; + connect(self:p, self:p); + p.send(10); + alt { + // this alternative shall be selected, but the assignment shall generate an error + [] p.receive(integer:?) -> sender v_sender { } + [] p.receive {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_220202_ReceiveOperation_024(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/Sem_220202_ReceiveOperation_001.ttcn b/ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/Sem_220202_ReceiveOperation_001.ttcn new file mode 100644 index 00000000..337c93c8 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/Sem_220202_ReceiveOperation_001.ttcn @@ -0,0 +1,41 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:22.2.2, Ensure that the IUT correctly handles message receiving operations + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +module Sem_220202_ReceiveOperation_001 { + + + type port loopbackPort message { + inout integer + } + + +type component GeneralComp { + port loopbackPort messagePort +} + +testcase TC_Sem_220202_ReceiveOperation_001() runs on GeneralComp { + + messagePort.send(2); + + alt { + [] messagePort.receive(1) { //must not remove message from queue + setverdict(fail); + } + [] messagePort.receive(2) { //this alt is only selected if message not removed from the queue + setverdict(pass); + } + [] messagePort.receive { + setverdict(fail); + } + } +} + +control{ + execute(TC_Sem_220202_ReceiveOperation_001()); +} + +} diff --git a/ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/Sem_220202_ReceiveOperation_002.ttcn b/ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/Sem_220202_ReceiveOperation_002.ttcn new file mode 100644 index 00000000..8d29d66d --- /dev/null +++ b/ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/Sem_220202_ReceiveOperation_002.ttcn @@ -0,0 +1,38 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:22.2.2, Ensure that the IUT correctly handles message receiving operations + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +module Sem_220202_ReceiveOperation_002 { + + + type port loopbackPort message { + inout integer + } + + +type component GeneralComp { + port loopbackPort messagePort +} + +testcase TC_Sem_220202_ReceiveOperation_002() runs on GeneralComp { + + messagePort.send(2); + + alt { + [] messagePort.receive { //must remove message from queue + setverdict(pass); + } + [] messagePort.receive { //this alt is only selected if message not removed from the queue + setverdict(fail); + } + } +} + +control{ + execute(TC_Sem_220202_ReceiveOperation_002()); +} + +} diff --git a/ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/Sem_220202_ReceiveOperation_003.ttcn b/ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/Sem_220202_ReceiveOperation_003.ttcn new file mode 100644 index 00000000..12ebc88f --- /dev/null +++ b/ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/Sem_220202_ReceiveOperation_003.ttcn @@ -0,0 +1,44 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:22.2.2, Ensure that the IUT correctly handles message receiving operations + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +module Sem_220202_ReceiveOperation_003 { + + + type port loopbackPort message { + inout integer + } + + +type component GeneralComp { + port loopbackPort messagePort +} + +testcase TC_Sem_220202_ReceiveOperation_003() runs on GeneralComp { + var integer v_received:=0; + + messagePort.send(2); + + alt { + [] messagePort.receive(integer:?) -> value v_received { + if(v_received==2) { //check that correct value has been stored + setverdict(pass); + } + else { + setverdict(fail); + } + } + [] messagePort.receive { + setverdict(fail); + } + } +} + +control{ + execute(TC_Sem_220202_ReceiveOperation_003()); +} + +} diff --git a/ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/Sem_220202_ReceiveOperation_004.ttcn b/ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/Sem_220202_ReceiveOperation_004.ttcn new file mode 100644 index 00000000..6c09d7da --- /dev/null +++ b/ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/Sem_220202_ReceiveOperation_004.ttcn @@ -0,0 +1,49 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:22.2.2, Ensure that the IUT correctly handles message receiving operations + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +module Sem_220202_ReceiveOperation_004 { + + type charstring address; + type port loopbackPort message { + inout integer + } + + + type component GeneralComp { + port loopbackPort messagePort + } + + const address c_address := "Tester"; + + testcase TC_Sem_220202_ReceiveOperation_004() runs on GeneralComp { + var address v_sender; + + messagePort.send(2) to c_address; + + alt { + [] messagePort.receive(2) -> sender v_sender { + messagePort.send(5) to v_sender; + alt { + [] messagePort.receive(5) from v_sender { //check that correct sender address has been assigned + setverdict(pass); + } + [] messagePort.receive { + setverdict(fail); + } + } + } + [] messagePort.receive { + setverdict(fail); + } + } + } + + control{ + execute(TC_Sem_220202_ReceiveOperation_004()); + } + +} diff --git a/ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/Sem_220202_ReceiveOperation_005.ttcn b/ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/Sem_220202_ReceiveOperation_005.ttcn new file mode 100644 index 00000000..20c7f2e6 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/Sem_220202_ReceiveOperation_005.ttcn @@ -0,0 +1,38 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:22.2.2, Ensure that the IUT correctly handles message receiving operations + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +module Sem_220202_ReceiveOperation_005 { + + + type port loopbackPort message { + inout integer + } + + +type component GeneralComp { + port loopbackPort messagePort +} + +testcase TC_Sem_220202_ReceiveOperation_005() runs on GeneralComp { + + messagePort.send(2); + + alt { + [] any port.receive(2) { //checks receiving from ny port + setverdict(pass); + } + [] messagePort.receive { //this alt is only selected if message was not removed from the queue + setverdict(fail); + } + } +} + +control{ + execute(TC_Sem_220202_ReceiveOperation_005()); +} + +} diff --git a/ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/Sem_220202_ReceiveOperation_006.ttcn b/ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/Sem_220202_ReceiveOperation_006.ttcn new file mode 100644 index 00000000..d33be06d --- /dev/null +++ b/ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/Sem_220202_ReceiveOperation_006.ttcn @@ -0,0 +1,52 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:22.2.2, receive with a from clause (single item) + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirements are tested: +// In the case of one-to-many connections the receive operation may be restricted +// to a certain communication partner. This restriction shall be denoted using the +// from keyword. + +module Sem_220202_ReceiveOperation_006 { + + type port P message { + inout integer; + } + + type component GeneralComp + { + port P p; + } + + function f() runs on GeneralComp + { + p.send(1); + } + + const integer c_ptcCount := 3; + + testcase TC_Sem_220202_ReceiveOperation_006() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptcs[c_ptcCount]; + var integer v_receiveCounter := 0; + for (var integer i := 0; i < c_ptcCount; i := i + 1) { + v_ptcs[i] := GeneralComp.create; + connect(self:p, v_ptcs[i]:p); + v_ptcs[i].start(f()); + } + + for (var integer i := 0; i < c_ptcCount; i := i + 1) { + alt { + [] p.receive(integer:?) from v_ptcs[0] { setverdict(pass); } // expected 1 from match + [] p.receive(integer:?) { v_receiveCounter := v_receiveCounter + 1; } // expected 2 other received messages + } + } + if (v_receiveCounter != c_ptcCount - 1) { setverdict(fail); } + } + + control { + execute(TC_Sem_220202_ReceiveOperation_006(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/Sem_220202_ReceiveOperation_007.ttcn b/ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/Sem_220202_ReceiveOperation_007.ttcn new file mode 100644 index 00000000..a3ad4d5b --- /dev/null +++ b/ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/Sem_220202_ReceiveOperation_007.ttcn @@ -0,0 +1,53 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:22.2.2, receive with a from clause (multiple items) + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirements are tested: +// In the case of one-to-many connections the receive operation may be restricted +// to a certain communication partner. This restriction shall be denoted using the +// from keyword. + +module Sem_220202_ReceiveOperation_007 { + + type port P message { + inout integer; + } + + type component GeneralComp + { + port P p; + } + + function f() runs on GeneralComp + { + p.send(1); + } + + const integer c_ptcCount := 3; + + testcase TC_Sem_220202_ReceiveOperation_007() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptcs[c_ptcCount]; + var integer v_fromCounter := 0, v_noFromCounter := 0; + for (var integer i := 0; i < c_ptcCount; i := i + 1) { + v_ptcs[i] := GeneralComp.create; + connect(self:p, v_ptcs[i]:p); + v_ptcs[i].start(f()); + } + + for (var integer i := 0; i < c_ptcCount; i := i + 1) { + alt { + [] p.receive(integer:?) from (v_ptcs[0], v_ptcs[1]) { v_fromCounter := v_fromCounter + 1; } + [] p.receive(integer:?) { v_noFromCounter := v_noFromCounter + 1; } + } + } + if (v_fromCounter == 2 and v_noFromCounter == 1) { setverdict(pass); } + else { setverdict(fail); } + } + + control { + execute(TC_Sem_220202_ReceiveOperation_007(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/Sem_220202_ReceiveOperation_008.ttcn b/ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/Sem_220202_ReceiveOperation_008.ttcn new file mode 100644 index 00000000..1e96e592 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/Sem_220202_ReceiveOperation_008.ttcn @@ -0,0 +1,50 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:22.2.2, receive with a from clause (any component) + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirements are tested: +// In the case of one-to-many connections the receive operation may be restricted +// to a certain communication partner. This restriction shall be denoted using the +// from keyword. + +module Sem_220202_ReceiveOperation_008 { + + type port P message { + inout integer; + } + + type component GeneralComp + { + port P p; + } + + function f() runs on GeneralComp + { + p.send(1); + } + + const integer c_ptcCount := 3; + + testcase TC_Sem_220202_ReceiveOperation_008() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptcs[c_ptcCount]; + for (var integer i := 0; i < c_ptcCount; i := i + 1) { + v_ptcs[i] := GeneralComp.create; + connect(self:p, v_ptcs[i]:p); + v_ptcs[i].start(f()); + } + + for (var integer i := 0; i < c_ptcCount; i := i + 1) { + alt { + [] p.receive(integer:?) from any component { setverdict(pass); } + [] p.receive(integer:?) { setverdict(fail); } + } + } + } + + control { + execute(TC_Sem_220202_ReceiveOperation_008(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/Sem_220202_ReceiveOperation_009.ttcn b/ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/Sem_220202_ReceiveOperation_009.ttcn new file mode 100644 index 00000000..bc4b5abe --- /dev/null +++ b/ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/Sem_220202_ReceiveOperation_009.ttcn @@ -0,0 +1,48 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:22.2.2, redirect assignment of message fields + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirements are tested: +// When the keyword value is followed by an assignment list enframed by a pair of +// parentheses, the whole received message and/or one or more parts of it can be +// stored. In a single assignment within the list, on the right hand side of the +// assignment symbol (":=") a field of the template type shall be referenced, on +// the left hand side the name of the variable or a formal parameter, in which +// the value shall be stored. + +module Sem_220202_ReceiveOperation_009 { + type record R + { + integer field1[2], + charstring field2 + } + + type port P message { + inout R; + } + + type component GeneralComp + { + port P p; + } + + testcase TC_Sem_220202_ReceiveOperation_009() runs on GeneralComp { + var integer v_int; + var charstring v_str; + p.send(R:{ field1 := { 1, 2 }, field2 := "abc" }); + alt { + [] p.receive(R:?) -> value ( v_int := field1[1], v_str := field2) { + if (v_int == 2 and v_str == "abc") { setverdict (pass); } + else { setverdict(fail); } + } + [] p.receive { setverdict(fail); } + } + } + + control { + execute(TC_Sem_220202_ReceiveOperation_009(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/Sem_220202_ReceiveOperation_010.ttcn b/ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/Sem_220202_ReceiveOperation_010.ttcn new file mode 100644 index 00000000..105bc076 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/Sem_220202_ReceiveOperation_010.ttcn @@ -0,0 +1,45 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:22.2.2, redirect assignment of message fields + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirements are tested: +// As a special case the field reference can be absent to indicate that the whole +// message shall be stored in a variable. + +module Sem_220202_ReceiveOperation_010 { + type record R + { + integer field1[2], + charstring field2 + } + + type port P message { + inout R; + } + + type component GeneralComp + { + port P p; + } + + testcase TC_Sem_220202_ReceiveOperation_010() runs on GeneralComp { + var integer v_int; + var charstring v_str; + var R v_rec; + p.send(R:{ field1 := { 1, 2 }, field2 := "abc" }); + alt { + [] p.receive(R:?) -> value ( v_int := field1[1], v_rec, v_str := field2) { + if (v_int == 2 and v_str == "abc" and v_rec == { field1 := { 1, 2 }, field2 := "abc" }) { setverdict (pass); } + else { setverdict(fail); } + } + [] p.receive { setverdict(fail); } + } + } + + control { + execute(TC_Sem_220202_ReceiveOperation_010(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/Sem_220202_ReceiveOperation_011.ttcn b/ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/Sem_220202_ReceiveOperation_011.ttcn new file mode 100644 index 00000000..e23f2514 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/Sem_220202_ReceiveOperation_011.ttcn @@ -0,0 +1,48 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:22.2.2, @decoded redirect assignment of a bitstring field + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirements are tested: +// When assigning individual fields of a message, encoded payload fields can be +// decoded prior to assignment using the @decoded modifier. In this case, the +// referenced field on the right hand sided of the assignment shall be one of the +// bitstring, hexstring, octetstring, charstring or universal charstring types. It +// shall be decoded into a value of the same type as the variable on the left hand +// side of the assignment. + +module Sem_220202_ReceiveOperation_011 { + type record R + { + integer id, + bitstring payload + } + + type port P message { + inout R; + } + + type component GeneralComp + { + port P p; + } + + testcase TC_Sem_220202_ReceiveOperation_011() runs on GeneralComp { + var charstring v_src := "abc", v_res; + var bitstring v_bs := encvalue(v_src); + p.send(R:{ id := 1, payload := v_bs }); + alt { + [] p.receive(R:?) -> value (v_res := @decoded payload) { + if (v_res == "abc") { setverdict (pass); } + else { setverdict(fail); } + } + [] p.receive { setverdict(fail); } + } + } + + control { + execute(TC_Sem_220202_ReceiveOperation_011(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/Sem_220202_ReceiveOperation_012.ttcn b/ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/Sem_220202_ReceiveOperation_012.ttcn new file mode 100644 index 00000000..78a64cf0 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/Sem_220202_ReceiveOperation_012.ttcn @@ -0,0 +1,48 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:22.2.2, @decoded redirect assignment of a hexstring field + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirements are tested: +// When assigning individual fields of a message, encoded payload fields can be +// decoded prior to assignment using the @decoded modifier. In this case, the +// referenced field on the right hand sided of the assignment shall be one of the +// bitstring, hexstring, octetstring, charstring or universal charstring types. It +// shall be decoded into a value of the same type as the variable on the left hand +// side of the assignment. + +module Sem_220202_ReceiveOperation_012 { + type record R + { + integer id, + hexstring payload + } + + type port P message { + inout R; + } + + type component GeneralComp + { + port P p; + } + + testcase TC_Sem_220202_ReceiveOperation_012() runs on GeneralComp { + var charstring v_src := "abc", v_res; + var hexstring v_hs := bit2hex(encvalue(v_src)); + p.send(R:{ id := 1, payload := v_hs }); + alt { + [] p.receive(R:?) -> value (v_res := @decoded payload) { + if (v_res == "abc") { setverdict (pass); } + else { setverdict(fail); } + } + [] p.receive { setverdict(fail); } + } + } + + control { + execute(TC_Sem_220202_ReceiveOperation_012(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/Sem_220202_ReceiveOperation_013.ttcn b/ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/Sem_220202_ReceiveOperation_013.ttcn new file mode 100644 index 00000000..917d4c65 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/Sem_220202_ReceiveOperation_013.ttcn @@ -0,0 +1,48 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:22.2.2, @decoded redirect assignment of an octetstring field + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirements are tested: +// When assigning individual fields of a message, encoded payload fields can be +// decoded prior to assignment using the @decoded modifier. In this case, the +// referenced field on the right hand sided of the assignment shall be one of the +// bitstring, hexstring, octetstring, charstring or universal charstring types. It +// shall be decoded into a value of the same type as the variable on the left hand +// side of the assignment. + +module Sem_220202_ReceiveOperation_013 { + type record R + { + integer id, + octetstring payload + } + + type port P message { + inout R; + } + + type component GeneralComp + { + port P p; + } + + testcase TC_Sem_220202_ReceiveOperation_013() runs on GeneralComp { + var charstring v_src := "abc", v_res; + var octetstring v_os := bit2oct(encvalue(v_src)); + p.send(R:{ id := 1, payload := v_os }); + alt { + [] p.receive(R:?) -> value (v_res := @decoded payload) { + if (v_res == "abc") { setverdict (pass); } + else { setverdict(fail); } + } + [] p.receive { setverdict(fail); } + } + } + + control { + execute(TC_Sem_220202_ReceiveOperation_013(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/Sem_220202_ReceiveOperation_014.ttcn b/ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/Sem_220202_ReceiveOperation_014.ttcn new file mode 100644 index 00000000..e5247b68 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/Sem_220202_ReceiveOperation_014.ttcn @@ -0,0 +1,48 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:22.2.2, @decoded redirect assignment of a charstring field + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirements are tested: +// When assigning individual fields of a message, encoded payload fields can be +// decoded prior to assignment using the @decoded modifier. In this case, the +// referenced field on the right hand sided of the assignment shall be one of the +// bitstring, hexstring, octetstring, charstring or universal charstring types. It +// shall be decoded into a value of the same type as the variable on the left hand +// side of the assignment. + +module Sem_220202_ReceiveOperation_014 { + type record R + { + integer id, + charstring payload + } + + type port P message { + inout R; + } + + type component GeneralComp + { + port P p; + } + + testcase TC_Sem_220202_ReceiveOperation_014() runs on GeneralComp { + var integer v_src := 1953719668, v_res with { encode "32bit" }; + var charstring v_str := encvalue_unichar(v_src); + p.send(R:{ id := 1, payload := v_str }); + alt { + [] p.receive(R:?) -> value (v_res := @decoded payload) { + if (v_res == 1953719668) { setverdict (pass); } + else { setverdict(fail); } + } + [] p.receive { setverdict(fail); } + } + } + + control { + execute(TC_Sem_220202_ReceiveOperation_014(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/Sem_220202_ReceiveOperation_015.ttcn b/ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/Sem_220202_ReceiveOperation_015.ttcn new file mode 100644 index 00000000..a2a549f2 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/Sem_220202_ReceiveOperation_015.ttcn @@ -0,0 +1,48 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:22.2.2, @decoded redirect assignment of a universal charstring field + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirements are tested: +// When assigning individual fields of a message, encoded payload fields can be +// decoded prior to assignment using the @decoded modifier. In this case, the +// referenced field on the right hand sided of the assignment shall be one of the +// bitstring, hexstring, octetstring, charstring or universal charstring types. It +// shall be decoded into a value of the same type as the variable on the left hand +// side of the assignment. + +module Sem_220202_ReceiveOperation_015 { + type record R + { + integer id, + universal charstring payload + } + + type port P message { + inout R; + } + + type component GeneralComp + { + port P p; + } + + testcase TC_Sem_220202_ReceiveOperation_015() runs on GeneralComp { + var integer v_src := 1953719668, v_res with { encode "32bit" }; + var universal charstring v_str := encvalue_unichar(v_src); + p.send(R:{ id := 1, payload := v_str }); + alt { + [] p.receive(R:?) -> value (v_res := @decoded payload) { + if (v_res == 1953719668) { setverdict (pass); } + else { setverdict(fail); } + } + [] p.receive { setverdict(fail); } + } + } + + control { + execute(TC_Sem_220202_ReceiveOperation_015(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/Sem_220202_ReceiveOperation_016.ttcn b/ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/Sem_220202_ReceiveOperation_016.ttcn new file mode 100644 index 00000000..c0c9a5e8 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/Sem_220202_ReceiveOperation_016.ttcn @@ -0,0 +1,46 @@ +/***************************************************************** + ** @author STF 487 (updated by STF 521) + ** @version 0.0.2 + ** @purpose 1:22.2.2, @decoded redirect assignment with encoding parameter + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirements are tested: +// In case the referenced field is of the universal charstring type, the @decoded +// clause can contain an optional parameter defining the encoding format. The +// parameter shall be of the charstring type and it shall contain one of the +// strings allowed for the decvalue_unichar function (specified in clause C.5.4). + +module Sem_220202_ReceiveOperation_016 { + type record R + { + integer id, + universal charstring payload + } + + type port P message { + inout R; + } + + type component GeneralComp + { + port P p; + } + + testcase TC_Sem_220202_ReceiveOperation_016() runs on GeneralComp { + var integer v_src := 1953719668, v_res with { variant "32 bit" }; + var universal charstring v_str := encvalue_unichar(v_src, "UTF-16LE"); + p.send(R:{ id := 1, payload := v_str }); + alt { + [] p.receive(R:?) -> value (v_res := @decoded("UTF-16LE") payload) { + if (v_res == 1953719668) { setverdict (pass); } + else { setverdict(fail); } + } + [] p.receive { setverdict(fail); } + } + } + + control { + execute(TC_Sem_220202_ReceiveOperation_016(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/Sem_220202_ReceiveOperation_017.ttcn b/ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/Sem_220202_ReceiveOperation_017.ttcn new file mode 100644 index 00000000..7480fb6b --- /dev/null +++ b/ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/Sem_220202_ReceiveOperation_017.ttcn @@ -0,0 +1,35 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:22.2.2, redirect assignment storing a component + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirements are tested: +// It is also possible to retrieve and store the component reference or address of +// the sender of a message. This is denoted by the keyword sender. + +module Sem_220202_ReceiveOperation_017 { + + type port P message { + inout integer; + } + + type component GeneralComp + { + port P p; + } + + testcase TC_Sem_220202_ReceiveOperation_017() runs on GeneralComp system GeneralComp { + var GeneralComp v_tc := null; + connect(self:p, self:p); + p.send(10); + p.receive(integer:?) -> sender v_tc; + if (v_tc == self) { setverdict(pass); } + else { setverdict(fail); } + } + + control { + execute(TC_Sem_220202_ReceiveOperation_017(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/Sem_220202_ReceiveOperation_018.ttcn b/ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/Sem_220202_ReceiveOperation_018.ttcn new file mode 100644 index 00000000..d868755a --- /dev/null +++ b/ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/Sem_220202_ReceiveOperation_018.ttcn @@ -0,0 +1,35 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:22.2.2, redirect assignment storing an address + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirements are tested: +// It is also possible to retrieve and store the component reference or address of +// the sender of a message. This is denoted by the keyword sender. + +module Sem_220202_ReceiveOperation_018 { + + type port P message { + inout integer; + address integer; + } + + type component GeneralComp + { + port P p; + } + + testcase TC_Sem_220202_ReceiveOperation_018() runs on GeneralComp { + var P.address v_addr := null; + p.send(10) to 5; + p.receive(integer:?) -> sender v_addr; + if (v_addr == 5) { setverdict(pass); } + else { setverdict(fail); } + } + + control { + execute(TC_Sem_220202_ReceiveOperation_018(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/Sem_220202_ReceiveOperation_019.ttcn b/ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/Sem_220202_ReceiveOperation_019.ttcn new file mode 100644 index 00000000..a6a7dc3a --- /dev/null +++ b/ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/Sem_220202_ReceiveOperation_019.ttcn @@ -0,0 +1,35 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:22.2.2, any from port.receive statement + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirements are tested: +// To receive a message on any port from a specific port array, use the any from +// PortArrayRef syntax where PortArrayRef shall be a reference to a port array +// identifier. + +module Sem_220202_ReceiveOperation_019 { + + type port P message { + inout integer; + } + + type component GeneralComp + { + port P p [3]; + } + + testcase TC_Sem_220202_ReceiveOperation_019() runs on GeneralComp { + p[2].send(10); + alt { + [] any from p.receive(integer:?) { setverdict(pass); } + [] any port.receive { setverdict(fail); } + } + } + + control { + execute(TC_Sem_220202_ReceiveOperation_019(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/Sem_220202_ReceiveOperation_020.ttcn b/ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/Sem_220202_ReceiveOperation_020.ttcn new file mode 100644 index 00000000..2d98bc80 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/Sem_220202_ReceiveOperation_020.ttcn @@ -0,0 +1,46 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:22.2.2, single dimensional index redirect in any from port.receive statement + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirements are tested: +// It is also possible to store the index of a port in a single-dimensional port array +// at which the operation was successful to a variable of type integer or, in case of +// multi-dimensional port arrays the index of the successful port to an integer array +// or record of integer variable. When checking the port array for matching messages, +// the port indices to be checked are iterated from lowest to highest. If the port +// array is multi-dimensional, then the ports are iterated over from innermost to +// outermost array dimension from lowest to highest index for each dimension, e.g. +// [0][0], [0][1], [1][0], [1][1]. The first port which matches all the criteria will +// cause the operation to be successful even if other ports in the array would also +// meet the criteria. + +module Sem_220202_ReceiveOperation_020 { + + type port P message { + inout integer; + } + + type component GeneralComp + { + port P p [3]; + } + + testcase TC_Sem_220202_ReceiveOperation_020() runs on GeneralComp { + var integer v_index; + p[2].send(10); + alt { + [] any from p.receive(integer:?) -> @index value v_index { + if (v_index == 2) { setverdict(pass); } + else { setverdict(fail); } + } + [] any port.receive { setverdict(fail); } + } + } + + control { + execute(TC_Sem_220202_ReceiveOperation_020(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/Sem_220202_ReceiveOperation_021.ttcn b/ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/Sem_220202_ReceiveOperation_021.ttcn new file mode 100644 index 00000000..a8df547b --- /dev/null +++ b/ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/Sem_220202_ReceiveOperation_021.ttcn @@ -0,0 +1,48 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:22.2.2, multidimensional index redirect in any from port.receive statement + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirements are tested: +// It is also possible to store the index of a port in a single-dimensional port array +// at which the operation was successful to a variable of type integer or, in case of +// multi-dimensional port arrays the index of the successful port to an integer array +// or record of integer variable. When checking the port array for matching messages, +// the port indices to be checked are iterated from lowest to highest. If the port +// array is multi-dimensional, then the ports are iterated over from innermost to +// outermost array dimension from lowest to highest index for each dimension, e.g. +// [0][0], [0][1], [1][0], [1][1]. The first port which matches all the criteria will +// cause the operation to be successful even if other ports in the array would also +// meet the criteria. + +module Sem_220202_ReceiveOperation_021 { + + type port P message { + inout integer; + } + + type component GeneralComp + { + port P p [2][3]; + } + + type record of integer RoI; + + testcase TC_Sem_220202_ReceiveOperation_021() runs on GeneralComp { + var RoI v_index; + p[0][2].send(10); + alt { + [] any from p.receive(integer:?) -> @index value v_index { + if (v_index == { 0, 2 }) { setverdict(pass); } + else { setverdict(fail, "v_index: ", v_index); } + } + [] any port.receive { setverdict(fail); } + } + } + + control { + execute(TC_Sem_220202_ReceiveOperation_021(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/Sem_220202_ReceiveOperation_022.ttcn b/ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/Sem_220202_ReceiveOperation_022.ttcn new file mode 100644 index 00000000..52fa8958 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/Sem_220202_ReceiveOperation_022.ttcn @@ -0,0 +1,38 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:22.2.2, standalone receive as a shorthand for alt statement + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirements are tested: +// The receive operation can be used as a stand-alone statement in a behaviour description. +// In this latter case the receive operation is considered to be shorthand for an alt +// statement with the receive operation as the only alternative. + +module Sem_220202_ReceiveOperation_022 { + + type port P message { + inout integer; + } + + type component GeneralComp + { + port P p; + } + + altstep a() runs on GeneralComp { + [] p.receive(10) { setverdict(pass); } + } + + testcase TC_Sem_220202_ReceiveOperation_022() runs on GeneralComp { + activate(a()); // defaults should be processed as a part of alt + p.send(10); + p.receive(0); // no match here, but because the statement is actually an alt statement, + // the default shall be automatically exectuted and accept the message + } + + control { + execute(TC_Sem_220202_ReceiveOperation_022(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/Sem_220202_ReceiveOperation_023.ttcn b/ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/Sem_220202_ReceiveOperation_023.ttcn new file mode 100644 index 00000000..03436c37 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/Sem_220202_ReceiveOperation_023.ttcn @@ -0,0 +1,35 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:22.2.2, single dimensional index redirect in any from port.receive statement + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirements are tested: +// No binding of the incoming values to the terms of the expression or to the template +// shall occur. + +module Sem_220202_ReceiveOperation_023 { + + type port P message { + inout integer; + } + + type component GeneralComp + { + port P p; + } + + testcase TC_Sem_220202_ReceiveOperation_023() runs on GeneralComp { + var template integer v_expectedValue := ?; + p.send(10); + p.receive(v_expectedValue); + // make sure the template variable hasn't changed: + if (istemplatekind(v_expectedValue, "AnyValue")) {setverdict(pass); } + else { setverdict(fail); } + } + + control { + execute(TC_Sem_220202_ReceiveOperation_023(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/Sem_220202_ReceiveOperation_024.ttcn b/ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/Sem_220202_ReceiveOperation_024.ttcn new file mode 100644 index 00000000..2ea2bc4b --- /dev/null +++ b/ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/Sem_220202_ReceiveOperation_024.ttcn @@ -0,0 +1,42 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:22.2.2, lazy variable in value redirect + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirements are tested: +// If a variable referenced in the value, sender or @index clause is a lazy or fuzzy +// variable, the expression assigned to this variable is equal to the result produced +// by the receive operation i.e. later evaluation of the lazy or fuzzy variable does not +// lead to repeated invocation of the receive operation. + +module Sem_220202_ReceiveOperation_024 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + testcase TC_Sem_220202_ReceiveOperation_024() runs on GeneralComp { + var @lazy integer v_int; + p.send(1); + p.send(2); + p.send(3); + p.receive(integer:?) -> value v_int; + if (v_int == 1) { // evaluation of @lazy (receive shall not be called again) + alt { + [] p.receive(integer:2) { setverdict(pass); } + [] p.receive { setverdict(fail); } + } + } else { + setverdict(fail); + } + } + + control { + execute(TC_Sem_220202_ReceiveOperation_024(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/Sem_220202_ReceiveOperation_025.ttcn b/ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/Sem_220202_ReceiveOperation_025.ttcn new file mode 100644 index 00000000..3c7d696f --- /dev/null +++ b/ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/Sem_220202_ReceiveOperation_025.ttcn @@ -0,0 +1,44 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:22.2.2, lazy variable in sender redirect + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirements are tested: +// If a variable referenced in the value, sender or @index clause is a lazy or fuzzy +// variable, the expression assigned to this variable is equal to the result produced +// by the receive operation i.e. later evaluation of the lazy or fuzzy variable does not +// lead to repeated invocation of the receive operation. + +module Sem_220202_ReceiveOperation_025 { + type integer address; + + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + testcase TC_Sem_220202_ReceiveOperation_025() runs on GeneralComp { + var @lazy address v_addr; + p.send(1) to 1; + p.send(2) to 2; + p.send(3) to 3; + p.receive(integer:?) -> sender v_addr; + if (v_addr == 1) { // evaluation of @lazy (receive shall not be called again) + alt { + [] p.receive(integer:2) { setverdict(pass); } + [] p.receive { setverdict(fail); } + } + } else { + setverdict(fail); + } + } + + control { + execute(TC_Sem_220202_ReceiveOperation_025(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/Sem_220202_ReceiveOperation_026.ttcn b/ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/Sem_220202_ReceiveOperation_026.ttcn new file mode 100644 index 00000000..7126d472 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/Sem_220202_ReceiveOperation_026.ttcn @@ -0,0 +1,42 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:22.2.2, lazy variable in index redirect + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirements are tested: +// If a variable referenced in the value, sender or @index clause is a lazy or fuzzy +// variable, the expression assigned to this variable is equal to the result produced +// by the receive operation i.e. later evaluation of the lazy or fuzzy variable does not +// lead to repeated invocation of the receive operation. + +module Sem_220202_ReceiveOperation_026 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p[2]; + } + + testcase TC_Sem_220202_ReceiveOperation_026() runs on GeneralComp { + var @lazy integer v_int; + p[1].send(1); + p[1].send(2); + p[1].send(3); + any from p.receive(integer:?) -> @index value v_int; + if (v_int == 1) { // evaluation of @lazy (receive shall not be called again) + alt { + [] p[1].receive(integer:2) { setverdict(pass); } + [] any from p.receive { setverdict(fail); } + } + } else { + setverdict(fail); + } + } + + control { + execute(TC_Sem_220202_ReceiveOperation_026(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/Sem_220202_ReceiveOperation_027.ttcn b/ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/Sem_220202_ReceiveOperation_027.ttcn new file mode 100644 index 00000000..55ef0559 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/Sem_220202_ReceiveOperation_027.ttcn @@ -0,0 +1,42 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:22.2.2, fuzzy variable in value redirect + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirements are tested: +// If a variable referenced in the value, sender or @index clause is a lazy or fuzzy +// variable, the expression assigned to this variable is equal to the result produced +// by the receive operation i.e. later evaluation of the lazy or fuzzy variable does not +// lead to repeated invocation of the receive operation. + +module Sem_220202_ReceiveOperation_027 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + testcase TC_Sem_220202_ReceiveOperation_027() runs on GeneralComp { + var @fuzzy integer v_int; + p.send(1); + p.send(2); + p.send(3); + p.receive(integer:?) -> value v_int; + if (v_int == 1) { // evaluation of @lazy (receive shall not be called again) + alt { + [] p.receive(integer:2) { setverdict(pass); } + [] p.receive { setverdict(fail); } + } + } else { + setverdict(fail); + } + } + + control { + execute(TC_Sem_220202_ReceiveOperation_027(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/Sem_220202_ReceiveOperation_028.ttcn b/ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/Sem_220202_ReceiveOperation_028.ttcn new file mode 100644 index 00000000..a66b16f0 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/Sem_220202_ReceiveOperation_028.ttcn @@ -0,0 +1,44 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:22.2.2, fuzzy variable in sender redirect + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirements are tested: +// If a variable referenced in the value, sender or @index clause is a lazy or fuzzy +// variable, the expression assigned to this variable is equal to the result produced +// by the receive operation i.e. later evaluation of the lazy or fuzzy variable does not +// lead to repeated invocation of the receive operation. + +module Sem_220202_ReceiveOperation_028 { + type integer address; + + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + testcase TC_Sem_220202_ReceiveOperation_028() runs on GeneralComp { + var @fuzzy address v_addr; + p.send(1) to 1; + p.send(2) to 2; + p.send(3) to 3; + p.receive(integer:?) -> sender v_addr; + if (v_addr == 1) { // evaluation of @lazy (receive shall not be called again) + alt { + [] p.receive(integer:2) { setverdict(pass); } + [] p.receive { setverdict(fail); } + } + } else { + setverdict(fail); + } + } + + control { + execute(TC_Sem_220202_ReceiveOperation_028(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/Sem_220202_ReceiveOperation_029.ttcn b/ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/Sem_220202_ReceiveOperation_029.ttcn new file mode 100644 index 00000000..e5ef6768 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/Sem_220202_ReceiveOperation_029.ttcn @@ -0,0 +1,42 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:22.2.2, fuzzy variable in @index redirect + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirements are tested: +// If a variable referenced in the value, sender or @index clause is a lazy or fuzzy +// variable, the expression assigned to this variable is equal to the result produced +// by the receive operation i.e. later evaluation of the lazy or fuzzy variable does not +// lead to repeated invocation of the receive operation. + +module Sem_220202_ReceiveOperation_029 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p[2]; + } + + testcase TC_Sem_220202_ReceiveOperation_029() runs on GeneralComp { + var @fuzzy integer v_int; + p[1].send(1); + p[1].send(2); + p[1].send(3); + any from p.receive(integer:?) -> @index value v_int; + if (v_int == 1) { // evaluation of @lazy (receive shall not be called again) + alt { + [] p[1].receive(integer:2) { setverdict(pass); } + [] any from p.receive { setverdict(fail); } + } + } else { + setverdict(fail); + } + } + + control { + execute(TC_Sem_220202_ReceiveOperation_029(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/Sem_220202_ReceiveOperation_030.ttcn b/ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/Sem_220202_ReceiveOperation_030.ttcn new file mode 100644 index 00000000..116399c6 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2202_message_based_communication/220202_receive_operation/Sem_220202_ReceiveOperation_030.ttcn @@ -0,0 +1,39 @@ +/***************************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:22.2.2, verify that a variable of a different but compatible type can be used in a redirect assignment + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirements are tested: +// The assignment part in a receiving operation is optional. For message-based ports it is used when it is +// required to store received messages. In the case of procedure-based ports it is used for storing the in +// and inout parameters of an accepted call, for storing the return value or for storing exceptions. +// For the message or parameter value assignment part strong typing is not required, e.g. the variable used +// for storing a message shall be type-compatible to the type of the incoming message. + +module Sem_220202_ReceiveOperation_030 { + + type port P message { + inout integer; + } + + type integer UInt8 (0..255); + + type component GeneralComp + { + port P p; + } + + testcase TC_Sem_220202_ReceiveOperation_030() runs on GeneralComp { + var UInt8 v_int; + p.send(10); + p.receive(integer:?) -> value v_int; + if (v_int == 10) { setverdict(pass); } + else { setverdict(fail); } + } + + control { + execute(TC_Sem_220202_ReceiveOperation_030(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/NegSem_220203_TriggerOperation_001.ttcn b/ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/NegSem_220203_TriggerOperation_001.ttcn new file mode 100644 index 00000000..236019fd --- /dev/null +++ b/ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/NegSem_220203_TriggerOperation_001.ttcn @@ -0,0 +1,63 @@ +/***************************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:22.2.3, Ensure that the IUT correctly handles message trigger operations + ** @verdict pass reject + *****************************************************************/ + +module NegSem_220203_TriggerOperation_001 { + +signature p_NegSem_220203_TriggerOperation_001(in integer p_par1, out integer p_par2, inout integer p_par3) return integer; + +template p_NegSem_220203_TriggerOperation_001 s_baseTemplate := { + p_par1 := -, + p_par2 := 4, + p_par3 := ? +} + +template p_NegSem_220203_TriggerOperation_001 s_returnTemplate modifies s_baseTemplate := { + p_par3 := 5 +} + +template p_NegSem_220203_TriggerOperation_001 s_wrongTemplate modifies s_baseTemplate := { + p_par3 := 3 +} + +template p_NegSem_220203_TriggerOperation_001 s_callTemplate := { + p_par1 := 1, + p_par2 := -, + p_par3 := 3 +} + + type port remotePort procedure { + out p_NegSem_220203_TriggerOperation_001; + } + +type component GeneralComp { + port remotePort PCO; +} + +testcase NegSem_220203_TriggerOperation_001() runs on GeneralComp { + + PCO.call(p_NegSem_220203_TriggerOperation_001:s_callTemplate, 5.0) { + + [] PCO.trigger(p_NegSem_220203_TriggerOperation_001:s_wrongTemplate value 1) { //cannot trigger from procedure based port + setverdict(fail); + } + [] PCO.trigger(p_NegSem_220203_TriggerOperation_001:s_returnTemplate value 2) { + setverdict(fail); + } + [] PCO.trigger(p_NegSem_220203_TriggerOperation_001:s_returnTemplate value 1) { + setverdict(pass); + } + [] PCO.catch (timeout) { + setverdict(fail); + } + } +} + +control{ + execute(NegSem_220203_TriggerOperation_001()); +} + +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/NegSem_220203_TriggerOperation_002.ttcn b/ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/NegSem_220203_TriggerOperation_002.ttcn new file mode 100644 index 00000000..9eadcf85 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/NegSem_220203_TriggerOperation_002.ttcn @@ -0,0 +1,41 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:22.2.3, no type prefix in ambiguous inline template + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// The matching criteria as defined in clause 22.2.2 apply also to the trigger operation. +// An optional type field in the matching criteria to the [trigger] operation shall +// be used to avoid any ambiguity of the type of the value being received. + +module NegSem_220203_TriggerOperation_002 { + + type record of integer RoI; + type record R { + integer field1, + integer field2 + } + + type port P message { + inout R, RoI; + } + + type component GeneralComp + { + port P p; + } + + testcase TC_NegSem_220203_TriggerOperation_002() runs on GeneralComp { + p.send(R:{1, 2}); + alt { + [] p.trigger({?, 2}) { setverdict(pass); } // error (ambiguous type) + [else] { setverdict(pass); } + } + } + + control { + execute(TC_NegSem_220203_TriggerOperation_002(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/NegSem_220203_TriggerOperation_003.ttcn b/ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/NegSem_220203_TriggerOperation_003.ttcn new file mode 100644 index 00000000..37890e6d --- /dev/null +++ b/ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/NegSem_220203_TriggerOperation_003.ttcn @@ -0,0 +1,34 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:22.2.3, type mismatch in redirect value assignment + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// Rules in clause 22.2.2 shall apply. +// The variable or formal parameter shall be type compatible with the received message. + +module NegSem_220203_TriggerOperation_003 { + + type port P message { + inout integer, charstring; + } + + type component GeneralComp + { + port P p; + } + + testcase TC_NegSem_220203_TriggerOperation_003() runs on GeneralComp { + var charstring v_str; + p.send(1); + alt { + [] p.trigger(integer:?) -> value v_str { setverdict(pass); } // error (type mismatch in redirect assignment) + } + } + + control { + execute(TC_NegSem_220203_TriggerOperation_003(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/NegSem_220203_TriggerOperation_004.ttcn b/ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/NegSem_220203_TriggerOperation_004.ttcn new file mode 100644 index 00000000..05d515b8 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/NegSem_220203_TriggerOperation_004.ttcn @@ -0,0 +1,43 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:22.2.3, type mismatch in redirect assignment of message fields + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// Rules in clause 22.2.2 shall apply. +// The variable or formal parameter shall be type compatible with the type on the +// right hand side of the assignment symbol. + +module NegSem_220203_TriggerOperation_004 { + type record R + { + integer field1[2], + charstring field2 + } + + type port P message { + inout R; + } + + type component GeneralComp + { + port P p; + } + + testcase TC_NegSem_220203_TriggerOperation_004() runs on GeneralComp { + var integer v_int; + var bitstring v_str; + p.send(R:{ field1 := { 1, 2 }, field2 := "abc" }); + alt { + [] p.trigger(R:?) -> value ( v_int := field1[1], v_str := field2) { + setverdict (pass); + } + } + } + + control { + execute(TC_NegSem_220203_TriggerOperation_004(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/NegSem_220203_TriggerOperation_005.ttcn b/ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/NegSem_220203_TriggerOperation_005.ttcn new file mode 100644 index 00000000..668a50a1 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/NegSem_220203_TriggerOperation_005.ttcn @@ -0,0 +1,46 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:22.2.3, applying @decoded to a forbidden field + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// Rules in clause 22.2.2 shall apply. +// When assigning individual fields of a message, encoded payload fields can be +// decoded prior to assignment using the @decoded modifier. In this case, the +// referenced field on the right hand sided of the assignment shall be one of the +// bitstring, hexstring, octetstring, charstring or universal charstring types. It +// shall be decoded into a value of the same type as the variable on the left hand +// side of the assignment. + +module NegSem_220203_TriggerOperation_005 { + type record R + { + integer id, + record of integer payload (0..255) + } + + type port P message { + inout R; + } + + type component GeneralComp + { + port P p; + } + + testcase TC_NegSem_220203_TriggerOperation_005() runs on GeneralComp { + var integer v_res with { encode "32bit" }; + p.send(R:{ id := 1, payload := {0, 0, 0, 0} }); + alt { + [] p.trigger(R:?) -> value (v_res := @decoded payload) { + setverdict (pass); + } + } + } + + control { + execute(TC_NegSem_220203_TriggerOperation_005(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/NegSem_220203_TriggerOperation_006.ttcn b/ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/NegSem_220203_TriggerOperation_006.ttcn new file mode 100644 index 00000000..c43b78ca --- /dev/null +++ b/ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/NegSem_220203_TriggerOperation_006.ttcn @@ -0,0 +1,42 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:22.2.3, decoding error in @decoded redirect assignment + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// Rules in clause 22.2.2 shall apply. +// Failure of this decoding shall cause a test case error. + +module NegSem_220203_TriggerOperation_006 { + type record R + { + integer id, + charstring payload + } + + type port P message { + inout R; + } + + type component GeneralComp + { + port P p; + } + + testcase TC_NegSem_220203_TriggerOperation_006() runs on GeneralComp { + var integer v_src := 1953719668, v_res with { encode "32bit" }; + var charstring v_str := encvalue_unichar(v_src) & "abcdefgij"; + p.send(R:{ id := 1, payload := v_str }); + alt { + [] p.trigger(R:?) -> value (v_res := @decoded payload) { + setverdict (pass); + } + } + } + + control { + execute(TC_NegSem_220203_TriggerOperation_006(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/NegSem_220203_TriggerOperation_007.ttcn b/ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/NegSem_220203_TriggerOperation_007.ttcn new file mode 100644 index 00000000..2295f59b --- /dev/null +++ b/ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/NegSem_220203_TriggerOperation_007.ttcn @@ -0,0 +1,42 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:22.2.3, invalid format value in @decoded redirect assignment + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// Rules in clause 22.2.2 shall apply. +// Any other value shall cause an error. + +module NegSem_220203_TriggerOperation_007 { + type record R + { + integer id, + universal charstring payload + } + + type port P message { + inout R; + } + + type component GeneralComp + { + port P p; + } + + testcase TC_NegSem_220203_TriggerOperation_007() runs on GeneralComp { + var integer v_src := 1953719668, v_res with { encode "32bit" }; + var universal charstring v_str := encvalue_unichar(v_src); + p.send(R:{ id := 1, payload := v_str }); + alt { + [] p.trigger(R:?) -> value (v_res := @decoded("proprietary") payload) { + setverdict (pass); + } + } + } + + control { + execute(TC_NegSem_220203_TriggerOperation_007(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/NegSem_220203_TriggerOperation_008.ttcn b/ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/NegSem_220203_TriggerOperation_008.ttcn new file mode 100644 index 00000000..37aeacb2 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/NegSem_220203_TriggerOperation_008.ttcn @@ -0,0 +1,42 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:22.2.3, value of wrong type in @decoded redirect assignment + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// Rules in clause 22.2.2 shall apply. +// Any other value shall cause an error. + +module NegSem_220203_TriggerOperation_008 { + type record R + { + integer id, + universal charstring payload + } + + type port P message { + inout R; + } + + type component GeneralComp + { + port P p; + } + + testcase TC_NegSem_220203_TriggerOperation_008() runs on GeneralComp { + var integer v_src := 1953719668, v_res with { encode "32bit" }; + var universal charstring v_str := encvalue_unichar(v_src); + p.send(R:{ id := 1, payload := v_str }); + alt { + [] p.trigger(R:?) -> value (v_res := @decoded(v_src) payload) { + setverdict (pass); + } + } + } + + control { + execute(TC_NegSem_220203_TriggerOperation_008(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/NegSem_220203_TriggerOperation_009.ttcn b/ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/NegSem_220203_TriggerOperation_009.ttcn new file mode 100644 index 00000000..687b3bb7 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/NegSem_220203_TriggerOperation_009.ttcn @@ -0,0 +1,43 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:22.2.3, encoding parameter of @decoded redirect assignment applied to incorrect type + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// Rules in clause 22.2.2 shall apply. +// In case the referenced field is not a universal charstring, the optional +// parameter shall not be present. + +module NegSem_220203_TriggerOperation_009 { + type record R + { + integer id, + octetstring payload + } + + type port P message { + inout R; + } + + type component GeneralComp + { + port P p; + } + + testcase TC_NegSem_220203_TriggerOperation_009() runs on GeneralComp { + var charstring v_src := "abc", v_res; + var octetstring v_os := bit2oct(encvalue(v_src)); + p.send(R:{ id := 1, payload := v_os }); + alt { + [] p.trigger(R:?) -> value (v_res := @decoded("UTF-8") payload) { + setverdict (pass); + } + } + } + + control { + execute(TC_NegSem_220203_TriggerOperation_009(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/NegSem_220203_TriggerOperation_010.ttcn b/ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/NegSem_220203_TriggerOperation_010.ttcn new file mode 100644 index 00000000..e3b00cbb --- /dev/null +++ b/ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/NegSem_220203_TriggerOperation_010.ttcn @@ -0,0 +1,37 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:22.2.3, attempting to store component name in redirect assignment + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// Rules in clause 22.2.2 shall apply. +// When the message is received on a connected port, only the component reference is +// stored in the following the sender keyword, but the test system shall internally +// store the component name too, if any (to be used in logging). + +module NegSem_220203_TriggerOperation_010 { + + type port P message { + inout integer; + } + + type component GeneralComp + { + port P p; + } + + testcase TC_NegSem_220203_TriggerOperation_010() runs on GeneralComp system GeneralComp { + var charstring v_name; + connect(self:p, self:p); + p.send(10); + p.trigger(integer:?) -> sender v_name; + if (v_name == "MTC") { setverdict(pass); } + else { setverdict(fail); } + } + + control { + execute(TC_NegSem_220203_TriggerOperation_010(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/NegSem_220203_TriggerOperation_011.ttcn b/ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/NegSem_220203_TriggerOperation_011.ttcn new file mode 100644 index 00000000..d2d586c2 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/NegSem_220203_TriggerOperation_011.ttcn @@ -0,0 +1,37 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:22.2.3, attempting to receive a type missing from the port list + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// The trigger operation shall only be used on message-based ports and the type of the +// value to be received shall be included in the list of incoming types of the port type +// definition. + + +module NegSem_220203_TriggerOperation_011 { + + type port P message { + inout integer; + } + + type component GeneralComp + { + port P p; + } + + testcase TC_NegSem_220203_TriggerOperation_011() runs on GeneralComp { + var integer v_index; + p.send(10); + alt { + [] p.trigger(charstring:?) { setverdict(pass); } + [else] { setverdict(pass); } + } + } + + control { + execute(TC_NegSem_220203_TriggerOperation_011(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/NegSem_220203_TriggerOperation_012.ttcn b/ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/NegSem_220203_TriggerOperation_012.ttcn new file mode 100644 index 00000000..5ed8363e --- /dev/null +++ b/ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/NegSem_220203_TriggerOperation_012.ttcn @@ -0,0 +1,34 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:22.2.3, value redirect assignment in receive any message statement + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// AddressRef for retrieving the sending entity shall be of type address, component or +// of the type provided in the address declaration of the port type of the port instance +// referenced in the receive operation. + +module NegSem_220203_TriggerOperation_012 { + + type port P message { + inout integer; + } + + type component GeneralComp + { + port P p; + } + + testcase TC_NegSem_220203_TriggerOperation_012() runs on GeneralComp { + var integer v_val; + p.send(10); + p.trigger -> value v_val; + setverdict(pass); + } + + control { + execute(TC_NegSem_220203_TriggerOperation_012(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/NegSem_220203_TriggerOperation_013.ttcn b/ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/NegSem_220203_TriggerOperation_013.ttcn new file mode 100644 index 00000000..796fdf62 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/NegSem_220203_TriggerOperation_013.ttcn @@ -0,0 +1,35 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:22.2.3, trying to store address with trigger operation on connected port + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// Type mismatch at storing the received value or parts of the received value and storing +// the sender shall cause an error. + +module NegSem_220203_TriggerOperation_013 { + + type port P message { + inout integer; + address integer; + } + + type component GeneralComp + { + port P p; + } + + testcase TC_NegSem_220203_TriggerOperation_013() runs on GeneralComp system GeneralComp { + var P.address v_addr; + connect(self:p, self:p); + p.send(10); + p.trigger -> sender v_addr; + setverdict(pass); + } + + control { + execute(TC_NegSem_220203_TriggerOperation_013(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/NegSem_220203_TriggerOperation_014.ttcn b/ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/NegSem_220203_TriggerOperation_014.ttcn new file mode 100644 index 00000000..6eae9e54 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/NegSem_220203_TriggerOperation_014.ttcn @@ -0,0 +1,36 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:22.2.3, type mismatch in sender redirect assignment + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// AddressRef for retrieving the sending entity shall be of type address, component or +// of the type provided in the address declaration of the port type of the port instance +// referenced in the receive operation. + + +module NegSem_220203_TriggerOperation_014 { + + type port P message { + inout integer; + address integer; + } + + type component GeneralComp + { + port P p; + } + + testcase TC_NegSem_220203_TriggerOperation_014() runs on GeneralComp { + var charstring v_addr; + p.send(10); + p.trigger -> sender v_addr; + setverdict(pass); + } + + control { + execute(TC_NegSem_220203_TriggerOperation_014(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/NegSem_220203_TriggerOperation_015.ttcn b/ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/NegSem_220203_TriggerOperation_015.ttcn new file mode 100644 index 00000000..047b5404 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/NegSem_220203_TriggerOperation_015.ttcn @@ -0,0 +1,37 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:22.2.3, null component reference in from clause of trigger operation + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// No AddressRef shall contain the special value null at the time of the operation. + +module NegSem_220203_TriggerOperation_015 { + + type port P message { + inout integer; + address integer; + } + + type component GeneralComp + { + port P p; + } + + testcase TC_NegSem_220203_TriggerOperation_015() runs on GeneralComp system GeneralComp { + var GeneralComp v_comp := null; + connect(self:p, self:p); + p.send(10); + alt { + [] p.trigger from v_comp {} + [else] {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_220203_TriggerOperation_015(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/NegSem_220203_TriggerOperation_016.ttcn b/ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/NegSem_220203_TriggerOperation_016.ttcn new file mode 100644 index 00000000..c8728563 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/NegSem_220203_TriggerOperation_016.ttcn @@ -0,0 +1,36 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:22.2.3, null address reference in from clause of receive operation + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// No AddressRef shall contain the special value null at the time of the operation. + +module NegSem_220203_TriggerOperation_016 { + + type port P message { + inout integer; + address integer; + } + + type component GeneralComp + { + port P p; + } + + testcase TC_NegSem_220203_TriggerOperation_016() runs on GeneralComp { + var P.address v_addr1 := 1, v_addr2 := 2, v_addr3 := null; + p.send(10); + alt { + [] p.trigger from (v_addr1, v_addr2, v_addr3) {} + [else] {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_220203_TriggerOperation_016(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/NegSem_220203_TriggerOperation_017.ttcn b/ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/NegSem_220203_TriggerOperation_017.ttcn new file mode 100644 index 00000000..22609648 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/NegSem_220203_TriggerOperation_017.ttcn @@ -0,0 +1,33 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:22.2.3, index redirection in standard port.trigger + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// The index redirection shall only be used when the operation is used on an any from port +// array construct. + +module NegSem_220203_TriggerOperation_017 { + + type port P message { + inout integer; + } + + type component GeneralComp + { + port P p; + } + + testcase TC_NegSem_220203_TriggerOperation_017() runs on GeneralComp { + var integer v_int; + p.send(10); + p.trigger(integer:?) -> @index value v_int; + setverdict(pass); + } + + control { + execute(TC_NegSem_220203_TriggerOperation_017(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/NegSem_220203_TriggerOperation_018.ttcn b/ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/NegSem_220203_TriggerOperation_018.ttcn new file mode 100644 index 00000000..4f30a5b7 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/NegSem_220203_TriggerOperation_018.ttcn @@ -0,0 +1,33 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:22.2.3, index redirection in any port.receive + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// The index redirection shall only be used when the operation is used on an any from port +// array construct. + +module NegSem_220203_TriggerOperation_018 { + + type port P message { + inout integer; + } + + type component GeneralComp + { + port P p; + } + + testcase TC_NegSem_220203_TriggerOperation_018() runs on GeneralComp { + var integer v_int; + p.send(10); + any port.trigger(integer:?) -> @index value v_int; + setverdict(pass); + } + + control { + execute(TC_NegSem_220203_TriggerOperation_018(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/NegSem_220203_TriggerOperation_019.ttcn b/ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/NegSem_220203_TriggerOperation_019.ttcn new file mode 100644 index 00000000..846f7f8d --- /dev/null +++ b/ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/NegSem_220203_TriggerOperation_019.ttcn @@ -0,0 +1,32 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:22.2.3, insufficient value range of variable in index redirection + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// If the index redirection is used for single-dimensional port arrays, the type of the +// integer variable shall allow storing the highest index of the respective array. + +module NegSem_220203_TriggerOperation_019 { + type integer RestrInt(0..2); + type port P message { + inout integer; + } + + type component GeneralComp { + port P p[10]; + } + + testcase TC_NegSem_220203_TriggerOperation_019() runs on GeneralComp { + var RestrInt v_int; + p[5].send(100); + any from p.trigger(integer:?) -> @index value v_int; + setverdict(pass); + } + + control { + execute(TC_NegSem_220203_TriggerOperation_019(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/NegSem_220203_TriggerOperation_020.ttcn b/ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/NegSem_220203_TriggerOperation_020.ttcn new file mode 100644 index 00000000..e14d3f85 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/NegSem_220203_TriggerOperation_020.ttcn @@ -0,0 +1,33 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:22.2.3, insufficient array dimension of variable in index redirection + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// If the index redirection is used for multi-dimensional port arrays, the size of the +// integer array or record of integer type shall exactly be the same as the dimension of +// the respective array, and its type shall allow storing the highest index (from all +// dimensions) of the array. + +module NegSem_220203_TriggerOperation_020 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p[3][2][3]; + } + + testcase TC_NegSem_220203_TriggerOperation_020() runs on GeneralComp { + var integer v_indices[2]; + p[0][1][2].send(100); + any from p.trigger(integer:?) -> @index value v_indices; + setverdict(pass); + } + + control { + execute(TC_NegSem_220203_TriggerOperation_020(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/NegSem_220203_TriggerOperation_021.ttcn b/ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/NegSem_220203_TriggerOperation_021.ttcn new file mode 100644 index 00000000..36d1f356 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/NegSem_220203_TriggerOperation_021.ttcn @@ -0,0 +1,34 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:22.2.3, insufficient element value range of variable in index redirection + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// If the index redirection is used for multi-dimensional port arrays, the size of the +// integer array or record of integer type shall exactly be the same as the dimension of +// the respective array, and its type shall allow storing the highest index (from all +// dimensions) of the array. + +module NegSem_220203_TriggerOperation_021 { + type integer RestrInt(0..2); + type port P message { + inout integer; + } + + type component GeneralComp { + port P p[4][2][3]; + } + + testcase TC_NegSem_220203_TriggerOperation_021() runs on GeneralComp { + var RestrInt v_indices[3]; + p[3][1][2].send(100); + any from p.trigger(integer:?) -> @index value v_indices; + setverdict(pass); + } + + control { + execute(TC_NegSem_220203_TriggerOperation_021(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/NegSem_220203_TriggerOperation_022.ttcn b/ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/NegSem_220203_TriggerOperation_022.ttcn new file mode 100644 index 00000000..02159791 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/NegSem_220203_TriggerOperation_022.ttcn @@ -0,0 +1,38 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:22.2.3, incompatible from and sender clause + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// If the trigger operation contains both from and sender clause, the variable or parameter +// referenced in the sender clause shall be type compatible with the template in the from +// clause. + +module NegSem_220203_TriggerOperation_022 { + + type integer address; + + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + testcase TC_NegSem_220203_TriggerOperation_022() runs on GeneralComp { + var address v_addr; + p.send(100); + alt { + [] p.trigger(integer:?) from GeneralComp:? -> sender v_addr { } + [else] {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_220203_TriggerOperation_022(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/NegSem_220203_TriggerOperation_023.ttcn b/ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/NegSem_220203_TriggerOperation_023.ttcn new file mode 100644 index 00000000..565b74c4 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/NegSem_220203_TriggerOperation_023.ttcn @@ -0,0 +1,49 @@ +/***************************************************************** + ** @author STF 487 (updated by STF 521) + ** @version 0.0.2 + ** @purpose 1:22.2.3, incompatible decmatch and @decoded value redirect + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// When assigning implicitly decoded message fields (by using the @decoded modifier) in +// cases where the value or template to be matched uses the MatchDecodedContent (decmatch) +// matching for the field to be stored, the type of the template in the MatchDecodedContent +// matching shall be type-compatible to the type of the variable the decoded field is stored into. + +module NegSem_220203_TriggerOperation_023 { + + type record R { + integer id, + octetstring payload + } + + type record Wrapped { + integer num + } + + type port P message { + inout R; + } + + type component GeneralComp { + port P p; + } + + testcase TC_NegSem_220203_TriggerOperation_023() runs on GeneralComp { + var Wrapped v_res; + var R v_rec := { id := 0, payload := bit2oct(encvalue(5)) }; + timer t_tmr := 1.0; + t_tmr.start; + p.send(v_rec); + alt { + [] p.trigger(R:{ id := ?, payload := decmatch integer:? }) -> value (v_res := @decoded payload) {} + [] t_tmr.timeout {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_220203_TriggerOperation_023(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/NegSem_220203_TriggerOperation_024.ttcn b/ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/NegSem_220203_TriggerOperation_024.ttcn new file mode 100644 index 00000000..adfd02ff --- /dev/null +++ b/ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/NegSem_220203_TriggerOperation_024.ttcn @@ -0,0 +1,44 @@ +/***************************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:22.2.3, trying to store an incompatible component value in the sender clause of a trigger operation + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// Type mismatch at storing the received value or parts of the received value and storing +// the sender shall cause an error. + +module NegSem_220203_TriggerOperation_024 { + + type port P message { + inout integer; + } + + type component GeneralComp + { + port P p; + } + + type component CustomComp { + var integer vc_int; + } + + testcase TC_NegSem_220203_TriggerOperation_024() runs on GeneralComp system GeneralComp { + var CustomComp v_sender; + timer t_tmr := 0.1; + t_tmr.start; + connect(self:p, self:p); + p.send(10); + alt { + // this alternative shall be selected, but the assignment shall generate an error + [] p.trigger(integer:?) -> sender v_sender { } + [] t_tmr.timeout {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_220203_TriggerOperation_024(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/Sem_220203_TriggerOperation_001.ttcn b/ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/Sem_220203_TriggerOperation_001.ttcn new file mode 100644 index 00000000..a21daf22 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/Sem_220203_TriggerOperation_001.ttcn @@ -0,0 +1,47 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:22.2.3, Ensure that the IUT correctly handles message trigger operations + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +module Sem_220203_TriggerOperation_001 { + + + type port loopbackPort message { + inout integer + } + + +type component GeneralComp { + port loopbackPort messagePort +} + +testcase TC_Sem_220203_TriggerOperation_001() runs on GeneralComp { + + timer t_timeout := 1.0; + t_timeout.start; + + messagePort.send(2); + + alt { + [] messagePort.trigger(1) { //must remove message from queue + setverdict(fail); + } + [] messagePort.trigger(2) { //this alt is only selected if message not removed from the queue + setverdict(fail); + } + [] messagePort.trigger { + setverdict(fail); + } + [] t_timeout.timeout { + setverdict(pass); + } + } +} + +control{ + execute(TC_Sem_220203_TriggerOperation_001()); +} + +} diff --git a/ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/Sem_220203_TriggerOperation_002.ttcn b/ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/Sem_220203_TriggerOperation_002.ttcn new file mode 100644 index 00000000..dc2ead28 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/Sem_220203_TriggerOperation_002.ttcn @@ -0,0 +1,43 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:22.2.3, Ensure that the IUT correctly handles message trigger operations + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +module Sem_220203_TriggerOperation_002 { + + + type port loopbackPort message { + inout integer + } + + +type component GeneralComp { + port loopbackPort messagePort +} + +testcase TC_Sem_220203_TriggerOperation_002() runs on GeneralComp { + timer t_timeout:=5.0; + + messagePort.send(2); + t_timeout.start; + + alt { + [] messagePort.trigger { //must remove message from queue + setverdict(pass); + } + [] messagePort.trigger { //this alt is only selected if message not removed from the queue + setverdict(fail); + } + [] t_timeout.timeout { + setverdict(pass); + } + } +} + +control{ + execute(TC_Sem_220203_TriggerOperation_002()); +} + +} diff --git a/ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/Sem_220203_TriggerOperation_003.ttcn b/ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/Sem_220203_TriggerOperation_003.ttcn new file mode 100644 index 00000000..819b0501 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/Sem_220203_TriggerOperation_003.ttcn @@ -0,0 +1,49 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:22.2.3, Ensure that the IUT correctly handles message trigger operations + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +module Sem_220203_TriggerOperation_003 { + + + type port loopbackPort message { + inout integer + } + + +type component GeneralComp { + port loopbackPort messagePort +} + +testcase TC_Sem_220203_TriggerOperation_003() runs on GeneralComp { + var integer v_received:=0; + timer t_timeout:=5.0; + + messagePort.send(2); + t_timeout.start; + + alt { + [] messagePort.trigger(integer:?) -> value v_received { + if(v_received==2) { //check that correct value has been stored + setverdict(pass); + } + else { + setverdict(fail); + } + } + [] messagePort.receive { + setverdict(fail); + } + [] t_timeout.timeout { + setverdict(pass); + } + } +} + +control{ + execute(TC_Sem_220203_TriggerOperation_003()); +} + +} diff --git a/ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/Sem_220203_TriggerOperation_004.ttcn b/ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/Sem_220203_TriggerOperation_004.ttcn new file mode 100644 index 00000000..55bae82c --- /dev/null +++ b/ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/Sem_220203_TriggerOperation_004.ttcn @@ -0,0 +1,59 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:22.2.3, Ensure that the IUT correctly handles message trigger operations + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +module Sem_220203_TriggerOperation_004 { + + type charstring address; + + type port loopbackPort message { + inout integer + } + + +type component GeneralComp { + port loopbackPort messagePort +} + + const address c_address := "Tester"; + +testcase TC_Sem_220203_TriggerOperation_004() runs on GeneralComp { + var address v_sender; + timer t_timeout:=5.0; + + + messagePort.send(2) to c_address; + t_timeout.start; + + alt { + [] messagePort.trigger(2) -> sender v_sender { + messagePort.send(5) to v_sender; + alt { + [] messagePort.trigger(5) from v_sender { //check that correct sender address has been assigned + setverdict(pass); + } + [] messagePort.receive { + setverdict(fail); + } + [] t_timeout.timeout { + setverdict(fail); + } + } + } + [] messagePort.trigger { + setverdict(fail); + } + [] t_timeout.timeout { + setverdict(fail); + } + } +} + +control{ + execute(TC_Sem_220203_TriggerOperation_004()); +} + +} diff --git a/ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/Sem_220203_TriggerOperation_005.ttcn b/ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/Sem_220203_TriggerOperation_005.ttcn new file mode 100644 index 00000000..8d4fc52c --- /dev/null +++ b/ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/Sem_220203_TriggerOperation_005.ttcn @@ -0,0 +1,42 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:22.2.3, Ensure that the IUT correctly handles message trigger operations + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +module Sem_220203_TriggerOperation_005 { + + + type port loopbackPort message { + inout integer + } + +type component GeneralComp { + port loopbackPort messagePort +} + +testcase TC_Sem_220203_TriggerOperation_005() runs on GeneralComp { + timer t_timeout:=5.0; + + messagePort.send(2); + t_timeout.start; + + alt { + [] any port.trigger(2) { //checks trigger from any port + setverdict(pass); + } + [] messagePort.trigger { //this alt is only selected if message was not removed from the queue + setverdict(fail); + } + [] t_timeout.timeout { + setverdict(fail); + } + } +} + +control{ + execute(TC_Sem_220203_TriggerOperation_005()); +} + +} diff --git a/ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/Sem_220203_TriggerOperation_006.ttcn b/ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/Sem_220203_TriggerOperation_006.ttcn new file mode 100644 index 00000000..d2c4101c --- /dev/null +++ b/ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/Sem_220203_TriggerOperation_006.ttcn @@ -0,0 +1,52 @@ +/***************************************************************** + ** @author STF 487 (updated by STF 521) + ** @version 0.0.2 + ** @purpose 1:22.2.3, trigger with a from clause (single item) + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirements are tested: +// In the case of one-to-many connections the trigger operation may be restricted +// to a certain communication partner. This restriction shall be denoted using the +// from keyword followed by a specification of an address or component reference, +// a list of address or component references or any component. + +module Sem_220203_TriggerOperation_006 { + + type port P message { + inout integer; + } + + type component GeneralComp + { + port P p; + } + + function f(integer i) runs on GeneralComp + { + p.send(i); + } + + const integer c_ptcCount := 3; + + testcase TC_Sem_220203_TriggerOperation_006() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptcs[c_ptcCount]; + var integer v_int; + for (var integer i := 0; i < c_ptcCount; i := i + 1) { + v_ptcs[i] := GeneralComp.create; + connect(self:p, v_ptcs[i]:p); + v_ptcs[i].start(f(i)); + } + + alt { + [] p.trigger(integer:?) from v_ptcs[c_ptcCount - 1] -> value v_int { + if (v_int == c_ptcCount - 1) { setverdict(pass); } + else { setverdict(fail) }; + } + } + } + + control { + execute(TC_Sem_220203_TriggerOperation_006(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/Sem_220203_TriggerOperation_007.ttcn b/ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/Sem_220203_TriggerOperation_007.ttcn new file mode 100644 index 00000000..252bd999 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/Sem_220203_TriggerOperation_007.ttcn @@ -0,0 +1,52 @@ +/***************************************************************** + ** @author STF 487 (updated by STF 521) + ** @version 0.0.2 + ** @purpose 1:22.2.3, trigger with a from clause (multiple items) + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirements are tested: +// In the case of one-to-many connections the trigger operation may be restricted +// to a certain communication partner. This restriction shall be denoted using the +// from keyword followed by a specification of an address or component reference, +// a list of address or component references or any component. + +module Sem_220203_TriggerOperation_007 { + + type port P message { + inout integer; + } + + type component GeneralComp + { + port P p; + } + + function f(integer i) runs on GeneralComp + { + p.send(i); + } + + const integer c_ptcCount := 3; + + testcase TC_Sem_220203_TriggerOperation_007() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptcs[c_ptcCount]; + var integer v_int; + for (var integer i := 0; i < c_ptcCount; i := i + 1) { + v_ptcs[i] := GeneralComp.create; + connect(self:p, v_ptcs[i]:p); + v_ptcs[i].start(f(i)); + } + + alt { + [] p.trigger(integer:?) from (v_ptcs[c_ptcCount - 2], v_ptcs[c_ptcCount - 1]) -> value v_int { + if (v_int == c_ptcCount - 2 or v_int == c_ptcCount - 1) { setverdict(pass); } + else { setverdict(fail) }; + } + } + } + + control { + execute(TC_Sem_220203_TriggerOperation_007(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/Sem_220203_TriggerOperation_008.ttcn b/ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/Sem_220203_TriggerOperation_008.ttcn new file mode 100644 index 00000000..5fa85a86 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/Sem_220203_TriggerOperation_008.ttcn @@ -0,0 +1,50 @@ +/***************************************************************** + ** @author STF 487 (updated by STF 521) + ** @version 0.0.2 + ** @purpose 1:22.2.3, trigger with a from clause (any component) + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirements are tested: +// In the case of one-to-many connections the trigger operation may be restricted +// to a certain communication partner. This restriction shall be denoted using the +// from keyword followed by a specification of an address or component reference, +// a list of address or component references or any component. + +module Sem_220203_TriggerOperation_008 { + + type port P message { + inout integer; + } + + type component GeneralComp + { + port P p; + } + + function f() runs on GeneralComp + { + p.send(1); + } + + const integer c_ptcCount := 3; + + testcase TC_Sem_220203_TriggerOperation_008() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptcs[c_ptcCount]; + for (var integer i := 0; i < c_ptcCount; i := i + 1) { + v_ptcs[i] := GeneralComp.create; + connect(self:p, v_ptcs[i]:p); + v_ptcs[i].start(f()); + } + + for (var integer i := 0; i < c_ptcCount; i := i + 1) { + alt { + [] p.trigger(integer:?) from any component { setverdict(pass); } + } + } + } + + control { + execute(TC_Sem_220203_TriggerOperation_008(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/Sem_220203_TriggerOperation_009.ttcn b/ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/Sem_220203_TriggerOperation_009.ttcn new file mode 100644 index 00000000..9e1a94dd --- /dev/null +++ b/ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/Sem_220203_TriggerOperation_009.ttcn @@ -0,0 +1,48 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:22.2.3, redirect assignment of message fields + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirements are tested: +// Rules in clause 22.2.2 shall apply. +// When the keyword value is followed by an assignment list enframed by a pair of +// parentheses, the whole received message and/or one or more parts of it can be +// stored. In a single assignment within the list, on the right hand side of the +// assignment symbol (":=") a field of the template type shall be referenced, on +// the left hand side the name of the variable or a formal parameter, in which +// the value shall be stored. + +module Sem_220203_TriggerOperation_009 { + type record R + { + integer field1[2], + charstring field2 + } + + type port P message { + inout R; + } + + type component GeneralComp + { + port P p; + } + + testcase TC_Sem_220203_TriggerOperation_009() runs on GeneralComp { + var integer v_int; + var charstring v_str; + p.send(R:{ field1 := { 1, 2 }, field2 := "abc" }); + alt { + [] p.trigger(R:?) -> value ( v_int := field1[1], v_str := field2) { + if (v_int == 2 and v_str == "abc") { setverdict (pass); } + else { setverdict(fail); } + } + } + } + + control { + execute(TC_Sem_220203_TriggerOperation_009(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/Sem_220203_TriggerOperation_010.ttcn b/ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/Sem_220203_TriggerOperation_010.ttcn new file mode 100644 index 00000000..edb349b2 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/Sem_220203_TriggerOperation_010.ttcn @@ -0,0 +1,45 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:22.2.3, redirect assignment of message fields + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirements are tested: +// Rules in clause 22.2.2 shall apply. +// As a special case the field reference can be absent to indicate that the whole +// message shall be stored in a variable. + +module Sem_220203_TriggerOperation_010 { + type record R + { + integer field1[2], + charstring field2 + } + + type port P message { + inout R; + } + + type component GeneralComp + { + port P p; + } + + testcase TC_Sem_220203_TriggerOperation_010() runs on GeneralComp { + var integer v_int; + var charstring v_str; + var R v_rec; + p.send(R:{ field1 := { 1, 2 }, field2 := "abc" }); + alt { + [] p.trigger(R:?) -> value ( v_int := field1[1], v_rec, v_str := field2) { + if (v_int == 2 and v_str == "abc" and v_rec == { field1 := { 1, 2 }, field2 := "abc" }) { setverdict (pass); } + else { setverdict(fail); } + } + } + } + + control { + execute(TC_Sem_220203_TriggerOperation_010(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/Sem_220203_TriggerOperation_011.ttcn b/ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/Sem_220203_TriggerOperation_011.ttcn new file mode 100644 index 00000000..8197fac0 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/Sem_220203_TriggerOperation_011.ttcn @@ -0,0 +1,48 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:22.2.3, @decoded redirect assignment of a bitstring field + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirements are tested: +// Rules in clause 22.2.2 shall apply. +// When assigning individual fields of a message, encoded payload fields can be +// decoded prior to assignment using the @decoded modifier. In this case, the +// referenced field on the right hand sided of the assignment shall be one of the +// bitstring, hexstring, octetstring, charstring or universal charstring types. It +// shall be decoded into a value of the same type as the variable on the left hand +// side of the assignment. + +module Sem_220203_TriggerOperation_011 { + type record R + { + integer id, + bitstring payload + } + + type port P message { + inout R; + } + + type component GeneralComp + { + port P p; + } + + testcase TC_Sem_220203_TriggerOperation_011() runs on GeneralComp { + var charstring v_src := "abc", v_res; + var bitstring v_bs := encvalue(v_src); + p.send(R:{ id := 1, payload := v_bs }); + alt { + [] p.trigger(R:?) -> value (v_res := @decoded payload) { + if (v_res == "abc") { setverdict (pass); } + else { setverdict(fail); } + } + } + } + + control { + execute(TC_Sem_220203_TriggerOperation_011(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/Sem_220203_TriggerOperation_012.ttcn b/ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/Sem_220203_TriggerOperation_012.ttcn new file mode 100644 index 00000000..60b0c84d --- /dev/null +++ b/ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/Sem_220203_TriggerOperation_012.ttcn @@ -0,0 +1,48 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:22.2.3, @decoded redirect assignment of a hexstring field + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirements are tested: +// Rules in clause 22.2.2 shall apply. +// When assigning individual fields of a message, encoded payload fields can be +// decoded prior to assignment using the @decoded modifier. In this case, the +// referenced field on the right hand sided of the assignment shall be one of the +// bitstring, hexstring, octetstring, charstring or universal charstring types. It +// shall be decoded into a value of the same type as the variable on the left hand +// side of the assignment. + +module Sem_220203_TriggerOperation_012 { + type record R + { + integer id, + hexstring payload + } + + type port P message { + inout R; + } + + type component GeneralComp + { + port P p; + } + + testcase TC_Sem_220203_TriggerOperation_012() runs on GeneralComp { + var charstring v_src := "abc", v_res; + var hexstring v_hs := bit2hex(encvalue(v_src)); + p.send(R:{ id := 1, payload := v_hs }); + alt { + [] p.trigger(R:?) -> value (v_res := @decoded payload) { + if (v_res == "abc") { setverdict (pass); } + else { setverdict(fail); } + } + } + } + + control { + execute(TC_Sem_220203_TriggerOperation_012(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/Sem_220203_TriggerOperation_013.ttcn b/ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/Sem_220203_TriggerOperation_013.ttcn new file mode 100644 index 00000000..874605af --- /dev/null +++ b/ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/Sem_220203_TriggerOperation_013.ttcn @@ -0,0 +1,48 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:22.2.3, @decoded redirect assignment of an octetstring field + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirements are tested: +// Rules in clause 22.2.2 shall apply. +// When assigning individual fields of a message, encoded payload fields can be +// decoded prior to assignment using the @decoded modifier. In this case, the +// referenced field on the right hand sided of the assignment shall be one of the +// bitstring, hexstring, octetstring, charstring or universal charstring types. It +// shall be decoded into a value of the same type as the variable on the left hand +// side of the assignment. + +module Sem_220203_TriggerOperation_013 { + type record R + { + integer id, + octetstring payload + } + + type port P message { + inout R; + } + + type component GeneralComp + { + port P p; + } + + testcase TC_Sem_220203_TriggerOperation_013() runs on GeneralComp { + var charstring v_src := "abc", v_res; + var octetstring v_os := bit2oct(encvalue(v_src)); + p.send(R:{ id := 1, payload := v_os }); + alt { + [] p.trigger(R:?) -> value (v_res := @decoded payload) { + if (v_res == "abc") { setverdict (pass); } + else { setverdict(fail); } + } + } + } + + control { + execute(TC_Sem_220203_TriggerOperation_013(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/Sem_220203_TriggerOperation_014.ttcn b/ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/Sem_220203_TriggerOperation_014.ttcn new file mode 100644 index 00000000..0f55d568 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/Sem_220203_TriggerOperation_014.ttcn @@ -0,0 +1,48 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:22.2.3, @decoded redirect assignment of a charstring field + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirements are tested: +// Rules in clause 22.2.2 shall apply. +// When assigning individual fields of a message, encoded payload fields can be +// decoded prior to assignment using the @decoded modifier. In this case, the +// referenced field on the right hand sided of the assignment shall be one of the +// bitstring, hexstring, octetstring, charstring or universal charstring types. It +// shall be decoded into a value of the same type as the variable on the left hand +// side of the assignment. + +module Sem_220203_TriggerOperation_014 { + type record R + { + integer id, + charstring payload + } + + type port P message { + inout R; + } + + type component GeneralComp + { + port P p; + } + + testcase TC_Sem_220203_TriggerOperation_014() runs on GeneralComp { + var integer v_src := 1953719668, v_res with { encode "32bit" }; + var charstring v_str := encvalue_unichar(v_src); + p.send(R:{ id := 1, payload := v_str }); + alt { + [] p.trigger(R:?) -> value (v_res := @decoded payload) { + if (v_res == 1953719668) { setverdict (pass); } + else { setverdict(fail); } + } + } + } + + control { + execute(TC_Sem_220203_TriggerOperation_014(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/Sem_220203_TriggerOperation_015.ttcn b/ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/Sem_220203_TriggerOperation_015.ttcn new file mode 100644 index 00000000..dd81033d --- /dev/null +++ b/ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/Sem_220203_TriggerOperation_015.ttcn @@ -0,0 +1,48 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:22.2.3, @decoded redirect assignment of a universal charstring field + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirements are tested: +// Rules in clause 22.2.2 shall apply. +// When assigning individual fields of a message, encoded payload fields can be +// decoded prior to assignment using the @decoded modifier. In this case, the +// referenced field on the right hand sided of the assignment shall be one of the +// bitstring, hexstring, octetstring, charstring or universal charstring types. It +// shall be decoded into a value of the same type as the variable on the left hand +// side of the assignment. + +module Sem_220203_TriggerOperation_015 { + type record R + { + integer id, + universal charstring payload + } + + type port P message { + inout R; + } + + type component GeneralComp + { + port P p; + } + + testcase TC_Sem_220203_TriggerOperation_015() runs on GeneralComp { + var integer v_src := 1953719668, v_res with { encode "32bit" }; + var universal charstring v_str := encvalue_unichar(v_src); + p.send(R:{ id := 1, payload := v_str }); + alt { + [] p.trigger(R:?) -> value (v_res := @decoded payload) { + if (v_res == 1953719668) { setverdict (pass); } + else { setverdict(fail); } + } + } + } + + control { + execute(TC_Sem_220203_TriggerOperation_015(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/Sem_220203_TriggerOperation_016.ttcn b/ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/Sem_220203_TriggerOperation_016.ttcn new file mode 100644 index 00000000..3ed8e862 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/Sem_220203_TriggerOperation_016.ttcn @@ -0,0 +1,46 @@ +/***************************************************************** + ** @author STF 487 (updated by STF 521) + ** @version 0.0.2 + ** @purpose 1:22.2.3, @decoded redirect assignment with encoding parameter + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirements are tested: +// Rules in clause 22.2.2 shall apply. +// In case the referenced field is of the universal charstring type, the @decoded +// clause can contain an optional parameter defining the encoding format. The +// parameter shall be of the charstring type and it shall contain one of the +// strings allowed for the decvalue_unichar function (specified in clause C.5.4). + +module Sem_220203_TriggerOperation_016 { + type record R + { + integer id, + universal charstring payload + } + + type port P message { + inout R; + } + + type component GeneralComp + { + port P p; + } + + testcase TC_Sem_220203_TriggerOperation_016() runs on GeneralComp { + var integer v_src := 1953719668, v_res with { variant "32 bit" }; + var universal charstring v_str := encvalue_unichar(v_src, "UTF-16LE"); + p.send(R:{ id := 1, payload := v_str }); + alt { + [] p.trigger(R:?) -> value (v_res := @decoded("UTF-16LE") payload) { + if (v_res == 1953719668) { setverdict (pass); } + else { setverdict(fail); } + } + } + } + + control { + execute(TC_Sem_220203_TriggerOperation_016(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/Sem_220203_TriggerOperation_017.ttcn b/ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/Sem_220203_TriggerOperation_017.ttcn new file mode 100644 index 00000000..2cf5d03f --- /dev/null +++ b/ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/Sem_220203_TriggerOperation_017.ttcn @@ -0,0 +1,36 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:22.2.3, redirect assignment storing a component + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirements are tested: +// Rules in clause 22.2.2 shall apply. +// It is also possible to retrieve and store the component reference or address of +// the sender of a message. This is denoted by the keyword sender. + +module Sem_220203_TriggerOperation_017 { + + type port P message { + inout integer; + } + + type component GeneralComp + { + port P p; + } + + testcase TC_Sem_220203_TriggerOperation_017() runs on GeneralComp system GeneralComp { + var GeneralComp v_tc := null; + connect(self:p, self:p); + p.send(10); + p.trigger(integer:?) -> sender v_tc; + if (v_tc == self) { setverdict(pass); } + else { setverdict(fail); } + } + + control { + execute(TC_Sem_220203_TriggerOperation_017(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/Sem_220203_TriggerOperation_018.ttcn b/ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/Sem_220203_TriggerOperation_018.ttcn new file mode 100644 index 00000000..a529e1a7 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/Sem_220203_TriggerOperation_018.ttcn @@ -0,0 +1,35 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:22.2.3, redirect assignment storing an address + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirements are tested: +// It is also possible to retrieve and store the component reference or address of +// the sender of a message. This is denoted by the keyword sender. + +module Sem_220203_TriggerOperation_018 { + + type port P message { + inout integer; + address integer; + } + + type component GeneralComp + { + port P p; + } + + testcase TC_Sem_220203_TriggerOperation_018() runs on GeneralComp { + var P.address v_addr := null; + p.send(10) to 5; + p.trigger(integer:?) -> sender v_addr; + if (v_addr == 5) { setverdict(pass); } + else { setverdict(fail); } + } + + control { + execute(TC_Sem_220203_TriggerOperation_018(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/Sem_220203_TriggerOperation_019.ttcn b/ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/Sem_220203_TriggerOperation_019.ttcn new file mode 100644 index 00000000..0d144736 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/Sem_220203_TriggerOperation_019.ttcn @@ -0,0 +1,37 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:22.2.3, any from port.trigger statement + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirements are tested: +// To trigger on a message at any port from a specific port array, use the any from +// PortArrayRef syntax where PortArrayRef shall be a reference to a port array +// identifier. + +module Sem_220203_TriggerOperation_019 { + + type port P message { + inout integer; + } + + type component GeneralComp + { + port P p [3]; + port P altP; + } + + testcase TC_Sem_220203_TriggerOperation_019() runs on GeneralComp { + p[2].send(10); + altP.send(1); + alt { + [] any from p.trigger(integer:?) { setverdict(pass); } + [] any port.receive { setverdict(fail); } + } + } + + control { + execute(TC_Sem_220203_TriggerOperation_019(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/Sem_220203_TriggerOperation_020.ttcn b/ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/Sem_220203_TriggerOperation_020.ttcn new file mode 100644 index 00000000..6babff43 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/Sem_220203_TriggerOperation_020.ttcn @@ -0,0 +1,48 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:22.2.3, single dimensional index redirect in any from port.trigger statement + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirements are tested: +// It is also possible to store the index of a port in a single-dimensional port array +// at which the operation was successful to a variable of type integer or, in case of +// multi-dimensional port arrays the index of the successful port to an integer array +// or record of integer variable. When checking the port array for matching messages, +// the port indices to be checked are iterated from lowest to highest. If the port +// array is multi-dimensional, then the ports are iterated over from innermost to +// outermost array dimension from lowest to highest index for each dimension, e.g. +// [0][0], [0][1], [1][0], [1][1]. The first port which matches all the criteria will +// cause the operation to be successful even if other ports in the array would also +// meet the criteria. + +module Sem_220203_TriggerOperation_020 { + + type port P message { + inout integer; + } + + type component GeneralComp + { + port P p [3]; + port P altP; + } + + testcase TC_Sem_220203_TriggerOperation_020() runs on GeneralComp { + var integer v_index; + p[2].send(10); + altP.send(1); + alt { + [] any from p.trigger(integer:?) -> @index value v_index { + if (v_index == 2) { setverdict(pass); } + else { setverdict(fail); } + } + [] any port.receive { setverdict(fail); } + } + } + + control { + execute(TC_Sem_220203_TriggerOperation_020(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/Sem_220203_TriggerOperation_021.ttcn b/ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/Sem_220203_TriggerOperation_021.ttcn new file mode 100644 index 00000000..e68891f7 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/Sem_220203_TriggerOperation_021.ttcn @@ -0,0 +1,50 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:22.2.3, multidimensional index redirect in any from port.trigger statement + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirements are tested: +// It is also possible to store the index of a port in a single-dimensional port array +// at which the operation was successful to a variable of type integer or, in case of +// multi-dimensional port arrays the index of the successful port to an integer array +// or record of integer variable. When checking the port array for matching messages, +// the port indices to be checked are iterated from lowest to highest. If the port +// array is multi-dimensional, then the ports are iterated over from innermost to +// outermost array dimension from lowest to highest index for each dimension, e.g. +// [0][0], [0][1], [1][0], [1][1]. The first port which matches all the criteria will +// cause the operation to be successful even if other ports in the array would also +// meet the criteria. + +module Sem_220203_TriggerOperation_021 { + + type port P message { + inout integer; + } + + type component GeneralComp + { + port P p [2][3]; + port P altP; + } + + type record of integer RoI; + + testcase TC_Sem_220203_TriggerOperation_021() runs on GeneralComp { + var RoI v_index; + p[0][2].send(10); + altP.send(1); + alt { + [] any from p.trigger(integer:?) -> @index value v_index { + if (v_index == { 0, 2 }) { setverdict(pass); } + else { setverdict(fail, "v_index: ", v_index); } + } + [] any port.receive { setverdict(fail); } + } + } + + control { + execute(TC_Sem_220203_TriggerOperation_021(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/Sem_220203_TriggerOperation_022.ttcn b/ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/Sem_220203_TriggerOperation_022.ttcn new file mode 100644 index 00000000..d5e9ba4b --- /dev/null +++ b/ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/Sem_220203_TriggerOperation_022.ttcn @@ -0,0 +1,41 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:22.2.3, standalone trigger as a shorthand for alt statement + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirements are tested: +// The trigger operation can be used as a stand-alone statement in a behaviour description. +// In this latter case the receive operation is considered to be shorthand for an alt +// statement with two alternatives (one alternative expecting the message and another +// alternative consuming all other messages and repeating the alt statement, see +// ES 201 873 4 [1]). + +module Sem_220203_TriggerOperation_022 { + + type port P message { + inout integer; + } + + type component GeneralComp + { + port P p1, p2; + } + + altstep a() runs on GeneralComp { + [] p2.receive(integer:?) { setverdict(pass); } + } + + testcase TC_Sem_220203_TriggerOperation_022() runs on GeneralComp { + activate(a()); // defaults should be processed as a part of alt + p1.send(1); + p2.send(2); + p1.trigger(integer:(10..20)); // no match here, but because the statement is actually an alt statement, + // the default shall be automatically exectuted and accept the message + } + + control { + execute(TC_Sem_220203_TriggerOperation_022(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/Sem_220203_TriggerOperation_023.ttcn b/ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/Sem_220203_TriggerOperation_023.ttcn new file mode 100644 index 00000000..be12e422 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/Sem_220203_TriggerOperation_023.ttcn @@ -0,0 +1,42 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:22.2.3, lazy variable in value redirect + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirements are tested: +// If a variable referenced in the value, sender or @index clause is a lazy or fuzzy +// variable, the expression assigned to this variable is equal to the result produced +// by the trigger operation i.e. later evaluation of the lazy or fuzzy variable does not +// lead to repeated invocation of the trigger operation. + +module Sem_220203_TriggerOperation_023 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + testcase TC_Sem_220203_TriggerOperation_023() runs on GeneralComp { + var @lazy integer v_int; + p.send(1); + p.send(2); + p.send(3); + p.trigger(integer:?) -> value v_int; + if (v_int == 1) { // evaluation of @lazy (receive shall not be called again) + alt { + [] p.receive(integer:2) { setverdict(pass); } + [] p.receive { setverdict(fail); } + } + } else { + setverdict(fail); + } + } + + control { + execute(TC_Sem_220203_TriggerOperation_023(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/Sem_220203_TriggerOperation_024.ttcn b/ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/Sem_220203_TriggerOperation_024.ttcn new file mode 100644 index 00000000..8c14e59b --- /dev/null +++ b/ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/Sem_220203_TriggerOperation_024.ttcn @@ -0,0 +1,44 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:22.2.3, lazy variable in sender redirect + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirements are tested: +// If a variable referenced in the value, sender or @index clause is a lazy or fuzzy +// variable, the expression assigned to this variable is equal to the result produced +// by the trigger operation i.e. later evaluation of the lazy or fuzzy variable does not +// lead to repeated invocation of the trigger operation. + +module Sem_220203_TriggerOperation_024 { + type integer address; + + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + testcase TC_Sem_220203_TriggerOperation_024() runs on GeneralComp { + var @lazy address v_addr; + p.send(1) to 1; + p.send(2) to 2; + p.send(3) to 3; + p.trigger(integer:?) -> sender v_addr; + if (v_addr == 1) { // evaluation of @lazy (receive shall not be called again) + alt { + [] p.receive(integer:2) { setverdict(pass); } + [] p.receive { setverdict(fail); } + } + } else { + setverdict(fail); + } + } + + control { + execute(TC_Sem_220203_TriggerOperation_024(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/Sem_220203_TriggerOperation_025.ttcn b/ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/Sem_220203_TriggerOperation_025.ttcn new file mode 100644 index 00000000..9401a2bb --- /dev/null +++ b/ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/Sem_220203_TriggerOperation_025.ttcn @@ -0,0 +1,42 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:22.2.3, lazy variable in index redirect + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirements are tested: +// If a variable referenced in the value, sender or @index clause is a lazy or fuzzy +// variable, the expression assigned to this variable is equal to the result produced +// by the trigger operation i.e. later evaluation of the lazy or fuzzy variable does not +// lead to repeated invocation of the trigger operation. + +module Sem_220203_TriggerOperation_025 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p[2]; + } + + testcase TC_Sem_220203_TriggerOperation_025() runs on GeneralComp { + var @lazy integer v_int; + p[1].send(1); + p[1].send(2); + p[1].send(3); + any from p.trigger(integer:?) -> @index value v_int; + if (v_int == 1) { // evaluation of @lazy (receive shall not be called again) + alt { + [] p[1].receive(integer:2) { setverdict(pass); } + [] any from p.receive { setverdict(fail); } + } + } else { + setverdict(fail); + } + } + + control { + execute(TC_Sem_220203_TriggerOperation_025(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/Sem_220203_TriggerOperation_026.ttcn b/ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/Sem_220203_TriggerOperation_026.ttcn new file mode 100644 index 00000000..995a5a07 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/Sem_220203_TriggerOperation_026.ttcn @@ -0,0 +1,42 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:22.2.3, fuzzy variable in value redirect + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirements are tested: +// If a variable referenced in the value, sender or @index clause is a lazy or fuzzy +// variable, the expression assigned to this variable is equal to the result produced +// by the trigger operation i.e. later evaluation of the lazy or fuzzy variable does not +// lead to repeated invocation of the trigger operation. + +module Sem_220203_TriggerOperation_026 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + testcase TC_Sem_220203_TriggerOperation_026() runs on GeneralComp { + var @fuzzy integer v_int; + p.send(1); + p.send(2); + p.send(3); + p.trigger(integer:?) -> value v_int; + if (v_int == 1) { // evaluation of @lazy (receive shall not be called again) + alt { + [] p.receive(integer:2) { setverdict(pass); } + [] p.receive { setverdict(fail); } + } + } else { + setverdict(fail); + } + } + + control { + execute(TC_Sem_220203_TriggerOperation_026(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/Sem_220203_TriggerOperation_027.ttcn b/ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/Sem_220203_TriggerOperation_027.ttcn new file mode 100644 index 00000000..d2f4a9a1 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/Sem_220203_TriggerOperation_027.ttcn @@ -0,0 +1,44 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:22.2.3, fuzzy variable in sender redirect + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirements are tested: +// If a variable referenced in the value, sender or @index clause is a lazy or fuzzy +// variable, the expression assigned to this variable is equal to the result produced +// by the trigger operation i.e. later evaluation of the lazy or fuzzy variable does not +// lead to repeated invocation of the trigger operation. + +module Sem_220203_TriggerOperation_027 { + type integer address; + + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + testcase TC_Sem_220203_TriggerOperation_027() runs on GeneralComp { + var @fuzzy address v_addr; + p.send(1) to 1; + p.send(2) to 2; + p.send(3) to 3; + p.trigger(integer:?) -> sender v_addr; + if (v_addr == 1) { // evaluation of @lazy (receive shall not be called again) + alt { + [] p.receive(integer:2) { setverdict(pass); } + [] p.receive { setverdict(fail); } + } + } else { + setverdict(fail); + } + } + + control { + execute(TC_Sem_220203_TriggerOperation_027(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/Sem_220203_TriggerOperation_028.ttcn b/ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/Sem_220203_TriggerOperation_028.ttcn new file mode 100644 index 00000000..3c94d09a --- /dev/null +++ b/ATS/core_language/22_communication_operations/2202_message_based_communication/220203_trigger_operation/Sem_220203_TriggerOperation_028.ttcn @@ -0,0 +1,42 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:22.2.3, fuzzy variable in @index redirect + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirements are tested: +// If a variable referenced in the value, sender or @index clause is a lazy or fuzzy +// variable, the expression assigned to this variable is equal to the result produced +// by the trigger operation i.e. later evaluation of the lazy or fuzzy variable does not +// lead to repeated invocation of the trigger operation. + +module Sem_220203_TriggerOperation_028 { + type port P message { + inout integer; + } + + type component GeneralComp { + port P p[2]; + } + + testcase TC_Sem_220203_TriggerOperation_028() runs on GeneralComp { + var @fuzzy integer v_int; + p[1].send(1); + p[1].send(2); + p[1].send(3); + any from p.trigger(integer:?) -> @index value v_int; + if (v_int == 1) { // evaluation of @lazy (receive shall not be called again) + alt { + [] p[1].receive(integer:2) { setverdict(pass); } + [] any from p.receive { setverdict(fail); } + } + } else { + setverdict(fail); + } + } + + control { + execute(TC_Sem_220203_TriggerOperation_028(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSem_220301_CallOperation_001.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSem_220301_CallOperation_001.ttcn new file mode 100644 index 00000000..ddb371d4 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSem_220301_CallOperation_001.ttcn @@ -0,0 +1,38 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:22.3.1, Ensure that the IUT correctly handles procedure call operations + ** @verdict pass reject + ***************************************************/ + +module NegSem_220301_CallOperation_001 { + + + type port loopbackPort message { + inout integer + } + + + type component GeneralComp { + port loopbackPort messagePort + } + + testcase TC_NegSem_220301_CallOperation_001() runs on GeneralComp { + + messagePort.call(2); //cannot use call on a message based port + + alt { + [] messagePort.receive { + setverdict(pass); + } + [] messagePort.receive { + setverdict(fail); + } + } + } + + control{ + execute(TC_NegSem_220301_CallOperation_001()); + } + +} diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSem_220301_CallOperation_002.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSem_220301_CallOperation_002.ttcn new file mode 100644 index 00000000..7f335e97 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSem_220301_CallOperation_002.ttcn @@ -0,0 +1,121 @@ +/***************************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:22.3.1, Ensure that the IUT correctly procedure calls + ** @verdict pass reject + *****************************************************************/ + +module NegSem_220301_CallOperation_002 { + + /** + * @desc testing of inline return template for remote procedure call + * @param p_par1 only input parameter + * @param p_par2 must have value 4 at return + * @param p_par3 must have value 5 at return + * @return must return value 1 + */ + signature p_NegSem_220301_CallOperation_002(in integer p_par1, out integer p_par2, inout integer p_par3) return integer; + + template p_NegSem_220301_CallOperation_002 s_returnTemplate := { + p_par1 := -, + p_par2 := 4, + p_par3 := 5 + } + + template p_NegSem_220301_CallOperation_002 s_wrongTemplate := { + p_par1 := -, + p_par2 := 2, + p_par3 := 3 + } + + template p_NegSem_220301_CallOperation_002 s_callTemplate := { + p_par1 := 1, + p_par2 := -, + p_par3 := 3 + } + + type port remotePort procedure { + inout p_NegSem_220301_CallOperation_002; + } + + type component GeneralComp { + port remotePort PCO; + } + + function f_ClientQuery() runs on GeneralComp { + var integer v_zero:=0; + var integer v_one:=1; + + //nowait cannot be used in this construct with timeout checking + PCO.call(p_NegSem_220301_CallOperation_002:s_callTemplate, nowait) { + + [] PCO.getreply(p_NegSem_220301_CallOperation_002:s_wrongTemplate value 1) { + setverdict(fail); + } + [] PCO.getreply(p_NegSem_220301_CallOperation_002:s_returnTemplate value 2) { + setverdict(fail); + } + [] PCO.getreply(p_NegSem_220301_CallOperation_002:s_returnTemplate value 1) { + setverdict(pass); + } + [] PCO.catch (timeout) { + setverdict(fail); + } + } + } + + function f_ServerResponses() runs on GeneralComp { + + var integer v_par1; + var integer v_par3; + timer t_timeout:=30.0; + + template p_NegSem_220301_CallOperation_002 s_acceptTemplate := { + p_par1 := ?, + p_par2 := ?, + p_par3 := ? + }; + + + t_timeout.start; + + alt { + [] PCO.getcall(p_NegSem_220301_CallOperation_002:s_acceptTemplate) -> param(v_par1, - , v_par3) { + PCO.reply(p_NegSem_220301_CallOperation_002:{p_par1 := -, p_par2 := v_par1+v_par3, p_par3 := v_par1+v_par3+1} value v_par1); //procedure return values are sent + repeat; + } + [] t_timeout.timeout { + setverdict(fail); + } + } + + } + + + testcase TC_NegSem_220301_CallOperation_002() runs on GeneralComp system GeneralComp { + var GeneralComp server := GeneralComp.create("RemoteProcedure Service"); + var GeneralComp client := GeneralComp.create("RemoteProcedure Client"); + // map the PTCs to the system port + connect(server:PCO, client:PCO); + + server.start(f_ServerResponses()); + client.start(f_ClientQuery()); + + alt { + [] client.done { + server.stop; + } + } + + alt { + [] all component.done {} + } + + disconnect(server:PCO); + } + + control{ + execute(TC_NegSem_220301_CallOperation_002()); + } + +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSem_220301_CallOperation_003.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSem_220301_CallOperation_003.ttcn new file mode 100644 index 00000000..ec030aca --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSem_220301_CallOperation_003.ttcn @@ -0,0 +1,36 @@ +/***************************************************************** + ** @author STF 487 (updated by STF 521) + ** @version 0.0.2 + ** @purpose 1:22.3.1, null component in the to clause of the call operation + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// No AddressRef in the to clause shall contain the special value null at the time +// of the operation. + +module NegSem_220301_CallOperation_003 { + + signature S(); + + type port P procedure { + inout S; + } + + type component GeneralComp { + port P p; + } + + + testcase TC_NegSem_220301_CallOperation_003() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create("PTC"), v_compRef := null; + connect(self:p, v_ptc:p); + p.call(S:{}, nowait) to v_compRef; + setverdict(pass); + } + + control{ + execute(TC_NegSem_220301_CallOperation_003(), 5.0); + } + +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSem_220301_CallOperation_004.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSem_220301_CallOperation_004.ttcn new file mode 100644 index 00000000..79985f83 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSem_220301_CallOperation_004.ttcn @@ -0,0 +1,36 @@ +/***************************************************************** + ** @author STF 487 (updated by STF 521) + ** @version 0.0.2 + ** @purpose 1:22.3.1, null component in the multicast list of the to clause of the call operation + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// No AddressRef in the to clause shall contain the special value null at the time +// of the operation. + +module NegSem_220301_CallOperation_004 { + + signature S(); + + type port P procedure { + inout S; + } + + type component GeneralComp { + port P p; + } + + + testcase TC_NegSem_220301_CallOperation_004() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create("PTC"), v_compRef := null; + connect(self:p, v_ptc:p); + p.call(S:{}, nowait) to (v_ptc, v_compRef); + setverdict(pass); + } + + control{ + execute(TC_NegSem_220301_CallOperation_004(), 5.0); + } + +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSem_220301_CallOperation_005.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSem_220301_CallOperation_005.ttcn new file mode 100644 index 00000000..e25f98fd --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSem_220301_CallOperation_005.ttcn @@ -0,0 +1,36 @@ +/***************************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:22.3.1, incompatible template in the to clause of the call operation + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// f) All AddressRef items in the to clause and all VariableRef items in the sender clause +// shall be of type address, component or of the address type bound to the port type (see +// section 6.2.9) of the port instance referenced in the call operation. + +module NegSem_220301_CallOperation_005 { + + signature S() return integer; + + type port P procedure { + inout S; + } + + type component GeneralComp { + port P p; + } + + testcase TC_NegSem_220301_CallOperation_005() runs on GeneralComp system GeneralComp { + var charstring v_addr := "addr"; + var GeneralComp v_ptc := GeneralComp.create; + connect(self:p, v_ptc:p); + p.call(S:{}, nowait) to v_addr; + setverdict(pass); + } + + control { + execute(TC_NegSem_220301_CallOperation_005(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSem_220301_CallOperation_006.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSem_220301_CallOperation_006.ttcn new file mode 100644 index 00000000..2df7e03a --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSem_220301_CallOperation_006.ttcn @@ -0,0 +1,49 @@ +/***************************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:22.3.1, verify that non-blocking calls cannot have a response and exception handling part + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// In case of non-blocking procedure-based communication the handling of exceptions +// to call operations is done by using catch (see clause 22.3.6) operations as +// alternatives in alt statements. +// A non-blocking procedure has no out and inout parameters, no return value and the +// non-blocking property is indicated in the corresponding signature definition by means +// of a noblock keyword. Possible exceptions raised by non-blocking procedures have to be +// removed from the port queue by using catch operations in subsequent alt or interleave +// statements. + +module NegSem_220301_CallOperation_006 { + + signature S() noblock; + + type port P procedure { + inout S; + } + + type component GeneralComp { + port P p; + } + + function f_called() runs on GeneralComp { + p.getcall(S:?); + p.reply(S:{}); + } + + testcase TC_NegSem_220301_CallOperation_006() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create("PTC"); + connect(self:p, v_ptc:p); + v_ptc.start(f_called); + p.call(S:{}) { + [] p.getreply(S:?) {} + } + setverdict(pass); + } + + control{ + execute(TC_NegSem_220301_CallOperation_006(), 5.0); + } + +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSem_220301_CallOperation_007.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSem_220301_CallOperation_007.ttcn new file mode 100644 index 00000000..4870f939 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSem_220301_CallOperation_007.ttcn @@ -0,0 +1,37 @@ +/***************************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:22.3.1, verify that signature that are not listed in the port inout and out list cannot be used in call operations + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// a) The call operation shall only be used on procedure-based ports. The type definition +// of the port at which the call operation takes place shall include the procedure name +// in its out or inout list i.e. it shall be allowed to call this procedure at this port. + +module NegSem_220301_CallOperation_007 { + + signature S1() noblock; + signature S2() noblock; + + type port P procedure { + inout S1; + } + + type component GeneralComp { + port P p; + } + + testcase TC_NegSem_220301_CallOperation_007() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create("PTC"); + connect(self:p, v_ptc:p); + p.call(S2:{}); // error expected + setverdict(pass); + } + + control{ + execute(TC_NegSem_220301_CallOperation_007(), 5.0); + } + +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSem_220301_CallOperation_008.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSem_220301_CallOperation_008.ttcn new file mode 100644 index 00000000..d42d685b --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSem_220301_CallOperation_008.ttcn @@ -0,0 +1,37 @@ +/***************************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:22.3.1, verify that in parameters of a signature used in a call operation cannot contain matching symbols + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// b) All in and inout parameters of the signature shall have a specific value i.e. the use +// of matching mechanisms such as AnyValue is not allowed. + +module NegSem_220301_CallOperation_008 { + + signature S(in integer p_par) noblock; + + type port P procedure { + inout S; + } + + type component GeneralComp { + port P p; + } + + template S s_signature1 := { p_par := ? }; + + testcase TC_NegSem_220301_CallOperation_008() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create("PTC"); + connect(self:p, v_ptc:p); + p.call(s_signature1); + setverdict(pass); + } + + control{ + execute(TC_NegSem_220301_CallOperation_008(), 5.0); + } + +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSem_220301_CallOperation_009.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSem_220301_CallOperation_009.ttcn new file mode 100644 index 00000000..47268ea8 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSem_220301_CallOperation_009.ttcn @@ -0,0 +1,37 @@ +/***************************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:22.3.1, verify that in parameters of a signature used in a call operation cannot be omitted + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// b) All in and inout parameters of the signature shall have a specific value i.e. the use +// of matching mechanisms such as AnyValue is not allowed. + +module NegSem_220301_CallOperation_009 { + + signature S(in integer p_par) noblock; + + type port P procedure { + inout S; + } + + type component GeneralComp { + port P p; + } + + template S s_signature1 := { p_par := - }; + + testcase TC_NegSem_220301_CallOperation_009() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create("PTC"); + connect(self:p, v_ptc:p); + p.call(s_signature1); + setverdict(pass); + } + + control{ + execute(TC_NegSem_220301_CallOperation_009(), 5.0); + } + +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSem_220301_CallOperation_010.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSem_220301_CallOperation_010.ttcn new file mode 100644 index 00000000..99d8af7a --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSem_220301_CallOperation_010.ttcn @@ -0,0 +1,37 @@ +/***************************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:22.3.1, verify that inout parameters of a signature used in a call operation cannot contain matching symbols + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// b) All in and inout parameters of the signature shall have a specific value i.e. the use +// of matching mechanisms such as AnyValue is not allowed. + +module NegSem_220301_CallOperation_010 { + + signature S(inout integer p_par); + + type port P procedure { + inout S; + } + + type component GeneralComp { + port P p; + } + + template S s_signature1 := { p_par := ? }; + + testcase TC_NegSem_220301_CallOperation_010() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create("PTC"); + connect(self:p, v_ptc:p); + p.call(s_signature1, nowait); + setverdict(pass); + } + + control{ + execute(TC_NegSem_220301_CallOperation_010(), 5.0); + } + +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSem_220301_CallOperation_011.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSem_220301_CallOperation_011.ttcn new file mode 100644 index 00000000..12385ae3 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSem_220301_CallOperation_011.ttcn @@ -0,0 +1,37 @@ +/***************************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:22.3.1, verify that inout parameters of a signature used in a call operation cannot be omitted + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// b) All in and inout parameters of the signature shall have a specific value i.e. the use +// of matching mechanisms such as AnyValue is not allowed. + +module NegSem_220301_CallOperation_011 { + + signature S(inout integer p_par); + + type port P procedure { + inout S; + } + + type component GeneralComp { + port P p; + } + + template S s_signature1 := { p_par := - }; + + testcase TC_NegSem_220301_CallOperation_011() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create("PTC"); + connect(self:p, v_ptc:p); + p.call(s_signature1, nowait); + setverdict(pass); + } + + control{ + execute(TC_NegSem_220301_CallOperation_011(), 5.0); + } + +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSem_220301_CallOperation_012.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSem_220301_CallOperation_012.ttcn new file mode 100644 index 00000000..cf848ce0 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSem_220301_CallOperation_012.ttcn @@ -0,0 +1,50 @@ +/***************************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:22.3.1, missing to clause in case of one-to-many connections + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// e) A to clause shall be present in case of one-to-many connections. + +module NegSem_220301_CallOperation_012 { + + signature S(); + + type port P procedure { + inout S; + } + + type component GeneralComp { + port P p; + } + + function f_called() runs on GeneralComp { + p.getcall(S:?); + p.reply(S:{}); + } + + testcase TC_NegSem_220301_CallOperation_012() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc1 := GeneralComp.create, + v_ptc2 := GeneralComp.create; + var integer v_counter := 0; + connect(self:p, v_ptc1:p); + connect(self:p, v_ptc2:p); + v_ptc1.start(f_called()); + v_ptc2.start(f_called()); + p.call(S:{}) { // error expected as the to clause is missing + [] p.getreply(S:?) { + v_counter := v_counter + 1; + if (v_counter < 2) { + repeat; + } else { + setverdict(pass, "Both replies received"); } + } + } + } + + control { + execute(TC_NegSem_220301_CallOperation_012(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSem_220301_CallOperation_013.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSem_220301_CallOperation_013.ttcn new file mode 100644 index 00000000..a37384b9 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSem_220301_CallOperation_013.ttcn @@ -0,0 +1,42 @@ +/***************************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:22.3.1, verify that type mismatch error is issued for incorrect call timer values + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// g) CallTimerValue shall be of type float. + +module NegSem_220301_CallOperation_013 { + + signature S(); + + type port P procedure { + inout S; + } + + type component GeneralComp { + port P p; + } + + function f_called() runs on GeneralComp { + p.getcall(S:?); + p.reply(S:{}); + } + + testcase TC_NegSem_220301_CallOperation_013() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + connect(self:p, v_ptc:p); + v_ptc.start(f_called()); + p.call(S:{}, 2) { // error expected as 2 is an integer literal + [] p.getreply(S:?) {} + [] p.catch(timeout) {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_220301_CallOperation_013(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSem_220301_CallOperation_014.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSem_220301_CallOperation_014.ttcn new file mode 100644 index 00000000..3f45d76b --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSem_220301_CallOperation_014.ttcn @@ -0,0 +1,44 @@ +/***************************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:22.3.1, verify that getreply signature mismatch in the response and exception handling causes an error + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// h) The selection of the alternatives to a call shall only be based on getreply and catch operations +// for the called procedure. Unqualified getreply and catch operations shall only treat replies from +// and exceptions raised by the called procedure. + +module NegSem_220301_CallOperation_014 { + + signature S1(); + signature S2(); + + type port P procedure { + inout S1, S2; + } + + type component GeneralComp { + port P p; + } + + function f_called() runs on GeneralComp { + p.getcall(S1:?); + p.reply(S1:{}); + } + + testcase TC_NegSem_220301_CallOperation_014() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + connect(self:p, v_ptc:p); + v_ptc.start(f_called()); + p.call(S1:{}) { + [] p.getreply(S1:?) { setverdict(pass, "Reply accepted"); } + [] p.getreply(S2:?) {} // error expected + } + } + + control { + execute(TC_NegSem_220301_CallOperation_014(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSem_220301_CallOperation_015.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSem_220301_CallOperation_015.ttcn new file mode 100644 index 00000000..660398f7 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSem_220301_CallOperation_015.ttcn @@ -0,0 +1,44 @@ +/***************************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:22.3.1, verify that exception signature mismatch in the response and exception handling causes an error + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// h) The selection of the alternatives to a call shall only be based on getreply and catch operations +// for the called procedure. Unqualified getreply and catch operations shall only treat replies from +// and exceptions raised by the called procedure. + +module NegSem_220301_CallOperation_015 { + + signature S1() exception(integer); + signature S2() exception(charstring); + + type port P procedure { + inout S1, S2; + } + + type component GeneralComp { + port P p; + } + + function f_called() runs on GeneralComp { + p.getcall(S1:?); + p.raise(S1, 1); + } + + testcase TC_NegSem_220301_CallOperation_015() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + connect(self:p, v_ptc:p); + v_ptc.start(f_called()); + p.call(S1:{}) { + [] p.catch(S1, integer:?) { setverdict(pass, "Exception caught!"); } + [] p.catch(S2, charstring:?) {} // expected error + } + } + + control { + execute(TC_NegSem_220301_CallOperation_015(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSem_220301_CallOperation_016.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSem_220301_CallOperation_016.ttcn new file mode 100644 index 00000000..e9b9dfaf --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSem_220301_CallOperation_016.ttcn @@ -0,0 +1,46 @@ +/***************************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:22.3.1, verify that forbidden calls cannot appear in response and exception handling part guards + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// i) The evaluation of the Boolean expressions guarding the alternatives in the response +// and exception handling part may have side effects. In order to avoid unexpected side +// effects, the same rules as for the Boolean guards in alt statements shall be applied +// (see clause 20.2). + + +module NegSem_220301_CallOperation_016 { + + signature S(); + + type port P procedure { + inout S; + } + + type component GeneralComp { + port P p; + } + + function f_called() runs on GeneralComp { + p.getcall(S:?); + p.reply(S:{}); + } + + testcase TC_NegSem_220301_CallOperation_016() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + timer t_tmr := 5.0; + t_tmr.start; + connect(self:p, v_ptc:p); + v_ptc.start(f_called()); + p.call(S:{}) { + [t_tmr.read > 0.0] p.getreply(S:?) { setverdict(pass, "Reply accepted"); } // guard error expected + } + } + + control { + execute(TC_NegSem_220301_CallOperation_016(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSem_220301_CallOperation_017.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSem_220301_CallOperation_017.ttcn new file mode 100644 index 00000000..d1a9555e --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSem_220301_CallOperation_017.ttcn @@ -0,0 +1,49 @@ +/***************************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:22.3.1, verify that forbidden functions cannot appear in response and exception handling part guards + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// i) The evaluation of the Boolean expressions guarding the alternatives in the response +// and exception handling part may have side effects. In order to avoid unexpected side +// effects, the same rules as for the Boolean guards in alt statements shall be applied +// (see clause 20.2). + +module NegSem_220301_CallOperation_017 { + + signature S(); + + type port P procedure { + inout S; + } + + type component GeneralComp { + port P p; + var integer v_int := 0; + } + + function f_called() runs on GeneralComp { + p.getcall(S:?); + p.reply(S:{}); + } + + function f_guard() runs on GeneralComp return boolean { + v_int := v_int + 1; + return v_int < 10; + } + + testcase TC_NegSem_220301_CallOperation_017() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + connect(self:p, v_ptc:p); + v_ptc.start(f_called()); + p.call(S:{}) { + [f_guard()] p.getreply(S:?) { setverdict(pass, "Reply accepted"); } // guard error expected + } + } + + control { + execute(TC_NegSem_220301_CallOperation_017(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSem_220301_CallOperation_018.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSem_220301_CallOperation_018.ttcn new file mode 100644 index 00000000..31b941d3 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSem_220301_CallOperation_018.ttcn @@ -0,0 +1,42 @@ +/***************************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:22.3.1, verify that non-blocking procedure calls cannot contain timeout values + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// l) The call operation for a non-blocking procedure shall have no response and exception +// handling part, shall raise no timeout exception and shall not use the nowait keyword. + +module NegSem_220301_CallOperation_018 { + + signature S() noblock; + + type port P procedure { + inout S; + } + + type component GeneralComp { + port P p; + } + + function f_called() runs on GeneralComp { + p.getcall(S:?); + p.reply(S:{}); + } + + testcase TC_NegSem_220301_CallOperation_018() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + connect(self:p, v_ptc:p); + v_ptc.start(f_called()); + p.call(S:{}, 1.0); + alt { + [] p.getreply(S:?) { setverdict(pass, "Reply accepted"); } // guard error expected + } + } + + control { + execute(TC_NegSem_220301_CallOperation_018(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSem_220301_CallOperation_019.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSem_220301_CallOperation_019.ttcn new file mode 100644 index 00000000..7561c40d --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSem_220301_CallOperation_019.ttcn @@ -0,0 +1,42 @@ +/***************************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:22.3.1, verify that non-blocking procedure calls cannot contain nowait parameter + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// l) The call operation for a non-blocking procedure shall have no response and exception +// handling part, shall raise no timeout exception and shall not use the nowait keyword. + +module NegSem_220301_CallOperation_019 { + + signature S() noblock; + + type port P procedure { + inout S; + } + + type component GeneralComp { + port P p; + } + + function f_called() runs on GeneralComp { + p.getcall(S:?); + p.reply(S:{}); + } + + testcase TC_NegSem_220301_CallOperation_019() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + connect(self:p, v_ptc:p); + v_ptc.start(f_called()); + p.call(S:{}, nowait); + alt { + [] p.getreply(S:?) { setverdict(pass, "Reply accepted"); } // guard error expected + } + } + + control { + execute(TC_NegSem_220301_CallOperation_019(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSem_220301_CallOperation_020.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSem_220301_CallOperation_020.ttcn new file mode 100644 index 00000000..2085d833 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSem_220301_CallOperation_020.ttcn @@ -0,0 +1,31 @@ +/***************************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:22.3.1, verify that calls cannot be used on disconnected ports + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// m) Applying a call operation to an unmapped or disconnected port shall cause a test +// case error. + +module NegSem_220301_CallOperation_020 { + + signature S() noblock; + + type port P procedure { + inout S; + } + + type component GeneralComp { + port P p; + } + + testcase TC_NegSem_220301_CallOperation_020() runs on GeneralComp system GeneralComp { + p.call(S:{}); + } + + control { + execute(TC_NegSem_220301_CallOperation_020(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSyn_220301_CallOperation_001.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSyn_220301_CallOperation_001.ttcn new file mode 100644 index 00000000..bb0e9c22 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSyn_220301_CallOperation_001.ttcn @@ -0,0 +1,41 @@ +/***************************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:22.3.1, verify that the response and exception handling part cannot contain an else clause + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// h) The use of else branches and the invocation of altsteps is not allowed. + +module NegSyn_220301_CallOperation_001 { + + signature S(); + + type port P procedure { + inout S; + } + + type component GeneralComp { + port P p; + } + + function f_called() runs on GeneralComp { + p.getcall(S:?); + p.reply(S:{}); + } + + testcase TC_NegSyn_220301_CallOperation_001() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + connect(self:p, v_ptc:p); + v_ptc.start(f_called()); + p.call(S:{}) { + [] p.getreply(S:?) { setverdict(pass); } + [else] {} // expected error + } + } + + control { + execute(TC_NegSyn_220301_CallOperation_001(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSyn_220301_CallOperation_002.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSyn_220301_CallOperation_002.ttcn new file mode 100644 index 00000000..3d65ceab --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSyn_220301_CallOperation_002.ttcn @@ -0,0 +1,45 @@ +/***************************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:22.3.1, verify that the response and exception handling part cannot contain an altstep + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// h) The use of else branches and the invocation of altsteps is not allowed. + +module NegSyn_220301_CallOperation_002 { + + signature S(); + + type port P procedure { + inout S; + } + + type component GeneralComp { + port P p; + } + + function f_called() runs on GeneralComp { + p.getcall(S:?); + p.reply(S:{}); + } + + altstep a_handleReply() runs on GeneralComp { + [] p.getreply {} + } + + testcase TC_NegSyn_220301_CallOperation_002() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + connect(self:p, v_ptc:p); + v_ptc.start(f_called()); + p.call(S:{}) { + [] p.getreply(S:?) { setverdict(pass); } + [] a_handleReply() {} // expected error + } + } + + control { + execute(TC_NegSyn_220301_CallOperation_002(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220301_call_operation/Sem_220301_CallOperation_001.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220301_call_operation/Sem_220301_CallOperation_001.ttcn new file mode 100644 index 00000000..9c89ee28 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220301_call_operation/Sem_220301_CallOperation_001.ttcn @@ -0,0 +1,120 @@ +/***************************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:22.3.1, Ensure that the IUT correctly handles procedure call operations + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_220301_CallOperation_001 { + + /** + * @desc testing of inline return template for remote procedure call + * @param p_par1 only input parameter + * @param p_par2 must have value 4 at return + * @param p_par3 must have value 5 at return + * @return must return value 1 + */ + signature p_Sem_220301_CallOperation_001(in integer p_par1, out integer p_par2, inout integer p_par3) return integer; + + template p_Sem_220301_CallOperation_001 s_returnTemplate := { + p_par1 := -, + p_par2 := 4, + p_par3 := 5 + } + + template p_Sem_220301_CallOperation_001 s_wrongTemplate := { + p_par1 := -, + p_par2 := 2, + p_par3 := 3 + } + + template p_Sem_220301_CallOperation_001 s_callTemplate := { + p_par1 := 1, + p_par2 := -, + p_par3 := 3 + } + + type port remotePort procedure { + inout p_Sem_220301_CallOperation_001; + } + + type component GeneralComp { + port remotePort PCO; + } + + function f_ClientQuery() runs on GeneralComp { + var integer v_zero:=0; + var integer v_one:=1; + + PCO.call(p_Sem_220301_CallOperation_001:s_callTemplate, 5.0) { + + [] PCO.getreply(p_Sem_220301_CallOperation_001:s_wrongTemplate value 1) { + setverdict(fail); + } + [] PCO.getreply(p_Sem_220301_CallOperation_001:s_returnTemplate value 2) { + setverdict(fail); + } + [v_one>v_zero] PCO.getreply(p_Sem_220301_CallOperation_001:s_returnTemplate value 1) { //check that boolean guard is correctly evaluated + setverdict(pass); + } + [] PCO.catch (timeout) { + setverdict(fail); + } + } + } + + function f_ServerResponses() runs on GeneralComp { + + var integer v_par1; + var integer v_par3; + timer t_timeout:=30.0; + + template p_Sem_220301_CallOperation_001 s_acceptTemplate := { + p_par1 := ?, + p_par2 := ?, + p_par3 := ? + }; + + + t_timeout.start; + + alt { + [] PCO.getcall(p_Sem_220301_CallOperation_001:s_acceptTemplate) -> param(v_par1, - , v_par3) { + PCO.reply(p_Sem_220301_CallOperation_001:{p_par1 := -, p_par2 := v_par1+v_par3, p_par3 := v_par1+v_par3+1} value v_par1); //procedure return values are sent + repeat; + } + [] t_timeout.timeout { + setverdict(fail); + } + } + + } + + + testcase TC_Sem_220301_CallOperation_001() runs on GeneralComp system GeneralComp { + var GeneralComp server := GeneralComp.create("RemoteProcedure Service"); + var GeneralComp client := GeneralComp.create("RemoteProcedure Client"); + // map the PTCs to the system port + connect(server:PCO, client:PCO); + + server.start(f_ServerResponses()); + client.start(f_ClientQuery()); + + alt { + [] client.done { + server.stop; + } + } + + alt { + [] all component.done {} + } + + disconnect(server:PCO); + } + + control{ + execute(TC_Sem_220301_CallOperation_001()); + } + +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220301_call_operation/Sem_220301_CallOperation_002.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220301_call_operation/Sem_220301_CallOperation_002.ttcn new file mode 100644 index 00000000..6fc77bf7 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220301_call_operation/Sem_220301_CallOperation_002.ttcn @@ -0,0 +1,120 @@ +/***************************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:22.3.1, Ensure that the IUT correctly handles procedure call operations + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_220301_CallOperation_002 { + + /** + * @desc testing of inline return template for remote procedure call + * @param p_par1 only input parameter + * @param p_par2 must have value 4 at return + * @param p_par3 must have value 5 at return + * @return must return value 1 + */ + signature p_Sem_220301_CallOperation_002(in integer p_par1, out integer p_par2, inout integer p_par3) return integer; + + template p_Sem_220301_CallOperation_002 s_returnTemplate := { + p_par1 := -, + p_par2 := 4, + p_par3 := 5 + } + + template p_Sem_220301_CallOperation_002 s_wrongTemplate := { + p_par1 := -, + p_par2 := 2, + p_par3 := 3 + } + + template p_Sem_220301_CallOperation_002 s_callTemplate := { + p_par1 := 1, + p_par2 := -, + p_par3 := 3 + } + + type port remotePort procedure { + inout p_Sem_220301_CallOperation_002; + } + + type component GeneralComp { + port remotePort PCO; + } + + function f_ClientQuery() runs on GeneralComp { + var integer v_zero:=0; + var integer v_one:=1; + + PCO.call(p_Sem_220301_CallOperation_002:s_callTemplate, 5.0) { + + [] PCO.getreply(p_Sem_220301_CallOperation_002:s_wrongTemplate value 1) { + setverdict(fail); + } + [] PCO.getreply(p_Sem_220301_CallOperation_002:s_returnTemplate value 2) { + setverdict(fail); + } + [v_one param(v_par1, - , v_par3) { + PCO.reply(p_Sem_220301_CallOperation_002:{p_par1 := -, p_par2 := v_par1+v_par3, p_par3 := v_par1+v_par3+1} value v_par1); //procedure return values are sent + repeat; + } + [] t_timeout.timeout { + setverdict(fail); + } + } + + } + + + testcase TC_Sem_220301_CallOperation_002() runs on GeneralComp system GeneralComp { + var GeneralComp server := GeneralComp.create("RemoteProcedure Service"); + var GeneralComp client := GeneralComp.create("RemoteProcedure Client"); + // map the PTCs to the system port + connect(server:PCO, client:PCO); + + server.start(f_ServerResponses()); + client.start(f_ClientQuery()); + + alt { + [] client.done { + server.stop; + } + } + + alt { + [] all component.done {} + } + + disconnect(server:PCO); + } + + control{ + execute(TC_Sem_220301_CallOperation_002()); + } + +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220301_call_operation/Sem_220301_CallOperation_003.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220301_call_operation/Sem_220301_CallOperation_003.ttcn new file mode 100644 index 00000000..1d08cd10 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220301_call_operation/Sem_220301_CallOperation_003.ttcn @@ -0,0 +1,124 @@ +/***************************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:22.3.1, Ensure that the IUT correctly handles non-blocking procedure call + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_220301_CallOperation_003 { + + /** + * @desc testing of inline return template for remote procedure call + * @param p_par1 only input parameter + * @param p_par2 must have value 4 at return + * @param p_par3 must have value 5 at return + * @return must return value 1 + */ + signature p_Sem_220301_CallOperation_003(in integer p_par1, out integer p_par2, inout integer p_par3) return integer; + + template p_Sem_220301_CallOperation_003 s_returnTemplate := { + p_par1 := -, + p_par2 := 4, + p_par3 := 5 + } + + template p_Sem_220301_CallOperation_003 s_wrongTemplate := { + p_par1 := -, + p_par2 := 2, + p_par3 := 3 + } + + template p_Sem_220301_CallOperation_003 s_callTemplate := { + p_par1 := 1, + p_par2 := -, + p_par3 := 3 + } + + type port remotePort procedure { + inout p_Sem_220301_CallOperation_003; + } + + type component GeneralComp { + port remotePort PCO; + } + + function f_ClientQuery() runs on GeneralComp { + var integer v_zero:=0; + var integer v_one:=1; + timer t_timer:=5.0; + + PCO.call(p_Sem_220301_CallOperation_003:s_callTemplate, nowait); //check non-blocking call + t_timer.start; + + alt { + + [] PCO.getreply(p_Sem_220301_CallOperation_003:s_wrongTemplate value 1) { + setverdict(fail); + } + [] PCO.getreply(p_Sem_220301_CallOperation_003:s_returnTemplate value 2) { + setverdict(fail); + } + [] PCO.getreply(p_Sem_220301_CallOperation_003:s_returnTemplate value 1) { + setverdict(pass); + } + [] t_timer.timeout { + setverdict(fail); + } + } + } + + function f_ServerResponses() runs on GeneralComp { + + var integer v_par1; + var integer v_par3; + timer t_timeout:=30.0; + + template p_Sem_220301_CallOperation_003 s_acceptTemplate := { + p_par1 := ?, + p_par2 := ?, + p_par3 := ? + }; + + + t_timeout.start; + + alt { + [] PCO.getcall(p_Sem_220301_CallOperation_003:s_acceptTemplate) -> param(v_par1, - , v_par3) { + PCO.reply(p_Sem_220301_CallOperation_003:{p_par1 := -, p_par2 := v_par1+v_par3, p_par3 := v_par1+v_par3+1} value v_par1); //procedure return values are sent + repeat; + } + [] t_timeout.timeout { + setverdict(fail); + } + } + + } + + + testcase TC_Sem_220301_CallOperation_003() runs on GeneralComp system GeneralComp { + var GeneralComp server := GeneralComp.create("RemoteProcedure Service"); + var GeneralComp client := GeneralComp.create("RemoteProcedure Client"); + // map the PTCs to the system port + connect(server:PCO, client:PCO); + + server.start(f_ServerResponses()); + client.start(f_ClientQuery()); + + alt { + [] client.done { + server.stop; + } + } + + alt { + [] all component.done {} + } + + disconnect(server:PCO); + } + + control{ + execute(TC_Sem_220301_CallOperation_003()); + } + +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220301_call_operation/Sem_220301_CallOperation_004.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220301_call_operation/Sem_220301_CallOperation_004.ttcn new file mode 100644 index 00000000..9720c1ff --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220301_call_operation/Sem_220301_CallOperation_004.ttcn @@ -0,0 +1,120 @@ +/***************************************************************** + ** @author STF 433 (updated by STF 521) + ** @version 0.0.2 + ** @purpose 1:22.3.1, Ensure that the IUT correctly handles multiple client calls to the same server + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_220301_CallOperation_004 { + + /** + * @desc testing of inline return template for remote procedure call + * @param p_par1 only input parameter + * @param p_par2 must have value 4 at return + * @param p_par3 must have value 5 at return + * @return must return value 1 + */ + signature p_Sem_220301_CallOperation_004(in integer p_par1, out integer p_par2, inout integer p_par3) return integer; + + + template p_Sem_220301_CallOperation_004 s_returnTemplate := { + p_par1 := -, + p_par2 := 4, + p_par3 := 5 + } + + template p_Sem_220301_CallOperation_004 s_wrongTemplate := { + p_par1 := -, + p_par2 := 2, + p_par3 := 3 + } + + template p_Sem_220301_CallOperation_004 s_callTemplate := { + p_par1 := 1, + p_par2 := -, + p_par3 := 3 + } + + type port remotePort procedure { + inout p_Sem_220301_CallOperation_004; + } + + type component GeneralComp { + port remotePort PCO; + } + + function f_ClientQuery() runs on GeneralComp { + var integer v_zero:=0; + var integer v_one:=1; + var boolean first:=true; + + PCO.call(p_Sem_220301_CallOperation_004:s_callTemplate, 5.0) { + + [first] PCO.getreply(p_Sem_220301_CallOperation_004:s_returnTemplate value 1) { + first:=false; + setverdict(pass); + } + [] PCO.catch (timeout) { + setverdict(fail, "Component did not receive a response"); + } + } + } + + function f_ServerResponses() runs on GeneralComp { + var GeneralComp v_clientAddress; + var integer v_par1; + var integer v_par3; + timer t_timeout:=2.0; + + template p_Sem_220301_CallOperation_004 s_acceptTemplate := { + p_par1 := ?, + p_par2 := ?, + p_par3 := ? + }; + + + t_timeout.start; + + alt { + [] PCO.getcall(p_Sem_220301_CallOperation_004:s_acceptTemplate) -> param(v_par1, - , v_par3) sender v_clientAddress { + PCO.reply(p_Sem_220301_CallOperation_004:{p_par1 := -, p_par2 := v_par1+v_par3, p_par3 := v_par1+v_par3+1} value v_par1) to v_clientAddress; //procedure return values are sent + repeat; + } + [] t_timeout.timeout { + setverdict(fail); + } + } + + } + + testcase TC_Sem_220301_CallOperation_004() runs on GeneralComp system GeneralComp { + var GeneralComp server := GeneralComp.create("RemoteProcedure Service"); + var GeneralComp client := GeneralComp.create("RemoteProcedure Client"); + var GeneralComp client2 := GeneralComp.create("RemoteProcedure Client"); + // map the PTCs to the system port + connect(server:PCO, client:PCO); + connect(server:PCO, client2:PCO); + + server.start(f_ServerResponses()); + + client.start(f_ClientQuery()); + client2.start(f_ClientQuery()); + + interleave { + [] client.done {} + [] client2.done {} + } + server.stop; + + alt { + [] all component.done {} + } + + disconnect(server:PCO); + } + + control{ + execute(TC_Sem_220301_CallOperation_004(), 30.0); + } + +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220301_call_operation/Sem_220301_CallOperation_005.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220301_call_operation/Sem_220301_CallOperation_005.ttcn new file mode 100644 index 00000000..46efb4b6 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220301_call_operation/Sem_220301_CallOperation_005.ttcn @@ -0,0 +1,123 @@ +/***************************************************************** + ** @author STF 433 (updated by STF 521) + ** @version 0.0.2 + ** @purpose 1:22.3.1, blocking broadcast call with no response and exception handling part + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirements are tested: +// Like for the send operation, TTCN-3 also supports unicast, multicast and broadcast calls +// of procedures. This can be done in the same manner as described in clause 22.2.1, i.e. +// the argument of the to clause of a call operation is for unicast calls the address of +// one receiving entity (or can be omitted in case of one-to-one connections), for multicast +// calls a list of addresses of a set of receivers and for broadcast calls the all component +// keyword. + +module Sem_220301_CallOperation_005 { + + /** + * @desc testing of inline return template for remote procedure call + * @param p_par1 only input parameter + * @param p_par2 must have value 4 at return + * @param p_par3 must have value 5 at return + * @return must return value 1 + */ + signature p_Sem_220301_CallOperation_005(in integer p_par1, out integer p_par2, inout integer p_par3) return integer; + + template p_Sem_220301_CallOperation_005 s_returnTemplate := { + p_par1 := -, + p_par2 := 4, + p_par3 := 5 + } + + template p_Sem_220301_CallOperation_005 s_wrongTemplate := { + p_par1 := -, + p_par2 := 2, + p_par3 := 3 + } + + template p_Sem_220301_CallOperation_005 s_callTemplate := { + p_par1 := 1, + p_par2 := -, + p_par3 := 3 + } + + type port remotePort procedure { + inout p_Sem_220301_CallOperation_005; + } + + type component GeneralComp { + port remotePort PCO; + } + + function f_ClientQuery() runs on GeneralComp { + var integer v_counter := 0; + + // validate broadcast calling + PCO.call(p_Sem_220301_CallOperation_005:s_callTemplate, nowait) to all component; + + alt { + // check that we get a reply from both servers + [] PCO.getreply(p_Sem_220301_CallOperation_005:s_returnTemplate value 1) { + v_counter := v_counter + 1; + if (v_counter == 2) { + setverdict(pass, "Server1 reply received"); + } else { + repeat; + } + } + } + } + + template p_Sem_220301_CallOperation_005 s_acceptTemplate := { + p_par1 := ?, + p_par2 := ?, + p_par3 := ? + }; + + function f_ServerResponses() runs on GeneralComp { + var integer v_par1; + var integer v_par3; + + alt { + [] PCO.getcall(p_Sem_220301_CallOperation_005:s_acceptTemplate) -> param(v_par1, - , v_par3) { + PCO.reply(p_Sem_220301_CallOperation_005:{p_par1 := -, p_par2 := v_par1+v_par3, p_par3 := v_par1+v_par3+1} value v_par1); + repeat; + } + } + } + + testcase TC_Sem_220301_CallOperation_005() runs on GeneralComp system GeneralComp { + var GeneralComp server := GeneralComp.create("RemoteProcedure Service") alive; + var GeneralComp server2 := GeneralComp.create("RemoteProcedure Service2") alive; + var GeneralComp client := GeneralComp.create("RemoteProcedure Client") alive; + // map the PTCs to the system port + connect(server:PCO, client:PCO); + connect(server2:PCO, client:PCO); + + // set server address and start operation + server.start(f_ServerResponses()); + server2.start(f_ServerResponses()); + + client.start(f_ClientQuery()); + + alt { + [] client.done { + server.stop; + server2.stop; + } + } + + alt { + [] all component.done {} + } + + disconnect(server:PCO); + disconnect(server2:PCO); + } + + control{ + execute(TC_Sem_220301_CallOperation_005(), 5.0); + } + +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220301_call_operation/Sem_220301_CallOperation_006.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220301_call_operation/Sem_220301_CallOperation_006.ttcn new file mode 100644 index 00000000..37de581c --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220301_call_operation/Sem_220301_CallOperation_006.ttcn @@ -0,0 +1,118 @@ +/***************************************************************** + ** @author STF 433 (updated by STF 521) + ** @version 0.0.2 + ** @purpose 1:22.3.1, blocking multicast call with no response and exception handling part + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// Like for the send operation, TTCN-3 also supports unicast, multicast and broadcast calls +// of procedures. This can be done in the same manner as described in clause 22.2.1, i.e. +// the argument of the to clause of a call operation is for unicast calls the address of +// one receiving entity (or can be omitted in case of one-to-one connections), for multicast +// calls a list of addresses of a set of receivers and for broadcast calls the all component +// keyword. + +module Sem_220301_CallOperation_006 { + + /** + * @desc testing of inline return template for remote procedure call + * @param p_par1 only input parameter + * @param p_par2 must have value 4 at return + * @param p_par3 must have value 5 at return + * @return must return value 1 + */ + signature p_Sem_220301_CallOperation_006(in integer p_par1, out integer p_par2, inout integer p_par3) return integer; + + template p_Sem_220301_CallOperation_006 s_returnTemplate := { + p_par1 := -, + p_par2 := 4, + p_par3 := 5 + } + + template p_Sem_220301_CallOperation_006 s_wrongTemplate := { + p_par1 := -, + p_par2 := 2, + p_par3 := 3 + } + + template p_Sem_220301_CallOperation_006 s_callTemplate := { + p_par1 := 1, + p_par2 := -, + p_par3 := 3 + } + + type port remotePort procedure { + inout p_Sem_220301_CallOperation_006; + } + + type component GeneralComp { + port remotePort PCO; + } + + function f_ClientQuery(GeneralComp server1, GeneralComp server2) runs on GeneralComp { + // validate multicast calling + PCO.call(p_Sem_220301_CallOperation_006:s_callTemplate, nowait) to (server1, server2); + interleave { + //check that we get a reply from first server + [] PCO.getreply(p_Sem_220301_CallOperation_006:s_returnTemplate value 1) from server1 { + setverdict(pass, "Reply from server 1"); + } + [] PCO.getreply(p_Sem_220301_CallOperation_006:s_returnTemplate value 1) from server2 { + setverdict(pass, "Reply from server 2"); + } + } + } + + template p_Sem_220301_CallOperation_006 s_acceptTemplate := { + p_par1 := ?, + p_par2 := ?, + p_par3 := ? + }; + + function f_ServerResponses() runs on GeneralComp { + var integer v_par1; + var integer v_par3; + + alt { + [] PCO.getcall(p_Sem_220301_CallOperation_006:s_acceptTemplate) -> param(v_par1, - , v_par3) { + PCO.reply(p_Sem_220301_CallOperation_006:{p_par1 := -, p_par2 := v_par1+v_par3, p_par3 := v_par1+v_par3+1} value v_par1); + repeat; + } + } + + } + + testcase TC_Sem_220301_CallOperation_006() runs on GeneralComp system GeneralComp { + var GeneralComp server1 := GeneralComp.create("RemoteProcedure Service") alive; + var GeneralComp server2 := GeneralComp.create("RemoteProcedure Service2") alive; + var GeneralComp client := GeneralComp.create("RemoteProcedure Client") alive; + // map the PTCs to the system port + connect(server1:PCO, client:PCO); + connect(server2:PCO, client:PCO); + + // set server address and start operation + server1.start(f_ServerResponses()); + server2.start(f_ServerResponses()); + + client.start(f_ClientQuery(server1, server2)); + + alt { + [] client.done { + server1.stop; + server2.stop; + } + } + + alt { + [] all component.done {} + } + + disconnect(server1:PCO); + disconnect(server2:PCO); + } + + control{ + execute(TC_Sem_220301_CallOperation_006(), 5.0); + } + +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220301_call_operation/Sem_220301_CallOperation_007.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220301_call_operation/Sem_220301_CallOperation_007.ttcn new file mode 100644 index 00000000..b74576f3 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220301_call_operation/Sem_220301_CallOperation_007.ttcn @@ -0,0 +1,120 @@ +/***************************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:22.3.1, Ensure that the IUT correctly handles blocking procedure call + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_220301_CallOperation_007 { + + /** + * @desc testing of inline return template for remote procedure call + * @param p_par1 only input parameter + * @param p_par2 must have value 4 at return + * @param p_par3 must have value 5 at return + * @return must return value 1 + */ + signature p_Sem_220301_CallOperation_007(in integer p_par1, out integer p_par2, inout integer p_par3) return integer; + + template p_Sem_220301_CallOperation_007 s_returnTemplate := { + p_par1 := -, + p_par2 := 4, + p_par3 := 5 + } + + template p_Sem_220301_CallOperation_007 s_wrongTemplate := { + p_par1 := -, + p_par2 := 2, + p_par3 := 3 + } + + template p_Sem_220301_CallOperation_007 s_callTemplate := { + p_par1 := 1, + p_par2 := -, + p_par3 := 3 + } + + type port remotePort procedure { + inout p_Sem_220301_CallOperation_007; + } + + type component GeneralComp { + port remotePort PCO; + } + + function f_ClientQuery() runs on GeneralComp { + var integer v_zero:=0; + var integer v_one:=1; + + PCO.call(p_Sem_220301_CallOperation_007:s_callTemplate,5.0) { //blocking version of procedure call + + [] PCO.getreply(p_Sem_220301_CallOperation_007:s_wrongTemplate value 1) { + setverdict(fail); + } + [] PCO.getreply(p_Sem_220301_CallOperation_007:s_returnTemplate value 2) { + setverdict(fail); + } + [] PCO.getreply(p_Sem_220301_CallOperation_007:s_returnTemplate value 1) { + setverdict(pass); + } + [] PCO.catch(timeout) { + setverdict(fail); + } + } + } + + function f_ServerResponses() runs on GeneralComp { + + var integer v_par1; + var integer v_par3; + timer t_timeout:=30.0; + + template p_Sem_220301_CallOperation_007 s_acceptTemplate := { + p_par1 := ?, + p_par2 := ?, + p_par3 := ? + }; + + + t_timeout.start; + + alt { + [] PCO.getcall(p_Sem_220301_CallOperation_007:s_acceptTemplate) -> param(v_par1, - , v_par3) { + PCO.reply(p_Sem_220301_CallOperation_007:{p_par1 := -, p_par2 := v_par1+v_par3, p_par3 := v_par1+v_par3+1} value v_par1); //procedure return values are sent + repeat; + } + [] t_timeout.timeout { + setverdict(fail); + } + } + + } + + + testcase TC_Sem_220301_CallOperation_007() runs on GeneralComp system GeneralComp { + var GeneralComp server := GeneralComp.create("RemoteProcedure Service"); + var GeneralComp client := GeneralComp.create("RemoteProcedure Client"); + // map the PTCs to the system port + connect(server:PCO, client:PCO); + + server.start(f_ServerResponses()); + client.start(f_ClientQuery()); + + alt { + [] client.done { + server.stop; + } + } + + alt { + [] all component.done {} + } + + disconnect(server:PCO); + } + + control{ + execute(TC_Sem_220301_CallOperation_007()); + } + +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220301_call_operation/Sem_220301_CallOperation_008.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220301_call_operation/Sem_220301_CallOperation_008.ttcn new file mode 100644 index 00000000..c5552197 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220301_call_operation/Sem_220301_CallOperation_008.ttcn @@ -0,0 +1,53 @@ +/***************************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:22.3.1, verify that defaults are not executed in response and exception handling part of a call operation + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirements are tested: +// The response and exception handling part of a call operation is executed like an alt +// statement without any active default. + +module Sem_220301_CallOperation_008 { + + signature S(); + + type port P procedure { + inout S; + } + + type component GeneralComp { + port P p; + } + + function f_called() runs on GeneralComp { + timer t_tmr := 1.0; + p.getcall(S:?); + t_tmr.start; + t_tmr.timeout; + p.reply(S:{}); + } + + altstep a_timeout() runs on GeneralComp { + [] any timer.timeout { setverdict(fail, "Timer timeout"); } + } + + testcase TC_Sem_220301_CallOperation_008() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + timer t_tmr := 0.1; + t_tmr.start; + activate(a_timeout()); // activates a default which shouldn't be triggered in the call block + connect(self:p, v_ptc:p); + v_ptc.start(f_called()); + p.call(S:{}, 4.0) { // the local t_tmr timer should time out first, because the reply is delayed + [] p.getreply(S:?) { setverdict(pass, "Reply received"); } + [] p.catch(timeout) { setverdict(fail, "Call timeout"); } + } + setverdict(pass); + } + + control { + execute(TC_Sem_220301_CallOperation_008(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220301_call_operation/Sem_220301_CallOperation_009.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220301_call_operation/Sem_220301_CallOperation_009.ttcn new file mode 100644 index 00000000..02d3b4fb --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220301_call_operation/Sem_220301_CallOperation_009.ttcn @@ -0,0 +1,40 @@ +/***************************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:22.3.1, blocking call with no timeout + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirements are tested: +// The call operation may optionally include a timeout. + +module Sem_220301_CallOperation_009 { + + signature S(); + + type port P procedure { + inout S; + } + + type component GeneralComp { + port P p; + } + + function f_called() runs on GeneralComp { + p.getcall(S:?); + p.reply(S:{}); + } + + testcase TC_Sem_220301_CallOperation_009() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + connect(self:p, v_ptc:p); + v_ptc.start(f_called()); + p.call(S:{}) { + [] p.getreply(S:?) { setverdict(pass, "Reply received"); } + } + } + + control { + execute(TC_Sem_220301_CallOperation_009(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220301_call_operation/Sem_220301_CallOperation_010.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220301_call_operation/Sem_220301_CallOperation_010.ttcn new file mode 100644 index 00000000..508bdc19 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220301_call_operation/Sem_220301_CallOperation_010.ttcn @@ -0,0 +1,49 @@ +/***************************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:22.3.1, blocking broadcast call with response and exception handling part and subsequent alt + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirements are tested: +// In case of a multicast or broadcast call operation of a blocking procedure, two options exist. Either, +// only one response or exception is handled in the response and exception handling part of the call +// operation. Then, further responses and exceptions can be handled in subsequent alt or interleave +// statements. + +module Sem_220301_CallOperation_010 { + + signature S(); + + type port P procedure { + inout S; + } + + type component GeneralComp { + port P p; + } + + function f_called() runs on GeneralComp { + p.getcall(S:?); + p.reply(S:{}); + } + + testcase TC_Sem_220301_CallOperation_010() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc1 := GeneralComp.create, + v_ptc2 := GeneralComp.create; + connect(self:p, v_ptc1:p); + connect(self:p, v_ptc2:p); + v_ptc1.start(f_called()); + v_ptc2.start(f_called()); + p.call(S:{}) to all component { + [] p.getreply(S:?) { setverdict(pass, "First reply received"); } // first reply + } + alt { + [] p.getreply(S:?) { setverdict(pass, "Second reply received"); } // second reply + } + } + + control { + execute(TC_Sem_220301_CallOperation_010(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220301_call_operation/Sem_220301_CallOperation_011.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220301_call_operation/Sem_220301_CallOperation_011.ttcn new file mode 100644 index 00000000..19ce842e --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220301_call_operation/Sem_220301_CallOperation_011.ttcn @@ -0,0 +1,54 @@ +/***************************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:22.3.1, blocking broadcast call with response and exception handling part handling all replies + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirements are tested: +// In case of a multicast or broadcast call operation of a blocking procedure, two options exist. +// [2nd option:] +// Several responses or exceptions are handled by the use of repeat statements in one or more of the +// statement blocks of the response and exception handling part of the call operation: the execution +// of a repeat statement causes the re-evaluation of the call body. + +module Sem_220301_CallOperation_011 { + + signature S(); + + type port P procedure { + inout S; + } + + type component GeneralComp { + port P p; + } + + function f_called() runs on GeneralComp { + p.getcall(S:?); + p.reply(S:{}); + } + + testcase TC_Sem_220301_CallOperation_011() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc1 := GeneralComp.create, + v_ptc2 := GeneralComp.create; + var integer v_counter := 0; + connect(self:p, v_ptc1:p); + connect(self:p, v_ptc2:p); + v_ptc1.start(f_called()); + v_ptc2.start(f_called()); + p.call(S:{}) to all component { + [] p.getreply(S:?) { + v_counter := v_counter + 1; + if (v_counter < 2) { + repeat; + } else { + setverdict(pass, "Both replies received"); } // expected result + } + } + } + + control { + execute(TC_Sem_220301_CallOperation_011(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220301_call_operation/Sem_220301_CallOperation_012.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220301_call_operation/Sem_220301_CallOperation_012.ttcn new file mode 100644 index 00000000..d57e9ff7 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220301_call_operation/Sem_220301_CallOperation_012.ttcn @@ -0,0 +1,65 @@ +/***************************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:22.3.1, blocking multicast call with response and exception handling part and subsequent alt + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirements are tested: +// In case of a multicast or broadcast call operation of a blocking procedure, two options exist. Either, +// only one response or exception is handled in the response and exception handling part of the call +// operation. Then, further responses and exceptions can be handled in subsequent alt or interleave +// statements. + +module Sem_220301_CallOperation_012 { + + signature S(); + + type port P procedure { + inout S; + } + + type component GeneralComp { + port P p; + } + + function f_called() runs on GeneralComp { + p.getcall(S:?); + p.reply(S:{}); + } + + testcase TC_Sem_220301_CallOperation_012() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc1 := GeneralComp.create, + v_ptc2 := GeneralComp.create, + v_ptc3 := GeneralComp.create, + v_comp; + connect(self:p, v_ptc1:p); + connect(self:p, v_ptc2:p); + connect(self:p, v_ptc3:p); + v_ptc1.start(f_called()); + v_ptc2.start(f_called()); + v_ptc3.start(f_called()); + p.call(S:{}) to (v_ptc1, v_ptc3) { + [] p.getreply(S:?) -> sender v_comp { + if (v_comp == v_ptc1 or v_comp == v_ptc3) { + setverdict(pass, "First reply received"); + } else { + setverdict(fail, "Wrong component"); + } + } + } + alt { + [] p.getreply(S:?) -> sender v_comp { + if (v_comp == v_ptc1 or v_comp == v_ptc3) { + setverdict(pass, "Second reply received"); + } else { + setverdict(fail, "Wrong component"); + } + } + } + } + + control { + execute(TC_Sem_220301_CallOperation_012(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220301_call_operation/Sem_220301_CallOperation_013.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220301_call_operation/Sem_220301_CallOperation_013.ttcn new file mode 100644 index 00000000..a3d1754d --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220301_call_operation/Sem_220301_CallOperation_013.ttcn @@ -0,0 +1,63 @@ +/***************************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:22.3.1, blocking multicast call with response and exception handling part handling all replies + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirements are tested: +// In case of a multicast or broadcast call operation of a blocking procedure, two options exist. +// [2nd option:] +// Several responses or exceptions are handled by the use of repeat statements in one or more of the +// statement blocks of the response and exception handling part of the call operation: the execution +// of a repeat statement causes the re-evaluation of the call body. + +module Sem_220301_CallOperation_013 { + + signature S(); + + type port P procedure { + inout S; + } + + type component GeneralComp { + port P p; + } + + function f_called() runs on GeneralComp { + p.getcall(S:?); + p.reply(S:{}); + } + + testcase TC_Sem_220301_CallOperation_013() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc1 := GeneralComp.create, + v_ptc2 := GeneralComp.create, + v_ptc3 := GeneralComp.create, + v_comp; + var integer v_counter := 0; + connect(self:p, v_ptc1:p); + connect(self:p, v_ptc2:p); + connect(self:p, v_ptc3:p); + v_ptc1.start(f_called()); + v_ptc2.start(f_called()); + v_ptc3.start(f_called()); + p.call(S:{}) to (v_ptc1, v_ptc3) { + [] p.getreply(S:?) -> sender v_comp { + if (v_comp == v_ptc1 or v_comp == v_ptc3) { + v_counter := v_counter + 1; + if (v_counter < 2) { + repeat; + } else { + setverdict(pass, "Both replies received"); // expected result + } + } else { + setverdict(fail, "Wrong component"); + } + } + } + } + + control { + execute(TC_Sem_220301_CallOperation_013(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220301_call_operation/Sem_220301_CallOperation_014.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220301_call_operation/Sem_220301_CallOperation_014.ttcn new file mode 100644 index 00000000..bc1a2299 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220301_call_operation/Sem_220301_CallOperation_014.ttcn @@ -0,0 +1,54 @@ +/***************************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:22.3.1, non-blocking broadcast call + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirements are tested: +// In case of a multicast or broadcast call operation of a non-blocking procedure, all exceptions which +// may be raised from the different communication partners can be handled in subsequent catch, alt or +// interleave statements. + +module Sem_220301_CallOperation_014 { + + signature S() noblock; + + type port P procedure { + inout S; + } + + type component GeneralComp { + port P p; + } + + function f_called() runs on GeneralComp { + p.getcall(S:?); + p.reply(S:{}); + } + + testcase TC_Sem_220301_CallOperation_014() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc1 := GeneralComp.create, + v_ptc2 := GeneralComp.create; + var integer v_counter := 0; + connect(self:p, v_ptc1:p); + connect(self:p, v_ptc2:p); + v_ptc1.start(f_called()); + v_ptc2.start(f_called()); + p.call(S:{}) to all component; + alt { + [] p.getreply(S:?) { + v_counter := v_counter + 1; + if (v_counter < 2) { + repeat; + } else { + setverdict(pass, "Both replies received"); // both replies received + } + } + } + } + + control { + execute(TC_Sem_220301_CallOperation_014(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220301_call_operation/Sem_220301_CallOperation_015.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220301_call_operation/Sem_220301_CallOperation_015.ttcn new file mode 100644 index 00000000..5fb8e416 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220301_call_operation/Sem_220301_CallOperation_015.ttcn @@ -0,0 +1,62 @@ +/***************************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:22.3.1, non-blocking multicast call + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirements are tested: +// In case of a multicast or broadcast call operation of a non-blocking procedure, all exceptions which +// may be raised from the different communication partners can be handled in subsequent catch, alt or +// interleave statements. + +module Sem_220301_CallOperation_015 { + + signature S() noblock; + + type port P procedure { + inout S; + } + + type component GeneralComp { + port P p; + } + + function f_called() runs on GeneralComp { + p.getcall(S:?); + p.reply(S:{}); + } + + testcase TC_Sem_220301_CallOperation_015() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc1 := GeneralComp.create, + v_ptc2 := GeneralComp.create, + v_ptc3 := GeneralComp.create, + v_comp; + var integer v_counter := 0; + connect(self:p, v_ptc1:p); + connect(self:p, v_ptc2:p); + connect(self:p, v_ptc3:p); + v_ptc1.start(f_called()); + v_ptc2.start(f_called()); + v_ptc3.start(f_called()); + p.call(S:{}) to (v_ptc1, v_ptc3); + alt { + [] p.getreply(S:?) -> sender v_comp { + if (v_comp == v_ptc1 or v_comp == v_ptc3) { + v_counter := v_counter + 1; + if (v_counter < 2) { + repeat; + } else { + setverdict(pass, "Both replies received"); // success + } + } else { + setverdict(fail, "Wrong component"); + } + } + } + } + + control { + execute(TC_Sem_220301_CallOperation_015(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220301_call_operation/Sem_220301_CallOperation_016.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220301_call_operation/Sem_220301_CallOperation_016.ttcn new file mode 100644 index 00000000..3dd463e4 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220301_call_operation/Sem_220301_CallOperation_016.ttcn @@ -0,0 +1,44 @@ +/***************************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:22.3.1, non-blocking unicast call + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirements are tested: +// In case of non-blocking procedure-based communication the handling of exceptions to call operations +// is done by using catch (see clause 22.3.6) operations as alternatives in alt statements. + +module Sem_220301_CallOperation_016 { + + signature S() noblock; + + type port P procedure { + inout S; + } + + type component GeneralComp { + port P p; + } + + function f_called() runs on GeneralComp { + p.getcall(S:?); + p.reply(S:{}); + } + + testcase TC_Sem_220301_CallOperation_016() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + connect(self:p, v_ptc:p); + v_ptc.start(f_called()); + p.call(S:{}); + alt { + [] p.getreply(S:?) { + setverdict(pass, "Reply received"); // success: reply received + } + } + } + + control { + execute(TC_Sem_220301_CallOperation_016(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220301_call_operation/Sem_220301_CallOperation_017.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220301_call_operation/Sem_220301_CallOperation_017.ttcn new file mode 100644 index 00000000..56d570ba --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220301_call_operation/Sem_220301_CallOperation_017.ttcn @@ -0,0 +1,36 @@ +/***************************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:22.3.1, verify that out parameters of a signature used in a call operation can be omitted + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirements are tested: +// c) Only out parameters may be omitted or specified with a matching attribute. + +module Sem_220301_CallOperation_017 { + + signature S(out integer p_par); + + type port P procedure { + inout S; + } + + type component GeneralComp { + port P p; + } + + template S s_signature1 := { p_par := - }; + + testcase TC_Sem_220301_CallOperation_017() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create("PTC"); + connect(self:p, v_ptc:p); + p.call(s_signature1, nowait); + setverdict(pass); + } + + control{ + execute(TC_Sem_220301_CallOperation_017(), 5.0); + } + +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220301_call_operation/Sem_220301_CallOperation_018.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220301_call_operation/Sem_220301_CallOperation_018.ttcn new file mode 100644 index 00000000..c4cf6a06 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220301_call_operation/Sem_220301_CallOperation_018.ttcn @@ -0,0 +1,36 @@ +/***************************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:22.3.1, verify that out parameters of a signature used in a call operation can contain matching symbols + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirements are tested: +// c) Only out parameters may be omitted or specified with a matching attribute. + +module Sem_220301_CallOperation_022 { + + signature S(out integer p_par); + + type port P procedure { + inout S; + } + + type component GeneralComp { + port P p; + } + + template S s_signature1 := { p_par := ? }; + + testcase TC_Sem_220301_CallOperation_022() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create("PTC"); + connect(self:p, v_ptc:p); + p.call(s_signature1, nowait); + setverdict(pass); + } + + control{ + execute(TC_Sem_220301_CallOperation_022(), 5.0); + } + +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220301_call_operation/Sem_220301_CallOperation_019.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220301_call_operation/Sem_220301_CallOperation_019.ttcn new file mode 100644 index 00000000..b019d602 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220301_call_operation/Sem_220301_CallOperation_019.ttcn @@ -0,0 +1,47 @@ +/***************************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:22.3.1, verify that replies that are not related to the actual call are ignored in unqualified getreply statements + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirements are tested: +// h) The selection of the alternatives to a call shall only be based on getreply and catch operations +// for the called procedure. Unqualified getreply and catch operations shall only treat replies from +// and exceptions raised by the called procedure. + +module Sem_220301_CallOperation_019 { + + signature S1() noblock; + signature S2(); + + type port P procedure { + inout S1, S2; + } + + type component GeneralComp { + port P p; + } + + function f_called() runs on GeneralComp { + p.getcall(S1:?); + p.getcall(S2:?); + p.reply(S1:{}); + p.reply(S2:{}); + } + + testcase TC_Sem_220301_CallOperation_019() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + connect(self:p, v_ptc:p); + v_ptc.start(f_called()); + p.call(S1:{}); // non-blocking call (but the script "forgets" to handle the reply - this should clog the port + p.call(S2:{}, 1.0) { + [] p.getreply { setverdict(fail, "The reply is not the expected one!"); } // this one should receive only S2 replies, but there's S1 in the port queue + [] p.catch(timeout) { setverdict(pass, "Timeout as expected"); } + } + } + + control { + execute(TC_Sem_220301_CallOperation_019(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220301_call_operation/Sem_220301_CallOperation_020.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220301_call_operation/Sem_220301_CallOperation_020.ttcn new file mode 100644 index 00000000..5449f584 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220301_call_operation/Sem_220301_CallOperation_020.ttcn @@ -0,0 +1,47 @@ +/***************************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:22.3.1, verify that exceptions that are not related to the actual call are ignored in unqualified catch statements + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirements are tested: +// h) The selection of the alternatives to a call shall only be based on getreply and catch operations +// for the called procedure. Unqualified getreply and catch operations shall only treat replies from +// and exceptions raised by the called procedure. + +module Sem_220301_CallOperation_020 { + + signature S1() noblock exception(integer); + signature S2() exception(charstring); + + type port P procedure { + inout S1, S2; + } + + type component GeneralComp { + port P p; + } + + function f_called() runs on GeneralComp { + p.getcall(S1:?); + p.getcall(S2:?); + p.raise(S1, 1); + p.raise(S2, "exc"); + } + + testcase TC_Sem_220301_CallOperation_020() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + connect(self:p, v_ptc:p); + v_ptc.start(f_called()); + p.call(S1:{}); // non-blocking call (but the script "forgets" to handle the exception - this should clog the port + p.call(S2:{}, 1.0) { + [] p.catch { setverdict(fail, "The exception is not the expected one!"); } // this one should receive only S2 exceptions, but there's S1 in the port queue + [] p.catch(timeout) { setverdict(pass, "Timeout as expected"); } + } + } + + control { + execute(TC_Sem_220301_CallOperation_020(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/NegSem_220302_GetcallOperation_001.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/NegSem_220302_GetcallOperation_001.ttcn new file mode 100644 index 00000000..e05b0953 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/NegSem_220302_GetcallOperation_001.ttcn @@ -0,0 +1,38 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:22.3.2, Ensure that getcall operations are only used on procedure based ports + ** @verdict pass reject + ***************************************************/ + +module NegSem_220302_GetcallOperation_001 { + + + type port loopbackPort message { + inout integer + } + + + type component GeneralComp { + port loopbackPort messagePort + } + + testcase TC_NegSem_220302_GetcallOperation_001() runs on GeneralComp { + + messagePort.send(2); + + alt { + [] messagePort.getcall { //cannot use getcall on a message based port + setverdict(pass); + } + [] messagePort.receive { + setverdict(fail); + } + } + } + + control{ + execute(TC_NegSem_220302_GetcallOperation_001()); + } + +} diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/NegSem_220302_GetcallOperation_002.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/NegSem_220302_GetcallOperation_002.ttcn new file mode 100644 index 00000000..0f85cf8b --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/NegSem_220302_GetcallOperation_002.ttcn @@ -0,0 +1,123 @@ +/***************************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:22.3.2, Ensure that getcall operation does not allow value assignment + ** @verdict pass reject + *****************************************************************/ + +module NegSem_220302_GetcallOperation_002 { + + /** + * @desc testing of inline return template for remote procedure call + * @param p_par1 only input parameter + * @param p_par2 must have value 4 at return + * @param p_par3 must have value 5 at return + * @return must return value 1 + */ + signature p_NegSem_220302_GetcallOperation_002(in integer p_par1, out integer p_par2, inout integer p_par3) return integer; + + template p_NegSem_220302_GetcallOperation_002 s_returnTemplate := { + p_par1 := -, + p_par2 := 4, + p_par3 := 5 + } + + template p_NegSem_220302_GetcallOperation_002 s_wrongTemplate := { + p_par1 := -, + p_par2 := 2, + p_par3 := 3 + } + + template p_NegSem_220302_GetcallOperation_002 s_callTemplate := { + p_par1 := 1, + p_par2 := -, + p_par3 := 3 + } + + type port remotePort procedure { + inout p_NegSem_220302_GetcallOperation_002; + } + + type component GeneralComp { + port remotePort PCO; + } + + function f_ClientQuery() runs on GeneralComp { + var integer v_zero:=0; + var integer v_one:=1; + + PCO.call(p_NegSem_220302_GetcallOperation_002:s_callTemplate, 5.0) { + + [] PCO.getreply(p_NegSem_220302_GetcallOperation_002:s_wrongTemplate value 1) { + setverdict(fail); + } + [] PCO.getreply(p_NegSem_220302_GetcallOperation_002:s_returnTemplate value 2) { + setverdict(fail); + } + [v_one>v_zero] PCO.getreply(p_NegSem_220302_GetcallOperation_002:s_returnTemplate value 1) { //check that boolean guard is correctly evaluated + setverdict(pass); + } + [] PCO.catch (timeout) { + setverdict(fail); + } + } + } + + function f_ServerResponses() runs on GeneralComp { + + var integer v_par1; + var integer v_par3; + var integer v_return; + timer t_timeout:=30.0; + + template p_NegSem_220302_GetcallOperation_002 s_acceptTemplate := { + p_par1 := ?, + p_par2 := ?, + p_par3 := ? + }; + + + t_timeout.start; + + alt { + [] PCO.getcall(p_NegSem_220302_GetcallOperation_001:s_acceptTemplate) -> value v_return { //not allowed assignment + } + [] t_timeout.timeout { + } + } + + } + + + testcase TC_NegSem_220302_GetcallOperation_002() runs on GeneralComp system GeneralComp { + var GeneralComp server := GeneralComp.create("RemoteProcedure Service"); + var GeneralComp client := GeneralComp.create("RemoteProcedure Client"); + timer t_wait:=1.0; + + // map the PTCs to the system port + connect(server:PCO, client:PCO); + + server.start(f_ServerResponses()); + client.start(f_ClientQuery()); + + alt { + [] client.done { + t_wait.start; + while(t_wait.running) { //this gives a chance for server to still test for second getcall match + } + server.stop; + } + } + + alt { + [] all component.done {} + } + + disconnect(server:PCO); + } + + control{ + execute(TC_NegSem_220302_GetcallOperation_002()); + } + +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/NegSem_220302_GetcallOperation_003.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/NegSem_220302_GetcallOperation_003.ttcn new file mode 100644 index 00000000..62f3fc3f --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/NegSem_220302_GetcallOperation_003.ttcn @@ -0,0 +1,122 @@ +/***************************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:22.3.2, Ensure that getcall for any call does not allow param assignment + ** @verdict pass reject + *****************************************************************/ + +module NegSem_220302_GetcallOperation_003 { + + /** + * @desc testing of inline return template for remote procedure call + * @param p_par1 only input parameter + * @param p_par2 must have value 4 at return + * @param p_par3 must have value 5 at return + * @return must return value 1 + */ + signature p_NegSem_220302_GetcallOperation_003(in integer p_par1, out integer p_par2, inout integer p_par3) return integer; + + template p_NegSem_220302_GetcallOperation_003 s_returnTemplate := { + p_par1 := -, + p_par2 := 4, + p_par3 := 5 + } + + template p_NegSem_220302_GetcallOperation_003 s_wrongTemplate := { + p_par1 := -, + p_par2 := 2, + p_par3 := 3 + } + + template p_NegSem_220302_GetcallOperation_003 s_callTemplate := { + p_par1 := 1, + p_par2 := -, + p_par3 := 3 + } + + type port remotePort procedure { + inout p_NegSem_220302_GetcallOperation_003; + } + + type component GeneralComp { + port remotePort PCO; + } + + function f_ClientQuery() runs on GeneralComp { + var integer v_zero:=0; + var integer v_one:=1; + + PCO.call(p_NegSem_220302_GetcallOperation_003:s_callTemplate, 5.0) { + + [] PCO.getreply(p_NegSem_220302_GetcallOperation_003:s_wrongTemplate value 1) { + setverdict(fail); + } + [] PCO.getreply(p_NegSem_220302_GetcallOperation_003:s_returnTemplate value 2) { + setverdict(fail); + } + [v_one>v_zero] PCO.getreply(p_NegSem_220302_GetcallOperation_003:s_returnTemplate value 1) { //check that boolean guard is correctly evaluated + setverdict(pass); + } + [] PCO.catch (timeout) { + setverdict(fail); + } + } + } + + function f_ServerResponses() runs on GeneralComp { + + var integer v_par1; + var integer v_par3; + timer t_timeout:=30.0; + + template p_NegSem_220302_GetcallOperation_003 s_acceptTemplate := { + p_par1 := ?, + p_par2 := ?, + p_par3 := ? + }; + + + t_timeout.start; + + alt { + [] PCO.getcall -> param(v_par1, - , v_par3) { //not allowed param assignment for any call + } + [] t_timeout.timeout { + } + } + + } + + + testcase TC_NegSem_220302_GetcallOperation_003() runs on GeneralComp system GeneralComp { + var GeneralComp server := GeneralComp.create("RemoteProcedure Service"); + var GeneralComp client := GeneralComp.create("RemoteProcedure Client"); + timer t_wait:=1.0; + + // map the PTCs to the system port + connect(server:PCO, client:PCO); + + server.start(f_ServerResponses()); + client.start(f_ClientQuery()); + + alt { + [] client.done { + t_wait.start; + while(t_wait.running) { //this gives a chance for server to still test for second getcall match + } + server.stop; + } + } + + alt { + [] all component.done {} + } + + disconnect(server:PCO); + } + + control{ + execute(TC_NegSem_220302_GetcallOperation_003()); + } + +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/NegSem_220302_getcall_operation_004.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/NegSem_220302_getcall_operation_004.ttcn new file mode 100644 index 00000000..7bd7ba12 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/NegSem_220302_getcall_operation_004.ttcn @@ -0,0 +1,44 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:22.3.2, Verify that error occurs when any from getcall is applied to single port + ** @verdict pass reject + *****************************************************************/ +// The following requirements are tested: +// Restriction g +// The PortArrayRef shall be a reference to a port array variable identifier. +module NegSem_220302_getcall_operation_004 { + + signature S(); + + type port P procedure { + inout S; + } + + type component GeneralComp + { + port P p; + } + + function f() runs on GeneralComp + { + var integer v_index; + alt + { + [] any from p.getcall { setverdict(pass); } + [else] { setverdict(fail, "The any from getcall operation didn't match for some reason"); } + } + } + + testcase TC_NegSem_220302_getcall_operation_004() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + connect(self:p, v_ptc:p); + p.call(S:{}, nowait); + v_ptc.start(f()); + v_ptc.done; + } + + control { + execute(TC_NegSem_220302_getcall_operation_004(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/NegSem_220302_getcall_operation_005.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/NegSem_220302_getcall_operation_005.ttcn new file mode 100644 index 00000000..fb909662 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/NegSem_220302_getcall_operation_005.ttcn @@ -0,0 +1,54 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:22.3.2, Verify that error occurs when any from getcall is applied to 1D array and index target is array + ** @verdict pass reject + *****************************************************************/ +// The following requirements are tested: +// Restriction i +// If the index redirection is used for single-dimensional port arrays, the type +// of the integer variable shall allow storing the highest index of the respective array. +module NegSem_220302_getcall_operation_005 { + + signature S(); + + type port P procedure { + inout S; + } + + const integer c_portCount := 4; + type component GeneralComp + { + port P p[c_portCount]; + } + + function f() runs on GeneralComp + { + var integer v_index[1]; + alt + { + [] any from p.getcall(S:?) -> @index value v_index { + if(v_index[0] == 1){ + setverdict(pass); + } else { + setverdict(fail, "Index or parameter value incorrectly assigned"); + } + } + [else] { setverdict(fail, "The any from getcall operation didn't match for some reason"); } + } + } + + testcase TC_NegSem_220302_getcall_operation_005() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + for(var integer i := 0; i < c_portCount; i := i + 1) { + connect(self:p[i], v_ptc:p[i]); + if (i mod 2 > 0) { p[i].call(S:{}, nowait); } + } + v_ptc.start(f()); + v_ptc.done; + } + + control { + execute(TC_NegSem_220302_getcall_operation_005(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/NegSem_220302_getcall_operation_006.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/NegSem_220302_getcall_operation_006.ttcn new file mode 100644 index 00000000..abe4a6d5 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/NegSem_220302_getcall_operation_006.ttcn @@ -0,0 +1,54 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:22.3.2, Verify that error occurs when any from getcall is applied to 1D array and index target has wrong type + ** @verdict pass reject + *****************************************************************/ +// The following requirements are tested: +// Restriction i +// If the index redirection is used for single-dimensional port arrays, the type +// of the integer variable shall allow storing the highest index of the respective array. +module NegSem_220302_getcall_operation_006 { + + signature S(); + + type port P procedure { + inout S; + } + + const integer c_portCount := 4; + type component GeneralComp + { + port P p[c_portCount]; + } + + function f() runs on GeneralComp + { + var float v_index; + alt + { + [] any from p.getcall(S:?) -> @index value v_index { + if(v_index == 1.0){ + setverdict(pass); + } else { + setverdict(fail, "Index or parameter value incorrectly assigned"); + } + } + [else] { setverdict(fail, "The any from getcall operation didn't match for some reason"); } + } + } + + testcase TC_NegSem_220302_getcall_operation_006() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + for(var integer i := 0; i < c_portCount; i := i + 1) { + connect(self:p[i], v_ptc:p[i]); + if (i mod 2 > 0) { p[i].call(S:{}, nowait); } + } + v_ptc.start(f()); + v_ptc.done; + } + + control { + execute(TC_NegSem_220302_getcall_operation_006(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/NegSem_220302_getcall_operation_007.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/NegSem_220302_getcall_operation_007.ttcn new file mode 100644 index 00000000..63b446f4 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/NegSem_220302_getcall_operation_007.ttcn @@ -0,0 +1,60 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:22.3.2, Verify that any from getcall index redirection for multi-D arrays requires arrays of correct size + ** @verdict pass reject + *****************************************************************/ +// The following requirements are tested: +// Restriction j: +// If the index redirection is used for multi-dimensional component arrays, the size +// of the integer array or record of integer type shall exactly be the same as the dimension +// of the respective array, and its type shall allow storing the highest index (from all +// dimensions) of the array. +module NegSem_220302_getcall_operation_007 { + + signature S(integer p_par); + + type port P procedure { + inout S; + } + + const integer c_portCount := 3; + type component GeneralComp + { + port P p[c_portCount][c_portCount]; + } + + function f() runs on GeneralComp + { + var integer v_index[1], v_parValue; + var GeneralComp v_src; + alt + { + [] any from p.getcall(S:{p_par := (0..c_portCount)}) -> sender v_src @index value v_index { + if(v_index[0] == 1 and v_index[1] == 2 and v_parValue == v_index[0] + 1){ + setverdict(pass); + } else { + setverdict(fail, "Indices or parameter value incorrectly assigned"); + } + } + [else] { setverdict(fail, "The any from getcall operation didn't match for some reason"); } + } + } + + + testcase TC_NegSem_220302_getcall_operation_007() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + for(var integer i := 0; i < c_portCount; i := i + 1) { + for(var integer j := 0; j < c_portCount; j := j + 1) { + connect(self:p[i][j], v_ptc:p[i][j]); + if (i == 1 and j == 2 or i == 2 and j == 1) { p[i][j].call(S:{ p_par := i + 1 }, nowait); } + } + } + v_ptc.start(f()); + v_ptc.done; + } + + control { + execute(TC_NegSem_220302_getcall_operation_007(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/NegSem_220302_getcall_operation_008.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/NegSem_220302_getcall_operation_008.ttcn new file mode 100644 index 00000000..88fc2c28 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/NegSem_220302_getcall_operation_008.ttcn @@ -0,0 +1,59 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:22.3.2, Verify that any from getcall index redirection for multi-D arrays requires arrays + ** @verdict pass reject + *****************************************************************/ +// The following requirements are tested: +// Restriction j: +// If the index redirection is used for multi-dimensional component arrays, the size +// of the integer array or record of integer type shall exactly be the same as the dimension +// of the respective array, and its type shall allow storing the highest index (from all +// dimensions) of the array. +module NegSem_220302_getcall_operation_008 { + + signature S(integer p_par); + + type port P procedure { + inout S; + } + + const integer c_portCount := 3; + type component GeneralComp + { + port P p[c_portCount][c_portCount]; + } + + function f() runs on GeneralComp + { + var integer v_index, v_parValue; + var GeneralComp v_src; + alt + { + [] any from p.getcall(S:{p_par := (0..c_portCount)}) -> param (v_parValue := p_par) sender v_src @index value v_index { + if(v_index == 1 and v_parValue == v_index + 1){ + setverdict(pass); + } else { + setverdict(fail, "Indices or parameter value incorrectly assigned"); + } + } + [else] { setverdict(fail, "The any from getcall operation didn't match for some reason"); } + } + } + + testcase TC_NegSem_220302_getcall_operation_008() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + for(var integer i := 0; i < c_portCount; i := i + 1) { + for(var integer j := 0; j < c_portCount; j := j + 1) { + connect(self:p[i][j], v_ptc:p[i][j]); + if (i == 1 and j == 2 or i == 2 and j == 1) { p[i][j].call(S:{ p_par := i + 1 }, nowait); } + } + } + v_ptc.start(f()); + v_ptc.done; + } + + control { + execute(TC_NegSem_220302_getcall_operation_008(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/NegSem_220302_getcall_operation_009.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/NegSem_220302_getcall_operation_009.ttcn new file mode 100644 index 00000000..2d0edaac --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/NegSem_220302_getcall_operation_009.ttcn @@ -0,0 +1,46 @@ +/***************************************************************** + ** @author STF 487 (updated by STF 521) + ** @version 0.0.2 + ** @purpose 1:22.3.2, null component in the from clause of the getcall operation + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// No AddressRef in the to clause shall contain the special value null at the time +// of the operation. + +module NegSem_220302_getcall_operation_009 { + + signature S(); + + type port P procedure { + inout S; + } + + type component GeneralComp + { + port P p; + } + + function f() runs on GeneralComp + { + var GeneralComp v_compRef := null; + alt { + [] p.getcall(S:{}) from v_compRef {} // error expected + [] p.getcall(S:{}) {} + } + } + + testcase TC_NegSem_220302_getcall_operation_009() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + connect(self:p, v_ptc:p); + p.call(S:{}, nowait); + v_ptc.start(f()); + v_ptc.done; + setverdict(pass); + } + + control { + execute(TC_NegSem_220302_getcall_operation_009(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/NegSem_220302_getcall_operation_010.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/NegSem_220302_getcall_operation_010.ttcn new file mode 100644 index 00000000..759427c9 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/NegSem_220302_getcall_operation_010.ttcn @@ -0,0 +1,45 @@ +/***************************************************************** + ** @author STF 487 (updated by STF 521) + ** @version 0.0.2 + ** @purpose 1:22.3.2, null component in the multicast list of the from clause of the getcall operation + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// No AddressRef in the to clause shall contain the special value null at the time +// of the operation. + +module NegSem_220302_getcall_operation_010 { + + signature S(); + + type port P procedure { + inout S; + } + + type component GeneralComp + { + port P p; + } + + function f() runs on GeneralComp + { + var GeneralComp v_compRef := null; + alt { + [] p.getcall(S:{}) from (mtc, v_compRef) {} // error expected + } + } + + testcase TC_NegSem_220302_getcall_operation_010() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + connect(self:p, v_ptc:p); + p.call(S:{}, nowait); + v_ptc.start(f()); + v_ptc.done; + setverdict(pass); + } + + control { + execute(TC_NegSem_220302_getcall_operation_010(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/NegSem_220302_getcall_operation_011.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/NegSem_220302_getcall_operation_011.ttcn new file mode 100644 index 00000000..a7e76b64 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/NegSem_220302_getcall_operation_011.ttcn @@ -0,0 +1,51 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:22.3.2, applying @decoded to a forbidden field + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// When assigning individual fields of a message, encoded payload fields can be +// decoded prior to assignment using the @decoded modifier. In this case, the +// referenced field on the right hand sided of the assignment shall be one of the +// bitstring, hexstring, octetstring, charstring or universal charstring types. It +// shall be decoded into a value of the same type as the variable on the left hand +// side of the assignment. + +module NegSem_220302_getcall_operation_011 { + type record of integer RoI (0..255); + + signature S(RoI p_par); + + type port P procedure { + inout S; + } + + type component GeneralComp { + port P p; + } + + function f_server() runs on GeneralComp { + var integer v_res with { encode "32bit" }; + alt { + [] p.getcall(S:?) -> param (v_res := @decoded p_par) { + setverdict (pass); + } + [] p.getcall { setverdict(fail); } + } + } + + testcase TC_NegSem_220302_getcall_operation_011() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create("PTC"); + connect(self:p, v_ptc:p); + v_ptc.start(f_server()); + p.call(S:{ p_par := { 0, 0, 0, 0 } }, nowait); + v_ptc.done; + setverdict(pass); + } + + control { + execute(TC_NegSem_220302_getcall_operation_011(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/NegSem_220302_getcall_operation_012.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/NegSem_220302_getcall_operation_012.ttcn new file mode 100644 index 00000000..48575d26 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/NegSem_220302_getcall_operation_012.ttcn @@ -0,0 +1,46 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:22.3.2, decoding error in @decoded redirect assignment + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// Failure of this decoding shall cause a test case error. + +module NegSem_220302_getcall_operation_012 { + signature S(charstring p_par); + + type port P procedure { + inout S; + } + + type component GeneralComp { + port P p; + } + + function f_server() runs on GeneralComp { + var integer v_res with { encode "32bit" }; + alt { + [] p.getcall(S:?) -> param (v_res := @decoded p_par) { + setverdict (pass); + } + [] p.getcall { setverdict(pass); } + } + } + + testcase TC_NegSem_220302_getcall_operation_012() runs on GeneralComp system GeneralComp { + var integer v_src := 1953719668 with { encode "32bit" }; + var charstring v_str := encvalue_unichar(v_src) & "abcdefgij"; + var GeneralComp v_ptc := GeneralComp.create("PTC"); + connect(self:p, v_ptc:p); + v_ptc.start(f_server()); + p.call(S:{ p_par := v_str }, nowait); + v_ptc.done; + setverdict(pass); + } + + control { + execute(TC_NegSem_220302_getcall_operation_012(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/NegSem_220302_getcall_operation_013.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/NegSem_220302_getcall_operation_013.ttcn new file mode 100644 index 00000000..37cedc07 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/NegSem_220302_getcall_operation_013.ttcn @@ -0,0 +1,46 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:22.3.2, invalid format value in @decoded redirect assignment + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// Any other value shall cause an error. + +module NegSem_220302_getcall_operation_013 { + signature S(universal charstring p_par); + + type port P procedure { + inout S; + } + + type component GeneralComp { + port P p; + } + + function f_server() runs on GeneralComp { + var integer v_res with { encode "32bit" }; + alt { + [] p.getcall(S:?) -> param (v_res := @decoded("proprietary") p_par) { + setverdict(pass); + } + [] p.getcall { setverdict(pass); } + } + } + + testcase TC_NegSem_220302_getcall_operation_013() runs on GeneralComp system GeneralComp { + var integer v_src := 1953719668 with { encode "32bit" }; + var universal charstring v_str := encvalue_unichar(v_src); + var GeneralComp v_ptc := GeneralComp.create("PTC"); + connect(self:p, v_ptc:p); + v_ptc.start(f_server()); + p.call(S:{ p_par := v_str }, nowait); + v_ptc.done; + setverdict(pass); + } + + control { + execute(TC_NegSem_220302_getcall_operation_013(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/NegSem_220302_getcall_operation_014.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/NegSem_220302_getcall_operation_014.ttcn new file mode 100644 index 00000000..30b9e8cd --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/NegSem_220302_getcall_operation_014.ttcn @@ -0,0 +1,46 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:22.3.2, value of wrong type in @decoded redirect assignment + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// Any other value shall cause an error. + +module NegSem_220302_getcall_operation_014 { + signature S(universal charstring p_par); + + type port P procedure { + inout S; + } + + type component GeneralComp { + port P p; + } + + function f_server() runs on GeneralComp { + var integer v_res, v_enc := 32 with { encode "32bit" }; + alt { + [] p.getcall(S:?) -> param (v_res := @decoded(v_enc) p_par) { + setverdict (pass); + } + [] p.getcall { setverdict(pass); } + } + } + + testcase TC_NegSem_220302_getcall_operation_014() runs on GeneralComp system GeneralComp { + var integer v_src := 1953719668 with { encode "32bit" }; + var universal charstring v_str := encvalue_unichar(v_src); + var GeneralComp v_ptc := GeneralComp.create("PTC"); + connect(self:p, v_ptc:p); + v_ptc.start(f_server()); + p.call(S:{ p_par := v_str }, nowait); + v_ptc.done; + setverdict(pass); + } + + control { + execute(TC_NegSem_220302_getcall_operation_014(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/NegSem_220302_getcall_operation_015.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/NegSem_220302_getcall_operation_015.ttcn new file mode 100644 index 00000000..740cafa9 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/NegSem_220302_getcall_operation_015.ttcn @@ -0,0 +1,47 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:22.3.2, encoding parameter of @decoded redirect assignment applied to incorrect type + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// In case the referenced field is not a universal charstring, the optional +// parameter shall not be present. + +module NegSem_220202_ReceiveOperation_009 { + signature S(octetstring p_par); + + type port P procedure { + inout S; + } + + type component GeneralComp { + port P p; + } + + function f_server() runs on GeneralComp { + var charstring v_res; + alt { + [] p.getcall(S:?) -> param (v_res := @decoded("UTF-8") p_par) { + setverdict(pass); + } + [] p.getcall { setverdict(pass); } + } + } + + testcase TC_NegSem_220302_getcall_operation_015() runs on GeneralComp system GeneralComp { + var charstring v_src := "abc"; + var octetstring v_os := bit2oct(encvalue(v_src)); + var GeneralComp v_ptc := GeneralComp.create("PTC"); + connect(self:p, v_ptc:p); + v_ptc.start(f_server()); + p.call(S:{ p_par := v_os }, nowait); + v_ptc.done; + setverdict(pass); + } + + control { + execute(TC_NegSem_220302_getcall_operation_015(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/NegSem_220302_getcall_operation_016.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/NegSem_220302_getcall_operation_016.ttcn new file mode 100644 index 00000000..84a62059 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/NegSem_220302_getcall_operation_016.ttcn @@ -0,0 +1,52 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:22.3.2, incompatible from and sender clause in getreply operation + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// If the getcall operation contains both from and sender clause, the variable or parameter +// referenced in the sender clause shall be type compatible with the template in the from +// clause. + +module NegSem_220302_getcall_operation_016 { + + signature S(); + + type port P procedure { + inout S; + } + + type component GeneralComp { + var integer vc_int; + port P p; + } + + type component AltComp { + var charstring vc_str; + port P px; + } + + function f() runs on GeneralComp { + var GeneralComp v_compRef := null; + alt { + [] p.getcall(S:{}) from AltComp:? -> sender v_compRef { } // error expected + [] p.getcall(S:{}) { } + } + setverdict (pass); + } + + testcase TC_NegSem_220302_getcall_operation_016() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + connect(self:p, v_ptc:p); + p.call(S:{}, nowait); + v_ptc.start(f()); + v_ptc.done; + setverdict(pass); + } + + control { + execute(TC_NegSem_220302_getcall_operation_016(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/NegSem_220302_getcall_operation_017.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/NegSem_220302_getcall_operation_017.ttcn new file mode 100644 index 00000000..12548b02 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/NegSem_220302_getcall_operation_017.ttcn @@ -0,0 +1,54 @@ +/***************************************************************** + ** @author STF 487 (updated by STF 521) + ** @version 0.0.2 + ** @purpose 1:22.3.2, incompatible decmatch and @decoded value redirect + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// When assigning implicitly decoded parameters (by using the @decoded modifier) +// in cases where the value or template to be matched uses the MatchDecodedContent +// (decmatch) matching for the parameter to be stored, the type of the template in +// the MatchDecodedContent matching shall be type-compatible to the type of the +// variable the decoded field is stored into. + +module NegSem_220302_getcall_operation_017 { + signature S(bitstring p_par); + + type port P procedure { + inout S; + } + + type component GeneralComp { + port P p; + } + + type record Wrapped { + integer num + } + + function f_server() runs on GeneralComp { + var Wrapped v_res; + alt { + [] p.getcall(S:{ p_par := decmatch integer:? }) -> param (v_res := @decoded p_par) { + setverdict (pass); + } + [] p.getcall { setverdict(pass); } + } + } + + testcase TC_NegSem_220302_getcall_operation_017() runs on GeneralComp system GeneralComp { + var integer v_src := 5; + var bitstring v_bs := encvalue(v_src); + var GeneralComp v_ptc := GeneralComp.create("PTC"); + connect(self:p, v_ptc:p); + v_ptc.start(f_server()); + p.call(S:{ p_par := v_bs }, nowait); + v_ptc.done; + setverdict(pass); + } + + control { + execute(TC_NegSem_220302_getcall_operation_017(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/NegSem_220302_getcall_operation_018.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/NegSem_220302_getcall_operation_018.ttcn new file mode 100644 index 00000000..9b001c54 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/NegSem_220302_getcall_operation_018.ttcn @@ -0,0 +1,44 @@ +/***************************************************************** + ** @author STF 521 + ** @version 0.0.2 + ** @purpose 1:22.3.2, incompatible template in the from clause of the getcall operation + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// f) All AddressRef items in the from clause and all VariableRef items in the sender clause +// shall be of type address, component or of the address type bound to the port type (see +// section 6.2.9) of the port instance referenced in the getcall operation. + +module NegSem_220302_getcall_operation_021 { + + signature S() return integer; + + type port P procedure { + inout S; + } + + type component GeneralComp { + port P p; + } + + function f() runs on GeneralComp { + p.call(S:{}, nowait); + } + + testcase TC_NegSem_220302_getcall_operation_021() runs on GeneralComp system GeneralComp { + var charstring v_addr := "addr"; + var GeneralComp v_ptc := GeneralComp.create; + connect(self:p, v_ptc:p); + v_ptc.start(f()); + alt { + [] p.getcall(S:?) from v_addr {} // error expected + [] p.getcall {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_220302_getcall_operation_021(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/NegSem_220302_getcall_operation_019.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/NegSem_220302_getcall_operation_019.ttcn new file mode 100644 index 00000000..f460e2f4 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/NegSem_220302_getcall_operation_019.ttcn @@ -0,0 +1,51 @@ +/***************************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:22.3.2, trying to store an incompatible component value in the sender clause of a getcall operation + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// l) If the operation contains a sender clause but no from clause, the sender shall be type +// compatible with the type of the variable or parameter referenced in the sender clause. + +module NegSem_220302_getcall_operation_019 { + + signature S(); + + type port P procedure { + inout S; + } + + type component GeneralComp { + var integer vc_int; + port P p; + } + + type component AltComp { + var charstring vc_str; + port P px; + } + + function f() runs on GeneralComp { + var AltComp v_compRef := null; + alt { + [] p.getcall(S:{}) -> sender v_compRef { } // error expected + [] p.getcall(S:{}) { } + } + setverdict (pass); + } + + testcase TC_NegSem_220302_getcall_operation_019() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + connect(self:p, v_ptc:p); + p.call(S:{}, nowait); + v_ptc.start(f()); + v_ptc.done; + setverdict(pass); + } + + control { + execute(TC_NegSem_220302_getcall_operation_019(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/NegSyn_220302_getcall_operation_001.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/NegSyn_220302_getcall_operation_001.ttcn new file mode 100644 index 00000000..0f57d33a --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/NegSyn_220302_getcall_operation_001.ttcn @@ -0,0 +1,44 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:22.3.2, Verify that error occurs when using index redirection in port.getcall operation + ** @verdict pass reject + *****************************************************************/ +// The following requirements are tested: +// Restriction h +// The index redirection shall only be used when the operation is used on an any from +// port array construct. +module NegSyn_220302_getcall_operation_001 { + signature S(); + + type port P procedure { + inout S; + } + + type component GeneralComp + { + port P p; + } + + function f() runs on GeneralComp + { + var integer v_index; + alt + { + [] p.getcall -> @index value v_index { setverdict(pass); } + [else] { setverdict(fail, "The any from getcall operation didn't match for some reason"); } + } + } + + testcase TC_NegSyn_220302_getcall_operation_001() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + connect(self:p, v_ptc:p); + p.call(S:{}, nowait); + v_ptc.start(f()); + v_ptc.done; + } + + control { + execute(TC_NegSyn_220302_getcall_operation_001(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/NegSyn_220302_getcall_operation_002.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/NegSyn_220302_getcall_operation_002.ttcn new file mode 100644 index 00000000..cfd3ae69 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/NegSyn_220302_getcall_operation_002.ttcn @@ -0,0 +1,45 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:22.3.2, Verify that error occurs when using index redirection in any port.getcall operation + ** @verdict pass reject + *****************************************************************/ +// The following requirements are tested: +// Restriction h +// The index redirection shall only be used when the operation is used on an any from +// port array construct. +module NegSyn_220302_getcall_operation_002 { + + signature S(); + + type port P procedure { + inout S; + } + + type component GeneralComp + { + port P p; + } + + function f() runs on GeneralComp + { + var integer v_index; + alt + { + [] any port.getcall -> @index value v_index { setverdict(pass); } + [else] { setverdict(fail, "The any from getcall operation didn't match for some reason"); } + } + } + + testcase TC_NegSyn_220302_getcall_operation_002() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + connect(self:p, v_ptc:p); + p.call(S:{}, nowait); + v_ptc.start(f()); + v_ptc.done; + } + + control { + execute(TC_NegSyn_220302_getcall_operation_002(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/Sem_220302_GetcallOperation_001.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/Sem_220302_GetcallOperation_001.ttcn new file mode 100644 index 00000000..4600c7c7 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/Sem_220302_GetcallOperation_001.ttcn @@ -0,0 +1,126 @@ +/***************************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:22.3.2, Ensure that getcall operations remove only matching procedure from the queue + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_220302_GetcallOperation_001 { + + /** + * @desc testing of inline return template for remote procedure call + * @param p_par1 only input parameter + * @param p_par2 must have value 4 at return + * @param p_par3 must have value 5 at return + * @return must return value 1 + */ + signature p_Sem_220302_GetcallOperation_001(in integer p_par1, out integer p_par2, inout integer p_par3) return integer; + + template p_Sem_220302_GetcallOperation_001 s_returnTemplate := { + p_par1 := -, + p_par2 := 4, + p_par3 := 5 + } + + template p_Sem_220302_GetcallOperation_001 s_wrongTemplate := { + p_par1 := -, + p_par2 := 2, + p_par3 := 3 + } + + template p_Sem_220302_GetcallOperation_001 s_callTemplate := { + p_par1 := 1, + p_par2 := -, + p_par3 := 3 + } + + type port remotePort procedure { + inout p_Sem_220302_GetcallOperation_001; + } + + type component GeneralComp { + port remotePort PCO; + } + + function f_ClientQuery() runs on GeneralComp { + + PCO.call(p_Sem_220302_GetcallOperation_001:s_callTemplate, 5.0) { + + [] PCO.getreply(p_Sem_220302_GetcallOperation_001:s_wrongTemplate value 1) { + setverdict(fail); + } + [] PCO.getreply(p_Sem_220302_GetcallOperation_001:s_returnTemplate value 2) { + setverdict(fail); + } + [] PCO.getreply(p_Sem_220302_GetcallOperation_001:s_returnTemplate value 1) { //check that boolean guard is correctly evaluated + setverdict(pass); + } + [] PCO.catch (timeout) { + setverdict(fail); + } + } + } + + function f_ServerResponses() runs on GeneralComp { + + var integer v_par1; + var integer v_par3; + timer t_timeout:=30.0; + + template p_Sem_220302_GetcallOperation_001 s_noacceptTemplate := { + p_par1 := 8, + p_par2 := 8, + p_par3 := 8 + }; + + template p_Sem_220302_GetcallOperation_001 s_acceptTemplate := { + p_par1 := ?, + p_par2 := ?, + p_par3 := ? + }; + + + t_timeout.start; + + alt { + [] PCO.getcall(p_Sem_220302_GetcallOperation_001:s_noacceptTemplate) { //should not remove incoming procedure + repeat; + } + [] PCO.getcall(p_Sem_220302_GetcallOperation_001:s_acceptTemplate) -> param(v_par1, - , v_par3) { + PCO.reply(p_Sem_220302_GetcallOperation_001:{p_par1 := -, p_par2 := v_par1+v_par3, p_par3 := v_par1+v_par3+1} value v_par1); //procedure return values are sent + } + [] t_timeout.timeout { + setverdict(fail); + } + } + + } + + + testcase TC_Sem_220302_GetcallOperation_001() runs on GeneralComp system GeneralComp { + var GeneralComp server := GeneralComp.create("RemoteProcedure Service"); + var GeneralComp client := GeneralComp.create("RemoteProcedure Client"); + // map the PTCs to the system port + connect(server:PCO, client:PCO); + + server.start(f_ServerResponses()); + client.start(f_ClientQuery()); + + alt { + [] client.done { + server.stop; + } + } + + alt { + [] all component.done {} + } + + disconnect(server:PCO); + } + + control{ + execute(TC_Sem_220302_GetcallOperation_001()); + } + +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/Sem_220302_GetcallOperation_002.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/Sem_220302_GetcallOperation_002.ttcn new file mode 100644 index 00000000..0ca5213a --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/Sem_220302_GetcallOperation_002.ttcn @@ -0,0 +1,132 @@ +/***************************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:22.3.2, Ensure that getcall operations remove the matching procedure from the queue + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_220302_GetcallOperation_002 { + + /** + * @desc testing of inline return template for remote procedure call + * @param p_par1 only input parameter + * @param p_par2 must have value 4 at return + * @param p_par3 must have value 5 at return + * @return must return value 1 + */ + signature p_Sem_220302_GetcallOperation_002(in integer p_par1, out integer p_par2, inout integer p_par3) return integer; + + template p_Sem_220302_GetcallOperation_002 s_returnTemplate := { + p_par1 := -, + p_par2 := 4, + p_par3 := 5 + } + + template p_Sem_220302_GetcallOperation_002 s_wrongTemplate := { + p_par1 := -, + p_par2 := 2, + p_par3 := 3 + } + + template p_Sem_220302_GetcallOperation_002 s_callTemplate := { + p_par1 := 1, + p_par2 := -, + p_par3 := 3 + } + + type port remotePort procedure { + inout p_Sem_220302_GetcallOperation_002; + } + + type component GeneralComp { + port remotePort PCO; + } + + function f_ClientQuery() runs on GeneralComp { + var integer v_zero:=0; + var integer v_one:=1; + + PCO.call(p_Sem_220302_GetcallOperation_002:s_callTemplate, 5.0) { + + [] PCO.getreply(p_Sem_220302_GetcallOperation_002:s_wrongTemplate value 1) { + setverdict(fail); + } + [] PCO.getreply(p_Sem_220302_GetcallOperation_002:s_returnTemplate value 2) { + setverdict(fail); + } + [v_one>v_zero] PCO.getreply(p_Sem_220302_GetcallOperation_002:s_returnTemplate value 1) { //check that boolean guard is correctly evaluated + setverdict(pass); + } + [] PCO.catch (timeout) { + setverdict(fail); + } + } + } + + function f_ServerResponses() runs on GeneralComp { + + var integer v_par1; + var integer v_par3; + timer t_timeout:=30.0; + + template p_Sem_220302_GetcallOperation_002 s_noacceptTemplate := { + p_par1 := 8, + p_par2 := 8, + p_par3 := 8 + }; + + template p_Sem_220302_GetcallOperation_002 s_acceptTemplate := { + p_par1 := ?, + p_par2 := ?, + p_par3 := ? + }; + + + t_timeout.start; + + alt { + [] PCO.getcall(p_Sem_220302_GetcallOperation_002:s_acceptTemplate) -> param(v_par1, - , v_par3) { + PCO.reply(p_Sem_220302_GetcallOperation_002:{p_par1 := -, p_par2 := v_par1+v_par3, p_par3 := v_par1+v_par3+1} value v_par1); //procedure return values are sent + repeat; + } + [] PCO.getcall { //this part is not matched if procedure is removed from queue + setverdict(fail); + } + [] t_timeout.timeout { + } + } + + } + + + testcase TC_Sem_220302_GetcallOperation_002() runs on GeneralComp system GeneralComp { + var GeneralComp server := GeneralComp.create("RemoteProcedure Service"); + var GeneralComp client := GeneralComp.create("RemoteProcedure Client"); + timer t_wait:=1.0; + + // map the PTCs to the system port + connect(server:PCO, client:PCO); + + server.start(f_ServerResponses()); + client.start(f_ClientQuery()); + + alt { + [] client.done { + t_wait.start; + t_wait.timeout; //this gives a chance for server to still test for second getcall match + server.stop; + } + } + + alt { + [] all component.done {} + } + + disconnect(server:PCO); + } + + control{ + execute(TC_Sem_220302_GetcallOperation_002()); + } + +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/Sem_220302_GetcallOperation_003.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/Sem_220302_GetcallOperation_003.ttcn new file mode 100644 index 00000000..ea9cee72 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/Sem_220302_GetcallOperation_003.ttcn @@ -0,0 +1,134 @@ +/***************************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:22.3.2, Ensure that the getcall operation can be correctly restricted to a certain client + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_220302_GetcallOperation_003 { + + /** + * @desc testing of inline return template for remote procedure call + * @param p_par1 only input parameter + * @param p_par2 must have value 4 at return + * @param p_par3 must have value 5 at return + * @return must return value 1 + */ + signature p_Sem_220302_GetcallOperation_003(in integer p_par1, out integer p_par2, inout integer p_par3) return integer; + + + template p_Sem_220302_GetcallOperation_003 s_returnTemplate1 := { + p_par1 := -, + p_par2 := 4, + p_par3 := 5 + } + + template p_Sem_220302_GetcallOperation_003 s_returnTemplate2 := { + p_par1 := -, + p_par2 := 5, + p_par3 := 6 + } + + template p_Sem_220302_GetcallOperation_003 s_wrongTemplate := { + p_par1 := -, + p_par2 := 2, + p_par3 := 3 + } + + template p_Sem_220302_GetcallOperation_003 s_callTemplate(in integer i) := { + p_par1 := i, + p_par2 := -, + p_par3 := 3 + } + + type port remotePort procedure { + inout p_Sem_220302_GetcallOperation_003; + } + + type component GeneralComp { + var GeneralComp v_clientAddress; + port remotePort PCO; + } + + function f_ClientQuery(in integer p_i) runs on GeneralComp { + var boolean first:=true; + + PCO.call(p_Sem_220302_GetcallOperation_003:s_callTemplate(p_i), 5.0) { + + [first] PCO.getreply(s_returnTemplate1) { + first:=false; + } + [first] PCO.getreply(s_returnTemplate2) { + first:=false; + } + [] PCO.catch (timeout) { + // done + } + } + } + + function f_ServerResponses(in GeneralComp p_client) runs on GeneralComp { + var integer v_par1; + var integer v_par3; + timer t_timeout:=30.0; + var boolean client1_received := false; + var boolean client2_received := false; + + template p_Sem_220302_GetcallOperation_003 s_acceptTemplate := { + p_par1 := ?, + p_par2 := ?, + p_par3 := ? + }; + + + t_timeout.start; + + + alt { + [not client1_received] PCO.getcall(p_Sem_220302_GetcallOperation_003:s_acceptTemplate) from p_client -> param(v_par1, - , v_par3) sender v_clientAddress { + PCO.reply(p_Sem_220302_GetcallOperation_003:{p_par1 := -, p_par2 := v_par1+v_par3, p_par3 := v_par1+v_par3+1} value v_par1) to v_clientAddress; //procedure return values are sent + setverdict(pass, "p_client got a message"); + client1_received := true; + if (not client2_received) { + repeat; + } + } + [not client2_received] PCO.getcall(p_Sem_220302_GetcallOperation_003:s_acceptTemplate) -> param(v_par1, - , v_par3) sender v_clientAddress { + PCO.reply(p_Sem_220302_GetcallOperation_003:{p_par1 := -, p_par2 := v_par1+v_par3, p_par3 := v_par1+v_par3+1} value v_par1) to v_clientAddress; //procedure return values are sent + // response for other clients + client2_received := true; + if (not client1_received) { + repeat; + } + } + [] t_timeout.timeout { + setverdict(fail, "server received not enough messages: client 1 message received ",client1_received, " client 2 message received ",client2_received); + } + } + + } + + testcase TC_Sem_220302_GetcallOperation_003() runs on GeneralComp system GeneralComp { + var GeneralComp server := GeneralComp.create("RemoteProcedure Service"); + var GeneralComp client := GeneralComp.create("RemoteProcedure Client 1"); + var GeneralComp client2 := GeneralComp.create("RemoteProcedure Client 2"); + // map the PTCs to the system port + connect(server:PCO, client:PCO); + connect(server:PCO, client2:PCO); + + server.start(f_ServerResponses(client)); + client.start(f_ClientQuery(1)); + client2.start(f_ClientQuery(2)); + + client.done; + client2.done; + server.stop; + + disconnect(server:PCO); + } + + control{ + execute(TC_Sem_220302_GetcallOperation_003(), 5.0); + } + +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/Sem_220302_GetcallOperation_004.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/Sem_220302_GetcallOperation_004.ttcn new file mode 100644 index 00000000..7e17c4cd --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/Sem_220302_GetcallOperation_004.ttcn @@ -0,0 +1,128 @@ +/***************************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:22.3.2, Ensure that the getcall operation can be correctly restricted to a certain client + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_220302_GetcallOperation_004 { + + type charstring address; + const address c_client1Addr := "client1Addr"; + const address c_client2Addr := "client2Addr"; + + /** + * @desc testing of inline return template for remote procedure call + * @param p_par1 only input parameter + * @param p_par2 must have value 4 at return + * @param p_par3 must have value 5 at return + * @return must return value 1 + */ + signature p_Sem_220302_GetcallOperation_004(in integer p_par1, out integer p_par2, inout integer p_par3) return integer; + + + template p_Sem_220302_GetcallOperation_004 s_returnTemplate := { + p_par1 := -, + p_par2 := 4, + p_par3 := 5 + } + + template p_Sem_220302_GetcallOperation_004 s_wrongTemplate := { + p_par1 := -, + p_par2 := 2, + p_par3 := 3 + } + + template p_Sem_220302_GetcallOperation_004 s_callTemplate := { + p_par1 := 1, + p_par2 := -, + p_par3 := 3 + } + + type port remotePort procedure { + inout p_Sem_220302_GetcallOperation_004; + } + + type component GeneralComp { + port remotePort PCO; + var GeneralComp v_myAddress; + } + + function f_ClientQuery(GeneralComp p_myAddress) runs on GeneralComp { + var integer v_zero:=0; + var integer v_one:=1; + var boolean first:=true; + v_myAddress := p_myAddress; + + PCO.call(p_Sem_220302_GetcallOperation_004:s_callTemplate, 3.0) { + + [first] PCO.getreply(p_Sem_220302_GetcallOperation_004:s_returnTemplate value 1) { + first:=false; + setverdict(fail); //receiving a reply is not expected for client2 query + } + [] PCO.catch (timeout) { + setverdict(pass); + } + } + } + + function f_ServerResponses(GeneralComp p_clientAddress) runs on GeneralComp { + var GeneralComp v_clientAddress; + var integer v_par1; + var integer v_par3; + timer t_timeout:=30.0; + + template p_Sem_220302_GetcallOperation_004 s_acceptTemplate := { + p_par1 := ?, + p_par2 := ?, + p_par3 := ? + }; + + + t_timeout.start; + + alt { + [] PCO.getcall(p_Sem_220302_GetcallOperation_004:s_acceptTemplate) from p_clientAddress -> param(v_par1, - , v_par3) sender v_clientAddress { + PCO.reply(p_Sem_220302_GetcallOperation_004:{p_par1 := -, p_par2 := v_par1+v_par3, p_par3 := v_par1+v_par3+1} value v_par1) to v_clientAddress; //procedure return values are sent + repeat; + } + [] t_timeout.timeout { + setverdict(fail); + } + } + + } + + + function f_setAddress(GeneralComp p_myAddress) runs on GeneralComp { + v_myAddress := p_myAddress; + } + + testcase TC_Sem_220302_GetcallOperation_004() runs on GeneralComp system GeneralComp { + var GeneralComp server := GeneralComp.create("RemoteProcedure Service"); + var GeneralComp client := GeneralComp.create("RemoteProcedure Client"); + var GeneralComp client2 := GeneralComp.create("RemoteProcedure Client"); + // map the PTCs to the system port + connect(server:PCO, client:PCO); + connect(server:PCO, client2:PCO); + + server.start(f_ServerResponses(client)); + client.start(f_setAddress(client)); + client2.start(f_ClientQuery(client)); + + interleave { + [] client.done {} + [] client2.done {} + } + server.stop; + + all component.done; + + disconnect(server:PCO); + } + + control{ + execute(TC_Sem_220302_GetcallOperation_004()); + } + +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/Sem_220302_GetcallOperation_005.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/Sem_220302_GetcallOperation_005.ttcn new file mode 100644 index 00000000..149ca456 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/Sem_220302_GetcallOperation_005.ttcn @@ -0,0 +1,117 @@ +/***************************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:22.3.2, Ensure that getcall operations work with any port attribute + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_220302_GetcallOperation_005 { + + /** + * @desc testing of inline return template for remote procedure call + * @param p_par1 only input parameter + * @param p_par2 must have value 4 at return + * @param p_par3 must have value 5 at return + * @return must return value 1 + */ + signature p_Sem_220302_GetcallOperation_005(in integer p_par1, out integer p_par2, inout integer p_par3) return integer; + + template p_Sem_220302_GetcallOperation_005 s_returnTemplate := { + p_par1 := -, + p_par2 := 4, + p_par3 := 5 + } + + template p_Sem_220302_GetcallOperation_005 s_wrongTemplate := { + p_par1 := -, + p_par2 := 2, + p_par3 := 3 + } + + template p_Sem_220302_GetcallOperation_005 s_callTemplate := { + p_par1 := 1, + p_par2 := -, + p_par3 := 3 + } + + type port remotePort procedure { + inout p_Sem_220302_GetcallOperation_005; + } + + type component GeneralComp { + port remotePort PCO; + } + + function f_ClientQuery() runs on GeneralComp { + + PCO.call(p_Sem_220302_GetcallOperation_005:s_callTemplate, 5.0) { + + [] PCO.getreply(p_Sem_220302_GetcallOperation_005:s_wrongTemplate value 1) { + setverdict(fail); + } + [] PCO.getreply(p_Sem_220302_GetcallOperation_005:s_returnTemplate value 2) { + setverdict(fail); + } + [] PCO.getreply(p_Sem_220302_GetcallOperation_005:s_returnTemplate value 1) { //check that boolean guard is correctly evaluated + setverdict(pass); + } + [] PCO.catch (timeout) { + setverdict(fail); + } + } + } + + function f_ServerResponses() runs on GeneralComp { + + var integer v_par1; + var integer v_par3; + timer t_timeout:=30.0; + + template p_Sem_220302_GetcallOperation_005 s_acceptTemplate := { + p_par1 := ?, + p_par2 := ?, + p_par3 := ? + }; + + + t_timeout.start; + + alt { + [] any port.getcall(p_Sem_220302_GetcallOperation_005:s_acceptTemplate) -> param(v_par1, - , v_par3) { //validates getcall on any port + PCO.reply(p_Sem_220302_GetcallOperation_005:{p_par1 := -, p_par2 := v_par1+v_par3, p_par3 := v_par1+v_par3+1} value v_par1); + } + [] t_timeout.timeout { + setverdict(fail); + } + } + + } + + + testcase TC_Sem_220302_GetcallOperation_005() runs on GeneralComp system GeneralComp { + var GeneralComp server := GeneralComp.create("RemoteProcedure Service"); + var GeneralComp client := GeneralComp.create("RemoteProcedure Client"); + // map the PTCs to the system port + connect(server:PCO, client:PCO); + + server.start(f_ServerResponses()); + client.start(f_ClientQuery()); + + alt { + [] client.done { + server.stop; + } + } + + alt { + [] all component.done {} + } + + disconnect(server:PCO); + } + + control{ + execute(TC_Sem_220302_GetcallOperation_005()); + } + +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/Sem_220302_getcall_operation_006.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/Sem_220302_getcall_operation_006.ttcn new file mode 100644 index 00000000..a928dd7f --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/Sem_220302_getcall_operation_006.ttcn @@ -0,0 +1,46 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:22.3.2, Verify that any from getcall is not triggered if there hasn't been any call + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +// The following requirements are tested: +// To getcall on any port from a specific port array, use the any from PortArrayRef syntax where +// PortArrayRef shall be a reference to a port array identifier. +// The first port which matches all the criteria will cause the operation to be successful even if +// other ports in the array would also meet the criteria. +module Sem_220302_getcall_operation_006 { + signature S(); + + type port P procedure { + inout S; + } + + const integer c_portCount := 4; + type component GeneralComp + { + port P p[c_portCount]; + } + + function f() runs on GeneralComp + { + alt + { + [] any from p.getcall { setverdict(fail, "The any from getcall operation produced incorrect match"); } + [else] { setverdict(pass); } + } + } + + testcase TC_Sem_220302_getcall_operation_006() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + for(var integer i := 0; i < c_portCount; i := i + 1) { + connect(self:p[i], v_ptc:p[i]); + } + v_ptc.start(f()); + v_ptc.done; + } + + control { + execute(TC_Sem_220302_getcall_operation_006(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/Sem_220302_getcall_operation_007.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/Sem_220302_getcall_operation_007.ttcn new file mode 100644 index 00000000..fb041c1c --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/Sem_220302_getcall_operation_007.ttcn @@ -0,0 +1,47 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:22.3.2, Verify that any from getcall matches if at least one port contains enqueued call + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +// The following requirements are tested: +// To getcall on any port from a specific port array, use the any from PortArrayRef syntax where +// PortArrayRef shall be a reference to a port array identifier. +// The first port which matches all the criteria will cause the operation to be successful even if +// other ports in the array would also meet the criteria. +module Sem_220302_getcall_operation_007 { + signature S(); + + type port P procedure { + inout S; + } + + const integer c_portCount := 4; + type component GeneralComp + { + port P p[c_portCount]; + } + + function f() runs on GeneralComp + { + alt + { + [] any from p.getcall { setverdict(pass); } + [else] { setverdict(fail, "The any from getcall operation didn't match for some reason"); } + } + } + + testcase TC_Sem_220302_getcall_operation_007() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + for(var integer i := 0; i < c_portCount; i := i + 1) { + connect(self:p[i], v_ptc:p[i]); + } + p[1].call(S:{}, nowait); + v_ptc.start(f()); + v_ptc.done; + } + + control { + execute(TC_Sem_220302_getcall_operation_007(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/Sem_220302_getcall_operation_008.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/Sem_220302_getcall_operation_008.ttcn new file mode 100644 index 00000000..fdecd876 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/Sem_220302_getcall_operation_008.ttcn @@ -0,0 +1,54 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:22.3.2, Verify that any from getcall doesn't assign index when there's no suitable match + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +// The following requirements are tested: +// It is also possible to store the index of a port in a single-dimensional port array at which +// the operation was successful to a variable of type integer or, in case of multi-dimensional +// port arrays the index of the successful port to an integer array or record of integer variable. +module Sem_220302_getcall_operation_008 { + + signature S(integer p_par); + + type port P procedure { + inout S; + } + + const integer c_portCount := 4; + type component GeneralComp + { + port P p[c_portCount]; + } + + function f() runs on GeneralComp + { + var integer v_index; + alt + { + [] any from p.getcall(S:{p_par := (1..10)}) -> @index value v_index { + setverdict(fail, "The any from getcall operation produced incorrect match"); + } + [else] { setverdict(pass); } + } + if(not isbound(v_index)){ + setverdict(pass); + } else { + setverdict(fail, "Index incorrectly assigned"); + } + } + testcase TC_Sem_220302_getcall_operation_008() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + for(var integer i := 0; i < c_portCount; i := i + 1) { + connect(self:p[i], v_ptc:p[i]); + if (i mod 2 > 0) { p[i].call(S:{ p_par := i + 100 }, nowait); } + } + v_ptc.start(f()); + v_ptc.done; + } + + control { + execute(TC_Sem_220302_getcall_operation_008(), 5000.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/Sem_220302_getcall_operation_009.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/Sem_220302_getcall_operation_009.ttcn new file mode 100644 index 00000000..f748547c --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/Sem_220302_getcall_operation_009.ttcn @@ -0,0 +1,56 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:22.3.2, Verify that any from getcall doesn't change index variable when no there's no suitable match + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +// The following requirements are tested: +// It is also possible to store the index of a port in a single-dimensional port array at which +// the operation was successful to a variable of type integer or, in case of multi-dimensional +// port arrays the index of the successful port to an integer array or record of integer variable. +module Sem_220302_getcall_operation_009 { + + signature S(integer p_par); + + type port P procedure { + inout S; + } + + const integer c_portCount := 4; + type component GeneralComp + { + port P p[c_portCount]; + } + + function f() runs on GeneralComp + { + var integer v_index := 99; + var GeneralComp v_src; + alt + { + [] any from p.getcall(S:{p_par := (1..10)}) -> sender v_src @index value v_index { + setverdict(fail, "The any from getcall operation produced incorrect match"); + } + [else] { setverdict(pass); } + } + if(v_index == 99){ + setverdict(pass); + } else { + setverdict(fail, "Index incorrectly assigned"); + } + } + + testcase TC_Sem_220302_getcall_operation_009() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + for(var integer i := 0; i < c_portCount; i := i + 1) { + connect(self:p[i], v_ptc:p[i]); + if (i mod 2 > 0) { p[i].call(S:{ p_par := i + 100 }, nowait); } + } + v_ptc.start(f()); + v_ptc.done; + } + + control { + execute(TC_Sem_220302_getcall_operation_009(), 5000.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/Sem_220302_getcall_operation_010.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/Sem_220302_getcall_operation_010.ttcn new file mode 100644 index 00000000..0b13cff9 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/Sem_220302_getcall_operation_010.ttcn @@ -0,0 +1,56 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:22.3.2, Verify that any from done assigns index + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +// The following requirements are tested: +// It is also possible to store the index of a port in a single-dimensional port array at which +// the operation was successful to a variable of type integer or, in case of multi-dimensional +// port arrays the index of the successful port to an integer array or record of integer variable. +// When checking the port array for matching calls, the port indices to be checked are iterated +// from lowest to highest. +module Sem_220302_getcall_operation_010 { + + signature S(integer p_par); + + type port P procedure { + inout S; + } + + const integer c_portCount := 4; + type component GeneralComp + { + port P p[c_portCount]; + } + + function f() runs on GeneralComp + { + var integer v_index, v_parValue; + alt + { + [] any from p.getcall(S:{p_par := (0..c_portCount)}) -> param (v_parValue := p_par) @index value v_index { + if(v_index == 1 and v_parValue == v_index + 1){ + setverdict(pass); + } else { + setverdict(fail, "Index or parameter value incorrectly assigned"); + } + } + [else] { setverdict(fail, "The any from getcall operation didn't match for some reason"); } + } + } + + testcase TC_Sem_220302_getcall_operation_010() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + for(var integer i := 0; i < c_portCount; i := i + 1) { + connect(self:p[i], v_ptc:p[i]); + if (i mod 2 > 0) { p[i].call(S:{ p_par := i + 1 }, nowait); } + } + v_ptc.start(f()); + v_ptc.done; + } + + control { + execute(TC_Sem_220302_getcall_operation_010(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/Sem_220302_getcall_operation_011.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/Sem_220302_getcall_operation_011.ttcn new file mode 100644 index 00000000..72f92f8e --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/Sem_220302_getcall_operation_011.ttcn @@ -0,0 +1,59 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:22.3.2, Verify that any from getcall index redirection works for multidimensional arrays + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +// The following requirements are tested: +// Restriction j: +// If the index redirection is used for multi-dimensional component arrays, the size +// of the integer array or record of integer type shall exactly be the same as the dimension +// of the respective array, and its type shall allow storing the highest index (from all +// dimensions) of the array. +module Sem_220302_getcall_operation_011 { + + signature S(integer p_par); + + type port P procedure { + inout S; + } + + const integer c_portCount := 3; + type component GeneralComp + { + port P p[c_portCount][c_portCount]; + } + + function f() runs on GeneralComp + { + var integer v_index[2], v_parValue; + var GeneralComp v_src; + alt + { + [] any from p.getcall(S:{p_par := (0..c_portCount)}) -> param (v_parValue := p_par) sender v_src @index value v_index { + if(v_index[0] == 1 and v_index[1] == 2 and v_parValue == v_index[0] + 1){ + setverdict(pass); + } else { + setverdict(fail, "Indices or parameter value incorrectly assigned"); + } + } + [else] { setverdict(fail, "The any from getcall operation didn't match for some reason"); } + } + } + + testcase TC_Sem_220302_getcall_operation_011() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + for(var integer i := 0; i < c_portCount; i := i + 1) { + for(var integer j := 0; j < c_portCount; j := j + 1) { + connect(self:p[i][j], v_ptc:p[i][j]); + if (i == 1 and j == 2 or i == 2 and j == 1) { p[i][j].call(S:{ p_par := i + 1 }, nowait); } + } + } + v_ptc.start(f()); + v_ptc.done; + } + + control { + execute(TC_Sem_220302_getcall_operation_011(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/Sem_220302_getcall_operation_012.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/Sem_220302_getcall_operation_012.ttcn new file mode 100644 index 00000000..8d8d4227 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/Sem_220302_getcall_operation_012.ttcn @@ -0,0 +1,54 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:22.3.2, Verify any from getcall index redirection to lazy variable + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +// The following requirements are tested: +// Restriction k +// If a variable referenced in the @index clause is a lazy or fuzzy variable, the expression +// assigned to this variable is equal to the result produced by the getcall operation. Later +// evaluation of the lazy or fuzzy variable does not lead to repeated invocation of the +// getcall operation. +module Sem_220302_getcall_operation_012 { + + signature S(integer p_par); + + type port P procedure { + inout S; + } + + const integer c_portCount := 4; + type component GeneralComp + { + port P p[c_portCount]; + } + function f() runs on GeneralComp + { + var @lazy integer v_index; + alt + { + [] any from p.getcall -> @index value v_index { + if(v_index == 1){ // no getcall call during evaluation, v_index remains equal to 1 + setverdict(pass); + } else { + setverdict(fail, "Index incorrectly assigned"); + } + } + [else] { setverdict(fail, "The any from getcall didn't match for some reason"); } + } + } + testcase TC_Sem_220302_getcall_operation_012() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + for(var integer i := 0; i < c_portCount; i := i + 1) { + connect(self:p[i], v_ptc:p[i]); + if (i mod 2 > 0) { p[i].call(S:{ p_par := i + 100 }, nowait); } + } + v_ptc.start(f()); + v_ptc.done; + } + + control { + execute(TC_Sem_220302_getcall_operation_012(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/Sem_220302_getcall_operation_013.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/Sem_220302_getcall_operation_013.ttcn new file mode 100644 index 00000000..1643aadf --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/Sem_220302_getcall_operation_013.ttcn @@ -0,0 +1,54 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:22.3.2, Verify any from getcall index redirection to fuzzy variable + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +// The following requirements are tested: +// Restriction k +// If a variable referenced in the @index clause is a lazy or fuzzy variable, the expression +// assigned to this variable is equal to the result produced by the getcall operation. Later +// evaluation of the lazy or fuzzy variable does not lead to repeated invocation of the +// getcall operation. +module Sem_220302_getcall_operation_013 { + + signature S(integer p_par); + + type port P procedure { + inout S; + } + + const integer c_portCount := 4; + type component GeneralComp + { + port P p[c_portCount]; + } + function f() runs on GeneralComp + { + var @fuzzy integer v_index; + alt + { + [] any from p.getcall -> @index value v_index { + if(v_index == 1){ // no getcall call during evaluation, v_index remains equal to 1 + setverdict(pass); + } else { + setverdict(fail, "Index incorrectly assigned"); + } + } + [else] { setverdict(fail, "The any from getcall didn't match for some reason"); } + } + } + testcase TC_Sem_220302_getcall_operation_013() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + for(var integer i := 0; i < c_portCount; i := i + 1) { + connect(self:p[i], v_ptc:p[i]); + if (i mod 2 > 0) { p[i].call(S:{ p_par := i + 100 }, nowait); } + } + v_ptc.start(f()); + v_ptc.done; + } + + control { + execute(TC_Sem_220302_getcall_operation_013(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/Sem_220302_getcall_operation_014.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/Sem_220302_getcall_operation_014.ttcn new file mode 100644 index 00000000..dc0a516f --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/Sem_220302_getcall_operation_014.ttcn @@ -0,0 +1,52 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:22.3.2, @decoded redirect assignment of a bitstring field + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirements are tested: +// When assigning individual fields of a call, encoded parameters can be decoded +// prior to assignment using the @decoded modifier. In this case, the referenced +// parameter on the right hand sided of the assignment shall be one of the +// bitstring, hexstring, octetstring, charstring or universal charstring types. It +// shall be decoded into a value of the same type as the variable on the left hand +// side of the assignment. + +module Sem_220302_getcall_operation_014 { + signature S(bitstring p_par); + + type port P procedure { + inout S; + } + + type component GeneralComp { + port P p; + } + + function f_server() runs on GeneralComp { + var charstring v_res; + alt { + [] p.getcall(S:?) -> param (v_res := @decoded p_par) { + if (v_res == "abc") { setverdict (pass); } + else { setverdict(fail); } + } + [] p.getcall { setverdict(fail); } + } + } + + testcase TC_Sem_220302_getcall_operation_014() runs on GeneralComp system GeneralComp { + var charstring v_src := "abc"; + var bitstring v_bs := encvalue(v_src); + var GeneralComp v_ptc := GeneralComp.create("PTC"); + connect(self:p, v_ptc:p); + v_ptc.start(f_server()); + p.call(S:{ p_par := v_bs }, nowait); + v_ptc.done; + setverdict(pass); + } + + control { + execute(TC_Sem_220302_getcall_operation_014(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/Sem_220302_getcall_operation_015.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/Sem_220302_getcall_operation_015.ttcn new file mode 100644 index 00000000..7b479e80 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/Sem_220302_getcall_operation_015.ttcn @@ -0,0 +1,52 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:22.3.2, @decoded redirect assignment of a hexstring field + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirements are tested: +// When assigning individual fields of a call, encoded parameters can be decoded +// prior to assignment using the @decoded modifier. In this case, the referenced +// parameter on the right hand sided of the assignment shall be one of the +// bitstring, hexstring, octetstring, charstring or universal charstring types. It +// shall be decoded into a value of the same type as the variable on the left hand +// side of the assignment. + +module Sem_220302_getcall_operation_015 { + signature S(hexstring p_par); + + type port P procedure { + inout S; + } + + type component GeneralComp { + port P p; + } + + function f_server() runs on GeneralComp { + var charstring v_res; + alt { + [] p.getcall(S:?) -> param (v_res := @decoded p_par) { + if (v_res == "abc") { setverdict (pass); } + else { setverdict(fail); } + } + [] p.getcall { setverdict(fail); } + } + } + + testcase TC_Sem_220302_getcall_operation_015() runs on GeneralComp system GeneralComp { + var charstring v_src := "abc"; + var hexstring v_hs := bit2hex(encvalue(v_src)); + var GeneralComp v_ptc := GeneralComp.create("PTC"); + connect(self:p, v_ptc:p); + v_ptc.start(f_server()); + p.call(S:{ p_par := v_hs }, nowait); + v_ptc.done; + setverdict(pass); + } + + control { + execute(TC_Sem_220302_getcall_operation_015(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/Sem_220302_getcall_operation_016.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/Sem_220302_getcall_operation_016.ttcn new file mode 100644 index 00000000..cba5dd5a --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/Sem_220302_getcall_operation_016.ttcn @@ -0,0 +1,52 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:22.3.2, @decoded redirect assignment of an octetstring field + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirements are tested: +// When assigning individual fields of a call, encoded parameters can be decoded +// prior to assignment using the @decoded modifier. In this case, the referenced +// parameter on the right hand sided of the assignment shall be one of the +// bitstring, hexstring, octetstring, charstring or universal charstring types. It +// shall be decoded into a value of the same type as the variable on the left hand +// side of the assignment. + +module Sem_220302_getcall_operation_016 { + signature S(octetstring p_par); + + type port P procedure { + inout S; + } + + type component GeneralComp { + port P p; + } + + function f_server() runs on GeneralComp { + var charstring v_res; + alt { + [] p.getcall(S:?) -> param (v_res := @decoded p_par) { + if (v_res == "abc") { setverdict (pass); } + else { setverdict(fail); } + } + [] p.getcall { setverdict(fail); } + } + } + + testcase TC_Sem_220302_getcall_operation_016() runs on GeneralComp system GeneralComp { + var charstring v_src := "abc"; + var octetstring v_os := bit2oct(encvalue(v_src)); + var GeneralComp v_ptc := GeneralComp.create("PTC"); + connect(self:p, v_ptc:p); + v_ptc.start(f_server()); + p.call(S:{ p_par := v_os }, nowait); + v_ptc.done; + setverdict(pass); + } + + control { + execute(TC_Sem_220302_getcall_operation_016(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/Sem_220302_getcall_operation_017.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/Sem_220302_getcall_operation_017.ttcn new file mode 100644 index 00000000..ea38fbc3 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/Sem_220302_getcall_operation_017.ttcn @@ -0,0 +1,52 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:22.3.2, @decoded redirect assignment of a charstring field + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirements are tested: +// When assigning individual fields of a call, encoded parameters can be decoded +// prior to assignment using the @decoded modifier. In this case, the referenced +// parameter on the right hand sided of the assignment shall be one of the +// bitstring, hexstring, octetstring, charstring or universal charstring types. It +// shall be decoded into a value of the same type as the variable on the left hand +// side of the assignment. + +module Sem_220302_getcall_operation_017 { + signature S(charstring p_par); + + type port P procedure { + inout S; + } + + type component GeneralComp { + port P p; + } + + function f_server() runs on GeneralComp { + var integer v_res with { encode "32bit" }; + alt { + [] p.getcall(S:?) -> param (v_res := @decoded p_par) { + if (v_res == 1953719668) { setverdict (pass); } + else { setverdict(fail); } + } + [] p.getcall { setverdict(fail); } + } + } + + testcase TC_Sem_220302_getcall_operation_017() runs on GeneralComp system GeneralComp { + var integer v_src := 1953719668 with { encode "32bit" }; + var charstring v_str := encvalue_unichar(v_src); + var GeneralComp v_ptc := GeneralComp.create("PTC"); + connect(self:p, v_ptc:p); + v_ptc.start(f_server()); + p.call(S:{ p_par := v_str }, nowait); + v_ptc.done; + setverdict(pass); + } + + control { + execute(TC_Sem_220302_getcall_operation_017(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/Sem_220302_getcall_operation_018.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/Sem_220302_getcall_operation_018.ttcn new file mode 100644 index 00000000..9ea05639 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/Sem_220302_getcall_operation_018.ttcn @@ -0,0 +1,52 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:22.3.2, @decoded redirect assignment of a universal charstring field + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirements are tested: +// When assigning individual fields of a call, encoded parameters can be decoded +// prior to assignment using the @decoded modifier. In this case, the referenced +// parameter on the right hand sided of the assignment shall be one of the +// bitstring, hexstring, octetstring, charstring or universal charstring types. It +// shall be decoded into a value of the same type as the variable on the left hand +// side of the assignment. + +module Sem_220302_getcall_operation_018 { + signature S(universal charstring p_par); + + type port P procedure { + inout S; + } + + type component GeneralComp { + port P p; + } + + function f_server() runs on GeneralComp { + var integer v_res with { encode "32bit" }; + alt { + [] p.getcall(S:?) -> param (v_res := @decoded p_par) { + if (v_res == 1953719668) { setverdict (pass); } + else { setverdict(fail); } + } + [] p.getcall { setverdict(fail); } + } + } + + testcase TC_Sem_220302_getcall_operation_018() runs on GeneralComp system GeneralComp { + var integer v_src := 1953719668 with { encode "32bit" }; + var universal charstring v_str := encvalue_unichar(v_src); + var GeneralComp v_ptc := GeneralComp.create("PTC"); + connect(self:p, v_ptc:p); + v_ptc.start(f_server()); + p.call(S:{ p_par := v_str }, nowait); + v_ptc.done; + setverdict(pass); + } + + control { + execute(TC_Sem_220302_getcall_operation_018(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/Sem_220302_getcall_operation_019.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/Sem_220302_getcall_operation_019.ttcn new file mode 100644 index 00000000..4e772969 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/Sem_220302_getcall_operation_019.ttcn @@ -0,0 +1,50 @@ +/***************************************************************** + ** @author STF 487 (updated by STF 521) + ** @version 0.0.2 + ** @purpose 1:22.3.2, @decoded redirect assignment with encoding parameter + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirements are tested: +// In case the referenced field is of the universal charstring type, the @decoded +// clause can contain an optional parameter defining the encoding format. The +// parameter shall be of the charstring type and it shall contain one of the +// strings allowed for the decvalue_unichar function (specified in clause C.5.4). + +module Sem_220302_getcall_operation_019 { + signature S(universal charstring p_par); + + type port P procedure { + inout S; + } + + type component GeneralComp { + port P p; + } + + function f_server() runs on GeneralComp { + var integer v_res with { variant "32 bit" }; + alt { + [] p.getcall(S:?) -> param (v_res := @decoded("UTF-16LE") p_par) { + if (v_res == 1953719668) { setverdict (pass); } + else { setverdict(fail); } + } + [] p.getcall { setverdict(fail); } + } + } + + testcase TC_Sem_220302_getcall_operation_019() runs on GeneralComp system GeneralComp { + var integer v_src := 1953719668 with { variant "32 bit" }; + var universal charstring v_str := encvalue_unichar(v_src, "UTF-16LE"); + var GeneralComp v_ptc := GeneralComp.create("PTC"); + connect(self:p, v_ptc:p); + v_ptc.start(f_server()); + p.call(S:{ p_par := v_str }, nowait); + v_ptc.done; + setverdict(pass); + } + + control { + execute(TC_Sem_220302_getcall_operation_019(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/Sem_220302_getcall_operation_020.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/Sem_220302_getcall_operation_020.ttcn new file mode 100644 index 00000000..14acef18 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/Sem_220302_getcall_operation_020.ttcn @@ -0,0 +1,53 @@ +/***************************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:22.3.2, getcall with a from clause (single item) + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirements are tested: +// A getcall operation may be restricted to a certain communication partner in case +// of one-to-many connections. This restriction shall be denoted by using the from +// keyword followed by a specification of an address or component reference, a list +// of address or component references or any component. + +module Sem_220302_getcall_operation_020 { + + signature S() return integer; + + type port P procedure { + inout S; + } + + type component GeneralComp { + port P p; + } + + function f() runs on GeneralComp { + p.call(S:{}, nowait); + } + + const integer c_ptcCount := 3; + + testcase TC_Sem_220302_getcall_operation_020() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptcs[c_ptcCount]; + var integer v_receiveCounter := 0; + for (var integer i := 0; i < c_ptcCount; i := i + 1) { + v_ptcs[i] := GeneralComp.create; + connect(self:p, v_ptcs[i]:p); + v_ptcs[i].start(f()); + } + + for (var integer i := 0; i < c_ptcCount; i := i + 1) { + alt { + [] p.getcall(S:?) from v_ptcs[0] { setverdict(pass); } // expected 1 from match + [] p.getcall(S:?) { v_receiveCounter := v_receiveCounter + 1; } // expected 2 other received exceptions + } + } + if (v_receiveCounter != c_ptcCount - 1) { setverdict(fail); } + } + + control { + execute(TC_Sem_220302_getcall_operation_020(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/Sem_220302_getcall_operation_021.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/Sem_220302_getcall_operation_021.ttcn new file mode 100644 index 00000000..41559a19 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/Sem_220302_getcall_operation_021.ttcn @@ -0,0 +1,54 @@ +/***************************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:22.3.2, getcall with a from clause (multiple items) + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirements are tested: +// A getcall operation may be restricted to a certain communication partner in case +// of one-to-many connections. This restriction shall be denoted by using the from +// keyword followed by a specification of an address or component reference, a list +// of address or component references or any component. + +module Sem_220302_getcall_operation_021 { + + signature S() return integer; + + type port P procedure { + inout S; + } + + type component GeneralComp { + port P p; + } + + function f() runs on GeneralComp { + p.call(S:{}, nowait); + } + + const integer c_ptcCount := 3; + + testcase TC_Sem_220302_getcall_operation_021() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptcs[c_ptcCount]; + var integer v_fromCounter := 0, v_noFromCounter := 0; + for (var integer i := 0; i < c_ptcCount; i := i + 1) { + v_ptcs[i] := GeneralComp.create; + connect(self:p, v_ptcs[i]:p); + v_ptcs[i].start(f()); + } + + for (var integer i := 0; i < c_ptcCount; i := i + 1) { + alt { + [] p.getcall(S:?) from (v_ptcs[0], v_ptcs[1]) { v_fromCounter := v_fromCounter + 1; } + [] p.getcall(S:?) { v_noFromCounter := v_noFromCounter + 1; } + } + } + if (v_fromCounter == 2 and v_noFromCounter == 1) { setverdict(pass); } + else { setverdict(fail); } + } + + control { + execute(TC_Sem_220302_getcall_operation_021(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/Sem_220302_getcall_operation_022.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/Sem_220302_getcall_operation_022.ttcn new file mode 100644 index 00000000..5c9b4e23 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/Sem_220302_getcall_operation_022.ttcn @@ -0,0 +1,51 @@ +/***************************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:22.3.2, getcall with a from clause (any component) + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirements are tested: +// A getcall operation may be restricted to a certain communication partner in case +// of one-to-many connections. This restriction shall be denoted by using the from +// keyword followed by a specification of an address or component reference, a list +// of address or component references or any component. + +module Sem_220302_getcall_operation_022 { + + signature S(); + + type port P procedure { + inout S; + } + + type component GeneralComp { + port P p; + } + + function f() runs on GeneralComp { + p.call(S:{}, nowait); + } + + const integer c_ptcCount := 3; + + testcase TC_Sem_220302_getcall_operation_022() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptcs[c_ptcCount]; + for (var integer i := 0; i < c_ptcCount; i := i + 1) { + v_ptcs[i] := GeneralComp.create; + connect(self:p, v_ptcs[i]:p); + v_ptcs[i].start(f()); + } + + for (var integer i := 0; i < c_ptcCount; i := i + 1) { + alt { + [] p.getcall(S:?) from any component { setverdict(pass); } + [] p.getcall(S:?) { setverdict(fail); } + } + } + } + + control { + execute(TC_Sem_220302_getcall_operation_022(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220303_reply_operation/NegSem_220303_ReplyOperation_001.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220303_reply_operation/NegSem_220303_ReplyOperation_001.ttcn new file mode 100644 index 00000000..b9bcd231 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220303_reply_operation/NegSem_220303_ReplyOperation_001.ttcn @@ -0,0 +1,39 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:22.3.3, Ensure that reply operations are only used on procedure based ports + ** @verdict pass reject + ***************************************************/ + +module NegSem_220303_ReplyOperation_001 { + + + type port loopbackPort message { + inout integer + } + + +type component GeneralComp { + port loopbackPort messagePort +} + +testcase TC_NegSem_220303_ReplyOperation_001() runs on GeneralComp { + + messagePort.send(2); + + alt { + [] messagePort.receive(2) { + messagePort.reply(3); //cannot use reply on a message based port + setverdict(pass); + } + [] messagePort.receive { + setverdict(fail); + } + } +} + +control{ + execute(TC_NegSem_220303_ReplyOperation_001()); +} + +} diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220303_reply_operation/NegSem_220303_ReplyOperation_002.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220303_reply_operation/NegSem_220303_ReplyOperation_002.ttcn new file mode 100644 index 00000000..65d64c3e --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220303_reply_operation/NegSem_220303_ReplyOperation_002.ttcn @@ -0,0 +1,46 @@ +/*************************************************** + ** @author STF 487 (updated by STF 521) + ** @version 0.0.2 + ** @purpose 1:22.3.3, null component in the to clause of the reply operation + ** @verdict pass reject + ***************************************************/ + +// The following requirements are tested: +// No AddressRef in the to clause shall contain the special value null at the time +// of the operation. + +module NegSem_220303_ReplyOperation_002 { + + + signature S(); + + type port P procedure { + inout S; + } + + type component GeneralComp { + port P p; + } + + function f_server() runs on GeneralComp { + var GeneralComp v_compRef := null; + p.getcall(S:?); + p.reply(S:{}) to v_compRef; + } + + testcase TC_NegSem_220303_ReplyOperation_002() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create("PTC"); + connect(self:p, v_ptc:p); + v_ptc.start(f_server()); + p.call(S:{}, 1.0) { + [] p.getreply(S:{}) { } + [] p.catch(timeout) { } + } + setverdict(pass); + } + + control{ + execute(TC_NegSem_220303_ReplyOperation_002(), 5.0); + } + +} diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220303_reply_operation/NegSem_220303_ReplyOperation_003.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220303_reply_operation/NegSem_220303_ReplyOperation_003.ttcn new file mode 100644 index 00000000..ab7b4055 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220303_reply_operation/NegSem_220303_ReplyOperation_003.ttcn @@ -0,0 +1,46 @@ +/*************************************************** + ** @author STF 487 (updated by STF 521) + ** @version 0.0.2 + ** @purpose 1:22.3.3, null component in the multicast list of the to clause of the reply operation + ** @verdict pass reject + ***************************************************/ + +// The following requirements are tested: +// No AddressRef in the to clause shall contain the special value null at the time +// of the operation. + +module NegSem_220303_ReplyOperation_003 { + + + signature S(); + + type port P procedure { + inout S; + } + + type component GeneralComp { + port P p; + } + + function f_server() runs on GeneralComp { + var GeneralComp v_compRef := null; + p.getcall(S:?); + p.reply(S:{}) to (mtc, v_compRef); + } + + testcase TC_NegSem_220303_ReplyOperation_003() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create("PTC"); + connect(self:p, v_ptc:p); + v_ptc.start(f_server()); + p.call(S:{}, 1.0) { + [] p.getreply(S:{}) { } + [] p.catch(timeout) { } + } + setverdict(pass); + } + + control{ + execute(TC_NegSem_220303_ReplyOperation_003(), 5.0); + } + +} diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220303_reply_operation/NegSem_220303_ReplyOperation_004.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220303_reply_operation/NegSem_220303_ReplyOperation_004.ttcn new file mode 100644 index 00000000..253078fe --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220303_reply_operation/NegSem_220303_ReplyOperation_004.ttcn @@ -0,0 +1,32 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:22.3.3, verify that reply operation cannot be used on a message port + ** @verdict pass reject + ***************************************************/ + +// The following requirements are tested: +// a) A reply operation shall only be used at a procedure-based port. + +module NegSem_220303_ReplyOperation_004 { + + signature S() return integer; + + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + testcase TC_NegSem_220303_ReplyOperation_004() runs on GeneralComp { + p.reply(S:{} value 1); + setverdict(pass); + } + + control{ + execute(TC_NegSem_220303_ReplyOperation_004(), 5.0); + } + +} diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220303_reply_operation/NegSem_220303_ReplyOperation_005.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220303_reply_operation/NegSem_220303_ReplyOperation_005.ttcn new file mode 100644 index 00000000..3b70c4fd --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220303_reply_operation/NegSem_220303_ReplyOperation_005.ttcn @@ -0,0 +1,46 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:22.3.3, verify that signature not listed in the port definition cannot be used in the reply operation + ** @verdict pass reject + ***************************************************/ + +// The following requirements are tested: +// No AddressRef in the to clause shall contain the special value null at the time +// of the operation. + +module NegSem_220303_ReplyOperation_005 { + + signature S(); + signature SNotListed(); + + type port P procedure { + inout S; + } + + type component GeneralComp { + port P p; + } + + function f_server() runs on GeneralComp { + p.getcall; + p.reply(SNotListed:{}); + } + + testcase TC_NegSem_220303_ReplyOperation_005() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create("PTC"); + connect(self:p, v_ptc:p); + v_ptc.start(f_server()); + p.call(S:{}, nowait); + alt { + [] p.getreply {} + [] v_ptc.done {} + } + setverdict(pass); + } + + control{ + execute(TC_NegSem_220303_ReplyOperation_005(), 5.0); + } + +} diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220303_reply_operation/NegSem_220303_ReplyOperation_006.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220303_reply_operation/NegSem_220303_ReplyOperation_006.ttcn new file mode 100644 index 00000000..c47b0a6d --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220303_reply_operation/NegSem_220303_ReplyOperation_006.ttcn @@ -0,0 +1,51 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:22.3.3, verify that matching symbols cannot be used in out signature parameters in reply operations + ** @verdict pass reject + ***************************************************/ + +// The following requirements are tested: +// b) All out and inout parameters of the signature shall have a specific value i.e. +// the use of matching mechanisms such as AnyValue is not allowed. + +module NegSem_220303_ReplyOperation_006 { + + type record R { + integer field1, + integer field2 + } + + signature S(out R par1); + + type port P procedure { + inout S; + } + + type component GeneralComp { + port P p; + } + + function f_server() runs on GeneralComp { + var template R v_rec := { field1 := 0, field2 := ? } + p.getcall(S:?); + p.reply(S:{par1 := v_rec}); + } + + testcase TC_NegSem_220303_ReplyOperation_006() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create("PTC"); + connect(self:p, v_ptc:p); + v_ptc.start(f_server()); + p.call(S:{-}, nowait); + alt { + [] p.getreply {} + [] v_ptc.done {} + } + setverdict(pass); + } + + control{ + execute(TC_NegSem_220303_ReplyOperation_006(), 5.0); + } + +} diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220303_reply_operation/NegSem_220303_ReplyOperation_007.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220303_reply_operation/NegSem_220303_ReplyOperation_007.ttcn new file mode 100644 index 00000000..afc41b60 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220303_reply_operation/NegSem_220303_ReplyOperation_007.ttcn @@ -0,0 +1,51 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:22.3.3, verify that matching symbols cannot be used in inout signature parameters in reply operations + ** @verdict pass reject + ***************************************************/ + +// The following requirements are tested: +// b) All out and inout parameters of the signature shall have a specific value i.e. +// the use of matching mechanisms such as AnyValue is not allowed. + +module NegSem_220303_ReplyOperation_007 { + + type record R { + integer field1, + integer field2 + } + + signature S(inout R par1); + + type port P procedure { + inout S; + } + + type component GeneralComp { + port P p; + } + + function f_server() runs on GeneralComp { + var template R v_rec := { field1 := 0, field2 := ? } + p.getcall(S:?); + p.reply(S:{par1 := v_rec}); + } + + testcase TC_NegSem_220303_ReplyOperation_007() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create("PTC"); + connect(self:p, v_ptc:p); + v_ptc.start(f_server()); + p.call(S:{par1 := {field1 := 0, field2 := 5} }, nowait); + alt { + [] p.getreply {} + [] v_ptc.done {} + } + setverdict(pass); + } + + control{ + execute(TC_NegSem_220303_ReplyOperation_007(), 5.0); + } + +} diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220303_reply_operation/NegSem_220303_ReplyOperation_008.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220303_reply_operation/NegSem_220303_ReplyOperation_008.ttcn new file mode 100644 index 00000000..38ef26cb --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220303_reply_operation/NegSem_220303_ReplyOperation_008.ttcn @@ -0,0 +1,78 @@ +/***************************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:22.3.3, verify that error is issued for a missing to clause in a reply operation in case of one-to-many connections + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// c) A to clause shall be present in case of one-to-many connections. + +module NegSem_220303_ReplyOperation_008 { + + signature S(); + + type port P procedure { + inout S; + } + + type component GeneralComp { + port P p; + } + + function f_ClientQuery() runs on GeneralComp { + + p.call(S:{}, 1.0) { + + [] p.getreply(S:{}) { + } + [] p.catch (timeout) { + } + } + setverdict(pass); + } + + function f_ServerResponses() runs on GeneralComp { + var GeneralComp v_client1 := null, v_client2 := null; + + alt { + [v_client1 == null] p.getcall(S:{}) -> sender v_client1 { + if (v_client2 == null) { repeat; } + } + [v_client2 == null] p.getcall(S:{}) -> sender v_client2 { + if (v_client1 == null) { repeat; } + } + } + p.reply(S:{}); // to clause missing, but there are 2 clients! + setverdict(pass); + } + + testcase TC_NegSem_220303_ReplyOperation_008() runs on GeneralComp system GeneralComp { + var GeneralComp server := GeneralComp.create("RemoteProcedure Service"); + var GeneralComp client := GeneralComp.create("RemoteProcedure Client"); + var GeneralComp client2 := GeneralComp.create("RemoteProcedure Client"); + // map the PTCs to the system port + connect(server:p, client:p); + connect(server:p, client2:p); + + server.start(f_ServerResponses()); + + client2.start(f_ClientQuery()); + client.start(f_ClientQuery()); + + interleave { + [] client.done {} + [] client2.done {} + } + server.stop; + + alt { + [] all component.done {} + } + } + + control{ + execute(TC_NegSem_220303_ReplyOperation_008()); + } + +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220303_reply_operation/NegSem_220303_ReplyOperation_009.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220303_reply_operation/NegSem_220303_ReplyOperation_009.ttcn new file mode 100644 index 00000000..cbc3b03f --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220303_reply_operation/NegSem_220303_ReplyOperation_009.ttcn @@ -0,0 +1,47 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:22.3.3, verify that values that are not addresses or components cannot be used in the to clause of the reply operation + ** @verdict pass reject + ***************************************************/ + +// The following requirements are tested: +// d) All AddressRef items in the to clause shall be of type address, component or of the address +// type bound to the port type (see clause 6.2.9) of the port instance referenced in the reply +// operation. + +module NegSem_220303_ReplyOperation_009 { + + signature S(); + + type port P procedure { + inout S; + } + + type component GeneralComp { + port P p; + } + + function f_server() runs on GeneralComp { + var integer v_addr := 10; + p.getcall(S:?); + p.reply(S:{}) to v_addr; + } + + testcase TC_NegSem_220303_ReplyOperation_009() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create("PTC"); + connect(self:p, v_ptc:p); + v_ptc.start(f_server()); + p.call(S:{}, nowait); + alt { + [] p.getreply {} + [] v_ptc.done {} + } + setverdict(pass); + } + + control{ + execute(TC_NegSem_220303_ReplyOperation_009(), 5.0); + } + +} diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220303_reply_operation/NegSem_220303_ReplyOperation_010.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220303_reply_operation/NegSem_220303_ReplyOperation_010.ttcn new file mode 100644 index 00000000..fc94cce1 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220303_reply_operation/NegSem_220303_ReplyOperation_010.ttcn @@ -0,0 +1,46 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:22.3.3, verify that reply operation on a disconnected port causes an error + ** @verdict pass reject + ***************************************************/ + +// The following requirements are tested: +// f) Applying a reply operation to an unmapped or disconnected port shall cause a test +// case error. + +module NegSem_220303_ReplyOperation_010 { + + signature S(); + + type port P procedure { + inout S; + } + + type component GeneralComp { + port P p; + } + + function f_server() runs on GeneralComp { + p.getcall(S:?); + disconnect(self:p); + p.reply(S:{}); + } + + testcase TC_NegSem_220303_ReplyOperation_010() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create("PTC"); + connect(self:p, v_ptc:p); + v_ptc.start(f_server()); + p.call(S:{}, nowait); + alt { + [] p.getreply {} + [] v_ptc.done {} + } + setverdict(pass); + } + + control{ + execute(TC_NegSem_220303_ReplyOperation_010(), 5.0); + } + +} diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220303_reply_operation/Sem_220303_ReplyOperation_001.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220303_reply_operation/Sem_220303_ReplyOperation_001.ttcn new file mode 100644 index 00000000..c06203ba --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220303_reply_operation/Sem_220303_ReplyOperation_001.ttcn @@ -0,0 +1,116 @@ +/***************************************************************** + ** @author STF 433 (updated by STF 521) + ** @version 0.0.2 + ** @purpose 1:22.3.3, Ensure that the IUT correctly handles reply to multiple clients on the same server + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_220303_ReplyOperation_001 { + + /** + * @desc testing of inline return template for remote procedure call + * @param p_par1 only input parameter + * @param p_par2 must have value 4 at return + * @param p_par3 must have value 5 at return + * @return must return value 1 + */ + signature p_Sem_220303_ReplyOperation_002(in integer p_par1, out integer p_par2, inout integer p_par3) return integer; + + + template p_Sem_220303_ReplyOperation_002 s_returnTemplate := { + p_par1 := -, + p_par2 := 4, + p_par3 := 5 + } + + template p_Sem_220303_ReplyOperation_002 s_wrongTemplate := { + p_par1 := -, + p_par2 := 2, + p_par3 := 3 + } + + template p_Sem_220303_ReplyOperation_002 s_callTemplate := { + p_par1 := 1, + p_par2 := -, + p_par3 := 3 + } + + type port remotePort procedure { + inout p_Sem_220303_ReplyOperation_002; + } + + type component GeneralComp { + port remotePort PCO; + } + + function f_ClientQuery() runs on GeneralComp { + + PCO.call(p_Sem_220303_ReplyOperation_002:s_callTemplate, 5.0) { + + [] PCO.getreply(p_Sem_220303_ReplyOperation_002:s_returnTemplate value 1) { + setverdict(pass); + } + [] PCO.catch (timeout) { + setverdict(fail, "Component did not receive a response"); + } + } + } + + function f_ServerResponses() runs on GeneralComp { + var GeneralComp v_client1 := null, v_client2 := null; + var integer v_par1; + var integer v_par3; + timer t_timeout:=30.0; + + template p_Sem_220303_ReplyOperation_002 s_acceptTemplate := { + p_par1 := ?, + p_par2 := ?, + p_par3 := ? + }; + + t_timeout.start; + + alt { + [v_client1 == null] PCO.getcall(p_Sem_220303_ReplyOperation_002:s_acceptTemplate) -> param(v_par1, - , v_par3) sender v_client1 { + if (v_client2 == null) { repeat; } + } + [v_client2 == null] PCO.getcall(p_Sem_220303_ReplyOperation_002:s_acceptTemplate) -> param(v_par1, - , v_par3) sender v_client2 { + if (v_client1 == null) { repeat; } + } + [] t_timeout.timeout { + setverdict(fail); + } + } + PCO.reply(p_Sem_220303_ReplyOperation_002:{p_par1 := -, p_par2 := v_par1+v_par3, p_par3 := v_par1+v_par3+1} value v_par1) to all component; //sent to both connected clients + + } + + testcase TC_Sem_220303_ReplyOperation_001() runs on GeneralComp system GeneralComp { + var GeneralComp server := GeneralComp.create("RemoteProcedure Service"); + var GeneralComp client := GeneralComp.create("RemoteProcedure Client"); + var GeneralComp client2 := GeneralComp.create("RemoteProcedure Client"); + // map the PTCs to the system port + connect(server:PCO, client:PCO); + connect(server:PCO, client2:PCO); + + server.start(f_ServerResponses()); + + client2.start(f_ClientQuery()); + client.start(f_ClientQuery()); + + interleave { + [] client.done {} + [] client2.done {} + } + server.stop; + + alt { + [] all component.done {} + } + } + + control{ + execute(TC_Sem_220303_ReplyOperation_001()); + } + +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220303_reply_operation/Sem_220303_ReplyOperation_002.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220303_reply_operation/Sem_220303_ReplyOperation_002.ttcn new file mode 100644 index 00000000..8acaa0b7 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220303_reply_operation/Sem_220303_ReplyOperation_002.ttcn @@ -0,0 +1,118 @@ +/***************************************************************** + ** @author STF 433 (updated by STF 521) + ** @version 0.0.2 + ** @purpose 1:22.3.3, Ensure that the IUT correctly handles reply to multiple clients on the same server + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_220303_ReplyOperation_002 { + + /** + * @desc testing of inline return template for remote procedure call + * @param p_par1 only input parameter + * @param p_par2 must have value 4 at return + * @param p_par3 must have value 5 at return + * @return must return value 1 + */ + signature p_Sem_220303_ReplyOperation_002(in integer p_par1, out integer p_par2, inout integer p_par3) return integer; + + + template p_Sem_220303_ReplyOperation_002 s_returnTemplate := { + p_par1 := -, + p_par2 := 4, + p_par3 := 5 + } + + template p_Sem_220303_ReplyOperation_002 s_wrongTemplate := { + p_par1 := -, + p_par2 := 2, + p_par3 := 3 + } + + template p_Sem_220303_ReplyOperation_002 s_callTemplate := { + p_par1 := 1, + p_par2 := -, + p_par3 := 3 + } + + type port remotePort procedure { + inout p_Sem_220303_ReplyOperation_002; + } + + type component GeneralComp { + port remotePort PCO; + } + + function f_ClientQuery() runs on GeneralComp { + + PCO.call(p_Sem_220303_ReplyOperation_002:s_callTemplate, 5.0) { + + [] PCO.getreply(p_Sem_220303_ReplyOperation_002:s_returnTemplate value 1) { + setverdict(pass); + } + [] PCO.catch (timeout) { + setverdict(fail, "Component did not receive a response"); + } + } + } + + function f_ServerResponses() runs on GeneralComp { + var GeneralComp v_client1 := null, v_client2 := null; + var integer v_par1; + var integer v_par3; + timer t_timeout:=30.0; + + template p_Sem_220303_ReplyOperation_002 s_acceptTemplate := { + p_par1 := ?, + p_par2 := ?, + p_par3 := ? + }; + + + t_timeout.start; + + alt { + [v_client1 == null] PCO.getcall(p_Sem_220303_ReplyOperation_002:s_acceptTemplate) -> param(v_par1, - , v_par3) sender v_client1 { + if (v_client2 == null) { repeat; } + } + [v_client2 == null] PCO.getcall(p_Sem_220303_ReplyOperation_002:s_acceptTemplate) -> param(v_par1, - , v_par3) sender v_client2 { + if (v_client1 == null) { repeat; } + } + [] t_timeout.timeout { + setverdict(fail); + } + } + PCO.reply(p_Sem_220303_ReplyOperation_002:{p_par1 := -, p_par2 := v_par1+v_par3, p_par3 := v_par1+v_par3+1} value v_par1) to (v_client1, v_client2); //sent to both connected clients + + } + + + testcase TC_Sem_220303_ReplyOperation_002() runs on GeneralComp system GeneralComp { + var GeneralComp server := GeneralComp.create("RemoteProcedure Service"); + var GeneralComp client := GeneralComp.create("RemoteProcedure Client"); + var GeneralComp client2 := GeneralComp.create("RemoteProcedure Client"); + // map the PTCs to the system port + connect(server:PCO, client:PCO); + connect(server:PCO, client2:PCO); + + server.start(f_ServerResponses()); + + client2.start(f_ClientQuery()); + client.start(f_ClientQuery()); + + interleave { + [] client.done {} + [] client2.done {} + } + server.stop; + + alt { + [] all component.done {} + } + } + + control{ + execute(TC_Sem_220303_ReplyOperation_002()); + } + +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220303_reply_operation/Sem_220303_ReplyOperation_003.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220303_reply_operation/Sem_220303_ReplyOperation_003.ttcn new file mode 100644 index 00000000..588119c3 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220303_reply_operation/Sem_220303_ReplyOperation_003.ttcn @@ -0,0 +1,49 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:22.3.3, verify that functionality of a simple reply operation (implicit unicast, no return value) + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirements are tested: +// The value part of the reply operation consists of a signature reference with an associated +// actual parameter list and (optional) return value. The signature may either be defined in +// the form of a signature template or it may be defined in-line. + +// In case of one-to-one connections, the to clause may be omitted, because the receiving entity +// is uniquely identified by the system structure. + +module Sem_220303_ReplyOperation_003 { + + signature S(); + + type port P procedure { + inout S; + } + + type component GeneralComp { + port P p; + } + + function f_server() runs on GeneralComp { + p.getcall(S:?); + p.reply(S:{}); + } + + testcase TC_Sem_220303_ReplyOperation_003() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create("PTC"); + connect(self:p, v_ptc:p); + v_ptc.start(f_server()); + p.call(S:{}, nowait); + alt { + [] p.getreply {} + [] v_ptc.done {} + } + setverdict(pass); + } + + control{ + execute(TC_Sem_220303_ReplyOperation_003(), 5.0); + } + +} diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220303_reply_operation/Sem_220303_ReplyOperation_004.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220303_reply_operation/Sem_220303_ReplyOperation_004.ttcn new file mode 100644 index 00000000..2edd18f4 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220303_reply_operation/Sem_220303_ReplyOperation_004.ttcn @@ -0,0 +1,53 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:22.3.3, verify that functionality of a simple reply operation (explicit unicast, return value) + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirements are tested: +// The value part of the reply operation consists of a signature reference with an associated +// actual parameter list and (optional) return value. The signature may either be defined in +// the form of a signature template or it may be defined in-line. + +// Responses to one or more call operations may be sent to one, several or all peer entities +// connected to the addressed port. This can be specified in the same manner as described in +// clause 22.2.1. This means, the argument of the to clause of a reply operation is for unicast +// responses the address of one receiving entity, for multicast responses a list of addresses +// of a set of receivers and for broadcast responses the all component keywords. + +module Sem_220303_ReplyOperation_004 { + + signature S() return integer; + + type port P procedure { + inout S; + } + + type component GeneralComp { + port P p; + } + + function f_server() runs on GeneralComp { + var GeneralComp v_sender; + p.getcall(S:?) -> sender v_sender; + p.reply(S:{} value 2) to v_sender; + } + + testcase TC_Sem_220303_ReplyOperation_004() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create("PTC"); + connect(self:p, v_ptc:p); + v_ptc.start(f_server()); + p.call(S:{}, nowait); + alt { + [] p.getreply {} + [] v_ptc.done {} + } + setverdict(pass); + } + + control{ + execute(TC_Sem_220303_ReplyOperation_004(), 5.0); + } + +} diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220303_reply_operation/Sem_220303_ReplyOperation_005.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220303_reply_operation/Sem_220303_ReplyOperation_005.ttcn new file mode 100644 index 00000000..f742c76f --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220303_reply_operation/Sem_220303_ReplyOperation_005.ttcn @@ -0,0 +1,51 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:22.3.3, verify that in signature parameters of reply operations can contain matching symbols + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirements are tested: +// b) All out and inout parameters of the signature shall have a specific value i.e. +// the use of matching mechanisms such as AnyValue is not allowed. + +module Sem_220303_ReplyOperation_005 { + + type record R { + integer field1, + integer field2 + } + + signature S(in R par1); + + type port P procedure { + inout S; + } + + type component GeneralComp { + port P p; + } + + function f_server() runs on GeneralComp { + var template R v_rec := { field1 := 0, field2 := ? } + p.getcall(S:?); + p.reply(S:{par1 := v_rec}); + } + + testcase TC_Sem_220303_ReplyOperation_005() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create("PTC"); + connect(self:p, v_ptc:p); + v_ptc.start(f_server()); + p.call(S:{ par1 := { field1 := 0, field2 := 10 } }, nowait); + alt { + [] p.getreply {} + [] v_ptc.done {} + } + setverdict(pass); + } + + control{ + execute(TC_Sem_220303_ReplyOperation_005(), 5.0); + } + +} diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/NegSem_220304_getreply_operation_001.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/NegSem_220304_getreply_operation_001.ttcn new file mode 100644 index 00000000..e1c2c72a --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/NegSem_220304_getreply_operation_001.ttcn @@ -0,0 +1,45 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:22.3.4, Verify that error occurs when any from getreply is applied to single port + ** @verdict pass reject + *****************************************************************/ +// The following requirements are tested: +// Restriction e +// The PortArrayRef shall be a reference to a port array variable identifier. +module NegSem_220304_getreply_operation_001 { + + signature S(); + + type port P procedure { + inout S; + } + + type component GeneralComp + { + port P p; + } + + function f() runs on GeneralComp + { + p.getcall(S:?); + p.reply(S:{}); + } + + testcase TC_NegSem_220304_getreply_operation_001() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + connect(self:p, v_ptc:p); + p.call(S:{}, nowait); + v_ptc.start(f()); + v_ptc.done; + alt + { + [] any from p.getreply { setverdict(pass); } + [else] { setverdict(fail, "The any from getreply operation didn't match for some reason"); } + } + } + + control { + execute(TC_NegSem_220304_getreply_operation_001(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/NegSem_220304_getreply_operation_002.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/NegSem_220304_getreply_operation_002.ttcn new file mode 100644 index 00000000..b145dbc4 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/NegSem_220304_getreply_operation_002.ttcn @@ -0,0 +1,58 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:22.3.4, Verify that error occurs when any from getreply is applied to 1D array and index target is array + ** @verdict pass reject + *****************************************************************/ +// The following requirements are tested: +// Restriction g +// If the index redirection is used for single-dimensional port arrays, the type +// of the integer variable shall allow storing the highest index of the respective array. +module NegSem_220304_getreply_operation_002 { + + signature S(); + + type port P procedure { + inout S; + } + + const integer c_portCount := 4; + type component GeneralComp + { + port P p[c_portCount]; + } + + function f() runs on GeneralComp + { + for(var integer i := 0; i < c_portCount; i := i + 1) { + p[i].getcall; + if (i mod 2 == 1) { p[i].reply(S:{}) }; + } + } + + testcase TC_NegSem_220304_getreply_operation_002() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + var integer v_index[1]; + for(var integer i := 0; i < c_portCount; i := i + 1) { + connect(self:p[i], v_ptc:p[i]); + p[i].call(S:{}, nowait); + } + v_ptc.start(f()); + v_ptc.done; + alt + { + [] any from p.getreply(S:?) -> @index value v_index { + if(v_index[0] == 1){ + setverdict(pass); + } else { + setverdict(fail, "Index or parameter value incorrectly assigned"); + } + } + [else] { setverdict(fail, "The any from getreply operation didn't match for some reason"); } + } + } + + control { + execute(TC_NegSem_220304_getreply_operation_002(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/NegSem_220304_getreply_operation_003.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/NegSem_220304_getreply_operation_003.ttcn new file mode 100644 index 00000000..c7aa5ce8 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/NegSem_220304_getreply_operation_003.ttcn @@ -0,0 +1,58 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:22.3.4, Verify that error occurs when any from getreply is applied to 1D array and index target has wrong type + ** @verdict pass reject + *****************************************************************/ +// The following requirements are tested: +// Restriction g +// If the index redirection is used for single-dimensional port arrays, the type +// of the integer variable shall allow storing the highest index of the respective array. +module NegSem_220304_getreply_operation_003 { + + signature S(); + + type port P procedure { + inout S; + } + + const integer c_portCount := 4; + type component GeneralComp + { + port P p[c_portCount]; + } + + function f() runs on GeneralComp + { + for(var integer i := 0; i < c_portCount; i := i + 1) { + p[i].getcall; + if (i mod 2 == 1) { p[i].reply(S:{}) }; + } + } + + testcase TC_NegSem_220304_getreply_operation_003() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + var float v_index; + for(var integer i := 0; i < c_portCount; i := i + 1) { + connect(self:p[i], v_ptc:p[i]); + p[i].call(S:{}, nowait); + } + v_ptc.start(f()); + v_ptc.done; + alt + { + [] any from p.getreply(S:?) -> @index value v_index { + if(v_index == 1.0){ + setverdict(pass); + } else { + setverdict(fail, "Index or parameter value incorrectly assigned"); + } + } + [else] { setverdict(fail, "The any from getreply operation didn't match for some reason"); } + } + } + + control { + execute(TC_NegSem_220304_getreply_operation_003(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/NegSem_220304_getreply_operation_004.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/NegSem_220304_getreply_operation_004.ttcn new file mode 100644 index 00000000..f8ca6a60 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/NegSem_220304_getreply_operation_004.ttcn @@ -0,0 +1,64 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:22.3.4, Verify that any from getreply index redirection for multi-D arrays requires arrays of correct size + ** @verdict pass reject + *****************************************************************/ +// The following requirements are tested: +// Restriction h: +// If the index redirection is used for multi-dimensional component arrays, the size +// of the integer array or record of integer type shall exactly be the same as the dimension +// of the respective array, and its type shall allow storing the highest index (from all +// dimensions) of the array. +module NegSem_220304_getreply_operation_004 { + + signature S(); + + type port P procedure { + inout S; + } + + const integer c_portCount := 3; + type component GeneralComp + { + port P p[c_portCount][c_portCount]; + } + + function f() runs on GeneralComp + { + for(var integer i := 0; i < c_portCount; i := i + 1) { + for(var integer j := 0; j < c_portCount; j := j + 1) { + p[i][j].getcall(S:?); + if (i == 1 and j == 2 or i == 2 and j == 1) { p[i][j].reply(S:{}); } + } + } + } + + + testcase TC_NegSem_220304_getreply_operation_004() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create, v_src; + var integer v_index[1]; + for(var integer i := 0; i < c_portCount; i := i + 1) { + for(var integer j := 0; j < c_portCount; j := j + 1) { + connect(self:p[i][j], v_ptc:p[i][j]); + p[i][j].call(S:{}, nowait); + } + } + v_ptc.start(f()); + v_ptc.done; + alt + { + [] any from p.getreply(S:{}) -> sender v_src @index value v_index { + if(v_index[0] == 1 and v_index[1] == 2){ + setverdict(pass); + } else { + setverdict(fail, "Indices or parameter value incorrectly assigned"); + } + } + [else] { setverdict(fail, "The any from getreply operation didn't match for some reason"); } + } } + + control { + execute(TC_NegSem_220304_getreply_operation_004(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/NegSem_220304_getreply_operation_005.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/NegSem_220304_getreply_operation_005.ttcn new file mode 100644 index 00000000..96f40175 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/NegSem_220304_getreply_operation_005.ttcn @@ -0,0 +1,64 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:22.3.4, Verify that any from getreply index redirection for multi-D arrays requires arrays + ** @verdict pass reject + *****************************************************************/ +// The following requirements are tested: +// Restriction h: +// If the index redirection is used for multi-dimensional component arrays, the size +// of the integer array or record of integer type shall exactly be the same as the dimension +// of the respective array, and its type shall allow storing the highest index (from all +// dimensions) of the array. +module NegSem_220304_getreply_operation_005 { + + signature S(); + + type port P procedure { + inout S; + } + + const integer c_portCount := 3; + type component GeneralComp + { + port P p[c_portCount][c_portCount]; + } + + function f() runs on GeneralComp + { + for(var integer i := 0; i < c_portCount; i := i + 1) { + for(var integer j := 0; j < c_portCount; j := j + 1) { + p[i][j].getcall(S:?); + if (i == 1 and j == 2 or i == 2 and j == 1) { p[i][j].reply(S:{}); } + } + } + } + + testcase TC_NegSem_220304_getreply_operation_005() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create, v_src; + var integer v_index; + for(var integer i := 0; i < c_portCount; i := i + 1) { + for(var integer j := 0; j < c_portCount; j := j + 1) { + connect(self:p[i][j], v_ptc:p[i][j]); + p[i][j].call(S:{}, nowait); + } + } + v_ptc.start(f()); + v_ptc.done; + alt + { + [] any from p.getreply(S:{}) -> @index value v_index { + if(v_index == 1){ + setverdict(pass); + } else { + setverdict(fail, "Indices or parameter value incorrectly assigned"); + } + } + [else] { setverdict(fail, "The any from getreply operation didn't match for some reason"); } + } + } + + control { + execute(TC_NegSem_220304_getreply_operation_005(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/NegSem_220304_getreply_operation_006.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/NegSem_220304_getreply_operation_006.ttcn new file mode 100644 index 00000000..727c05b3 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/NegSem_220304_getreply_operation_006.ttcn @@ -0,0 +1,46 @@ +/***************************************************************** + ** @author STF 487 (updated by STF 521) + ** @version 0.0.2 + ** @purpose 1:22.3.4, null component in the from clause of the getreply operation + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// No AddressRef in the to clause shall contain the special value null at the time +// of the operation. + +module NegSem_220304_getreply_operation_006 { + + signature S(); + + type port P procedure { + inout S; + } + + type component GeneralComp + { + port P p; + } + + function f() runs on GeneralComp + { + p.getcall(S:{}); + p.reply(S:{}); + } + + testcase TC_NegSem_220304_getreply_operation_006() runs on GeneralComp system GeneralComp { + var GeneralComp v_compRef := null; + var GeneralComp v_ptc := GeneralComp.create; + connect(self:p, v_ptc:p); + v_ptc.start(f()); + p.call(S:{}) { + [] p.getreply(S:{}) from v_compRef {} // error expected + [] p.getreply(S:{}) {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_220304_getreply_operation_006(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/NegSem_220304_getreply_operation_007.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/NegSem_220304_getreply_operation_007.ttcn new file mode 100644 index 00000000..ec6b39d8 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/NegSem_220304_getreply_operation_007.ttcn @@ -0,0 +1,45 @@ +/***************************************************************** + ** @author STF 487 (updated by STF 521) + ** @version 0.0.2 + ** @purpose 1:22.3.4, null component in the multicast list of the from clause of the getreply operation + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// No AddressRef in the to clause shall contain the special value null at the time +// of the operation. + +module NegSem_220304_getreply_operation_007 { + + signature S(); + + type port P procedure { + inout S; + } + + type component GeneralComp + { + port P p; + } + + function f() runs on GeneralComp + { + p.getcall(S:{}); + p.reply(S:{}); + } + + testcase TC_NegSem_220304_getreply_operation_007() runs on GeneralComp system GeneralComp { + var GeneralComp v_compRef := null; + var GeneralComp v_ptc := GeneralComp.create; + connect(self:p, v_ptc:p); + v_ptc.start(f()); + p.call(S:{}) { + [] p.getreply(S:{}) from (mtc, v_compRef) {} // error expected + } + setverdict(pass); + } + + control { + execute(TC_NegSem_220304_getreply_operation_007(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/NegSem_220304_getreply_operation_008.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/NegSem_220304_getreply_operation_008.ttcn new file mode 100644 index 00000000..b7ca1a8c --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/NegSem_220304_getreply_operation_008.ttcn @@ -0,0 +1,51 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:22.3.4, applying @decoded to a forbidden parameter field + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// When assigning individual fields of a reply, encoded parameters can be decoded +// prior to assignment using the @decoded modifier. In this case, the referenced +// parameter on the right hand sided of the assignment shall be one of the +// bitstring, hexstring, octetstring, charstring or universal charstring types. It +// shall be decoded into a value of the same type as the variable on the left hand +// side of the assignment. + +module NegSem_220304_getreply_operation_008 { + type record of integer RoI (0..255); + + signature S(out RoI p_par); + + type port P procedure { + inout S; + } + + type component GeneralComp { + port P p; + } + + function f_server() runs on GeneralComp { + p.getcall(S:?); + p.reply(S:{ p_par := { 0, 0, 0, 0 } }); + } + + testcase TC_NegSem_220304_getreply_operation_008() runs on GeneralComp system GeneralComp { + var integer v_res with { encode "32bit" }; + var GeneralComp v_ptc := GeneralComp.create("PTC"); + connect(self:p, v_ptc:p); + v_ptc.start(f_server()); + p.call(S:{ p_par := { 0, 0, 0, 0 } }) { + [] p.getreply(S:?) -> param (v_res := @decoded p_par) { + setverdict (pass); + } + [] p.getreply { setverdict(fail); } + + } + } + + control { + execute(TC_NegSem_220304_getreply_operation_008(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/NegSem_220304_getreply_operation_009.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/NegSem_220304_getreply_operation_009.ttcn new file mode 100644 index 00000000..fae32d02 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/NegSem_220304_getreply_operation_009.ttcn @@ -0,0 +1,45 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:22.3.4, decoding error in @decoded redirect parameter assignment + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// Failure of this decoding shall cause a test case error. + +module NegSem_220304_getreply_operation_009 { + signature S(out charstring p_par); + + type port P procedure { + inout S; + } + + type component GeneralComp { + port P p; + } + + function f_server() runs on GeneralComp { + var integer v_src := 1953719668 with { encode "32bit" }; + var charstring v_str := encvalue_unichar(v_src) & "abcdefgij"; + p.getcall(S:?); + p.reply(S:{ p_par := v_str }); + } + + testcase TC_NegSem_220304_getreply_operation_009() runs on GeneralComp system GeneralComp { + var integer v_res with { encode "32bit" }; + var GeneralComp v_ptc := GeneralComp.create("PTC"); + connect(self:p, v_ptc:p); + v_ptc.start(f_server()); + p.call(S:{ p_par := - }) { + [] p.getreply(S:?) -> param (v_res := @decoded p_par) { + setverdict (pass); + } + [] p.getreply { setverdict(pass); } + } + } + + control { + execute(TC_NegSem_220304_getreply_operation_009(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/NegSem_220304_getreply_operation_010.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/NegSem_220304_getreply_operation_010.ttcn new file mode 100644 index 00000000..567ca9ed --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/NegSem_220304_getreply_operation_010.ttcn @@ -0,0 +1,47 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:22.3.4, invalid format value in @decoded redirect parameter assignment + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// Any other value shall cause an error. + +module NegSem_220304_getreply_operation_010 { + signature S(out universal charstring p_par); + + type port P procedure { + inout S; + } + + type component GeneralComp { + port P p; + } + + function f_server() runs on GeneralComp { + var integer v_src := 1953719668 with { encode "32bit" }; + var universal charstring v_str := encvalue_unichar(v_src); + p.getcall(S:?); + p.reply(S:{ p_par := v_str }); + } + + testcase TC_NegSem_220304_getreply_operation_010() runs on GeneralComp system GeneralComp { + var integer v_res with { encode "32bit" }; + var GeneralComp v_ptc := GeneralComp.create("PTC"); + connect(self:p, v_ptc:p); + v_ptc.start(f_server()); + p.call(S:{ p_par := - }) { + [] p.getreply(S:?) -> param (v_res := @decoded("proprietary") p_par) { + setverdict(pass); + } + [] p.getreply { setverdict(pass); } + } + v_ptc.done; + setverdict(pass); + } + + control { + execute(TC_NegSem_220304_getreply_operation_010(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/NegSem_220304_getreply_operation_011.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/NegSem_220304_getreply_operation_011.ttcn new file mode 100644 index 00000000..f47c61e3 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/NegSem_220304_getreply_operation_011.ttcn @@ -0,0 +1,46 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:22.3.4, value of wrong type in @decoded redirect parameter assignment + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// Any other value shall cause an error. + +module NegSem_220304_getreply_operation_011 { + signature S(out universal charstring p_par); + + type port P procedure { + inout S; + } + + type component GeneralComp { + port P p; + } + + function f_server() runs on GeneralComp { + var integer v_src := 1953719668 with { encode "32bit" }; + var universal charstring v_str := encvalue_unichar(v_src); + p.getcall(S:?); + p.reply(S:{ p_par := v_str }); + } + + testcase TC_NegSem_220304_getreply_operation_011() runs on GeneralComp system GeneralComp { + var integer v_res, v_enc := 32 with { encode "32bit" }; + var GeneralComp v_ptc := GeneralComp.create("PTC"); + connect(self:p, v_ptc:p); + v_ptc.start(f_server()); + p.call(S:{ p_par := - }) { + [] p.getreply(S:?) -> param (v_res := @decoded(v_enc) p_par) { + setverdict (pass); + } + [] p.getreply { setverdict(pass); } + } + + } + + control { + execute(TC_NegSem_220304_getreply_operation_011(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/NegSem_220304_getreply_operation_012.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/NegSem_220304_getreply_operation_012.ttcn new file mode 100644 index 00000000..49907961 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/NegSem_220304_getreply_operation_012.ttcn @@ -0,0 +1,47 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:22.3.4, encoding parameter of @decoded redirect parameter assignment applied to incorrect type + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// In case the referenced field is not a universal charstring, the optional +// parameter shall not be present. + +module NegSem_220202_ReceiveOperation_012 { + signature S(out octetstring p_par); + + type port P procedure { + inout S; + } + + type component GeneralComp { + port P p; + } + + function f_server() runs on GeneralComp { + var charstring v_src := "abc"; + var octetstring v_os := bit2oct(encvalue(v_src)); + p.getcall(S:?); + p.reply(S:{ p_par := v_os }); + } + + testcase TC_NegSem_220304_getreply_operation_012() runs on GeneralComp system GeneralComp { + var charstring v_res; + var GeneralComp v_ptc := GeneralComp.create("PTC"); + connect(self:p, v_ptc:p); + v_ptc.start(f_server()); + p.call(S:{ p_par := - }) { + [] p.getreply(S:?) -> param (v_res := @decoded("UTF-8") p_par) { + setverdict(pass); + } + [] p.getreply { setverdict(pass); } + } + + } + + control { + execute(TC_NegSem_220304_getreply_operation_012(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/NegSem_220304_getreply_operation_013.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/NegSem_220304_getreply_operation_013.ttcn new file mode 100644 index 00000000..5d92dfb8 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/NegSem_220304_getreply_operation_013.ttcn @@ -0,0 +1,51 @@ +/***************************************************************** + ** @author STF 487 (updated by STF 521) + ** @version 0.0.2 + ** @purpose 1:22.3.4, incompatible from and sender clause in getreply operation + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// If the getreply operation contains both from and sender clause, the variable or parameter +// referenced in the sender clause shall be type compatible with the template in the from +// clause. + +module NegSem_220304_getreply_operation_013 { + + signature S(); + + type port P procedure { + inout S; + } + + type component GeneralComp { + var integer vc_int; + port P p; + } + + type component AltComp { + var charstring vc_str; + port P px; + } + + function f() runs on GeneralComp { + p.getcall(S:?); + p.reply(S:{}); + } + + testcase TC_NegSem_220304_getreply_operation_013() runs on GeneralComp system GeneralComp { + var GeneralComp v_compRef := null; + var GeneralComp v_ptc := GeneralComp.create; + connect(self:p, v_ptc:p); + v_ptc.start(f()); + p.call(S:{}) { + [] p.getreply(S:{}) from AltComp:? -> sender v_compRef { } // error expected + [] p.getreply(S:{}) { } + } + setverdict(pass); + } + + control { + execute(TC_NegSem_220304_getreply_operation_013(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/NegSem_220304_getreply_operation_014.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/NegSem_220304_getreply_operation_014.ttcn new file mode 100644 index 00000000..2570ac42 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/NegSem_220304_getreply_operation_014.ttcn @@ -0,0 +1,53 @@ +/***************************************************************** + ** @author STF 487 (updated by STF 521) + ** @version 0.0.2 + ** @purpose 1:22.3.4, incompatible decmatch and @decoded parameter redirect + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// When assigning implicitly decoded parameters (by using the @decoded modifier) +// in cases where the value or template to be matched uses the MatchDecodedContent +// (decmatch) matching for the parameter to be stored, the type of the template in +// the MatchDecodedContent matching shall be type-compatible to the type of the +// variable the decoded field is stored into. + +module NegSem_220304_getreply_operation_014 { + signature S(out bitstring p_par); + + type port P procedure { + inout S; + } + + type component GeneralComp { + port P p; + } + + type record Wrapped { + integer num + } + + function f_server() runs on GeneralComp { + var integer v_src := 5; + var bitstring v_bs := encvalue(v_src); + p.getcall(S:?); + p.reply(S:{ p_par := v_bs }); + } + + testcase TC_NegSem_220304_getreply_operation_014() runs on GeneralComp system GeneralComp { + var Wrapped v_res; + var GeneralComp v_ptc := GeneralComp.create("PTC"); + connect(self:p, v_ptc:p); + v_ptc.start(f_server()); + p.call(S:{ p_par := - }) { + [] p.getreply(S:{ p_par := decmatch integer:? }) -> param (v_res := @decoded p_par) { + setverdict (pass); + } + [] p.getreply { setverdict(pass); } + } + } + + control { + execute(TC_NegSem_220304_getreply_operation_014(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/NegSem_220304_getreply_operation_015.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/NegSem_220304_getreply_operation_015.ttcn new file mode 100644 index 00000000..4d5a2326 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/NegSem_220304_getreply_operation_015.ttcn @@ -0,0 +1,55 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:22.3.4, applying @decoded to a forbidden parameter field + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// When assigning individual fields of a reply, encoded parameters can be decoded +// prior to assignment using the @decoded modifier. In this case, the referenced +// parameter on the right hand sided of the assignment shall be one of the +// bitstring, hexstring, octetstring, charstring or universal charstring types. It +// shall be decoded into a value of the same type as the variable on the left hand +// side of the assignment. + +module NegSem_220304_getreply_operation_015 { + type record R { + integer id, + record of integer payload(0..255) + } + + signature S() return R; + + type port P procedure { + inout S; + } + + type component GeneralComp { + port P p; + } + + function f_server() runs on GeneralComp { + var R v_rec := { id := 6, payload := { 0, 0, 0, 0 }} + p.getcall(S:?); + p.reply(S:{} value v_rec); + } + + testcase TC_NegSem_220304_getreply_operation_015() runs on GeneralComp system GeneralComp { + var integer v_res with { encode "32bit" }; + var GeneralComp v_ptc := GeneralComp.create("PTC"); + connect(self:p, v_ptc:p); + v_ptc.start(f_server()); + p.call(S:{}) { + [] p.getreply(S:?) -> value (v_res := @decoded payload) { + setverdict (pass); + } + [] p.getreply { setverdict(fail); } + + } + } + + control { + execute(TC_NegSem_220304_getreply_operation_015(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/NegSem_220304_getreply_operation_016.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/NegSem_220304_getreply_operation_016.ttcn new file mode 100644 index 00000000..2601a6c4 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/NegSem_220304_getreply_operation_016.ttcn @@ -0,0 +1,50 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:22.3.4, decoding error in @decoded redirect value assignment + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// Failure of this decoding shall cause a test case error. + +module NegSem_220304_getreply_operation_016 { + type record R { + integer id, + charstring payload + } + + signature S() return R; + + type port P procedure { + inout S; + } + + type component GeneralComp { + port P p; + } + + function f_server() runs on GeneralComp { + var integer v_src := 1953719668 with { encode "32bit" }; + var R v_rec := { id := 4, payload := encvalue_unichar(v_src) & "abcdefgij" }; + p.getcall(S:?); + p.reply(S:{} value v_rec); + } + + testcase TC_NegSem_220304_getreply_operation_016() runs on GeneralComp system GeneralComp { + var integer v_res with { encode "32bit" }; + var GeneralComp v_ptc := GeneralComp.create("PTC"); + connect(self:p, v_ptc:p); + v_ptc.start(f_server()); + p.call(S:{}) { + [] p.getreply(S:?) -> value (v_res := @decoded payload) { + setverdict (pass); + } + [] p.getreply { setverdict(pass); } + } + } + + control { + execute(TC_NegSem_220304_getreply_operation_016(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/NegSem_220304_getreply_operation_017.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/NegSem_220304_getreply_operation_017.ttcn new file mode 100644 index 00000000..7f330772 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/NegSem_220304_getreply_operation_017.ttcn @@ -0,0 +1,52 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:22.3.4, invalid format value in @decoded redirect value assignment + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// Any other value shall cause an error. + +module NegSem_220304_getreply_operation_017 { + type record R { + integer id, + universal charstring payload + } + + signature S() return R; + + type port P procedure { + inout S; + } + + type component GeneralComp { + port P p; + } + + function f_server() runs on GeneralComp { + var integer v_src := 1953719668 with { encode "32bit" }; + var R v_rec := { id := 5, payload := encvalue_unichar(v_src) }; + p.getcall(S:?); + p.reply(S:{} value v_rec); + } + + testcase TC_NegSem_220304_getreply_operation_017() runs on GeneralComp system GeneralComp { + var integer v_res with { encode "32bit" }; + var GeneralComp v_ptc := GeneralComp.create("PTC"); + connect(self:p, v_ptc:p); + v_ptc.start(f_server()); + p.call(S:{}) { + [] p.getreply(S:?) -> value (v_res := @decoded("proprietary") payload) { + setverdict(pass); + } + [] p.getreply { setverdict(pass); } + } + v_ptc.done; + setverdict(pass); + } + + control { + execute(TC_NegSem_220304_getreply_operation_017(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/NegSem_220304_getreply_operation_018.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/NegSem_220304_getreply_operation_018.ttcn new file mode 100644 index 00000000..55428fb2 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/NegSem_220304_getreply_operation_018.ttcn @@ -0,0 +1,51 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:22.3.4, value of wrong type in @decoded redirect value assignment + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// Any other value shall cause an error. + +module NegSem_220304_getreply_operation_018 { + type record R { + integer id, + universal charstring payload + } + + signature S() return R; + + type port P procedure { + inout S; + } + + type component GeneralComp { + port P p; + } + + function f_server() runs on GeneralComp { + var integer v_src := 1953719668 with { encode "32bit" }; + var R v_rec := { id := 5, payload := encvalue_unichar(v_src) }; + p.getcall(S:?); + p.reply(S:{} value v_rec); + } + + testcase TC_NegSem_220304_getreply_operation_018() runs on GeneralComp system GeneralComp { + var integer v_res, v_enc := 32 with { encode "32bit" }; + var GeneralComp v_ptc := GeneralComp.create("PTC"); + connect(self:p, v_ptc:p); + v_ptc.start(f_server()); + p.call(S:{}) { + [] p.getreply(S:?) -> value (v_res := @decoded(v_enc) payload) { + setverdict (pass); + } + [] p.getreply { setverdict(pass); } + } + + } + + control { + execute(TC_NegSem_220304_getreply_operation_018(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/NegSem_220304_getreply_operation_019.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/NegSem_220304_getreply_operation_019.ttcn new file mode 100644 index 00000000..e6b1d072 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/NegSem_220304_getreply_operation_019.ttcn @@ -0,0 +1,52 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:22.3.4, encoding parameter of @decoded redirect value assignment applied to incorrect type + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// In case the referenced field is not a universal charstring, the optional +// parameter shall not be present. + +module NegSem_220202_ReceiveOperation_019 { + type record R { + integer id, + octetstring payload + } + + signature S() return R; + + type port P procedure { + inout S; + } + + type component GeneralComp { + port P p; + } + + function f_server() runs on GeneralComp { + var charstring v_src := "abc"; + var R v_rec := { id := 3, payload := bit2oct(encvalue(v_src)) }; + p.getcall(S:?); + p.reply(S:{} value v_rec); + } + + testcase TC_NegSem_220304_getreply_operation_019() runs on GeneralComp system GeneralComp { + var charstring v_res; + var GeneralComp v_ptc := GeneralComp.create("PTC"); + connect(self:p, v_ptc:p); + v_ptc.start(f_server()); + p.call(S:{}) { + [] p.getreply(S:?) -> value (v_res := @decoded("UTF-8") payload) { + setverdict(pass); + } + [] p.getreply { setverdict(pass); } + } + + } + + control { + execute(TC_NegSem_220304_getreply_operation_019(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/NegSem_220304_getreply_operation_020.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/NegSem_220304_getreply_operation_020.ttcn new file mode 100644 index 00000000..9031d991 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/NegSem_220304_getreply_operation_020.ttcn @@ -0,0 +1,57 @@ +/***************************************************************** + ** @author STF 487 (updated by STF 521) + ** @version 0.0.2 + ** @purpose 1:22.3.4, incompatible decmatch and @decoded value redirect + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// When assigning implicitly decoded parameters (by using the @decoded modifier) +// in cases where the value or template to be matched uses the MatchDecodedContent +// (decmatch) matching for the parameter to be stored, the type of the template in +// the MatchDecodedContent matching shall be type-compatible to the type of the +// variable the decoded field is stored into. + +module NegSem_220304_getreply_operation_020 { + type record R { + integer id, + bitstring payload + } + signature S() return R; + + type port P procedure { + inout S; + } + + type component GeneralComp { + port P p; + } + + type record Wrapped { + integer num + } + + function f_server() runs on GeneralComp { + var integer v_src := 5; + var R v_rec := { id := 1, payload := encvalue(v_src) }; + p.getcall(S:?); + p.reply(S:{} value v_rec); + } + + testcase TC_NegSem_220304_getreply_operation_020() runs on GeneralComp system GeneralComp { + var Wrapped v_res; + var GeneralComp v_ptc := GeneralComp.create("PTC"); + connect(self:p, v_ptc:p); + v_ptc.start(f_server()); + p.call(S:{}) { + [] p.getreply(S:{} value R:{ id := ?, payload := decmatch integer:? }) -> value (v_res := @decoded payload) { + setverdict (pass); + } + [] p.getreply { setverdict(pass); } + } + } + + control { + execute(TC_NegSem_220304_getreply_operation_020(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/NegSem_220304_getreply_operation_021.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/NegSem_220304_getreply_operation_021.ttcn new file mode 100644 index 00000000..a6481a7f --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/NegSem_220304_getreply_operation_021.ttcn @@ -0,0 +1,45 @@ +/***************************************************************** + ** @author STF 521 + ** @version 0.0.2 + ** @purpose 1:22.3.4, incompatible template in the from clause of the getreply operation + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// f) All AddressRef items in the from clause and all VariableRef items in the sender clause +// shall be of type address, component or of the address type bound to the port type (see +// section 6.2.9) of the port instance referenced in the getcall operation. + +module NegSem_220304_getreply_operation_021 { + + signature S() return integer; + + type port P procedure { + inout S; + } + + type component GeneralComp { + port P p; + } + + function f() runs on GeneralComp { + p.getcall(S:{}); + p.reply(S:{} value 1); + } + + testcase TC_NegSem_220304_getreply_operation_021() runs on GeneralComp system GeneralComp { + var charstring v_addr := "addr"; + var GeneralComp v_ptc := GeneralComp.create; + connect(self:p, v_ptc:p); + v_ptc.start(f()); + p.call(S:{}) { + [] p.getreply(S:?) from v_addr {} // error expected + [] p.getreply {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_220304_getreply_operation_021(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/NegSem_220304_getreply_operation_022.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/NegSem_220304_getreply_operation_022.ttcn new file mode 100644 index 00000000..4181b4db --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/NegSem_220304_getreply_operation_022.ttcn @@ -0,0 +1,50 @@ +/***************************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:22.3.4, trying to store an incompatible component value in the sender clause of a getreply operation + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// j) If the operation contains a sender clause but no from clause, the sender shall be type +// compatible with the type of the variable or parameter referenced in the sender clause. + +module NegSem_220304_getreply_operation_022 { + + signature S(); + + type port P procedure { + inout S; + } + + type component GeneralComp { + var integer vc_int; + port P p; + } + + type component AltComp { + var charstring vc_str; + port P px; + } + + function f() runs on GeneralComp { + p.getcall(S:?); + p.reply(S:{}); + } + + testcase TC_NegSem_220304_getreply_operation_022() runs on GeneralComp system GeneralComp { + var AltComp v_compRef := null; + var GeneralComp v_ptc := GeneralComp.create; + connect(self:p, v_ptc:p); + v_ptc.start(f()); + p.call(S:{}) { + [] p.getreply(S:{}) -> sender v_compRef { } // error expected + [] p.getreply(S:{}) { } + } + setverdict(pass); + } + + control { + execute(TC_NegSem_220304_getreply_operation_022(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/NegSyn_220304_getreply_operation_001.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/NegSyn_220304_getreply_operation_001.ttcn new file mode 100644 index 00000000..12f5605b --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/NegSyn_220304_getreply_operation_001.ttcn @@ -0,0 +1,46 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:22.3.4, Verify that error occurs when using index redirection in port.getreply operation + ** @verdict pass reject + *****************************************************************/ +// The following requirements are tested: +// Restriction f +// The index redirection shall only be used when the operation is used on an any from +// port array construct. +module NegSyn_220304_getreply_operation_001 { + signature S(); + + type port P procedure { + inout S; + } + + type component GeneralComp + { + port P p; + } + + function f() runs on GeneralComp + { + p.getcall(S:?); + p.reply(S:{}); + } + + testcase TC_NegSyn_220304_getreply_operation_001() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + var integer v_index; + connect(self:p, v_ptc:p); + p.call(S:{}, nowait); + v_ptc.start(f()); + v_ptc.done; + alt + { + [] p.getreply -> @index value v_index { setverdict(pass); } + [else] { setverdict(fail, "The any from getreply operation didn't match for some reason"); } + } + } + + control { + execute(TC_NegSyn_220304_getreply_operation_001(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/NegSyn_220304_getreply_operation_002.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/NegSyn_220304_getreply_operation_002.ttcn new file mode 100644 index 00000000..1f6dfdf4 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/NegSyn_220304_getreply_operation_002.ttcn @@ -0,0 +1,47 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:22.3.4, Verify that error occurs when using index redirection in any port.getreply operation + ** @verdict pass reject + *****************************************************************/ +// The following requirements are tested: +// Restriction f +// The index redirection shall only be used when the operation is used on an any from +// port array construct. +module NegSyn_220304_getreply_operation_002 { + + signature S(); + + type port P procedure { + inout S; + } + + type component GeneralComp + { + port P p; + } + + function f() runs on GeneralComp + { + p.getcall(S:?); + p.reply(S:{}); + } + + testcase TC_NegSyn_220304_getreply_operation_002() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + var integer v_index; + connect(self:p, v_ptc:p); + p.call(S:{}, nowait); + v_ptc.start(f()); + v_ptc.done; + alt + { + [] any port.getreply -> @index value v_index { setverdict(pass); } + [else] { setverdict(fail, "The any from getreply operation didn't match for some reason"); } + } + } + + control { + execute(TC_NegSyn_220304_getreply_operation_002(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/Sem_220304_getreply_operation_001.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/Sem_220304_getreply_operation_001.ttcn new file mode 100644 index 00000000..3ab95e5d --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/Sem_220304_getreply_operation_001.ttcn @@ -0,0 +1,40 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:22.3.4, Verify that any from getreply is not triggered if there hasn't been any reply + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +// The following requirements are tested: +// To getreply on any port from a specific port array, use the any from PortArrayRef syntax where +// PortArrayRef shall be a reference to a port array identifier. +// The first port which matches all the criteria will cause the operation to be successful even if +// other ports in the array would also meet the criteria. +module Sem_220304_getreply_operation_001 { + signature S(); + + type port P procedure { + inout S; + } + + const integer c_portCount := 4; + type component GeneralComp + { + port P p[c_portCount]; + } + + testcase TC_Sem_220304_getreply_operation_001() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + for(var integer i := 0; i < c_portCount; i := i + 1) { + connect(self:p[i], v_ptc:p[i]); + } + alt + { + [] any from p.getreply { setverdict(fail, "The any from getreply operation produced incorrect match"); } + [else] { setverdict(pass); } + } + } + + control { + execute(TC_Sem_220304_getreply_operation_001(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/Sem_220304_getreply_operation_002.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/Sem_220304_getreply_operation_002.ttcn new file mode 100644 index 00000000..b5340990 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/Sem_220304_getreply_operation_002.ttcn @@ -0,0 +1,51 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:22.3.4, Verify that any from getreply matches if at least one port contains enqueued reply + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +// The following requirements are tested: +// To getreply on any port from a specific port array, use the any from PortArrayRef syntax where +// PortArrayRef shall be a reference to a port array identifier. +// The first port which matches all the criteria will cause the operation to be successful even if +// other ports in the array would also meet the criteria. +module Sem_220304_getreply_operation_002 { + signature S(); + + type port P procedure { + inout S; + } + + const integer c_portCount := 4; + type component GeneralComp + { + port P p[c_portCount]; + } + + function f() runs on GeneralComp + { + for(var integer i := 0; i < c_portCount; i := i + 1) { + p[i].getcall; + if (i mod 2 == 1) { p[i].reply(S:{}) }; + } + } + + testcase TC_Sem_220304_getreply_operation_002() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + for(var integer i := 0; i < c_portCount; i := i + 1) { + connect(self:p[i], v_ptc:p[i]); + p[i].call(S:{}, nowait); + } + v_ptc.start(f()); + v_ptc.done; + alt + { + [] any from p.getreply { setverdict(pass); } + [else] { setverdict(fail, "The any from getreply operation didn't match for some reason"); } + } + } + + control { + execute(TC_Sem_220304_getreply_operation_002(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/Sem_220304_getreply_operation_003.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/Sem_220304_getreply_operation_003.ttcn new file mode 100644 index 00000000..573ea756 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/Sem_220304_getreply_operation_003.ttcn @@ -0,0 +1,59 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:22.3.4, Verify that any from getreply doesn't assign index when there's no suitable match + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +// The following requirements are tested: +// It is also possible to store the index of a port in a single-dimensional port array at which +// the operation was successful to a variable of type integer or, in case of multi-dimensional +// port arrays the index of the successful port to an integer array or record of integer variable. +module Sem_220304_getreply_operation_003 { + + signature S(out integer p_par); + + type port P procedure { + inout S; + } + + const integer c_portCount := 4; + type component GeneralComp + { + port P p[c_portCount]; + } + + function f() runs on GeneralComp + { + for(var integer i := 0; i < c_portCount; i := i + 1) { + p[i].getcall; + if (i mod 2 == 1) { p[i].reply(S:{ p_par := i + 100 }) }; + } + } + + testcase TC_Sem_220304_getreply_operation_003() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + var integer v_index; + for(var integer i := 0; i < c_portCount; i := i + 1) { + connect(self:p[i], v_ptc:p[i]); + p[i].call(S:{ p_par := - }, nowait); + } + v_ptc.start(f()); + v_ptc.done; + alt + { + [] any from p.getreply(S:{p_par := (1..10)}) -> @index value v_index { + setverdict(fail, "The any from getreply operation produced incorrect match"); + } + [else] { setverdict(pass); } + } + if(not isbound(v_index)){ + setverdict(pass); + } else { + setverdict(fail, "Index incorrectly assigned"); + } + } + + control { + execute(TC_Sem_220304_getreply_operation_003(), 5000.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/Sem_220304_getreply_operation_004.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/Sem_220304_getreply_operation_004.ttcn new file mode 100644 index 00000000..d50a024e --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/Sem_220304_getreply_operation_004.ttcn @@ -0,0 +1,59 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:22.3.4, Verify that any from getreply doesn't change index variable when no there's no suitable match + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +// The following requirements are tested: +// It is also possible to store the index of a port in a single-dimensional port array at which +// the operation was successful to a variable of type integer or, in case of multi-dimensional +// port arrays the index of the successful port to an integer array or record of integer variable. +module Sem_220304_getreply_operation_004 { + + signature S(out integer p_par); + + type port P procedure { + inout S; + } + + const integer c_portCount := 4; + type component GeneralComp + { + port P p[c_portCount]; + } + + function f() runs on GeneralComp + { + for(var integer i := 0; i < c_portCount; i := i + 1) { + p[i].getcall; + if (i mod 2 == 1) { p[i].reply(S:{ p_par := i + 100 }) }; + } + } + + testcase TC_Sem_220304_getreply_operation_004() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + var integer v_index := 99; + for(var integer i := 0; i < c_portCount; i := i + 1) { + connect(self:p[i], v_ptc:p[i]); + p[i].call(S:{ p_par := - }, nowait); + } + v_ptc.start(f()); + v_ptc.done; + alt + { + [] any from p.getreply(S:{p_par := (1..10)}) -> @index value v_index { + setverdict(fail, "The any from getreply operation produced incorrect match"); + } + [else] { setverdict(pass); } + } + if(v_index == 99){ + setverdict(pass); + } else { + setverdict(fail, "Index incorrectly assigned"); + } + } + + control { + execute(TC_Sem_220304_getreply_operation_004(), 5000.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/Sem_220304_getreply_operation_005.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/Sem_220304_getreply_operation_005.ttcn new file mode 100644 index 00000000..3a01dd6b --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/Sem_220304_getreply_operation_005.ttcn @@ -0,0 +1,60 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:22.3.4, Verify that any from done assigns index + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +// The following requirements are tested: +// It is also possible to store the index of a port in a single-dimensional port array at which +// the operation was successful to a variable of type integer or, in case of multi-dimensional +// port arrays the index of the successful port to an integer array or record of integer variable. +// When checking the port array for matching replies, the port indices to be checked are iterated +// from lowest to highest. +module Sem_220304_getreply_operation_005 { + + signature S() return integer; + + type port P procedure { + inout S; + } + + const integer c_portCount := 4; + type component GeneralComp + { + port P p[c_portCount]; + } + + function f() runs on GeneralComp + { + for(var integer i := 0; i < c_portCount; i := i + 1) { + p[i].getcall; + if (i mod 2 == 1) { p[i].reply(S:{} value i + 1) }; + } + } + + testcase TC_Sem_220304_getreply_operation_005() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + var integer v_index, v_res; + for(var integer i := 0; i < c_portCount; i := i + 1) { + connect(self:p[i], v_ptc:p[i]); + p[i].call(S:{}, nowait); + } + v_ptc.start(f()); + v_ptc.done; + alt + { + [] any from p.getreply(S:? value (0..c_portCount)) -> value v_res @index value v_index { + if(v_index == 1 and v_res == v_index + 1){ + setverdict(pass); + } else { + setverdict(fail, "Index or parameter value incorrectly assigned"); + } + } + [else] { setverdict(fail, "The any from getreply operation didn't match for some reason"); } + } + } + + control { + execute(TC_Sem_220304_getreply_operation_005(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/Sem_220304_getreply_operation_006.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/Sem_220304_getreply_operation_006.ttcn new file mode 100644 index 00000000..59f6f272 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/Sem_220304_getreply_operation_006.ttcn @@ -0,0 +1,64 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:22.3.4, Verify that any from getreply index redirection works for multidimensional arrays + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +// The following requirements are tested: +// Restriction h: +// If the index redirection is used for multi-dimensional component arrays, the size +// of the integer array or record of integer type shall exactly be the same as the dimension +// of the respective array, and its type shall allow storing the highest index (from all +// dimensions) of the array. +module Sem_220304_getreply_operation_006 { + + signature S(out integer p_par); + + type port P procedure { + inout S; + } + + const integer c_portCount := 3; + type component GeneralComp + { + port P p[c_portCount][c_portCount]; + } + + function f() runs on GeneralComp + { + for(var integer i := 0; i < c_portCount; i := i + 1) { + for(var integer j := 0; j < c_portCount; j := j + 1) { + p[i][j].getcall; + if (i == 1 and j == 2 or i == 2 and j == 1) { p[i][j].reply(S:{ p_par := i + 1 }); } + } + } + } + + testcase TC_Sem_220304_getreply_operation_006() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create, v_src; + var integer v_index[2], v_parValue; + for(var integer i := 0; i < c_portCount; i := i + 1) { + for(var integer j := 0; j < c_portCount; j := j + 1) { + connect(self:p[i][j], v_ptc:p[i][j]); + p[i][j].call(S:{ p_par := i + 1 }, nowait); + } + } + v_ptc.start(f()); + v_ptc.done; + alt + { + [] any from p.getreply(S:{p_par := (0..c_portCount)}) -> param (v_parValue := p_par) sender v_src @index value v_index { + if(v_index[0] == 1 and v_index[1] == 2 and v_parValue == v_index[0] + 1){ + setverdict(pass); + } else { + setverdict(fail, "Indices or parameter value incorrectly assigned"); + } + } + [else] { setverdict(fail, "The any from getreply operation didn't match for some reason"); } + } + } + + control { + execute(TC_Sem_220304_getreply_operation_006(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/Sem_220304_getreply_operation_007.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/Sem_220304_getreply_operation_007.ttcn new file mode 100644 index 00000000..08b06d6b --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/Sem_220304_getreply_operation_007.ttcn @@ -0,0 +1,58 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:22.3.4, Verify any from getreply index redirection to lazy variable + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +// The following requirements are tested: +// Restriction i +// If a variable referenced in the @index clause is a lazy or fuzzy variable, the expression +// assigned to this variable is equal to the result produced by the getreply operation. Later +// evaluation of the lazy or fuzzy variable does not lead to repeated invocation of the +// getreply operation. +module Sem_220304_getreply_operation_007 { + + signature S(); + + type port P procedure { + inout S; + } + + const integer c_portCount := 4; + type component GeneralComp + { + port P p[c_portCount]; + } + function f() runs on GeneralComp + { + for(var integer i := 0; i < c_portCount; i := i + 1) { + p[i].getcall; + if (i mod 2 == 1) { p[i].reply(S:{}) }; + } + } + testcase TC_Sem_220304_getreply_operation_007() runs on GeneralComp system GeneralComp { + var @lazy integer v_index; + var GeneralComp v_ptc := GeneralComp.create; + for(var integer i := 0; i < c_portCount; i := i + 1) { + connect(self:p[i], v_ptc:p[i]); + p[i].call(S:{}, nowait); + } + v_ptc.start(f()); + v_ptc.done; + alt + { + [] any from p.getreply(S:?) -> @index value v_index { + if(v_index == 1){ // no getreply call during evaluation, v_index remains equal to 1 + setverdict(pass); + } else { + setverdict(fail, "Index or parameter value incorrectly assigned"); + } + } + [else] { setverdict(fail, "The any from getreply operation didn't match for some reason"); } + } + } + + control { + execute(TC_Sem_220304_getreply_operation_007(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/Sem_220304_getreply_operation_008.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/Sem_220304_getreply_operation_008.ttcn new file mode 100644 index 00000000..b5a0eb0d --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/Sem_220304_getreply_operation_008.ttcn @@ -0,0 +1,58 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:22.3.4, Verify any from getreply index redirection to fuzzy variable + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +// The following requirements are tested: +// Restriction i +// If a variable referenced in the @index clause is a lazy or fuzzy variable, the expression +// assigned to this variable is equal to the result produced by the getreply operation. Later +// evaluation of the lazy or fuzzy variable does not lead to repeated invocation of the +// getreply operation. +module Sem_220304_getreply_operation_008 { + + signature S(); + + type port P procedure { + inout S; + } + + const integer c_portCount := 4; + type component GeneralComp + { + port P p[c_portCount]; + } + function f() runs on GeneralComp + { + for(var integer i := 0; i < c_portCount; i := i + 1) { + p[i].getcall; + if (i mod 2 == 1) { p[i].reply(S:{}) }; + } + } + testcase TC_Sem_220304_getreply_operation_008() runs on GeneralComp system GeneralComp { + var @fuzzy integer v_index; + var GeneralComp v_ptc := GeneralComp.create; + for(var integer i := 0; i < c_portCount; i := i + 1) { + connect(self:p[i], v_ptc:p[i]); + p[i].call(S:{}, nowait); + } + v_ptc.start(f()); + v_ptc.done; + alt + { + [] any from p.getreply(S:?) -> @index value v_index { + if(v_index == 1){ // no getreply call during evaluation, v_index remains equal to 1 + setverdict(pass); + } else { + setverdict(fail, "Index or parameter value incorrectly assigned"); + } + } + [else] { setverdict(fail, "The any from getreply operation didn't match for some reason"); } + } + } + + control { + execute(TC_Sem_220304_getreply_operation_008(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/Sem_220304_getreply_operation_009.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/Sem_220304_getreply_operation_009.ttcn new file mode 100644 index 00000000..017b45c7 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/Sem_220304_getreply_operation_009.ttcn @@ -0,0 +1,51 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:22.3.4, @decoded redirect parameter assignment of a bitstring field + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirements are tested: +// When assigning individual fields of a reply, encoded parameters can be decoded +// prior to assignment using the @decoded modifier. In this case, the referenced +// parameter on the right hand sided of the assignment shall be one of the +// bitstring, hexstring, octetstring, charstring or universal charstring types. It +// shall be decoded into a value of the same type as the variable on the left hand +// side of the assignment. + +module Sem_220304_getreply_operation_009 { + signature S(out bitstring p_par); + + type port P procedure { + inout S; + } + + type component GeneralComp { + port P p; + } + + function f_server() runs on GeneralComp { + var charstring v_src := "abc"; + var bitstring v_bs := encvalue(v_src); + p.getcall(S:?); + p.reply(S:{ p_par := v_bs }); + } + + testcase TC_Sem_220304_getreply_operation_009() runs on GeneralComp system GeneralComp { + var charstring v_res; + var GeneralComp v_ptc := GeneralComp.create("PTC"); + connect(self:p, v_ptc:p); + v_ptc.start(f_server()); + p.call(S:{ p_par := - }) { + [] p.getreply(S:?) -> param (v_res := @decoded p_par) { + if (v_res == "abc") { setverdict (pass); } + else { setverdict(fail); } + } + [] p.getreply { setverdict(fail); } + } + } + + control { + execute(TC_Sem_220304_getreply_operation_009(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/Sem_220304_getreply_operation_010.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/Sem_220304_getreply_operation_010.ttcn new file mode 100644 index 00000000..e44204ce --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/Sem_220304_getreply_operation_010.ttcn @@ -0,0 +1,51 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:22.3.4, @decoded redirect parameter assignment of a hexstring field + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirements are tested: +// When assigning individual fields of a reply, encoded parameters can be decoded +// prior to assignment using the @decoded modifier. In this case, the referenced +// parameter on the right hand sided of the assignment shall be one of the +// bitstring, hexstring, octetstring, charstring or universal charstring types. It +// shall be decoded into a value of the same type as the variable on the left hand +// side of the assignment. + +module Sem_220304_getreply_operation_010 { + signature S(out hexstring p_par); + + type port P procedure { + inout S; + } + + type component GeneralComp { + port P p; + } + + function f_server() runs on GeneralComp { + var charstring v_src := "abc"; + var hexstring v_hs := bit2hex(encvalue(v_src)); + p.getcall(S:?); + p.reply(S:{ p_par := v_hs }); + } + + testcase TC_Sem_220304_getreply_operation_010() runs on GeneralComp system GeneralComp { + var charstring v_res; + var GeneralComp v_ptc := GeneralComp.create("PTC"); + connect(self:p, v_ptc:p); + v_ptc.start(f_server()); + p.call(S:{ p_par := - }) { + [] p.getreply(S:?) -> param (v_res := @decoded p_par) { + if (v_res == "abc") { setverdict (pass); } + else { setverdict(fail); } + } + [] p.getreply { setverdict(fail); } + } + } + + control { + execute(TC_Sem_220304_getreply_operation_010(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/Sem_220304_getreply_operation_011.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/Sem_220304_getreply_operation_011.ttcn new file mode 100644 index 00000000..74711802 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/Sem_220304_getreply_operation_011.ttcn @@ -0,0 +1,52 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:22.3.4, @decoded redirect parameter assignment of an octetstring field + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirements are tested: +// When assigning individual fields of a reply, encoded parameters can be decoded +// prior to assignment using the @decoded modifier. In this case, the referenced +// parameter on the right hand sided of the assignment shall be one of the +// bitstring, hexstring, octetstring, charstring or universal charstring types. It +// shall be decoded into a value of the same type as the variable on the left hand +// side of the assignment. + +module Sem_220304_getreply_operation_011 { + signature S(out octetstring p_par); + + type port P procedure { + inout S; + } + + type component GeneralComp { + port P p; + } + + function f_server() runs on GeneralComp { + var charstring v_src := "abc"; + var octetstring v_os := bit2oct(encvalue(v_src)); + p.getcall(S:?); + p.reply(S:{ p_par := v_os }); + } + + testcase TC_Sem_220304_getreply_operation_011() runs on GeneralComp system GeneralComp { + var charstring v_res; + var GeneralComp v_ptc := GeneralComp.create("PTC"); + connect(self:p, v_ptc:p); + v_ptc.start(f_server()); + p.call(S:{ p_par := - }) { + [] p.getreply(S:?) -> param (v_res := @decoded p_par) { + if (v_res == "abc") { setverdict (pass); } + else { setverdict(fail); } + } + [] p.getreply { setverdict(fail); } + + } + } + + control { + execute(TC_Sem_220304_getreply_operation_011(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/Sem_220304_getreply_operation_012.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/Sem_220304_getreply_operation_012.ttcn new file mode 100644 index 00000000..6b5d7ae6 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/Sem_220304_getreply_operation_012.ttcn @@ -0,0 +1,51 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:22.3.4, @decoded redirect parameter assignment of a charstring field + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirements are tested: +// When assigning individual fields of a reply, encoded parameters can be decoded +// prior to assignment using the @decoded modifier. In this case, the referenced +// parameter on the right hand sided of the assignment shall be one of the +// bitstring, hexstring, octetstring, charstring or universal charstring types. It +// shall be decoded into a value of the same type as the variable on the left hand +// side of the assignment. + +module Sem_220304_getreply_operation_012 { + signature S(out charstring p_par); + + type port P procedure { + inout S; + } + + type component GeneralComp { + port P p; + } + + function f_server() runs on GeneralComp { + var integer v_src := 1953719668 with { encode "32bit" }; + var charstring v_str := encvalue_unichar(v_src); + p.getcall(S:?); + p.reply(S:{ p_par := v_str }) + } + + testcase TC_Sem_220304_getreply_operation_012() runs on GeneralComp system GeneralComp { + var integer v_res with { encode "32bit" }; + var GeneralComp v_ptc := GeneralComp.create("PTC"); + connect(self:p, v_ptc:p); + v_ptc.start(f_server()); + p.call(S:{ p_par := - }) { + [] p.getreply(S:?) -> param (v_res := @decoded p_par) { + if (v_res == 1953719668) { setverdict (pass); } + else { setverdict(fail); } + } + [] p.getreply { setverdict(fail); } + } + } + + control { + execute(TC_Sem_220304_getreply_operation_012(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/Sem_220304_getreply_operation_013.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/Sem_220304_getreply_operation_013.ttcn new file mode 100644 index 00000000..4093a6af --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/Sem_220304_getreply_operation_013.ttcn @@ -0,0 +1,53 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:22.3.4, @decoded redirect parameter assignment of a universal charstring field + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirements are tested: +// When assigning individual fields of a reply, encoded parameters can be decoded +// prior to assignment using the @decoded modifier. In this case, the referenced +// parameter on the right hand sided of the assignment shall be one of the +// bitstring, hexstring, octetstring, charstring or universal charstring types. It +// shall be decoded into a value of the same type as the variable on the left hand +// side of the assignment. + +module Sem_220304_getreply_operation_013 { + signature S(out universal charstring p_par); + + type port P procedure { + inout S; + } + + type component GeneralComp { + port P p; + } + + function f_server() runs on GeneralComp { + var integer v_src := 1953719668 with { encode "32bit" }; + var universal charstring v_str := encvalue_unichar(v_src); + p.getcall(S:?); + p.reply(S:{ p_par := v_str }); + } + + testcase TC_Sem_220304_getreply_operation_013() runs on GeneralComp system GeneralComp { + var integer v_res with { encode "32bit" }; + var GeneralComp v_ptc := GeneralComp.create("PTC"); + connect(self:p, v_ptc:p); + v_ptc.start(f_server()); + p.call(S:{ p_par := - }) { + [] p.getreply(S:?) -> param (v_res := @decoded p_par) { + if (v_res == 1953719668) { setverdict (pass); } + else { setverdict(fail); } + } + [] p.getreply { setverdict(fail); } + } + v_ptc.done; + setverdict(pass); + } + + control { + execute(TC_Sem_220304_getreply_operation_013(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/Sem_220304_getreply_operation_014.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/Sem_220304_getreply_operation_014.ttcn new file mode 100644 index 00000000..86ff6c19 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/Sem_220304_getreply_operation_014.ttcn @@ -0,0 +1,51 @@ +/***************************************************************** + ** @author STF 487 (updated by STF 521) + ** @version 0.0.2 + ** @purpose 1:22.3.4, @decoded redirect parameter assignment with encoding parameter + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirements are tested: +// In case the referenced field is of the universal charstring type, the @decoded +// clause can contain an optional parameter defining the encoding format. The +// parameter shall be of the charstring type and it shall contain one of the +// strings allowed for the decvalue_unichar function (specified in clause C.5.4). + +module Sem_220304_getreply_operation_014 { + signature S(out universal charstring p_par); + + type port P procedure { + inout S; + } + + type component GeneralComp { + port P p; + } + + function f_server() runs on GeneralComp { + var integer v_src := 1953719668 with { variant "32 bit" }; + var universal charstring v_str := encvalue_unichar(v_src, "UTF-16LE"); + p.getcall(S:?); + p.reply(S:{ p_par := v_str }); + } + + testcase TC_Sem_220304_getreply_operation_014() runs on GeneralComp system GeneralComp { + var integer v_res with { variant "32 bit" }; + var GeneralComp v_ptc := GeneralComp.create("PTC"); + connect(self:p, v_ptc:p); + v_ptc.start(f_server()); + p.call(S:{ p_par := - }) { + [] p.getreply(S:?) -> param (v_res := @decoded("UTF-16LE") p_par) { + if (v_res == 1953719668) { setverdict (pass); } + else { setverdict(fail); } + } + [] p.getreply { setverdict(fail); } + }; + v_ptc.done; + setverdict(pass); + } + + control { + execute(TC_Sem_220304_getreply_operation_014(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/Sem_220304_getreply_operation_015.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/Sem_220304_getreply_operation_015.ttcn new file mode 100644 index 00000000..fae2ff27 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/Sem_220304_getreply_operation_015.ttcn @@ -0,0 +1,57 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:22.3.4, @decoded redirect value assignment of a bitstring field + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirements are tested: +// When assigning individual fields of a reply, encoded parameters can be decoded +// prior to assignment using the @decoded modifier. In this case, the referenced +// parameter on the right hand sided of the assignment shall be one of the +// bitstring, hexstring, octetstring, charstring or universal charstring types. It +// shall be decoded into a value of the same type as the variable on the left hand +// side of the assignment. + +module Sem_220304_getreply_operation_015 { + type record R { + integer id, + bitstring payload + } + + signature S() return R; + + type port P procedure { + inout S; + } + + type component GeneralComp { + port P p; + } + + function f_server() runs on GeneralComp { + var charstring v_src := "abc"; + var R v_rec := { id := 1, payload := encvalue(v_src) }; + p.getcall(S:?); + p.reply(S:{} value v_rec); + log("dada"); + } + + testcase TC_Sem_220304_getreply_operation_015() runs on GeneralComp system GeneralComp { + var charstring v_res; + var GeneralComp v_ptc := GeneralComp.create("PTC"); + connect(self:p, v_ptc:p); + v_ptc.start(f_server()); + p.call(S:{}) { + [] p.getreply(S:?) -> value (v_res := @decoded payload) { + if (v_res == "abc") { setverdict (pass); } + else { setverdict(fail); } + } + [] p.getreply { setverdict(fail); } + } + } + + control { + execute(TC_Sem_220304_getreply_operation_015(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/Sem_220304_getreply_operation_016.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/Sem_220304_getreply_operation_016.ttcn new file mode 100644 index 00000000..2583a257 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/Sem_220304_getreply_operation_016.ttcn @@ -0,0 +1,56 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:22.3.4, @decoded redirect value assignment of a hexstring field + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirements are tested: +// When assigning individual fields of a reply, encoded parameters can be decoded +// prior to assignment using the @decoded modifier. In this case, the referenced +// parameter on the right hand sided of the assignment shall be one of the +// bitstring, hexstring, octetstring, charstring or universal charstring types. It +// shall be decoded into a value of the same type as the variable on the left hand +// side of the assignment. + +module Sem_220304_getreply_operation_016 { + type record R { + integer id, + hexstring payload + } + + signature S() return R; + + type port P procedure { + inout S; + } + + type component GeneralComp { + port P p; + } + + function f_server() runs on GeneralComp { + var charstring v_src := "abc"; + var R v_rec := { id := 2, payload := bit2hex(encvalue(v_src)) }; + p.getcall(S:?); + p.reply(S:{ } value v_rec); + } + + testcase TC_Sem_220304_getreply_operation_016() runs on GeneralComp system GeneralComp { + var charstring v_res; + var GeneralComp v_ptc := GeneralComp.create("PTC"); + connect(self:p, v_ptc:p); + v_ptc.start(f_server()); + p.call(S:{ }) { + [] p.getreply(S:?) -> value (v_res := @decoded payload) { + if (v_res == "abc") { setverdict (pass); } + else { setverdict(fail); } + } + [] p.getreply { setverdict(fail); } + } + } + + control { + execute(TC_Sem_220304_getreply_operation_016(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/Sem_220304_getreply_operation_017.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/Sem_220304_getreply_operation_017.ttcn new file mode 100644 index 00000000..cf3fbfc0 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/Sem_220304_getreply_operation_017.ttcn @@ -0,0 +1,57 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:22.3.4, @decoded redirect value assignment of an octetstring field + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirements are tested: +// When assigning individual fields of a reply, encoded parameters can be decoded +// prior to assignment using the @decoded modifier. In this case, the referenced +// parameter on the right hand sided of the assignment shall be one of the +// bitstring, hexstring, octetstring, charstring or universal charstring types. It +// shall be decoded into a value of the same type as the variable on the left hand +// side of the assignment. + +module Sem_220304_getreply_operation_017 { + type record R { + integer id, + octetstring payload + } + + signature S() return R; + + type port P procedure { + inout S; + } + + type component GeneralComp { + port P p; + } + + function f_server() runs on GeneralComp { + var charstring v_src := "abc"; + var R v_rec := { id := 3, payload := bit2oct(encvalue(v_src)) }; + p.getcall(S:?); + p.reply(S:{} value v_rec); + } + + testcase TC_Sem_220304_getreply_operation_017() runs on GeneralComp system GeneralComp { + var charstring v_res; + var GeneralComp v_ptc := GeneralComp.create("PTC"); + connect(self:p, v_ptc:p); + v_ptc.start(f_server()); + p.call(S:{}) { + [] p.getreply(S:?) -> value (v_res := @decoded payload) { + if (v_res == "abc") { setverdict (pass); } + else { setverdict(fail); } + } + [] p.getreply { setverdict(fail); } + + } + } + + control { + execute(TC_Sem_220304_getreply_operation_017(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/Sem_220304_getreply_operation_018.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/Sem_220304_getreply_operation_018.ttcn new file mode 100644 index 00000000..69451cdb --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/Sem_220304_getreply_operation_018.ttcn @@ -0,0 +1,56 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:22.3.4, @decoded redirect value assignment of a charstring field + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirements are tested: +// When assigning individual fields of a reply, encoded parameters can be decoded +// prior to assignment using the @decoded modifier. In this case, the referenced +// parameter on the right hand sided of the assignment shall be one of the +// bitstring, hexstring, octetstring, charstring or universal charstring types. It +// shall be decoded into a value of the same type as the variable on the left hand +// side of the assignment. + +module Sem_220304_getreply_operation_018 { + type record R { + integer id, + charstring payload + } + + signature S() return R; + + type port P procedure { + inout S; + } + + type component GeneralComp { + port P p; + } + + function f_server() runs on GeneralComp { + var integer v_src := 1953719668 with { encode "32bit" }; + var R v_rec := { id := 4, payload := encvalue_unichar(v_src) }; + p.getcall(S:?); + p.reply(S:{} value v_rec) + } + + testcase TC_Sem_220304_getreply_operation_018() runs on GeneralComp system GeneralComp { + var integer v_res with { encode "32bit" }; + var GeneralComp v_ptc := GeneralComp.create("PTC"); + connect(self:p, v_ptc:p); + v_ptc.start(f_server()); + p.call(S:{}) { + [] p.getreply(S:?) -> value (v_res := @decoded payload) { + if (v_res == 1953719668) { setverdict (pass); } + else { setverdict(fail); } + } + [] p.getreply { setverdict(fail); } + } + } + + control { + execute(TC_Sem_220304_getreply_operation_018(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/Sem_220304_getreply_operation_019.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/Sem_220304_getreply_operation_019.ttcn new file mode 100644 index 00000000..8bfe73dd --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/Sem_220304_getreply_operation_019.ttcn @@ -0,0 +1,58 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:22.3.4, @decoded redirect value assignment of a universal charstring field + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirements are tested: +// When assigning individual fields of a reply, encoded parameters can be decoded +// prior to assignment using the @decoded modifier. In this case, the referenced +// parameter on the right hand sided of the assignment shall be one of the +// bitstring, hexstring, octetstring, charstring or universal charstring types. It +// shall be decoded into a value of the same type as the variable on the left hand +// side of the assignment. + +module Sem_220304_getreply_operation_019 { + type record R { + integer id, + universal charstring payload + } + + signature S() return R; + + type port P procedure { + inout S; + } + + type component GeneralComp { + port P p; + } + + function f_server() runs on GeneralComp { + var integer v_src := 1953719668 with { encode "32bit" }; + var R v_rec := { id := 5, payload := encvalue_unichar(v_src) }; + p.getcall(S:?); + p.reply(S:{} value v_rec); + } + + testcase TC_Sem_220304_getreply_operation_019() runs on GeneralComp system GeneralComp { + var integer v_res with { encode "32bit" }; + var GeneralComp v_ptc := GeneralComp.create("PTC"); + connect(self:p, v_ptc:p); + v_ptc.start(f_server()); + p.call(S:{}) { + [] p.getreply(S:?) -> value (v_res := @decoded payload) { + if (v_res == 1953719668) { setverdict (pass); } + else { setverdict(fail); } + } + [] p.getreply { setverdict(fail); } + } + v_ptc.done; + setverdict(pass); + } + + control { + execute(TC_Sem_220304_getreply_operation_019(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/Sem_220304_getreply_operation_020.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/Sem_220304_getreply_operation_020.ttcn new file mode 100644 index 00000000..0657f669 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/Sem_220304_getreply_operation_020.ttcn @@ -0,0 +1,56 @@ +/***************************************************************** + ** @author STF 487 (updated by STF 521) + ** @version 0.0.2 + ** @purpose 1:22.3.4, @decoded redirect value assignment with encoding parameter + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirements are tested: +// In case the referenced field is of the universal charstring type, the @decoded +// clause can contain an optional parameter defining the encoding format. The +// parameter shall be of the charstring type and it shall contain one of the +// strings allowed for the decvalue_unichar function (specified in clause C.5.4). + +module Sem_220304_getreply_operation_020 { + type record R { + integer id, + universal charstring payload + } + + signature S() return R; + + type port P procedure { + inout S; + } + + type component GeneralComp { + port P p; + } + + function f_server() runs on GeneralComp { + var integer v_src := 1953719668 with { variant "32 bit" }; + var R v_rec := { id := 5, payload := encvalue_unichar(v_src, "UTF-16LE") }; + p.getcall(S:?); + p.reply(S:{} value v_rec); + } + + testcase TC_Sem_220304_getreply_operation_020() runs on GeneralComp system GeneralComp { + var integer v_res with { variant "32 bit" }; + var GeneralComp v_ptc := GeneralComp.create("PTC"); + connect(self:p, v_ptc:p); + v_ptc.start(f_server()); + p.call(S:{}) { + [] p.getreply(S:?) -> value (v_res := @decoded("UTF-16LE") payload) { + if (v_res == 1953719668) { setverdict (pass); } + else { setverdict(fail); } + } + [] p.getreply { setverdict(fail); } + }; + v_ptc.done; + setverdict(pass); + } + + control { + execute(TC_Sem_220304_getreply_operation_020(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/Sem_220304_getreply_operation_021.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/Sem_220304_getreply_operation_021.ttcn new file mode 100644 index 00000000..ea71636c --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/Sem_220304_getreply_operation_021.ttcn @@ -0,0 +1,55 @@ +/***************************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:22.3.4, getreply with a from clause (single item) + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirements are tested: +// A getreply operation may be restricted to a certain communication partner in case +// of one-to-many connections. This restriction shall be denoted by using the from +// keyword followed by a specification of an address or component reference, a list +// of address or component references or any component. + +module Sem_220304_getreply_operation_021 { + + signature S() return integer; + + type port P procedure { + inout S; + } + + type component GeneralComp { + port P p; + } + + function f() runs on GeneralComp { + p.getcall(S:{}); + p.reply(S:{} value 1); + } + + const integer c_ptcCount := 3; + + testcase TC_Sem_220304_getreply_operation_021() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptcs[c_ptcCount]; + var integer v_receiveCounter := 0; + for (var integer i := 0; i < c_ptcCount; i := i + 1) { + v_ptcs[i] := GeneralComp.create; + connect(self:p, v_ptcs[i]:p); + v_ptcs[i].start(f()); + p.call(S:{}, nowait) to v_ptcs[i]; + } + + for (var integer i := 0; i < c_ptcCount; i := i + 1) { + alt { + [] p.getreply(S:?) from v_ptcs[0] { setverdict(pass); } // expected 1 from match + [] p.getreply(S:?) { v_receiveCounter := v_receiveCounter + 1; } // expected 2 other received exceptions + } + } + if (v_receiveCounter != c_ptcCount - 1) { setverdict(fail); } + } + + control { + execute(TC_Sem_220304_getreply_operation_021(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/Sem_220304_getreply_operation_022.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/Sem_220304_getreply_operation_022.ttcn new file mode 100644 index 00000000..90e13f13 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/Sem_220304_getreply_operation_022.ttcn @@ -0,0 +1,56 @@ +/***************************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:22.3.4, getreply with a from clause (multiple items) + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirements are tested: +// A getreply operation may be restricted to a certain communication partner in case +// of one-to-many connections. This restriction shall be denoted by using the from +// keyword followed by a specification of an address or component reference, a list +// of address or component references or any component. + +module Sem_220304_getreply_operation_022 { + + signature S() return integer; + + type port P procedure { + inout S; + } + + type component GeneralComp { + port P p; + } + + function f() runs on GeneralComp { + p.getcall(S:{}); + p.reply(S:{} value 1); + } + + const integer c_ptcCount := 3; + + testcase TC_Sem_220304_getreply_operation_022() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptcs[c_ptcCount]; + var integer v_fromCounter := 0, v_noFromCounter := 0; + for (var integer i := 0; i < c_ptcCount; i := i + 1) { + v_ptcs[i] := GeneralComp.create; + connect(self:p, v_ptcs[i]:p); + v_ptcs[i].start(f()); + p.call(S:{}, nowait) to v_ptcs[i]; + } + + for (var integer i := 0; i < c_ptcCount; i := i + 1) { + alt { + [] p.getreply(S:?) from (v_ptcs[0], v_ptcs[1]) { v_fromCounter := v_fromCounter + 1; } + [] p.getreply(S:?) { v_noFromCounter := v_noFromCounter + 1; } + } + } + if (v_fromCounter == 2 and v_noFromCounter == 1) { setverdict(pass); } + else { setverdict(fail); } + } + + control { + execute(TC_Sem_220304_getreply_operation_022(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/Sem_220304_getreply_operation_023.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/Sem_220304_getreply_operation_023.ttcn new file mode 100644 index 00000000..5e08d339 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/Sem_220304_getreply_operation_023.ttcn @@ -0,0 +1,53 @@ +/***************************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:22.3.4, getreply with a from clause (any component) + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirements are tested: +// A getreply operation may be restricted to a certain communication partner in case +// of one-to-many connections. This restriction shall be denoted by using the from +// keyword followed by a specification of an address or component reference, a list +// of address or component references or any component. + +module Sem_220304_getreply_operation_023 { + + signature S() return integer; + + type port P procedure { + inout S; + } + + type component GeneralComp { + port P p; + } + + function f() runs on GeneralComp { + p.getcall(S:{}); + p.reply(S:{} value 1); + } + + const integer c_ptcCount := 3; + + testcase TC_Sem_220304_getreply_operation_023() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptcs[c_ptcCount]; + for (var integer i := 0; i < c_ptcCount; i := i + 1) { + v_ptcs[i] := GeneralComp.create; + connect(self:p, v_ptcs[i]:p); + v_ptcs[i].start(f()); + p.call(S:{}, nowait) to v_ptcs[i]; + } + + for (var integer i := 0; i < c_ptcCount; i := i + 1) { + alt { + [] p.getreply(S:?) from any component { setverdict(pass); } + [] p.getreply(S:?) { setverdict(fail); } + } + } + } + + control { + execute(TC_Sem_220304_getreply_operation_023(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220305_raise_operation/NegSem_220305_raise_operation_001.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220305_raise_operation/NegSem_220305_raise_operation_001.ttcn new file mode 100644 index 00000000..18dec5ee --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220305_raise_operation/NegSem_220305_raise_operation_001.ttcn @@ -0,0 +1,45 @@ +/***************************************************************** + ** @author STF 487 (updated by STF 521) + ** @version 0.0.2 + ** @purpose 1:22.3.5, raised exception type not in the list of available exceptions + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// Exceptions are specified as types. Therefore the exception value may either be derived +// from a template conforming to the template(value) restriction or be the value resulting +// from an expression (which of course can be an explicit value). The optional type field in +// the value specification to the raise operation shall be used in cases where it is necessary +// to avoid any ambiguity of the type of the value being sent. + +module NegSem_220305_raise_operation_001 { + signature S() exception(charstring, octetstring); + + type port P procedure { + inout S; + } + + type component GeneralComp + { + port P p; + } + + function f() runs on GeneralComp + { + p.getcall(S:?); + p.raise(S, 1); + setverdict(pass); + } + + testcase TC_NegSem_220305_raise_operation_001() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + connect(self:p, v_ptc:p); + v_ptc.start(f()); + p.call(S:{}, nowait); // no processing of the exception to avoid possible errors in the catch operation + v_ptc.done; + } + + control { + execute(TC_NegSem_220305_raise_operation_001(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220305_raise_operation/NegSem_220305_raise_operation_002.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220305_raise_operation/NegSem_220305_raise_operation_002.ttcn new file mode 100644 index 00000000..830e91bc --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220305_raise_operation/NegSem_220305_raise_operation_002.ttcn @@ -0,0 +1,45 @@ +/***************************************************************** + ** @author STF 487 (updated by STF 521) + ** @version 0.0.2 + ** @purpose 1:22.3.5, exception raised for a signature with no exception list + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// Exceptions are specified as types. Therefore the exception value may either be derived +// from a template conforming to the template(value) restriction or be the value resulting +// from an expression (which of course can be an explicit value). The optional type field in +// the value specification to the raise operation shall be used in cases where it is necessary +// to avoid any ambiguity of the type of the value being sent. + +module NegSem_220305_raise_operation_002 { + signature S(); + + type port P procedure { + inout S; + } + + type component GeneralComp + { + port P p; + } + + function f() runs on GeneralComp + { + p.getcall(S:?); + p.raise(S, 1); + setverdict(pass); + } + + testcase TC_NegSem_220305_raise_operation_002() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + connect(self:p, v_ptc:p); + v_ptc.start(f()); + p.call(S:{}, nowait); // no processing of the exception to avoid possible errors in the catch operation + v_ptc.done; + } + + control { + execute(TC_NegSem_220305_raise_operation_002(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220305_raise_operation/NegSem_220305_raise_operation_003.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220305_raise_operation/NegSem_220305_raise_operation_003.ttcn new file mode 100644 index 00000000..c8fefd16 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220305_raise_operation/NegSem_220305_raise_operation_003.ttcn @@ -0,0 +1,48 @@ +/***************************************************************** + ** @author STF 487 (updated by STF 521) + ** @version 0.0.2 + ** @purpose 1:22.3.5, raised exception type is ambiguous + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// Exceptions are specified as types. Therefore the exception value may either be derived +// from a template conforming to the template(value) restriction or be the value resulting +// from an expression (which of course can be an explicit value). The optional type field in +// the value specification to the raise operation shall be used in cases where it is necessary +// to avoid any ambiguity of the type of the value being sent. + +module NegSem_220305_raise_operation_003 { + type integer MyInt1 (1..10); + type integer MyInt2 (1..20); + + signature S() exception(MyInt1, MyInt2); + + type port P procedure { + inout S; + } + + type component GeneralComp + { + port P p; + } + + function f() runs on GeneralComp + { + p.getcall(S:?); + p.raise(S, 1); + setverdict(pass); + } + + testcase TC_NegSem_220305_raise_operation_003() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + connect(self:p, v_ptc:p); + v_ptc.start(f()); + p.call(S:{}, nowait); // no processing of the exception to avoid possible errors in the catch operation + v_ptc.done; + } + + control { + execute(TC_NegSem_220305_raise_operation_003(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220305_raise_operation/NegSem_220305_raise_operation_004.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220305_raise_operation/NegSem_220305_raise_operation_004.ttcn new file mode 100644 index 00000000..81ad0ba2 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220305_raise_operation/NegSem_220305_raise_operation_004.ttcn @@ -0,0 +1,47 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:22.3.5, missing to clause in case of 1 to n connection + ** @verdict pass reject + *****************************************************************/ +// The following requirements are tested: +// In case of one-to-one connections, the to clause may be omitted, because the receiving +// entity is uniquely identified by the system structure. + +module NegSem_220305_raise_operation_004 { + signature S() exception(integer); + + type port P procedure { + inout S; + } + + type component GeneralComp + { + port P p; + } + + function f(integer p_expected) runs on GeneralComp + { + p.call(S:{}) { + [] p.catch(S, p_expected) { setverdict(pass); } + [] p.catch { setverdict(fail); } + } + } + + testcase TC_NegSem_220305_raise_operation_004() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc1 := GeneralComp.create, v_ptc2 := GeneralComp.create; + connect(self:p, v_ptc1:p); + connect(self:p, v_ptc2:p); + v_ptc1.start(f(1)); + v_ptc2.start(f(1)); + p.getcall(S:?); + p.getcall(S:?); // call from both components expected + p.raise(S, 1); // missing to clause: error expected + all component.done; + setverdict(pass); + } + + control { + execute(TC_NegSem_220305_raise_operation_004(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220305_raise_operation/NegSem_220305_raise_operation_005.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220305_raise_operation/NegSem_220305_raise_operation_005.ttcn new file mode 100644 index 00000000..ce2c0143 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220305_raise_operation/NegSem_220305_raise_operation_005.ttcn @@ -0,0 +1,47 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:22.3.5, exception on a message port + ** @verdict pass reject + *****************************************************************/ +// The following requirements are tested: +// An exception shall only be raised at a procedure-based port. An exception is a reaction +// to an accepted procedure call the result of which leads to an exceptional event. + +module NegSem_220305_raise_operation_005 { + signature S() exception(integer); + + type port PSig procedure { + inout S; + } + + type port PMsg message { + inout integer; + } + + type component GeneralComp + { + port PSig p1; + port PMsg p2; + } + + function f() runs on GeneralComp + { + p1.getcall(S:?); + p2.raise(S, 1); + setverdict(pass); + } + + testcase TC_NegSem_220305_raise_operation_005() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + connect(self:p1, v_ptc:p1); + connect(self:p2, v_ptc:p2); + v_ptc.start(f()); + p1.call(S:{}, nowait); // no processing of the exception to avoid possible errors in the catch operation + v_ptc.done; + } + + control { + execute(TC_NegSem_220305_raise_operation_005(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220305_raise_operation/NegSem_220305_raise_operation_006.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220305_raise_operation/NegSem_220305_raise_operation_006.ttcn new file mode 100644 index 00000000..ee06dc60 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220305_raise_operation/NegSem_220305_raise_operation_006.ttcn @@ -0,0 +1,42 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:22.3.5, exception procedure signature not in the port list + ** @verdict pass reject + *****************************************************************/ +// The following requirements are tested: +// The type definition of the port shall include in its list of accepted procedure calls the +// name of the procedure to which the exception belongs. + +module NegSem_220305_raise_operation_006 { + signature S1() exception(integer); + signature S2() exception(integer); + + type port P procedure { + inout S1; + } + + type component GeneralComp + { + port P p; + } + + function f() runs on GeneralComp + { + p.getcall(S1:?); + p.raise(S2, 1); + setverdict(pass); + } + + testcase TC_NegSem_220305_raise_operation_006() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + connect(self:p, v_ptc:p); + v_ptc.start(f()); + p.call(S1:{}, nowait); // no processing of the exception to avoid possible errors in the catch operation + v_ptc.done; + } + + control { + execute(TC_NegSem_220305_raise_operation_006(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220305_raise_operation/NegSem_220305_raise_operation_007.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220305_raise_operation/NegSem_220305_raise_operation_007.ttcn new file mode 100644 index 00000000..09cb4d15 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220305_raise_operation/NegSem_220305_raise_operation_007.ttcn @@ -0,0 +1,44 @@ +/***************************************************************** + ** @author STF 487 (updated by STF 521) + ** @version 0.0.2 + ** @purpose 1:22.3.5, value of incorrect type in the to clause of the raise operation + ** @verdict pass reject + *****************************************************************/ +// The following requirements are tested: +// All AddressRef items in the to clause shall be of type address, component or of the +// address type bound to the port type (see clause 6.2.9) of the port instance referenced +// in the raise operation. + +module NegSem_220305_raise_operation_007 { + signature S() exception(integer); + + type port P procedure { + inout S; + } + + type component GeneralComp + { + port P p; + } + + const charstring c_ptcName := "PTC"; + + function f() runs on GeneralComp + { + p.getcall(S:?); + p.raise(S, 1) to c_ptcName; + setverdict(pass); + } + + testcase TC_NegSem_220305_raise_operation_007() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create(c_ptcName); + connect(self:p, v_ptc:p); + v_ptc.start(f()); + p.call(S:{}, nowait); // no processing of the exception to avoid possible errors in the catch operation + v_ptc.done; + } + + control { + execute(TC_NegSem_220305_raise_operation_007(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220305_raise_operation/NegSem_220305_raise_operation_008.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220305_raise_operation/NegSem_220305_raise_operation_008.ttcn new file mode 100644 index 00000000..a86942a5 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220305_raise_operation/NegSem_220305_raise_operation_008.ttcn @@ -0,0 +1,42 @@ +/***************************************************************** + ** @author STF 487 (updated by STF 521) + ** @version 0.0.2 + ** @purpose 1:22.3.5, null in the to clause of the raise operation + ** @verdict pass reject + *****************************************************************/ +// The following requirements are tested: +// No AddressRef in the to clause shall contain the special value null at the time +// of the operation. + +module NegSem_220305_raise_operation_008 { + signature S() exception(integer); + + type port P procedure { + inout S; + } + + type component GeneralComp + { + port P p; + } + + function f() runs on GeneralComp + { + var GeneralComp v_compRef := null; + p.getcall(S:?); + p.raise(S, 1) to v_compRef; + setverdict(pass); + } + + testcase TC_NegSem_220305_raise_operation_008() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + connect(self:p, v_ptc:p); + v_ptc.start(f()); + p.call(S:{}, nowait); // no processing of the exception to avoid possible errors in the catch operation + v_ptc.done; + } + + control { + execute(TC_NegSem_220305_raise_operation_008(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220305_raise_operation/NegSem_220305_raise_operation_009.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220305_raise_operation/NegSem_220305_raise_operation_009.ttcn new file mode 100644 index 00000000..b68a362b --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220305_raise_operation/NegSem_220305_raise_operation_009.ttcn @@ -0,0 +1,42 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:22.3.5, raise operation on disconnected and unmapped ports + ** @verdict pass reject + *****************************************************************/ +// The following requirements are tested: +// Applying a raise operation to an unmapped or disconnected port shall cause a test case +// error. + +module NegSem_220305_raise_operation_009 { + signature S() exception(integer); + + type port P procedure { + inout S; + } + + type component GeneralComp + { + port P p; + } + + function f() runs on GeneralComp + { + p.getcall(S:?); + disconnect(self:p); + p.raise(S, 1); + setverdict(pass); + } + + testcase TC_NegSem_220305_raise_operation_009() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + connect(self:p, v_ptc:p); + v_ptc.start(f()); + p.call(S:{}, nowait); // no processing of the exception to avoid possible errors in the catch operation + v_ptc.done; + } + + control { + execute(TC_NegSem_220305_raise_operation_009(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220305_raise_operation/NegSem_220305_raise_operation_010.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220305_raise_operation/NegSem_220305_raise_operation_010.ttcn new file mode 100644 index 00000000..36a2dd4e --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220305_raise_operation/NegSem_220305_raise_operation_010.ttcn @@ -0,0 +1,39 @@ +/***************************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:22.3.5, exception template not conforming to template(value) restriction + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// f) The TemplateInstance shall conform to the template(value) restriction (see clause 15.8). + +module NegSem_220305_raise_operation_010 { + signature S() exception(charstring, octetstring); + + type port P procedure { + inout S; + } + + type component GeneralComp { + port P p; + } + + function f() runs on GeneralComp { + p.getcall(S:?); + p.raise(S, charstring:?); + setverdict(pass); + } + + testcase TC_NegSem_220305_raise_operation_010() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + connect(self:p, v_ptc:p); + v_ptc.start(f()); + p.call(S:{}, nowait); // no processing of the exception to avoid possible errors in the catch operation + v_ptc.done; + } + + control { + execute(TC_NegSem_220305_raise_operation_010(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220305_raise_operation/Sem_220305_raise_operation_001.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220305_raise_operation/Sem_220305_raise_operation_001.ttcn new file mode 100644 index 00000000..a9ace5a2 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220305_raise_operation/Sem_220305_raise_operation_001.ttcn @@ -0,0 +1,41 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:22.3.5, simple raise operation + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +// The following requirements are tested: +// The value part of the raise operation consists of the signature reference followed by the +// exception value. + +module Sem_220305_raise_operation_001 { + signature S() exception(integer); + + type port P procedure { + inout S; + } + + type component GeneralComp + { + port P p; + } + + function f() runs on GeneralComp + { + p.getcall(S:?); + p.raise(S, 1); + setverdict(pass); + } + + testcase TC_Sem_220305_raise_operation_001() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + connect(self:p, v_ptc:p); + v_ptc.start(f()); + p.call(S:{}, nowait); // no processing of the exception to avoid possible errors in the catch operation + v_ptc.done; + } + + control { + execute(TC_Sem_220305_raise_operation_001(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220305_raise_operation/Sem_220305_raise_operation_002.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220305_raise_operation/Sem_220305_raise_operation_002.ttcn new file mode 100644 index 00000000..4a40906f --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220305_raise_operation/Sem_220305_raise_operation_002.ttcn @@ -0,0 +1,52 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:22.3.5, unicast raise operation + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +// The following requirements are tested: +// Exceptions to one or more call operations may be sent to one, several or all peer entities +// connected to the addressed port. This can be specified in the same manner as described in +// clause 22.2.1. This means, the argument of the to clause of a raise operation is for +// unicast exceptions the address of one receiving entity, for multicast exceptions a list of +// addresses of a set of receivers and for broadcast exceptions the all component keywords. + + +module Sem_220305_raise_operation_002 { + signature S() exception(integer); + + type port P procedure { + inout S; + } + + type component GeneralComp + { + port P p; + } + + function f(integer p_expected) runs on GeneralComp + { + p.call(S:{}) { + [] p.catch(S, p_expected) { setverdict(pass); } + [] p.catch { setverdict(fail); } + } + } + + testcase TC_Sem_220305_raise_operation_002() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc1 := GeneralComp.create, v_ptc2 := GeneralComp.create; + connect(self:p, v_ptc1:p); + connect(self:p, v_ptc2:p); + v_ptc1.start(f(1)); + v_ptc2.start(f(2)); + p.getcall(S:?); + p.getcall(S:?); // call from both components expected + p.raise(S, 1) to v_ptc1; + p.raise(S, 2) to v_ptc2; + all component.done; + setverdict(pass); + } + + control { + execute(TC_Sem_220305_raise_operation_002(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220305_raise_operation/Sem_220305_raise_operation_003.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220305_raise_operation/Sem_220305_raise_operation_003.ttcn new file mode 100644 index 00000000..49da9cc2 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220305_raise_operation/Sem_220305_raise_operation_003.ttcn @@ -0,0 +1,49 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:22.3.5, broadcast raise operation + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +// The following requirements are tested: +// Exceptions to one or more call operations may be sent to one, several or all peer entities +// connected to the addressed port. This can be specified in the same manner as described in +// clause 22.2.1. This means, the argument of the to clause of a raise operation is for +// unicast exceptions the address of one receiving entity, for multicast exceptions a list of +// addresses of a set of receivers and for broadcast exceptions the all component keywords. + +module Sem_220305_raise_operation_003 { + signature S() exception(integer); + + type port P procedure { + inout S; + } + + type component GeneralComp + { + port P p; + } + + function f() runs on GeneralComp + { + p.call(S:{}) { + []p.catch { setverdict(pass); } + } + } + + testcase TC_Sem_220305_raise_operation_003() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc1 := GeneralComp.create, v_ptc2 := GeneralComp.create; + connect(self:p, v_ptc1:p); + connect(self:p, v_ptc2:p); + v_ptc1.start(f()); + v_ptc2.start(f()); + p.getcall(S:?); + p.getcall(S:?); // call from both components expected + p.raise(S, 1) to all component; + all component.done; + setverdict(pass); + } + + control { + execute(TC_Sem_220305_raise_operation_003(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220305_raise_operation/Sem_220305_raise_operation_004.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220305_raise_operation/Sem_220305_raise_operation_004.ttcn new file mode 100644 index 00000000..c14c8a4f --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220305_raise_operation/Sem_220305_raise_operation_004.ttcn @@ -0,0 +1,56 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:22.3.5, multicast raise operation + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirements are tested: +// Exceptions to one or more call operations may be sent to one, several or all peer entities +// connected to the addressed port. This can be specified in the same manner as described in +// clause 22.2.1. This means, the argument of the to clause of a raise operation is for +// unicast exceptions the address of one receiving entity, for multicast exceptions a list of +// addresses of a set of receivers and for broadcast exceptions the all component keywords. + + +module Sem_220305_raise_operation_004 { + signature S() exception(integer); + + type port P procedure { + inout S; + } + + type component GeneralComp + { + port P p; + } + + function f(integer p_expected) runs on GeneralComp + { + p.call(S:{}) { + [] p.catch(S, p_expected) { setverdict(pass); } + [] p.catch { setverdict(fail); } + } + } + + const integer c_ptcCount := 4; + + testcase TC_Sem_220305_raise_operation_004() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptcs[4]; + for (var integer i := 0; i < c_ptcCount; i := i + 1) { + v_ptcs[i] := GeneralComp.create; + connect(self:p, v_ptcs[i]:p); + if (i mod 2 == 0) { v_ptcs[i].start(f(1)); } + else { v_ptcs[i].start(f(2)); } + p.getcall(S:?); + } + p.raise(S, 1) to (v_ptcs[0], v_ptcs[2] ); + p.raise(S, 2) to (v_ptcs[1], v_ptcs[3] ); + all component.done; + setverdict(pass); + } + + control { + execute(TC_Sem_220305_raise_operation_004(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/NegSem_220306_catch_operation_001.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/NegSem_220306_catch_operation_001.ttcn new file mode 100644 index 00000000..6cd298df --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/NegSem_220306_catch_operation_001.ttcn @@ -0,0 +1,45 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:22.3.6, Verify that error occurs when any from catch is applied to single port + ** @verdict pass reject + *****************************************************************/ +// The following requirements are tested: +// Restriction g +// The PortArrayRef shall be a reference to a port array variable identifier. +module NegSem_220306_catch_operation_001 { + + signature S() exception(integer); + + type port P procedure { + inout S; + } + + type component GeneralComp + { + port P p; + } + + function f() runs on GeneralComp + { + p.getcall(S:?); + p.raise(S, 10); + } + + testcase TC_NegSem_220306_catch_operation_001() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + connect(self:p, v_ptc:p); + p.call(S:{}, nowait); + v_ptc.start(f()); + v_ptc.done; + alt + { + [] any from p.catch { setverdict(pass); } + [else] { setverdict(fail, "The any from catch operation didn't match for some reason"); } + } + } + + control { + execute(TC_NegSem_220306_catch_operation_001(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/NegSem_220306_catch_operation_002.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/NegSem_220306_catch_operation_002.ttcn new file mode 100644 index 00000000..89c87c28 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/NegSem_220306_catch_operation_002.ttcn @@ -0,0 +1,58 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:22.3.6, Verify that error occurs when any from catch is applied to 1D array and index target is array + ** @verdict pass reject + *****************************************************************/ +// The following requirements are tested: +// Restriction i +// If the index redirection is used for single-dimensional port arrays, the type +// of the integer variable shall allow storing the highest index of the respective array. +module NegSem_220306_catch_operation_002 { + + signature S() exception(integer); + + type port P procedure { + inout S; + } + + const integer c_portCount := 4; + type component GeneralComp + { + port P p[c_portCount]; + } + + function f() runs on GeneralComp + { + for(var integer i := 0; i < c_portCount; i := i + 1) { + p[i].getcall; + if (i mod 2 == 1) { p[i].raise(S, 10) }; + } + } + + testcase TC_NegSem_220306_catch_operation_002() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + var integer v_index[1]; + for(var integer i := 0; i < c_portCount; i := i + 1) { + connect(self:p[i], v_ptc:p[i]); + p[i].call(S:{}, nowait); + } + v_ptc.start(f()); + v_ptc.done; + alt + { + [] any from p.catch(S, integer:?) -> @index value v_index { + if(v_index[0] == 1){ + setverdict(pass); + } else { + setverdict(fail, "Index or parameter value incorrectly assigned"); + } + } + [else] { setverdict(fail, "The any from catch operation didn't match for some reason"); } + } + } + + control { + execute(TC_NegSem_220306_catch_operation_002(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/NegSem_220306_catch_operation_003.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/NegSem_220306_catch_operation_003.ttcn new file mode 100644 index 00000000..0f0841f7 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/NegSem_220306_catch_operation_003.ttcn @@ -0,0 +1,58 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:22.3.6, Verify that error occurs when any from catch is applied to 1D array and index target has wrong type + ** @verdict pass reject + *****************************************************************/ +// The following requirements are tested: +// Restriction i +// If the index redirection is used for single-dimensional port arrays, the type +// of the integer variable shall allow storing the highest index of the respective array. +module NegSem_220306_catch_operation_003 { + + signature S() exception(integer); + + type port P procedure { + inout S; + } + + const integer c_portCount := 4; + type component GeneralComp + { + port P p[c_portCount]; + } + + function f() runs on GeneralComp + { + for(var integer i := 0; i < c_portCount; i := i + 1) { + p[i].getcall; + if (i mod 2 == 1) { p[i].raise(S, 10) }; + } + } + + testcase TC_NegSem_220306_catch_operation_003() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + var float v_index; + for(var integer i := 0; i < c_portCount; i := i + 1) { + connect(self:p[i], v_ptc:p[i]); + p[i].call(S:{}, nowait); + } + v_ptc.start(f()); + v_ptc.done; + alt + { + [] any from p.catch(S, integer:?) -> @index value v_index { + if(v_index == 1.0){ + setverdict(pass); + } else { + setverdict(fail, "Index or parameter value incorrectly assigned"); + } + } + [else] { setverdict(fail, "The any from catch operation didn't match for some reason"); } + } + } + + control { + execute(TC_NegSem_220306_catch_operation_003(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/NegSem_220306_catch_operation_004.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/NegSem_220306_catch_operation_004.ttcn new file mode 100644 index 00000000..200b9054 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/NegSem_220306_catch_operation_004.ttcn @@ -0,0 +1,64 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:22.3.6, Verify that any from catch index redirection for multi-D arrays requires arrays of correct size + ** @verdict pass reject + *****************************************************************/ +// The following requirements are tested: +// Restriction j: +// If the index redirection is used for multi-dimensional component arrays, the size +// of the integer array or record of integer type shall exactly be the same as the dimension +// of the respective array, and its type shall allow storing the highest index (from all +// dimensions) of the array. +module NegSem_220306_catch_operation_004 { + + signature S() exception(integer); + + type port P procedure { + inout S; + } + + const integer c_portCount := 3; + type component GeneralComp + { + port P p[c_portCount][c_portCount]; + } + + function f() runs on GeneralComp + { + for(var integer i := 0; i < c_portCount; i := i + 1) { + for(var integer j := 0; j < c_portCount; j := j + 1) { + p[i][j].getcall(S:?); + if (i == 1 and j == 2 or i == 2 and j == 1) { p[i][j].raise(S, 10); } + } + } + } + + + testcase TC_NegSem_220306_catch_operation_004() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create, v_src; + var integer v_index[1]; + for(var integer i := 0; i < c_portCount; i := i + 1) { + for(var integer j := 0; j < c_portCount; j := j + 1) { + connect(self:p[i][j], v_ptc:p[i][j]); + p[i][j].call(S:{}, nowait); + } + } + v_ptc.start(f()); + v_ptc.done; + alt + { + [] any from p.catch(S, integer:?) -> sender v_src @index value v_index { + if(v_index[0] == 1 and v_index[1] == 2){ + setverdict(pass); + } else { + setverdict(fail, "Indices or parameter value incorrectly assigned"); + } + } + [else] { setverdict(fail, "The any from catch operation didn't match for some reason"); } + } } + + control { + execute(TC_NegSem_220306_catch_operation_004(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/NegSem_220306_catch_operation_005.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/NegSem_220306_catch_operation_005.ttcn new file mode 100644 index 00000000..312e0ef0 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/NegSem_220306_catch_operation_005.ttcn @@ -0,0 +1,64 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:22.3.6, Verify that any from catch index redirection for multi-D arrays requires arrays + ** @verdict pass reject + *****************************************************************/ +// The following requirements are tested: +// Restriction j: +// If the index redirection is used for multi-dimensional component arrays, the size +// of the integer array or record of integer type shall exactly be the same as the dimension +// of the respective array, and its type shall allow storing the highest index (from all +// dimensions) of the array. +module NegSem_220306_catch_operation_005 { + + signature S() exception(integer); + + type port P procedure { + inout S; + } + + const integer c_portCount := 3; + type component GeneralComp + { + port P p[c_portCount][c_portCount]; + } + + function f() runs on GeneralComp + { + for(var integer i := 0; i < c_portCount; i := i + 1) { + for(var integer j := 0; j < c_portCount; j := j + 1) { + p[i][j].getcall(S:?); + if (i == 1 and j == 2 or i == 2 and j == 1) { p[i][j].raise(S, 10); } + } + } + } + + testcase TC_NegSem_220306_catch_operation_005() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create, v_src; + var integer v_index; + for(var integer i := 0; i < c_portCount; i := i + 1) { + for(var integer j := 0; j < c_portCount; j := j + 1) { + connect(self:p[i][j], v_ptc:p[i][j]); + p[i][j].call(S:{}, nowait); + } + } + v_ptc.start(f()); + v_ptc.done; + alt + { + [] any from p.catch(S, integer:?) -> @index value v_index { + if(v_index == 1){ + setverdict(pass); + } else { + setverdict(fail, "Indices or parameter value incorrectly assigned"); + } + } + [else] { setverdict(fail, "The any from catch operation didn't match for some reason"); } + } + } + + control { + execute(TC_NegSem_220306_catch_operation_005(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/NegSem_220306_catch_operation_006.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/NegSem_220306_catch_operation_006.ttcn new file mode 100644 index 00000000..acb76c42 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/NegSem_220306_catch_operation_006.ttcn @@ -0,0 +1,46 @@ +/***************************************************************** + ** @author STF 487 (updated by STF 521) + ** @version 0.0.2 + ** @purpose 1:22.3.6, null component in the from clause of the catch operation + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// No AddressRef in the to clause shall contain the special value null at the time +// of the operation. + +module NegSem_220306_catch_operation_006 { + + signature S() exception (charstring); + + type port P procedure { + inout S; + } + + type component GeneralComp + { + port P p; + } + + function f() runs on GeneralComp + { + p.getcall(S:{}); + p.raise(S, "exc"); + } + + testcase TC_NegSem_220306_catch_operation_006() runs on GeneralComp system GeneralComp { + var GeneralComp v_compRef := null; + var GeneralComp v_ptc := GeneralComp.create; + connect(self:p, v_ptc:p); + v_ptc.start(f()); + p.call(S:{}) { + [] p.catch(S, charstring:?) from v_compRef {} // error expected + [] p.catch {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_220306_catch_operation_006(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/NegSem_220306_catch_operation_007.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/NegSem_220306_catch_operation_007.ttcn new file mode 100644 index 00000000..b0524b2e --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/NegSem_220306_catch_operation_007.ttcn @@ -0,0 +1,45 @@ +/***************************************************************** + ** @author STF 487 (updated by STF 521) + ** @version 0.0.2 + ** @purpose 1:22.3.6, null component in the multicast list of the from clause of the catch operation + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// No AddressRef in the to clause shall contain the special value null at the time +// of the operation. + +module NegSem_220306_catch_operation_007 { + + signature S() exception (charstring); + + type port P procedure { + inout S; + } + + type component GeneralComp + { + port P p; + } + + function f() runs on GeneralComp + { + p.getcall(S:{}); + p.raise(S, "exc"); + } + + testcase TC_NegSem_220306_catch_operation_007() runs on GeneralComp system GeneralComp { + var GeneralComp v_compRef := null; + var GeneralComp v_ptc := GeneralComp.create; + connect(self:p, v_ptc:p); + v_ptc.start(f()); + p.call(S:{}) { + [] p.catch(S, charstring:?) from (mtc, v_compRef) {} // error expected + } + setverdict(pass); + } + + control { + execute(TC_NegSem_220306_catch_operation_007(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/NegSem_220306_catch_operation_008.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/NegSem_220306_catch_operation_008.ttcn new file mode 100644 index 00000000..d37d905d --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/NegSem_220306_catch_operation_008.ttcn @@ -0,0 +1,55 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:22.3.6, applying @decoded to a forbidden exception field + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// When assigning individual fields of an exception, encoded payload fields can be +// decoded prior to assignment using the @decoded modifier. In this case, the +// referenced field on the right hand sided of the assignment shall be one of the +// bitstring, hexstring, octetstring, charstring or universal charstring types. It +// shall be decoded into a value of the same type as the variable on the left hand +// side of the assignment. + +module NegSem_220306_catch_operation_008 { + type record R { + integer id, + record of integer payload(0..255) + } + + signature S() exception (R); + + type port P procedure { + inout S; + } + + type component GeneralComp { + port P p; + } + + function f_server() runs on GeneralComp { + var R v_rec := { id := 6, payload := { 0, 0, 0, 0 }} + p.getcall(S:?); + p.raise(S, v_rec); + } + + testcase TC_NegSem_220306_catch_operation_008() runs on GeneralComp system GeneralComp { + var integer v_res with { encode "32bit" }; + var GeneralComp v_ptc := GeneralComp.create("PTC"); + connect(self:p, v_ptc:p); + v_ptc.start(f_server()); + p.call(S:{}) { + [] p.catch(S, R:?) -> value (v_res := @decoded payload) { + setverdict (pass); + } + [] p.catch { setverdict(pass); } + + } + } + + control { + execute(TC_NegSem_220306_catch_operation_008(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/NegSem_220306_catch_operation_009.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/NegSem_220306_catch_operation_009.ttcn new file mode 100644 index 00000000..7a1dce18 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/NegSem_220306_catch_operation_009.ttcn @@ -0,0 +1,50 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:22.3.6, decoding error in @decoded redirect value assignment + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// Failure of this decoding shall cause a test case error. + +module NegSem_220306_catch_operation_009 { + type record R { + integer id, + charstring payload + } + + signature S() exception (R); + + type port P procedure { + inout S; + } + + type component GeneralComp { + port P p; + } + + function f_server() runs on GeneralComp { + var integer v_src := 1953719668 with { encode "32bit" }; + var R v_rec := { id := 4, payload := encvalue_unichar(v_src) & "abcdefgij" }; + p.getcall(S:?); + p.reply(S:{} value v_rec); + } + + testcase TC_NegSem_220306_catch_operation_009() runs on GeneralComp system GeneralComp { + var integer v_res with { encode "32bit" }; + var GeneralComp v_ptc := GeneralComp.create("PTC"); + connect(self:p, v_ptc:p); + v_ptc.start(f_server()); + p.call(S:{}) { + [] p.catch(S, R:?) -> value (v_res := @decoded payload) { + setverdict (pass); + } + [] p.catch { setverdict(pass); } + } + } + + control { + execute(TC_NegSem_220306_catch_operation_009(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/NegSem_220306_catch_operation_010.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/NegSem_220306_catch_operation_010.ttcn new file mode 100644 index 00000000..7a85d6da --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/NegSem_220306_catch_operation_010.ttcn @@ -0,0 +1,52 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:22.3.6, invalid format value in @decoded redirect value assignment + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// Any other value shall cause an error. + +module NegSem_220306_catch_operation_010 { + type record R { + integer id, + universal charstring payload + } + + signature S() exception (R); + + type port P procedure { + inout S; + } + + type component GeneralComp { + port P p; + } + + function f_server() runs on GeneralComp { + var integer v_src := 1953719668 with { encode "32bit" }; + var R v_rec := { id := 5, payload := encvalue_unichar(v_src) }; + p.getcall(S:?); + p.raise(S, v_rec); + } + + testcase TC_NegSem_220306_catch_operation_010() runs on GeneralComp system GeneralComp { + var integer v_res with { encode "32bit" }; + var GeneralComp v_ptc := GeneralComp.create("PTC"); + connect(self:p, v_ptc:p); + v_ptc.start(f_server()); + p.call(S:{}) { + [] p.catch(S, R:?) -> value (v_res := @decoded("proprietary") payload) { + setverdict(pass); + } + [] p.catch { setverdict(pass); } + } + v_ptc.done; + setverdict(pass); + } + + control { + execute(TC_NegSem_220306_catch_operation_010(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/NegSem_220306_catch_operation_011.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/NegSem_220306_catch_operation_011.ttcn new file mode 100644 index 00000000..90624710 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/NegSem_220306_catch_operation_011.ttcn @@ -0,0 +1,51 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:22.3.6, value of wrong type in @decoded redirect value assignment + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// Any other value shall cause an error. + +module NegSem_220306_catch_operation_011 { + type record R { + integer id, + universal charstring payload + } + + signature S() exception (R); + + type port P procedure { + inout S; + } + + type component GeneralComp { + port P p; + } + + function f_server() runs on GeneralComp { + var integer v_src := 1953719668 with { encode "32bit" }; + var R v_rec := { id := 5, payload := encvalue_unichar(v_src) }; + p.getcall(S:?); + p.raise(S, v_rec); + } + + testcase TC_NegSem_220306_catch_operation_011() runs on GeneralComp system GeneralComp { + var integer v_res, v_enc := 32 with { encode "32bit" }; + var GeneralComp v_ptc := GeneralComp.create("PTC"); + connect(self:p, v_ptc:p); + v_ptc.start(f_server()); + p.call(S:{}) { + [] p.catch(S, R:?) -> value (v_res := @decoded(v_enc) payload) { + setverdict (pass); + } + [] p.catch { setverdict(pass); } + } + + } + + control { + execute(TC_NegSem_220306_catch_operation_011(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/NegSem_220306_catch_operation_012.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/NegSem_220306_catch_operation_012.ttcn new file mode 100644 index 00000000..66814eff --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/NegSem_220306_catch_operation_012.ttcn @@ -0,0 +1,52 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:22.3.6, encoding parameter of @decoded redirect value assignment applied to incorrect type + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// In case the referenced field is not a universal charstring, the optional +// parameter shall not be present. + +module NegSem_220202_ReceiveOperation_012 { + type record R { + integer id, + octetstring payload + } + + signature S() exception (R); + + type port P procedure { + inout S; + } + + type component GeneralComp { + port P p; + } + + function f_server() runs on GeneralComp { + var charstring v_src := "abc"; + var R v_rec := { id := 3, payload := bit2oct(encvalue(v_src)) }; + p.getcall(S:?); + p.raise(S, v_rec); + } + + testcase TC_NegSem_220306_catch_operation_012() runs on GeneralComp system GeneralComp { + var charstring v_res; + var GeneralComp v_ptc := GeneralComp.create("PTC"); + connect(self:p, v_ptc:p); + v_ptc.start(f_server()); + p.call(S:{}) { + [] p.catch(S, R:?) -> value (v_res := @decoded("UTF-8") payload) { + setverdict(pass); + } + [] p.catch { setverdict(pass); } + } + + } + + control { + execute(TC_NegSem_220306_catch_operation_012(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/NegSem_220306_catch_operation_013.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/NegSem_220306_catch_operation_013.ttcn new file mode 100644 index 00000000..ff9acbde --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/NegSem_220306_catch_operation_013.ttcn @@ -0,0 +1,51 @@ +/***************************************************************** + ** @author STF 487 (updated by STF 521) + ** @version 0.0.2 + ** @purpose 1:22.3.6, incompatible from and sender clause in catch operation + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// If the catch operation contains both from and sender clause, the variable or parameter +// referenced in the sender clause shall be type compatible with the template in the from +// clause. + +module NegSem_220306_catch_operation_013 { + + signature S() exception (charstring); + + type port P procedure { + inout S; + } + + type component GeneralComp { + var integer vc_int; + port P p; + } + + type component AltComp { + var charstring vc_str; + port P px; + } + + function f() runs on GeneralComp { + p.getcall(S:?); + p.raise(S, "exc"); + } + + testcase TC_NegSem_220306_catch_operation_013() runs on GeneralComp system GeneralComp { + var GeneralComp v_compRef := null; + var GeneralComp v_ptc := GeneralComp.create; + connect(self:p, v_ptc:p); + v_ptc.start(f()); + p.call(S:{}) { + [] p.catch(S, charstring:?) from AltComp:? -> sender v_compRef { } // error expected + [] p.catch { } + } + setverdict(pass); + } + + control { + execute(TC_NegSem_220306_catch_operation_013(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/NegSem_220306_catch_operation_014.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/NegSem_220306_catch_operation_014.ttcn new file mode 100644 index 00000000..b4362eda --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/NegSem_220306_catch_operation_014.ttcn @@ -0,0 +1,57 @@ +/***************************************************************** + ** @author STF 487 (updated by STF 521) + ** @version 0.0.2 + ** @purpose 1:22.3.6, incompatible decmatch and @decoded value redirect + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// When assigning implicitly decoded exception fields (by using the @decoded modifier) +// in cases where the value or template to be matched uses the MatchDecodedContent +// (decmatch) matching for the parameter to be stored, the type of the template in +// the MatchDecodedContent matching shall be type-compatible to the type of the +// variable the decoded field is stored into. + +module NegSem_220306_catch_operation_014 { + type record R { + integer id, + bitstring payload + } + signature S() return R; + + type port P procedure { + inout S; + } + + type component GeneralComp { + port P p; + } + + type record Wrapped { + integer num + } + + function f_server() runs on GeneralComp { + var integer v_src := 5; + var R v_rec := { id := 1, payload := encvalue(v_src) }; + p.getcall(S:?); + p.reply(S:{} value v_rec); + } + + testcase TC_NegSem_220306_catch_operation_014() runs on GeneralComp system GeneralComp { + var Wrapped v_res; + var GeneralComp v_ptc := GeneralComp.create("PTC"); + connect(self:p, v_ptc:p); + v_ptc.start(f_server()); + p.call(S:{}) { + [] p.getreply(S:{} value R:{ id := ?, payload := decmatch integer:? }) -> value (v_res := @decoded payload) { + setverdict (pass); + } + [] p.getreply { setverdict(pass); } + } + } + + control { + execute(TC_NegSem_220306_catch_operation_014(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/NegSem_220306_catch_operation_015.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/NegSem_220306_catch_operation_015.ttcn new file mode 100644 index 00000000..dc350a23 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/NegSem_220306_catch_operation_015.ttcn @@ -0,0 +1,47 @@ +/***************************************************************** + ** @author STF 521 + ** @version 0.0.2 + ** @purpose 1:22.3.6, incompatible template in the from clause of the catch operation + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// f) All AddressRef items in the from clause and all VariableRef items in the sender clause +// shall be of type address, component or of the address type bound to the port type (see +// clause 6.2.9) of the port instance referenced in the catch operation. + +module NegSem_220306_catch_operation_015 { + + signature S() exception (charstring); + + type port P procedure { + inout S; + } + + type component GeneralComp + { + port P p; + } + + function f() runs on GeneralComp + { + p.getcall(S:{}); + p.raise(S, "exc"); + } + + testcase TC_NegSem_220306_catch_operation_015() runs on GeneralComp system GeneralComp { + var charstring v_addr := "addr"; + var GeneralComp v_ptc := GeneralComp.create; + connect(self:p, v_ptc:p); + v_ptc.start(f()); + p.call(S:{}) { + [] p.catch(S, charstring:?) from v_addr {} // error expected + [] p.catch {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_220306_catch_operation_015(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/NegSem_220306_catch_operation_016.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/NegSem_220306_catch_operation_016.ttcn new file mode 100644 index 00000000..d61b9dd0 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/NegSem_220306_catch_operation_016.ttcn @@ -0,0 +1,50 @@ +/***************************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:22.3.6, trying to store an incompatible component value in the sender clause of a catch operation + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// l) If the operation contains a sender clause but no from clause, the sender shall be type +// compatible with the type of the variable or parameter referenced in the sender clause. + +module NegSem_220306_catch_operation_016 { + + signature S() exception (charstring); + + type port P procedure { + inout S; + } + + type component GeneralComp { + var integer vc_int; + port P p; + } + + type component AltComp { + var charstring vc_str; + port P px; + } + + function f() runs on GeneralComp { + p.getcall(S:?); + p.raise(S, "exc"); + } + + testcase TC_NegSem_220306_catch_operation_016() runs on GeneralComp system GeneralComp { + var AltComp v_compRef := null; + var GeneralComp v_ptc := GeneralComp.create; + connect(self:p, v_ptc:p); + v_ptc.start(f()); + p.call(S:{}) { + [] p.catch(S, charstring:?) -> sender v_compRef { } // error expected + [] p.catch { } + } + setverdict(pass); + } + + control { + execute(TC_NegSem_220306_catch_operation_016(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/NegSyn_220306_catch_operation_001.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/NegSyn_220306_catch_operation_001.ttcn new file mode 100644 index 00000000..e647494f --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/NegSyn_220306_catch_operation_001.ttcn @@ -0,0 +1,46 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:22.3.6, Verify that error occurs when using index redirection in port.catch operation + ** @verdict pass reject + *****************************************************************/ +// The following requirements are tested: +// Restriction h +// The index redirection shall only be used when the operation is used on an any from +// port array construct. +module NegSyn_220306_catch_operation_001 { + signature S() exception(integer); + + type port P procedure { + inout S; + } + + type component GeneralComp + { + port P p; + } + + function f() runs on GeneralComp + { + p.getcall(S:?); + p.raise(S, 20); + } + + testcase TC_NegSyn_220306_catch_operation_001() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + var integer v_index; + connect(self:p, v_ptc:p); + p.call(S:{}, nowait); + v_ptc.start(f()); + v_ptc.done; + alt + { + [] p.catch -> @index value v_index { setverdict(pass); } + [else] { setverdict(fail, "The any from catch operation didn't match for some reason"); } + } + } + + control { + execute(TC_NegSyn_220306_catch_operation_001(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/NegSyn_220306_catch_operation_002.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/NegSyn_220306_catch_operation_002.ttcn new file mode 100644 index 00000000..91323456 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/NegSyn_220306_catch_operation_002.ttcn @@ -0,0 +1,47 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:22.3.6, Verify that error occurs when using index redirection in any port.catch operation + ** @verdict pass reject + *****************************************************************/ +// The following requirements are tested: +// Restriction h +// The index redirection shall only be used when the operation is used on an any from +// port array construct. +module NegSyn_220306_catch_operation_002 { + + signature S() exception(integer); + + type port P procedure { + inout S; + } + + type component GeneralComp + { + port P p; + } + + function f() runs on GeneralComp + { + p.getcall(S:?); + p.raise(S, 10); + } + + testcase TC_NegSyn_220306_catch_operation_002() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + var integer v_index; + connect(self:p, v_ptc:p); + p.call(S:{}, nowait); + v_ptc.start(f()); + v_ptc.done; + alt + { + [] any port.catch -> @index value v_index { setverdict(pass); } + [else] { setverdict(fail, "The any from catch operation didn't match for some reason"); } + } + } + + control { + execute(TC_NegSyn_220306_catch_operation_002(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/NegSyn_220306_catch_operation_003.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/NegSyn_220306_catch_operation_003.ttcn new file mode 100644 index 00000000..3d543843 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/NegSyn_220306_catch_operation_003.ttcn @@ -0,0 +1,46 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:22.3.6, Verify that error occurs when any from catch is applied to 1D array and index target has wrong type + ** @verdict pass reject + *****************************************************************/ +// The following requirements are tested: +// The catch on any port from a port array operation can not be used to catch a call timeout. +module NegSyn_220306_catch_operation_003 { + + signature S() exception(integer); + + type port P procedure { + inout S; + } + + const integer c_portCount := 4; + type component GeneralComp + { + port P p[c_portCount]; + } + + function f() runs on GeneralComp + { + for(var integer i := 0; i < c_portCount; i := i + 1) { + p[i].getcall; + if (i mod 2 == 1) { p[i].raise(S, 10) }; + } + } + + testcase TC_NegSyn_220306_catch_operation_003() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + var float v_index; + for(var integer i := 0; i < c_portCount; i := i + 1) { + connect(self:p[i], v_ptc:p[i]); + p[i].call(S:{}, 1.0) { + []any from p.catch(timeout) { setverdict(pass); } + } + } + + } + + control { + execute(TC_NegSyn_220306_catch_operation_003(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/Sem_220306_catch_operation_001.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/Sem_220306_catch_operation_001.ttcn new file mode 100644 index 00000000..cc419649 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/Sem_220306_catch_operation_001.ttcn @@ -0,0 +1,40 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:22.3.6, Verify that any from catch is not triggered if there hasn't been any exception + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +// The following requirements are tested: +// To catch an exception on any port from a specific port array, use the any from PortArrayRef syntax +// where PortArrayRef shall be a reference to a port array identifier. +// The first port which matches all the criteria will cause the operation to be successful even if +// other ports in the array would also meet the criteria. +module Sem_220306_catch_operation_001 { + signature S() exception (integer); + + type port P procedure { + inout S; + } + + const integer c_portCount := 4; + type component GeneralComp + { + port P p[c_portCount]; + } + + testcase TC_Sem_220306_catch_operation_001() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + for(var integer i := 0; i < c_portCount; i := i + 1) { + connect(self:p[i], v_ptc:p[i]); + } + alt + { + [] any from p.catch { setverdict(fail, "The any from catch operation produced incorrect match"); } + [else] { setverdict(pass); } + } + } + + control { + execute(TC_Sem_220306_catch_operation_001(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/Sem_220306_catch_operation_002.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/Sem_220306_catch_operation_002.ttcn new file mode 100644 index 00000000..ec834178 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/Sem_220306_catch_operation_002.ttcn @@ -0,0 +1,51 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:22.3.6, Verify that any from catch matches if at least one port contains enqueued reply + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +// The following requirements are tested: +// To catch an exception on any port from a specific port array, use the any from PortArrayRef syntax +// where PortArrayRef shall be a reference to a port array identifier. +// The first port which matches all the criteria will cause the operation to be successful even if +// other ports in the array would also meet the criteria. +module Sem_220306_catch_operation_002 { + signature S() exception(integer); + + type port P procedure { + inout S; + } + + const integer c_portCount := 4; + type component GeneralComp + { + port P p[c_portCount]; + } + + function f() runs on GeneralComp + { + for(var integer i := 0; i < c_portCount; i := i + 1) { + p[i].getcall; + if (i mod 2 == 1) { p[i].raise(S, 1) }; + } + } + + testcase TC_Sem_220306_catch_operation_002() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + for(var integer i := 0; i < c_portCount; i := i + 1) { + connect(self:p[i], v_ptc:p[i]); + p[i].call(S:{}, nowait); + } + v_ptc.start(f()); + v_ptc.done; + alt + { + [] any from p.catch { setverdict(pass); } + [else] { setverdict(fail, "The any from catch operation didn't match for some reason"); } + } + } + + control { + execute(TC_Sem_220306_catch_operation_002(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/Sem_220306_catch_operation_003.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/Sem_220306_catch_operation_003.ttcn new file mode 100644 index 00000000..8c70f33f --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/Sem_220306_catch_operation_003.ttcn @@ -0,0 +1,59 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:22.3.6, Verify that any from catch doesn't assign index when there's no suitable match + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +// The following requirements are tested: +// It is also possible to store the index of a port in a single-dimensional port array at which +// the operation was successful to a variable of type integer or, in case of multi-dimensional +// port arrays the index of the successful port to an integer array or record of integer variable. +module Sem_220306_catch_operation_003 { + + signature S() exception(integer); + + type port P procedure { + inout S; + } + + const integer c_portCount := 4; + type component GeneralComp + { + port P p[c_portCount]; + } + + function f() runs on GeneralComp + { + for(var integer i := 0; i < c_portCount; i := i + 1) { + p[i].getcall; + if (i mod 2 == 1) { p[i].raise(S, i + 100) }; + } + } + + testcase TC_Sem_220306_catch_operation_003() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + var integer v_index; + for(var integer i := 0; i < c_portCount; i := i + 1) { + connect(self:p[i], v_ptc:p[i]); + p[i].call(S:{}, nowait); + } + v_ptc.start(f()); + v_ptc.done; + alt + { + [] any from p.catch(S, integer:(1..10)) -> @index value v_index { + setverdict(fail, "The any from catch operation produced incorrect match"); + } + [else] { setverdict(pass); } + } + if(not isbound(v_index)){ + setverdict(pass); + } else { + setverdict(fail, "Index incorrectly assigned"); + } + } + + control { + execute(TC_Sem_220306_catch_operation_003(), 5000.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/Sem_220306_catch_operation_004.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/Sem_220306_catch_operation_004.ttcn new file mode 100644 index 00000000..4fb29bb6 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/Sem_220306_catch_operation_004.ttcn @@ -0,0 +1,59 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:22.3.6, Verify that any from catch doesn't change index variable when no there's no suitable match + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +// The following requirements are tested: +// It is also possible to store the index of a port in a single-dimensional port array at which +// the operation was successful to a variable of type integer or, in case of multi-dimensional +// port arrays the index of the successful port to an integer array or record of integer variable. +module Sem_220306_catch_operation_004 { + + signature S() exception(integer); + + type port P procedure { + inout S; + } + + const integer c_portCount := 4; + type component GeneralComp + { + port P p[c_portCount]; + } + + function f() runs on GeneralComp + { + for(var integer i := 0; i < c_portCount; i := i + 1) { + p[i].getcall; + if (i mod 2 == 1) { p[i].raise(S, i + 100) }; + } + } + + testcase TC_Sem_220306_catch_operation_004() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + var integer v_index := 99; + for(var integer i := 0; i < c_portCount; i := i + 1) { + connect(self:p[i], v_ptc:p[i]); + p[i].call(S:{}, nowait); + } + v_ptc.start(f()); + v_ptc.done; + alt + { + [] any from p.catch(S, integer:(1..10)) -> @index value v_index { + setverdict(fail, "The any from catch operation produced incorrect match"); + } + [else] { setverdict(pass); } + } + if(v_index == 99){ + setverdict(pass); + } else { + setverdict(fail, "Index incorrectly assigned"); + } + } + + control { + execute(TC_Sem_220306_catch_operation_004(), 5000.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/Sem_220306_catch_operation_005.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/Sem_220306_catch_operation_005.ttcn new file mode 100644 index 00000000..788a2d55 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/Sem_220306_catch_operation_005.ttcn @@ -0,0 +1,60 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:22.3.6, Verify that any from done assigns index + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +// The following requirements are tested: +// It is also possible to store the index of a port in a single-dimensional port array at which +// the operation was successful to a variable of type integer or, in case of multi-dimensional +// port arrays the index of the successful port to an integer array or record of integer variable. +// When checking the port array for matching exceptions, the port indices to be checked are iterated +// from lowest to highest. +module Sem_220306_catch_operation_005 { + + signature S() exception(integer); + + type port P procedure { + inout S; + } + + const integer c_portCount := 4; + type component GeneralComp + { + port P p[c_portCount]; + } + + function f() runs on GeneralComp + { + for(var integer i := 0; i < c_portCount; i := i + 1) { + p[i].getcall; + if (i mod 2 == 1) { p[i].raise(S, i + 1); }; + } + } + + testcase TC_Sem_220306_catch_operation_005() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + var integer v_index, v_res; + for(var integer i := 0; i < c_portCount; i := i + 1) { + connect(self:p[i], v_ptc:p[i]); + p[i].call(S:{}, nowait); + } + v_ptc.start(f()); + v_ptc.done; + alt + { + [] any from p.catch(S, integer:(0..c_portCount)) -> value v_res @index value v_index { + if(v_index == 1 and v_res == v_index + 1){ + setverdict(pass); + } else { + setverdict(fail, "Index or parameter value incorrectly assigned"); + } + } + [else] { setverdict(fail, "The any from catch operation didn't match for some reason"); } + } + } + + control { + execute(TC_Sem_220306_catch_operation_005(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/Sem_220306_catch_operation_006.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/Sem_220306_catch_operation_006.ttcn new file mode 100644 index 00000000..99706ee2 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/Sem_220306_catch_operation_006.ttcn @@ -0,0 +1,64 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:22.3.6, Verify that any from catch index redirection works for multidimensional arrays + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +// The following requirements are tested: +// Restriction j: +// If the index redirection is used for multi-dimensional component arrays, the size +// of the integer array or record of integer type shall exactly be the same as the dimension +// of the respective array, and its type shall allow storing the highest index (from all +// dimensions) of the array. +module Sem_220306_catch_operation_006 { + + signature S() exception(integer); + + type port P procedure { + inout S; + } + + const integer c_portCount := 3; + type component GeneralComp + { + port P p[c_portCount][c_portCount]; + } + + function f() runs on GeneralComp + { + for(var integer i := 0; i < c_portCount; i := i + 1) { + for(var integer j := 0; j < c_portCount; j := j + 1) { + p[i][j].getcall; + if (i == 1 and j == 2 or i == 2 and j == 1) { p[i][j].raise(S, i + 1 ); } + } + } + } + + testcase TC_Sem_220306_catch_operation_006() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create, v_src; + var integer v_index[2], v_parValue; + for(var integer i := 0; i < c_portCount; i := i + 1) { + for(var integer j := 0; j < c_portCount; j := j + 1) { + connect(self:p[i][j], v_ptc:p[i][j]); + p[i][j].call(S:{}, nowait); + } + } + v_ptc.start(f()); + v_ptc.done; + alt + { + [] any from p.catch(S, integer:?) -> sender v_src @index value v_index { + if(v_index[0] == 1 and v_index[1] == 2){ + setverdict(pass); + } else { + setverdict(fail, "Indices or parameter value incorrectly assigned"); + } + } + [else] { setverdict(fail, "The any from catch operation didn't match for some reason"); } + } + } + + control { + execute(TC_Sem_220306_catch_operation_006(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/Sem_220306_catch_operation_007.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/Sem_220306_catch_operation_007.ttcn new file mode 100644 index 00000000..e476ee16 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/Sem_220306_catch_operation_007.ttcn @@ -0,0 +1,58 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:22.3.6, Verify any from catch index redirection to lazy variable + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +// The following requirements are tested: +// Restriction k +// If a variable referenced in the @index clause is a lazy or fuzzy variable, the expression +// assigned to this variable is equal to the result produced by the catch operation. Later +// evaluation of the lazy or fuzzy variable does not lead to repeated invocation of the +// catch operation. +module Sem_220306_catch_operation_007 { + + signature S() exception(integer); + + type port P procedure { + inout S; + } + + const integer c_portCount := 4; + type component GeneralComp + { + port P p[c_portCount]; + } + function f() runs on GeneralComp + { + for(var integer i := 0; i < c_portCount; i := i + 1) { + p[i].getcall; + if (i mod 2 == 1) { p[i].raise(S, i + 1) }; + } + } + testcase TC_Sem_220306_catch_operation_007() runs on GeneralComp system GeneralComp { + var @lazy integer v_index; + var GeneralComp v_ptc := GeneralComp.create; + for(var integer i := 0; i < c_portCount; i := i + 1) { + connect(self:p[i], v_ptc:p[i]); + p[i].call(S:{}, nowait); + } + v_ptc.start(f()); + v_ptc.done; + alt + { + [] any from p.catch(S, integer:?) -> @index value v_index { + if(v_index == 1){ // no catch call during evaluation, v_index remains equal to 1 + setverdict(pass); + } else { + setverdict(fail, "Index or parameter value incorrectly assigned"); + } + } + [else] { setverdict(fail, "The any from catch operation didn't match for some reason"); } + } + } + + control { + execute(TC_Sem_220306_catch_operation_007(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/Sem_220306_catch_operation_008.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/Sem_220306_catch_operation_008.ttcn new file mode 100644 index 00000000..6345b39c --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/Sem_220306_catch_operation_008.ttcn @@ -0,0 +1,58 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:22.3.6, Verify any from catch index redirection to fuzzy variable + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +// The following requirements are tested: +// Restriction k +// If a variable referenced in the @index clause is a lazy or fuzzy variable, the expression +// assigned to this variable is equal to the result produced by the catch operation. Later +// evaluation of the lazy or fuzzy variable does not lead to repeated invocation of the +// catch operation. +module Sem_220306_catch_operation_008 { + + signature S() exception(integer); + + type port P procedure { + inout S; + } + + const integer c_portCount := 4; + type component GeneralComp + { + port P p[c_portCount]; + } + function f() runs on GeneralComp + { + for(var integer i := 0; i < c_portCount; i := i + 1) { + p[i].getcall; + if (i mod 2 == 1) { p[i].raise(S, i + 1) }; + } + } + testcase TC_Sem_220306_catch_operation_008() runs on GeneralComp system GeneralComp { + var @fuzzy integer v_index; + var GeneralComp v_ptc := GeneralComp.create; + for(var integer i := 0; i < c_portCount; i := i + 1) { + connect(self:p[i], v_ptc:p[i]); + p[i].call(S:{}, nowait); + } + v_ptc.start(f()); + v_ptc.done; + alt + { + [] any from p.catch(S, integer:?) -> @index value v_index { + if(v_index == 1){ // no catch call during evaluation, v_index remains equal to 1 + setverdict(pass); + } else { + setverdict(fail, "Index or parameter value incorrectly assigned"); + } + } + [else] { setverdict(fail, "The any from catch operation didn't match for some reason"); } + } + } + + control { + execute(TC_Sem_220306_catch_operation_008(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/Sem_220306_catch_operation_009.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/Sem_220306_catch_operation_009.ttcn new file mode 100644 index 00000000..a9423c41 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/Sem_220306_catch_operation_009.ttcn @@ -0,0 +1,57 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:22.3.6, @decoded redirect value assignment of a bitstring field + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirements are tested: +// When assigning individual fields of an exception, encoded payload fields can be +// decoded prior to assignment using the @decoded modifier. In this case, the +// referenced field on the right hand sided of the assignment shall be one of the +// bitstring, hexstring, octetstring, charstring or universal charstring types. It +// shall be decoded into a value of the same type as the variable on the left hand +// side of the assignment. + +module Sem_220306_catch_operation_009 { + type record R { + integer id, + bitstring payload + } + + signature S() exception (R); + + type port P procedure { + inout S; + } + + type component GeneralComp { + port P p; + } + + function f_server() runs on GeneralComp { + var charstring v_src := "abc"; + var R v_rec := { id := 1, payload := encvalue(v_src) }; + p.getcall(S:?); + p.raise(S, v_rec); + log("dada"); + } + + testcase TC_Sem_220306_catch_operation_009() runs on GeneralComp system GeneralComp { + var charstring v_res; + var GeneralComp v_ptc := GeneralComp.create("PTC"); + connect(self:p, v_ptc:p); + v_ptc.start(f_server()); + p.call(S:{}) { + [] p.catch(S, R:?) -> value (v_res := @decoded payload) { + if (v_res == "abc") { setverdict (pass); } + else { setverdict(fail); } + } + [] p.catch { setverdict(fail); } + } + } + + control { + execute(TC_Sem_220306_catch_operation_009(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/Sem_220306_catch_operation_010.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/Sem_220306_catch_operation_010.ttcn new file mode 100644 index 00000000..71bd6982 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/Sem_220306_catch_operation_010.ttcn @@ -0,0 +1,56 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:22.3.6, @decoded redirect value assignment of a hexstring field + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirements are tested: +// When assigning individual fields of an exception, encoded payload fields can be +// decoded prior to assignment using the @decoded modifier. In this case, the +// referenced field on the right hand sided of the assignment shall be one of the +// bitstring, hexstring, octetstring, charstring or universal charstring types. It +// shall be decoded into a value of the same type as the variable on the left hand +// side of the assignment. + +module Sem_220306_catch_operation_010 { + type record R { + integer id, + hexstring payload + } + + signature S() exception (R); + + type port P procedure { + inout S; + } + + type component GeneralComp { + port P p; + } + + function f_server() runs on GeneralComp { + var charstring v_src := "abc"; + var R v_rec := { id := 2, payload := bit2hex(encvalue(v_src)) }; + p.getcall(S:?); + p.raise(S, v_rec); + } + + testcase TC_Sem_220306_catch_operation_010() runs on GeneralComp system GeneralComp { + var charstring v_res; + var GeneralComp v_ptc := GeneralComp.create("PTC"); + connect(self:p, v_ptc:p); + v_ptc.start(f_server()); + p.call(S:{ }) { + [] p.catch(S, R:?) -> value (v_res := @decoded payload) { + if (v_res == "abc") { setverdict (pass); } + else { setverdict(fail); } + } + [] p.catch { setverdict(fail); } + } + } + + control { + execute(TC_Sem_220306_catch_operation_010(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/Sem_220306_catch_operation_011.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/Sem_220306_catch_operation_011.ttcn new file mode 100644 index 00000000..a838d7e2 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/Sem_220306_catch_operation_011.ttcn @@ -0,0 +1,57 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:22.3.6, @decoded redirect value assignment of an octetstring field + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirements are tested: +// When assigning individual fields of an exception, encoded payload fields can be +// decoded prior to assignment using the @decoded modifier. In this case, the +// referenced field on the right hand sided of the assignment shall be one of the +// bitstring, hexstring, octetstring, charstring or universal charstring types. It +// shall be decoded into a value of the same type as the variable on the left hand +// side of the assignment. + +module Sem_220306_catch_operation_011 { + type record R { + integer id, + octetstring payload + } + + signature S() exception (R); + + type port P procedure { + inout S; + } + + type component GeneralComp { + port P p; + } + + function f_server() runs on GeneralComp { + var charstring v_src := "abc"; + var R v_rec := { id := 3, payload := bit2oct(encvalue(v_src)) }; + p.getcall(S:?); + p.raise(S, v_rec); + } + + testcase TC_Sem_220306_catch_operation_011() runs on GeneralComp system GeneralComp { + var charstring v_res; + var GeneralComp v_ptc := GeneralComp.create("PTC"); + connect(self:p, v_ptc:p); + v_ptc.start(f_server()); + p.call(S:{}) { + [] p.catch(S, R:?) -> value (v_res := @decoded payload) { + if (v_res == "abc") { setverdict (pass); } + else { setverdict(fail); } + } + [] p.catch { setverdict(fail); } + + } + } + + control { + execute(TC_Sem_220306_catch_operation_011(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/Sem_220306_catch_operation_012.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/Sem_220306_catch_operation_012.ttcn new file mode 100644 index 00000000..9b984ccc --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/Sem_220306_catch_operation_012.ttcn @@ -0,0 +1,56 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:22.3.6, @decoded redirect value assignment of a charstring field + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirements are tested: +// When assigning individual fields of an exception, encoded payload fields can be +// decoded prior to assignment using the @decoded modifier. In this case, the +// referenced field on the right hand sided of the assignment shall be one of the +// bitstring, hexstring, octetstring, charstring or universal charstring types. It +// shall be decoded into a value of the same type as the variable on the left hand +// side of the assignment. + +module Sem_220306_catch_operation_012 { + type record R { + integer id, + charstring payload + } + + signature S() exception (R); + + type port P procedure { + inout S; + } + + type component GeneralComp { + port P p; + } + + function f_server() runs on GeneralComp { + var integer v_src := 1953719668 with { encode "32bit" }; + var R v_rec := { id := 4, payload := encvalue_unichar(v_src) }; + p.getcall(S:?); + p.raise(S, v_rec) + } + + testcase TC_Sem_220306_catch_operation_012() runs on GeneralComp system GeneralComp { + var integer v_res with { encode "32bit" }; + var GeneralComp v_ptc := GeneralComp.create("PTC"); + connect(self:p, v_ptc:p); + v_ptc.start(f_server()); + p.call(S:{}) { + [] p.catch(S, R:?) -> value (v_res := @decoded payload) { + if (v_res == 1953719668) { setverdict (pass); } + else { setverdict(fail); } + } + [] p.catch { setverdict(fail); } + } + } + + control { + execute(TC_Sem_220306_catch_operation_012(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/Sem_220306_catch_operation_013.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/Sem_220306_catch_operation_013.ttcn new file mode 100644 index 00000000..1cd46b13 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/Sem_220306_catch_operation_013.ttcn @@ -0,0 +1,58 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:22.3.6, @decoded redirect value assignment of a universal charstring field + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirements are tested: +// When assigning individual fields of an exception, encoded payload fields can be +// decoded prior to assignment using the @decoded modifier. In this case, the +// referenced field on the right hand sided of the assignment shall be one of the +// bitstring, hexstring, octetstring, charstring or universal charstring types. It +// shall be decoded into a value of the same type as the variable on the left hand +// side of the assignment. + +module Sem_220306_catch_operation_013 { + type record R { + integer id, + universal charstring payload + } + + signature S() exception (R); + + type port P procedure { + inout S; + } + + type component GeneralComp { + port P p; + } + + function f_server() runs on GeneralComp { + var integer v_src := 1953719668 with { encode "32bit" }; + var R v_rec := { id := 5, payload := encvalue_unichar(v_src) }; + p.getcall(S:?); + p.raise(S, v_rec); + } + + testcase TC_Sem_220306_catch_operation_013() runs on GeneralComp system GeneralComp { + var integer v_res with { encode "32bit" }; + var GeneralComp v_ptc := GeneralComp.create("PTC"); + connect(self:p, v_ptc:p); + v_ptc.start(f_server()); + p.call(S:{}) { + [] p.catch(S, R:?) -> value (v_res := @decoded payload) { + if (v_res == 1953719668) { setverdict (pass); } + else { setverdict(fail); } + } + [] p.catch { setverdict(fail); } + } + v_ptc.done; + setverdict(pass); + } + + control { + execute(TC_Sem_220306_catch_operation_013(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/Sem_220306_catch_operation_014.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/Sem_220306_catch_operation_014.ttcn new file mode 100644 index 00000000..271d8c27 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/Sem_220306_catch_operation_014.ttcn @@ -0,0 +1,56 @@ +/***************************************************************** + ** @author STF 487 (updated by STF 521) + ** @version 0.0.2 + ** @purpose 1:22.3.6, @decoded redirect value assignment with encoding parameter + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirements are tested: +// In case the referenced field is of the universal charstring type, the @decoded +// clause can contain an optional parameter defining the encoding format. The +// parameter shall be of the charstring type and it shall contain one of the +// strings allowed for the decvalue_unichar function (specified in clause C.5.4). + +module Sem_220306_catch_operation_014 { + type record R { + integer id, + universal charstring payload + } + + signature S() exception (R); + + type port P procedure { + inout S; + } + + type component GeneralComp { + port P p; + } + + function f_server() runs on GeneralComp { + var integer v_src := 1953719668 with { variant "32 bit" }; + var R v_rec := { id := 5, payload := encvalue_unichar(v_src, "UTF-16LE") }; + p.getcall(S:?); + p.raise(S, v_rec); + } + + testcase TC_Sem_220306_catch_operation_014() runs on GeneralComp system GeneralComp { + var integer v_res with { variant "32 bit" }; + var GeneralComp v_ptc := GeneralComp.create("PTC"); + connect(self:p, v_ptc:p); + v_ptc.start(f_server()); + p.call(S:{}) { + [] p.catch(S, R:?) -> value (v_res := @decoded("UTF-16LE") payload) { + if (v_res == 1953719668) { setverdict (pass); } + else { setverdict(fail); } + } + [] p.catch { setverdict(fail); } + }; + v_ptc.done; + setverdict(pass); + } + + control { + execute(TC_Sem_220306_catch_operation_014(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/Sem_220306_catch_operation_015.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/Sem_220306_catch_operation_015.ttcn new file mode 100644 index 00000000..056cf582 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/Sem_220306_catch_operation_015.ttcn @@ -0,0 +1,57 @@ +/***************************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:22.3.6, catch with a from clause (single item) + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirements are tested: +// A catch operation may be restricted to a certain communication partner in case +// of one-to-many connections. This restriction shall be denoted by using the from +// keyword followed by a specification of an address or component reference, a list +// of address or component references or any component. + +module Sem_220306_catch_operation_015 { + + signature S() exception (charstring); + + type port P procedure { + inout S; + } + + type component GeneralComp + { + port P p; + } + + function f() runs on GeneralComp + { + p.getcall(S:{}); + p.raise(S, "exc"); + } + + const integer c_ptcCount := 3; + + testcase TC_Sem_220306_catch_operation_015() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptcs[c_ptcCount]; + var integer v_receiveCounter := 0; + for (var integer i := 0; i < c_ptcCount; i := i + 1) { + v_ptcs[i] := GeneralComp.create; + connect(self:p, v_ptcs[i]:p); + v_ptcs[i].start(f()); + p.call(S:{}, nowait) to v_ptcs[i]; + } + + for (var integer i := 0; i < c_ptcCount; i := i + 1) { + alt { + [] p.catch(S, charstring:?) from v_ptcs[0] { setverdict(pass); } // expected 1 from match + [] p.catch(S, charstring:?) { v_receiveCounter := v_receiveCounter + 1; } // expected 2 other received exceptions + } + } + if (v_receiveCounter != c_ptcCount - 1) { setverdict(fail); } + } + + control { + execute(TC_Sem_220306_catch_operation_015(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/Sem_220306_catch_operation_016.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/Sem_220306_catch_operation_016.ttcn new file mode 100644 index 00000000..da1050ac --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/Sem_220306_catch_operation_016.ttcn @@ -0,0 +1,58 @@ +/***************************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:22.3.6, catch with a from clause (multiple items) + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirements are tested: +// A catch operation may be restricted to a certain communication partner in case +// of one-to-many connections. This restriction shall be denoted by using the from +// keyword followed by a specification of an address or component reference, a list +// of address or component references or any component. + +module Sem_220306_catch_operation_016 { + + signature S() exception (charstring); + + type port P procedure { + inout S; + } + + type component GeneralComp + { + port P p; + } + + function f() runs on GeneralComp + { + p.getcall(S:{}); + p.raise(S, "exc"); + } + + const integer c_ptcCount := 3; + + testcase TC_Sem_220306_catch_operation_016() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptcs[c_ptcCount]; + var integer v_fromCounter := 0, v_noFromCounter := 0; + for (var integer i := 0; i < c_ptcCount; i := i + 1) { + v_ptcs[i] := GeneralComp.create; + connect(self:p, v_ptcs[i]:p); + v_ptcs[i].start(f()); + p.call(S:{}, nowait) to v_ptcs[i]; + } + + for (var integer i := 0; i < c_ptcCount; i := i + 1) { + alt { + [] p.catch(S, charstring:?) from (v_ptcs[0], v_ptcs[1]) { v_fromCounter := v_fromCounter + 1; } + [] p.catch(S, charstring:?) { v_noFromCounter := v_noFromCounter + 1; } + } + } + if (v_fromCounter == 2 and v_noFromCounter == 1) { setverdict(pass); } + else { setverdict(fail); } + } + + control { + execute(TC_Sem_220306_catch_operation_016(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/Sem_220306_catch_operation_017.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/Sem_220306_catch_operation_017.ttcn new file mode 100644 index 00000000..a5db0279 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/Sem_220306_catch_operation_017.ttcn @@ -0,0 +1,55 @@ +/***************************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:22.3.6, catch with a from clause (any component) + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirements are tested: +// A catch operation may be restricted to a certain communication partner in case +// of one-to-many connections. This restriction shall be denoted by using the from +// keyword followed by a specification of an address or component reference, a list +// of address or component references or any component. + +module Sem_220306_catch_operation_017 { + + signature S() exception (charstring); + + type port P procedure { + inout S; + } + + type component GeneralComp + { + port P p; + } + + function f() runs on GeneralComp + { + p.getcall(S:{}); + p.raise(S, "exc"); + } + + const integer c_ptcCount := 3; + + testcase TC_Sem_220306_catch_operation_017() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptcs[c_ptcCount]; + for (var integer i := 0; i < c_ptcCount; i := i + 1) { + v_ptcs[i] := GeneralComp.create; + connect(self:p, v_ptcs[i]:p); + v_ptcs[i].start(f()); + p.call(S:{}, nowait) to v_ptcs[i]; + } + + for (var integer i := 0; i < c_ptcCount; i := i + 1) { + alt { + [] p.catch(S, charstring:?) from any component { setverdict(pass); } + [] p.catch(S, charstring:?) { setverdict(fail); } + } + } + } + + control { + execute(TC_Sem_220306_catch_operation_017(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2204_the_check_operation/NegSem_2204_the_check_operation_001.ttcn b/ATS/core_language/22_communication_operations/2204_the_check_operation/NegSem_2204_the_check_operation_001.ttcn new file mode 100644 index 00000000..28e3ea3f --- /dev/null +++ b/ATS/core_language/22_communication_operations/2204_the_check_operation/NegSem_2204_the_check_operation_001.ttcn @@ -0,0 +1,37 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:22.4, null component reference in from clause of check operation + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// No AddressRef shall contain the special value null at the time of the operation. + +module NegSem_2204_the_check_operation_001 { + + type port P message { + inout integer; + address integer; + } + + type component GeneralComp + { + port P p; + } + + testcase TC_NegSem_2204_the_check_operation_001() runs on GeneralComp system GeneralComp { + var GeneralComp v_comp := null; + connect(self:p, self:p); + p.send(10); + alt { + [] p.check (from v_comp) {} + [] p.check {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_2204_the_check_operation_001(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2204_the_check_operation/NegSem_2204_the_check_operation_002.ttcn b/ATS/core_language/22_communication_operations/2204_the_check_operation/NegSem_2204_the_check_operation_002.ttcn new file mode 100644 index 00000000..ab5267a4 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2204_the_check_operation/NegSem_2204_the_check_operation_002.ttcn @@ -0,0 +1,36 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:22.4, null address reference in from clause of check operation + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// No AddressRef shall contain the special value null at the time of the operation. + +module NegSem_2204_the_check_operation_002 { + + type port P message { + inout integer; + address integer; + } + + type component GeneralComp + { + port P p; + } + + testcase TC_NegSem_2204_the_check_operation_002() runs on GeneralComp { + var P.address v_addr1 := 1, v_addr2 := 2, v_addr3 := null; + p.send(10); + alt { + [] p.check (from (v_addr1, v_addr2, v_addr3)) {} + [] p.check {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_2204_the_check_operation_002(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2204_the_check_operation/NegSem_2204_the_check_operation_003.ttcn b/ATS/core_language/22_communication_operations/2204_the_check_operation/NegSem_2204_the_check_operation_003.ttcn new file mode 100644 index 00000000..0450ed31 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2204_the_check_operation/NegSem_2204_the_check_operation_003.ttcn @@ -0,0 +1,38 @@ +/***************************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:22.4, incompatible from and sender clause + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// If the check operation contains both from and sender clause, the variable or parameter +// referenced in the sender clause shall be type compatible with the template in the from +// clause. + +module NegSem_2204_the_check_operation_003 { + + type integer address; + + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + testcase TC_NegSem_2204_the_check_operation_003() runs on GeneralComp { + var address v_addr; + p.send(100); + alt { + [] p.check(from GeneralComp:? -> sender v_addr) { } + [] p.check {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_2204_the_check_operation_003(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2204_the_check_operation/NegSem_2204_the_check_operation_004.ttcn b/ATS/core_language/22_communication_operations/2204_the_check_operation/NegSem_2204_the_check_operation_004.ttcn new file mode 100644 index 00000000..ab6ace11 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2204_the_check_operation/NegSem_2204_the_check_operation_004.ttcn @@ -0,0 +1,39 @@ +/***************************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:22.4, incompatible value in the from clause + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// All AddressRef items in the from clause and all VariableRef items in the sender clause +// shall be of type address, component or of the address type bound to the port type +// (see clause 6.2.9) of the port instance referenced in the check operation. + +module NegSem_2204_the_check_operation_004 { + + type integer address; + + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + testcase TC_NegSem_2204_the_check_operation_004() runs on GeneralComp { + var address v_addr := 2; + var charstring v_addr2 := ""; + p.send(100) to v_addr; + alt { + [] p.check(from (v_addr, v_addr2)) { } + [] p.check {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_2204_the_check_operation_004(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2204_the_check_operation/NegSem_2204_the_check_operation_005.ttcn b/ATS/core_language/22_communication_operations/2204_the_check_operation/NegSem_2204_the_check_operation_005.ttcn new file mode 100644 index 00000000..56f9469f --- /dev/null +++ b/ATS/core_language/22_communication_operations/2204_the_check_operation/NegSem_2204_the_check_operation_005.ttcn @@ -0,0 +1,38 @@ +/***************************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:22.4, verify that a runtime error is generated if the real sender is incompatible with the variable in sender redirect assignment + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// If the operation contains a sender clause but no from clause, the sender shall be type +// compatible with the variable or parameter referenced in the sender clause. + +module NegSem_2204_the_check_operation_005 { + + type integer address; + + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + testcase TC_NegSem_2204_the_check_operation_005() runs on GeneralComp { + var address v_addr := 2; + var GeneralComp v_ptc; + p.send(100) to v_addr; + alt { + [] p.check(-> sender v_ptc) { } + [] p.check {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_2204_the_check_operation_005()/*, 5.0*/); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_001.ttcn b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_001.ttcn new file mode 100644 index 00000000..2220c168 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_001.ttcn @@ -0,0 +1,30 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:22.4, Verify that port.check(receive) works correctly inside alt + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +module Sem_2204_the_check_operation_001 { + + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + testcase TC_Sem_2204_the_check_operation_001() runs on GeneralComp { + p.send(integer:1); + alt + { + [] p.check(receive) { setverdict(pass, "Check operation successful"); } + } + p.receive; + setverdict(pass, "Message still on the top of the queue"); + } + + control { + execute(TC_Sem_2204_the_check_operation_001(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_002.ttcn b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_002.ttcn new file mode 100644 index 00000000..564c8475 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_002.ttcn @@ -0,0 +1,35 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:22.4, Verify that port.check(receive) with assignment works correctly inside alt + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +module Sem_2204_the_check_operation_002 { + + type port P message { + inout integer; + address integer; + } + + type component GeneralComp { + port P p; + } + + testcase TC_Sem_2204_the_check_operation_002() runs on GeneralComp { + var integer v_addr; + p.send(integer:1) to 80; + alt + { + [] p.check(receive -> sender v_addr) { + if (v_addr == 80) { setverdict(pass, "Check operation successful"); } + else { setverdict(fail, "Incorrect address value"); } + } + } + p.receive; + setverdict(pass, "Message still on the top of the queue"); + } + + control { + execute(TC_Sem_2204_the_check_operation_002(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_003.ttcn b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_003.ttcn new file mode 100644 index 00000000..4117ec46 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_003.ttcn @@ -0,0 +1,28 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:22.4, Verify that port.check(receive) works correctly as standalone statement + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +module Sem_2204_the_check_operation_003 { + + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + testcase TC_Sem_2204_the_check_operation_003() runs on GeneralComp { + p.send(integer:1); + p.check(receive); + setverdict(pass, "Check operation successful"); + p.receive; + setverdict(pass, "Message still on the top of the queue"); + } + + control { + execute(TC_Sem_2204_the_check_operation_003(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_004.ttcn b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_004.ttcn new file mode 100644 index 00000000..928e0db3 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_004.ttcn @@ -0,0 +1,31 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:22.4, Verify that port.check(receive) with assignment works correctly as standalone statement + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +module Sem_2204_the_check_operation_004 { + + type port P message { + inout integer; + address integer; + } + + type component GeneralComp { + port P p; + } + + testcase TC_Sem_2204_the_check_operation_004() runs on GeneralComp { + var integer v_addr; + p.send(integer:1) to 80; + p.check(receive -> sender v_addr); + if (v_addr == 80) { setverdict(pass, "Check operation successful"); } + else { setverdict(fail, "Incorrect address value"); } + p.receive; + setverdict(pass, "Message still on the top of the queue"); + } + + control { + execute(TC_Sem_2204_the_check_operation_004(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_005.ttcn b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_005.ttcn new file mode 100644 index 00000000..a3679abf --- /dev/null +++ b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_005.ttcn @@ -0,0 +1,30 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:22.4, Verify that any port.check(receive) works correctly inside alt + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +module Sem_2204_the_check_operation_005 { + + type port P message { + inout integer; + } + + type component GeneralComp { + port P p1, p2; + } + + testcase TC_Sem_2204_the_check_operation_005() runs on GeneralComp { + p2.send(integer:1); + alt + { + [] any port.check(receive) { setverdict(pass, "Check operation successful"); } + } + any port.receive; + setverdict(pass, "Message still on the top of the queue"); + } + + control { + execute(TC_Sem_2204_the_check_operation_005(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_006.ttcn b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_006.ttcn new file mode 100644 index 00000000..b6fce241 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_006.ttcn @@ -0,0 +1,36 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:22.4, Verify that any port.check(receive) with assignment works correctly inside alt + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +module Sem_2204_the_check_operation_006 { + + type integer address; + + type port P message { + inout integer; + } + + type component GeneralComp { + port P p1, p2; + } + + testcase TC_Sem_2204_the_check_operation_006() runs on GeneralComp { + var address v_addr; + p2.send(integer:1) to 80; + alt + { + [] any port.check(receive -> sender v_addr) { + if (v_addr == 80) { setverdict(pass, "Check operation successful"); } + else { setverdict(fail, "Incorrect address value"); } + } + } + any port.receive; + setverdict(pass, "Message still on the top of the queue"); + } + + control { + execute(TC_Sem_2204_the_check_operation_006(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_007.ttcn b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_007.ttcn new file mode 100644 index 00000000..0c0e7a73 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_007.ttcn @@ -0,0 +1,28 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:22.4, Verify that any port.check(receive) works correctly as standalone statement + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +module Sem_2204_the_check_operation_007 { + + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + testcase TC_Sem_2204_the_check_operation_007() runs on GeneralComp { + p.send(integer:1); + any port.check(receive); + setverdict(pass, "Check operation successful"); + any port.receive; + setverdict(pass, "Message still on the top of the queue"); + } + + control { + execute(TC_Sem_2204_the_check_operation_007(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_008.ttcn b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_008.ttcn new file mode 100644 index 00000000..331074cf --- /dev/null +++ b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_008.ttcn @@ -0,0 +1,31 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:22.4, Verify that any port.check(receive) with assignment works correctly as standalone statement + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +module Sem_2204_the_check_operation_008 { + + type integer address; + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + testcase TC_Sem_2204_the_check_operation_008() runs on GeneralComp { + var address v_addr; + p.send(integer:1) to 80; + any port.check(receive -> sender v_addr); + if (v_addr == 80) { setverdict(pass, "Check operation successful"); } + else { setverdict(fail, "Incorrect address value"); } + any port.receive; + setverdict(pass, "Message still on the top of the queue"); + } + + control { + execute(TC_Sem_2204_the_check_operation_008(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_009.ttcn b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_009.ttcn new file mode 100644 index 00000000..3154b3a6 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_009.ttcn @@ -0,0 +1,29 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:22.4, Verify behaviour of port.check(receive) in case of unsuccessful match inside alt + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +module Sem_2204_the_check_operation_009 { + + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + testcase TC_Sem_2204_the_check_operation_009() runs on GeneralComp { + p.send(integer:1); + alt + { + [] p.check(receive(integer:(100..200))) { setverdict(fail, "Incorrect match"); } + [] p.receive { setverdict(pass, "As expected, the check operation didn't match"); } + } + } + + control { + execute(TC_Sem_2204_the_check_operation_009(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_010.ttcn b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_010.ttcn new file mode 100644 index 00000000..01543d37 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_010.ttcn @@ -0,0 +1,36 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:22.4, Verify behaviour of port.check(receive) with assignment in case of unsuccessful match inside alt + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +module Sem_2204_the_check_operation_010 { + + type port P message { + inout integer; + address integer; + } + + type component GeneralComp { + port P p; + } + + testcase TC_Sem_2204_the_check_operation_010() runs on GeneralComp { + var integer v_val; + p.send(integer:1) to 80; + alt + { + [] p.check(receive(integer:?) from P.address:(20..40) -> value v_val) { + setverdict(fail, "Incorrect match"); + } + [] p.receive { + if (not isbound(v_val)) { setverdict(pass, "As expected, the check operation didn't match"); } + else { setverdict(fail, "The value should still be undefined at this point"); } + } + } + } + + control { + execute(TC_Sem_2204_the_check_operation_010(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_011.ttcn b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_011.ttcn new file mode 100644 index 00000000..cf35b932 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_011.ttcn @@ -0,0 +1,33 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:22.4, Verify port.check(receive) behaviour in case of unsuccessful match in standalone statement + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +module Sem_2204_the_check_operation_011 { + + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + altstep a() runs on GeneralComp { + [] p.receive { + setverdict(pass, "As expected, the check operation didn't match"); + stop; + } + } + testcase TC_Sem_2204_the_check_operation_011() runs on GeneralComp { + activate(a()); + p.send(integer:1); + p.check(receive(integer:(100..200))); + setverdict(fail, "Incorrect match"); + } + + control { + execute(TC_Sem_2204_the_check_operation_011(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_012.ttcn b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_012.ttcn new file mode 100644 index 00000000..02ba6c1a --- /dev/null +++ b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_012.ttcn @@ -0,0 +1,36 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:22.4, Verify behaviour of port.check(receive) with assignment in case of unsuccessful match in standalone statement + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +module Sem_2204_the_check_operation_012 { + + type port P message { + inout integer; + address integer; + } + + type component GeneralComp { + port P p; + var integer v_addr; + } + + altstep a() runs on GeneralComp { + [] p.receive { + if (not isbound(v_addr)) { setverdict(pass, "As expected, the check operation didn't match"); } + else { setverdict(fail, "The address value should still be undefined at this point"); } + stop; + } + } + testcase TC_Sem_2204_the_check_operation_012() runs on GeneralComp { + activate(a()); + p.send(integer:1) to 80; + p.check(receive(integer:(100..200)) from P.address:(20..100) -> sender v_addr); + setverdict(fail, "Incorrect match"); + } + + control { + execute(TC_Sem_2204_the_check_operation_012(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_013.ttcn b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_013.ttcn new file mode 100644 index 00000000..d8f61848 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_013.ttcn @@ -0,0 +1,29 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:22.4, Verify any port.check(receive) behaviour in case of unsuccessful match inside alt + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +module Sem_2204_the_check_operation_013 { + + type port P message { + inout integer; + } + + type component GeneralComp { + port P p1, p2; + } + + testcase TC_Sem_2204_the_check_operation_013() runs on GeneralComp { + p2.send(integer:1); + alt + { + [] any port.check(receive(integer:(100..200))) { setverdict(fail, "Incorrect match"); } + [] any port.receive { setverdict(pass, "As expected, the check operation didn't match"); } + } + } + + control { + execute(TC_Sem_2204_the_check_operation_013(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_014.ttcn b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_014.ttcn new file mode 100644 index 00000000..f1c86bf3 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_014.ttcn @@ -0,0 +1,37 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:22.4, Verify behaviour of any port.check(receive) with assignment in case of unsuccessful match inside alt + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +module Sem_2204_the_check_operation_014 { + + type integer address; + + type port P message { + inout integer; + } + + type component GeneralComp { + port P p1, p2; + } + + testcase TC_Sem_2204_the_check_operation_014() runs on GeneralComp { + var integer v_val; + p2.send(integer:1) to 80; + alt + { + [] any port.check(receive(integer:?) from address:(20..40) -> value v_val) { + setverdict(fail, "Incorrect match"); + } + [] any port.receive { + if (not isbound(v_val)) { setverdict(pass, "As expected, the check operation didn't match"); } + else { setverdict(fail, "The value should still be undefined at this point"); } + } + } + } + + control { + execute(TC_Sem_2204_the_check_operation_014(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_015.ttcn b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_015.ttcn new file mode 100644 index 00000000..bfb66b7f --- /dev/null +++ b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_015.ttcn @@ -0,0 +1,33 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:22.4, Verify any port.check(receive) behaviour in case of unsuccessful match in standalone statement + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +module Sem_2204_the_check_operation_015 { + + type port P message { + inout integer; + } + + type component GeneralComp { + port P p1, p2; + } + + altstep a() runs on GeneralComp { + [] any port.receive { + setverdict(pass, "As expected, the check operation didn't match"); + stop; + } + } + testcase TC_Sem_2204_the_check_operation_015() runs on GeneralComp { + activate(a()); + p2.send(integer:1); + any port.check(receive(integer:(100..200))); + setverdict(fail, "Incorrect match"); + } + + control { + execute(TC_Sem_2204_the_check_operation_015(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_016.ttcn b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_016.ttcn new file mode 100644 index 00000000..e6284a70 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_016.ttcn @@ -0,0 +1,37 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:22.4, Verify behaviour of any port.check(receive) with assignment in case of unsuccessful match in standalone statement + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +module Sem_2204_the_check_operation_016 { + + type integer address; + + type port P message { + inout integer; + } + + type component GeneralComp { + port P p1, p2; + var address v_addr; + } + + altstep a() runs on GeneralComp { + [] any port.receive { + if (not isbound(v_addr)) { setverdict(pass, "As expected, the check operation didn't match"); } + else { setverdict(fail, "The address value should still be undefined at this point"); } + stop; + } + } + testcase TC_Sem_2204_the_check_operation_016() runs on GeneralComp { + activate(a()); + p2.send(integer:1) to 80; + any port.check(receive(integer:(100..200)) from address:(20..100) -> sender v_addr); + setverdict(fail, "Incorrect match"); + } + + control { + execute(TC_Sem_2204_the_check_operation_016(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_017.ttcn b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_017.ttcn new file mode 100644 index 00000000..a17b1957 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_017.ttcn @@ -0,0 +1,30 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:22.4, Verify behaviour of port.check(receive) in case of successful match inside alt + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +module Sem_2204_the_check_operation_017 { + + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + testcase TC_Sem_2204_the_check_operation_017() runs on GeneralComp { + p.send(integer:1); + alt + { + [] p.check(receive(integer:?)) { setverdict(pass, "Check operation successful"); } + } + p.receive(integer:?); + setverdict(pass, "Message still on the top of the queue"); + } + + control { + execute(TC_Sem_2204_the_check_operation_017(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_018.ttcn b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_018.ttcn new file mode 100644 index 00000000..6f83e426 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_018.ttcn @@ -0,0 +1,35 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:22.4, Verify behation of port.check(receive) with assignment in case of successful match inside alt + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +module Sem_2204_the_check_operation_018 { + + type port P message { + inout integer; + address integer; + } + + type component GeneralComp { + port P p; + } + + testcase TC_Sem_2204_the_check_operation_018() runs on GeneralComp { + var integer v_val, v_addr; + p.send(integer:1) to 80; + alt + { + [] p.check(receive(integer:(0..10)) from P.address:(10..100) -> value v_val sender v_addr) { + if (match(v_val, 1) and match(v_addr, 80)) { setverdict(pass, "Check operation successful"); } + else { setverdict(fail, "Incorrect message value or address"); } + } + } + p.receive(integer:?); + setverdict(pass, "Message still on the top of the queue"); + } + + control { + execute(TC_Sem_2204_the_check_operation_018(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_019.ttcn b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_019.ttcn new file mode 100644 index 00000000..728d30d4 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_019.ttcn @@ -0,0 +1,28 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:22.4, Verify behaviour of port.check(receive) in case of successful match in standalone statement + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +module Sem_2204_the_check_operation_019 { + + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + testcase TC_Sem_2204_the_check_operation_019() runs on GeneralComp { + p.send(integer:1); + p.check(receive(integer:?)); + setverdict(pass, "Check operation successful"); + p.receive(integer:?); + setverdict(pass, "Message still on the top of the queue"); + } + + control { + execute(TC_Sem_2204_the_check_operation_019(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_020.ttcn b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_020.ttcn new file mode 100644 index 00000000..0a02adb4 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_020.ttcn @@ -0,0 +1,30 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:22.4, Verify behaviour of port.check(receive) with assignment in case of successful match works correctly as standalone statement + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +module Sem_2204_the_check_operation_020 { + + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + testcase TC_Sem_2204_the_check_operation_020() runs on GeneralComp { + var integer v_val; + p.send(integer:1); + p.check(receive(integer:(0..10)) -> value v_val); + if (v_val == 1) { setverdict(pass, "Check operation successful"); } + else { setverdict(fail, "Incorrect address value"); } + p.receive(integer:?); + setverdict(pass, "Message still on the top of the queue"); + } + + control { + execute(TC_Sem_2204_the_check_operation_020(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_021.ttcn b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_021.ttcn new file mode 100644 index 00000000..9b7ee515 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_021.ttcn @@ -0,0 +1,30 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:22.4, Verify behaviour of any port.check(receive) in case of successful match inside alt + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +module Sem_2204_the_check_operation_021 { + + type port P message { + inout integer; + } + + type component GeneralComp { + port P p1, p2; + } + + testcase TC_Sem_2204_the_check_operation_021() runs on GeneralComp { + p2.send(integer:1); + alt + { + [] any port.check(receive(integer:?)) { setverdict(pass, "Check operation successful"); } + } + any port.receive(integer:?); + setverdict(pass, "Message still on the top of the queue"); + } + + control { + execute(TC_Sem_2204_the_check_operation_021(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_022.ttcn b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_022.ttcn new file mode 100644 index 00000000..b024cf6d --- /dev/null +++ b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_022.ttcn @@ -0,0 +1,36 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:22.4, Verify behation of any port.check(receive) with assignment in case of successful match inside alt + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +module Sem_2204_the_check_operation_022 { + + type integer address; + + type port P message { + inout integer; + } + + type component GeneralComp { + port P p1, p2; + } + + testcase TC_Sem_2204_the_check_operation_022() runs on GeneralComp { + var integer v_val, v_addr; + p2.send(integer:1) to 80; + alt + { + [] any port.check(receive(integer:(0..10)) from address:(10..100) -> value v_val sender v_addr) { + if (match(v_val, 1) and match(v_addr, 80)) { setverdict(pass, "Check operation successful"); } + else { setverdict(fail, "Incorrect message value or address"); } + } + } + any port.receive(integer:?); + setverdict(pass, "Message still on the top of the queue"); + } + + control { + execute(TC_Sem_2204_the_check_operation_022(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_023.ttcn b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_023.ttcn new file mode 100644 index 00000000..36d16d8c --- /dev/null +++ b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_023.ttcn @@ -0,0 +1,28 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:22.4, Verify behaviour of any port.check(receive) in case of successful match in standalone statement + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +module Sem_2204_the_check_operation_023 { + + type port P message { + inout integer; + } + + type component GeneralComp { + port P p1, p2; + } + + testcase TC_Sem_2204_the_check_operation_023() runs on GeneralComp { + p2.send(integer:1); + any port.check(receive(integer:?)); + setverdict(pass, "Check operation successful"); + any port.receive(integer:?); + setverdict(pass, "Message still on the top of the queue"); + } + + control { + execute(TC_Sem_2204_the_check_operation_023(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_024.ttcn b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_024.ttcn new file mode 100644 index 00000000..b08ccea3 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_024.ttcn @@ -0,0 +1,30 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:22.4, Verify behaviour of any port.check(receive) with assignment in case of successful match works correctly as standalone statement + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +module Sem_2204_the_check_operation_024 { + + type port P message { + inout integer; + } + + type component GeneralComp { + port P p1, p2; + } + + testcase TC_Sem_2204_the_check_operation_024() runs on GeneralComp { + var integer v_val; + p2.send(integer:1); + any port.check(receive(integer:(0..10)) -> value v_val); + if (v_val == 1) { setverdict(pass, "Check operation successful"); } + else { setverdict(fail, "Incorrect address value"); } + any port.receive(integer:?); + setverdict(pass, "Message still on the top of the queue"); + } + + control { + execute(TC_Sem_2204_the_check_operation_024(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_025.ttcn b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_025.ttcn new file mode 100644 index 00000000..dc9bc81a --- /dev/null +++ b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_025.ttcn @@ -0,0 +1,38 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:22.4, Verify that port.check(getcall) works correctly inside alt + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +module Sem_2204_the_check_operation_025 { + + signature S(); + type port P procedure { + inout S; + } + + type component GeneralComp { + port P p; + } + + function f() runs on GeneralComp { + alt + { + [] p.check(getcall) { setverdict(pass, "Check operation successful"); } + } + p.getcall; + setverdict(pass, "Call still on the top of the queue"); + } + + testcase TC_Sem_2204_the_check_operation_025() runs on GeneralComp system GeneralComp{ + var GeneralComp v_ptc := GeneralComp.create; + connect(self:p, v_ptc:p); + p.call(S:{}, nowait); + v_ptc.start(f()); + v_ptc.done; + } + + control { + execute(TC_Sem_2204_the_check_operation_025(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_026.ttcn b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_026.ttcn new file mode 100644 index 00000000..7ef28289 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_026.ttcn @@ -0,0 +1,42 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:22.4, Verify that port.check(getcall) with assignment works correctly inside alt + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +module Sem_2204_the_check_operation_026 { + + signature S(); + type port P procedure { + inout S; + } + + type component GeneralComp { + port P p; + } + + function f() runs on GeneralComp { + var GeneralComp v_src; + alt + { + [] p.check(getcall -> sender v_src) { + if (v_src == mtc) { setverdict(pass, "Check operation successful"); } + else { setverdict(fail, "Unexpected sender value"); } + } + } + p.getcall; + setverdict(pass, "Call still on the top of the queue"); + } + + testcase TC_Sem_2204_the_check_operation_026() runs on GeneralComp system GeneralComp{ + var GeneralComp v_ptc := GeneralComp.create; + connect(self:p, v_ptc:p); + p.call(S:{}, nowait); + v_ptc.start(f()); + v_ptc.done; + } + + control { + execute(TC_Sem_2204_the_check_operation_026(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_027.ttcn b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_027.ttcn new file mode 100644 index 00000000..fd8ecabf --- /dev/null +++ b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_027.ttcn @@ -0,0 +1,36 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:22.4, Verify that port.check(getcall) works correctly as standalone statement + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +module Sem_2204_the_check_operation_027 { + + signature S(); + type port P procedure { + inout S; + } + + type component GeneralComp { + port P p; + } + + function f() runs on GeneralComp { + p.check(getcall); + setverdict(pass, "Check operation successful"); + p.getcall; + setverdict(pass, "Call still on the top of the queue"); + } + + testcase TC_Sem_2204_the_check_operation_027() runs on GeneralComp system GeneralComp{ + var GeneralComp v_ptc := GeneralComp.create; + connect(self:p, v_ptc:p); + p.call(S:{}, nowait); + v_ptc.start(f()); + v_ptc.done; + } + + control { + execute(TC_Sem_2204_the_check_operation_027(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_028.ttcn b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_028.ttcn new file mode 100644 index 00000000..76ed0c0b --- /dev/null +++ b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_028.ttcn @@ -0,0 +1,38 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:22.4, Verify that port.check(getcall) with assignment works correctly as standalone statement + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +module Sem_2204_the_check_operation_028 { + + signature S(); + type port P procedure { + inout S; + } + + type component GeneralComp { + port P p; + } + + function f() runs on GeneralComp { + var GeneralComp v_src; + p.check(getcall -> sender v_src); + if (v_src == mtc) { setverdict(pass, "Check operation successful"); } + else { setverdict(fail, "Unexpected sender value"); } + p.getcall; + setverdict(pass, "Call still on the top of the queue"); + } + + testcase TC_Sem_2204_the_check_operation_028() runs on GeneralComp system GeneralComp{ + var GeneralComp v_ptc := GeneralComp.create; + connect(self:p, v_ptc:p); + p.call(S:{}, nowait); + v_ptc.start(f()); + v_ptc.done; + } + + control { + execute(TC_Sem_2204_the_check_operation_028(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_029.ttcn b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_029.ttcn new file mode 100644 index 00000000..1fdfdf24 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_029.ttcn @@ -0,0 +1,39 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:22.4, Verify that any port.check(getcall) works correctly inside alt + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +module Sem_2204_the_check_operation_029 { + + signature S(); + type port P procedure { + inout S; + } + + type component GeneralComp { + port P p1, p2; + } + + function f() runs on GeneralComp { + alt + { + [] any port.check(getcall) { setverdict(pass, "Check operation successful"); } + } + any port.getcall; + setverdict(pass, "Call still on the top of the queue"); + } + + testcase TC_Sem_2204_the_check_operation_029() runs on GeneralComp system GeneralComp{ + var GeneralComp v_ptc := GeneralComp.create; + connect(self:p1, v_ptc:p1); + connect(self:p2, v_ptc:p2); + p2.call(S:{}, nowait); + v_ptc.start(f()); + v_ptc.done; + } + + control { + execute(TC_Sem_2204_the_check_operation_029(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_030.ttcn b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_030.ttcn new file mode 100644 index 00000000..a7fecff7 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_030.ttcn @@ -0,0 +1,43 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:22.4, Verify that any port.check(getcall) with assignment works correctly inside alt + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +module Sem_2204_the_check_operation_030 { + + signature S(); + type port P procedure { + inout S; + } + + type component GeneralComp { + port P p1, p2; + } + + function f() runs on GeneralComp { + var GeneralComp v_src; + alt + { + [] any port.check(getcall -> sender v_src) { + if (v_src == mtc) { setverdict(pass, "Check operation successful"); } + else { setverdict(fail, "Unexpected sender value"); } + } + } + any port.getcall; + setverdict(pass, "Call still on the top of the queue"); + } + + testcase TC_Sem_2204_the_check_operation_030() runs on GeneralComp system GeneralComp{ + var GeneralComp v_ptc := GeneralComp.create; + connect(self:p1, v_ptc:p1); + connect(self:p2, v_ptc:p2); + p2.call(S:{}, nowait); + v_ptc.start(f()); + v_ptc.done; + } + + control { + execute(TC_Sem_2204_the_check_operation_030(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_031.ttcn b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_031.ttcn new file mode 100644 index 00000000..fddc7563 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_031.ttcn @@ -0,0 +1,37 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:22.4, Verify that any port.check(getcall) works correctly as standalone statement + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +module Sem_2204_the_check_operation_031 { + + signature S(); + type port P procedure { + inout S; + } + + type component GeneralComp { + port P p1, p2; + } + + function f() runs on GeneralComp { + any port.check(getcall); + setverdict(pass, "Check operation successful"); + any port.getcall; + setverdict(pass, "Call still on the top of the queue"); + } + + testcase TC_Sem_2204_the_check_operation_031() runs on GeneralComp system GeneralComp{ + var GeneralComp v_ptc := GeneralComp.create; + connect(self:p1, v_ptc:p1); + connect(self:p2, v_ptc:p2); + p2.call(S:{}, nowait); + v_ptc.start(f()); + v_ptc.done; + } + + control { + execute(TC_Sem_2204_the_check_operation_031(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_032.ttcn b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_032.ttcn new file mode 100644 index 00000000..e1a89374 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_032.ttcn @@ -0,0 +1,39 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:22.4, Verify that any port.check(getcall) with assignment works correctly as standalone statement + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +module Sem_2204_the_check_operation_032 { + + signature S(); + type port P procedure { + inout S; + } + + type component GeneralComp { + port P p1, p2; + } + + function f() runs on GeneralComp { + var GeneralComp v_src; + any port.check(getcall -> sender v_src); + if (v_src == mtc) { setverdict(pass, "Check operation successful"); } + else { setverdict(fail, "Unexpected sender value"); } + any port.getcall; + setverdict(pass, "Call still on the top of the queue"); + } + + testcase TC_Sem_2204_the_check_operation_032() runs on GeneralComp system GeneralComp{ + var GeneralComp v_ptc := GeneralComp.create; + connect(self:p1, v_ptc:p1); + connect(self:p2, v_ptc:p2); + p2.call(S:{}, nowait); + v_ptc.start(f()); + v_ptc.done; + } + + control { + execute(TC_Sem_2204_the_check_operation_032(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_033.ttcn b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_033.ttcn new file mode 100644 index 00000000..7950b4cf --- /dev/null +++ b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_033.ttcn @@ -0,0 +1,37 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:22.4, Verify behaviour of port.check(getcall) in case of unsuccessful match inside alt + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +module Sem_2204_the_check_operation_033 { + + signature S(integer p_par1); + type port P procedure { + inout S; + } + + type component GeneralComp { + port P p; + } + + function f() runs on GeneralComp { + alt + { + [] p.check(getcall(S:{ p_par1 := (0, 2, 4, 6)})) { setverdict(fail, "Incorrect match"); } + [] p.getcall { setverdict(pass, "As expected, the check operation didn't match"); } + } + } + + testcase TC_Sem_2204_the_check_operation_033() runs on GeneralComp system GeneralComp{ + var GeneralComp v_ptc := GeneralComp.create; + connect(self:p, v_ptc:p); + p.call(S:{ p_par1 := 1 }, nowait); + v_ptc.start(f()); + v_ptc.done; + } + + control { + execute(TC_Sem_2204_the_check_operation_033(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_034.ttcn b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_034.ttcn new file mode 100644 index 00000000..9d0857d6 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_034.ttcn @@ -0,0 +1,43 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:22.4, Verify behaviour of port.check(getcall) with assignment in case of unsuccessful match inside alt + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +module Sem_2204_the_check_operation_034 { + + signature S(integer p_par1); + type port P procedure { + inout S; + } + + type component GeneralComp { + port P p; + } + + function f() runs on GeneralComp { + var integer v_val; + alt + { + [] p.check(getcall(S:{ p_par1 := (0, 2, 4, 6)}) -> param(v_val := p_par1)) { + setverdict(fail, "Incorrect match"); + } + [] p.getcall { + if (not isbound(v_val)) { setverdict(pass, "As expected, the check operation didn't match"); } + else { setverdict(fail, "The value should still be undefined at this point"); } + } + } + } + + testcase TC_Sem_2204_the_check_operation_034() runs on GeneralComp system GeneralComp{ + var GeneralComp v_ptc := GeneralComp.create; + connect(self:p, v_ptc:p); + p.call(S:{ p_par1 := 1 }, nowait); + v_ptc.start(f()); + v_ptc.done; + } + + control { + execute(TC_Sem_2204_the_check_operation_034(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_035.ttcn b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_035.ttcn new file mode 100644 index 00000000..d976df95 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_035.ttcn @@ -0,0 +1,42 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:22.4, Verify behaviour of port.check(getcall) in case of unsuccessful match in standalone statement + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +module Sem_2204_the_check_operation_035 { + + signature S(integer p_par1); + type port P procedure { + inout S; + } + + type component GeneralComp { + port P p; + } + + altstep a() runs on GeneralComp { + [] p.getcall { + setverdict(pass, "As expected, the check operation didn't match"); + stop; + } + } + + function f() runs on GeneralComp { + activate(a()); + p.check(getcall(S:{ p_par1 := (0, 2, 4, 6)})); + setverdict(fail, "Incorrect match"); + } + + testcase TC_Sem_2204_the_check_operation_035() runs on GeneralComp system GeneralComp{ + var GeneralComp v_ptc := GeneralComp.create; + connect(self:p, v_ptc:p); + p.call(S:{ p_par1 := 1 }, nowait); + v_ptc.start(f()); + v_ptc.done; + } + + control { + execute(TC_Sem_2204_the_check_operation_035(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_036.ttcn b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_036.ttcn new file mode 100644 index 00000000..1dd9fef9 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_036.ttcn @@ -0,0 +1,44 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:22.4, Verify behaviour of port.check(getcall) with assignment in case of unsuccessful match in standalone statement + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +module Sem_2204_the_check_operation_036 { + + signature S(integer p_par1); + type port P procedure { + inout S; + } + + type component GeneralComp { + port P p; + var integer v_val; + } + + altstep a() runs on GeneralComp { + [] p.getcall { + if (not isbound(v_val)) { setverdict(pass, "As expected, the check operation didn't match"); } + else { setverdict(fail, "The value should still be undefined at this point"); } + stop; + } + } + + function f() runs on GeneralComp { + activate(a()); + p.check(getcall(S:{ p_par1 := (0..10)}) from self -> param(v_val := p_par1)); + setverdict(fail, "Incorrect match"); + } + + testcase TC_Sem_2204_the_check_operation_036() runs on GeneralComp system GeneralComp{ + var GeneralComp v_ptc := GeneralComp.create; + connect(self:p, v_ptc:p); + p.call(S:{ p_par1 := 1 }, nowait); + v_ptc.start(f()); + v_ptc.done; + } + + control { + execute(TC_Sem_2204_the_check_operation_036(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_037.ttcn b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_037.ttcn new file mode 100644 index 00000000..d57ae57a --- /dev/null +++ b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_037.ttcn @@ -0,0 +1,38 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:22.4, Verify behaviour of any port.check(getcall) in case of unsuccessful match inside alt + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +module Sem_2204_the_check_operation_037 { + + signature S(integer p_par1); + type port P procedure { + inout S; + } + + type component GeneralComp { + port P p1, p2; + } + + function f() runs on GeneralComp { + alt + { + [] any port.check(getcall(S:{ p_par1 := (0, 2, 4, 6)})) { setverdict(fail, "Incorrect match"); } + [] any port.getcall { setverdict(pass, "As expected, the check operation didn't match"); } + } + } + + testcase TC_Sem_2204_the_check_operation_037() runs on GeneralComp system GeneralComp{ + var GeneralComp v_ptc := GeneralComp.create; + connect(self:p1, v_ptc:p1); + connect(self:p2, v_ptc:p2); + p2.call(S:{ p_par1 := 1 }, nowait); + v_ptc.start(f()); + v_ptc.done; + } + + control { + execute(TC_Sem_2204_the_check_operation_037(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_038.ttcn b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_038.ttcn new file mode 100644 index 00000000..03d64170 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_038.ttcn @@ -0,0 +1,44 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:22.4, Verify behaviour of any port.check(getcall) with assignment in case of unsuccessful match inside alt + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +module Sem_2204_the_check_operation_038 { + + signature S(integer p_par1); + type port P procedure { + inout S; + } + + type component GeneralComp { + port P p1, p2; + } + + function f() runs on GeneralComp { + var integer v_val; + alt + { + [] any port.check(getcall(S:{ p_par1 := (0, 2, 4, 6)}) -> param(v_val := p_par1)) { + setverdict(fail, "Incorrect match"); + } + [] any port.getcall { + if (not isbound(v_val)) { setverdict(pass, "As expected, the check operation didn't match"); } + else { setverdict(fail, "The value should still be undefined at this point"); } + } + } + } + + testcase TC_Sem_2204_the_check_operation_038() runs on GeneralComp system GeneralComp{ + var GeneralComp v_ptc := GeneralComp.create; + connect(self:p1, v_ptc:p1); + connect(self:p2, v_ptc:p2); + p2.call(S:{ p_par1 := 1 }, nowait); + v_ptc.start(f()); + v_ptc.done; + } + + control { + execute(TC_Sem_2204_the_check_operation_038(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_039.ttcn b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_039.ttcn new file mode 100644 index 00000000..e48392ff --- /dev/null +++ b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_039.ttcn @@ -0,0 +1,43 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:22.4, Verify behaviour of any port.check(getcall) in case of unsuccessful match in standalone statement + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +module Sem_2204_the_check_operation_039 { + + signature S(integer p_par1); + type port P procedure { + inout S; + } + + type component GeneralComp { + port P p1, p2; + } + + altstep a() runs on GeneralComp { + [] any port.getcall { + setverdict(pass, "As expected, the check operation didn't match"); + stop; + } + } + + function f() runs on GeneralComp { + activate(a()); + any port.check(getcall(S:{ p_par1 := (0, 2, 4, 6)})); + setverdict(fail, "Incorrect match"); + } + + testcase TC_Sem_2204_the_check_operation_039() runs on GeneralComp system GeneralComp{ + var GeneralComp v_ptc := GeneralComp.create; + connect(self:p1, v_ptc:p1); + connect(self:p2, v_ptc:p2); + p2.call(S:{ p_par1 := 1 }, nowait); + v_ptc.start(f()); + v_ptc.done; + } + + control { + execute(TC_Sem_2204_the_check_operation_039(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_040.ttcn b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_040.ttcn new file mode 100644 index 00000000..7127055c --- /dev/null +++ b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_040.ttcn @@ -0,0 +1,45 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:22.4, Verify behaviour of any port.check(getcall) with assignment in case of unsuccessful match in standalone statement + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +module Sem_2204_the_check_operation_040 { + + signature S(integer p_par1); + type port P procedure { + inout S; + } + + type component GeneralComp { + port P p1, p2; + var integer v_val; + } + + altstep a() runs on GeneralComp { + [] any port.getcall { + if (not isbound(v_val)) { setverdict(pass, "As expected, the check operation didn't match"); } + else { setverdict(fail, "The value should still be undefined at this point"); } + stop; + } + } + + function f() runs on GeneralComp { + activate(a()); + any port.check(getcall(S:{ p_par1 := (0..10)}) from self -> param(v_val := p_par1)); + setverdict(fail, "Incorrect match"); + } + + testcase TC_Sem_2204_the_check_operation_040() runs on GeneralComp system GeneralComp{ + var GeneralComp v_ptc := GeneralComp.create; + connect(self:p1, v_ptc:p1); + connect(self:p2, v_ptc:p2); + p2.call(S:{ p_par1 := 1 }, nowait); + v_ptc.start(f()); + v_ptc.done; + } + + control { + execute(TC_Sem_2204_the_check_operation_040(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_041.ttcn b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_041.ttcn new file mode 100644 index 00000000..76df1bbd --- /dev/null +++ b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_041.ttcn @@ -0,0 +1,38 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:22.4, Verify behaviour of port.check(getcall) in case of successful match inside alt + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +module Sem_2204_the_check_operation_041 { + + signature S(integer p_par1); + type port P procedure { + inout S; + } + + type component GeneralComp { + port P p; + } + + function f() runs on GeneralComp { + alt + { + [] p.check(getcall(S:{ p_par1 := (0..10)})) { setverdict(pass, "Check operation successful"); } + } + p.getcall; + setverdict(pass, "Call still on the top of the queue"); + } + + testcase TC_Sem_2204_the_check_operation_041() runs on GeneralComp system GeneralComp{ + var GeneralComp v_ptc := GeneralComp.create; + connect(self:p, v_ptc:p); + p.call(S:{ p_par1 := 1 }, nowait); + v_ptc.start(f()); + v_ptc.done; + } + + control { + execute(TC_Sem_2204_the_check_operation_041(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_042.ttcn b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_042.ttcn new file mode 100644 index 00000000..ee72de02 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_042.ttcn @@ -0,0 +1,43 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:22.4, Verify behaviour of port.check(getcall) with assignment in case of successful match inside alt + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +module Sem_2204_the_check_operation_042 { + + signature S(integer p_par1); + type port P procedure { + inout S; + } + + type component GeneralComp { + port P p; + } + + function f() runs on GeneralComp { + var integer v_val; + var GeneralComp v_src; + alt + { + [] p.check(getcall(S:{ p_par1 := (0..10)}) from GeneralComp:? -> param (v_val) sender v_src) { + if (match(v_val, 1) and match(v_src, mtc)) { setverdict(pass, "Check operation successful"); } + else { setverdict(fail, "Incorrect parameter value or sender"); } + } + } + p.getcall; + setverdict(pass, "Call still on the top of the queue"); + } + + testcase TC_Sem_2204_the_check_operation_042() runs on GeneralComp system GeneralComp{ + var GeneralComp v_ptc := GeneralComp.create; + connect(self:p, v_ptc:p); + p.call(S:{ p_par1 := 1 }, nowait); + v_ptc.start(f()); + v_ptc.done; + } + + control { + execute(TC_Sem_2204_the_check_operation_042(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_043.ttcn b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_043.ttcn new file mode 100644 index 00000000..ac019da1 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_043.ttcn @@ -0,0 +1,36 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:22.4, Verify behaviour of port.check(getcall) in case of successful match in standalone statement + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +module Sem_2204_the_check_operation_043 { + + signature S(integer p_par1); + type port P procedure { + inout S; + } + + type component GeneralComp { + port P p; + } + + function f() runs on GeneralComp { + p.check(getcall(S:{ p_par1 := (0..10)}) from mtc); + setverdict(pass, "Check operation successful"); + p.getcall; + setverdict(pass, "Call still on the top of the queue"); + } + + testcase TC_Sem_2204_the_check_operation_043() runs on GeneralComp system GeneralComp{ + var GeneralComp v_ptc := GeneralComp.create; + connect(self:p, v_ptc:p); + p.call(S:{ p_par1 := 1 }, nowait); + v_ptc.start(f()); + v_ptc.done; + } + + control { + execute(TC_Sem_2204_the_check_operation_043(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_044.ttcn b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_044.ttcn new file mode 100644 index 00000000..22647fcd --- /dev/null +++ b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_044.ttcn @@ -0,0 +1,38 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:22.4, Verify behaviour of port.check(getcall) with assignment in case of successful match in standalone statement + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +module Sem_2204_the_check_operation_044 { + + signature S(integer p_par1); + type port P procedure { + inout S; + } + + type component GeneralComp { + port P p; + } + + function f() runs on GeneralComp { + var integer v_val; + p.check(getcall(S:{ p_par1 := (0..10)}) -> param (v_val)); + if (v_val == 1) { setverdict(pass, "Check operation successful"); } + else { setverdict(fail, "Incorrect parameter value"); } + p.getcall; + setverdict(pass, "Call still on the top of the queue"); + } + + testcase TC_Sem_2204_the_check_operation_044() runs on GeneralComp system GeneralComp{ + var GeneralComp v_ptc := GeneralComp.create; + connect(self:p, v_ptc:p); + p.call(S:{ p_par1 := 1 }, nowait); + v_ptc.start(f()); + v_ptc.done; + } + + control { + execute(TC_Sem_2204_the_check_operation_044(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_045.ttcn b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_045.ttcn new file mode 100644 index 00000000..d1658410 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_045.ttcn @@ -0,0 +1,39 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:22.4, Verify behaviour of any port.check(getcall) in case of successful match inside alt + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +module Sem_2204_the_check_operation_045 { + + signature S(integer p_par1); + type port P procedure { + inout S; + } + + type component GeneralComp { + port P p1, p2; + } + + function f() runs on GeneralComp { + alt + { + [] any port.check(getcall(S:{ p_par1 := (0..10)})) { setverdict(pass, "Check operation successful"); } + } + any port.getcall; + setverdict(pass, "Call still on the top of the queue"); + } + + testcase TC_Sem_2204_the_check_operation_045() runs on GeneralComp system GeneralComp{ + var GeneralComp v_ptc := GeneralComp.create; + connect(self:p1, v_ptc:p1); + connect(self:p2, v_ptc:p2); + p2.call(S:{ p_par1 := 1 }, nowait); + v_ptc.start(f()); + v_ptc.done; + } + + control { + execute(TC_Sem_2204_the_check_operation_045(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_046.ttcn b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_046.ttcn new file mode 100644 index 00000000..28c92898 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_046.ttcn @@ -0,0 +1,44 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:22.4, Verify behaviour of any port.check(getcall) with assignment in case of successful match inside alt + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +module Sem_2204_the_check_operation_046 { + + signature S(integer p_par1); + type port P procedure { + inout S; + } + + type component GeneralComp { + port P p1, p2; + } + + function f() runs on GeneralComp { + var integer v_val; + var GeneralComp v_src; + alt + { + [] any port.check(getcall(S:{ p_par1 := (0..10)}) from GeneralComp:? -> param (v_val) sender v_src) { + if (match(v_val, 1) and match(v_src, mtc)) { setverdict(pass, "Check operation successful"); } + else { setverdict(fail, "Incorrect parameter value or sender"); } + } + } + any port.getcall; + setverdict(pass, "Call still on the top of the queue"); + } + + testcase TC_Sem_2204_the_check_operation_046() runs on GeneralComp system GeneralComp{ + var GeneralComp v_ptc := GeneralComp.create; + connect(self:p1, v_ptc:p1); + connect(self:p2, v_ptc:p2); + p2.call(S:{ p_par1 := 1 }, nowait); + v_ptc.start(f()); + v_ptc.done; + } + + control { + execute(TC_Sem_2204_the_check_operation_046(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_047.ttcn b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_047.ttcn new file mode 100644 index 00000000..3e3b43d1 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_047.ttcn @@ -0,0 +1,37 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:22.4, Verify behaviour of any port.check(getcall) in case of successful match in standalone statement + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +module Sem_2204_the_check_operation_047 { + + signature S(integer p_par1); + type port P procedure { + inout S; + } + + type component GeneralComp { + port P p1, p2; + } + + function f() runs on GeneralComp { + any port.check(getcall(S:{ p_par1 := (0..10)}) from mtc); + setverdict(pass, "Check operation successful"); + any port.getcall; + setverdict(pass, "Call still on the top of the queue"); + } + + testcase TC_Sem_2204_the_check_operation_047() runs on GeneralComp system GeneralComp{ + var GeneralComp v_ptc := GeneralComp.create; + connect(self:p1, v_ptc:p1); + connect(self:p2, v_ptc:p2); + p2.call(S:{ p_par1 := 1 }, nowait); + v_ptc.start(f()); + v_ptc.done; + } + + control { + execute(TC_Sem_2204_the_check_operation_047(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_048.ttcn b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_048.ttcn new file mode 100644 index 00000000..1afb2a7c --- /dev/null +++ b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_048.ttcn @@ -0,0 +1,39 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:22.4, Verify behaviour of any port.check(getcall) with assignment in case of successful match in standalone statement + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +module Sem_2204_the_check_operation_048 { + + signature S(integer p_par1); + type port P procedure { + inout S; + } + + type component GeneralComp { + port P p1, p2; + } + + function f() runs on GeneralComp { + var integer v_val; + any port.check(getcall(S:{ p_par1 := (0..10)}) -> param (v_val)); + if (v_val == 1) { setverdict(pass, "Check operation successful"); } + else { setverdict(fail, "Incorrect parameter value"); } + any port.getcall; + setverdict(pass, "Call still on the top of the queue"); + } + + testcase TC_Sem_2204_the_check_operation_048() runs on GeneralComp system GeneralComp{ + var GeneralComp v_ptc := GeneralComp.create; + connect(self:p1, v_ptc:p1); + connect(self:p2, v_ptc:p2); + p2.call(S:{ p_par1 := 1 }, nowait); + v_ptc.start(f()); + v_ptc.done; + } + + control { + execute(TC_Sem_2204_the_check_operation_048(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_049.ttcn b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_049.ttcn new file mode 100644 index 00000000..9eedf6d0 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_049.ttcn @@ -0,0 +1,40 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:22.4, Verify that port.check(getreply) works correctly inside alt + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +module Sem_2204_the_check_operation_049 { + + signature S(); + type port P procedure { + inout S; + } + + type component GeneralComp { + port P p; + } + + function f() runs on GeneralComp { + p.getcall; + setverdict(pass, "Call received"); + p.reply(S:{}); + } + + testcase TC_Sem_2204_the_check_operation_049() runs on GeneralComp system GeneralComp{ + var GeneralComp v_ptc := GeneralComp.create; + connect(self:p, v_ptc:p); + p.call(S:{}, nowait); + v_ptc.start(f()); + alt + { + [] p.check(getreply) { setverdict(pass, "Check operation successful"); } + } + p.getreply; + setverdict(pass, "Reply still on the top of the queue"); + } + + control { + execute(TC_Sem_2204_the_check_operation_049(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_050.ttcn b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_050.ttcn new file mode 100644 index 00000000..ade46fb7 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_050.ttcn @@ -0,0 +1,43 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:22.4, Verify that port.check(getreply) with assignment works correctly inside alt + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +module Sem_2204_the_check_operation_050 { + + signature S(); + type port P procedure { + inout S; + } + + type component GeneralComp { + port P p; + } + + function f() runs on GeneralComp { + p.getcall; + setverdict(pass, "Call received"); + p.reply(S:{}); + } + + testcase TC_Sem_2204_the_check_operation_050() runs on GeneralComp system GeneralComp{ + var GeneralComp v_ptc := GeneralComp.create, v_src; + connect(self:p, v_ptc:p); + p.call(S:{}, nowait); + v_ptc.start(f()); + alt + { + [] p.check(getreply -> sender v_src) { + if (v_src == v_ptc) { setverdict(pass, "Check operation successful"); } + else { setverdict(fail, "Counterpart mismatch"); } + } + } + p.getreply; + setverdict(pass, "Reply still on the top of the queue"); + } + + control { + execute(TC_Sem_2204_the_check_operation_050(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_051.ttcn b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_051.ttcn new file mode 100644 index 00000000..8d646d67 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_051.ttcn @@ -0,0 +1,38 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:22.4, Verify that port.check(getreply) works correctly as standalone statement + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +module Sem_2204_the_check_operation_051 { + + signature S(); + type port P procedure { + inout S; + } + + type component GeneralComp { + port P p; + } + + function f() runs on GeneralComp { + p.getcall; + setverdict(pass, "Call received"); + p.reply(S:{}); + } + + testcase TC_Sem_2204_the_check_operation_051() runs on GeneralComp system GeneralComp{ + var GeneralComp v_ptc := GeneralComp.create; + connect(self:p, v_ptc:p); + p.call(S:{}, nowait); + v_ptc.start(f()); + p.check(getreply); + setverdict(pass, "Check operation successful"); + p.getreply; + setverdict(pass, "Reply still on the top of the queue"); + } + + control { + execute(TC_Sem_2204_the_check_operation_051(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_052.ttcn b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_052.ttcn new file mode 100644 index 00000000..9a4b6825 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_052.ttcn @@ -0,0 +1,39 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:22.4, Verify that port.check(getreply) with assignment works correctly as standalone statement + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +module Sem_2204_the_check_operation_052 { + + signature S(); + type port P procedure { + inout S; + } + + type component GeneralComp { + port P p; + } + + function f() runs on GeneralComp { + p.getcall; + setverdict(pass, "Call received"); + p.reply(S:{}); + } + + testcase TC_Sem_2204_the_check_operation_052() runs on GeneralComp system GeneralComp{ + var GeneralComp v_ptc := GeneralComp.create, v_src; + connect(self:p, v_ptc:p); + p.call(S:{}, nowait); + v_ptc.start(f()); + p.check(getreply -> sender v_src); + if (v_src == v_ptc) { setverdict(pass, "Check operation successful"); } + else { setverdict(fail, "Counterpart mismatch"); } + p.getreply; + setverdict(pass, "Reply still on the top of the queue"); + } + + control { + execute(TC_Sem_2204_the_check_operation_052(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_053.ttcn b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_053.ttcn new file mode 100644 index 00000000..b35c06c6 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_053.ttcn @@ -0,0 +1,41 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:22.4, Verify that any port.check(getreply) works correctly inside alt + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +module Sem_2204_the_check_operation_053 { + + signature S(); + type port P procedure { + inout S; + } + + type component GeneralComp { + port P p1, p2; + } + + function f() runs on GeneralComp { + p2.getcall; + setverdict(pass, "Call received"); + p2.reply(S:{}); + } + + testcase TC_Sem_2204_the_check_operation_053() runs on GeneralComp system GeneralComp{ + var GeneralComp v_ptc := GeneralComp.create; + connect(self:p1, v_ptc:p1); + connect(self:p2, v_ptc:p2); + p2.call(S:{}, nowait); + v_ptc.start(f()); + alt + { + [] any port.check(getreply) { setverdict(pass, "Check operation successful"); } + } + any port.getreply; + setverdict(pass, "Reply still on the top of the queue"); + } + + control { + execute(TC_Sem_2204_the_check_operation_053(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_054.ttcn b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_054.ttcn new file mode 100644 index 00000000..6a78277f --- /dev/null +++ b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_054.ttcn @@ -0,0 +1,44 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:22.4, Verify that any port.check(getreply) with assignment works correctly inside alt + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +module Sem_2204_the_check_operation_054 { + + signature S(); + type port P procedure { + inout S; + } + + type component GeneralComp { + port P p1, p2; + } + + function f() runs on GeneralComp { + p2.getcall; + setverdict(pass, "Call received"); + p2.reply(S:{}); + } + + testcase TC_Sem_2204_the_check_operation_054() runs on GeneralComp system GeneralComp{ + var GeneralComp v_ptc := GeneralComp.create, v_src; + connect(self:p1, v_ptc:p1); + connect(self:p2, v_ptc:p2); + p2.call(S:{}, nowait); + v_ptc.start(f()); + alt + { + [] any port.check(getreply -> sender v_src) { + if (v_src == v_ptc) { setverdict(pass, "Check operation successful"); } + else { setverdict(fail, "Counterpart mismatch"); } + } + } + any port.getreply; + setverdict(pass, "Reply still on the top of the queue"); + } + + control { + execute(TC_Sem_2204_the_check_operation_054(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_055.ttcn b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_055.ttcn new file mode 100644 index 00000000..40926837 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_055.ttcn @@ -0,0 +1,39 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:22.4, Verify that any port.check(getreply) works correctly as standalone statement + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +module Sem_2204_the_check_operation_055 { + + signature S(); + type port P procedure { + inout S; + } + + type component GeneralComp { + port P p1, p2; + } + + function f() runs on GeneralComp { + p2.getcall; + setverdict(pass, "Call received"); + p2.reply(S:{}); + } + + testcase TC_Sem_2204_the_check_operation_055() runs on GeneralComp system GeneralComp{ + var GeneralComp v_ptc := GeneralComp.create; + connect(self:p1, v_ptc:p1); + connect(self:p2, v_ptc:p2); + p2.call(S:{}, nowait); + v_ptc.start(f()); + any port.check(getreply); + setverdict(pass, "Check operation successful"); + any port.getreply; + setverdict(pass, "Reply still on the top of the queue"); + } + + control { + execute(TC_Sem_2204_the_check_operation_055(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_056.ttcn b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_056.ttcn new file mode 100644 index 00000000..3d53b9fe --- /dev/null +++ b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_056.ttcn @@ -0,0 +1,40 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:22.4, Verify that any port.check(getreply) with assignment works correctly as standalone statement + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +module Sem_2204_the_check_operation_056 { + + signature S(); + type port P procedure { + inout S; + } + + type component GeneralComp { + port P p1, p2; + } + + function f() runs on GeneralComp { + p2.getcall; + setverdict(pass, "Call received"); + p2.reply(S:{}); + } + + testcase TC_Sem_2204_the_check_operation_056() runs on GeneralComp system GeneralComp{ + var GeneralComp v_ptc := GeneralComp.create, v_src; + connect(self:p1, v_ptc:p1); + connect(self:p2, v_ptc:p2); + p2.call(S:{}, nowait); + v_ptc.start(f()); + any port.check(getreply -> sender v_src); + if (v_src == v_ptc) { setverdict(pass, "Check operation successful"); } + else { setverdict(fail, "Counterpart mismatch"); } + any port.getreply; + setverdict(pass, "Reply still on the top of the queue"); + } + + control { + execute(TC_Sem_2204_the_check_operation_056(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_057.ttcn b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_057.ttcn new file mode 100644 index 00000000..094f1655 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_057.ttcn @@ -0,0 +1,39 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:22.4, Verify behaviour of port.check(getreply) in case of unsuccessful match inside alt + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +module Sem_2204_the_check_operation_057 { + + signature S(out integer p_par1) return integer; + type port P procedure { + inout S; + } + + type component GeneralComp { + port P p; + } + + function f() runs on GeneralComp { + p.getcall; + setverdict(pass, "Call received"); + p.reply(S:{ p_par1 := 1} value 5); + } + + testcase TC_Sem_2204_the_check_operation_057() runs on GeneralComp system GeneralComp{ + var GeneralComp v_ptc := GeneralComp.create; + connect(self:p, v_ptc:p); + p.call(S:{ p_par1 := - }, nowait); + v_ptc.start(f()); + alt + { + [] p.check(getreply(S:{p_par1 := (100..200)} value ?)) { setverdict(fail, "Incorrect match"); } + [] p.getreply { setverdict(pass, "As expected, the check operation didn't match"); } + } + } + + control { + execute(TC_Sem_2204_the_check_operation_057(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_058.ttcn b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_058.ttcn new file mode 100644 index 00000000..04870865 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_058.ttcn @@ -0,0 +1,47 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:22.4, Verify behaviour of port.check(getreply) with assignment in case of unsuccessful match inside alt + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +module Sem_2204_the_check_operation_058 { + + signature S(out integer p_par1) return integer; + type port P procedure { + inout S; + } + + type component GeneralComp { + port P p; + } + + function f() runs on GeneralComp { + p.getcall; + setverdict(pass, "Call received"); + p.reply(S:{ p_par1 := 1} value 5); + } + + testcase TC_Sem_2204_the_check_operation_058() runs on GeneralComp system GeneralComp{ + var GeneralComp v_ptc := GeneralComp.create; + var integer v_par, v_val; + connect(self:p, v_ptc:p); + p.call(S:{ p_par1 := - }, nowait); + v_ptc.start(f()); + alt + { + [] p.check(getreply(S:{p_par1 := ?} value (100..200)) -> value v_val param (v_par := p_par1)) { + setverdict(fail, "Incorrect match"); + } + [] p.getreply { + if (not isbound(v_par) and not isbound(v_val)) { + setverdict(pass, "As expected, the check operation didn't match"); + } + else { setverdict(fail, "The v_par and v_val variables should still be undefined at this point"); } + } + } + } + + control { + execute(TC_Sem_2204_the_check_operation_058(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_059.ttcn b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_059.ttcn new file mode 100644 index 00000000..8c169cb4 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_059.ttcn @@ -0,0 +1,44 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:22.4, Verify behaviour of port.check(getreply) in case of unsuccessful match in standalone statement + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +module Sem_2204_the_check_operation_059 { + + signature S(out integer p_par1) return integer; + type port P procedure { + inout S; + } + + type component GeneralComp { + port P p; + } + + function f() runs on GeneralComp { + p.getcall; + setverdict(pass, "Call received"); + p.reply(S:{ p_par1 := 1} value 5); + } + + altstep a() runs on GeneralComp { + [] p.getreply { + setverdict(pass, "As expected, the check operation didn't match"); + stop; + } + } + + testcase TC_Sem_2204_the_check_operation_059() runs on GeneralComp system GeneralComp{ + var GeneralComp v_ptc := GeneralComp.create; + activate(a()); + connect(self:p, v_ptc:p); + p.call(S:{ p_par1 := - }, nowait); + v_ptc.start(f()); + p.check(getreply(S:? value ?) from self); + setverdict(fail, "Incorrect match"); + } + + control { + execute(TC_Sem_2204_the_check_operation_059(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_060.ttcn b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_060.ttcn new file mode 100644 index 00000000..a8b946b0 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_060.ttcn @@ -0,0 +1,49 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:22.4, Verify behaviour of port.check(getreply) with assignment in case of unsuccessful match in standalone statement + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +module Sem_2204_the_check_operation_060 { + + signature S(out integer p_par1) return integer; + type port P procedure { + inout S; + } + + type component GeneralComp { + port P p; + var integer v_val; + var GeneralComp v_src; + } + + function f() runs on GeneralComp { + p.getcall; + setverdict(pass, "Call received"); + p.reply(S:{ p_par1 := 1} value 5); + } + + altstep a() runs on GeneralComp { + [] p.getreply { + if (not isbound(v_val) and not isbound(v_src)) { + setverdict(pass, "As expected, the check operation didn't match"); + } + else { setverdict(fail, "The v_val and v_src variables should still be undefined at this point"); } + stop; + } + } + + testcase TC_Sem_2204_the_check_operation_060() runs on GeneralComp system GeneralComp{ + var GeneralComp v_ptc := GeneralComp.create; + activate(a()); + connect(self:p, v_ptc:p); + p.call(S:{ p_par1 := - }, nowait); + v_ptc.start(f()); + p.check(getreply(S:{p_par1 := ?} value (100..200)) -> value v_val sender v_src); + setverdict(fail, "Incorrect match"); + } + + control { + execute(TC_Sem_2204_the_check_operation_060(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_061.ttcn b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_061.ttcn new file mode 100644 index 00000000..db1633fa --- /dev/null +++ b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_061.ttcn @@ -0,0 +1,40 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:22.4, Verify behaviour of any port.check(getreply) in case of unsuccessful match inside alt + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +module Sem_2204_the_check_operation_061 { + + signature S(out integer p_par1) return integer; + type port P procedure { + inout S; + } + + type component GeneralComp { + port P p1, p2; + } + + function f() runs on GeneralComp { + p2.getcall; + setverdict(pass, "Call received"); + p2.reply(S:{ p_par1 := 1} value 5); + } + + testcase TC_Sem_2204_the_check_operation_061() runs on GeneralComp system GeneralComp{ + var GeneralComp v_ptc := GeneralComp.create; + connect(self:p1, v_ptc:p1); + connect(self:p2, v_ptc:p2); + p2.call(S:{ p_par1 := - }, nowait); + v_ptc.start(f()); + alt + { + [] any port.check(getreply(S:{p_par1 := (100..200)} value ?)) { setverdict(fail, "Incorrect match"); } + [] any port.getreply { setverdict(pass, "As expected, the check operation didn't match"); } + } + } + + control { + execute(TC_Sem_2204_the_check_operation_061(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_062.ttcn b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_062.ttcn new file mode 100644 index 00000000..9081b04e --- /dev/null +++ b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_062.ttcn @@ -0,0 +1,48 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:22.4, Verify behaviour of any port.check(getreply) with assignment in case of unsuccessful match inside alt + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +module Sem_2204_the_check_operation_062 { + + signature S(out integer p_par1) return integer; + type port P procedure { + inout S; + } + + type component GeneralComp { + port P p1, p2; + } + + function f() runs on GeneralComp { + p2.getcall; + setverdict(pass, "Call received"); + p2.reply(S:{ p_par1 := 1} value 5); + } + + testcase TC_Sem_2204_the_check_operation_062() runs on GeneralComp system GeneralComp{ + var GeneralComp v_ptc := GeneralComp.create; + var integer v_par, v_val; + connect(self:p1, v_ptc:p1); + connect(self:p2, v_ptc:p2); + p2.call(S:{ p_par1 := - }, nowait); + v_ptc.start(f()); + alt + { + [] any port.check(getreply(S:{p_par1 := ?} value (100..200)) -> value v_val param (v_par := p_par1)) { + setverdict(fail, "Incorrect match"); + } + [] any port.getreply { + if (not isbound(v_par) and not isbound(v_val)) { + setverdict(pass, "As expected, the check operation didn't match"); + } + else { setverdict(fail, "The v_par and v_val variables should still be undefined at this point"); } + } + } + } + + control { + execute(TC_Sem_2204_the_check_operation_062(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_063.ttcn b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_063.ttcn new file mode 100644 index 00000000..a1901691 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_063.ttcn @@ -0,0 +1,45 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:22.4, Verify behaviour of any port.check(getreply) in case of unsuccessful match in standalone statement + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +module Sem_2204_the_check_operation_063 { + + signature S(out integer p_par1) return integer; + type port P procedure { + inout S; + } + + type component GeneralComp { + port P p1, p2; + } + + function f() runs on GeneralComp { + p2.getcall; + setverdict(pass, "Call received"); + p2.reply(S:{ p_par1 := 1} value 5); + } + + altstep a() runs on GeneralComp { + [] any port.getreply { + setverdict(pass, "As expected, the check operation didn't match"); + stop; + } + } + + testcase TC_Sem_2204_the_check_operation_063() runs on GeneralComp system GeneralComp{ + var GeneralComp v_ptc := GeneralComp.create; + activate(a()); + connect(self:p1, v_ptc:p1); + connect(self:p2, v_ptc:p2); + p2.call(S:{ p_par1 := - }, nowait); + v_ptc.start(f()); + any port.check(getreply(S:? value ?) from self); + setverdict(fail, "Incorrect match"); + } + + control { + execute(TC_Sem_2204_the_check_operation_063(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_064.ttcn b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_064.ttcn new file mode 100644 index 00000000..e616bdd9 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_064.ttcn @@ -0,0 +1,50 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:22.4, Verify behaviour of any port.check(getreply) with assignment in case of unsuccessful match in standalone statement + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +module Sem_2204_the_check_operation_064 { + + signature S(out integer p_par1) return integer; + type port P procedure { + inout S; + } + + type component GeneralComp { + port P p1, p2; + var integer v_val; + var GeneralComp v_src; + } + + function f() runs on GeneralComp { + p2.getcall; + setverdict(pass, "Call received"); + p2.reply(S:{ p_par1 := 1} value 5); + } + + altstep a() runs on GeneralComp { + [] any port.getreply { + if (not isbound(v_val) and not isbound(v_src)) { + setverdict(pass, "As expected, the check operation didn't match"); + } + else { setverdict(fail, "The v_val and v_src variables should still be undefined at this point"); } + stop; + } + } + + testcase TC_Sem_2204_the_check_operation_064() runs on GeneralComp system GeneralComp{ + var GeneralComp v_ptc := GeneralComp.create; + activate(a()); + connect(self:p1, v_ptc:p1); + connect(self:p2, v_ptc:p2); + p2.call(S:{ p_par1 := - }, nowait); + v_ptc.start(f()); + any port.check(getreply(S:{p_par1 := ?} value (100..200)) -> value v_val sender v_src); + setverdict(fail, "Incorrect match"); + } + + control { + execute(TC_Sem_2204_the_check_operation_064(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_065.ttcn b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_065.ttcn new file mode 100644 index 00000000..4e7d1e19 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_065.ttcn @@ -0,0 +1,42 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:22.4, Verify behaviour of port.check(getreply) in case of successful match inside alt + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +module Sem_2204_the_check_operation_065 { + + signature S(out integer p_par1) return integer; + type port P procedure { + inout S; + } + + type component GeneralComp { + port P p; + } + + function f() runs on GeneralComp { + p.getcall; + setverdict(pass, "Call received"); + p.reply(S:{ p_par1 := 1} value 5); + } + + testcase TC_Sem_2204_the_check_operation_065() runs on GeneralComp system GeneralComp{ + var GeneralComp v_ptc := GeneralComp.create; + connect(self:p, v_ptc:p); + p.call(S:{ p_par1 := -}, nowait); + v_ptc.start(f()); + alt + { + [] p.check(getreply(S:{ p_par1 := ?} value integer:(0..10))) { + setverdict(pass, "Check operation successful"); + } + } + p.getreply; + setverdict(pass, "Reply still on the top of the queue"); + } + + control { + execute(TC_Sem_2204_the_check_operation_065(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_066.ttcn b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_066.ttcn new file mode 100644 index 00000000..f7362632 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_066.ttcn @@ -0,0 +1,44 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:22.4, Verify behaviour of port.check(getreply) with assignment in case of successful match inside alt + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +module Sem_2204_the_check_operation_066 { + + signature S(out integer p_par1) return integer; + type port P procedure { + inout S; + } + + type component GeneralComp { + port P p; + } + + function f() runs on GeneralComp { + p.getcall; + setverdict(pass, "Call received"); + p.reply(S:{ p_par1 := 1} value 5); + } + + testcase TC_Sem_2204_the_check_operation_066() runs on GeneralComp system GeneralComp{ + var GeneralComp v_ptc := GeneralComp.create; + var integer v_par, v_val; + connect(self:p, v_ptc:p); + p.call(S:{ p_par1 := -}, nowait); + v_ptc.start(f()); + alt + { + [] p.check(getreply(S:{ p_par1 := ?} value integer:(0..10)) -> value v_val param (v_par := p_par1)) { + if ( match(v_par, 1) and match(v_val, 5)) { setverdict(pass, "Check operation successful"); } + else { setverdict(fail, "Incorrect parameter or return value"); } + } + } + p.getreply; + setverdict(pass, "Reply still on the top of the queue"); + } + + control { + execute(TC_Sem_2204_the_check_operation_066(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_067.ttcn b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_067.ttcn new file mode 100644 index 00000000..465adb8a --- /dev/null +++ b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_067.ttcn @@ -0,0 +1,38 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:22.4, Verify behaviour of port.check(getreply) in case of successful match in standalone statement + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +module Sem_2204_the_check_operation_067 { + + signature S(out integer p_par1) return integer; + type port P procedure { + inout S; + } + + type component GeneralComp { + port P p; + } + + function f() runs on GeneralComp { + p.getcall; + setverdict(pass, "Call received"); + p.reply(S:{ p_par1 := 1} value 5); + } + + testcase TC_Sem_2204_the_check_operation_067() runs on GeneralComp system GeneralComp{ + var GeneralComp v_ptc := GeneralComp.create; + connect(self:p, v_ptc:p); + p.call(S:{ p_par1 := -}, nowait); + v_ptc.start(f()); + p.check(getreply(S:{ p_par1 := ?} value integer:(0..10)) from v_ptc); + setverdict(pass, "Check operation successful"); + p.getreply; + setverdict(pass, "Reply still on the top of the queue"); + } + + control { + execute(TC_Sem_2204_the_check_operation_067(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_068.ttcn b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_068.ttcn new file mode 100644 index 00000000..82cd209d --- /dev/null +++ b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_068.ttcn @@ -0,0 +1,44 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:22.4, Verify behaviour of port.check(getreply) with assignment in case of successful match in standalone statement + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +module Sem_2204_the_check_operation_068 { + + signature S(out integer p_par1) return integer; + type port P procedure { + inout S; + } + + type component GeneralComp { + port P p; + } + + function f() runs on GeneralComp { + p.getcall; + setverdict(pass, "Call received"); + p.reply(S:{ p_par1 := 1 } value 5); + } + + testcase TC_Sem_2204_the_check_operation_068() runs on GeneralComp system GeneralComp{ + var GeneralComp v_ptc := GeneralComp.create, v_src; + var integer v_val; + connect(self:p, v_ptc:p); + p.call(S:{ p_par1 := - }, nowait); + v_ptc.start(f()); + alt + { + [] p.check(getreply(S:{ p_par1 := complement(4, 5, 6) } value integer:?) -> value v_val sender v_src) { + if ( match(v_val, 5) and match(v_src, v_ptc)) { setverdict(pass, "Check operation successful"); } + else { setverdict(fail, "Incorrect return value or sender"); } + } + } + p.getreply; + setverdict(pass, "Reply still on the top of the queue"); + } + + control { + execute(TC_Sem_2204_the_check_operation_068(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_069.ttcn b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_069.ttcn new file mode 100644 index 00000000..7dba968a --- /dev/null +++ b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_069.ttcn @@ -0,0 +1,43 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:22.4, Verify behaviour of any port.check(getreply) in case of successful match inside alt + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +module Sem_2204_the_check_operation_069 { + + signature S(out integer p_par1) return integer; + type port P procedure { + inout S; + } + + type component GeneralComp { + port P p1, p2; + } + + function f() runs on GeneralComp { + p2.getcall; + setverdict(pass, "Call received"); + p2.reply(S:{ p_par1 := 1} value 5); + } + + testcase TC_Sem_2204_the_check_operation_069() runs on GeneralComp system GeneralComp{ + var GeneralComp v_ptc := GeneralComp.create; + connect(self:p1, v_ptc:p1); + connect(self:p2, v_ptc:p2); + p2.call(S:{ p_par1 := -}, nowait); + v_ptc.start(f()); + alt + { + [] any port.check(getreply(S:{ p_par1 := ?} value integer:(0..10))) { + setverdict(pass, "Check operation successful"); + } + } + any port.getreply; + setverdict(pass, "Reply still on the top of the queue"); + } + + control { + execute(TC_Sem_2204_the_check_operation_069(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_070.ttcn b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_070.ttcn new file mode 100644 index 00000000..627e246c --- /dev/null +++ b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_070.ttcn @@ -0,0 +1,45 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:22.4, Verify behaviour of any port.check(getreply) with assignment in case of successful match inside alt + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +module Sem_2204_the_check_operation_070 { + + signature S(out integer p_par1) return integer; + type port P procedure { + inout S; + } + + type component GeneralComp { + port P p1, p2; + } + + function f() runs on GeneralComp { + p2.getcall; + setverdict(pass, "Call received"); + p2.reply(S:{ p_par1 := 1} value 5); + } + + testcase TC_Sem_2204_the_check_operation_070() runs on GeneralComp system GeneralComp{ + var GeneralComp v_ptc := GeneralComp.create; + var integer v_par, v_val; + connect(self:p1, v_ptc:p1); + connect(self:p2, v_ptc:p2); + p2.call(S:{ p_par1 := -}, nowait); + v_ptc.start(f()); + alt + { + [] any port.check(getreply(S:{ p_par1 := ?} value integer:(0..10)) -> value v_val param (v_par := p_par1)) { + if (match(v_par, 1) and match(v_val, 5)) { setverdict(pass, "Check operation successful"); } + else { setverdict(fail, "Incorrect parameter or return value"); } + } + } + any port.getreply; + setverdict(pass, "Reply still on the top of the queue"); + } + + control { + execute(TC_Sem_2204_the_check_operation_070(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_071.ttcn b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_071.ttcn new file mode 100644 index 00000000..12395441 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_071.ttcn @@ -0,0 +1,39 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:22.4, Verify behaviour of any port.check(getreply) in case of successful match in standalone statement + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +module Sem_2204_the_check_operation_071 { + + signature S(out integer p_par1) return integer; + type port P procedure { + inout S; + } + + type component GeneralComp { + port P p1, p2; + } + + function f() runs on GeneralComp { + p2.getcall; + setverdict(pass, "Call received"); + p2.reply(S:{ p_par1 := 1} value 5); + } + + testcase TC_Sem_2204_the_check_operation_071() runs on GeneralComp system GeneralComp{ + var GeneralComp v_ptc := GeneralComp.create; + connect(self:p1, v_ptc:p1); + connect(self:p2, v_ptc:p2); + p2.call(S:{ p_par1 := -}, nowait); + v_ptc.start(f()); + any port.check(getreply(S:{ p_par1 := ?} value integer:(0..10)) from v_ptc); + setverdict(pass, "Check operation successful"); + any port.getreply; + setverdict(pass, "Reply still on the top of the queue"); + } + + control { + execute(TC_Sem_2204_the_check_operation_071(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_072.ttcn b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_072.ttcn new file mode 100644 index 00000000..2b714772 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_072.ttcn @@ -0,0 +1,45 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:22.4, Verify behaviour of any port.check(getreply) with assignment in case of successful match in standalone statement + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +module Sem_2204_the_check_operation_072 { + + signature S(out integer p_par1) return integer; + type port P procedure { + inout S; + } + + type component GeneralComp { + port P p1, p2; + } + + function f() runs on GeneralComp { + p2.getcall; + setverdict(pass, "Call received"); + p2.reply(S:{ p_par1 := 1 } value 5); + } + + testcase TC_Sem_2204_the_check_operation_072() runs on GeneralComp system GeneralComp{ + var GeneralComp v_ptc := GeneralComp.create, v_src; + var integer v_val; + connect(self:p1, v_ptc:p1); + connect(self:p2, v_ptc:p2); + p2.call(S:{ p_par1 := - }, nowait); + v_ptc.start(f()); + alt + { + [] any port.check(getreply(S:{ p_par1 := complement(4, 5, 6) } value integer:?) -> value v_val sender v_src) { + if (match(v_val, 5) and match(v_src, v_ptc)) { setverdict(pass, "Check operation successful"); } + else { setverdict(fail, "Incorrect return value or sender"); } + } + } + any port.getreply; + setverdict(pass, "Reply still on the top of the queue"); + } + + control { + execute(TC_Sem_2204_the_check_operation_072(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_073.ttcn b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_073.ttcn new file mode 100644 index 00000000..5d64f09f --- /dev/null +++ b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_073.ttcn @@ -0,0 +1,40 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:22.4, Verify that port.check(catch) works correctly inside alt + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +module Sem_2204_the_check_operation_073 { + + signature S() exception(integer); + type port P procedure { + inout S; + } + + type component GeneralComp { + port P p; + } + + function f() runs on GeneralComp { + p.getcall; + setverdict(pass, "Call received"); + p.raise(S, integer:1); + } + + testcase TC_Sem_2204_the_check_operation_073() runs on GeneralComp system GeneralComp{ + var GeneralComp v_ptc := GeneralComp.create; + connect(self:p, v_ptc:p); + p.call(S:{}, nowait); + v_ptc.start(f()); + alt + { + [] p.check(catch) { setverdict(pass, "Check operation successful"); } + } + p.catch; + setverdict(pass, "Exception still on the top of the queue"); + } + + control { + execute(TC_Sem_2204_the_check_operation_073(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_074.ttcn b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_074.ttcn new file mode 100644 index 00000000..8ef38f4f --- /dev/null +++ b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_074.ttcn @@ -0,0 +1,43 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:22.4, Verify that port.check(catch) with assignment works correctly inside alt + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +module Sem_2204_the_check_operation_074 { + + signature S() exception(integer); + type port P procedure { + inout S; + } + + type component GeneralComp { + port P p; + } + + function f() runs on GeneralComp { + p.getcall; + setverdict(pass, "Call received"); + p.raise(S, integer:1); + } + + testcase TC_Sem_2204_the_check_operation_074() runs on GeneralComp system GeneralComp{ + var GeneralComp v_ptc := GeneralComp.create, v_src; + connect(self:p, v_ptc:p); + p.call(S:{}, nowait); + v_ptc.start(f()); + alt + { + [] p.check(catch -> sender v_src) { + if (v_src == v_ptc) { setverdict(pass, "Check operation successful"); } + else { setverdict(fail, "Counterpart mismatch"); } + } + } + p.catch; + setverdict(pass, "Exception still on the top of the queue"); + } + + control { + execute(TC_Sem_2204_the_check_operation_074(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_075.ttcn b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_075.ttcn new file mode 100644 index 00000000..72da3856 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_075.ttcn @@ -0,0 +1,38 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:22.4, Verify that port.check(catch) works correctly as standalone statement + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +module Sem_2204_the_check_operation_075 { + + signature S() exception(integer); + type port P procedure { + inout S; + } + + type component GeneralComp { + port P p; + } + + function f() runs on GeneralComp { + p.getcall; + setverdict(pass, "Call received"); + p.raise(S, integer:1); + } + + testcase TC_Sem_2204_the_check_operation_075() runs on GeneralComp system GeneralComp{ + var GeneralComp v_ptc := GeneralComp.create; + connect(self:p, v_ptc:p); + p.call(S:{}, nowait); + v_ptc.start(f()); + p.check(catch); + setverdict(pass, "Check operation successful"); + p.catch; + setverdict(pass, "Exception still on the top of the queue"); + } + + control { + execute(TC_Sem_2204_the_check_operation_075(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_076.ttcn b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_076.ttcn new file mode 100644 index 00000000..6ee52509 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_076.ttcn @@ -0,0 +1,39 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:22.4, Verify that port.check(catch) with assignment works correctly as standalone statement + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +module Sem_2204_the_check_operation_076 { + + signature S() exception(integer); + type port P procedure { + inout S; + } + + type component GeneralComp { + port P p; + } + + function f() runs on GeneralComp { + p.getcall; + setverdict(pass, "Call received"); + p.raise(S, integer:1); + } + + testcase TC_Sem_2204_the_check_operation_076() runs on GeneralComp system GeneralComp{ + var GeneralComp v_ptc := GeneralComp.create, v_src; + connect(self:p, v_ptc:p); + p.call(S:{}, nowait); + v_ptc.start(f()); + p.check(catch -> sender v_src); + if (v_src == v_ptc) { setverdict(pass, "Check operation successful"); } + else { setverdict(fail, "Counterpart mismatch"); } + p.catch; + setverdict(pass, "Exception still on the top of the queue"); + } + + control { + execute(TC_Sem_2204_the_check_operation_076(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_077.ttcn b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_077.ttcn new file mode 100644 index 00000000..c592b450 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_077.ttcn @@ -0,0 +1,41 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:22.4, Verify that any port.check(catch) works correctly inside alt + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +module Sem_2204_the_check_operation_077 { + + signature S() exception(integer); + type port P procedure { + inout S; + } + + type component GeneralComp { + port P p1, p2; + } + + function f() runs on GeneralComp { + p2.getcall; + setverdict(pass, "Call received"); + p2.raise(S, integer:1); + } + + testcase TC_Sem_2204_the_check_operation_077() runs on GeneralComp system GeneralComp{ + var GeneralComp v_ptc := GeneralComp.create; + connect(self:p1, v_ptc:p1); + connect(self:p2, v_ptc:p2); + p2.call(S:{}, nowait); + v_ptc.start(f()); + alt + { + [] any port.check(catch) { setverdict(pass, "Check operation successful"); } + } + any port.catch; + setverdict(pass, "Exception still on the top of the queue"); + } + + control { + execute(TC_Sem_2204_the_check_operation_077(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_078.ttcn b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_078.ttcn new file mode 100644 index 00000000..82f11a4e --- /dev/null +++ b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_078.ttcn @@ -0,0 +1,44 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:22.4, Verify that any port.check(catch) with assignment works correctly inside alt + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +module Sem_2204_the_check_operation_078 { + + signature S() exception(integer); + type port P procedure { + inout S; + } + + type component GeneralComp { + port P p1, p2; + } + + function f() runs on GeneralComp { + p2.getcall; + setverdict(pass, "Call received"); + p2.raise(S, integer:1); + } + + testcase TC_Sem_2204_the_check_operation_078() runs on GeneralComp system GeneralComp{ + var GeneralComp v_ptc := GeneralComp.create, v_src; + connect(self:p1, v_ptc:p1); + connect(self:p2, v_ptc:p2); + p2.call(S:{}, nowait); + v_ptc.start(f()); + alt + { + [] any port.check(catch -> sender v_src) { + if (v_src == v_ptc) { setverdict(pass, "Check operation successful"); } + else { setverdict(fail, "Counterpart mismatch"); } + } + } + any port.catch; + setverdict(pass, "Exception still on the top of the queue"); + } + + control { + execute(TC_Sem_2204_the_check_operation_078(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_079.ttcn b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_079.ttcn new file mode 100644 index 00000000..d1bb0e42 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_079.ttcn @@ -0,0 +1,39 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:22.4, Verify that any port.check(catch) works correctly as standalone statement + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +module Sem_2204_the_check_operation_079 { + + signature S() exception(integer); + type port P procedure { + inout S; + } + + type component GeneralComp { + port P p1, p2; + } + + function f() runs on GeneralComp { + p2.getcall; + setverdict(pass, "Call received"); + p2.raise(S, integer:1); + } + + testcase TC_Sem_2204_the_check_operation_079() runs on GeneralComp system GeneralComp{ + var GeneralComp v_ptc := GeneralComp.create; + connect(self:p1, v_ptc:p1); + connect(self:p2, v_ptc:p2); + p2.call(S:{}, nowait); + v_ptc.start(f()); + any port.check(catch); + setverdict(pass, "Check operation successful"); + any port.catch; + setverdict(pass, "Exception still on the top of the queue"); + } + + control { + execute(TC_Sem_2204_the_check_operation_079(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_080.ttcn b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_080.ttcn new file mode 100644 index 00000000..3ac1a6d8 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_080.ttcn @@ -0,0 +1,40 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:22.4, Verify that any port.check(catch) with assignment works correctly as standalone statement + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +module Sem_2204_the_check_operation_080 { + + signature S() exception(integer); + type port P procedure { + inout S; + } + + type component GeneralComp { + port P p1, p2; + } + + function f() runs on GeneralComp { + p2.getcall; + setverdict(pass, "Call received"); + p2.raise(S, integer:1); + } + + testcase TC_Sem_2204_the_check_operation_080() runs on GeneralComp system GeneralComp{ + var GeneralComp v_ptc := GeneralComp.create, v_src; + connect(self:p1, v_ptc:p1); + connect(self:p2, v_ptc:p2); + p2.call(S:{}, nowait); + v_ptc.start(f()); + any port.check(catch -> sender v_src); + if (v_src == v_ptc) { setverdict(pass, "Check operation successful"); } + else { setverdict(fail, "Counterpart mismatch"); } + any port.catch; + setverdict(pass, "Exception still on the top of the queue"); + } + + control { + execute(TC_Sem_2204_the_check_operation_080(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_081.ttcn b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_081.ttcn new file mode 100644 index 00000000..d20ce4c9 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_081.ttcn @@ -0,0 +1,39 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:22.4, Verify behaviour of port.check(catch) in case of unsuccessful match inside alt + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +module Sem_2204_the_check_operation_081 { + + signature S() exception(integer); + type port P procedure { + inout S; + } + + type component GeneralComp { + port P p; + } + + function f() runs on GeneralComp { + p.getcall; + setverdict(pass, "Call received"); + p.raise(S, integer:1); + } + + testcase TC_Sem_2204_the_check_operation_081() runs on GeneralComp system GeneralComp{ + var GeneralComp v_ptc := GeneralComp.create; + connect(self:p, v_ptc:p); + p.call(S:{}, nowait); + v_ptc.start(f()); + alt + { + [] p.check(catch(S, integer:(100..200))) { setverdict(fail, "Incorrect match"); } + [] p.catch { setverdict(pass, "As expected, the check operation didn't match"); } + } + } + + control { + execute(TC_Sem_2204_the_check_operation_081(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_082.ttcn b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_082.ttcn new file mode 100644 index 00000000..95b28aa6 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_082.ttcn @@ -0,0 +1,47 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:22.4, Verify behaviour of port.check(catch) with assignment in case of unsuccessful match inside alt + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +module Sem_2204_the_check_operation_082 { + + signature S() exception(integer); + type port P procedure { + inout S; + } + + type component GeneralComp { + port P p; + } + + function f() runs on GeneralComp { + p.getcall; + setverdict(pass, "Call received"); + p.raise(S, integer:1); + } + + testcase TC_Sem_2204_the_check_operation_082() runs on GeneralComp system GeneralComp{ + var GeneralComp v_ptc := GeneralComp.create; + var integer v_val; + connect(self:p, v_ptc:p); + p.call(S:{}, nowait); + v_ptc.start(f()); + alt + { + [] p.check(catch(S, integer:(100..200)) -> value v_val) { + setverdict(fail, "Incorrect match"); + } + [] p.catch { + if (not isbound(v_val)) { + setverdict(pass, "As expected, the check operation didn't match"); + } + else { setverdict(fail, "The v_val variable should still be undefined at this point"); } + } + } + } + + control { + execute(TC_Sem_2204_the_check_operation_082(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_083.ttcn b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_083.ttcn new file mode 100644 index 00000000..5cd30afb --- /dev/null +++ b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_083.ttcn @@ -0,0 +1,44 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:22.4, Verify behaviour of port.check(catch) in case of unsuccessful match in standalone statement + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +module Sem_2204_the_check_operation_083 { + + signature S() exception(integer); + type port P procedure { + inout S; + } + + type component GeneralComp { + port P p; + } + + function f() runs on GeneralComp { + p.getcall; + setverdict(pass, "Call received"); + p.raise(S, integer:1); + } + + altstep a() runs on GeneralComp { + [] p.catch { + setverdict(pass, "As expected, the check operation didn't match"); + stop; + } + } + + testcase TC_Sem_2204_the_check_operation_083() runs on GeneralComp system GeneralComp{ + var GeneralComp v_ptc := GeneralComp.create; + activate(a()); + connect(self:p, v_ptc:p); + p.call(S:{}, nowait); + v_ptc.start(f()); + p.check(catch(S, integer:?) from self); + setverdict(fail, "Incorrect match"); + } + + control { + execute(TC_Sem_2204_the_check_operation_083(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_084.ttcn b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_084.ttcn new file mode 100644 index 00000000..2b8df350 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_084.ttcn @@ -0,0 +1,49 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:22.4, Verify behaviour of port.check(catch) with assignment in case of unsuccessful match in standalone statement + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +module Sem_2204_the_check_operation_084 { + + signature S() exception(integer); + type port P procedure { + inout S; + } + + type component GeneralComp { + port P p; + var integer v_val; + var GeneralComp v_src; + } + + function f() runs on GeneralComp { + p.getcall; + setverdict(pass, "Call received"); + p.raise(S, integer:1); + } + + altstep a() runs on GeneralComp { + [] p.catch { + if (not isbound(v_val) and not isbound(v_src)) { + setverdict(pass, "As expected, the check operation didn't match"); + } + else { setverdict(fail, "The v_val and v_src variables should still be undefined at this point"); } + stop; + } + } + + testcase TC_Sem_2204_the_check_operation_084() runs on GeneralComp system GeneralComp{ + var GeneralComp v_ptc := GeneralComp.create; + activate(a()); + connect(self:p, v_ptc:p); + p.call(S:{}, nowait); + v_ptc.start(f()); + p.check(catch(S, integer:(100..200)) -> value v_val sender v_src); + setverdict(fail, "Incorrect match"); + } + + control { + execute(TC_Sem_2204_the_check_operation_084(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_085.ttcn b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_085.ttcn new file mode 100644 index 00000000..66e304ca --- /dev/null +++ b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_085.ttcn @@ -0,0 +1,40 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:22.4, Verify behaviour of any port.check(catch) in case of unsuccessful match inside alt + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +module Sem_2204_the_check_operation_085 { + + signature S() exception(integer); + type port P procedure { + inout S; + } + + type component GeneralComp { + port P p1, p2; + } + + function f() runs on GeneralComp { + p2.getcall; + setverdict(pass, "Call received"); + p2.raise(S, integer:1); + } + + testcase TC_Sem_2204_the_check_operation_085() runs on GeneralComp system GeneralComp{ + var GeneralComp v_ptc := GeneralComp.create; + connect(self:p1, v_ptc:p1); + connect(self:p2, v_ptc:p2); + p2.call(S:{}, nowait); + v_ptc.start(f()); + alt + { + [] any port.check(catch(S, integer:(100..200))) { setverdict(fail, "Incorrect match"); } + [] any port.catch { setverdict(pass, "As expected, the check operation didn't match"); } + } + } + + control { + execute(TC_Sem_2204_the_check_operation_085(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_086.ttcn b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_086.ttcn new file mode 100644 index 00000000..a86a5cc1 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_086.ttcn @@ -0,0 +1,48 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:22.4, Verify behaviour of any port.check(catch) with assignment in case of unsuccessful match inside alt + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +module Sem_2204_the_check_operation_086 { + + signature S() exception(integer); + type port P procedure { + inout S; + } + + type component GeneralComp { + port P p1, p2; + } + + function f() runs on GeneralComp { + p2.getcall; + setverdict(pass, "Call received"); + p2.raise(S, integer:1); + } + + testcase TC_Sem_2204_the_check_operation_086() runs on GeneralComp system GeneralComp{ + var GeneralComp v_ptc := GeneralComp.create; + var integer v_par, v_val; + connect(self:p1, v_ptc:p1); + connect(self:p2, v_ptc:p2); + p2.call(S:{}, nowait); + v_ptc.start(f()); + alt + { + [] any port.check(catch(S, integer:(100..200)) -> value v_val) { + setverdict(fail, "Incorrect match"); + } + [] any port.catch { + if (not isbound(v_val)) { + setverdict(pass, "As expected, the check operation didn't match"); + } + else { setverdict(fail, "The v_val variable should still be undefined at this point"); } + } + } + } + + control { + execute(TC_Sem_2204_the_check_operation_086(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_087.ttcn b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_087.ttcn new file mode 100644 index 00000000..e5d71224 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_087.ttcn @@ -0,0 +1,45 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:22.4, Verify behaviour of any port.check(catch) in case of unsuccessful match in standalone statement + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +module Sem_2204_the_check_operation_087 { + + signature S() exception(integer); + type port P procedure { + inout S; + } + + type component GeneralComp { + port P p1, p2; + } + + function f() runs on GeneralComp { + p2.getcall; + setverdict(pass, "Call received"); + p2.raise(S, integer:1); + } + + altstep a() runs on GeneralComp { + [] any port.catch { + setverdict(pass, "As expected, the check operation didn't match"); + stop; + } + } + + testcase TC_Sem_2204_the_check_operation_087() runs on GeneralComp system GeneralComp{ + var GeneralComp v_ptc := GeneralComp.create; + activate(a()); + connect(self:p1, v_ptc:p1); + connect(self:p2, v_ptc:p2); + p2.call(S:{}, nowait); + v_ptc.start(f()); + any port.check(catch(S, integer:?) from self); + setverdict(fail, "Incorrect match"); + } + + control { + execute(TC_Sem_2204_the_check_operation_087(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_088.ttcn b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_088.ttcn new file mode 100644 index 00000000..7dd4fe51 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_088.ttcn @@ -0,0 +1,50 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:22.4, Verify behaviour of any port.check(catch) with assignment in case of unsuccessful match in standalone statement + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +module Sem_2204_the_check_operation_088 { + + signature S() exception(integer); + type port P procedure { + inout S; + } + + type component GeneralComp { + port P p1, p2; + var integer v_val; + var GeneralComp v_src; + } + + function f() runs on GeneralComp { + p2.getcall; + setverdict(pass, "Call received"); + p2.raise(S, integer:1); + } + + altstep a() runs on GeneralComp { + [] any port.catch { + if (not isbound(v_val) and not isbound(v_src)) { + setverdict(pass, "As expected, the check operation didn't match"); + } + else { setverdict(fail, "The v_val and v_src variables should still be undefined at this point"); } + stop; + } + } + + testcase TC_Sem_2204_the_check_operation_088() runs on GeneralComp system GeneralComp{ + var GeneralComp v_ptc := GeneralComp.create; + activate(a()); + connect(self:p1, v_ptc:p1); + connect(self:p2, v_ptc:p2); + p2.call(S:{}, nowait); + v_ptc.start(f()); + any port.check(catch(S, integer:(100..200)) -> value v_val sender v_src); + setverdict(fail, "Incorrect match"); + } + + control { + execute(TC_Sem_2204_the_check_operation_088(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_089.ttcn b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_089.ttcn new file mode 100644 index 00000000..d69694dc --- /dev/null +++ b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_089.ttcn @@ -0,0 +1,42 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:22.4, Verify behaviour of port.check(catch) in case of successful match inside alt + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +module Sem_2204_the_check_operation_089 { + + signature S() exception(integer); + type port P procedure { + inout S; + } + + type component GeneralComp { + port P p; + } + + function f() runs on GeneralComp { + p.getcall; + setverdict(pass, "Call received"); + p.raise(S, integer:1); + } + + testcase TC_Sem_2204_the_check_operation_089() runs on GeneralComp system GeneralComp{ + var GeneralComp v_ptc := GeneralComp.create; + connect(self:p, v_ptc:p); + p.call(S:{}, nowait); + v_ptc.start(f()); + alt + { + [] p.check(catch(S, integer:(0..10))) { + setverdict(pass, "Check operation successful"); + } + } + p.catch; + setverdict(pass, "Exception still on the top of the queue"); + } + + control { + execute(TC_Sem_2204_the_check_operation_089(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_090.ttcn b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_090.ttcn new file mode 100644 index 00000000..2a855356 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_090.ttcn @@ -0,0 +1,44 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:22.4, Verify behaviour of port.check(catch) with assignment in case of successful match inside alt + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +module Sem_2204_the_check_operation_090 { + + signature S() exception(integer); + type port P procedure { + inout S; + } + + type component GeneralComp { + port P p; + } + + function f() runs on GeneralComp { + p.getcall; + setverdict(pass, "Call received"); + p.raise(S, integer:1); + } + + testcase TC_Sem_2204_the_check_operation_090() runs on GeneralComp system GeneralComp{ + var GeneralComp v_ptc := GeneralComp.create; + var integer v_par, v_val; + connect(self:p, v_ptc:p); + p.call(S:{}, nowait); + v_ptc.start(f()); + alt + { + [] p.check(catch(S, integer:(0..10)) -> value v_val) { + if (v_val == 1) { setverdict(pass, "Check operation successful"); } + else { setverdict(fail, "Incorrect exception value"); } + } + } + p.catch; + setverdict(pass, "Exception still on the top of the queue"); + } + + control { + execute(TC_Sem_2204_the_check_operation_090(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_091.ttcn b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_091.ttcn new file mode 100644 index 00000000..4eef9fcf --- /dev/null +++ b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_091.ttcn @@ -0,0 +1,38 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:22.4, Verify behaviour of port.check(catch) in case of successful match in standalone statement + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +module Sem_2204_the_check_operation_091 { + + signature S() exception(integer); + type port P procedure { + inout S; + } + + type component GeneralComp { + port P p; + } + + function f() runs on GeneralComp { + p.getcall; + setverdict(pass, "Call received"); + p.raise(S, integer:1); + } + + testcase TC_Sem_2204_the_check_operation_091() runs on GeneralComp system GeneralComp{ + var GeneralComp v_ptc := GeneralComp.create; + connect(self:p, v_ptc:p); + p.call(S:{}, nowait); + v_ptc.start(f()); + p.check(catch(S, integer:?) from v_ptc); + setverdict(pass, "Check operation successful"); + p.catch; + setverdict(pass, "Exception still on the top of the queue"); + } + + control { + execute(TC_Sem_2204_the_check_operation_091(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_092.ttcn b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_092.ttcn new file mode 100644 index 00000000..6c586b71 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_092.ttcn @@ -0,0 +1,44 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:22.4, Verify behaviour of port.check(catch) with assignment in case of successful match in standalone statement + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +module Sem_2204_the_check_operation_092 { + + signature S() exception(integer); + type port P procedure { + inout S; + } + + type component GeneralComp { + port P p; + } + + function f() runs on GeneralComp { + p.getcall; + setverdict(pass, "Call received"); + p.raise(S, integer:1); + } + + testcase TC_Sem_2204_the_check_operation_092() runs on GeneralComp system GeneralComp{ + var GeneralComp v_ptc := GeneralComp.create, v_src; + var integer v_val; + connect(self:p, v_ptc:p); + p.call(S:{}, nowait); + v_ptc.start(f()); + alt + { + [] p.check(catch(S, integer: complement(4, 5, 6)) -> value v_val sender v_src) { + if (match(v_val, 1) and match(v_src, v_ptc)) { setverdict(pass, "Check operation successful"); } + else { setverdict(fail, "Incorrect exception value or sender"); } + } + } + p.catch; + setverdict(pass, "Exception still on the top of the queue"); + } + + control { + execute(TC_Sem_2204_the_check_operation_092(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_093.ttcn b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_093.ttcn new file mode 100644 index 00000000..2fd7b56d --- /dev/null +++ b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_093.ttcn @@ -0,0 +1,43 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:22.4, Verify behaviour of any port.check(catch) in case of successful match inside alt + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +module Sem_2204_the_check_operation_093 { + + signature S() exception(integer); + type port P procedure { + inout S; + } + + type component GeneralComp { + port P p1, p2; + } + + function f() runs on GeneralComp { + p2.getcall; + setverdict(pass, "Call received"); + p2.raise(S, integer:1); + } + + testcase TC_Sem_2204_the_check_operation_093() runs on GeneralComp system GeneralComp{ + var GeneralComp v_ptc := GeneralComp.create; + connect(self:p1, v_ptc:p1); + connect(self:p2, v_ptc:p2); + p2.call(S:{}, nowait); + v_ptc.start(f()); + alt + { + [] any port.check(catch(S, integer:(0..10))) { + setverdict(pass, "Check operation successful"); + } + } + any port.catch; + setverdict(pass, "Exception still on the top of the queue"); + } + + control { + execute(TC_Sem_2204_the_check_operation_093(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_094.ttcn b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_094.ttcn new file mode 100644 index 00000000..bffccdf6 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_094.ttcn @@ -0,0 +1,45 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:22.4, Verify behaviour of any port.check(catch) with assignment in case of successful match inside alt + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +module Sem_2204_the_check_operation_094 { + + signature S() exception(integer); + type port P procedure { + inout S; + } + + type component GeneralComp { + port P p1, p2; + } + + function f() runs on GeneralComp { + p2.getcall; + setverdict(pass, "Call received"); + p2.raise(S, integer:1); + } + + testcase TC_Sem_2204_the_check_operation_094() runs on GeneralComp system GeneralComp{ + var GeneralComp v_ptc := GeneralComp.create; + var integer v_val; + connect(self:p1, v_ptc:p1); + connect(self:p2, v_ptc:p2); + p2.call(S:{}, nowait); + v_ptc.start(f()); + alt + { + [] any port.check(catch(S, integer:(0..10)) -> value v_val) { + if (v_val == 1) { setverdict(pass, "Check operation successful"); } + else { setverdict(fail, "Incorrect exception value"); } + } + } + any port.catch; + setverdict(pass, "Exception still on the top of the queue"); + } + + control { + execute(TC_Sem_2204_the_check_operation_094(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_095.ttcn b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_095.ttcn new file mode 100644 index 00000000..c54e6c84 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_095.ttcn @@ -0,0 +1,39 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:22.4, Verify behaviour of any port.check(catch) in case of successful match in standalone statement + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +module Sem_2204_the_check_operation_095 { + + signature S() exception(integer); + type port P procedure { + inout S; + } + + type component GeneralComp { + port P p1, p2; + } + + function f() runs on GeneralComp { + p2.getcall; + setverdict(pass, "Call received"); + p2.raise(S, integer:1); + } + + testcase TC_Sem_2204_the_check_operation_095() runs on GeneralComp system GeneralComp{ + var GeneralComp v_ptc := GeneralComp.create; + connect(self:p1, v_ptc:p1); + connect(self:p2, v_ptc:p2); + p2.call(S:{}, nowait); + v_ptc.start(f()); + any port.check(catch(S, integer:?) from v_ptc); + setverdict(pass, "Check operation successful"); + any port.catch; + setverdict(pass, "Exception still on the top of the queue"); + } + + control { + execute(TC_Sem_2204_the_check_operation_095(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_096.ttcn b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_096.ttcn new file mode 100644 index 00000000..4ae1f1ee --- /dev/null +++ b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_096.ttcn @@ -0,0 +1,45 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:22.4, Verify behaviour of any port.check(catch) with assignment in case of successful match in standalone statement + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +module Sem_2204_the_check_operation_096 { + + signature S() exception(integer); + type port P procedure { + inout S; + } + + type component GeneralComp { + port P p1, p2; + } + + function f() runs on GeneralComp { + p2.getcall; + setverdict(pass, "Call received"); + p2.raise(S, integer:1); + } + + testcase TC_Sem_2204_the_check_operation_096() runs on GeneralComp system GeneralComp{ + var GeneralComp v_ptc := GeneralComp.create, v_src; + var integer v_val; + connect(self:p1, v_ptc:p1); + connect(self:p2, v_ptc:p2); + p2.call(S:{}, nowait); + v_ptc.start(f()); + alt + { + [] any port.check(catch(S, integer:complement(4, 5, 6)) -> value v_val sender v_src) { + if (match(v_val, 1) and match(v_src, v_ptc)) { setverdict(pass, "Check operation successful"); } + else { setverdict(fail, "Incorrect exception value or sender"); } + } + } + any port.catch; + setverdict(pass, "Exception still on the top of the queue"); + } + + control { + execute(TC_Sem_2204_the_check_operation_096(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_097.ttcn b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_097.ttcn new file mode 100644 index 00000000..88fec8d1 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_097.ttcn @@ -0,0 +1,30 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:22.4, Verify that port.check works correctly inside alt + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +module Sem_2204_the_check_operation_097 { + + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + testcase TC_Sem_2204_the_check_operation_097() runs on GeneralComp { + p.send(integer:1); + alt + { + [] p.check { setverdict(pass, "Check operation successful"); } + } + p.receive; + setverdict(pass, "Message still on the top of the queue"); + } + + control { + execute(TC_Sem_2204_the_check_operation_097(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_098.ttcn b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_098.ttcn new file mode 100644 index 00000000..d6e621b4 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_098.ttcn @@ -0,0 +1,42 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:22.4, Verify that port.check with assignment works correctly inside alt + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +module Sem_2204_the_check_operation_098 { + + signature S(); + type port P procedure { + inout S; + } + + type component GeneralComp { + port P p; + } + + function f() runs on GeneralComp { + var GeneralComp v_src; + alt + { + [] p.check(-> sender v_src) { + if (v_src == mtc) { setverdict(pass, "Check operation successful"); } + else { setverdict(fail, "Unexpected sender value"); } + } + } + p.getcall; + setverdict(pass, "Call still on the top of the queue"); + } + + testcase TC_Sem_2204_the_check_operation_098() runs on GeneralComp system GeneralComp{ + var GeneralComp v_ptc := GeneralComp.create; + connect(self:p, v_ptc:p); + p.call(S:{}, nowait); + v_ptc.start(f()); + v_ptc.done; + } + + control { + execute(TC_Sem_2204_the_check_operation_098(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_099.ttcn b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_099.ttcn new file mode 100644 index 00000000..0c1c916c --- /dev/null +++ b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_099.ttcn @@ -0,0 +1,38 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:22.4, Verify that port.check works correctly as standalone statement + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +module Sem_2204_the_check_operation_099 { + + signature S(); + type port P procedure { + inout S; + } + + type component GeneralComp { + port P p; + } + + function f() runs on GeneralComp { + p.getcall; + setverdict(pass, "Call received"); + p.reply(S:{}); + } + + testcase TC_Sem_2204_the_check_operation_099() runs on GeneralComp system GeneralComp{ + var GeneralComp v_ptc := GeneralComp.create; + connect(self:p, v_ptc:p); + p.call(S:{}, nowait); + v_ptc.start(f()); + p.check; + setverdict(pass, "Check operation successful"); + p.getreply; + setverdict(pass, "Reply still on the top of the queue"); + } + + control { + execute(TC_Sem_2204_the_check_operation_099(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_100.ttcn b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_100.ttcn new file mode 100644 index 00000000..64d7add1 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_100.ttcn @@ -0,0 +1,39 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:22.4, Verify that port.check with assignment works correctly as standalone statement + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +module Sem_2204_the_check_operation_100 { + + signature S() exception(integer); + type port P procedure { + inout S; + } + + type component GeneralComp { + port P p; + } + + function f() runs on GeneralComp { + p.getcall; + setverdict(pass, "Call received"); + p.raise(S, integer:1); + } + + testcase TC_Sem_2204_the_check_operation_100() runs on GeneralComp system GeneralComp{ + var GeneralComp v_ptc := GeneralComp.create, v_src; + connect(self:p, v_ptc:p); + p.call(S:{}, nowait); + v_ptc.start(f()); + p.check(-> sender v_src); + if (v_src == v_ptc) { setverdict(pass, "Check operation successful"); } + else { setverdict(fail, "Counterpart mismatch"); } + p.catch; + setverdict(pass, "Exception still on the top of the queue"); + } + + control { + execute(TC_Sem_2204_the_check_operation_100(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_101.ttcn b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_101.ttcn new file mode 100644 index 00000000..65ba722e --- /dev/null +++ b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_101.ttcn @@ -0,0 +1,30 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:22.4, Verify that any port.check works correctly inside alt + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +module Sem_2204_the_check_operation_101 { + + type port P message { + inout integer; + } + + type component GeneralComp { + port P p1, p2; + } + + testcase TC_Sem_2204_the_check_operation_101() runs on GeneralComp { + p2.send(integer:1); + alt + { + [] any port.check { setverdict(pass, "Check operation successful"); } + } + any port.receive; + setverdict(pass, "Message still on the top of the queue"); + } + + control { + execute(TC_Sem_2204_the_check_operation_101(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_102.ttcn b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_102.ttcn new file mode 100644 index 00000000..ea4183bc --- /dev/null +++ b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_102.ttcn @@ -0,0 +1,43 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:22.4, Verify that any port.check with assignment works correctly inside alt + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +module Sem_2204_the_check_operation_102 { + + signature S(); + type port P procedure { + inout S; + } + + type component GeneralComp { + port P p1, p2; + } + + function f() runs on GeneralComp { + var GeneralComp v_src; + alt + { + [] any port.check(-> sender v_src) { + if (v_src == mtc) { setverdict(pass, "Check operation successful"); } + else { setverdict(fail, "Unexpected sender value"); } + } + } + any port.getcall; + setverdict(pass, "Call still on the top of the queue"); + } + + testcase TC_Sem_2204_the_check_operation_102() runs on GeneralComp system GeneralComp{ + var GeneralComp v_ptc := GeneralComp.create; + connect(self:p1, v_ptc:p1); + connect(self:p2, v_ptc:p2); + p2.call(S:{}, nowait); + v_ptc.start(f()); + v_ptc.done; + } + + control { + execute(TC_Sem_2204_the_check_operation_102(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_103.ttcn b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_103.ttcn new file mode 100644 index 00000000..871e4f37 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_103.ttcn @@ -0,0 +1,39 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:22.4, Verify that any port.check works correctly as standalone statement + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +module Sem_2204_the_check_operation_103 { + + signature S(); + type port P procedure { + inout S; + } + + type component GeneralComp { + port P p1, p2; + } + + function f() runs on GeneralComp { + p2.getcall; + setverdict(pass, "Call received"); + p2.reply(S:{}); + } + + testcase TC_Sem_2204_the_check_operation_103() runs on GeneralComp system GeneralComp{ + var GeneralComp v_ptc := GeneralComp.create; + connect(self:p1, v_ptc:p1); + connect(self:p2, v_ptc:p2); + p2.call(S:{}, nowait); + v_ptc.start(f()); + any port.check; + setverdict(pass, "Check operation successful"); + any port.getreply; + setverdict(pass, "Reply still on the top of the queue"); + } + + control { + execute(TC_Sem_2204_the_check_operation_103(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_104.ttcn b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_104.ttcn new file mode 100644 index 00000000..9e758959 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_104.ttcn @@ -0,0 +1,40 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:22.4, Verify that any port.check(catch) with assignment works correctly as standalone statement + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +module Sem_2204_the_check_operation_104 { + + signature S() exception(integer); + type port P procedure { + inout S; + } + + type component GeneralComp { + port P p1, p2; + } + + function f() runs on GeneralComp { + p2.getcall; + setverdict(pass, "Call received"); + p2.raise(S, integer:1); + } + + testcase TC_Sem_2204_the_check_operation_104() runs on GeneralComp system GeneralComp{ + var GeneralComp v_ptc := GeneralComp.create, v_src; + connect(self:p1, v_ptc:p1); + connect(self:p2, v_ptc:p2); + p2.call(S:{}, nowait); + v_ptc.start(f()); + any port.check(-> sender v_src); + if (v_src == v_ptc) { setverdict(pass, "Check operation successful"); } + else { setverdict(fail, "Counterpart mismatch"); } + any port.catch; + setverdict(pass, "Exception still on the top of the queue"); + } + + control { + execute(TC_Sem_2204_the_check_operation_104(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_105.ttcn b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_105.ttcn new file mode 100644 index 00000000..4899a993 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_105.ttcn @@ -0,0 +1,30 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:22.4, Verify behaviour of port.check in case of unsuccessful match inside alt + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +module Sem_2204_the_check_operation_105 { + + type port P message { + inout integer; + address integer; + } + + type component GeneralComp { + port P p; + } + + testcase TC_Sem_2204_the_check_operation_105() runs on GeneralComp { + p.send(integer:1) to 80; + alt + { + [] p.check(from 8080) { setverdict(fail, "Incorrect match"); } + [] p.receive { setverdict(pass, "As expected, the check operation didn't match"); } + } + } + + control { + execute(TC_Sem_2204_the_check_operation_105(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_106.ttcn b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_106.ttcn new file mode 100644 index 00000000..bf9fd4a5 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_106.ttcn @@ -0,0 +1,43 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:22.4, Verify behaviour of port.check with assignment in case of unsuccessful match inside alt + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +module Sem_2204_the_check_operation_106 { + + signature S(integer p_par1); + type port P procedure { + inout S; + } + + type component GeneralComp { + port P p; + } + + function f() runs on GeneralComp { + var GeneralComp v_src; + alt + { + [] p.check(from self -> sender v_src) { + setverdict(fail, "Incorrect match"); + } + [] p.getcall { + if (not isbound(v_src)) { setverdict(pass, "As expected, the check operation didn't match"); } + else { setverdict(fail, "The v_src variable should still be undefined at this point"); } + } + } + } + + testcase TC_Sem_2204_the_check_operation_106() runs on GeneralComp system GeneralComp{ + var GeneralComp v_ptc := GeneralComp.create; + connect(self:p, v_ptc:p); + p.call(S:{ p_par1 := 1 }, nowait); + v_ptc.start(f()); + v_ptc.done; + } + + control { + execute(TC_Sem_2204_the_check_operation_106(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_107.ttcn b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_107.ttcn new file mode 100644 index 00000000..ecc2439c --- /dev/null +++ b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_107.ttcn @@ -0,0 +1,44 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:22.4, Verify behaviour of port.check in case of unsuccessful match in standalone statement + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +module Sem_2204_the_check_operation_107 { + + signature S(out integer p_par1) return integer; + type port P procedure { + inout S; + } + + type component GeneralComp { + port P p; + } + + function f() runs on GeneralComp { + p.getcall; + setverdict(pass, "Call received"); + p.reply(S:{ p_par1 := 1} value 5); + } + + altstep a() runs on GeneralComp { + [] p.getreply { + setverdict(pass, "As expected, the check operation didn't match"); + stop; + } + } + + testcase TC_Sem_2204_the_check_operation_107() runs on GeneralComp system GeneralComp{ + var GeneralComp v_ptc := GeneralComp.create; + activate(a()); + connect(self:p, v_ptc:p); + p.call(S:{ p_par1 := - }, nowait); + v_ptc.start(f()); + p.check(from self); + setverdict(fail, "Incorrect match"); + } + + control { + execute(TC_Sem_2204_the_check_operation_107(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_108.ttcn b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_108.ttcn new file mode 100644 index 00000000..3b69157b --- /dev/null +++ b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_108.ttcn @@ -0,0 +1,48 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:22.4, Verify behaviour of port.check with assignment in case of unsuccessful match in standalone statement + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +module Sem_2204_the_check_operation_108 { + + signature S() exception(integer); + type port P procedure { + inout S; + } + + type component GeneralComp { + port P p; + var GeneralComp v_src; + } + + function f() runs on GeneralComp { + p.getcall; + setverdict(pass, "Call received"); + p.raise(S, integer:1); + } + + altstep a() runs on GeneralComp { + [] p.catch { + if (not isbound(v_src)) { + setverdict(pass, "As expected, the check operation didn't match"); + } + else { setverdict(fail, "The v_src variable should still be undefined at this point"); } + stop; + } + } + + testcase TC_Sem_2204_the_check_operation_108() runs on GeneralComp system GeneralComp{ + var GeneralComp v_ptc := GeneralComp.create; + activate(a()); + connect(self:p, v_ptc:p); + p.call(S:{}, nowait); + v_ptc.start(f()); + p.check(from self -> sender v_src); + setverdict(fail, "Incorrect match"); + } + + control { + execute(TC_Sem_2204_the_check_operation_108(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_109.ttcn b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_109.ttcn new file mode 100644 index 00000000..15e78bd6 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_109.ttcn @@ -0,0 +1,31 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:22.4, Verify any port.check behaviour in case of unsuccessful match inside alt + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +module Sem_2204_the_check_operation_109 { + + type integer address; + + type port P message { + inout integer; + } + + type component GeneralComp { + port P p1, p2; + } + + testcase TC_Sem_2204_the_check_operation_109() runs on GeneralComp { + p2.send(integer:1) to 80; + alt + { + [] any port.check(from 8080) { setverdict(fail, "Incorrect match"); } + [] any port.receive { setverdict(pass, "As expected, the check operation didn't match"); } + } + } + + control { + execute(TC_Sem_2204_the_check_operation_109(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_110.ttcn b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_110.ttcn new file mode 100644 index 00000000..7b293126 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_110.ttcn @@ -0,0 +1,44 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:22.4, Verify behaviour of any port.check with assignment in case of unsuccessful match inside alt + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +module Sem_2204_the_check_operation_110 { + + signature S(integer p_par1); + type port P procedure { + inout S; + } + + type component GeneralComp { + port P p1, p2; + } + + function f() runs on GeneralComp { + var GeneralComp v_src; + alt + { + [] any port.check(from self -> sender v_src) { + setverdict(fail, "Incorrect match"); + } + [] any port.getcall { + if (not isbound(v_src)) { setverdict(pass, "As expected, the check operation didn't match"); } + else { setverdict(fail, "The v_src variable should still be undefined at this point"); } + } + } + } + + testcase TC_Sem_2204_the_check_operation_110() runs on GeneralComp system GeneralComp{ + var GeneralComp v_ptc := GeneralComp.create; + connect(self:p1, v_ptc:p1); + connect(self:p2, v_ptc:p2); + p2.call(S:{ p_par1 := 1 }, nowait); + v_ptc.start(f()); + v_ptc.done; + } + + control { + execute(TC_Sem_2204_the_check_operation_110(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_111.ttcn b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_111.ttcn new file mode 100644 index 00000000..15ef8ce5 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_111.ttcn @@ -0,0 +1,45 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:22.4, Verify behaviour of any port.check in case of unsuccessful match in standalone statement + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +module Sem_2204_the_check_operation_111 { + + signature S(out integer p_par1) return integer; + type port P procedure { + inout S; + } + + type component GeneralComp { + port P p1, p2; + } + + function f() runs on GeneralComp { + p2.getcall; + setverdict(pass, "Call received"); + p2.reply(S:{ p_par1 := 1} value 5); + } + + altstep a() runs on GeneralComp { + [] any port.getreply { + setverdict(pass, "As expected, the check operation didn't match"); + stop; + } + } + + testcase TC_Sem_2204_the_check_operation_111() runs on GeneralComp system GeneralComp{ + var GeneralComp v_ptc := GeneralComp.create; + activate(a()); + connect(self:p1, v_ptc:p1); + connect(self:p2, v_ptc:p2); + p2.call(S:{ p_par1 := - }, nowait); + v_ptc.start(f()); + any port.check(from self); + setverdict(fail, "Incorrect match"); + } + + control { + execute(TC_Sem_2204_the_check_operation_111(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_112.ttcn b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_112.ttcn new file mode 100644 index 00000000..0220f111 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_112.ttcn @@ -0,0 +1,49 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:22.4, Verify behaviour of any port.check with assignment in case of unsuccessful match in standalone statement + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +module Sem_2204_the_check_operation_112 { + + signature S() exception(integer); + type port P procedure { + inout S; + } + + type component GeneralComp { + port P p1, p2; + var GeneralComp v_src; + } + + function f() runs on GeneralComp { + p2.getcall; + setverdict(pass, "Call received"); + p2.raise(S, integer:1); + } + + altstep a() runs on GeneralComp { + [] any port.catch { + if (not isbound(v_src)) { + setverdict(pass, "As expected, the check operation didn't match"); + } + else { setverdict(fail, "The v_src variable should still be undefined at this point"); } + stop; + } + } + + testcase TC_Sem_2204_the_check_operation_112() runs on GeneralComp system GeneralComp{ + var GeneralComp v_ptc := GeneralComp.create; + activate(a()); + connect(self:p1, v_ptc:p1); + connect(self:p2, v_ptc:p2); + p2.call(S:{}, nowait); + v_ptc.start(f()); + any port.check(from self -> sender v_src); + setverdict(fail, "Incorrect match"); + } + + control { + execute(TC_Sem_2204_the_check_operation_112(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_113.ttcn b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_113.ttcn new file mode 100644 index 00000000..db8ca41c --- /dev/null +++ b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_113.ttcn @@ -0,0 +1,31 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:22.4, Verify behaviour of port.check in case of successful match inside alt + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +module Sem_2204_the_check_operation_113 { + + type port P message { + inout integer; + address integer; + } + + type component GeneralComp { + port P p; + } + + testcase TC_Sem_2204_the_check_operation_113() runs on GeneralComp { + p.send(integer:1) to 80; + alt + { + [] p.check(from P.address:(80, 8080)) { setverdict(pass, "Check operation successful"); } + } + p.receive(integer:?); + setverdict(pass, "Message still on the top of the queue"); + } + + control { + execute(TC_Sem_2204_the_check_operation_113(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_114.ttcn b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_114.ttcn new file mode 100644 index 00000000..6cf68ed2 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_114.ttcn @@ -0,0 +1,42 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:22.4, Verify behaviour of port.check with assignment in case of successful match inside alt + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +module Sem_2204_the_check_operation_114 { + + signature S(integer p_par1); + type port P procedure { + inout S; + } + + type component GeneralComp { + port P p; + } + + function f() runs on GeneralComp { + var GeneralComp v_src; + alt + { + [] p.check(from GeneralComp:? -> sender v_src) { + if (v_src == mtc) { setverdict(pass, "Check operation successful"); } + else { setverdict(fail, "Incorrect sender"); } + } + } + p.getcall; + setverdict(pass, "Call still on the top of the queue"); + } + + testcase TC_Sem_2204_the_check_operation_114() runs on GeneralComp system GeneralComp{ + var GeneralComp v_ptc := GeneralComp.create; + connect(self:p, v_ptc:p); + p.call(S:{ p_par1 := 1 }, nowait); + v_ptc.start(f()); + v_ptc.done; + } + + control { + execute(TC_Sem_2204_the_check_operation_114(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_115.ttcn b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_115.ttcn new file mode 100644 index 00000000..3785f529 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_115.ttcn @@ -0,0 +1,38 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:22.4, Verify behaviour of port.check in case of successful match in standalone statement + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +module Sem_2204_the_check_operation_115 { + + signature S(out integer p_par1) return integer; + type port P procedure { + inout S; + } + + type component GeneralComp { + port P p; + } + + function f() runs on GeneralComp { + p.getcall; + setverdict(pass, "Call received"); + p.reply(S:{ p_par1 := 1} value 5); + } + + testcase TC_Sem_2204_the_check_operation_115() runs on GeneralComp system GeneralComp{ + var GeneralComp v_ptc := GeneralComp.create; + connect(self:p, v_ptc:p); + p.call(S:{ p_par1 := -}, nowait); + v_ptc.start(f()); + p.check(from v_ptc); + setverdict(pass, "Check operation successful"); + p.getreply; + setverdict(pass, "Reply still on the top of the queue"); + } + + control { + execute(TC_Sem_2204_the_check_operation_115(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_116.ttcn b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_116.ttcn new file mode 100644 index 00000000..ca695a1d --- /dev/null +++ b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_116.ttcn @@ -0,0 +1,43 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:22.4, Verify behaviour of port.check with assignment in case of successful match in standalone statement + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +module Sem_2204_the_check_operation_116 { + + signature S() exception(integer); + type port P procedure { + inout S; + } + + type component GeneralComp { + port P p; + } + + function f() runs on GeneralComp { + p.getcall; + setverdict(pass, "Call received"); + p.raise(S, integer:1); + } + + testcase TC_Sem_2204_the_check_operation_116() runs on GeneralComp system GeneralComp{ + var GeneralComp v_ptc := GeneralComp.create, v_src; + connect(self:p, v_ptc:p); + p.call(S:{}, nowait); + v_ptc.start(f()); + alt + { + [] p.check(from GeneralComp:? -> sender v_src) { + if (v_src == v_ptc) { setverdict(pass, "Check operation successful"); } + else { setverdict(fail, "Incorrect sender"); } + } + } + p.catch; + setverdict(pass, "Exception still on the top of the queue"); + } + + control { + execute(TC_Sem_2204_the_check_operation_116(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_117.ttcn b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_117.ttcn new file mode 100644 index 00000000..c944c4be --- /dev/null +++ b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_117.ttcn @@ -0,0 +1,30 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:22.4, Verify behaviour of any port.check in case of successful match inside alt + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +module Sem_2204_the_check_operation_117 { + + type port P message { + inout integer; + } + + type component GeneralComp { + port P p1, p2; + } + + testcase TC_Sem_2204_the_check_operation_117() runs on GeneralComp { + p2.send(integer:1); + alt + { + [] any port.check { setverdict(pass, "Check operation successful"); } + } + any port.receive(integer:?); + setverdict(pass, "Message still on the top of the queue"); + } + + control { + execute(TC_Sem_2204_the_check_operation_117(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_118.ttcn b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_118.ttcn new file mode 100644 index 00000000..cd8253af --- /dev/null +++ b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_118.ttcn @@ -0,0 +1,43 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:22.4, Verify behaviour of any port.check with assignment in case of successful match inside alt + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +module Sem_2204_the_check_operation_118 { + + signature S(integer p_par1); + type port P procedure { + inout S; + } + + type component GeneralComp { + port P p1, p2; + } + + function f() runs on GeneralComp { + var GeneralComp v_src; + alt + { + [] any port.check(from GeneralComp:? -> sender v_src) { + if (v_src == mtc) { setverdict(pass, "Check operation successful"); } + else { setverdict(fail, "Incorrect sender"); } + } + } + any port.getcall; + setverdict(pass, "Call still on the top of the queue"); + } + + testcase TC_Sem_2204_the_check_operation_118() runs on GeneralComp system GeneralComp{ + var GeneralComp v_ptc := GeneralComp.create; + connect(self:p1, v_ptc:p1); + connect(self:p2, v_ptc:p2); + p2.call(S:{ p_par1 := 1 }, nowait); + v_ptc.start(f()); + v_ptc.done; + } + + control { + execute(TC_Sem_2204_the_check_operation_118(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_119.ttcn b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_119.ttcn new file mode 100644 index 00000000..88aeb500 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_119.ttcn @@ -0,0 +1,39 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:22.4, Verify behaviour of any port.check in case of successful match in standalone statement + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +module Sem_2204_the_check_operation_119 { + + signature S(out integer p_par1) return integer; + type port P procedure { + inout S; + } + + type component GeneralComp { + port P p1, p2; + } + + function f() runs on GeneralComp { + p2.getcall; + setverdict(pass, "Call received"); + p2.reply(S:{ p_par1 := 1} value 5); + } + + testcase TC_Sem_2204_the_check_operation_119() runs on GeneralComp system GeneralComp{ + var GeneralComp v_ptc := GeneralComp.create; + connect(self:p1, v_ptc:p1); + connect(self:p2, v_ptc:p2); + p2.call(S:{ p_par1 := -}, nowait); + v_ptc.start(f()); + any port.check(from v_ptc); + setverdict(pass, "Check operation successful"); + any port.getreply; + setverdict(pass, "Reply still on the top of the queue"); + } + + control { + execute(TC_Sem_2204_the_check_operation_119(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_120.ttcn b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_120.ttcn new file mode 100644 index 00000000..ccba2535 --- /dev/null +++ b/ATS/core_language/22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_120.ttcn @@ -0,0 +1,44 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:22.4, Verify behaviour of any port.check with assignment in case of successful match in standalone statement + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +module Sem_2204_the_check_operation_120 { + + signature S() exception(integer); + type port P procedure { + inout S; + } + + type component GeneralComp { + port P p1, p2; + } + + function f() runs on GeneralComp { + p2.getcall; + setverdict(pass, "Call received"); + p2.raise(S, integer:1); + } + + testcase TC_Sem_2204_the_check_operation_120() runs on GeneralComp system GeneralComp{ + var GeneralComp v_ptc := GeneralComp.create, v_src; + connect(self:p1, v_ptc:p1); + connect(self:p2, v_ptc:p2); + p2.call(S:{}, nowait); + v_ptc.start(f()); + alt + { + [] any port.check(from GeneralComp:? -> sender v_src) { + if (v_src == v_ptc) { setverdict(pass, "Check operation successful"); } + else { setverdict(fail, "Incorrect exception value or sender"); } + } + } + any port.catch; + setverdict(pass, "Exception still on the top of the queue"); + } + + control { + execute(TC_Sem_2204_the_check_operation_120(), 5.0); + } +} \ No newline at end of file diff --git a/ATS/core_language/22_communication_operations/NOTES b/ATS/core_language/22_communication_operations/NOTES new file mode 100644 index 00000000..fbcdaf42 --- /dev/null +++ b/ATS/core_language/22_communication_operations/NOTES @@ -0,0 +1,5 @@ +Most aspects of message based communication have been tested in B_matching_incoming_values, +and most aspects of procedue based communication have been tested in +1502_declaring_signature_templates. This section contains test cases only for those +special aspects of communication operations, which have not been tested elsewhere. + diff --git a/ATS/core_language/23_timer_operations/2302_the_start_timer_operataion/NegSem_2302_timer_start_001.ttcn b/ATS/core_language/23_timer_operations/2302_the_start_timer_operataion/NegSem_2302_timer_start_001.ttcn new file mode 100644 index 00000000..22d9caf7 --- /dev/null +++ b/ATS/core_language/23_timer_operations/2302_the_start_timer_operataion/NegSem_2302_timer_start_001.ttcn @@ -0,0 +1,25 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:23, Ensure infinity is not allowed + ** @verdict pass reject + ***************************************************/ +// #reqname /Requirements/23 Timer operations/23.2 The start timer operation/Timer value is non-neg float + + +module NegSem_2302_timer_start_001 { + type component TComp{ + timer t_timer; + } + testcase TC_NegSem_2302_timer_start_001() runs on TComp{ + // Timer value shall be a non-negative numerical float number (i.e. the value shall be greater or equal 0.0, infinity and not_a_number are disallowed). + var float duration := infinity; + t_timer.start(duration); + } + control{ + + execute(TC_NegSem_2302_timer_start_001()) + + + } +} diff --git a/ATS/core_language/23_timer_operations/2302_the_start_timer_operataion/NegSem_2302_timer_start_002.ttcn b/ATS/core_language/23_timer_operations/2302_the_start_timer_operataion/NegSem_2302_timer_start_002.ttcn new file mode 100644 index 00000000..04b53591 --- /dev/null +++ b/ATS/core_language/23_timer_operations/2302_the_start_timer_operataion/NegSem_2302_timer_start_002.ttcn @@ -0,0 +1,25 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:23, Ensure not_a_number is not allowed + ** @verdict pass reject + ***************************************************/ +// #reqname /Requirements/23 Timer operations/23.2 The start timer operation/Timer value is non-neg float + + +module NegSem_2302_timer_start_002 { + type component TComp{ + timer t_timer; + } + testcase TC_NegSem_2302_timer_start_002() runs on TComp{ + // Timer value shall be a non-negative numerical float number (i.e. the value shall be greater or equal 0.0, infinity and not_a_number are disallowed). + var float duration := not_a_number; + t_timer.start(duration); + } + control{ + + execute(TC_NegSem_2302_timer_start_002()) + + + } +} diff --git a/ATS/core_language/23_timer_operations/2302_the_start_timer_operataion/NegSem_2302_timer_start_003.ttcn b/ATS/core_language/23_timer_operations/2302_the_start_timer_operataion/NegSem_2302_timer_start_003.ttcn new file mode 100644 index 00000000..ca545e62 --- /dev/null +++ b/ATS/core_language/23_timer_operations/2302_the_start_timer_operataion/NegSem_2302_timer_start_003.ttcn @@ -0,0 +1,25 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:23, Ensure negative value is not allowed + ** @verdict pass reject + ***************************************************/ +// #reqname /Requirements/23 Timer operations/23.2 The start timer operation/Timer value is non-neg float +// #reqname /Requirements/23 Timer operations/23.2 The start timer operation/neg timer value causes error verdict + +module NegSem_2302_timer_start_003 { + type component TComp{ + timer t_timer; + } + testcase TC_NegSem_2302_timer_start_003() runs on TComp{ + // Timer value shall be a non-negative numerical float number (i.e. the value shall be greater or equal 0.0, infinity and not_a_number are disallowed). + var float duration := -1.0; + t_timer.start(duration); + } + control{ + + execute(TC_NegSem_2302_timer_start_003()) + + + } +} diff --git a/ATS/core_language/23_timer_operations/2302_the_start_timer_operataion/NegSem_2302_timer_start_004.ttcn b/ATS/core_language/23_timer_operations/2302_the_start_timer_operataion/NegSem_2302_timer_start_004.ttcn new file mode 100644 index 00000000..591d0bfd --- /dev/null +++ b/ATS/core_language/23_timer_operations/2302_the_start_timer_operataion/NegSem_2302_timer_start_004.ttcn @@ -0,0 +1,25 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:23, Ensure negative infinity is not allowed + ** @verdict pass reject + ***************************************************/ +// #reqname /Requirements/23 Timer operations/23.2 The start timer operation/Timer value is non-neg float + + +module NegSem_2302_timer_start_004 { + type component TComp{ + timer t_timer; + } + testcase TC_NegSem_2302_timer_start_004() runs on TComp{ + // Timer value shall be a non-negative numerical float number (i.e. the value shall be greater or equal 0.0, infinity and not_a_number are disallowed). + var float duration := -infinity; + t_timer.start(duration); + } + control{ + + execute(TC_NegSem_2302_timer_start_004()) + + + } +} diff --git a/ATS/core_language/23_timer_operations/2302_the_start_timer_operataion/NegSyn_2302_timer_start_001.ttcn b/ATS/core_language/23_timer_operations/2302_the_start_timer_operataion/NegSyn_2302_timer_start_001.ttcn new file mode 100644 index 00000000..07c708c5 --- /dev/null +++ b/ATS/core_language/23_timer_operations/2302_the_start_timer_operataion/NegSyn_2302_timer_start_001.ttcn @@ -0,0 +1,24 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:23, Ensure timer start syntax + ** @verdict pass reject + ***************************************************/ +// #reqname /Requirements/23 Timer operations/23.2 The start timer operation/Start timer syntax + + +module NegSyn_2302_timer_start_001 { + type component TComp{ + timer t_timer := 1.0; + } + testcase TC_NegSyn_2302_timer_start_001() runs on TComp{ + t_timer.start(); + + } + control{ + + execute(TC_NegSyn_2302_timer_start_001()) + + + } +} diff --git a/ATS/core_language/23_timer_operations/2302_the_start_timer_operataion/NegSyn_2302_timer_start_002.ttcn b/ATS/core_language/23_timer_operations/2302_the_start_timer_operataion/NegSyn_2302_timer_start_002.ttcn new file mode 100644 index 00000000..043cc60b --- /dev/null +++ b/ATS/core_language/23_timer_operations/2302_the_start_timer_operataion/NegSyn_2302_timer_start_002.ttcn @@ -0,0 +1,26 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:23, Ensure timer start syntax + ** @verdict pass reject + ***************************************************/ +// #reqname /Requirements/23 Timer operations/23.2 The start timer operation/Start timer syntax + + +module NegSyn_2302_timer_start_002 { + type component TComp{ + + timer t_timers[3] := {1.0, 1.0, 1.0}; + } + testcase TC_NegSyn_2302_timer_start_002() runs on TComp{ + + t_timers[].start; + + } + control{ + + execute(TC_NegSyn_2302_timer_start_002()) + + + } +} diff --git a/ATS/core_language/23_timer_operations/2302_the_start_timer_operataion/NegSyn_2302_timer_start_003.ttcn b/ATS/core_language/23_timer_operations/2302_the_start_timer_operataion/NegSyn_2302_timer_start_003.ttcn new file mode 100644 index 00000000..e8260cde --- /dev/null +++ b/ATS/core_language/23_timer_operations/2302_the_start_timer_operataion/NegSyn_2302_timer_start_003.ttcn @@ -0,0 +1,25 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:23, Ensure timer start syntax + ** @verdict pass reject + ***************************************************/ + + +module NegSyn_2302_timer_start_003 { + type component TComp{ + + timer t_timers[3] := {1.0, 1.0, 1.0}; + } + testcase TC_NegSyn_2302_timer_start_003() runs on TComp{ + + t_timers[1].start(); + + } + control{ + + execute(TC_NegSyn_2302_timer_start_003()) + + + } +} diff --git a/ATS/core_language/23_timer_operations/2302_the_start_timer_operataion/NegSyn_2302_timer_start_004.ttcn b/ATS/core_language/23_timer_operations/2302_the_start_timer_operataion/NegSyn_2302_timer_start_004.ttcn new file mode 100644 index 00000000..9948df96 --- /dev/null +++ b/ATS/core_language/23_timer_operations/2302_the_start_timer_operataion/NegSyn_2302_timer_start_004.ttcn @@ -0,0 +1,26 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:23, Ensure timer start syntax + ** @verdict pass reject + ***************************************************/ +// #reqname /Requirements/23 Timer operations/23.2 The start timer operation/Start timer syntax + + +module NegSyn_2302_timer_start_004 { + type component TComp{ + + timer t_timer := 1.0; + } + testcase TC_NegSyn_2302_timer_start_004() runs on TComp{ + + t_timer.start 1.0; + + } + control{ + + execute(TC_NegSyn_2302_timer_start_004()) + + + } +} diff --git a/ATS/core_language/23_timer_operations/2302_the_start_timer_operataion/NegSyn_2302_timer_start_005.ttcn b/ATS/core_language/23_timer_operations/2302_the_start_timer_operataion/NegSyn_2302_timer_start_005.ttcn new file mode 100644 index 00000000..5867ef56 --- /dev/null +++ b/ATS/core_language/23_timer_operations/2302_the_start_timer_operataion/NegSyn_2302_timer_start_005.ttcn @@ -0,0 +1,26 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:23, Ensure timer start syntax + ** @verdict pass reject + ***************************************************/ +// #reqname /Requirements/23 Timer operations/23.2 The start timer operation/Start timer syntax + + +module NegSyn_2302_timer_start_005 { + type component TComp{ + + timer t_timer := 1.0; + } + testcase TC_NegSyn_2302_timer_start_005() runs on TComp{ + + t_timer start(1.0); + + } + control{ + + execute(TC_NegSyn_2302_timer_start_005()) + + + } +} diff --git a/ATS/core_language/23_timer_operations/2302_the_start_timer_operataion/NegSyn_2302_timer_start_006.ttcn b/ATS/core_language/23_timer_operations/2302_the_start_timer_operataion/NegSyn_2302_timer_start_006.ttcn new file mode 100644 index 00000000..05cf2735 --- /dev/null +++ b/ATS/core_language/23_timer_operations/2302_the_start_timer_operataion/NegSyn_2302_timer_start_006.ttcn @@ -0,0 +1,26 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:23, Ensure timer start syntax + ** @verdict pass reject + ***************************************************/ +// #reqname /Requirements/23 Timer operations/23.2 The start timer operation/Start timer syntax + + +module NegSyn_2302_timer_start_006 { + type component TComp{ + + timer t_timers[3] := {1.0, 1.0, 1.0}; + } + testcase TC_NegSyn_2302_timer_start_006() runs on TComp{ + + t_timers[1].start 1.0; + + } + control{ + + execute(TC_NegSyn_2302_timer_start_006()) + + + } +} diff --git a/ATS/core_language/23_timer_operations/2302_the_start_timer_operataion/NegSyn_2302_timer_start_007.ttcn b/ATS/core_language/23_timer_operations/2302_the_start_timer_operataion/NegSyn_2302_timer_start_007.ttcn new file mode 100644 index 00000000..63e74a8d --- /dev/null +++ b/ATS/core_language/23_timer_operations/2302_the_start_timer_operataion/NegSyn_2302_timer_start_007.ttcn @@ -0,0 +1,26 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:23, Ensure timer start syntax + ** @verdict pass reject + ***************************************************/ +// #reqname /Requirements/23 Timer operations/23.2 The start timer operation/Start timer syntax + + +module NegSyn_2302_timer_start_007 { + type component TComp{ + + timer t_timers[3] := {1.0, 1.0, 1.0}; + } + testcase TC_NegSyn_2302_timer_start_007() runs on TComp{ + + t_timers[1] start(1.0); + + } + control{ + + execute(TC_NegSyn_2302_timer_start_007()) + + + } +} diff --git a/ATS/core_language/23_timer_operations/2302_the_start_timer_operataion/NegSyn_2302_timer_start_008.ttcn b/ATS/core_language/23_timer_operations/2302_the_start_timer_operataion/NegSyn_2302_timer_start_008.ttcn new file mode 100644 index 00000000..60bace14 --- /dev/null +++ b/ATS/core_language/23_timer_operations/2302_the_start_timer_operataion/NegSyn_2302_timer_start_008.ttcn @@ -0,0 +1,26 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:23, Ensure timer start syntax + ** @verdict pass reject + ***************************************************/ +// #reqname /Requirements/23 Timer operations/23.2 The start timer operation/Start timer syntax + + +module NegSyn_2302_timer_start_008 { + type component TComp{ + + timer t_timer := 1.0; + } + testcase TC_NegSyn_2302_timer_start_008() runs on TComp{ + + t_timer start; + + } + control{ + + execute(TC_NegSyn_2302_timer_start_008()) + + + } +} diff --git a/ATS/core_language/23_timer_operations/2302_the_start_timer_operataion/NegSyn_2302_timer_start_009.ttcn b/ATS/core_language/23_timer_operations/2302_the_start_timer_operataion/NegSyn_2302_timer_start_009.ttcn new file mode 100644 index 00000000..372f4d9d --- /dev/null +++ b/ATS/core_language/23_timer_operations/2302_the_start_timer_operataion/NegSyn_2302_timer_start_009.ttcn @@ -0,0 +1,26 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:23, Ensure timer start syntax + ** @verdict pass reject + ***************************************************/ +// #reqname /Requirements/23 Timer operations/23.2 The start timer operation/Start timer syntax + + +module NegSyn_2302_timer_start_009 { + type component TComp{ + + timer t_timers[3] := {1.0, 1.0, 1.0}; + } + testcase TC_NegSyn_2302_timer_start_009() runs on TComp{ + + t_timers[1] start; + + } + control{ + + execute(TC_NegSyn_2302_timer_start_009()) + + + } +} diff --git a/ATS/core_language/23_timer_operations/2302_the_start_timer_operataion/NegSyn_2302_timer_start_010.ttcn b/ATS/core_language/23_timer_operations/2302_the_start_timer_operataion/NegSyn_2302_timer_start_010.ttcn new file mode 100644 index 00000000..cd13b69e --- /dev/null +++ b/ATS/core_language/23_timer_operations/2302_the_start_timer_operataion/NegSyn_2302_timer_start_010.ttcn @@ -0,0 +1,26 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:23, Ensure timer start syntax + ** @verdict pass reject + ***************************************************/ +// #reqname /Requirements/23 Timer operations/23.2 The start timer operation/Start timer syntax +// #reqname /Requirements/23 Timer operations/23.7 Summary of use of any and all with timers/Disallow any timer.start + +module NegSyn_2302_timer_start_010 { + type component TComp{ + + timer t_timers[3] := {1.0, 1.0, 1.0}; + } + testcase TC_NegSyn_2302_timer_start_010() runs on TComp{ + // This is not allowed by the TTCN3 grammar + any timer.start; + + } + control{ + + execute(TC_NegSyn_2302_timer_start_010()) + + + } +} diff --git a/ATS/core_language/23_timer_operations/2302_the_start_timer_operataion/NegSyn_2302_timer_start_011.ttcn b/ATS/core_language/23_timer_operations/2302_the_start_timer_operataion/NegSyn_2302_timer_start_011.ttcn new file mode 100644 index 00000000..c4b3f0bb --- /dev/null +++ b/ATS/core_language/23_timer_operations/2302_the_start_timer_operataion/NegSyn_2302_timer_start_011.ttcn @@ -0,0 +1,26 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:23, Ensure timer start syntax + ** @verdict pass reject + ***************************************************/ +// #reqname /Requirements/23 Timer operations/23.2 The start timer operation/Start timer syntax +// #reqname /Requirements/23 Timer operations/23.7 Summary of use of any and all with timers/Disallow any timer.start + +module NegSyn_2302_timer_start_011 { + type component TComp{ + + timer t_timers[3] := {1.0, 1.0, 1.0}; + } + testcase TC_NegSyn_2302_timer_start_011() runs on TComp{ + // This is not allowed by the TTCN3 grammar + any timer.start(1.0); + + } + control{ + + execute(TC_NegSyn_2302_timer_start_011()) + + + } +} diff --git a/ATS/core_language/23_timer_operations/2302_the_start_timer_operataion/NegSyn_2302_timer_start_012.ttcn b/ATS/core_language/23_timer_operations/2302_the_start_timer_operataion/NegSyn_2302_timer_start_012.ttcn new file mode 100644 index 00000000..9d390c40 --- /dev/null +++ b/ATS/core_language/23_timer_operations/2302_the_start_timer_operataion/NegSyn_2302_timer_start_012.ttcn @@ -0,0 +1,26 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:23, Ensure timer start syntax + ** @verdict pass reject + ***************************************************/ +// #reqname /Requirements/23 Timer operations/23.2 The start timer operation/Start timer syntax +// #reqname /Requirements/23 Timer operations/23.7 Summary of use of any and all with timers/Disallow all timer.start + +module NegSyn_2302_timer_start_012 { + type component TComp{ + + timer t_timers[3] := {1.0, 1.0, 1.0}; + } + testcase TC_NegSyn_2302_timer_start_012() runs on TComp{ + // This is not allowed by the TTCN3 grammar + all timer.start; + + } + control{ + + execute(TC_NegSyn_2302_timer_start_012()) + + + } +} diff --git a/ATS/core_language/23_timer_operations/2302_the_start_timer_operataion/NegSyn_2302_timer_start_013.ttcn b/ATS/core_language/23_timer_operations/2302_the_start_timer_operataion/NegSyn_2302_timer_start_013.ttcn new file mode 100644 index 00000000..c400d781 --- /dev/null +++ b/ATS/core_language/23_timer_operations/2302_the_start_timer_operataion/NegSyn_2302_timer_start_013.ttcn @@ -0,0 +1,27 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:23, Ensure timer start syntax + ** @verdict pass reject + ***************************************************/ +// #reqname /Requirements/23 Timer operations/23.2 The start timer operation/Start timer syntax +// #reqname /Requirements/23 Timer operations/23.7 Summary of use of any and all with timers/Disallow all timer.start + + +module NegSyn_2302_timer_start_013 { + type component TComp{ + + timer t_timers[3] := {1.0, 1.0, 1.0}; + } + testcase TC_NegSyn_2302_timer_start_013() runs on TComp{ + // This is not allowed by the TTCN3 grammar + all timer.start(1.0); + + } + control{ + + execute(TC_NegSyn_2302_timer_start_013()) + + + } +} diff --git a/ATS/core_language/23_timer_operations/2302_the_start_timer_operataion/Sem_2302_timer_start_001.ttcn b/ATS/core_language/23_timer_operations/2302_the_start_timer_operataion/Sem_2302_timer_start_001.ttcn new file mode 100644 index 00000000..f95d929c --- /dev/null +++ b/ATS/core_language/23_timer_operations/2302_the_start_timer_operataion/Sem_2302_timer_start_001.ttcn @@ -0,0 +1,44 @@ +/*************************************************** + ** @author STF 433 (updated by STF 521) + ** @version 0.0.2 + ** @purpose 1:23, Ensure timer runs from zero to stated value + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +// #reqname /Requirements/23 Timer operations/23.2 The start timer operation/timer clock runs from 0 to the value set + +module Sem_2302_timer_start_001 { + type component TComp{ + timer t_timer := 1.0; + } + testcase TC_Sem_2302_timer_start_001() runs on TComp{ + timer t_short, t_long; + var float v_elapsed; + var float v_last := 0.0; + + t_long.start(2.0); + t_timer.start(1.0); + t_short.start(0.5); + + while (t_short.running) { + v_elapsed := t_timer.read; + log("t_timer.read = ", v_elapsed); + if (v_elapsed<0.0 or v_elapsed < v_last){ + setverdict(fail) + } + v_last := v_elapsed; + } + while (t_timer.running) { + v_elapsed := t_long.read; + log("t_long.read = ", v_elapsed); + if (v_elapsed < v_last){ + setverdict(fail) + } + v_last := v_elapsed; + } + setverdict(pass); + + } + control{ + execute(TC_Sem_2302_timer_start_001()) + } +} diff --git a/ATS/core_language/23_timer_operations/2302_the_start_timer_operataion/Sem_2302_timer_start_002.ttcn b/ATS/core_language/23_timer_operations/2302_the_start_timer_operataion/Sem_2302_timer_start_002.ttcn new file mode 100644 index 00000000..bd415764 --- /dev/null +++ b/ATS/core_language/23_timer_operations/2302_the_start_timer_operataion/Sem_2302_timer_start_002.ttcn @@ -0,0 +1,53 @@ +/*************************************************** + ** @author STF 433 (updated by STF 521) + ** @version 0.0.2 + ** @purpose 1:23, Ensure timer can be restarted + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +// #reqname /Requirements/23 Timer operations/23.2 The start timer operation/timer can be restarted by repeated start operation + + +module Sem_2302_timer_start_002 { + type component TComp{ + } + + testcase TC_Sem_2302_timer_start_002() runs on TComp{ + timer t_short := 0.5, t_target := 1.0, t_long := 1.0; + + t_short.start; + t_target.start; + t_long.start; + + alt { + []t_short.timeout { + setverdict(pass); + t_target.start; // restart timer + } + []t_target.timeout { + setverdict(fail); + stop; + } + []t_long.timeout { + setverdict(fail); + stop; + } + } + alt { + []t_long.timeout { + setverdict(pass); + } + []t_target.timeout { + // Expected that t_target timeouts in 1.5 seconds since start: + // 0.5 sec. elapsed by t_short and 1.0 sec. by restarted timer + setverdict(fail); + stop; + } + } + } + control{ + + execute(TC_Sem_2302_timer_start_002()) + + + } +} diff --git a/ATS/core_language/23_timer_operations/2302_the_start_timer_operataion/Sem_2302_timer_start_003.ttcn b/ATS/core_language/23_timer_operations/2302_the_start_timer_operataion/Sem_2302_timer_start_003.ttcn new file mode 100644 index 00000000..54d5c2f0 --- /dev/null +++ b/ATS/core_language/23_timer_operations/2302_the_start_timer_operataion/Sem_2302_timer_start_003.ttcn @@ -0,0 +1,74 @@ +/*************************************************** + ** @author STF 433 (updated by STF 521) + ** @version 0.0.2 + ** @purpose 1:23, Ensure timer default value can be modified by start value + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +// #reqname /Requirements/23 Timer operations/23.2 The start timer operation/timer clock runs from 0 to the value set +// #reqname /Requirements/23 Timer operations/23.2 The start timer operation/Overridden timer value applies only to current instance + +module Sem_2302_timer_start_003 { + type component TComp{ + timer t_timer := 1.0; + } + + testcase TC_Sem_2302_timer_start_003() runs on TComp{ + timer t_short := 0.95, t_long := 1.05; + + t_long.start; + t_timer.start(0.9); + t_short.start; + + // t_timer is expected to expire before other timers: its duration 0.9 < t_short < t_long + alt { + []t_timer.timeout { + setverdict(pass); + } + []t_short.timeout { + setverdict(fail); + stop; + } + []t_long.timeout { + setverdict(fail); + stop; + } + } + + t_short.timeout; + t_long.timeout; + + t_long.start; + t_timer.start; + t_short.start; + // t_timer is expected to expire before between t_short and t_long timers: + // its default duration t_short < 1.0 < t_long + alt { + []t_short.timeout { + setverdict(pass); + } + []t_timer.timeout { + setverdict(fail); + stop; + } + []t_long.timeout { + setverdict(fail); + stop; + } + } + alt { + []t_timer.timeout { + setverdict(pass); + } + []t_long.timeout { + setverdict(fail); + stop; + } + } + } + control{ + + execute(TC_Sem_2302_timer_start_003()) + + + } +} diff --git a/ATS/core_language/23_timer_operations/2302_the_start_timer_operataion/Sem_2302_timer_start_004.ttcn b/ATS/core_language/23_timer_operations/2302_the_start_timer_operataion/Sem_2302_timer_start_004.ttcn new file mode 100644 index 00000000..7baca242 --- /dev/null +++ b/ATS/core_language/23_timer_operations/2302_the_start_timer_operataion/Sem_2302_timer_start_004.ttcn @@ -0,0 +1,45 @@ +/*************************************************** + ** @author STF 433 (updated by STF 521) + ** @version 0.0.2 + ** @purpose 1:23, Ensure timer with value 0.0 expires immediately + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +// #reqname /Requirements/23 Timer operations/23.2 The start timer operation/Timer with the timer value 0.0 times out immediately. + + +module Sem_2302_timer_start_004 { + type component TComp{ + timer t_timer := 0.0; + timer t_timer_with_long_default := 100.0; + } + + testcase TC_Sem_2302_timer_start_004() runs on TComp{ + t_timer.start; + if (t_timer.running) + { + setverdict(fail); + } + else + { + setverdict(pass); + } + + t_timer_with_long_default.start(0.0); + if (t_timer_with_long_default.running) + { + setverdict(fail); + } + else + { + setverdict(pass); + } + + + } + control{ + + execute(TC_Sem_2302_timer_start_004()) + + + } +} diff --git a/ATS/core_language/23_timer_operations/2303_the_stop_timer_operation/NegSyn_2303_timer_stop_001.ttcn b/ATS/core_language/23_timer_operations/2303_the_stop_timer_operation/NegSyn_2303_timer_stop_001.ttcn new file mode 100644 index 00000000..64e2278f --- /dev/null +++ b/ATS/core_language/23_timer_operations/2303_the_stop_timer_operation/NegSyn_2303_timer_stop_001.ttcn @@ -0,0 +1,25 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:23.3, Ensure timer stop syntax + ** @verdict pass reject + ***************************************************/ +// #reqname /Requirements/23 Timer operations/23.3 The Stop timer operation/Timer stop syntax + + +module NegSyn_2303_timer_stop_001 { + type component TComp{ + timer t_timer := 1.0; + } + testcase TC_NegSyn_2303_timer_stop_001() runs on TComp{ + t_timer.start; + t_timer stop; + + } + control{ + + execute(TC_NegSyn_2303_timer_stop_001()) + + + } +} diff --git a/ATS/core_language/23_timer_operations/2303_the_stop_timer_operation/NegSyn_2303_timer_stop_002.ttcn b/ATS/core_language/23_timer_operations/2303_the_stop_timer_operation/NegSyn_2303_timer_stop_002.ttcn new file mode 100644 index 00000000..49610d8b --- /dev/null +++ b/ATS/core_language/23_timer_operations/2303_the_stop_timer_operation/NegSyn_2303_timer_stop_002.ttcn @@ -0,0 +1,26 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:23.3, Ensure timer stop syntax + ** @verdict pass reject + ***************************************************/ +// #reqname /Requirements/23 Timer operations/23.3 The Stop timer operation/Timer stop syntax + + +module NegSyn_2303_timer_stop_002 { + type component TComp{ + timer t_timer[2] := {1.0, 1.0}; + } + testcase TC_NegSyn_2303_timer_stop_002() runs on TComp{ + t_timer[0].start; + t_timer[1].start; + t_timer[].stop; + + } + control{ + + execute(TC_NegSyn_2303_timer_stop_002()) + + + } +} diff --git a/ATS/core_language/23_timer_operations/2303_the_stop_timer_operation/NegSyn_2303_timer_stop_003.ttcn b/ATS/core_language/23_timer_operations/2303_the_stop_timer_operation/NegSyn_2303_timer_stop_003.ttcn new file mode 100644 index 00000000..5681d750 --- /dev/null +++ b/ATS/core_language/23_timer_operations/2303_the_stop_timer_operation/NegSyn_2303_timer_stop_003.ttcn @@ -0,0 +1,26 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:23.3, Ensure all timer stop syntax + ** @verdict pass reject + ***************************************************/ +// #reqname /Requirements/23 Timer operations/23.3 The Stop timer operation/Timer stop syntax + + +module NegSyn_2303_timer_stop_003 { + type component TComp{ + timer t_timer[2] := {1.0, 1.0}; + } + testcase TC_NegSyn_2303_timer_stop_003() runs on TComp{ + t_timer[0].start; + t_timer[1].start; + all.stop; + + } + control{ + + execute(TC_NegSyn_2303_timer_stop_003()) + + + } +} diff --git a/ATS/core_language/23_timer_operations/2303_the_stop_timer_operation/NegSyn_2303_timer_stop_004.ttcn b/ATS/core_language/23_timer_operations/2303_the_stop_timer_operation/NegSyn_2303_timer_stop_004.ttcn new file mode 100644 index 00000000..a16ea640 --- /dev/null +++ b/ATS/core_language/23_timer_operations/2303_the_stop_timer_operation/NegSyn_2303_timer_stop_004.ttcn @@ -0,0 +1,26 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:23.3, Ensure all timer stop syntax + ** @verdict pass reject + ***************************************************/ +// #reqname /Requirements/23 Timer operations/23.3 The Stop timer operation/Timer stop syntax + + +module NegSyn_2303_timer_stop_004 { + type component TComp{ + timer t_timer[2] := {1.0, 1.0}; + } + testcase TC_NegSyn_2303_timer_stop_004() runs on TComp{ + t_timer[0].start; + t_timer[1].start; + timer.stop; + + } + control{ + + execute(TC_NegSyn_2303_timer_stop_004()) + + + } +} diff --git a/ATS/core_language/23_timer_operations/2303_the_stop_timer_operation/NegSyn_2303_timer_stop_005.ttcn b/ATS/core_language/23_timer_operations/2303_the_stop_timer_operation/NegSyn_2303_timer_stop_005.ttcn new file mode 100644 index 00000000..532ab8b1 --- /dev/null +++ b/ATS/core_language/23_timer_operations/2303_the_stop_timer_operation/NegSyn_2303_timer_stop_005.ttcn @@ -0,0 +1,26 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:23.3, Ensure all timer stop syntax + ** @verdict pass reject + ***************************************************/ +// #reqname /Requirements/23 Timer operations/23.3 The Stop timer operation/Timer stop syntax + + +module NegSyn_2303_timer_stop_005 { + type component TComp{ + timer t_timer[2] := {1.0, 1.0}; + } + testcase TC_NegSyn_2303_timer_stop_005() runs on TComp{ + t_timer[0].start; + t_timer[1].start; + all timer stop; + + } + control{ + + execute(TC_NegSyn_2303_timer_stop_005()) + + + } +} diff --git a/ATS/core_language/23_timer_operations/2303_the_stop_timer_operation/NegSyn_2303_timer_stop_006.ttcn b/ATS/core_language/23_timer_operations/2303_the_stop_timer_operation/NegSyn_2303_timer_stop_006.ttcn new file mode 100644 index 00000000..4b87cd17 --- /dev/null +++ b/ATS/core_language/23_timer_operations/2303_the_stop_timer_operation/NegSyn_2303_timer_stop_006.ttcn @@ -0,0 +1,26 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:23.3, Ensure all timer stop syntax + ** @verdict pass reject + ***************************************************/ +// #reqname /Requirements/23 Timer operations/23.3 The Stop timer operation/Timer stop syntax +// #reqname /Requirements/23 Timer operations/23.7 Summary of use of any and all with timers/Disallow any timer.stop + +module NegSyn_2303_timer_stop_006 { + type component TComp{ + timer t_timer[2] := {1.0, 1.0}; + } + testcase TC_NegSyn_2303_timer_stop_006() runs on TComp{ + t_timer[0].start; + t_timer[1].start; + any timer.stop; + + } + control{ + + execute(TC_NegSyn_2303_timer_stop_006()) + + + } +} diff --git a/ATS/core_language/23_timer_operations/2303_the_stop_timer_operation/Sem_2303_timer_stop_002.ttcn b/ATS/core_language/23_timer_operations/2303_the_stop_timer_operation/Sem_2303_timer_stop_002.ttcn new file mode 100644 index 00000000..e32601f1 --- /dev/null +++ b/ATS/core_language/23_timer_operations/2303_the_stop_timer_operation/Sem_2303_timer_stop_002.ttcn @@ -0,0 +1,30 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:23.3, Ensure timer stop sets elapsed time to zero + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +// #reqname /Requirements/23 Timer operations/23.3 The Stop timer operation/stopped timer is inactive and elapsed time is 0 + + +module Sem_2303_timer_stop_002 { + type component TComp{ + timer t_timer[2] := {1.0, 1.0}; + } + testcase TC_Sem_2303_timer_stop_002() runs on TComp{ + t_timer[0].start; + t_timer[1].start; + t_timer[0].stop; + if (t_timer[0].read!=0.0){ + setverdict(fail); + } + setverdict(pass); + + } + control{ + + execute(TC_Sem_2303_timer_stop_002()) + + + } +} diff --git a/ATS/core_language/23_timer_operations/2303_the_stop_timer_operation/Sem_2303_timer_stop_003.ttcn b/ATS/core_language/23_timer_operations/2303_the_stop_timer_operation/Sem_2303_timer_stop_003.ttcn new file mode 100644 index 00000000..de90cf2f --- /dev/null +++ b/ATS/core_language/23_timer_operations/2303_the_stop_timer_operation/Sem_2303_timer_stop_003.ttcn @@ -0,0 +1,30 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:23.3, Ensure timer all timer identifier + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +// #reqname /Requirements/23 Timer operations/23.3 The Stop timer operation/all keyword can be used for timers in component or module control +// #reqname /Requirements/23 Timer operations/23.7 Summary of use of any and all with timers/Allow all timer.stop + +module Sem_2303_timer_stop_003 { + type component TComp{ + timer t_timer[2] := {1.0, 1.0}; + } + testcase TC_Sem_2303_timer_stop_003() runs on TComp{ + t_timer[0].start; + t_timer[1].start; + all timer.stop; + if (t_timer[0].read!=0.0 or t_timer[1].read!=0.0){ + setverdict(fail); + } + setverdict(pass); + + } + control{ + + execute(TC_Sem_2303_timer_stop_003()) + + + } +} diff --git a/ATS/core_language/23_timer_operations/2303_the_stop_timer_operation/Sem_2303_timer_stop_004.ttcn b/ATS/core_language/23_timer_operations/2303_the_stop_timer_operation/Sem_2303_timer_stop_004.ttcn new file mode 100644 index 00000000..bc26bfbc --- /dev/null +++ b/ATS/core_language/23_timer_operations/2303_the_stop_timer_operation/Sem_2303_timer_stop_004.ttcn @@ -0,0 +1,30 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:23.3, Ensure can be stopped after timeout + ** @verdict pass accept, ttcn3verdict:none + ***************************************************/ +// #reqname /Requirements/23 Timer operations/23.3 The Stop timer operation/Stopping inactive timer is ok, but unobservable + + +module Sem_2303_timer_stop_004 { + type component TComp{ + timer t_timer := 1.0; + } + altstep a_step() runs on TComp{ + []t_timer.timeout{ + t_timer.stop; + } + } + testcase TC_Sem_2303_timer_stop_004() runs on TComp{ + t_timer.start; + a_step(); + + } + control{ + + execute(TC_Sem_2303_timer_stop_004()) + + + } +} diff --git a/ATS/core_language/23_timer_operations/2303_the_stop_timer_operation/Syn_2303_timer_stop_006.ttcn b/ATS/core_language/23_timer_operations/2303_the_stop_timer_operation/Syn_2303_timer_stop_006.ttcn new file mode 100644 index 00000000..a4f69671 --- /dev/null +++ b/ATS/core_language/23_timer_operations/2303_the_stop_timer_operation/Syn_2303_timer_stop_006.ttcn @@ -0,0 +1,24 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:23.3, Ensure timer stop syntax + ** @verdict pass accept, noexecution + ***************************************************/ +// #reqname /Requirements/23 Timer operations/23.3 The Stop timer operation/Timer stop syntax + +module Syn_2303_timer_stop_006 { + type component TComp{ + timer t_timer := 1.0; + } + testcase TC_Syn_2303_timer_stop_006() runs on TComp{ + t_timer.start; + t_timer.stop; + setverdict(pass); + } + control{ + + execute(TC_Syn_2303_timer_stop_006()) + + + } +} diff --git a/ATS/core_language/23_timer_operations/2303_the_stop_timer_operation/Syn_2303_timer_stop_007.ttcn b/ATS/core_language/23_timer_operations/2303_the_stop_timer_operation/Syn_2303_timer_stop_007.ttcn new file mode 100644 index 00000000..2f530177 --- /dev/null +++ b/ATS/core_language/23_timer_operations/2303_the_stop_timer_operation/Syn_2303_timer_stop_007.ttcn @@ -0,0 +1,26 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:23.3, Ensure all timer stop syntax + ** @verdict pass accept, noexecution + ***************************************************/ +// #reqname /Requirements/23 Timer operations/23.3 The Stop timer operation/Timer stop syntax +// #reqname /Requirements/23 Timer operations/23.7 Summary of use of any and all with timers/Allow all timer.stop + +module Syn_2303_timer_stop_007 { + type component TComp{ + timer t_timer := 1.0; + } + testcase TC_Syn_2303_timer_stop_007() runs on TComp{ + t_timer.start; + all timer.stop; + setverdict(pass); + + } + control{ + + execute(TC_Syn_2303_timer_stop_007()) + + + } +} diff --git a/ATS/core_language/23_timer_operations/2304_the_read_timer_operation/NegSyn_2304_timer_read_001.ttcn b/ATS/core_language/23_timer_operations/2304_the_read_timer_operation/NegSyn_2304_timer_read_001.ttcn new file mode 100644 index 00000000..8b0f9038 --- /dev/null +++ b/ATS/core_language/23_timer_operations/2304_the_read_timer_operation/NegSyn_2304_timer_read_001.ttcn @@ -0,0 +1,26 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:24.4, Ensure timer read syntax + ** @verdict pass reject + ***************************************************/ +// #reqname /Requirements/23 Timer operations/23.4 The Read timer operation/Timer Read syntax + + +module NegSyn_2304_timer_read_001 { + type component TComp{ + timer t_timer[2] := {1.0, 1.0}; + } + testcase TC_NegSyn_2304_timer_read_001() runs on TComp{ + t_timer[0].start; + t_timer[1].start; + t_timer[].read; + + } + control{ + + execute(TC_NegSyn_2304_timer_read_001()) + + + } +} diff --git a/ATS/core_language/23_timer_operations/2304_the_read_timer_operation/NegSyn_2304_timer_read_002.ttcn b/ATS/core_language/23_timer_operations/2304_the_read_timer_operation/NegSyn_2304_timer_read_002.ttcn new file mode 100644 index 00000000..e7633611 --- /dev/null +++ b/ATS/core_language/23_timer_operations/2304_the_read_timer_operation/NegSyn_2304_timer_read_002.ttcn @@ -0,0 +1,25 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:24.4, Ensure timer read syntax + ** @verdict pass reject + ***************************************************/ +// #reqname /Requirements/23 Timer operations/23.4 The Read timer operation/Timer Read syntax + + +module NegSyn_2304_timer_read_002 { + type component TComp{ + timer t_timer := 1.0; + } + testcase TC_NegSyn_2304_timer_read_002() runs on TComp{ + var float v_float; + v_float := t_timer read; + + } + control{ + + execute(TC_NegSyn_2304_timer_read_002()) + + + } +} diff --git a/ATS/core_language/23_timer_operations/2304_the_read_timer_operation/NegSyn_2304_timer_read_003.ttcn b/ATS/core_language/23_timer_operations/2304_the_read_timer_operation/NegSyn_2304_timer_read_003.ttcn new file mode 100644 index 00000000..0c2ce2fa --- /dev/null +++ b/ATS/core_language/23_timer_operations/2304_the_read_timer_operation/NegSyn_2304_timer_read_003.ttcn @@ -0,0 +1,25 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:24.4, Ensure timer read syntax + ** @verdict pass reject + ***************************************************/ +// #reqname /Requirements/23 Timer operations/23.4 The Read timer operation/Timer Read syntax + + +module NegSyn_2304_timer_read_003 { + type component TComp{ + timer t_timer := 1.0; + } + testcase TC_NegSyn_2304_timer_read_003() runs on TComp{ + var float v_float; + v_float := read(t_timer); + + } + control{ + + execute(TC_NegSyn_2304_timer_read_003()) + + + } +} diff --git a/ATS/core_language/23_timer_operations/2304_the_read_timer_operation/NegSyn_2304_timer_read_004.ttcn b/ATS/core_language/23_timer_operations/2304_the_read_timer_operation/NegSyn_2304_timer_read_004.ttcn new file mode 100644 index 00000000..0e7d9447 --- /dev/null +++ b/ATS/core_language/23_timer_operations/2304_the_read_timer_operation/NegSyn_2304_timer_read_004.ttcn @@ -0,0 +1,25 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:24.4, Ensure timer read syntax: disallow any timer.read + ** @verdict pass reject + ***************************************************/ +// #reqname /Requirements/23 Timer operations/23.4 The Read timer operation/Timer Read syntax +// #reqname /Requirements/23 Timer operations/23.7 Summary of use of any and all with timers/Disallow any timer.read + +module NegSyn_2304_timer_read_004 { + type component TComp{ + timer t_timer := 1.0; + } + testcase TC_NegSyn_2304_timer_read_004() runs on TComp{ + var float v_float; + v_float := any timer.read; + log ("any timer.read", v_float); + } + control{ + + execute(TC_NegSyn_2304_timer_read_004()) + + + } +} diff --git a/ATS/core_language/23_timer_operations/2304_the_read_timer_operation/NegSyn_2304_timer_read_005.ttcn b/ATS/core_language/23_timer_operations/2304_the_read_timer_operation/NegSyn_2304_timer_read_005.ttcn new file mode 100644 index 00000000..26cbe571 --- /dev/null +++ b/ATS/core_language/23_timer_operations/2304_the_read_timer_operation/NegSyn_2304_timer_read_005.ttcn @@ -0,0 +1,24 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:24.4, Ensure timer read syntax + ** @verdict pass reject + ***************************************************/ +// #reqname /Requirements/23 Timer operations/23.4 The Read timer operation/Timer Read syntax +// #reqname /Requirements/23 Timer operations/23.7 Summary of use of any and all with timers/Disallow all timer.read + +module NegSyn_2305_timer_read_005 { + type component TComp{ + timer t_timer := 1.0; + } + testcase TC_NegSyn_2305_timer_read_005() runs on TComp{ + var float v_float; + v_float := all timer.read; + } + control{ + + execute(TC_NegSyn_2305_timer_read_005()) + + + } +} diff --git a/ATS/core_language/23_timer_operations/2304_the_read_timer_operation/Sem_2304_timer_read_001.ttcn b/ATS/core_language/23_timer_operations/2304_the_read_timer_operation/Sem_2304_timer_read_001.ttcn new file mode 100644 index 00000000..52f2e116 --- /dev/null +++ b/ATS/core_language/23_timer_operations/2304_the_read_timer_operation/Sem_2304_timer_read_001.ttcn @@ -0,0 +1,31 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:24.4, Ensure timer read result of inactive timer is zero + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +// #reqname /Requirements/23 Timer operations/23.4 The Read timer operation/Read on an inactive timer returns float zero + + +module Sem_2304_timer_read_001 { + type component TComp{ + timer t_timer := 1.0; + } + testcase TC_Sem_2304_timer_read_001() runs on TComp{ + if (t_timer.read!=0.0){ + setverdict(fail); + stop; + } + t_timer.start; + t_timer.stop; + if (t_timer.read!=0.0){ + setverdict(fail); + } else { + setverdict(pass); + } + + } + control{ + execute(TC_Sem_2304_timer_read_001()) + } +} diff --git a/ATS/core_language/23_timer_operations/2304_the_read_timer_operation/Sem_2304_timer_read_002.ttcn b/ATS/core_language/23_timer_operations/2304_the_read_timer_operation/Sem_2304_timer_read_002.ttcn new file mode 100644 index 00000000..26908a77 --- /dev/null +++ b/ATS/core_language/23_timer_operations/2304_the_read_timer_operation/Sem_2304_timer_read_002.ttcn @@ -0,0 +1,30 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:24.4, Ensure timer read result is non-negative float + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +// #reqname /Requirements/23 Timer operations/23.4 The Read timer operation/Read returns elapsed time that is non-neg float + + +module Sem_2304_timer_read_002 { + type component TComp{ + timer t_timer := 1.0; + } + testcase TC_Sem_2304_timer_read_002() runs on TComp{ + var float f:=0.0; + t_timer.start; + f:=t_timer.read; + if (f < 0.0){ + setverdict(fail); + } else { + setverdict(pass); + } + } + control{ + + execute(TC_Sem_2304_timer_read_002()) + + + } +} diff --git a/ATS/core_language/23_timer_operations/2304_the_read_timer_operation/Sem_2304_timer_read_003.ttcn b/ATS/core_language/23_timer_operations/2304_the_read_timer_operation/Sem_2304_timer_read_003.ttcn new file mode 100644 index 00000000..d959afcb --- /dev/null +++ b/ATS/core_language/23_timer_operations/2304_the_read_timer_operation/Sem_2304_timer_read_003.ttcn @@ -0,0 +1,47 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:24.4, Ensure timer read result is non-negative float + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +// #reqname /Requirements/23 Timer operations/23.4 The Read timer operation/Read returns elapsed time that is non-neg float + + +module Sem_2304_timer_read_003 { + type component TComp{ + timer t_aux := 1.0; + timer t_aux2 := 1.05; + timer t_timer := 20.0; + } + testcase TC_Sem_2304_timer_read_003() runs on TComp{ + var float v_elapsed; + + t_aux2.start; + + t_timer.start; + + // wait for 1 second + t_aux.start; + t_aux.timeout; + + v_elapsed:=t_timer.read; + if (v_elapsed < 1.0){ + setverdict(fail); + } else { + setverdict(pass); + } + if (t_aux2.running) { + if (v_elapsed <= 1.05) { + setverdict(pass); + } else { + setverdict(fail); + } + } + } + control{ + + execute(TC_Sem_2304_timer_read_003()) + + + } +} diff --git a/ATS/core_language/23_timer_operations/2305_the_running_timer_operation/NegSyn_2305_timer_running_001.ttcn b/ATS/core_language/23_timer_operations/2305_the_running_timer_operation/NegSyn_2305_timer_running_001.ttcn new file mode 100644 index 00000000..08ecbeba --- /dev/null +++ b/ATS/core_language/23_timer_operations/2305_the_running_timer_operation/NegSyn_2305_timer_running_001.ttcn @@ -0,0 +1,24 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:23.5, Ensure timer running syntax + ** @verdict pass reject + ***************************************************/ +// #reqname /Requirements/23 Timer operations/23.5 The Running timer operation/Timer running syntax + + +module NegSyn_2305_timer_running_001 { + type component TComp{ + timer t_timer := 1.0; + } + testcase TC_NegSyn_2305_timer_running_001() runs on TComp{ + var boolean v_bool; + v_bool := t_timer running; + } + control{ + + execute(TC_NegSyn_2305_timer_running_001()) + + + } +} diff --git a/ATS/core_language/23_timer_operations/2305_the_running_timer_operation/NegSyn_2305_timer_running_002.ttcn b/ATS/core_language/23_timer_operations/2305_the_running_timer_operation/NegSyn_2305_timer_running_002.ttcn new file mode 100644 index 00000000..3cc8aec5 --- /dev/null +++ b/ATS/core_language/23_timer_operations/2305_the_running_timer_operation/NegSyn_2305_timer_running_002.ttcn @@ -0,0 +1,25 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:23.5, Ensure timer running syntax + ** @verdict pass reject + ***************************************************/ +// #reqname /Requirements/23 Timer operations/23.5 The Running timer operation/Timer running syntax + + +module NegSyn_2305_timer_running_002 { + type component TComp{ + timer t_timer[2] := {1.0, 1.0}; + } + testcase TC_NegSyn_2305_timer_running_002() runs on TComp{ + var boolean v_bool; + v_bool := t_timer[].running; + + } + control{ + + execute(TC_NegSyn_2305_timer_running_002()) + + + } +} diff --git a/ATS/core_language/23_timer_operations/2305_the_running_timer_operation/NegSyn_2305_timer_running_003.ttcn b/ATS/core_language/23_timer_operations/2305_the_running_timer_operation/NegSyn_2305_timer_running_003.ttcn new file mode 100644 index 00000000..b8bc064c --- /dev/null +++ b/ATS/core_language/23_timer_operations/2305_the_running_timer_operation/NegSyn_2305_timer_running_003.ttcn @@ -0,0 +1,25 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:23.5, Ensure timer running syntax + ** @verdict pass reject + ***************************************************/ +// #reqname /Requirements/23 Timer operations/23.5 The Running timer operation/Timer running syntax + + +module NegSyn_2305_timer_running_003 { + type component TComp{ + timer t_timer[2] := {1.0, 1.0}; + } + testcase TC_NegSyn_2305_timer_running_003() runs on TComp{ + var boolean v_bool; + v_bool := any timer running; + + } + control{ + + execute(TC_NegSyn_2305_timer_running_003()) + + + } +} diff --git a/ATS/core_language/23_timer_operations/2305_the_running_timer_operation/NegSyn_2305_timer_running_004.ttcn b/ATS/core_language/23_timer_operations/2305_the_running_timer_operation/NegSyn_2305_timer_running_004.ttcn new file mode 100644 index 00000000..5fc957e1 --- /dev/null +++ b/ATS/core_language/23_timer_operations/2305_the_running_timer_operation/NegSyn_2305_timer_running_004.ttcn @@ -0,0 +1,25 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:23.5, Ensure timer running syntax + ** @verdict pass reject + ***************************************************/ +// #reqname /Requirements/23 Timer operations/23.5 The Running timer operation/Timer running syntax + + +module NegSyn_2305_timer_running_004 { + type component TComp{ + timer t_timer[2] := {1.0, 1.0}; + } + testcase TC_NegSyn_2305_timer_running_004() runs on TComp{ + var boolean v_bool; + v_bool := timer.running; + + } + control{ + + execute(TC_NegSyn_2305_timer_running_004()) + + + } +} diff --git a/ATS/core_language/23_timer_operations/2305_the_running_timer_operation/NegSyn_2305_timer_running_005.ttcn b/ATS/core_language/23_timer_operations/2305_the_running_timer_operation/NegSyn_2305_timer_running_005.ttcn new file mode 100644 index 00000000..bf19a96f --- /dev/null +++ b/ATS/core_language/23_timer_operations/2305_the_running_timer_operation/NegSyn_2305_timer_running_005.ttcn @@ -0,0 +1,25 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:23.5, Ensure timer running syntax + ** @verdict pass reject + ***************************************************/ +// #reqname /Requirements/23 Timer operations/23.5 The Running timer operation/Timer running syntax + + +module NegSyn_2305_timer_running_005 { + type component TComp{ + timer t_timer[2] := {1.0, 1.0}; + } + testcase TC_NegSyn_2305_timer_running_005() runs on TComp{ + var boolean v_bool; + v_bool := timer any.running; + + } + control{ + + execute(TC_NegSyn_2305_timer_running_005()) + + + } +} diff --git a/ATS/core_language/23_timer_operations/2305_the_running_timer_operation/NegSyn_2305_timer_running_006.ttcn b/ATS/core_language/23_timer_operations/2305_the_running_timer_operation/NegSyn_2305_timer_running_006.ttcn new file mode 100644 index 00000000..38ff5079 --- /dev/null +++ b/ATS/core_language/23_timer_operations/2305_the_running_timer_operation/NegSyn_2305_timer_running_006.ttcn @@ -0,0 +1,25 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:23.5, Ensure timer running syntax: disallow all timer.running + ** @verdict pass reject + ***************************************************/ +// #reqname /Requirements/23 Timer operations/23.5 The Running timer operation/Timer running syntax +// #reqname /Requirements/23 Timer operations/23.7 Summary of use of any and all with timers/Disallow all timer.running + +module NegSyn_2305_timer_running_006 { + type component TComp{ + timer t_timer[2] := {1.0, 1.0}; + } + testcase TC_NegSyn_2305_timer_running_006() runs on TComp{ + var boolean v_bool; + v_bool := all timer.running; + + } + control{ + + execute(TC_NegSyn_2305_timer_running_006()) + + + } +} diff --git a/ATS/core_language/23_timer_operations/2305_the_running_timer_operation/Sem_2305_timer_running_001.ttcn b/ATS/core_language/23_timer_operations/2305_the_running_timer_operation/Sem_2305_timer_running_001.ttcn new file mode 100644 index 00000000..e858216e --- /dev/null +++ b/ATS/core_language/23_timer_operations/2305_the_running_timer_operation/Sem_2305_timer_running_001.ttcn @@ -0,0 +1,31 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:23.5, Ensure timer running any timer identifier works + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +// #reqname /Requirements/23 Timer operations/23.5 The Running timer operation/The any keyword may be used to check if any timer started on a component or module control is running + + +module Sem_2305_timer_running_001 { + type component TComp{ + timer t_timer[2] := {1.0, 1.0}; + } + testcase TC_Sem_2305_timer_running_001() runs on TComp{ + t_timer[0].start; + t_timer[1].start; + all timer.stop; + if (any timer.running){ + setverdict(fail); + stop; + } + setverdict(pass); + + } + control{ + + execute(TC_Sem_2305_timer_running_001()) + + + } +} diff --git a/ATS/core_language/23_timer_operations/2305_the_running_timer_operation/Sem_2305_timer_running_002.ttcn b/ATS/core_language/23_timer_operations/2305_the_running_timer_operation/Sem_2305_timer_running_002.ttcn new file mode 100644 index 00000000..32f4f524 --- /dev/null +++ b/ATS/core_language/23_timer_operations/2305_the_running_timer_operation/Sem_2305_timer_running_002.ttcn @@ -0,0 +1,25 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:23.5, Ensure timer running operation works + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +// #reqname /Requirements/23 Timer operations/23.5 The Running timer operation/The operation returns the value true if the timer is listed on the running list, false otherwise. + + +module Sem_2305_timer_running_002 { + type component TComp{ + timer t_timer := 1.0; + } + testcase TC_Sem_2305_timer_running_002() runs on TComp{ + t_timer.start; + if (t_timer.running){ + setverdict(pass); + } else { + setverdict(fail); + } + } + control{ + execute(TC_Sem_2305_timer_running_002()) + } +} diff --git a/ATS/core_language/23_timer_operations/2305_the_running_timer_operation/Sem_2305_timer_running_003.ttcn b/ATS/core_language/23_timer_operations/2305_the_running_timer_operation/Sem_2305_timer_running_003.ttcn new file mode 100644 index 00000000..fa4567dd --- /dev/null +++ b/ATS/core_language/23_timer_operations/2305_the_running_timer_operation/Sem_2305_timer_running_003.ttcn @@ -0,0 +1,26 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:23.5, Ensure timer running operation works + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +// #reqname /Requirements/23 Timer operations/23.5 The Running timer operation/The operation returns the value true if the timer is listed on the running list, false otherwise. + + +module Sem_2305_timer_running_003 { + type component TComp{ + timer t_timer := 1.0; + } + testcase TC_Sem_2305_timer_running_003() runs on TComp{ + t_timer.start; + t_timer.stop; + if (t_timer.running){ + setverdict(fail); + } else { + setverdict(pass); + } + } + control{ + execute(TC_Sem_2305_timer_running_003()) + } +} diff --git a/ATS/core_language/23_timer_operations/2305_the_running_timer_operation/Sem_2305_timer_running_004.ttcn b/ATS/core_language/23_timer_operations/2305_the_running_timer_operation/Sem_2305_timer_running_004.ttcn new file mode 100644 index 00000000..c97880dd --- /dev/null +++ b/ATS/core_language/23_timer_operations/2305_the_running_timer_operation/Sem_2305_timer_running_004.ttcn @@ -0,0 +1,26 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:23.5, Ensure timer running operation works + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +// #reqname /Requirements/23 Timer operations/23.5 The Running timer operation/The operation returns the value true if the timer is listed on the running list, false otherwise. +// #reqname /Requirements/23 Timer operations/23.7 Summary of use of any and all with timers/Allow any timer.running + +module Sem_2305_timer_running_004 { + type component TComp{ + timer t_timer := 5.0; + } + testcase TC_Sem_2305_timer_running_004() runs on TComp{ + t_timer.start; + if (any timer.running){ + setverdict(pass); + } else { + setverdict(fail, "no timer running"); + } + t_timer.stop; + } + control{ + execute(TC_Sem_2305_timer_running_004()) + } +} diff --git a/ATS/core_language/23_timer_operations/2305_the_running_timer_operation/Sem_2305_timer_running_005.ttcn b/ATS/core_language/23_timer_operations/2305_the_running_timer_operation/Sem_2305_timer_running_005.ttcn new file mode 100644 index 00000000..5350f796 --- /dev/null +++ b/ATS/core_language/23_timer_operations/2305_the_running_timer_operation/Sem_2305_timer_running_005.ttcn @@ -0,0 +1,31 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:23.5, Ensure that correct number of timers from a timer array is still running + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +module Sem_2305_timer_running_005 { + type component TComp { + timer t_TimerArray[2][2] :={{3.0,3.0}, {5.0,5.0}}; + } + testcase TC_Sem_2305_timer_running_005() runs on TComp { + + var integer v_foundIndex[2]; + for (var integer i := 0; i < lengthof(t_TimerArray); i := i + 1) { + for (var integer j := 0; j < lengthof(t_TimerArray[i]); j := j + 1) { + t_TimerArray[i][j].start; + } + } + t_TimerArray[0][0].stop; + if (any from t_TimerArray.running -> @index value v_foundIndex and v_foundIndex[0] == 0 and v_foundIndex[1] == 1) { + setverdict(pass); + } else { + setverdict(fail, "wrong number of timers running"); + } + } + + control { + execute(TC_Sem_2305_timer_running_005()) + } +} diff --git a/ATS/core_language/23_timer_operations/2306_the_timeout_operation/NegSyn_2306_timer_timeout_001.ttcn b/ATS/core_language/23_timer_operations/2306_the_timeout_operation/NegSyn_2306_timer_timeout_001.ttcn new file mode 100644 index 00000000..09a35fd4 --- /dev/null +++ b/ATS/core_language/23_timer_operations/2306_the_timeout_operation/NegSyn_2306_timer_timeout_001.ttcn @@ -0,0 +1,26 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:23.6, Ensure timer timeout syntax + ** @verdict pass reject + ***************************************************/ +// #reqname /Requirements/23 Timer operations/23.6 The Timeout operation/Timer Timeout syntax + + +module NegSyn_2306_timer_timeout_001 { + type component TComp{ + timer t_timer[2] := {1.0, 1.0}; + } + testcase TC_NegSyn_2306_timer_timeout_001() runs on TComp{ + t_timer[0].start; + t_timer[1].start; + t_timer[].timeout; + + } + control{ + + execute(TC_NegSyn_2306_timer_timeout_001()) + + + } +} diff --git a/ATS/core_language/23_timer_operations/2306_the_timeout_operation/NegSyn_2306_timer_timeout_002.ttcn b/ATS/core_language/23_timer_operations/2306_the_timeout_operation/NegSyn_2306_timer_timeout_002.ttcn new file mode 100644 index 00000000..a23bcf42 --- /dev/null +++ b/ATS/core_language/23_timer_operations/2306_the_timeout_operation/NegSyn_2306_timer_timeout_002.ttcn @@ -0,0 +1,30 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:23.6, Ensure timer timeout can`t be used in boolean expressions + ** @verdict pass reject + ***************************************************/ +// #reqname /Requirements/23 Timer operations/23.6 The Timeout operation/The timeout shall not be used in a boolean expression. + + +module NegSyn_2306_timer_timeout_002 { + type component TComp{ + timer t_timer[2] := {1.0, 1.1}; + } + + testcase TC_NegSyn_2306_timer_timeout_002() runs on TComp{ + t_timer[0].start; + if (t_timer[0].timeout){ + setverdict(fail); + } + setverdict(pass); + + + } + control{ + + execute(TC_NegSyn_2306_timer_timeout_002()) + + + } +} diff --git a/ATS/core_language/23_timer_operations/2306_the_timeout_operation/NegSyn_2306_timer_timeout_003.ttcn b/ATS/core_language/23_timer_operations/2306_the_timeout_operation/NegSyn_2306_timer_timeout_003.ttcn new file mode 100644 index 00000000..a61c372d --- /dev/null +++ b/ATS/core_language/23_timer_operations/2306_the_timeout_operation/NegSyn_2306_timer_timeout_003.ttcn @@ -0,0 +1,25 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:23.6, Ensure timer timeout syntax + ** @verdict pass reject + ***************************************************/ +// #reqname /Requirements/23 Timer operations/23.6 The Timeout operation/Timer Timeout syntax + + +module NegSyn_2306_timer_timeout_003 { + type component TComp{ + timer t_timer := 1.0; + } + testcase TC_NegSyn_2306_timer_timeout_003() runs on TComp{ + t_timer.start; + t_timer.timeout(); + + } + control{ + + execute(TC_NegSyn_2306_timer_timeout_003()) + + + } +} diff --git a/ATS/core_language/23_timer_operations/2306_the_timeout_operation/NegSyn_2306_timer_timeout_004.ttcn b/ATS/core_language/23_timer_operations/2306_the_timeout_operation/NegSyn_2306_timer_timeout_004.ttcn new file mode 100644 index 00000000..d0803231 --- /dev/null +++ b/ATS/core_language/23_timer_operations/2306_the_timeout_operation/NegSyn_2306_timer_timeout_004.ttcn @@ -0,0 +1,24 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:23.6, Ensure timer timeout syntax + ** @verdict pass reject + ***************************************************/ +// #reqname /Requirements/23 Timer operations/23.6 The Timeout operation/Timer Timeout syntax + +module NegSyn_2306_timer_timeout_004 { + type component TComp{ + timer t_timer := 1.0; + } + testcase TC_NegSyn_2306_timer_timeout_004() runs on TComp{ + t_timer.start; + any timer.timeout(); + + } + control{ + + execute(TC_NegSyn_2306_timer_timeout_004()) + + + } +} diff --git a/ATS/core_language/23_timer_operations/2306_the_timeout_operation/NegSyn_2306_timer_timeout_005.ttcn b/ATS/core_language/23_timer_operations/2306_the_timeout_operation/NegSyn_2306_timer_timeout_005.ttcn new file mode 100644 index 00000000..5cfb392e --- /dev/null +++ b/ATS/core_language/23_timer_operations/2306_the_timeout_operation/NegSyn_2306_timer_timeout_005.ttcn @@ -0,0 +1,25 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:23.6, Ensure timer timeout syntax + ** @verdict pass reject + ***************************************************/ +// #reqname /Requirements/23 Timer operations/23.6 The Timeout operation/Timer Timeout syntax + + +module NegSyn_2306_timer_timeout_005 { + type component TComp{ + timer t_timer := 1.0; + } + testcase TC_NegSyn_2306_timer_timeout_005() runs on TComp{ + t_timer.start; + any timer timeout; + + } + control{ + + execute(TC_NegSyn_2306_timer_timeout_005()) + + + } +} diff --git a/ATS/core_language/23_timer_operations/2306_the_timeout_operation/NegSyn_2306_timer_timeout_006.ttcn b/ATS/core_language/23_timer_operations/2306_the_timeout_operation/NegSyn_2306_timer_timeout_006.ttcn new file mode 100644 index 00000000..52c6eafb --- /dev/null +++ b/ATS/core_language/23_timer_operations/2306_the_timeout_operation/NegSyn_2306_timer_timeout_006.ttcn @@ -0,0 +1,25 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:23.6, Ensure timer timeout syntax + ** @verdict pass reject + ***************************************************/ +// #reqname /Requirements/23 Timer operations/23.6 The Timeout operation/Timer Timeout syntax + + +module NegSyn_2306_timer_timeout_006 { + type component TComp{ + timer t_timer := 1.0; + } + testcase TC_NegSyn_2306_timer_timeout_006() runs on TComp{ + t_timer.start; + timeout(t_timer); + + } + control{ + + execute(TC_NegSyn_2306_timer_timeout_006()) + + + } +} diff --git a/ATS/core_language/23_timer_operations/2306_the_timeout_operation/NegSyn_2306_timer_timeout_007.ttcn b/ATS/core_language/23_timer_operations/2306_the_timeout_operation/NegSyn_2306_timer_timeout_007.ttcn new file mode 100644 index 00000000..cb6d23e0 --- /dev/null +++ b/ATS/core_language/23_timer_operations/2306_the_timeout_operation/NegSyn_2306_timer_timeout_007.ttcn @@ -0,0 +1,25 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:23.6, Ensure timer timeout syntax + ** @verdict pass reject + ***************************************************/ +// #reqname /Requirements/23 Timer operations/23.6 The Timeout operation/Timer Timeout syntax +// #reqname /Requirements/23 Timer operations/23.7 Summary of use of any and all with timers/Disallow all timer.timeout + +module NegSyn_2306_timer_timeout_007 { + type component TComp{ + timer t_timer := 1.0; + } + testcase TC_NegSyn_2306_timer_timeout_006() runs on TComp{ + t_timer.start; + all timer.timeout; + + } + control{ + + execute(TC_NegSyn_2306_timer_timeout_006()) + + + } +} diff --git a/ATS/core_language/23_timer_operations/2306_the_timeout_operation/Sem_2306_timer_timeout_001.ttcn b/ATS/core_language/23_timer_operations/2306_the_timeout_operation/Sem_2306_timer_timeout_001.ttcn new file mode 100644 index 00000000..ff016a5e --- /dev/null +++ b/ATS/core_language/23_timer_operations/2306_the_timeout_operation/Sem_2306_timer_timeout_001.ttcn @@ -0,0 +1,33 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:23.6, Ensure timer timeout operations: non-started timer does not timeout + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +// #reqname /Requirements/23 Timer operations/23.6 The Timeout operation/Timeout operational semantics/Timeout unstarted timer + + +module Sem_2306_timer_timeout_001 { + type component TComp{ + timer t_unstarted_timer; + timer t_started_timer := 2.0; + } + testcase TC_Sem_2306_timer_timeout_001() runs on TComp{ + t_started_timer.start; + alt + { + [] t_unstarted_timer.timeout { + setverdict(fail); + } + [] t_started_timer.timeout { + setverdict(pass); + } + } + } + control{ + + execute(TC_Sem_2306_timer_timeout_001()) + + + } +} diff --git a/ATS/core_language/23_timer_operations/2306_the_timeout_operation/Sem_2306_timer_timeout_002.ttcn b/ATS/core_language/23_timer_operations/2306_the_timeout_operation/Sem_2306_timer_timeout_002.ttcn new file mode 100644 index 00000000..4cc140ea --- /dev/null +++ b/ATS/core_language/23_timer_operations/2306_the_timeout_operation/Sem_2306_timer_timeout_002.ttcn @@ -0,0 +1,36 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:23.6, Ensure timer timeout operations: timed-out timer does not timeout until restarted + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +// #reqname /Requirements/23 Timer operations/23.6 The Timeout operation/Timeout operational semantics/Timeout a timer that is already timed out + + +module Sem_2306_timer_timeout_002 { + type component TComp{ + timer t_timedout_timer := 0.5; + timer t_aux := 2.0; + } + testcase TC_Sem_2306_timer_timeout_002() runs on TComp{ + t_timedout_timer.start; + t_timedout_timer.timeout ; + + t_aux.start; + alt + { + [] t_timedout_timer.timeout { + setverdict(fail); + } + [] t_aux.timeout { + setverdict(pass); + } + } + } + control{ + + execute(TC_Sem_2306_timer_timeout_002()) + + + } +} diff --git a/ATS/core_language/23_timer_operations/2306_the_timeout_operation/Sem_2306_timer_timeout_003.ttcn b/ATS/core_language/23_timer_operations/2306_the_timeout_operation/Sem_2306_timer_timeout_003.ttcn new file mode 100644 index 00000000..33bcd563 --- /dev/null +++ b/ATS/core_language/23_timer_operations/2306_the_timeout_operation/Sem_2306_timer_timeout_003.ttcn @@ -0,0 +1,54 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:23.6, Ensure timer timeout happen in order from the shortest to the longest + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +// #reqname /Requirements/23 Timer operations/23.6 The Timeout operation/Timeout operational semantics/Timeout started timer +// #reqname /Requirements/23 Timer operations/23.6 The Timeout operation/The timeout can be used as alternative in alt + +module Sem_2306_timer_timeout_003 { + type component TComp{ + timer t_short, t_medium, t_long; + } + testcase TC_Sem_2306_timer_timeout_003() runs on TComp{ + t_long.start(3.0); + t_medium.start(2.0); + t_short.start(1.0); + + alt + { + [] t_long.timeout { + setverdict(fail, + "Timer started for 3 seconds expired earlier than the timer started for 1 second"); + stop; + } + [] t_medium.timeout { + setverdict(fail, + "Timer started for 2 seconds expired earlier than the timer started for 1 second"); + stop; + } + [] t_short.timeout { + setverdict(pass); + } + } + alt + { + [] t_long.timeout { + setverdict(fail, + "Timer started for 3 seconds expired earlier than the timer started for 2 second"); + stop; + } + [] t_medium.timeout { + setverdict(pass); + } + } + t_long.timeout; + } + control{ + + execute(TC_Sem_2306_timer_timeout_003()) + + + } +} diff --git a/ATS/core_language/23_timer_operations/2306_the_timeout_operation/Sem_2306_timer_timeout_004.ttcn b/ATS/core_language/23_timer_operations/2306_the_timeout_operation/Sem_2306_timer_timeout_004.ttcn new file mode 100644 index 00000000..fb814b74 --- /dev/null +++ b/ATS/core_language/23_timer_operations/2306_the_timeout_operation/Sem_2306_timer_timeout_004.ttcn @@ -0,0 +1,37 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:23.6, Ensure any timer.timeout operation + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +// #reqname /Requirements/23 Timer operations/23.6 The Timeout operation//Requirements/23 Timer operations/23.6 The Timeout operation/The any keyword used with the timeout operation succeeds if the timeout-list is not empty./Wait for timers in scope of the alt +// #reqname /Requirements/23 Timer operations/23.6 The Timeout operation/The any keyword used with the timeout operation succeeds if the timeout-list is not empty./Wait for timers in scope of the alt +// #reqname /Requirements/23 Timer operations/23.7 Summary of use of any and all with timers/Allow any timer.timeout + + +module Sem_2306_timer_timeout_004 { + type component TComp{ + timer t_timer[2] := {1.0, 1.1}; + } + altstep a_step() runs on TComp{ + [] any timer.timeout { + setverdict(pass); + } + } + testcase TC_Sem_2306_timer_timeout_004() runs on TComp{ + t_timer[0].start; + t_timer[1].start; + a_step(); + a_step(); + if (t_timer[0].running or t_timer[1].running){ + setverdict(fail); + } + setverdict(pass); + } + control{ + + execute(TC_Sem_2306_timer_timeout_004()) + + + } +} diff --git a/ATS/core_language/23_timer_operations/2306_the_timeout_operation/Sem_2306_timer_timeout_005.ttcn b/ATS/core_language/23_timer_operations/2306_the_timeout_operation/Sem_2306_timer_timeout_005.ttcn new file mode 100644 index 00000000..d3cd22b8 --- /dev/null +++ b/ATS/core_language/23_timer_operations/2306_the_timeout_operation/Sem_2306_timer_timeout_005.ttcn @@ -0,0 +1,65 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:23.6, Ensure any timer.timeout operation for timeouts that are not in scope + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +// #reqname /Requirements/23 Timer operations/23.6 The Timeout operation/The any keyword used with the timeout operation succeeds if the timeout-list is not empty./Any timer ignores timeouts in other components +// #reqname /Requirements/23 Timer operations/23.7 Summary of use of any and all with timers/Allow any timer.timeout + +module Sem_2306_timer_timeout_005 { + const float PTC_TIMEOUT := 1.0; + + type port MyPort message { inout charstring }; + + type component System {} + + type component MTC { + port MyPort signalPort; + } + + type component PTC { + port MyPort signalPort; + } + function f_wait_for_mtc_timeout() runs on PTC + { + timer t_timer := PTC_TIMEOUT; + t_timer.start; + + alt { + [] signalPort.receive { + // any timer.timeout happend in MTC + setverdict(fail, "MTC detected timeout happened in PTC -- it is wrong!"); + } + [] t_timer.timeout { + setverdict(pass); + signalPort.send("I'm timed out!"); + } + } + } + + altstep a_step() runs on MTC { + [] any timer.timeout { + setverdict(fail, "MTC detected timeout happened in PTC -- it is wrong!"); + signalPort.send("I saw your timeout?"); + } + [] signalPort.receive { + // PTC timer out + setverdict(pass); + } + } + + testcase TC_Sem_2306_timer_timeout_005() runs on MTC system System{ + var PTC ptc := PTC.create; + connect(ptc:signalPort, mtc:signalPort); + ptc.start(f_wait_for_mtc_timeout()); + + a_step(); + } + control{ + + execute(TC_Sem_2306_timer_timeout_005()) + + + } +} diff --git a/ATS/core_language/23_timer_operations/2306_the_timeout_operation/Sem_2306_timer_timeout_006.ttcn b/ATS/core_language/23_timer_operations/2306_the_timeout_operation/Sem_2306_timer_timeout_006.ttcn new file mode 100644 index 00000000..6b9e46f1 --- /dev/null +++ b/ATS/core_language/23_timer_operations/2306_the_timeout_operation/Sem_2306_timer_timeout_006.ttcn @@ -0,0 +1,61 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:23.6, Ensure any timer.timeout operation handles timeout of any timer in the component, not only visible from a function or altstep + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +// #reqname /Requirements/23 Timer operations/23.6 The Timeout operation/The any keyword used with the timeout operation succeeds if the timeout-list is not empty./Wait for timers that are outside of scope +// #reqname /Requirements/23 Timer operations/23.7 Summary of use of any and all with timers/Allow any timer.timeout + +module Sem_2306_timer_timeout_006 { + const float PTC_TIMEOUT := 5.0; + + type port MyPort message { inout charstring }; + + type component System {} + + type component MTC { + port MyPort signalPort; + } + + type component PTC { + port MyPort signalPort; + } + function f_ptc1() runs on PTC + { + timer t_timer := PTC_TIMEOUT; + t_timer.start; + + t_timer.timeout; + setverdict(fail, "The component was expected to be killed before this point"); + signalPort.send("I'm timed out!"); + } + + altstep a_step() runs on MTC { + [] any timer.timeout { + setverdict(pass); + } + [] signalPort.receive { + // PTC timer out + setverdict(fail, "Any timer.timeout failed to see the timer outside altstep scope"); + } + } + + testcase TC_Sem_2306_timer_timeout_006() runs on MTC system System{ + var PTC ptc := PTC.create; + timer t_timer; + connect(ptc:signalPort, mtc:signalPort); + ptc.start(f_ptc1()); + + // Start a timer outside of the scope of a_step + t_timer.start(1.0); + a_step(); + ptc.kill; + } + control{ + + execute(TC_Sem_2306_timer_timeout_006()) + + + } +} diff --git a/ATS/core_language/23_timer_operations/2306_the_timeout_operation/Sem_2306_timer_timeout_007.ttcn b/ATS/core_language/23_timer_operations/2306_the_timeout_operation/Sem_2306_timer_timeout_007.ttcn new file mode 100644 index 00000000..ac57ab3e --- /dev/null +++ b/ATS/core_language/23_timer_operations/2306_the_timeout_operation/Sem_2306_timer_timeout_007.ttcn @@ -0,0 +1,37 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:23.6, Ensure timer timeout happen in order from the shortest to the longest + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +// #reqname /Requirements/23 Timer operations/23.6 The Timeout operation/The timeout can be used as a standalone statement + +module Sem_2306_timer_timeout_007 { + type component TComp{ + timer t_short, t_medium, t_long; + } + testcase TC_Sem_2306_timer_timeout_007() runs on TComp{ + t_long.start(3.0); + t_medium.start(2.0); + t_short.start(1.0); + + t_medium.timeout; + if (t_short.running) + { + setverdict(fail, "The timer has expired too early"); + stop; + } + if (not t_long.running) + { + setverdict(fail, "The timer has expired too late"); + stop; + } + setverdict(pass); + } + control{ + + execute(TC_Sem_2306_timer_timeout_007()) + + + } +} diff --git a/ATS/core_language/23_timer_operations/2306_the_timeout_operation/Sem_2306_timer_timeout_008.ttcn b/ATS/core_language/23_timer_operations/2306_the_timeout_operation/Sem_2306_timer_timeout_008.ttcn new file mode 100644 index 00000000..eec5bc30 --- /dev/null +++ b/ATS/core_language/23_timer_operations/2306_the_timeout_operation/Sem_2306_timer_timeout_008.ttcn @@ -0,0 +1,35 @@ +/*************************************************** + ** @author STF 470, corrected by STF 487 + ** @version 0.0.1 + ** @purpose 1:23.6, Ensure that timeout of a timer from a timer array works correctly + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +module Sem_2306_timer_timeout_008 { + type component TComp{ + timer t_TimerArray[2][2] :={{0.5, 1.0}, {5.0, 5.5}}; + } + testcase TC_Sem_2306_timer_timeout_008() runs on TComp{ + var integer v_foundIndex[2]; + for (var integer i := 0; i < lengthof(t_TimerArray); i := i + 1) { + for (var integer j := 0; j < lengthof(t_TimerArray[i]); j := j + 1) { + t_TimerArray[i][j].start; + } + } + t_TimerArray[0][0].stop; + + any from t_TimerArray.timeout -> @index value v_foundIndex; + if(v_foundIndex[0] == 0 and v_foundIndex[1] == 1){ + setverdict(pass); + } else { + setverdict(fail, "wrong number of timers with timeout"); + } + + } + control{ + + execute(TC_Sem_2306_timer_timeout_008(), 5.0) + + + } +} diff --git a/ATS/core_language/23_timer_operations/2306_the_timeout_operation/Sem_2306_timer_timeout_009.ttcn b/ATS/core_language/23_timer_operations/2306_the_timeout_operation/Sem_2306_timer_timeout_009.ttcn new file mode 100644 index 00000000..01c75342 --- /dev/null +++ b/ATS/core_language/23_timer_operations/2306_the_timeout_operation/Sem_2306_timer_timeout_009.ttcn @@ -0,0 +1,26 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:23.6, removing random timeout when using any timer.timeout + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +module Sem_2306_timer_timeout_009 { + + type component TComp{ + timer t_tmr := 0.5; + } + + testcase TC_Sem_2306_timer_timeout_009() runs on TComp{ + t_tmr.start; + any timer.timeout; // it should remove t_tmr timeout from the timeout table + alt { + [] t_tmr.timeout { setverdict(fail, "Timeout not removed by any timer.timeout"); } + [else] { setverdict(pass); } + } + } + + control { + execute(TC_Sem_2306_timer_timeout_009(), 5.0) + } +} diff --git a/ATS/core_language/23_timer_operations/2306_the_timeout_operation/Syn_2306_timer_timeout_001.ttcn b/ATS/core_language/23_timer_operations/2306_the_timeout_operation/Syn_2306_timer_timeout_001.ttcn new file mode 100644 index 00000000..52e1e6cc --- /dev/null +++ b/ATS/core_language/23_timer_operations/2306_the_timeout_operation/Syn_2306_timer_timeout_001.ttcn @@ -0,0 +1,42 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:23.5, Ensure timer runnig syntax + ** @verdict pass accept, noexecution + ***************************************************/ +// #reqname /Requirements/23 Timer operations/23.5 The Running timer operation/Timer running syntax + +module Syn_2306_timer_timeout_001 +{ + type component TComp {} + + testcase TC_Syn_2306_timer_timeout_001() runs on TComp + { + var boolean v_bool; + timer t_timer := 0.1; + timer t_array[3] := { 1.0, 2.0, 3.0 } + + t_timer.start; + if (t_timer.running) + { + t_array[0].start; + if (t_array[0].running) + { + v_bool := t_array[1].running; + } + } + + v_bool := any timer.running; + if (any timer.running and true) + { + } + if (not any timer.running) + { + } + } + + control{ + execute(TC_Syn_2306_timer_timeout_001()) + } + +} diff --git a/ATS/core_language/23_timer_operations/23_toplevel/NegSem_23_toplevel_001.ttcn b/ATS/core_language/23_timer_operations/23_toplevel/NegSem_23_toplevel_001.ttcn new file mode 100644 index 00000000..62233bc1 --- /dev/null +++ b/ATS/core_language/23_timer_operations/23_toplevel/NegSem_23_toplevel_001.ttcn @@ -0,0 +1,25 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:23, Ensure timer operations are not allowed outside of module control, test case, function, altstep + ** @verdict pass reject + ***************************************************/ +// #reqname /Requirements/23 Timer operations/Usage of timers is allowed in test cases, functions, altsteps, module control/Timer read is not allowed in component definitions +module NegSem_23_toplevel_001 +{ + type component TComp + { + timer t_timer1 := 1.0; + timer t_timer2 := t_timer1.read; + } + + testcase TC_NegSem_23_toplevel_001() runs on TComp + { + log("Value of t_timer2.read before starting it", t_timer2.read); + } + + control + { + execute(TC_NegSem_23_toplevel_001()) + } +} diff --git a/ATS/core_language/23_timer_operations/23_toplevel/NegSem_23_toplevel_002.ttcn b/ATS/core_language/23_timer_operations/23_toplevel/NegSem_23_toplevel_002.ttcn new file mode 100644 index 00000000..d29edffb --- /dev/null +++ b/ATS/core_language/23_timer_operations/23_toplevel/NegSem_23_toplevel_002.ttcn @@ -0,0 +1,25 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:23, Ensure timer operations are not allowed outside of module control, test case, function, altstep + ** @verdict pass reject + ***************************************************/ +// #reqname /Requirements/23 Timer operations/Usage of timers is allowed in test cases, functions, altsteps, module control/Timer running is not allowed in component definitions +module NegSem_23_toplevel_002 +{ + type component TComp + { + timer t_timer1 := 1.0; + var boolean v_bool := t_timer1.running; + } + + testcase TC_NegSem_23_toplevel_002() runs on TComp + { + log("Value of timer.running before starting it", v_bool); + } + + control + { + execute(TC_NegSem_23_toplevel_002()) + } +} diff --git a/ATS/core_language/23_timer_operations/23_toplevel/NegSyn_23_toplevel_001.ttcn b/ATS/core_language/23_timer_operations/23_toplevel/NegSyn_23_toplevel_001.ttcn new file mode 100644 index 00000000..d9ff619c --- /dev/null +++ b/ATS/core_language/23_timer_operations/23_toplevel/NegSyn_23_toplevel_001.ttcn @@ -0,0 +1,12 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:23, Ensure timer operations are not allowed outside of module control, test case, function, altstep + ** @verdict pass reject + ***************************************************/ +// #reqname /Requirements/23 Timer operations/Usage of timers is allowed in test cases, functions, altsteps, module control/Timer stop is not allowed in module definitions + +module NegSyn_23_toplevel_001 +{ + all timer.stop; +} diff --git a/ATS/core_language/23_timer_operations/23_toplevel/NegSyn_23_toplevel_002.ttcn b/ATS/core_language/23_timer_operations/23_toplevel/NegSyn_23_toplevel_002.ttcn new file mode 100644 index 00000000..9039ca22 --- /dev/null +++ b/ATS/core_language/23_timer_operations/23_toplevel/NegSyn_23_toplevel_002.ttcn @@ -0,0 +1,12 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:23, Ensure timer operations are not allowed outside of module control, test case, function, altstep + ** @verdict pass reject + ***************************************************/ +// #reqname /Requirements/23 Timer operations/Usage of timers is allowed in test cases, functions, altsteps, module control/Timer timeout operation is not allowed in module definitions + +module NegSyn_23_toplevel_002 +{ + any timer.timeout; +} diff --git a/ATS/core_language/23_timer_operations/23_toplevel/Syn_23_toplevel_001.ttcn b/ATS/core_language/23_timer_operations/23_toplevel/Syn_23_toplevel_001.ttcn new file mode 100644 index 00000000..dad5d1b8 --- /dev/null +++ b/ATS/core_language/23_timer_operations/23_toplevel/Syn_23_toplevel_001.ttcn @@ -0,0 +1,78 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:23, Ensure timer allowed in module control, test case, function, altstep + ** @verdict pass accept, noexecution + ***************************************************/ +// #reqname /Requirements/23 Timer operations/Usage of timers is allowed in test cases, functions, altsteps, module control/Positive syntax test + +module Syn_23_toplevel_001 +{ + type port MyPort message + { + inout integer; + } + + type component TComp + { + port MyPort p_port; + } + + function f_function() + { + var float v_float; + timer t_timer; + + t_timer.start(1.0); + v_float := t_timer.read; + if (t_timer.running) + { + t_timer.timeout; + } + t_timer.stop; + } + + altstep a_step() runs on TComp + { + [] p_port.receive { + var float v_float; + timer t_timer; + + t_timer.start(1.0); + v_float := t_timer.read; + if (t_timer.running) + { + t_timer.timeout; + } + t_timer.stop; + } + } + + testcase TC_Syn_23_toplevel_001() runs on TComp + { + var float v_float; + timer t_timer; + + t_timer.start(1.0); + v_float := t_timer.read; + if (t_timer.running) + { + t_timer.timeout; + } + t_timer.stop; + } + + control + { + var float v_float; + timer t_timer; + + t_timer.start(1.0); + v_float := t_timer.read; + if (t_timer.running) + { + t_timer.timeout; + } + t_timer.stop; + } +} diff --git a/ATS/core_language/23_timer_operations/23_toplevel/Syn_23_toplevel_002.ttcn b/ATS/core_language/23_timer_operations/23_toplevel/Syn_23_toplevel_002.ttcn new file mode 100644 index 00000000..165350c4 --- /dev/null +++ b/ATS/core_language/23_timer_operations/23_toplevel/Syn_23_toplevel_002.ttcn @@ -0,0 +1,78 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:23, Ensure timer allowed in module control, test case, function, altstep + ** @verdict pass accept, noexecution + ***************************************************/ +// #reqname /Requirements/23 Timer operations/Usage of timers is allowed in test cases, functions, altsteps, module control/Positive syntax test + +module Syn_23_toplevel_002 +{ + type port MyPort message + { + inout integer; + } + + type component TComp + { + port MyPort p_port; + } + + function f_function() + { + var float v_float; + timer t_timer[5] := {1.0, 2.0, 3.0, 4.0, 5.0}; + + t_timer[0].start(1.0); + v_float := t_timer[1].read; + if (t_timer[2].running) + { + t_timer[3].timeout; + } + t_timer[4].stop; + } + + altstep a_step() runs on TComp + { + timer t_timer[5] := {1.0, 2.0, 3.0, 4.0, 5.0}; + [] p_port.receive { + var float v_float; + + t_timer[0].start(1.0); + v_float := t_timer[1].read; + if (t_timer[2].running) + { + t_timer[3].timeout; + } + t_timer[4].stop; + } + } + + testcase TC_Syn_23_toplevel_002() runs on TComp + { + var float v_float; + timer t_timer[5] := {1.0, 2.0, 3.0, 4.0, 5.0}; + + t_timer[0].start(1.0); + v_float := t_timer[1].read; + if (t_timer[2].running) + { + t_timer[3].timeout; + } + t_timer[4].stop; + } + + control + { + var float v_float; + timer t_timer[5] := {1.0, 2.0, 3.0, 4.0, 5.0}; + + t_timer[0].start(1.0); + v_float := t_timer[1].read; + if (t_timer[2].running) + { + t_timer[3].timeout; + } + t_timer[4].stop; + } +} diff --git a/ATS/core_language/24_test_verdict_operations/2401_the_verdict_mechanism/NOTES b/ATS/core_language/24_test_verdict_operations/2401_the_verdict_mechanism/NOTES new file mode 100644 index 00000000..05f826b2 --- /dev/null +++ b/ATS/core_language/24_test_verdict_operations/2401_the_verdict_mechanism/NOTES @@ -0,0 +1,11 @@ +Tests Sem_2401_GlobalVerdict_xxx validate the following requirements: + there is a global test case verdict instantiated and handled by the test system that is + updated when each test component (i.e. the MTC and each and every PTC) + terminates execution (see figure 14). + ... The test case verdict is implicitly updated on the termination of a test + component. The effect of this implicit operation shall also follow the overwriting rules listed in table 30 + ... The value of this verdict shall be returned by the test case when it terminates execution. + +Tests Sem_2401_LocalVerdict_xxx validate the following requirements: + When changing the value of the local verdict (i.e. using the setverdict operation) the effect of this change shall + follow the overwriting rules listed in table 30. diff --git a/ATS/core_language/24_test_verdict_operations/2401_the_verdict_mechanism/NegSem_2401_SetverdictError.ttcn b/ATS/core_language/24_test_verdict_operations/2401_the_verdict_mechanism/NegSem_2401_SetverdictError.ttcn new file mode 100644 index 00000000..3e0fa9b6 --- /dev/null +++ b/ATS/core_language/24_test_verdict_operations/2401_the_verdict_mechanism/NegSem_2401_SetverdictError.ttcn @@ -0,0 +1,35 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:24.1, Ensure that setverdict can't set error verdict + ** @verdict pass reject, manual:"Ensure only one test case was executed " + *****************************************************************/ +/* + * #reqname /Requirements/24 Test verdict operations/24.1 The Verdict mechanism/Error verdict shall not be set with setverdict + **/ + +module NegSem_2401_SetverdictError_001 { + type component GeneralComp {}; + + testcase TC_NegSem_2401_SetverdictError_001_setverdict(out boolean pb_error_occurred) runs on GeneralComp { + pb_error_occurred := true; + setverdict(error); + // Must abort here + pb_error_occurred := false; + setverdict(pass) + } + + testcase TC_NegSem_2401_SetverdictError_001_check_error_occured(boolean b_error_occurred) runs on GeneralComp { + if (b_error_occurred) { + setverdict(pass); + } else { + setverdict(fail) + } + } + + control { + var boolean b_error_occurred := true; + execute(TC_NegSem_2401_SetverdictError_001_setverdict(b_error_occurred)); + execute(TC_NegSem_2401_SetverdictError_001_check_error_occured(b_error_occurred)); + } +} \ No newline at end of file diff --git a/ATS/core_language/24_test_verdict_operations/2401_the_verdict_mechanism/Sem_2401_GlobalVerdict_001.ttcn b/ATS/core_language/24_test_verdict_operations/2401_the_verdict_mechanism/Sem_2401_GlobalVerdict_001.ttcn new file mode 100644 index 00000000..32c4c736 --- /dev/null +++ b/ATS/core_language/24_test_verdict_operations/2401_the_verdict_mechanism/Sem_2401_GlobalVerdict_001.ttcn @@ -0,0 +1,37 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.2 + ** @purpose 1:24.1, Ensure overwriting rules for global verdict: pass can overwrite none. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +/* + * #reqname /Requirements/24 Test verdict operations/24.1 The Verdict mechanism/Overwriting rules for setverdict + **/ + + +module Sem_2401_GlobalVerdict_001 { + type component GeneralComp {} + + function set_PTC_verdict_none() runs on GeneralComp { + setverdict(none); + } + + function set_PTC_verdict_pass() runs on GeneralComp { + setverdict(pass); + } + + testcase TC_Sem_2401_GlobalVerdict_001() runs on GeneralComp system GeneralComp { + var GeneralComp PTC1, PTC2; + + PTC1 := GeneralComp.create; + PTC2 := GeneralComp.create; + PTC1.start(set_PTC_verdict_none()); + PTC2.start(set_PTC_verdict_pass()); + all component.done; + // Verdict pass can overwrite none + } + + control{ + execute(TC_Sem_2401_GlobalVerdict_001()); + } +} diff --git a/ATS/core_language/24_test_verdict_operations/2401_the_verdict_mechanism/Sem_2401_GlobalVerdict_002.ttcn b/ATS/core_language/24_test_verdict_operations/2401_the_verdict_mechanism/Sem_2401_GlobalVerdict_002.ttcn new file mode 100644 index 00000000..cc560f8f --- /dev/null +++ b/ATS/core_language/24_test_verdict_operations/2401_the_verdict_mechanism/Sem_2401_GlobalVerdict_002.ttcn @@ -0,0 +1,37 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.2 + ** @purpose 1:24.1, Ensure overwriting rules for global verdict: inconc can overwrite none. + ** @verdict pass accept, ttcn3verdict:inconc + *****************************************************************/ +/* + * #reqname /Requirements/24 Test verdict operations/24.1 The Verdict mechanism/Overwriting rules for setverdict + **/ + + +module Sem_2401_GlobalVerdict_002 { + type component GeneralComp {} + + function set_PTC_verdict_none() runs on GeneralComp { + setverdict(none); + } + + function set_PTC_verdict_inconc() runs on GeneralComp { + setverdict(inconc); + } + + testcase TC_Sem_2401_GlobalVerdict_002() runs on GeneralComp system GeneralComp { + var GeneralComp PTC1, PTC2; + + PTC1 := GeneralComp.create; + PTC2 := GeneralComp.create; + PTC1.start(set_PTC_verdict_none()); + PTC2.start(set_PTC_verdict_inconc()); + all component.done; + // Verdict inconc can overwrite none + } + + control{ + execute(TC_Sem_2401_GlobalVerdict_002()); + } +} diff --git a/ATS/core_language/24_test_verdict_operations/2401_the_verdict_mechanism/Sem_2401_GlobalVerdict_003.ttcn b/ATS/core_language/24_test_verdict_operations/2401_the_verdict_mechanism/Sem_2401_GlobalVerdict_003.ttcn new file mode 100644 index 00000000..66fbf228 --- /dev/null +++ b/ATS/core_language/24_test_verdict_operations/2401_the_verdict_mechanism/Sem_2401_GlobalVerdict_003.ttcn @@ -0,0 +1,37 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.2 + ** @purpose 1:24.1, Ensure overwriting rules for global verdict: fail can overwrite none. + ** @verdict pass accept, ttcn3verdict:fail + *****************************************************************/ +/* + * #reqname /Requirements/24 Test verdict operations/24.1 The Verdict mechanism/Overwriting rules for setverdict + **/ + + +module Sem_2401_GlobalVerdict_003 { + type component GeneralComp {} + + function set_PTC_verdict_none() runs on GeneralComp { + setverdict(none); + } + + function set_PTC_verdict_fail() runs on GeneralComp { + setverdict(fail); + } + + testcase TC_Sem_2401_GlobalVerdict_003() runs on GeneralComp system GeneralComp { + var GeneralComp PTC1, PTC2; + + PTC1 := GeneralComp.create; + PTC2 := GeneralComp.create; + PTC1.start(set_PTC_verdict_none()); + PTC2.start(set_PTC_verdict_fail()); + all component.done; + // Verdict fail can overwrite none + } + + control{ + execute(TC_Sem_2401_GlobalVerdict_003()); + } +} diff --git a/ATS/core_language/24_test_verdict_operations/2401_the_verdict_mechanism/Sem_2401_GlobalVerdict_004.ttcn b/ATS/core_language/24_test_verdict_operations/2401_the_verdict_mechanism/Sem_2401_GlobalVerdict_004.ttcn new file mode 100644 index 00000000..05b7771e --- /dev/null +++ b/ATS/core_language/24_test_verdict_operations/2401_the_verdict_mechanism/Sem_2401_GlobalVerdict_004.ttcn @@ -0,0 +1,37 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.2 + ** @purpose 1:24.1, Ensure overwriting rules for global verdict: none can't overwrite pass. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +/* + * #reqname /Requirements/24 Test verdict operations/24.1 The Verdict mechanism/Overwriting rules for setverdict + **/ + + +module Sem_2401_GlobalVerdict_004 { + type component GeneralComp {} + + function set_PTC_verdict_pass() runs on GeneralComp { + setverdict(pass); + } + + function set_PTC_verdict_none() runs on GeneralComp { + setverdict(none); + } + + testcase TC_Sem_2401_GlobalVerdict_004() runs on GeneralComp system GeneralComp { + var GeneralComp PTC1, PTC2; + + PTC1 := GeneralComp.create; + PTC2 := GeneralComp.create; + PTC1.start(set_PTC_verdict_pass()); + PTC2.start(set_PTC_verdict_none()); + all component.done; + // Verdict none can't overwrite pass + } + + control{ + execute(TC_Sem_2401_GlobalVerdict_004()); + } +} diff --git a/ATS/core_language/24_test_verdict_operations/2401_the_verdict_mechanism/Sem_2401_GlobalVerdict_005.ttcn b/ATS/core_language/24_test_verdict_operations/2401_the_verdict_mechanism/Sem_2401_GlobalVerdict_005.ttcn new file mode 100644 index 00000000..20ffbd27 --- /dev/null +++ b/ATS/core_language/24_test_verdict_operations/2401_the_verdict_mechanism/Sem_2401_GlobalVerdict_005.ttcn @@ -0,0 +1,37 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.2 + ** @purpose 1:24.1, Ensure overwriting rules for global verdict: inconc can overwrite pass. + ** @verdict pass accept, ttcn3verdict:inconc + *****************************************************************/ +/* + * #reqname /Requirements/24 Test verdict operations/24.1 The Verdict mechanism/Overwriting rules for setverdict + **/ + + +module Sem_2401_GlobalVerdict_005 { + type component GeneralComp {} + + function set_PTC_verdict_pass() runs on GeneralComp { + setverdict(pass); + } + + function set_PTC_verdict_inconc() runs on GeneralComp { + setverdict(inconc); + } + + testcase TC_Sem_2401_GlobalVerdict_005() runs on GeneralComp system GeneralComp { + var GeneralComp PTC1, PTC2; + + PTC1 := GeneralComp.create; + PTC2 := GeneralComp.create; + PTC1.start(set_PTC_verdict_pass()); + PTC2.start(set_PTC_verdict_inconc()); + all component.done; + // Verdict inconc can overwrite pass + } + + control{ + execute(TC_Sem_2401_GlobalVerdict_005()); + } +} diff --git a/ATS/core_language/24_test_verdict_operations/2401_the_verdict_mechanism/Sem_2401_GlobalVerdict_006.ttcn b/ATS/core_language/24_test_verdict_operations/2401_the_verdict_mechanism/Sem_2401_GlobalVerdict_006.ttcn new file mode 100644 index 00000000..b881eb1a --- /dev/null +++ b/ATS/core_language/24_test_verdict_operations/2401_the_verdict_mechanism/Sem_2401_GlobalVerdict_006.ttcn @@ -0,0 +1,37 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.2 + ** @purpose 1:24.1, Ensure overwriting rules for global verdict: fail can overwrite pass. + ** @verdict pass accept, ttcn3verdict:fail + *****************************************************************/ +/* + * #reqname /Requirements/24 Test verdict operations/24.1 The Verdict mechanism/Overwriting rules for setverdict + **/ + + +module Sem_2401_GlobalVerdict_006 { + type component GeneralComp {} + + function set_PTC_verdict_pass() runs on GeneralComp { + setverdict(pass); + } + + function set_PTC_verdict_fail() runs on GeneralComp { + setverdict(fail); + } + + testcase TC_Sem_2401_GlobalVerdict_006() runs on GeneralComp system GeneralComp { + var GeneralComp PTC1, PTC2; + + PTC1 := GeneralComp.create; + PTC2 := GeneralComp.create; + PTC1.start(set_PTC_verdict_pass()); + PTC2.start(set_PTC_verdict_fail()); + all component.done; + // Verdict fail can overwrite pass + } + + control{ + execute(TC_Sem_2401_GlobalVerdict_006()); + } +} diff --git a/ATS/core_language/24_test_verdict_operations/2401_the_verdict_mechanism/Sem_2401_GlobalVerdict_007.ttcn b/ATS/core_language/24_test_verdict_operations/2401_the_verdict_mechanism/Sem_2401_GlobalVerdict_007.ttcn new file mode 100644 index 00000000..07ce5a59 --- /dev/null +++ b/ATS/core_language/24_test_verdict_operations/2401_the_verdict_mechanism/Sem_2401_GlobalVerdict_007.ttcn @@ -0,0 +1,37 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.2 + ** @purpose 1:24.1, Ensure overwriting rules for global verdict: none can't overwrite inconc. + ** @verdict pass accept, ttcn3verdict:inconc + *****************************************************************/ +/* + * #reqname /Requirements/24 Test verdict operations/24.1 The Verdict mechanism/Overwriting rules for setverdict + **/ + + +module Sem_2401_GlobalVerdict_007 { + type component GeneralComp {} + + function set_PTC_verdict_inconc() runs on GeneralComp { + setverdict(inconc); + } + + function set_PTC_verdict_none() runs on GeneralComp { + setverdict(none); + } + + testcase TC_Sem_2401_GlobalVerdict_007() runs on GeneralComp system GeneralComp { + var GeneralComp PTC1, PTC2; + + PTC1 := GeneralComp.create; + PTC2 := GeneralComp.create; + PTC1.start(set_PTC_verdict_inconc()); + PTC2.start(set_PTC_verdict_none()); + all component.done; + // Verdict none can't overwrite inconc + } + + control{ + execute(TC_Sem_2401_GlobalVerdict_007()); + } +} diff --git a/ATS/core_language/24_test_verdict_operations/2401_the_verdict_mechanism/Sem_2401_GlobalVerdict_008.ttcn b/ATS/core_language/24_test_verdict_operations/2401_the_verdict_mechanism/Sem_2401_GlobalVerdict_008.ttcn new file mode 100644 index 00000000..b492ddc0 --- /dev/null +++ b/ATS/core_language/24_test_verdict_operations/2401_the_verdict_mechanism/Sem_2401_GlobalVerdict_008.ttcn @@ -0,0 +1,37 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.2 + ** @purpose 1:24.1, Ensure overwriting rules for global verdict: pass can't overwrite inconc. + ** @verdict pass accept, ttcn3verdict:inconc + *****************************************************************/ +/* + * #reqname /Requirements/24 Test verdict operations/24.1 The Verdict mechanism/Overwriting rules for setverdict + **/ + + +module Sem_2401_GlobalVerdict_008 { + type component GeneralComp {} + + function set_PTC_verdict_inconc() runs on GeneralComp { + setverdict(inconc); + } + + function set_PTC_verdict_pass() runs on GeneralComp { + setverdict(pass); + } + + testcase TC_Sem_2401_GlobalVerdict_008() runs on GeneralComp system GeneralComp { + var GeneralComp PTC1, PTC2; + + PTC1 := GeneralComp.create; + PTC2 := GeneralComp.create; + PTC1.start(set_PTC_verdict_inconc()); + PTC2.start(set_PTC_verdict_pass()); + all component.done; + // Verdict pass can't overwrite inconc + } + + control{ + execute(TC_Sem_2401_GlobalVerdict_008()); + } +} diff --git a/ATS/core_language/24_test_verdict_operations/2401_the_verdict_mechanism/Sem_2401_GlobalVerdict_009.ttcn b/ATS/core_language/24_test_verdict_operations/2401_the_verdict_mechanism/Sem_2401_GlobalVerdict_009.ttcn new file mode 100644 index 00000000..42b8924a --- /dev/null +++ b/ATS/core_language/24_test_verdict_operations/2401_the_verdict_mechanism/Sem_2401_GlobalVerdict_009.ttcn @@ -0,0 +1,37 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.2 + ** @purpose 1:24.1, Ensure overwriting rules for global verdict: fail can overwrite inconc. + ** @verdict pass accept, ttcn3verdict:fail + *****************************************************************/ +/* + * #reqname /Requirements/24 Test verdict operations/24.1 The Verdict mechanism/Overwriting rules for setverdict + **/ + + +module Sem_2401_GlobalVerdict_009 { + type component GeneralComp {} + + function set_PTC_verdict_inconc() runs on GeneralComp { + setverdict(inconc); + } + + function set_PTC_verdict_fail() runs on GeneralComp { + setverdict(fail); + } + + testcase TC_Sem_2401_GlobalVerdict_009() runs on GeneralComp system GeneralComp { + var GeneralComp PTC1, PTC2; + + PTC1 := GeneralComp.create; + PTC2 := GeneralComp.create; + PTC1.start(set_PTC_verdict_inconc()); + PTC2.start(set_PTC_verdict_fail()); + all component.done; + // Verdict fail can overwrite inconc + } + + control{ + execute(TC_Sem_2401_GlobalVerdict_009()); + } +} diff --git a/ATS/core_language/24_test_verdict_operations/2401_the_verdict_mechanism/Sem_2401_GlobalVerdict_010.ttcn b/ATS/core_language/24_test_verdict_operations/2401_the_verdict_mechanism/Sem_2401_GlobalVerdict_010.ttcn new file mode 100644 index 00000000..759166ee --- /dev/null +++ b/ATS/core_language/24_test_verdict_operations/2401_the_verdict_mechanism/Sem_2401_GlobalVerdict_010.ttcn @@ -0,0 +1,37 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.2 + ** @purpose 1:24.1, Ensure overwriting rules for global verdict: none can't overwrite fail. + ** @verdict pass accept, ttcn3verdict:fail + *****************************************************************/ +/* + * #reqname /Requirements/24 Test verdict operations/24.1 The Verdict mechanism/Overwriting rules for setverdict + **/ + + +module Sem_2401_GlobalVerdict_010 { + type component GeneralComp {} + + function set_PTC_verdict_fail() runs on GeneralComp { + setverdict(fail); + } + + function set_PTC_verdict_none() runs on GeneralComp { + setverdict(none); + } + + testcase TC_Sem_2401_GlobalVerdict_010() runs on GeneralComp system GeneralComp { + var GeneralComp PTC1, PTC2; + + PTC1 := GeneralComp.create; + PTC2 := GeneralComp.create; + PTC1.start(set_PTC_verdict_fail()); + PTC2.start(set_PTC_verdict_none()); + all component.done; + // Verdict none can't overwrite fail + } + + control{ + execute(TC_Sem_2401_GlobalVerdict_010()); + } +} diff --git a/ATS/core_language/24_test_verdict_operations/2401_the_verdict_mechanism/Sem_2401_GlobalVerdict_011.ttcn b/ATS/core_language/24_test_verdict_operations/2401_the_verdict_mechanism/Sem_2401_GlobalVerdict_011.ttcn new file mode 100644 index 00000000..337a7a63 --- /dev/null +++ b/ATS/core_language/24_test_verdict_operations/2401_the_verdict_mechanism/Sem_2401_GlobalVerdict_011.ttcn @@ -0,0 +1,37 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.2 + ** @purpose 1:24.1, Ensure overwriting rules for global verdict: pass can't overwrite fail. + ** @verdict pass accept, ttcn3verdict:fail + *****************************************************************/ +/* + * #reqname /Requirements/24 Test verdict operations/24.1 The Verdict mechanism/Overwriting rules for setverdict + **/ + + +module Sem_2401_GlobalVerdict_011 { + type component GeneralComp {} + + function set_PTC_verdict_fail() runs on GeneralComp { + setverdict(fail); + } + + function set_PTC_verdict_pass() runs on GeneralComp { + setverdict(pass); + } + + testcase TC_Sem_2401_GlobalVerdict_011() runs on GeneralComp system GeneralComp { + var GeneralComp PTC1, PTC2; + + PTC1 := GeneralComp.create; + PTC2 := GeneralComp.create; + PTC1.start(set_PTC_verdict_fail()); + PTC2.start(set_PTC_verdict_pass()); + all component.done; + // Verdict pass can't overwrite fail + } + + control{ + execute(TC_Sem_2401_GlobalVerdict_011()); + } +} diff --git a/ATS/core_language/24_test_verdict_operations/2401_the_verdict_mechanism/Sem_2401_GlobalVerdict_012.ttcn b/ATS/core_language/24_test_verdict_operations/2401_the_verdict_mechanism/Sem_2401_GlobalVerdict_012.ttcn new file mode 100644 index 00000000..5f8f5907 --- /dev/null +++ b/ATS/core_language/24_test_verdict_operations/2401_the_verdict_mechanism/Sem_2401_GlobalVerdict_012.ttcn @@ -0,0 +1,37 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.2 + ** @purpose 1:24.1, Ensure overwriting rules for global verdict: inconc can't overwrite fail. + ** @verdict pass accept, ttcn3verdict:fail + *****************************************************************/ +/* + * #reqname /Requirements/24 Test verdict operations/24.1 The Verdict mechanism/Overwriting rules for setverdict + **/ + + +module Sem_2401_GlobalVerdict_012 { + type component GeneralComp {} + + function set_PTC_verdict_fail() runs on GeneralComp { + setverdict(fail); + } + + function set_PTC_verdict_inconc() runs on GeneralComp { + setverdict(inconc); + } + + testcase TC_Sem_2401_GlobalVerdict_012() runs on GeneralComp system GeneralComp { + var GeneralComp PTC1, PTC2; + + PTC1 := GeneralComp.create; + PTC2 := GeneralComp.create; + PTC1.start(set_PTC_verdict_fail()); + PTC2.start(set_PTC_verdict_inconc()); + all component.done; + // Verdict inconc can't overwrite fail + } + + control{ + execute(TC_Sem_2401_GlobalVerdict_012()); + } +} diff --git a/ATS/core_language/24_test_verdict_operations/2401_the_verdict_mechanism/Sem_2401_InitiallyNone_001.ttcn b/ATS/core_language/24_test_verdict_operations/2401_the_verdict_mechanism/Sem_2401_InitiallyNone_001.ttcn new file mode 100644 index 00000000..423d902c --- /dev/null +++ b/ATS/core_language/24_test_verdict_operations/2401_the_verdict_mechanism/Sem_2401_InitiallyNone_001.ttcn @@ -0,0 +1,27 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:24.1, Ensure that local verdicts initializes with none + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +/* + * #reqname /Requirements/24 Test verdict operations/24.1 The Verdict mechanism/Local verdict is initialized with none + **/ + + +module Sem_2401_InitiallyNone_001 { + type component GeneralComp {} + + testcase TC_Sem_2401_InitiallyNone_001() runs on GeneralComp { + var verdicttype b_verdict := getverdict; + if (b_verdict == none) { + setverdict(pass); + } else { + setverdict(fail); + } + } + + control { + execute(TC_Sem_2401_InitiallyNone_001()); + } +} \ No newline at end of file diff --git a/ATS/core_language/24_test_verdict_operations/2401_the_verdict_mechanism/Sem_2401_LocalVerdict_001.ttcn b/ATS/core_language/24_test_verdict_operations/2401_the_verdict_mechanism/Sem_2401_LocalVerdict_001.ttcn new file mode 100644 index 00000000..1f3ee615 --- /dev/null +++ b/ATS/core_language/24_test_verdict_operations/2401_the_verdict_mechanism/Sem_2401_LocalVerdict_001.ttcn @@ -0,0 +1,28 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.2 + ** @purpose 1:24.1, Ensure overwriting rules for local verdict: pass can overwrite none. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +/* + * #reqname /Requirements/24 Test verdict operations/24.1 The Verdict mechanism/Overwriting rules for setverdict + **/ +/* + * #reqname /Requirements/24 Test verdict operations/24.2 The Setverdict operation/The value of the local verdict is changed with the setverdict operation. + **/ + + +module Sem_2401_LocalVerdict_001 { + type component GeneralComp {} + + testcase TC_Sem_2401_LocalVerdict_001() runs on GeneralComp { + setverdict(none); + setverdict(pass); + + // The verdict is evaluated by the validation tool according to @verdict header + } + + control{ + execute(TC_Sem_2401_LocalVerdict_001()); + } +} diff --git a/ATS/core_language/24_test_verdict_operations/2401_the_verdict_mechanism/Sem_2401_LocalVerdict_002.ttcn b/ATS/core_language/24_test_verdict_operations/2401_the_verdict_mechanism/Sem_2401_LocalVerdict_002.ttcn new file mode 100644 index 00000000..3f38b79a --- /dev/null +++ b/ATS/core_language/24_test_verdict_operations/2401_the_verdict_mechanism/Sem_2401_LocalVerdict_002.ttcn @@ -0,0 +1,28 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.2 + ** @purpose 1:24.1, Ensure overwriting rules for local verdict: inconc can overwrite none. + ** @verdict pass accept, ttcn3verdict:inconc + *****************************************************************/ +/* + * #reqname /Requirements/24 Test verdict operations/24.1 The Verdict mechanism/Overwriting rules for setverdict + **/ +/* + * #reqname /Requirements/24 Test verdict operations/24.2 The Setverdict operation/The value of the local verdict is changed with the setverdict operation. + **/ + + +module Sem_2401_LocalVerdict_002 { + type component GeneralComp {} + + testcase TC_Sem_2401_LocalVerdict_002() runs on GeneralComp { + setverdict(none); + setverdict(inconc); + + // The verdict is evaluated by the validation tool according to @verdict header + } + + control{ + execute(TC_Sem_2401_LocalVerdict_002()); + } +} diff --git a/ATS/core_language/24_test_verdict_operations/2401_the_verdict_mechanism/Sem_2401_LocalVerdict_003.ttcn b/ATS/core_language/24_test_verdict_operations/2401_the_verdict_mechanism/Sem_2401_LocalVerdict_003.ttcn new file mode 100644 index 00000000..dd02658d --- /dev/null +++ b/ATS/core_language/24_test_verdict_operations/2401_the_verdict_mechanism/Sem_2401_LocalVerdict_003.ttcn @@ -0,0 +1,28 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.2 + ** @purpose 1:24.1, Ensure overwriting rules for local verdict: fail can overwrite none. + ** @verdict pass accept, ttcn3verdict:fail + *****************************************************************/ +/* + * #reqname /Requirements/24 Test verdict operations/24.1 The Verdict mechanism/Overwriting rules for setverdict + **/ +/* + * #reqname /Requirements/24 Test verdict operations/24.2 The Setverdict operation/The value of the local verdict is changed with the setverdict operation. + **/ + + +module Sem_2401_LocalVerdict_003 { + type component GeneralComp {} + + testcase TC_Sem_2401_LocalVerdict_003() runs on GeneralComp { + setverdict(none); + setverdict(fail); + + // The verdict is evaluated by the validation tool according to @verdict header + } + + control{ + execute(TC_Sem_2401_LocalVerdict_003()); + } +} diff --git a/ATS/core_language/24_test_verdict_operations/2401_the_verdict_mechanism/Sem_2401_LocalVerdict_004.ttcn b/ATS/core_language/24_test_verdict_operations/2401_the_verdict_mechanism/Sem_2401_LocalVerdict_004.ttcn new file mode 100644 index 00000000..3ea8c7af --- /dev/null +++ b/ATS/core_language/24_test_verdict_operations/2401_the_verdict_mechanism/Sem_2401_LocalVerdict_004.ttcn @@ -0,0 +1,28 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.2 + ** @purpose 1:24.1, Ensure overwriting rules for local verdict: none can't overwrite pass. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +/* + * #reqname /Requirements/24 Test verdict operations/24.1 The Verdict mechanism/Overwriting rules for setverdict + **/ +/* + * #reqname /Requirements/24 Test verdict operations/24.2 The Setverdict operation/The value of the local verdict is changed with the setverdict operation. + **/ + + +module Sem_2401_LocalVerdict_004 { + type component GeneralComp {} + + testcase TC_Sem_2401_LocalVerdict_004() runs on GeneralComp { + setverdict(pass); + setverdict(none); + + // The verdict is evaluated by the validation tool according to @verdict header + } + + control{ + execute(TC_Sem_2401_LocalVerdict_004()); + } +} diff --git a/ATS/core_language/24_test_verdict_operations/2401_the_verdict_mechanism/Sem_2401_LocalVerdict_005.ttcn b/ATS/core_language/24_test_verdict_operations/2401_the_verdict_mechanism/Sem_2401_LocalVerdict_005.ttcn new file mode 100644 index 00000000..2132edf9 --- /dev/null +++ b/ATS/core_language/24_test_verdict_operations/2401_the_verdict_mechanism/Sem_2401_LocalVerdict_005.ttcn @@ -0,0 +1,28 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.2 + ** @purpose 1:24.1, Ensure overwriting rules for local verdict: inconc can overwrite pass. + ** @verdict pass accept, ttcn3verdict:inconc + *****************************************************************/ +/* + * #reqname /Requirements/24 Test verdict operations/24.1 The Verdict mechanism/Overwriting rules for setverdict + **/ +/* + * #reqname /Requirements/24 Test verdict operations/24.2 The Setverdict operation/The value of the local verdict is changed with the setverdict operation. + **/ + + +module Sem_2401_LocalVerdict_005 { + type component GeneralComp {} + + testcase TC_Sem_2401_LocalVerdict_005() runs on GeneralComp { + setverdict(pass); + setverdict(inconc); + + // The verdict is evaluated by the validation tool according to @verdict header + } + + control{ + execute(TC_Sem_2401_LocalVerdict_005()); + } +} diff --git a/ATS/core_language/24_test_verdict_operations/2401_the_verdict_mechanism/Sem_2401_LocalVerdict_006.ttcn b/ATS/core_language/24_test_verdict_operations/2401_the_verdict_mechanism/Sem_2401_LocalVerdict_006.ttcn new file mode 100644 index 00000000..842de3c0 --- /dev/null +++ b/ATS/core_language/24_test_verdict_operations/2401_the_verdict_mechanism/Sem_2401_LocalVerdict_006.ttcn @@ -0,0 +1,28 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.2 + ** @purpose 1:24.1, Ensure overwriting rules for local verdict: fail can overwrite pass. + ** @verdict pass accept, ttcn3verdict:fail + *****************************************************************/ +/* + * #reqname /Requirements/24 Test verdict operations/24.1 The Verdict mechanism/Overwriting rules for setverdict + **/ +/* + * #reqname /Requirements/24 Test verdict operations/24.2 The Setverdict operation/The value of the local verdict is changed with the setverdict operation. + **/ + + +module Sem_2401_LocalVerdict_006 { + type component GeneralComp {} + + testcase TC_Sem_2401_LocalVerdict_006() runs on GeneralComp { + setverdict(pass); + setverdict(fail); + + // The verdict is evaluated by the validation tool according to @verdict header + } + + control{ + execute(TC_Sem_2401_LocalVerdict_006()); + } +} diff --git a/ATS/core_language/24_test_verdict_operations/2401_the_verdict_mechanism/Sem_2401_LocalVerdict_007.ttcn b/ATS/core_language/24_test_verdict_operations/2401_the_verdict_mechanism/Sem_2401_LocalVerdict_007.ttcn new file mode 100644 index 00000000..364cc7fc --- /dev/null +++ b/ATS/core_language/24_test_verdict_operations/2401_the_verdict_mechanism/Sem_2401_LocalVerdict_007.ttcn @@ -0,0 +1,28 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.2 + ** @purpose 1:24.1, Ensure overwriting rules for local verdict: none can't overwrite inconc. + ** @verdict pass accept, ttcn3verdict:inconc + *****************************************************************/ +/* + * #reqname /Requirements/24 Test verdict operations/24.1 The Verdict mechanism/Overwriting rules for setverdict + **/ +/* + * #reqname /Requirements/24 Test verdict operations/24.2 The Setverdict operation/The value of the local verdict is changed with the setverdict operation. + **/ + + +module Sem_2401_LocalVerdict_007 { + type component GeneralComp {} + + testcase TC_Sem_2401_LocalVerdict_007() runs on GeneralComp { + setverdict(inconc); + setverdict(none); + + // The verdict is evaluated by the validation tool according to @verdict header + } + + control{ + execute(TC_Sem_2401_LocalVerdict_007()); + } +} diff --git a/ATS/core_language/24_test_verdict_operations/2401_the_verdict_mechanism/Sem_2401_LocalVerdict_008.ttcn b/ATS/core_language/24_test_verdict_operations/2401_the_verdict_mechanism/Sem_2401_LocalVerdict_008.ttcn new file mode 100644 index 00000000..ba591ad1 --- /dev/null +++ b/ATS/core_language/24_test_verdict_operations/2401_the_verdict_mechanism/Sem_2401_LocalVerdict_008.ttcn @@ -0,0 +1,28 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.2 + ** @purpose 1:24.1, Ensure overwriting rules for local verdict: pass can't overwrite inconc. + ** @verdict pass accept, ttcn3verdict:inconc + *****************************************************************/ +/* + * #reqname /Requirements/24 Test verdict operations/24.1 The Verdict mechanism/Overwriting rules for setverdict + **/ +/* + * #reqname /Requirements/24 Test verdict operations/24.2 The Setverdict operation/The value of the local verdict is changed with the setverdict operation. + **/ + + +module Sem_2401_LocalVerdict_008 { + type component GeneralComp {} + + testcase TC_Sem_2401_LocalVerdict_008() runs on GeneralComp { + setverdict(inconc); + setverdict(pass); + + // The verdict is evaluated by the validation tool according to @verdict header + } + + control{ + execute(TC_Sem_2401_LocalVerdict_008()); + } +} diff --git a/ATS/core_language/24_test_verdict_operations/2401_the_verdict_mechanism/Sem_2401_LocalVerdict_009.ttcn b/ATS/core_language/24_test_verdict_operations/2401_the_verdict_mechanism/Sem_2401_LocalVerdict_009.ttcn new file mode 100644 index 00000000..a30f0fd2 --- /dev/null +++ b/ATS/core_language/24_test_verdict_operations/2401_the_verdict_mechanism/Sem_2401_LocalVerdict_009.ttcn @@ -0,0 +1,28 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.2 + ** @purpose 1:24.1, Ensure overwriting rules for local verdict: fail can overwrite inconc. + ** @verdict pass accept, ttcn3verdict:fail + *****************************************************************/ +/* + * #reqname /Requirements/24 Test verdict operations/24.1 The Verdict mechanism/Overwriting rules for setverdict + **/ +/* + * #reqname /Requirements/24 Test verdict operations/24.2 The Setverdict operation/The value of the local verdict is changed with the setverdict operation. + **/ + + +module Sem_2401_LocalVerdict_009 { + type component GeneralComp {} + + testcase TC_Sem_2401_LocalVerdict_009() runs on GeneralComp { + setverdict(inconc); + setverdict(fail); + + // The verdict is evaluated by the validation tool according to @verdict header + } + + control{ + execute(TC_Sem_2401_LocalVerdict_009()); + } +} diff --git a/ATS/core_language/24_test_verdict_operations/2401_the_verdict_mechanism/Sem_2401_LocalVerdict_010.ttcn b/ATS/core_language/24_test_verdict_operations/2401_the_verdict_mechanism/Sem_2401_LocalVerdict_010.ttcn new file mode 100644 index 00000000..c3fd220f --- /dev/null +++ b/ATS/core_language/24_test_verdict_operations/2401_the_verdict_mechanism/Sem_2401_LocalVerdict_010.ttcn @@ -0,0 +1,28 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.2 + ** @purpose 1:24.1, Ensure overwriting rules for local verdict: none can't overwrite fail. + ** @verdict pass accept, ttcn3verdict:fail + *****************************************************************/ +/* + * #reqname /Requirements/24 Test verdict operations/24.1 The Verdict mechanism/Overwriting rules for setverdict + **/ +/* + * #reqname /Requirements/24 Test verdict operations/24.2 The Setverdict operation/The value of the local verdict is changed with the setverdict operation. + **/ + + +module Sem_2401_LocalVerdict_010 { + type component GeneralComp {} + + testcase TC_Sem_2401_LocalVerdict_010() runs on GeneralComp { + setverdict(fail); + setverdict(none); + + // The verdict is evaluated by the validation tool according to @verdict header + } + + control{ + execute(TC_Sem_2401_LocalVerdict_010()); + } +} diff --git a/ATS/core_language/24_test_verdict_operations/2401_the_verdict_mechanism/Sem_2401_LocalVerdict_011.ttcn b/ATS/core_language/24_test_verdict_operations/2401_the_verdict_mechanism/Sem_2401_LocalVerdict_011.ttcn new file mode 100644 index 00000000..c02b0154 --- /dev/null +++ b/ATS/core_language/24_test_verdict_operations/2401_the_verdict_mechanism/Sem_2401_LocalVerdict_011.ttcn @@ -0,0 +1,28 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.2 + ** @purpose 1:24.1, Ensure overwriting rules for local verdict: pass can't overwrite fail. + ** @verdict pass accept, ttcn3verdict:fail + *****************************************************************/ +/* + * #reqname /Requirements/24 Test verdict operations/24.1 The Verdict mechanism/Overwriting rules for setverdict + **/ +/* + * #reqname /Requirements/24 Test verdict operations/24.2 The Setverdict operation/The value of the local verdict is changed with the setverdict operation. + **/ + + +module Sem_2401_LocalVerdict_011 { + type component GeneralComp {} + + testcase TC_Sem_2401_LocalVerdict_011() runs on GeneralComp { + setverdict(fail); + setverdict(pass); + + // The verdict is evaluated by the validation tool according to @verdict header + } + + control{ + execute(TC_Sem_2401_LocalVerdict_011()); + } +} diff --git a/ATS/core_language/24_test_verdict_operations/2401_the_verdict_mechanism/Sem_2401_LocalVerdict_012.ttcn b/ATS/core_language/24_test_verdict_operations/2401_the_verdict_mechanism/Sem_2401_LocalVerdict_012.ttcn new file mode 100644 index 00000000..19e4f943 --- /dev/null +++ b/ATS/core_language/24_test_verdict_operations/2401_the_verdict_mechanism/Sem_2401_LocalVerdict_012.ttcn @@ -0,0 +1,28 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.2 + ** @purpose 1:24.1, Ensure overwriting rules for local verdict: inconc can't overwrite fail. + ** @verdict pass accept, ttcn3verdict:fail + *****************************************************************/ +/* + * #reqname /Requirements/24 Test verdict operations/24.1 The Verdict mechanism/Overwriting rules for setverdict + **/ +/* + * #reqname /Requirements/24 Test verdict operations/24.2 The Setverdict operation/The value of the local verdict is changed with the setverdict operation. + **/ + + +module Sem_2401_LocalVerdict_012 { + type component GeneralComp {} + + testcase TC_Sem_2401_LocalVerdict_012() runs on GeneralComp { + setverdict(fail); + setverdict(inconc); + + // The verdict is evaluated by the validation tool according to @verdict header + } + + control{ + execute(TC_Sem_2401_LocalVerdict_012()); + } +} diff --git a/ATS/core_language/24_test_verdict_operations/2401_the_verdict_mechanism/Syn_2401_FiveValues_001.ttcn b/ATS/core_language/24_test_verdict_operations/2401_the_verdict_mechanism/Syn_2401_FiveValues_001.ttcn new file mode 100644 index 00000000..54cc78e0 --- /dev/null +++ b/ATS/core_language/24_test_verdict_operations/2401_the_verdict_mechanism/Syn_2401_FiveValues_001.ttcn @@ -0,0 +1,22 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:24.1, Ensure that there are five values of verdicttype + ** @verdict pass accept, noexecution + *****************************************************************/ +/* + * #reqname /Requirements/24 Test verdict operations/24.1 The Verdict mechanism/Five different values of verdict + **/ + + +module Syn_2401_FiveValues_001 { + control { + var verdicttype v_v; + + v_v := none; + v_v := pass; + v_v := inconc; + v_v := fail; + v_v := error; + } +} \ No newline at end of file diff --git a/ATS/core_language/24_test_verdict_operations/2402_the_setverdict_operation/NegSem_2402_setverdict_params_001.ttcn b/ATS/core_language/24_test_verdict_operations/2402_the_setverdict_operation/NegSem_2402_setverdict_params_001.ttcn new file mode 100644 index 00000000..64ae9480 --- /dev/null +++ b/ATS/core_language/24_test_verdict_operations/2402_the_setverdict_operation/NegSem_2402_setverdict_params_001.ttcn @@ -0,0 +1,22 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:24, Ensure setverdict accepts parameters of verdicttype only + ** @verdict pass reject + ***************************************************/ +/* + * #reqname /Requirements/24 Test verdict operations/24.2 The Setverdict operation/Setverdict allowed verdict values + **/ + +module NegSem_2402_setverdict_params_001 { + type component TComp {} + + testcase TC_NegSem_2402_setverdict_params_001() runs on TComp { + var charstring v_pass := "pass"; + setverdict(v_pass); + } + + control { + execute(TC_NegSem_2402_setverdict_params_001()) + } +} \ No newline at end of file diff --git a/ATS/core_language/24_test_verdict_operations/2402_the_setverdict_operation/NegSem_2402_setverdict_params_002.ttcn b/ATS/core_language/24_test_verdict_operations/2402_the_setverdict_operation/NegSem_2402_setverdict_params_002.ttcn new file mode 100644 index 00000000..1fde63e8 --- /dev/null +++ b/ATS/core_language/24_test_verdict_operations/2402_the_setverdict_operation/NegSem_2402_setverdict_params_002.ttcn @@ -0,0 +1,24 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:24, Ensure setverdict accepts parameters of verdicttype only + ** @verdict pass reject + ***************************************************/ +/* + * #reqname /Requirements/24 Test verdict operations/24.2 The Setverdict operation/Setverdict allowed verdict values + **/ + + +module NegSem_2402_setverdict_params_002 { + type component TComp {} + type record TRec { verdicttype field1 } + + testcase TC_NegSem_2402_setverdict_params_002() runs on TComp { + var TRec v_pass := { field1 := pass }; + setverdict(v_pass); + } + + control { + execute(TC_NegSem_2402_setverdict_params_002()) + } +} \ No newline at end of file diff --git a/ATS/core_language/24_test_verdict_operations/2402_the_setverdict_operation/NegSem_2402_setverdict_params_003.ttcn b/ATS/core_language/24_test_verdict_operations/2402_the_setverdict_operation/NegSem_2402_setverdict_params_003.ttcn new file mode 100644 index 00000000..21c95e8b --- /dev/null +++ b/ATS/core_language/24_test_verdict_operations/2402_the_setverdict_operation/NegSem_2402_setverdict_params_003.ttcn @@ -0,0 +1,22 @@ +/*************************************************** + ** @author STF 433 (updated by STF 521) + ** @version 0.0.2 + ** @purpose 1:24, Ensure setverdict accepts values of verdicttype only + ** @verdict pass reject + ***************************************************/ +/* + * #reqname /Requirements/24 Test verdict operations/24.2 The Setverdict operation/Setverdict allowed verdict values + **/ + +module NegSem_2402_setverdict_params_003 { + type component TComp {} + + testcase TC_NegSem_2402_setverdict_params_003() runs on TComp { + var template verdicttype v_pass := ( pass, fail ); + setverdict(v_pass); + } + + control { + execute(TC_NegSem_2402_setverdict_params_003()) + } +} \ No newline at end of file diff --git a/ATS/core_language/24_test_verdict_operations/2402_the_setverdict_operation/NegSem_2402_setverdict_params_004.ttcn b/ATS/core_language/24_test_verdict_operations/2402_the_setverdict_operation/NegSem_2402_setverdict_params_004.ttcn new file mode 100644 index 00000000..28c09e90 --- /dev/null +++ b/ATS/core_language/24_test_verdict_operations/2402_the_setverdict_operation/NegSem_2402_setverdict_params_004.ttcn @@ -0,0 +1,22 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:24, Ensure setverdict accepts values only as the parameter + ** @verdict pass reject + ***************************************************/ +/* + * #reqname /Requirements/24 Test verdict operations/24.2 The Setverdict operation/Setverdict allowed verdict values + **/ + +module NegSem_2402_setverdict_params_004 { + type component TComp {} + + testcase TC_NegSem_2402_setverdict_params_004() runs on TComp { + var template verdicttype v_pass := ?; + setverdict(v_pass); + } + + control { + execute(TC_NegSem_2402_setverdict_params_004()) + } +} \ No newline at end of file diff --git a/ATS/core_language/24_test_verdict_operations/2402_the_setverdict_operation/NegSem_2402_setverdict_params_005.ttcn b/ATS/core_language/24_test_verdict_operations/2402_the_setverdict_operation/NegSem_2402_setverdict_params_005.ttcn new file mode 100644 index 00000000..21923da6 --- /dev/null +++ b/ATS/core_language/24_test_verdict_operations/2402_the_setverdict_operation/NegSem_2402_setverdict_params_005.ttcn @@ -0,0 +1,22 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:24, Ensure setverdict accepts values only as the parameter + ** @verdict pass reject + ***************************************************/ +/* + * #reqname /Requirements/24 Test verdict operations/24.2 The Setverdict operation/Setverdict allowed verdict values + **/ + +module NegSem_2402_setverdict_params_005 { + type component TComp {} + + testcase TC_NegSem_2402_setverdict_params_005() runs on TComp { + var anytype v_var := { integer := 1 }; + setverdict(v_var.verdicttype); + } + + control { + execute(TC_NegSem_2402_setverdict_params_005()) + } +} \ No newline at end of file diff --git a/ATS/core_language/24_test_verdict_operations/2402_the_setverdict_operation/Sem_2402_setverdict_logging_001.ttcn b/ATS/core_language/24_test_verdict_operations/2402_the_setverdict_operation/Sem_2402_setverdict_logging_001.ttcn new file mode 100644 index 00000000..1675772b --- /dev/null +++ b/ATS/core_language/24_test_verdict_operations/2402_the_setverdict_operation/Sem_2402_setverdict_logging_001.ttcn @@ -0,0 +1,22 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:24, Ensure logging constraints + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +/* + * #reqname /Requirements/24 Test verdict operations/24.2 The Setverdict operation/For FreeText and TemplateInstance, the same rules and restrictions apply as for the parameters of the log statement. + **/ + +module Sem_2402_setverdict_logging_001 { + type component TComp {} + + testcase TC_Sem_2402_setverdict_logging_001() runs on TComp { + var integer v_uninitialized ; + setverdict(pass, "Uninitialized variable", v_uninitialized); + } + + control { + execute(TC_Sem_2402_setverdict_logging_001()) + } +} \ No newline at end of file diff --git a/ATS/core_language/24_test_verdict_operations/2402_the_setverdict_operation/Sem_2402_setverdict_params_001.ttcn b/ATS/core_language/24_test_verdict_operations/2402_the_setverdict_operation/Sem_2402_setverdict_params_001.ttcn new file mode 100644 index 00000000..6d023f5b --- /dev/null +++ b/ATS/core_language/24_test_verdict_operations/2402_the_setverdict_operation/Sem_2402_setverdict_params_001.ttcn @@ -0,0 +1,22 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:24, Ensure setverdict accepts values only as the parameter + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +/* + * #reqname /Requirements/24 Test verdict operations/24.2 The Setverdict operation/Optional setverdict parameters + **/ + +module Sem_2402_setverdict_params_001 { + type component TComp {} + + testcase TC_Sem_2402_setverdict_params_001() runs on TComp { + var anytype v_var := { verdicttype := pass }; + setverdict(v_var.verdicttype); + } + + control { + execute(TC_Sem_2402_setverdict_params_001()) + } +} \ No newline at end of file diff --git a/ATS/core_language/24_test_verdict_operations/2402_the_setverdict_operation/Sem_2402_setverdict_params_002.ttcn b/ATS/core_language/24_test_verdict_operations/2402_the_setverdict_operation/Sem_2402_setverdict_params_002.ttcn new file mode 100644 index 00000000..9044dad8 --- /dev/null +++ b/ATS/core_language/24_test_verdict_operations/2402_the_setverdict_operation/Sem_2402_setverdict_params_002.ttcn @@ -0,0 +1,22 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:24, Ensure setverdict accepts values only as the parameter + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +/* + * #reqname /Requirements/24 Test verdict operations/24.2 The Setverdict operation/Optional setverdict parameters + **/ + +module Sem_2402_setverdict_params_002 { + type component TComp {} + + testcase TC_Sem_2402_setverdict_params_002() runs on TComp { + var template verdicttype v_pass := pass; + setverdict(valueof(v_pass)); + } + + control { + execute(TC_Sem_2402_setverdict_params_002()) + } +} \ No newline at end of file diff --git a/ATS/core_language/24_test_verdict_operations/2402_the_setverdict_operation/Sem_2402_setverdict_params_003.ttcn b/ATS/core_language/24_test_verdict_operations/2402_the_setverdict_operation/Sem_2402_setverdict_params_003.ttcn new file mode 100644 index 00000000..d0b44e93 --- /dev/null +++ b/ATS/core_language/24_test_verdict_operations/2402_the_setverdict_operation/Sem_2402_setverdict_params_003.ttcn @@ -0,0 +1,22 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:24, Ensure logging constraints + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +/* + * #reqname /Requirements/24 Test verdict operations/24.2 The Setverdict operation/Optional setverdict parameters + **/ + +module Sem_2402_setverdict_params_003 { + type component TComp {} + + testcase TC_Sem_2402_setverdict_params_003() runs on TComp { + var template verdicttype v_pass := pass; + setverdict(valueof(v_pass)); + } + + control { + execute(TC_Sem_2402_setverdict_params_003()) + } +} \ No newline at end of file diff --git a/ATS/core_language/24_test_verdict_operations/2403_the_getverdict_operation/Sem_2403_getverdict_001.ttcn b/ATS/core_language/24_test_verdict_operations/2403_the_getverdict_operation/Sem_2403_getverdict_001.ttcn new file mode 100644 index 00000000..02ef4e67 --- /dev/null +++ b/ATS/core_language/24_test_verdict_operations/2403_the_getverdict_operation/Sem_2403_getverdict_001.ttcn @@ -0,0 +1,30 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:24.3, Ensure getverdict returns the actual verdict none + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// #reqname /Requirements/24 Test verdict operations/24.3 The Getverdict operation/Getverdict returns local verdict value + +module Sem_2403_getverdict_001 { + type component TComp {} + + testcase TC_Sem_2403_getverdict_001() runs on TComp { + var verdicttype v_verdict; + setverdict(none); + v_verdict := getverdict; + if (v_verdict == none) + { + setverdict(pass) + } + else + { + setverdict(fail); + } + } + + control { + execute(TC_Sem_2403_getverdict_001()) + } +} \ No newline at end of file diff --git a/ATS/core_language/24_test_verdict_operations/2403_the_getverdict_operation/Sem_2403_getverdict_002.ttcn b/ATS/core_language/24_test_verdict_operations/2403_the_getverdict_operation/Sem_2403_getverdict_002.ttcn new file mode 100644 index 00000000..dd5c8df8 --- /dev/null +++ b/ATS/core_language/24_test_verdict_operations/2403_the_getverdict_operation/Sem_2403_getverdict_002.ttcn @@ -0,0 +1,28 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:24.3, Ensure getverdict returns the actual verdict inconc + ** @verdict pass accept, ttcn3verdict:inconc + ***************************************************/ +/* + * #reqname /Requirements/24 Test verdict operations/24.3 The Getverdict operation/Getverdict returns local verdict value + **/ + +module Sem_2403_getverdict_002 { + type component TComp {} + + testcase TC_Sem_2403_getverdict_002() runs on TComp { + var verdicttype v_verdict; + setverdict(inconc); + v_verdict := getverdict; + if (v_verdict != inconc) + { + setverdict(fail); + } + + } + + control { + execute(TC_Sem_2403_getverdict_002()) + } +} \ No newline at end of file diff --git a/ATS/core_language/24_test_verdict_operations/2403_the_getverdict_operation/Sem_2403_getverdict_003.ttcn b/ATS/core_language/24_test_verdict_operations/2403_the_getverdict_operation/Sem_2403_getverdict_003.ttcn new file mode 100644 index 00000000..3884861e --- /dev/null +++ b/ATS/core_language/24_test_verdict_operations/2403_the_getverdict_operation/Sem_2403_getverdict_003.ttcn @@ -0,0 +1,31 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:24.3, Ensure getverdict returns the actual verdict pass + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +/* + * #reqname /Requirements/24 Test verdict operations/24.3 The Getverdict operation/Getverdict returns local verdict value + **/ + +module Sem_2403_getverdict_003 { + type component TComp {} + + testcase TC_Sem_2403_getverdict_003() runs on TComp { + var verdicttype v_verdict; + setverdict(pass); + v_verdict := getverdict; + if (v_verdict == pass) + { + setverdict(pass) + } + else + { + setverdict(fail); + } + } + + control { + execute(TC_Sem_2403_getverdict_003()) + } +} \ No newline at end of file diff --git a/ATS/core_language/24_test_verdict_operations/2403_the_getverdict_operation/Sem_2403_getverdict_004.ttcn b/ATS/core_language/24_test_verdict_operations/2403_the_getverdict_operation/Sem_2403_getverdict_004.ttcn new file mode 100644 index 00000000..5a0fc6a7 --- /dev/null +++ b/ATS/core_language/24_test_verdict_operations/2403_the_getverdict_operation/Sem_2403_getverdict_004.ttcn @@ -0,0 +1,28 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.2 + ** @purpose 1:24.3, Ensure getverdict returns the actual verdict fail + ** @verdict pass accept, ttcn3verdict:error + ***************************************************/ +/* + * #reqname /Requirements/24 Test verdict operations/24.3 The Getverdict operation/Getverdict returns local verdict value + **/ + +module Sem_2403_getverdict_004 { + type component TComp {} + + testcase TC_Sem_2403_getverdict_004() runs on TComp { + var verdicttype v_verdict; + setverdict(fail); + v_verdict := getverdict; + if (v_verdict == fail) + { + // Set error verdict + testcase.stop; + } + } + + control { + execute(TC_Sem_2403_getverdict_004()) + } +} \ No newline at end of file diff --git a/ATS/core_language/24_test_verdict_operations/2403_the_getverdict_operation/Sem_2403_getverdict_005.ttcn b/ATS/core_language/24_test_verdict_operations/2403_the_getverdict_operation/Sem_2403_getverdict_005.ttcn new file mode 100644 index 00000000..75649ca1 --- /dev/null +++ b/ATS/core_language/24_test_verdict_operations/2403_the_getverdict_operation/Sem_2403_getverdict_005.ttcn @@ -0,0 +1,31 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:24.3, Ensure getverdict none for uninitialized verdict + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +/* + * #reqname /Requirements/24 Test verdict operations/24.3 The Getverdict operation/Getverdict returns local verdict value/Getverdict returns none for uninitialized verdict + **/ + +module Sem_2403_getverdict_005 { + type component TComp {} + + testcase TC_Sem_2403_getverdict_005() runs on TComp { + var verdicttype v_verdict; + v_verdict := getverdict; + if (v_verdict != none) + { + // Set error verdict + testcase.stop; + } + else + { + setverdict(pass); + } + } + + control { + execute(TC_Sem_2403_getverdict_005()) + } +} \ No newline at end of file diff --git a/ATS/core_language/24_test_verdict_operations/24_toplevel/NegSem_24_toplevel_001.ttcn b/ATS/core_language/24_test_verdict_operations/24_toplevel/NegSem_24_toplevel_001.ttcn new file mode 100644 index 00000000..47570354 --- /dev/null +++ b/ATS/core_language/24_test_verdict_operations/24_toplevel/NegSem_24_toplevel_001.ttcn @@ -0,0 +1,24 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.2 + ** @purpose 1:24, Ensure getverdict is not allowed in constant initialization in control part + ** @verdict pass reject + ***************************************************/ +/* + * #reqname /Requirements/24 Test verdict operations/Getverdict and setverdict operations shall only be used in test cases, altsteps and functions. + **/ + +module NegSem_24_toplevel_001 { + // This should be syntactically correct since BNF does not restrict initialization expression + const verdicttype c_verdict := getverdict; + + type component GeneralComp {} + + testcase TC_NegSem_24_toplevel_001 (verdicttype v_verdict) runs on GeneralComp{ + setverdict(pass) + } + + control { + execute(TC_NegSem_24_toplevel_001(c_verdict)); + } +} \ No newline at end of file diff --git a/ATS/core_language/24_test_verdict_operations/24_toplevel/NegSem_24_toplevel_002.ttcn b/ATS/core_language/24_test_verdict_operations/24_toplevel/NegSem_24_toplevel_002.ttcn new file mode 100644 index 00000000..3f0ae0ac --- /dev/null +++ b/ATS/core_language/24_test_verdict_operations/24_toplevel/NegSem_24_toplevel_002.ttcn @@ -0,0 +1,22 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:24, Ensure getverdict is not allowed in parameter initialization in control part. + ** @verdict pass reject + ***************************************************/ +/* + * #reqname /Requirements/24 Test verdict operations/Getverdict and setverdict operations shall only be used in test cases, altsteps and functions. + **/ + +module NegSem_24_toplevel_002 { + type component GeneralComp {} + + testcase TC_NegSem_24_toplevel_002(verdicttype v_param) runs on GeneralComp { + setverdict(fail); + } + + control { + // BNF allows getverdict in expression -- this is a semantic test + execute(TC_NegSem_24_toplevel_002(getverdict)); + } +} \ No newline at end of file diff --git a/ATS/core_language/24_test_verdict_operations/24_toplevel/NegSem_24_toplevel_003.ttcn b/ATS/core_language/24_test_verdict_operations/24_toplevel/NegSem_24_toplevel_003.ttcn new file mode 100644 index 00000000..0e3ee0fa --- /dev/null +++ b/ATS/core_language/24_test_verdict_operations/24_toplevel/NegSem_24_toplevel_003.ttcn @@ -0,0 +1,22 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:24, Ensure getverdict is not allowed in variable definition in control part. + ** @verdict pass reject + ***************************************************/ +/* + * #reqname /Requirements/24 Test verdict operations/Getverdict and setverdict operations shall only be used in test cases, altsteps and functions. + **/ + +module NegSem_24_toplevel_003 { + type component GeneralComp {} + + testcase TC_NegSem_24_toplevel_003(verdicttype v_param) runs on GeneralComp { + setverdict(fail); + } + + control { + var verdicttype v_verdict := getverdict; + execute(TC_NegSem_24_toplevel_003()) + } +} \ No newline at end of file diff --git a/ATS/core_language/24_test_verdict_operations/24_toplevel/NegSem_24_toplevel_004.ttcn b/ATS/core_language/24_test_verdict_operations/24_toplevel/NegSem_24_toplevel_004.ttcn new file mode 100644 index 00000000..4bd215f3 --- /dev/null +++ b/ATS/core_language/24_test_verdict_operations/24_toplevel/NegSem_24_toplevel_004.ttcn @@ -0,0 +1,26 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.2 + ** @purpose 1:24, Ensure setverdict is not allowed in part whithin compound statement. + ** @verdict pass reject + ***************************************************/ +/* + * #reqname /Requirements/24 Test verdict operations/Getverdict and setverdict operations shall only be used in test cases, altsteps and functions. + **/ + +module NegSem_24_toplevel_004 { + type component GeneralComp {} + + testcase TC_NegSem_24_toplevel_004() runs on GeneralComp { + setverdict(fail); + } + + + control { + if (true) { + // It is allowed by BNF: ControlStatement -> BasicStatements -> ConditionalConstruct -> StatementBlock => SetLocalVerdict + setverdict(pass); + } + execute(TC_NegSem_24_toplevel_004()) + } +} \ No newline at end of file diff --git a/ATS/core_language/24_test_verdict_operations/24_toplevel/NegSem_24_toplevel_005.ttcn b/ATS/core_language/24_test_verdict_operations/24_toplevel/NegSem_24_toplevel_005.ttcn new file mode 100644 index 00000000..5289f691 --- /dev/null +++ b/ATS/core_language/24_test_verdict_operations/24_toplevel/NegSem_24_toplevel_005.ttcn @@ -0,0 +1,25 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.2 + ** @purpose 1:24, Ensure setverdict is not allowed in control part at the top level. + ** @verdict pass reject + ***************************************************/ +/* + * #reqname /Requirements/24 Test verdict operations/Getverdict and setverdict operations shall only be used in test cases, altsteps and functions. + **/ + +module NegSem_24_toplevel_005 { + type component GeneralComp {} + + testcase TC_NegSem_24_toplevel_005() runs on GeneralComp { + setverdict(fail); + } + + + control { + // TODO Check with grammar if it is allowed + // At least grammar allowes it in compound statements + setverdict(pass); + execute(TC_NegSem_24_toplevel_005()) + } +} \ No newline at end of file diff --git a/ATS/core_language/24_test_verdict_operations/24_toplevel/Syn_24_toplevel_001.ttcn b/ATS/core_language/24_test_verdict_operations/24_toplevel/Syn_24_toplevel_001.ttcn new file mode 100644 index 00000000..d7ba2de0 --- /dev/null +++ b/ATS/core_language/24_test_verdict_operations/24_toplevel/Syn_24_toplevel_001.ttcn @@ -0,0 +1,32 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:24, Ensure setverdict and getverdict are allowed in functions + ** @verdict pass accept, noexecution + ***************************************************/ +/* + * #reqname /Requirements/24 Test verdict operations/Getverdict and setverdict operations shall only be used in test cases, altsteps and functions./Setverdict locations/Setverdict in functions allowed + **/ + +module Syn_24_toplevel_001 { + function f_test_setverdict() { + setverdict(none); + setverdict(pass); + setverdict(inconc); + setverdict(fail); + } + + function f_test_variable_assignment() { + var verdicttype v_verdict; + + v_verdict := getverdict; + } + + function f_test_return_getverdict() return verdicttype { + return getverdict; + } + + function f_test_const_init() { + const verdicttype c_v := getverdict; + } +} \ No newline at end of file diff --git a/ATS/core_language/24_test_verdict_operations/24_toplevel/Syn_24_toplevel_002.ttcn b/ATS/core_language/24_test_verdict_operations/24_toplevel/Syn_24_toplevel_002.ttcn new file mode 100644 index 00000000..7b71ccfe --- /dev/null +++ b/ATS/core_language/24_test_verdict_operations/24_toplevel/Syn_24_toplevel_002.ttcn @@ -0,0 +1,30 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:24, Ensure setverdict and getverdict are allowed in test cases + ** @verdict pass accept, noexecution + ***************************************************/ +/* + * #reqname /Requirements/24 Test verdict operations/Getverdict and setverdict operations shall only be used in test cases, altsteps and functions./Setverdict locations/Setverdict allowed in test cases + **/ + +module Syn_24_toplevel_002 { + type component GeneralComp {}; + + testcase TC_Syn_24_toplevel_002_setverdict() runs on GeneralComp { + setverdict(none); + setverdict(pass); + setverdict(inconc); + setverdict(fail); + } + + testcase TC_Syn_24_toplevel_002_getverdict() runs on GeneralComp { + var verdicttype v_verdict; + + v_verdict := getverdict; + } + + testcase TC_Syn_24_toplevel_002_return_getverdict() runs on GeneralComp { + const verdicttype c_v := getverdict; + } +} \ No newline at end of file diff --git a/ATS/core_language/24_test_verdict_operations/24_toplevel/Syn_24_toplevel_003.ttcn b/ATS/core_language/24_test_verdict_operations/24_toplevel/Syn_24_toplevel_003.ttcn new file mode 100644 index 00000000..03fdc497 --- /dev/null +++ b/ATS/core_language/24_test_verdict_operations/24_toplevel/Syn_24_toplevel_003.ttcn @@ -0,0 +1,39 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:24, Ensure setverdict and getverdict are allowed in atsteps + ** @verdict pass accept, noexecution + ***************************************************/ +/* + * #reqname /Requirements/24 Test verdict operations/Getverdict and setverdict operations shall only be used in test cases, altsteps and functions./Setverdict locations/Setverdict allowed in altsteps + **/ + +module Syn_24_toplevel_003 { + type record MessageType { + integer field + } + + type port MessagePort message { + inout MessageType; + } + + type component GeneralComp { + port MessagePort PCO1; + port MessagePort PCO2; + port MessagePort PCO3; + } + + altstep a_test_get_set_verdict() runs on GeneralComp { + var verdicttype v_verdict := getverdict; + + [] PCO1.receive { + setverdict(pass); + } + [] PCO2.receive { + setverdict(inconc); + } + [] PCO3.receive { + setverdict(fail); + } + } +} \ No newline at end of file diff --git a/ATS/core_language/26_module_control/2601_execute_statement/NegSem_2601_ExecuteStatement_001.ttcn b/ATS/core_language/26_module_control/2601_execute_statement/NegSem_2601_ExecuteStatement_001.ttcn new file mode 100644 index 00000000..b4f5b98d --- /dev/null +++ b/ATS/core_language/26_module_control/2601_execute_statement/NegSem_2601_ExecuteStatement_001.ttcn @@ -0,0 +1,20 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:26.1, Ensure that non-float timeout parameters in the execute statement are rejected (in this case int). + ** @verdict pass reject + *****************************************************************/ + +module NegSem_2601_ExecuteStatement_001 { + +type component GeneralComp { } + +testcase TC_NegSem_2601_ExecuteStatement_001() runs on GeneralComp { + setverdict(pass); +} + +control { + execute(TC_NegSem_2601_ExecuteStatement_001(), 1); +} + +} diff --git a/ATS/core_language/26_module_control/2601_execute_statement/NegSem_2601_ExecuteStatement_002.ttcn b/ATS/core_language/26_module_control/2601_execute_statement/NegSem_2601_ExecuteStatement_002.ttcn new file mode 100644 index 00000000..ae85af50 --- /dev/null +++ b/ATS/core_language/26_module_control/2601_execute_statement/NegSem_2601_ExecuteStatement_002.ttcn @@ -0,0 +1,20 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:26.1, Ensure that non-float timeout parameters in the execute statement are rejected (in this case charstring). + ** @verdict pass reject + *****************************************************************/ + +module NegSem_2601_ExecuteStatement_002 { + +type component GeneralComp { } + +testcase TC_NegSem_2601_ExecuteStatement_002() runs on GeneralComp { + setverdict(pass); +} + +control { + execute(TC_NegSem_2601_ExecuteStatement_002(), "foobar"); +} + +} diff --git a/ATS/core_language/26_module_control/2601_execute_statement/NegSem_2601_ExecuteStatement_003.ttcn b/ATS/core_language/26_module_control/2601_execute_statement/NegSem_2601_ExecuteStatement_003.ttcn new file mode 100644 index 00000000..4ae72bf7 --- /dev/null +++ b/ATS/core_language/26_module_control/2601_execute_statement/NegSem_2601_ExecuteStatement_003.ttcn @@ -0,0 +1,22 @@ +/***************************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:26.1, Ensure that host id can be only charstring. + ** @verdict pass reject + *****************************************************************/ + +module NegSem_2601_ExecuteStatement_003 { + +type component GeneralComp { } + +testcase TC_NegSem_2601_ExecuteStatement_003(integer p_value, charstring p_string, boolean p_bool) runs on GeneralComp { + setverdict(pass); +} + +control { + var integer v_test := 20; + var octetstring v_host := '4469707379'O; //not allowed host type + execute(TC_NegSem_2601_ExecuteStatement_003(v_test, "hello", true), -, v_host); +} + +} \ No newline at end of file diff --git a/ATS/core_language/26_module_control/2601_execute_statement/NegSem_2601_ExecuteStatement_004.ttcn b/ATS/core_language/26_module_control/2601_execute_statement/NegSem_2601_ExecuteStatement_004.ttcn new file mode 100644 index 00000000..9e6dead8 --- /dev/null +++ b/ATS/core_language/26_module_control/2601_execute_statement/NegSem_2601_ExecuteStatement_004.ttcn @@ -0,0 +1,21 @@ +/***************************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:26.1, Ensure that execution rejects test case execution with infinity timer guard + ** @verdict pass reject + *****************************************************************/ + +module NegSem_2601_ExecuteStatement_004 { + +type component GeneralComp { } + +testcase TC_NegSem_2601_ExecuteStatement_004(integer p_value, charstring p_string, boolean p_bool) runs on GeneralComp { + setverdict(pass); +} + +control { + var integer v_test := 20; + execute(TC_NegSem_2601_ExecuteStatement_004(v_test, "hello", true), infinity); //not allowed to explicitly assign infinite timer +} + +} \ No newline at end of file diff --git a/ATS/core_language/26_module_control/2601_execute_statement/Sem_2601_ExecuteStatement_001.ttcn b/ATS/core_language/26_module_control/2601_execute_statement/Sem_2601_ExecuteStatement_001.ttcn new file mode 100644 index 00000000..07ce3fe1 --- /dev/null +++ b/ATS/core_language/26_module_control/2601_execute_statement/Sem_2601_ExecuteStatement_001.ttcn @@ -0,0 +1,25 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:26.1, Ensure that parameters are passed correctly into the test case. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_2601_ExecuteStatement_001 { + +type component GeneralComp { } + +testcase TC_Sem_2601_ExecuteStatement_001(integer p_value) runs on GeneralComp { + if (p_value == 20) { + setverdict(pass); + } else { + setverdict(fail); + } +} + +control { + var integer v_test := 20; + execute(TC_Sem_2601_ExecuteStatement_001(v_test)); +} + +} \ No newline at end of file diff --git a/ATS/core_language/26_module_control/2601_execute_statement/Sem_2601_ExecuteStatement_002.ttcn b/ATS/core_language/26_module_control/2601_execute_statement/Sem_2601_ExecuteStatement_002.ttcn new file mode 100644 index 00000000..b855f303 --- /dev/null +++ b/ATS/core_language/26_module_control/2601_execute_statement/Sem_2601_ExecuteStatement_002.ttcn @@ -0,0 +1,28 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:26.1, Ensure that multiple parameters of different types are passed correctly into the test case. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_2601_ExecuteStatement_002 { + +type component GeneralComp { } + +testcase TC_Sem_2601_ExecuteStatement_002(integer p_value, charstring p_string, boolean p_bool) runs on GeneralComp { + if (match(p_value, 20) and + match(p_string, "hello") and + match(p_bool, true) + ){ + setverdict(pass); + } else { + setverdict(fail); + } +} + +control { + var integer v_test := 20; + execute(TC_Sem_2601_ExecuteStatement_002(v_test, "hello", true)); +} + +} \ No newline at end of file diff --git a/ATS/core_language/26_module_control/2601_execute_statement/Sem_2601_ExecuteStatement_003.ttcn b/ATS/core_language/26_module_control/2601_execute_statement/Sem_2601_ExecuteStatement_003.ttcn new file mode 100644 index 00000000..002cac28 --- /dev/null +++ b/ATS/core_language/26_module_control/2601_execute_statement/Sem_2601_ExecuteStatement_003.ttcn @@ -0,0 +1,26 @@ +/***************************************************************** + ** @author STF 409 (updated by STF 521) + ** @version 0.0.2 + ** @purpose 1:26.1, Ensure that the timeout specified with the execute statement is respected. + ** @verdict pass accept, ttcn3verdict:error + *****************************************************************/ + +module Sem_2601_ExecuteStatement_003 { + +type port P message { inout integer; } +type component GeneralComp { port P p; } + +testcase TC_Sem_2601_ExecuteStatement_003() runs on GeneralComp { + alt { // this alt is intentionally blocking! + [] any port.receive { + repeat; + } + } + setverdict(pass); +} + +control { + execute(TC_Sem_2601_ExecuteStatement_003(), 2.0); // let the testcase timeout after 2 seconds +} + +} \ No newline at end of file diff --git a/ATS/core_language/26_module_control/2601_execute_statement/Sem_2601_ExecuteStatement_004.ttcn b/ATS/core_language/26_module_control/2601_execute_statement/Sem_2601_ExecuteStatement_004.ttcn new file mode 100644 index 00000000..d88d894e --- /dev/null +++ b/ATS/core_language/26_module_control/2601_execute_statement/Sem_2601_ExecuteStatement_004.ttcn @@ -0,0 +1,31 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:26.1, Ensure that the verdict none works correctly. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_2601_ExecuteStatement_004 { + +type component GeneralComp { } + +testcase TC_Sem_2601_ExecuteStatement_004() runs on GeneralComp { + setverdict(none); +} + +testcase TC_Sem_2601_ExecuteStatement_004_second(verdicttype p_verdict) runs on GeneralComp { + if (p_verdict == none) { + setverdict(pass); + } else { + setverdict(fail); + } +} + +control { + var verdicttype v_result; + + v_result := execute(TC_Sem_2601_ExecuteStatement_004()); + execute(TC_Sem_2601_ExecuteStatement_004_second(v_result)); +} + +} \ No newline at end of file diff --git a/ATS/core_language/26_module_control/2601_execute_statement/Sem_2601_ExecuteStatement_005.ttcn b/ATS/core_language/26_module_control/2601_execute_statement/Sem_2601_ExecuteStatement_005.ttcn new file mode 100644 index 00000000..e67bc3e3 --- /dev/null +++ b/ATS/core_language/26_module_control/2601_execute_statement/Sem_2601_ExecuteStatement_005.ttcn @@ -0,0 +1,31 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:26.1, Ensure that the verdict pass works correctly. + ** @verdict pass accept, ttcn3verdict:fail + *****************************************************************/ + +module Sem_2601_ExecuteStatement_005 { + +type component GeneralComp { } + +testcase TC_Sem_2601_ExecuteStatement_005() runs on GeneralComp { + setverdict(pass); +} + +testcase TC_Sem_2601_ExecuteStatement_005_second(verdicttype p_verdict) runs on GeneralComp { + if (p_verdict == pass) { + setverdict(fail); + } else { + setverdict(pass); + } +} + +control { + var verdicttype v_result; + + v_result := execute(TC_Sem_2601_ExecuteStatement_005()); + execute(TC_Sem_2601_ExecuteStatement_005_second(v_result)); +} + +} \ No newline at end of file diff --git a/ATS/core_language/26_module_control/2601_execute_statement/Sem_2601_ExecuteStatement_006.ttcn b/ATS/core_language/26_module_control/2601_execute_statement/Sem_2601_ExecuteStatement_006.ttcn new file mode 100644 index 00000000..1bc3a41a --- /dev/null +++ b/ATS/core_language/26_module_control/2601_execute_statement/Sem_2601_ExecuteStatement_006.ttcn @@ -0,0 +1,31 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:26.1, Ensure that the verdict inconc works correctly. + ** @verdict pass accept, ttcn3verdict:inconc + *****************************************************************/ + +module Sem_2601_ExecuteStatement_006 { + +type component GeneralComp { } + +testcase TC_Sem_2601_ExecuteStatement_006() runs on GeneralComp { + setverdict(inconc); +} + +testcase TC_Sem_2601_ExecuteStatement_006_second(verdicttype p_verdict) runs on GeneralComp { + if (p_verdict == inconc) { + setverdict(pass); + } else { + setverdict(fail); + } +} + +control { + var verdicttype v_result; + + v_result := execute(TC_Sem_2601_ExecuteStatement_006()); + execute(TC_Sem_2601_ExecuteStatement_006_second(v_result)); +} + +} \ No newline at end of file diff --git a/ATS/core_language/26_module_control/2601_execute_statement/Sem_2601_ExecuteStatement_007.ttcn b/ATS/core_language/26_module_control/2601_execute_statement/Sem_2601_ExecuteStatement_007.ttcn new file mode 100644 index 00000000..572390ee --- /dev/null +++ b/ATS/core_language/26_module_control/2601_execute_statement/Sem_2601_ExecuteStatement_007.ttcn @@ -0,0 +1,23 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:26.1, Ensure that the timeout specified with the execute statement is respected. + ** @verdict pass accept, ttcn3verdict:error + *****************************************************************/ + +module Sem_2601_ExecuteStatement_007 { + + type component GeneralComp { } + + testcase TC_Sem_2601_ExecuteStatement_007() runs on GeneralComp { + while(true) { + // infinite loop + } + setverdict(pass); + } + + control { + execute(TC_Sem_2601_ExecuteStatement_007(), 2.0); // let the testcase execution timeout after 2 seconds + } + +} \ No newline at end of file diff --git a/ATS/core_language/26_module_control/2601_execute_statement/Sem_2601_ExecuteStatement_008.ttcn b/ATS/core_language/26_module_control/2601_execute_statement/Sem_2601_ExecuteStatement_008.ttcn new file mode 100644 index 00000000..432c7602 --- /dev/null +++ b/ATS/core_language/26_module_control/2601_execute_statement/Sem_2601_ExecuteStatement_008.ttcn @@ -0,0 +1,22 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:26.1, Ensure that the user error sets the verdict error correctly. + ** @verdict pass accept, ttcn3verdict:error + *****************************************************************/ + +module Sem_2601_ExecuteStatement_008 { + + type component GeneralComp { } + + testcase TC_Sem_2601_ExecuteStatement_008() runs on GeneralComp { + testcase.stop("User error!"); + } + + control { + var verdicttype v_result; + + execute(TC_Sem_2601_ExecuteStatement_008()); + } + +} \ No newline at end of file diff --git a/ATS/core_language/26_module_control/2601_execute_statement/Sem_2601_ExecuteStatement_009.ttcn b/ATS/core_language/26_module_control/2601_execute_statement/Sem_2601_ExecuteStatement_009.ttcn new file mode 100644 index 00000000..a771315e --- /dev/null +++ b/ATS/core_language/26_module_control/2601_execute_statement/Sem_2601_ExecuteStatement_009.ttcn @@ -0,0 +1,21 @@ +/***************************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:26.1, Ensure that host id restriction is correctly handled. + ** @verdict pass accept, ttcn3verdict:error + *****************************************************************/ + +module Sem_2601_ExecuteStatement_009 { + + type component GeneralComp { } + + testcase TC_Sem_2601_ExecuteStatement_009(integer p_value, charstring p_string, boolean p_bool) runs on GeneralComp { + setverdict(pass); + } + + control { + var integer v_test := 20; + execute(TC_Sem_2601_ExecuteStatement_009(v_test, "hello", true), -, "wrong_host4232432432432432432432432432"); + } + +} \ No newline at end of file diff --git a/ATS/core_language/26_module_control/2601_execute_statement/Sem_2601_ExecuteStatement_010.ttcn b/ATS/core_language/26_module_control/2601_execute_statement/Sem_2601_ExecuteStatement_010.ttcn new file mode 100644 index 00000000..0edca7c8 --- /dev/null +++ b/ATS/core_language/26_module_control/2601_execute_statement/Sem_2601_ExecuteStatement_010.ttcn @@ -0,0 +1,39 @@ +/***************************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:26.1, verify that test cases can be executed from altsteps called from the control block + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirements are tested: +// c) The execute statement shall not be called from within an existing executing test behaviour +// chain called from a test case, i.e. test cases can only be executed from the control part or +// from functions or altsteps called directly or indirectly from the control part. + +module Sem_2601_ExecuteStatement_010 { + + type component GeneralComp { } + + testcase TC_Sem_2601_ExecuteStatement_010() runs on GeneralComp { + setverdict(pass); + } + + altstep a() { + [] any timer.timeout { + execute(TC_Sem_2601_ExecuteStatement_010()); + } + } + + control { + var verdicttype v_result; + timer t_tmr1 := 0.5, t_tmr2 := 2.0; + t_tmr1.start; + t_tmr2.start; + activate(a()); + alt { // t_tmr1 shall time out first triggering the default and thus executing the test case + [] t_tmr2.timeout { + } + } + } + +} \ No newline at end of file diff --git a/ATS/core_language/26_module_control/2602_the_control_part/NegSem_2602_TheControlPart_001.ttcn b/ATS/core_language/26_module_control/2602_the_control_part/NegSem_2602_TheControlPart_001.ttcn new file mode 100644 index 00000000..668650dc --- /dev/null +++ b/ATS/core_language/26_module_control/2602_the_control_part/NegSem_2602_TheControlPart_001.ttcn @@ -0,0 +1,16 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:26.2, Ensure that setverdict statements are not allowed in the control part. + ** @verdict pass reject + *****************************************************************/ + +module NegSem_2602_TheControlPart_001 { + + type component GeneralComp { } + + control { + setverdict(pass); + } + +} \ No newline at end of file diff --git a/ATS/core_language/26_module_control/2602_the_control_part/NegSem_2602_TheControlPart_002.ttcn b/ATS/core_language/26_module_control/2602_the_control_part/NegSem_2602_TheControlPart_002.ttcn new file mode 100644 index 00000000..8587814f --- /dev/null +++ b/ATS/core_language/26_module_control/2602_the_control_part/NegSem_2602_TheControlPart_002.ttcn @@ -0,0 +1,22 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:26.2, Ensure that the create component is not allowed in the control part. + ** @verdict pass reject + *****************************************************************/ + +module NegSem_2602_TheControlPart_002 { + + type port MyPort message { + inout charstring + } + + type component MTCComp { + port MyPort p; + } + + control { + var MTCComp v_myComp := MTCComp.create; + } + +} \ No newline at end of file diff --git a/ATS/core_language/26_module_control/2602_the_control_part/NegSem_2602_TheControlPart_003.ttcn b/ATS/core_language/26_module_control/2602_the_control_part/NegSem_2602_TheControlPart_003.ttcn new file mode 100644 index 00000000..fe67b7bd --- /dev/null +++ b/ATS/core_language/26_module_control/2602_the_control_part/NegSem_2602_TheControlPart_003.ttcn @@ -0,0 +1,22 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:26.2, Ensure that the create alive component is not allowed in the control part. + ** @verdict pass reject + *****************************************************************/ + +module NegSem_2602_TheControlPart_003 { + + type port MyPort message { + inout charstring + } + + type component MTCComp { + port MyPort p; + } + + control { + var MTCComp v_myComp := MTCComp.create alive; + } + +} \ No newline at end of file diff --git a/ATS/core_language/26_module_control/2602_the_control_part/NegSem_2602_TheControlPart_004.ttcn b/ATS/core_language/26_module_control/2602_the_control_part/NegSem_2602_TheControlPart_004.ttcn new file mode 100644 index 00000000..81063363 --- /dev/null +++ b/ATS/core_language/26_module_control/2602_the_control_part/NegSem_2602_TheControlPart_004.ttcn @@ -0,0 +1,31 @@ +/***************************************************************** + ** @author STF 433 + ** @version 0.0.2 + ** @purpose 1:26.2, Ensure that the start statement is not allowed in the control part. + ** @verdict pass reject + *****************************************************************/ + +module NegSem_2602_TheControlPart_004 { + + type port MyPort message { + inout charstring + } + + type component MTCComp { + port MyPort p; + } + + function f_myBehavior() runs on MTCComp { + setverdict(fail); + } + + function f_createComp() return MTCComp { + return MTCComp.create; + } + + control { + var MTCComp v_myComp := f_createComp(); // assume create was accepted + v_myComp.start(f_myBehavior()); + } + +} \ No newline at end of file diff --git a/ATS/core_language/26_module_control/2602_the_control_part/NegSem_2602_TheControlPart_005.ttcn b/ATS/core_language/26_module_control/2602_the_control_part/NegSem_2602_TheControlPart_005.ttcn new file mode 100644 index 00000000..011598f7 --- /dev/null +++ b/ATS/core_language/26_module_control/2602_the_control_part/NegSem_2602_TheControlPart_005.ttcn @@ -0,0 +1,32 @@ +/***************************************************************** + ** @author STF 433 + ** @version 0.0.2 + ** @purpose 1:26.2, Ensure that the stop statement is not allowed in the control part. + ** @verdict pass reject + *****************************************************************/ + +module NegSem_2602_TheControlPart_005 { + + type port MyPort message { + inout charstring + } + + type component MTCComp { + port MyPort p; + } + + function f_myBehavior() runs on MTCComp { + setverdict(fail); + } + + function f_createComp() return MTCComp { + return MTCComp.create; + } + + control { + var MTCComp v_myComp := f_createComp(); // assume create was accepted + v_myComp.start(f_myBehavior()); + v_myComp.stop; + } + +} \ No newline at end of file diff --git a/ATS/core_language/26_module_control/2602_the_control_part/NegSem_2602_TheControlPart_006.ttcn b/ATS/core_language/26_module_control/2602_the_control_part/NegSem_2602_TheControlPart_006.ttcn new file mode 100644 index 00000000..b71590a7 --- /dev/null +++ b/ATS/core_language/26_module_control/2602_the_control_part/NegSem_2602_TheControlPart_006.ttcn @@ -0,0 +1,32 @@ +/***************************************************************** + ** @author STF 433 + ** @version 0.0.2 + ** @purpose 1:26.2, Ensure that the kill statement is not allowed in the control part. + ** @verdict pass reject + *****************************************************************/ + +module NegSem_2602_TheControlPart_006 { + + type port MyPort message { + inout charstring + } + + type component MTCComp { + port MyPort p; + } + + function f_myBehavior() runs on MTCComp { + setverdict(fail); + } + + function f_createComp() return MTCComp { + return MTCComp.create; + } + + control { + var MTCComp v_myComp := f_createComp(); // assume create was accepted + v_myComp.start(f_myBehavior()); + v_myComp.kill; + } + +} \ No newline at end of file diff --git a/ATS/core_language/26_module_control/2602_the_control_part/NegSem_2602_TheControlPart_007.ttcn b/ATS/core_language/26_module_control/2602_the_control_part/NegSem_2602_TheControlPart_007.ttcn new file mode 100644 index 00000000..4112300b --- /dev/null +++ b/ATS/core_language/26_module_control/2602_the_control_part/NegSem_2602_TheControlPart_007.ttcn @@ -0,0 +1,33 @@ +/***************************************************************** + ** @author STF 433 + ** @version 0.0.2 + ** @purpose 1:26.2, Ensure that the alive operation is not allowed in the control part. + ** @verdict pass reject + *****************************************************************/ + +module NegSem_2602_TheControlPart_007 { + + type port MyPort message { + inout charstring + } + + type component MTCComp { + port MyPort p; + } + + function f_myBehavior() runs on MTCComp { + setverdict(fail); + } + + function f_createComp() return MTCComp { + return MTCComp.create; + } + + control { + var MTCComp v_myComp := f_createComp(); // assume create was accepted + if (v_myComp.alive) { + // should be rejected + } + } + +} \ No newline at end of file diff --git a/ATS/core_language/26_module_control/2602_the_control_part/NegSem_2602_TheControlPart_008.ttcn b/ATS/core_language/26_module_control/2602_the_control_part/NegSem_2602_TheControlPart_008.ttcn new file mode 100644 index 00000000..65079065 --- /dev/null +++ b/ATS/core_language/26_module_control/2602_the_control_part/NegSem_2602_TheControlPart_008.ttcn @@ -0,0 +1,33 @@ +/***************************************************************** + ** @author STF 433 + ** @version 0.0.2 + ** @purpose 1:26.2, Ensure that the running operation is not allowed in the control part. + ** @verdict pass reject + *****************************************************************/ + +module NegSem_2602_TheControlPart_008 { + + type port MyPort message { + inout charstring + } + + type component MTCComp { + port MyPort p; + } + + function f_myBehavior() runs on MTCComp { + setverdict(fail); + } + + function f_createComp() return MTCComp { + return MTCComp.create; + } + + control { + var MTCComp v_myComp := f_createComp(); // assume create was accepted + if (v_myComp.running) { + // should be rejected + } + } + +} \ No newline at end of file diff --git a/ATS/core_language/26_module_control/2602_the_control_part/NegSem_2602_TheControlPart_009.ttcn b/ATS/core_language/26_module_control/2602_the_control_part/NegSem_2602_TheControlPart_009.ttcn new file mode 100644 index 00000000..981b75ae --- /dev/null +++ b/ATS/core_language/26_module_control/2602_the_control_part/NegSem_2602_TheControlPart_009.ttcn @@ -0,0 +1,32 @@ +/***************************************************************** + ** @author STF 433 + ** @version 0.0.2 + ** @purpose 1:26.2, Ensure that the done operation is not allowed in the control part. + ** @verdict pass reject + *****************************************************************/ + +module NegSem_2602_TheControlPart_009 { + + type port MyPort message { + inout charstring + } + + type component MTCComp { + port MyPort p; + } + + function f_myBehavior() runs on MTCComp { + setverdict(fail); + } + + function f_createComp() return MTCComp { + return MTCComp.create; + } + + control { + var MTCComp v_myComp := f_createComp(); // assume create was accepted + v_myComp.start(f_myBehavior()); + v_myComp.done; + } + +} \ No newline at end of file diff --git a/ATS/core_language/26_module_control/2602_the_control_part/NegSem_2602_TheControlPart_010.ttcn b/ATS/core_language/26_module_control/2602_the_control_part/NegSem_2602_TheControlPart_010.ttcn new file mode 100644 index 00000000..b4a7b1ad --- /dev/null +++ b/ATS/core_language/26_module_control/2602_the_control_part/NegSem_2602_TheControlPart_010.ttcn @@ -0,0 +1,33 @@ +/***************************************************************** + ** @author STF 433 + ** @version 0.0.2 + ** @purpose 1:26.2, Ensure that the killed operation is not allowed in the control part. + ** @verdict pass reject + *****************************************************************/ + +module NegSem_2602_TheControlPart_010 { + + type port MyPort message { + inout charstring + } + + type component MTCComp { + port MyPort p; + } + + function f_myBehavior() runs on MTCComp { + setverdict(fail); + } + + function f_createComp() return MTCComp { + return MTCComp.create; + } + + control { + var MTCComp v_myComp := f_createComp(); // assume create was accepted + if (v_myComp.killed) { + // should be rejected + } + } + +} \ No newline at end of file diff --git a/ATS/core_language/26_module_control/2602_the_control_part/NegSem_2602_TheControlPart_011.ttcn b/ATS/core_language/26_module_control/2602_the_control_part/NegSem_2602_TheControlPart_011.ttcn new file mode 100644 index 00000000..8a63bd28 --- /dev/null +++ b/ATS/core_language/26_module_control/2602_the_control_part/NegSem_2602_TheControlPart_011.ttcn @@ -0,0 +1,34 @@ +/***************************************************************** + ** @author STF 433 + ** @version 0.0.2 + ** @purpose 1:26.2, Ensure that the connect statements are not allowed in the control part. + ** @verdict pass reject + *****************************************************************/ + +module NegSem_2602_TheControlPart_011 { + + type port MyPort message { + inout charstring + } + + type component MTCComp { + port MyPort p; + } + + type component PTCComp { + port MyPort p; + } + + function f_createComp() return MTCComp { + return MTCComp.create; + } + + control { + var MTCComp v_firstComp := f_createComp(); // assume create was accepted + var PTCComp v_secondComp := f_createComp(); // assume create was accepted + + connect(v_firstComp:p,v_firstComp:p); + + } + +} \ No newline at end of file diff --git a/ATS/core_language/26_module_control/2602_the_control_part/NegSem_2602_TheControlPart_012.ttcn b/ATS/core_language/26_module_control/2602_the_control_part/NegSem_2602_TheControlPart_012.ttcn new file mode 100644 index 00000000..3a0ba376 --- /dev/null +++ b/ATS/core_language/26_module_control/2602_the_control_part/NegSem_2602_TheControlPart_012.ttcn @@ -0,0 +1,34 @@ +/***************************************************************** + ** @author STF 433 + ** @version 0.0.2 + ** @purpose 1:26.2, Ensure that the disconnect statements are not allowed in the control part. + ** @verdict pass reject + *****************************************************************/ + +module NegSem_2602_TheControlPart_012 { + + type port MyPort message { + inout charstring + } + + type component MTCComp { + port MyPort p; + } + + type component PTCComp { + port MyPort p; + } + + function f_createComp() return MTCComp { + return MTCComp.create; + } + + control { + var MTCComp v_firstComp := f_createComp(); // assume create was accepted + var PTCComp v_secondComp := f_createComp(); // assume create was accepted + + disconnect(v_firstComp:p,v_firstComp:p); + + } + +} \ No newline at end of file diff --git a/ATS/core_language/26_module_control/2602_the_control_part/NegSem_2602_TheControlPart_013.ttcn b/ATS/core_language/26_module_control/2602_the_control_part/NegSem_2602_TheControlPart_013.ttcn new file mode 100644 index 00000000..a01d6620 --- /dev/null +++ b/ATS/core_language/26_module_control/2602_the_control_part/NegSem_2602_TheControlPart_013.ttcn @@ -0,0 +1,34 @@ +/***************************************************************** + ** @author STF 433 + ** @version 0.0.2 + ** @purpose 1:26.2, Ensure that the map statements are not allowed in the control part. + ** @verdict pass reject + *****************************************************************/ + +module NegSem_2602_TheControlPart_013 { + + type port MyPort message { + inout charstring + } + + type component MTCComp { + port MyPort p; + } + + type component PTCComp { + port MyPort p; + } + + function f_createComp() return MTCComp { + return MTCComp.create; + } + + control { + var MTCComp v_firstComp := f_createComp(); // assume create was accepted + var PTCComp v_secondComp := f_createComp(); // assume create was accepted + + map(v_firstComp:p,v_firstComp:p); + + } + +} \ No newline at end of file diff --git a/ATS/core_language/26_module_control/2602_the_control_part/NegSem_2602_TheControlPart_014.ttcn b/ATS/core_language/26_module_control/2602_the_control_part/NegSem_2602_TheControlPart_014.ttcn new file mode 100644 index 00000000..0d1272f4 --- /dev/null +++ b/ATS/core_language/26_module_control/2602_the_control_part/NegSem_2602_TheControlPart_014.ttcn @@ -0,0 +1,34 @@ +/***************************************************************** + ** @author STF 433 + ** @version 0.0.2 + ** @purpose 1:26.2, Ensure that the unmap statements are not allowed in the control part. + ** @verdict pass reject + *****************************************************************/ + +module NegSem_2602_TheControlPart_014 { + + type port MyPort message { + inout charstring + } + + type component MTCComp { + port MyPort p; + } + + type component PTCComp { + port MyPort p; + } + + function f_createComp() return MTCComp { + return MTCComp.create; + } + + control { + var MTCComp v_firstComp := f_createComp(); // assume create was accepted + var PTCComp v_secondComp := f_createComp(); // assume create was accepted + + unmap(v_firstComp:p,v_firstComp:p); + + } + +} \ No newline at end of file diff --git a/ATS/core_language/26_module_control/2602_the_control_part/NegSem_2602_TheControlPart_015.ttcn b/ATS/core_language/26_module_control/2602_the_control_part/NegSem_2602_TheControlPart_015.ttcn new file mode 100644 index 00000000..4bd8f47e --- /dev/null +++ b/ATS/core_language/26_module_control/2602_the_control_part/NegSem_2602_TheControlPart_015.ttcn @@ -0,0 +1,29 @@ +/***************************************************************** + ** @author STF 433 + ** @version 0.0.2 + ** @purpose 1:26.2, Ensure that the send statements are not allowed in the control part. + ** @verdict pass reject + *****************************************************************/ + +module NegSem_2602_TheControlPart_015 { + + type port MyPort message { + inout charstring + } + + type component MTCComp { + port MyPort p; + } + + function f_createComp() return MTCComp { + return MTCComp.create; + } + + control { + var MTCComp v_myComp := f_createComp(); // assume create was accepted + + v_myComp.p.send(charstring:"foobar"); + + } + +} \ No newline at end of file diff --git a/ATS/core_language/26_module_control/2602_the_control_part/NegSem_2602_TheControlPart_016.ttcn b/ATS/core_language/26_module_control/2602_the_control_part/NegSem_2602_TheControlPart_016.ttcn new file mode 100644 index 00000000..6cd00aad --- /dev/null +++ b/ATS/core_language/26_module_control/2602_the_control_part/NegSem_2602_TheControlPart_016.ttcn @@ -0,0 +1,29 @@ +/***************************************************************** + ** @author STF 433 + ** @version 0.0.2 + ** @purpose 1:26.2, Ensure that the receive statements are not allowed in the control part. + ** @verdict pass reject + *****************************************************************/ + +module NegSem_2602_TheControlPart_016 { + + type port MyPort message { + inout charstring + } + + type component MTCComp { + port MyPort p; + } + + function f_createComp() return MTCComp { + return MTCComp.create; + } + + control { + var MTCComp v_myComp := f_createComp(); // assume create was accepted + + v_myComp.p.receive(charstring:"foobar"); + + } + +} \ No newline at end of file diff --git a/ATS/core_language/26_module_control/2602_the_control_part/NegSem_2602_TheControlPart_017.ttcn b/ATS/core_language/26_module_control/2602_the_control_part/NegSem_2602_TheControlPart_017.ttcn new file mode 100644 index 00000000..2c2656c2 --- /dev/null +++ b/ATS/core_language/26_module_control/2602_the_control_part/NegSem_2602_TheControlPart_017.ttcn @@ -0,0 +1,33 @@ +/***************************************************************** + ** @author STF 433 + ** @version 0.0.2 + ** @purpose 1:26.2, Ensure that the call statements are not allowed in the control part. + ** @verdict pass reject + *****************************************************************/ + +module NegSem_2602_TheControlPart_017 { + + type port MyPort procedure { + inout MyProcedure + } + + type component MTCComp { + port MyPort p; + } + + signature MyProcedure(integer p_value, boolean p_bool); + + template MyProcedure s_call := { 2, true } + + function f_createComp() return MTCComp { + return MTCComp.create; + } + + control { + var MTCComp v_myComp := f_createComp(); // assume create was accepted + + v_myComp.p.call(s_call); + + } + +} \ No newline at end of file diff --git a/ATS/core_language/26_module_control/2602_the_control_part/NegSem_2602_TheControlPart_018.ttcn b/ATS/core_language/26_module_control/2602_the_control_part/NegSem_2602_TheControlPart_018.ttcn new file mode 100644 index 00000000..3881c2fe --- /dev/null +++ b/ATS/core_language/26_module_control/2602_the_control_part/NegSem_2602_TheControlPart_018.ttcn @@ -0,0 +1,32 @@ +/***************************************************************** + ** @author STF 433 + ** @version 0.0.2 + ** @purpose 1:26.2, Ensure that the reply statements are not allowed in the control part. + ** @verdict pass reject + *****************************************************************/ + +module NegSem_2602_TheControlPart_018 { + + type port MyPort procedure { + inout MyProcedure + } + + type component MTCComp { + port MyPort p; + } + + signature MyProcedure(integer p_value, boolean p_bool); + + template MyProcedure s_call := { 2, true } + + function f_createComp() return MTCComp { + return MTCComp.create; + } + + control { + var MTCComp v_myComp := f_createComp(); // assume create was accepted + + v_myComp.p.reply(s_call); + } + +} \ No newline at end of file diff --git a/ATS/core_language/26_module_control/2602_the_control_part/NegSem_2602_TheControlPart_019.ttcn b/ATS/core_language/26_module_control/2602_the_control_part/NegSem_2602_TheControlPart_019.ttcn new file mode 100644 index 00000000..45b0f065 --- /dev/null +++ b/ATS/core_language/26_module_control/2602_the_control_part/NegSem_2602_TheControlPart_019.ttcn @@ -0,0 +1,34 @@ +/***************************************************************** + ** @author STF 433 + ** @version 0.0.2 + ** @purpose 1:26.2, Ensure that the raise statements are not allowed in the control part. + ** @verdict pass reject + *****************************************************************/ + +module NegSem_2602_TheControlPart_019 { + + type port MyPort procedure { + inout MyProcedure + } + + type component MTCComp { + port MyPort p; + } + + type charstring Exception; + + signature MyProcedure(integer p_value, boolean p_bool) exception (Exception); + + template Exception s_exception := "Thrown exception"; + + function f_createComp() return MTCComp { + return MTCComp.create; + } + + control { + var MTCComp v_myComp := f_createComp(); // assume create was accepted + + v_myComp.p.raise(MyProcedure, s_exception); + } + +} \ No newline at end of file diff --git a/ATS/core_language/26_module_control/2602_the_control_part/NegSem_2602_TheControlPart_020.ttcn b/ATS/core_language/26_module_control/2602_the_control_part/NegSem_2602_TheControlPart_020.ttcn new file mode 100644 index 00000000..f75c186b --- /dev/null +++ b/ATS/core_language/26_module_control/2602_the_control_part/NegSem_2602_TheControlPart_020.ttcn @@ -0,0 +1,30 @@ +/***************************************************************** + ** @author STF 433 + ** @version 0.0.2 + ** @purpose 1:26.2, Ensure that the trigger statements are not allowed in the control part. + ** @verdict pass reject + *****************************************************************/ + +module NegSem_2602_TheControlPart_020 { + + type port MyPort procedure { + inout MyProcedure + } + + type component MTCComp { + port MyPort p; + } + + signature MyProcedure(integer p_value, boolean p_bool); + + function f_createComp() return MTCComp { + return MTCComp.create; + } + + control { + var MTCComp v_myComp := f_createComp(); // assume create was accepted + var MyProcedure v_procValue; + v_myComp.p.trigger(MyProcedure:?) -> value v_procValue; + } + +} \ No newline at end of file diff --git a/ATS/core_language/26_module_control/2602_the_control_part/NegSem_2602_TheControlPart_021.ttcn b/ATS/core_language/26_module_control/2602_the_control_part/NegSem_2602_TheControlPart_021.ttcn new file mode 100644 index 00000000..1aef9151 --- /dev/null +++ b/ATS/core_language/26_module_control/2602_the_control_part/NegSem_2602_TheControlPart_021.ttcn @@ -0,0 +1,31 @@ +/***************************************************************** + ** @author STF 433 + ** @version 0.0.2 + ** @purpose 1:26.2, Ensure that the getcall statements are not allowed in the control part. + ** @verdict pass reject + *****************************************************************/ + +module NegSem_2602_TheControlPart_021 { + + type port MyPort procedure { + inout MyProcedure + } + + type component MTCComp { + port MyPort p; + } + + signature MyProcedure(integer p_value, boolean p_bool); + + template MyProcedure s_expected := { 1, ? } + + function f_createComp() return MTCComp { + return MTCComp.create; + } + + control { + var MTCComp v_myComp := f_createComp(); // assume create was accepted + + v_myComp.p.getcall(s_expected); + } +} \ No newline at end of file diff --git a/ATS/core_language/26_module_control/2602_the_control_part/NegSem_2602_TheControlPart_022.ttcn b/ATS/core_language/26_module_control/2602_the_control_part/NegSem_2602_TheControlPart_022.ttcn new file mode 100644 index 00000000..fa69b4e5 --- /dev/null +++ b/ATS/core_language/26_module_control/2602_the_control_part/NegSem_2602_TheControlPart_022.ttcn @@ -0,0 +1,30 @@ +/***************************************************************** + ** @author STF 433 + ** @version 0.0.2 + ** @purpose 1:26.2, Ensure that the getreply statements are not allowed in the control part. + ** @verdict pass reject + *****************************************************************/ + +module NegSem_2602_TheControlPart_022 { + + type port MyPort procedure { + inout MyProcedure + } + + type component MTCComp { + port MyPort p; + } + + signature MyProcedure(integer p_value, boolean p_bool); + + function f_createComp() return MTCComp { + return MTCComp.create; + } + + control { + var MTCComp v_myComp := f_createComp(); // assume create was accepted + + v_myComp.p.getreply; + } + +} \ No newline at end of file diff --git a/ATS/core_language/26_module_control/2602_the_control_part/NegSem_2602_TheControlPart_023.ttcn b/ATS/core_language/26_module_control/2602_the_control_part/NegSem_2602_TheControlPart_023.ttcn new file mode 100644 index 00000000..ee57b79d --- /dev/null +++ b/ATS/core_language/26_module_control/2602_the_control_part/NegSem_2602_TheControlPart_023.ttcn @@ -0,0 +1,30 @@ +/***************************************************************** + ** @author STF 433 + ** @version 0.0.2 + ** @purpose 1:26.2, Ensure that the catch statements are not allowed in the control part. + ** @verdict pass reject + *****************************************************************/ + +module NegSem_2602_TheControlPart_023 { + + type port MyPort procedure { + inout MyProcedure + } + + type component MTCComp { + port MyPort p; + } + + signature MyProcedure(integer p_value, boolean p_bool); + + function f_createComp() return MTCComp { + return MTCComp.create; + } + + control { + var MTCComp v_myComp := f_createComp(); // assume create was accepted + + v_myComp.p.catch; + } + +} \ No newline at end of file diff --git a/ATS/core_language/26_module_control/2602_the_control_part/NegSem_2602_TheControlPart_024.ttcn b/ATS/core_language/26_module_control/2602_the_control_part/NegSem_2602_TheControlPart_024.ttcn new file mode 100644 index 00000000..4253b348 --- /dev/null +++ b/ATS/core_language/26_module_control/2602_the_control_part/NegSem_2602_TheControlPart_024.ttcn @@ -0,0 +1,30 @@ +/***************************************************************** + ** @author STF 433 + ** @version 0.0.2 + ** @purpose 1:26.2, Ensure that the check statements are not allowed in the control part. + ** @verdict pass reject + *****************************************************************/ + +module NegSem_2602_TheControlPart_024 { + + type port MyPort procedure { + inout MyProcedure + } + + type component MTCComp { + port MyPort p; + } + + signature MyProcedure(integer p_value, boolean p_bool); + + function f_createComp() return MTCComp { + return MTCComp.create; + } + + control { + var MTCComp v_myComp := f_createComp(); // assume create was accepted + + v_myComp.p.check; + } + +} \ No newline at end of file diff --git a/ATS/core_language/26_module_control/2602_the_control_part/NegSem_2602_TheControlPart_025.ttcn b/ATS/core_language/26_module_control/2602_the_control_part/NegSem_2602_TheControlPart_025.ttcn new file mode 100644 index 00000000..f7a8118d --- /dev/null +++ b/ATS/core_language/26_module_control/2602_the_control_part/NegSem_2602_TheControlPart_025.ttcn @@ -0,0 +1,30 @@ +/***************************************************************** + ** @author STF 433 + ** @version 0.0.2 + ** @purpose 1:26.2, Ensure that the clear statements are not allowed in the control part. + ** @verdict pass reject + *****************************************************************/ + +module NegSem_2602_TheControlPart_025 { + + type port MyPort procedure { + inout MyProcedure + } + + type component MTCComp { + port MyPort p; + } + + signature MyProcedure(integer p_value, boolean p_bool); + + function f_createComp() return MTCComp { + return MTCComp.create; + } + + control { + var MTCComp v_myComp := f_createComp(); // assume create was accepted + + v_myComp.p.clear; + } + +} \ No newline at end of file diff --git a/ATS/core_language/26_module_control/2602_the_control_part/NegSem_2602_TheControlPart_026.ttcn b/ATS/core_language/26_module_control/2602_the_control_part/NegSem_2602_TheControlPart_026.ttcn new file mode 100644 index 00000000..ff5b9ca2 --- /dev/null +++ b/ATS/core_language/26_module_control/2602_the_control_part/NegSem_2602_TheControlPart_026.ttcn @@ -0,0 +1,30 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:26.2, Ensure that the start statements on ports are not allowed in the control part. + ** @verdict pass reject + *****************************************************************/ + +module NegSem_2602_TheControlPart_026 { + + type port MyPort procedure { + inout MyProcedure + } + + type component MTCComp { + port MyPort p; + } + + signature MyProcedure(integer p_value, boolean p_bool); + + function f_createComp() return MTCComp { + return MTCComp.create; + } + + control { + var MTCComp v_myComp := f_createComp(); // assume create was accepted + + v_myComp.p.start; + } + +} \ No newline at end of file diff --git a/ATS/core_language/26_module_control/2602_the_control_part/NegSem_2602_TheControlPart_027.ttcn b/ATS/core_language/26_module_control/2602_the_control_part/NegSem_2602_TheControlPart_027.ttcn new file mode 100644 index 00000000..e72ad03e --- /dev/null +++ b/ATS/core_language/26_module_control/2602_the_control_part/NegSem_2602_TheControlPart_027.ttcn @@ -0,0 +1,30 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:26.2, Ensure that the stop statements on ports are not allowed in the control part. + ** @verdict pass reject + *****************************************************************/ + +module NegSem_2602_TheControlPart_027 { + + type port MyPort procedure { + inout MyProcedure + } + + type component MTCComp { + port MyPort p; + } + + signature MyProcedure(integer p_value, boolean p_bool); + + function f_createComp() return MTCComp { + return MTCComp.create; + } + + control { + var MTCComp v_myComp := f_createComp(); // assume create was accepted + + v_myComp.p.stop; + } + +} \ No newline at end of file diff --git a/ATS/core_language/26_module_control/2602_the_control_part/NegSem_2602_TheControlPart_028.ttcn b/ATS/core_language/26_module_control/2602_the_control_part/NegSem_2602_TheControlPart_028.ttcn new file mode 100644 index 00000000..3275b316 --- /dev/null +++ b/ATS/core_language/26_module_control/2602_the_control_part/NegSem_2602_TheControlPart_028.ttcn @@ -0,0 +1,30 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:26.2, Ensure that the halt statements are not allowed in the control part. + ** @verdict pass reject + *****************************************************************/ + +module NegSem_2602_TheControlPart_028 { + + type port MyPort procedure { + inout MyProcedure + } + + type component MTCComp { + port MyPort p; + } + + signature MyProcedure(integer p_value, boolean p_bool); + + function f_createComp() return MTCComp { + return MTCComp.create; + } + + control { + var MTCComp v_myComp := f_createComp(); // assume create was accepted + + v_myComp.p.halt; + } + +} \ No newline at end of file diff --git a/ATS/core_language/26_module_control/2602_the_control_part/NegSem_2602_TheControlPart_029.ttcn b/ATS/core_language/26_module_control/2602_the_control_part/NegSem_2602_TheControlPart_029.ttcn new file mode 100644 index 00000000..d5b55184 --- /dev/null +++ b/ATS/core_language/26_module_control/2602_the_control_part/NegSem_2602_TheControlPart_029.ttcn @@ -0,0 +1,30 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:26.2, Ensure that alternative behaviours are only used to control timer behavior in the control part. + ** @verdict pass reject + *****************************************************************/ + +module NegSem_2602_TheControlPart_029 { + + type port MyPort message { + inout charstring + } + + type component MTCComp { + port MyPort p; + } + + function f_createComp() return MTCComp { + return MTCComp.create; + } + + control { + var MTCComp v_myComp := f_createComp(); // assume create was accepted + alt { + [] v_myComp.p.receive(charstring:"foobar") { + } + } + } + +} \ No newline at end of file diff --git a/ATS/core_language/26_module_control/2602_the_control_part/NegSem_2602_TheControlPart_030.ttcn b/ATS/core_language/26_module_control/2602_the_control_part/NegSem_2602_TheControlPart_030.ttcn new file mode 100644 index 00000000..3c26d42c --- /dev/null +++ b/ATS/core_language/26_module_control/2602_the_control_part/NegSem_2602_TheControlPart_030.ttcn @@ -0,0 +1,17 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:26.2, Ensure that getverdict statements are not allowed in the control part. + ** @verdict pass reject + *****************************************************************/ + +module NegSem_2602_TheControlPart_030 { + + type component GeneralComp { } + + control { + var verdicttype v_result; + v_result := getverdict; + } + +} \ No newline at end of file diff --git a/ATS/core_language/26_module_control/2602_the_control_part/NegSem_2602_TheControlPart_031.ttcn b/ATS/core_language/26_module_control/2602_the_control_part/NegSem_2602_TheControlPart_031.ttcn new file mode 100644 index 00000000..6019423d --- /dev/null +++ b/ATS/core_language/26_module_control/2602_the_control_part/NegSem_2602_TheControlPart_031.ttcn @@ -0,0 +1,26 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:26.2, Ensure that execute statements are not executed from test cases. + ** @verdict pass reject + *****************************************************************/ + +module NegSem_2602_TheControlPart_031 { + + type component GeneralComp { } + + testcase TC_NegSem_2602_TheControlPart_031() runs on GeneralComp { + setverdict(pass); + execute(TC_NegSem_2602_TheControlPart_031_second()); // shall be rejected + } + + testcase TC_NegSem_2602_TheControlPart_031_second() runs on GeneralComp { + setverdict(fail); + } + + + control { + execute(TC_NegSem_2602_TheControlPart_031()); + } + +} \ No newline at end of file diff --git a/ATS/core_language/26_module_control/2602_the_control_part/NegSem_2602_TheControlPart_032.ttcn b/ATS/core_language/26_module_control/2602_the_control_part/NegSem_2602_TheControlPart_032.ttcn new file mode 100644 index 00000000..ccaccb80 --- /dev/null +++ b/ATS/core_language/26_module_control/2602_the_control_part/NegSem_2602_TheControlPart_032.ttcn @@ -0,0 +1,22 @@ +/***************************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:26.2, Ensure that the create alive named component is not allowed in the control part. + ** @verdict pass reject + *****************************************************************/ + +module NegSem_2602_TheControlPart_032 { + + type port MyPort message { + inout charstring + } + + type component MTCComp { + port MyPort p; + } + + control { + var MTCComp v_myComp := MTCComp.create("component name") alive; + } + +} \ No newline at end of file diff --git a/ATS/core_language/26_module_control/2602_the_control_part/NegSem_2602_TheControlPart_033.ttcn b/ATS/core_language/26_module_control/2602_the_control_part/NegSem_2602_TheControlPart_033.ttcn new file mode 100644 index 00000000..a7bb8c3c --- /dev/null +++ b/ATS/core_language/26_module_control/2602_the_control_part/NegSem_2602_TheControlPart_033.ttcn @@ -0,0 +1,22 @@ +/***************************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:26.2, Ensure that the create named component is not allowed in the control part. + ** @verdict pass reject + *****************************************************************/ + +module NegSem_2602_TheControlPart_033 { + + type port MyPort message { + inout charstring + } + + type component MTCComp { + port MyPort p; + } + + control { + var MTCComp v_myComp := MTCComp.create("component name"); + } + +} \ No newline at end of file diff --git a/ATS/core_language/26_module_control/2602_the_control_part/NegSem_2602_TheControlPart_034.ttcn b/ATS/core_language/26_module_control/2602_the_control_part/NegSem_2602_TheControlPart_034.ttcn new file mode 100644 index 00000000..d4a19d89 --- /dev/null +++ b/ATS/core_language/26_module_control/2602_the_control_part/NegSem_2602_TheControlPart_034.ttcn @@ -0,0 +1,21 @@ +/***************************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:26.2, Ensure that the create named component on host is not allowed in the control part. + ** @verdict pass reject + *****************************************************************/ + +module NegSem_2602_TheControlPart_034 { + + type port MyPort message { + inout charstring + } + + type component MTCComp { + port MyPort p; + } + + control { + var MTCComp v_myComp := MTCComp.create("component name", "localhost"); + } +} \ No newline at end of file diff --git a/ATS/core_language/26_module_control/2602_the_control_part/NegSem_2602_TheControlPart_035.ttcn b/ATS/core_language/26_module_control/2602_the_control_part/NegSem_2602_TheControlPart_035.ttcn new file mode 100644 index 00000000..4cf0b570 --- /dev/null +++ b/ATS/core_language/26_module_control/2602_the_control_part/NegSem_2602_TheControlPart_035.ttcn @@ -0,0 +1,16 @@ +/***************************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:26.2, Ensure that alternative behaviours are only used to control timer behavior in the control part. + ** @verdict pass reject + *****************************************************************/ + +module NegSem_2602_TheControlPart_035 { + control { + alt { + [] any port.receive { + } + } + } + +} \ No newline at end of file diff --git a/ATS/core_language/26_module_control/2602_the_control_part/Sem_2602_TheControlPart_001.ttcn b/ATS/core_language/26_module_control/2602_the_control_part/Sem_2602_TheControlPart_001.ttcn new file mode 100644 index 00000000..27c399d7 --- /dev/null +++ b/ATS/core_language/26_module_control/2602_the_control_part/Sem_2602_TheControlPart_001.ttcn @@ -0,0 +1,34 @@ +/***************************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:26.2, Ensure that the selection/deselection of test cases using boolean conditions works as expected. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_2602_TheControlPart_001 { + + type component GeneralComp { } + + testcase TC_Sem_2602_TheControlPart_001() runs on GeneralComp { + setverdict(fail); + } + + testcase TC_Sem_2602_TheControlPart_001_second() runs on GeneralComp { + setverdict(pass); + } + + control { + if (false) { + execute(TC_Sem_2602_TheControlPart_001()); + } + + if (true) { + execute(TC_Sem_2602_TheControlPart_001_second()); + } + + if (not(1 == 1)) { + execute(TC_Sem_2602_TheControlPart_001()); + } + } + +} \ No newline at end of file diff --git a/ATS/core_language/26_module_control/2602_the_control_part/Sem_2602_TheControlPart_002.ttcn b/ATS/core_language/26_module_control/2602_the_control_part/Sem_2602_TheControlPart_002.ttcn new file mode 100644 index 00000000..ab0812a3 --- /dev/null +++ b/ATS/core_language/26_module_control/2602_the_control_part/Sem_2602_TheControlPart_002.ttcn @@ -0,0 +1,24 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:26.2, Ensure that the execution of test cases works from within a function. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_2602_TheControlPart_002 { + + type component GeneralComp { } + + testcase TC_Sem_2602_TheControlPart_002() runs on GeneralComp { + setverdict(pass); + } + + function f_testCaseExecutionFunction() { + execute(TC_Sem_2602_TheControlPart_002()); + } + + control { + f_testCaseExecutionFunction(); + } + +} \ No newline at end of file diff --git a/ATS/core_language/26_module_control/2602_the_control_part/Sem_2602_TheControlPart_003.ttcn b/ATS/core_language/26_module_control/2602_the_control_part/Sem_2602_TheControlPart_003.ttcn new file mode 100644 index 00000000..23f5532f --- /dev/null +++ b/ATS/core_language/26_module_control/2602_the_control_part/Sem_2602_TheControlPart_003.ttcn @@ -0,0 +1,29 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:26.2, Ensure that the selection of test cases can be achieven based on resulting verdict types. + ** @verdict pass accept, ttcn3verdict:fail + *****************************************************************/ + +module Sem_2602_TheControlPart_003 { + + type component GeneralComp { } + + testcase TC_Sem_2602_TheControlPart_003() runs on GeneralComp { + setverdict(pass); + } + + testcase TC_Sem_2602_TheControlPart_003_second() runs on GeneralComp { + setverdict(fail); + } + + control { + var verdicttype v_result; + v_result := execute(TC_Sem_2602_TheControlPart_003()); + + if (v_result == pass) { + execute(TC_Sem_2602_TheControlPart_003_second()); + } + } + +} \ No newline at end of file diff --git a/ATS/core_language/26_module_control/26_toplevel/Syn_26_ModuleControl_001.ttcn b/ATS/core_language/26_module_control/26_toplevel/Syn_26_ModuleControl_001.ttcn new file mode 100644 index 00000000..d8c08331 --- /dev/null +++ b/ATS/core_language/26_module_control/26_toplevel/Syn_26_ModuleControl_001.ttcn @@ -0,0 +1,14 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:26, Ensure that assignments in the control part are accepted. + ** @verdict pass accept, noexecution + *****************************************************************/ + +module Syn_26_ModuleControl_001 { + +control{ + var integer v_foo := 2; +} + +} \ No newline at end of file diff --git a/ATS/core_language/26_module_control/26_toplevel/Syn_26_ModuleControl_002.ttcn b/ATS/core_language/26_module_control/26_toplevel/Syn_26_ModuleControl_002.ttcn new file mode 100644 index 00000000..e24ef8b6 --- /dev/null +++ b/ATS/core_language/26_module_control/26_toplevel/Syn_26_ModuleControl_002.ttcn @@ -0,0 +1,18 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:26, Ensure that if-else constructs in the control part are accepted. + ** @verdict pass accept, noexecution + *****************************************************************/ + +module Syn_26_ModuleControl_002 { + +control{ + if (1 == 1) { + // do something + } else { + // do something else + } +} + +} \ No newline at end of file diff --git a/ATS/core_language/26_module_control/26_toplevel/Syn_26_ModuleControl_003.ttcn b/ATS/core_language/26_module_control/26_toplevel/Syn_26_ModuleControl_003.ttcn new file mode 100644 index 00000000..b1640493 --- /dev/null +++ b/ATS/core_language/26_module_control/26_toplevel/Syn_26_ModuleControl_003.ttcn @@ -0,0 +1,25 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:26, Ensure that select-case constructs in the control part are accepted. + ** @verdict pass accept, noexecution + *****************************************************************/ + +module Syn_26_ModuleControl_003 { + +control{ + var integer v_test := 1; + select(v_test) { + case(1) { + // do something + } + case(2) { + // do something else + } + case else { + // do something else + } + } +} + +} \ No newline at end of file diff --git a/ATS/core_language/26_module_control/26_toplevel/Syn_26_ModuleControl_004.ttcn b/ATS/core_language/26_module_control/26_toplevel/Syn_26_ModuleControl_004.ttcn new file mode 100644 index 00000000..711d33b8 --- /dev/null +++ b/ATS/core_language/26_module_control/26_toplevel/Syn_26_ModuleControl_004.ttcn @@ -0,0 +1,16 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:26, Ensure that for loop constructs in the control part are accepted. + ** @verdict pass accept, noexecution + *****************************************************************/ + +module Syn_26_ModuleControl_004 { + +control{ + for (var integer v_i:=0; v_i < 10; v_i := v_i + 1) { + // do something + } +} + +} \ No newline at end of file diff --git a/ATS/core_language/26_module_control/26_toplevel/Syn_26_ModuleControl_005.ttcn b/ATS/core_language/26_module_control/26_toplevel/Syn_26_ModuleControl_005.ttcn new file mode 100644 index 00000000..84454842 --- /dev/null +++ b/ATS/core_language/26_module_control/26_toplevel/Syn_26_ModuleControl_005.ttcn @@ -0,0 +1,17 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:26, Ensure that while loop constructs in the control part are accepted. + ** @verdict pass accept, noexecution + *****************************************************************/ + +module Syn_26_ModuleControl_005 { + +control{ + var integer v_i:=0; + while (v_i < 10) { + v_i := v_i + 1; + } +} + +} \ No newline at end of file diff --git a/ATS/core_language/26_module_control/26_toplevel/Syn_26_ModuleControl_006.ttcn b/ATS/core_language/26_module_control/26_toplevel/Syn_26_ModuleControl_006.ttcn new file mode 100644 index 00000000..59a52778 --- /dev/null +++ b/ATS/core_language/26_module_control/26_toplevel/Syn_26_ModuleControl_006.ttcn @@ -0,0 +1,21 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:26, Ensure that label and goto constructs in the control part are accepted. + ** @verdict pass accept, noexecution + *****************************************************************/ + +module Syn_26_ModuleControl_006 { + +control{ + var integer v_i:=0; +label loop; + v_i := v_i + 1; + if (v_i > 10) { + goto end; + } + goto loop; +label end; +} + +} \ No newline at end of file diff --git a/ATS/core_language/26_module_control/26_toplevel/Syn_26_ModuleControl_007.ttcn b/ATS/core_language/26_module_control/26_toplevel/Syn_26_ModuleControl_007.ttcn new file mode 100644 index 00000000..8c88aa5a --- /dev/null +++ b/ATS/core_language/26_module_control/26_toplevel/Syn_26_ModuleControl_007.ttcn @@ -0,0 +1,14 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:26, Ensure that the stop construct in the control part is accepted. + ** @verdict pass accept, noexecution + *****************************************************************/ + +module Syn_26_ModuleControl_007 { + +control{ + stop; +} + +} \ No newline at end of file diff --git a/ATS/core_language/26_module_control/26_toplevel/Syn_26_ModuleControl_008.ttcn b/ATS/core_language/26_module_control/26_toplevel/Syn_26_ModuleControl_008.ttcn new file mode 100644 index 00000000..74d44e67 --- /dev/null +++ b/ATS/core_language/26_module_control/26_toplevel/Syn_26_ModuleControl_008.ttcn @@ -0,0 +1,16 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:26, Ensure that the break construct in the control part is accepted. + ** @verdict pass accept, noexecution + *****************************************************************/ + +module Syn_26_ModuleControl_008 { + +control{ + for (var integer v_i:=0; v_i < 10; v_i := v_i + 1) { + break; + } +} + +} \ No newline at end of file diff --git a/ATS/core_language/26_module_control/26_toplevel/Syn_26_ModuleControl_009.ttcn b/ATS/core_language/26_module_control/26_toplevel/Syn_26_ModuleControl_009.ttcn new file mode 100644 index 00000000..dd885aa6 --- /dev/null +++ b/ATS/core_language/26_module_control/26_toplevel/Syn_26_ModuleControl_009.ttcn @@ -0,0 +1,16 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:26, Ensure that the continue construct in the control part is accepted. + ** @verdict pass accept, noexecution + *****************************************************************/ + +module Syn_26_ModuleControl_009 { + +control{ + for (var integer v_i:=0; v_i < 10; v_i := v_i + 1) { + continue; + } +} + +} \ No newline at end of file diff --git a/ATS/core_language/26_module_control/26_toplevel/Syn_26_ModuleControl_010.ttcn b/ATS/core_language/26_module_control/26_toplevel/Syn_26_ModuleControl_010.ttcn new file mode 100644 index 00000000..b01dee70 --- /dev/null +++ b/ATS/core_language/26_module_control/26_toplevel/Syn_26_ModuleControl_010.ttcn @@ -0,0 +1,14 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:26, Ensure that the continue construct in the control part is accepted. + ** @verdict pass accept, noexecution + *****************************************************************/ + +module Syn_26_ModuleControl_010 { + +control{ + log("Hello World"); +} + +} \ No newline at end of file diff --git a/ATS/core_language/26_module_control/26_toplevel/Syn_26_ModuleControl_011.ttcn b/ATS/core_language/26_module_control/26_toplevel/Syn_26_ModuleControl_011.ttcn new file mode 100644 index 00000000..87112752 --- /dev/null +++ b/ATS/core_language/26_module_control/26_toplevel/Syn_26_ModuleControl_011.ttcn @@ -0,0 +1,20 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:26, Ensure that the alt/timeout construct in the control part is accepted. + ** @verdict pass accept, noexecution + *****************************************************************/ + +module Syn_26_ModuleControl_011 { + +control{ + timer t_timer; + t_timer.start(20E-3); + alt { + [] t_timer.timeout { + // do something + } + } +} + +} \ No newline at end of file diff --git a/ATS/core_language/26_module_control/26_toplevel/Syn_26_ModuleControl_012.ttcn b/ATS/core_language/26_module_control/26_toplevel/Syn_26_ModuleControl_012.ttcn new file mode 100644 index 00000000..32349bc9 --- /dev/null +++ b/ATS/core_language/26_module_control/26_toplevel/Syn_26_ModuleControl_012.ttcn @@ -0,0 +1,20 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:26, Ensure that the repeat construct in the control part is accepted. + ** @verdict pass accept, noexecution + *****************************************************************/ + +module Syn_26_ModuleControl_012 { + +control{ + timer t_timer; + t_timer.start(20E-3); + alt { + [] t_timer.timeout { + repeat; + } + } +} + +} \ No newline at end of file diff --git a/ATS/core_language/26_module_control/26_toplevel/Syn_26_ModuleControl_013.ttcn b/ATS/core_language/26_module_control/26_toplevel/Syn_26_ModuleControl_013.ttcn new file mode 100644 index 00000000..529b9b89 --- /dev/null +++ b/ATS/core_language/26_module_control/26_toplevel/Syn_26_ModuleControl_013.ttcn @@ -0,0 +1,23 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:26, Ensure that the interleave construct in the control part is accepted. + ** @verdict pass accept, noexecution + *****************************************************************/ + +module Syn_26_ModuleControl_013 { + +control{ + timer t_timerOne; + timer t_timerTwo; + t_timerOne.start(20E-3); + t_timerTwo.start(30E-3); + interleave { + [] t_timerOne.timeout { + } + [] t_timerTwo.timeout { + } + } +} + +} \ No newline at end of file diff --git a/ATS/core_language/26_module_control/26_toplevel/Syn_26_ModuleControl_015.ttcn b/ATS/core_language/26_module_control/26_toplevel/Syn_26_ModuleControl_015.ttcn new file mode 100644 index 00000000..cc4338c1 --- /dev/null +++ b/ATS/core_language/26_module_control/26_toplevel/Syn_26_ModuleControl_015.ttcn @@ -0,0 +1,29 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:26, Ensure that start/stop/read/running timer constructs in the control part are accepted. + ** @verdict pass accept, noexecution + *****************************************************************/ + +module Syn_26_ModuleControl_015 { + +type component GeneralComp { } + +altstep a_test(timer p_timer) runs on GeneralComp { + [] p_timer.timeout { + } +} + +control{ + timer t_timer; + var float v_value; + t_timer.start(20E-3); + v_value := t_timer.read; + if (t_timer.running) { + // do something + } + + t_timer.stop; +} + +} \ No newline at end of file diff --git a/ATS/core_language/26_module_control/26_toplevel/Syn_26_ModuleControl_016.ttcn b/ATS/core_language/26_module_control/26_toplevel/Syn_26_ModuleControl_016.ttcn new file mode 100644 index 00000000..65bffc54 --- /dev/null +++ b/ATS/core_language/26_module_control/26_toplevel/Syn_26_ModuleControl_016.ttcn @@ -0,0 +1,14 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:26, Ensure that the action construct in the control part is accepted. + ** @verdict pass accept, noexecution + *****************************************************************/ + +module Syn_26_ModuleControl_016 { + +control{ + action("Send template on lower PCO now!"); +} + +} \ No newline at end of file diff --git a/ATS/core_language/26_module_control/26_toplevel/Syn_26_ModuleControl_017.ttcn b/ATS/core_language/26_module_control/26_toplevel/Syn_26_ModuleControl_017.ttcn new file mode 100644 index 00000000..b85fb3c1 --- /dev/null +++ b/ATS/core_language/26_module_control/26_toplevel/Syn_26_ModuleControl_017.ttcn @@ -0,0 +1,19 @@ +/***************************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:26, Ensure that the execute construct in the control part is accepted. + ** @verdict pass accept, noexecution + *****************************************************************/ + +module Syn_26_ModuleControl_017 { + +type component GeneralComp { } + +testcase t_myTestCase() runs on GeneralComp { +} + +control{ + execute(t_myTestCase()); +} + +} \ No newline at end of file diff --git a/ATS/core_language/27_specifying_attributes/2701_attribute_mechanism/270101_scope_of_attributes/Syn_270101_ScopeOfAttributes_001.ttcn b/ATS/core_language/27_specifying_attributes/2701_attribute_mechanism/270101_scope_of_attributes/Syn_270101_ScopeOfAttributes_001.ttcn new file mode 100644 index 00000000..6a5b083c --- /dev/null +++ b/ATS/core_language/27_specifying_attributes/2701_attribute_mechanism/270101_scope_of_attributes/Syn_270101_ScopeOfAttributes_001.ttcn @@ -0,0 +1,16 @@ +/***************************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:27.1.1, Ensure that attributes for language elements are accepted. + ** @verdict pass accept, noexecution + *****************************************************************/ + +module Syn_270101_ScopeOfAttributes_001 { + + type record of integer IntegerList + with { + display "colour red"; + extension "MyRule" + } + +} \ No newline at end of file diff --git a/ATS/core_language/27_specifying_attributes/2701_attribute_mechanism/270101_scope_of_attributes/Syn_270101_ScopeOfAttributes_002.ttcn b/ATS/core_language/27_specifying_attributes/2701_attribute_mechanism/270101_scope_of_attributes/Syn_270101_ScopeOfAttributes_002.ttcn new file mode 100644 index 00000000..69e75fec --- /dev/null +++ b/ATS/core_language/27_specifying_attributes/2701_attribute_mechanism/270101_scope_of_attributes/Syn_270101_ScopeOfAttributes_002.ttcn @@ -0,0 +1,22 @@ +/***************************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:27.1.1, Ensure that attributes for language elements are accepted. + ** @verdict pass accept, noexecution + *****************************************************************/ + +module Syn_270101_ScopeOfAttributes_002 { + + type record MyRecord { + integer field1, + record { + integer innerField1, + boolean innerField2 + } field2 + } + with { + display "colour red"; + extension "MyRule" + } + +} \ No newline at end of file diff --git a/ATS/core_language/27_specifying_attributes/2701_attribute_mechanism/270101_scope_of_attributes/Syn_270101_ScopeOfAttributes_003.ttcn b/ATS/core_language/27_specifying_attributes/2701_attribute_mechanism/270101_scope_of_attributes/Syn_270101_ScopeOfAttributes_003.ttcn new file mode 100644 index 00000000..c256bab8 --- /dev/null +++ b/ATS/core_language/27_specifying_attributes/2701_attribute_mechanism/270101_scope_of_attributes/Syn_270101_ScopeOfAttributes_003.ttcn @@ -0,0 +1,26 @@ +/***************************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:27.1.1, Ensure that attributes for individual fields are accepted. + ** @verdict pass accept, noexecution + *****************************************************************/ + +module Syn_270101_ScopeOfAttributes_003 { + + type record of integer IntegerList + with { + display "colour red"; + extension "MyRule" + } + + const IntegerList c_MyIntegers1 := {0,1,2,3} + with { + display ([-]) "colour green" + } + + const IntegerList c_MyIntegers2 := {0,1,2,3} + with { + display ([0]) "colour black"; + } + +} \ No newline at end of file diff --git a/ATS/core_language/27_specifying_attributes/2701_attribute_mechanism/270101_scope_of_attributes/Syn_270101_ScopeOfAttributes_004.ttcn b/ATS/core_language/27_specifying_attributes/2701_attribute_mechanism/270101_scope_of_attributes/Syn_270101_ScopeOfAttributes_004.ttcn new file mode 100644 index 00000000..14cf87e2 --- /dev/null +++ b/ATS/core_language/27_specifying_attributes/2701_attribute_mechanism/270101_scope_of_attributes/Syn_270101_ScopeOfAttributes_004.ttcn @@ -0,0 +1,28 @@ +/***************************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:27.1.1, Ensure that attributes for individual fields are accepted. + ** @verdict pass accept, noexecution + *****************************************************************/ + +module Syn_270101_ScopeOfAttributes_004 { + + type record MyRecord { + integer field1, + record { + integer innerField1, + boolean innerField2 + } field2 + } + with { + display "colour red"; + extension "MyRule" + } + + const MyRecord c_record := {0,{1,true}} + with { + display (field2.innerField1) "colour green" + } + + +} \ No newline at end of file diff --git a/ATS/core_language/27_specifying_attributes/2701_attribute_mechanism/270101_scope_of_attributes/Syn_270101_ScopeOfAttributes_005.ttcn b/ATS/core_language/27_specifying_attributes/2701_attribute_mechanism/270101_scope_of_attributes/Syn_270101_ScopeOfAttributes_005.ttcn new file mode 100644 index 00000000..03b37e59 --- /dev/null +++ b/ATS/core_language/27_specifying_attributes/2701_attribute_mechanism/270101_scope_of_attributes/Syn_270101_ScopeOfAttributes_005.ttcn @@ -0,0 +1,27 @@ +/***************************************************************** + ** @author STF 548 + ** @version 0.0.1 + ** @purpose 1:27.1.1, Verify that attributes of synonym types can use field references + ** @verdict pass accept, noexecution + *****************************************************************/ + + // The following requirements are tested: + + // Attributes can be attached to synonym types (6.4). If the synonym type is a structured type, + // attributes in the with statement may reference fields or elements of this structured type. + +module Syn_270101_ScopeOfAttributes_004 { + + type record MyRecord { + integer field1, + record { + integer innerField1, + boolean innerField2 + } field2 + } + + type MyRecord MyRecord2 + with { + display(field1.innerField1) "colour red"; + } +} \ No newline at end of file diff --git a/ATS/core_language/27_specifying_attributes/2701_attribute_mechanism/270102_overwriting_rules/27010200_general/Sem_27010200_general_001.ttcn b/ATS/core_language/27_specifying_attributes/2701_attribute_mechanism/270102_overwriting_rules/27010200_general/Sem_27010200_general_001.ttcn new file mode 100644 index 00000000..1ca8013d --- /dev/null +++ b/ATS/core_language/27_specifying_attributes/2701_attribute_mechanism/270102_overwriting_rules/27010200_general/Sem_27010200_general_001.ttcn @@ -0,0 +1,36 @@ +/***************************************************************** + ** @author STF 548 + ** @version 0.0.1 + ** @purpose 1:27.1.2.0, Verify that attributes from lower scopes override attribute from higher scopes + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirement is tested: +// An attribute definition that is directly attached to a lower scope unit will override a general attribute +// definition in a higher scope and a type-specific attribute inherited from a type reference. + +module Sem_27010200_general_001 { + + type component GeneralComp { + } + + type record R { + } with { encode "RuleA" } + + type record of universal charstring RoUC; + + testcase TC_Sem_27010200_general_001 () runs on GeneralComp { + var RoUC v_enc := R.encode; + if(v_enc[0] == "RuleA") { + setverdict(pass); + } else { + setverdict(fail); + } + } + + + control{ + execute(TC_Sem_27010200_general_001()); + } + +} with { encode "GeneralRule" } \ No newline at end of file diff --git a/ATS/core_language/27_specifying_attributes/2701_attribute_mechanism/270102_overwriting_rules/27010200_general/Sem_27010200_general_002.ttcn b/ATS/core_language/27_specifying_attributes/2701_attribute_mechanism/270102_overwriting_rules/27010200_general/Sem_27010200_general_002.ttcn new file mode 100644 index 00000000..551b591e --- /dev/null +++ b/ATS/core_language/27_specifying_attributes/2701_attribute_mechanism/270102_overwriting_rules/27010200_general/Sem_27010200_general_002.ttcn @@ -0,0 +1,39 @@ +/***************************************************************** + ** @author STF 548 + ** @version 0.0.1 + ** @purpose 1:27.1.2.0, Verify that attributes from lower scopes override attribute from type reference + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirement is tested: +// An attribute definition that is directly attached to a lower scope unit will override a general attribute +// definition in a higher scope and a type-specific attribute inherited from a type reference. + +module Sem_27010200_general_002 { + + type component GeneralComp { + } + + type integer I with { encode "RuleA" } + + type record R { + I field1 + } with { encode(field1) "RuleB" } + + type record of universal charstring RoUC; + + testcase TC_Sem_27010200_general_002 () runs on GeneralComp { + var RoUC v_enc := R.field1.encode; + if(v_enc[0] == "RuleB") { + setverdict(pass); + } else { + setverdict(fail); + } + } + + + control{ + execute(TC_Sem_27010200_general_002()); + } + +} with { encode "GeneralRule" } \ No newline at end of file diff --git a/ATS/core_language/27_specifying_attributes/2701_attribute_mechanism/270102_overwriting_rules/27010200_general/Sem_27010200_general_003.ttcn b/ATS/core_language/27_specifying_attributes/2701_attribute_mechanism/270102_overwriting_rules/27010200_general/Sem_27010200_general_003.ttcn new file mode 100644 index 00000000..92265a01 --- /dev/null +++ b/ATS/core_language/27_specifying_attributes/2701_attribute_mechanism/270102_overwriting_rules/27010200_general/Sem_27010200_general_003.ttcn @@ -0,0 +1,41 @@ +/***************************************************************** + ** @author STF 548 + ** @version 0.0.1 + ** @purpose 1:27.1.2.0, Verify that attributes from type reference override attributes from higher scopes + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirement is tested: +// Attributes inherited from a type reference will override general attributes from a higher scope unit +// containing the type reference. + +module Sem_27010200_general_003 { + + type component GeneralComp { + } + + type record MyRecordA { + } with { encode "RuleA" } + + type record MyRecordB + { + MyRecordA field + } with { encode "RuleB" } + + type record of universal charstring RoUC; + + testcase TC_Sem_27010200_general_003 () runs on GeneralComp { + var RoUC v_enc := MyRecordB.field.encode; + if(v_enc[0] == "RuleA") { + setverdict(pass); + } else { + setverdict(fail); + } + } + + + control{ + execute(TC_Sem_27010200_general_003()); + } + +} with { encode "GeneralRule" } \ No newline at end of file diff --git a/ATS/core_language/27_specifying_attributes/2701_attribute_mechanism/270102_overwriting_rules/27010200_general/Sem_27010200_general_004.ttcn b/ATS/core_language/27_specifying_attributes/2701_attribute_mechanism/270102_overwriting_rules/27010200_general/Sem_27010200_general_004.ttcn new file mode 100644 index 00000000..90327a99 --- /dev/null +++ b/ATS/core_language/27_specifying_attributes/2701_attribute_mechanism/270102_overwriting_rules/27010200_general/Sem_27010200_general_004.ttcn @@ -0,0 +1,33 @@ +/***************************************************************** + ** @author STF 548 + ** @version 0.0.1 + ** @purpose 1:27.1.2.0, Verify that attributes from lower scopes override attribute from higher scopes + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirement is tested: +// A with statement that is placed inside the scope of another with statement shall override the outermost with. + +module Sem_27010200_general_004 { + + type component GeneralComp { + } + + type record of universal charstring RoUC; + + testcase TC_Sem_27010200_general_004 () runs on GeneralComp { + const integer c_zero := 0; + var RoUC v_enc := c_zero.encode; + if(v_enc[0] == "RuleA") { + setverdict(pass); + } else { + setverdict(fail); + } + } with { encode "RuleA" } + + + control{ + execute(TC_Sem_27010200_general_004()); + } + +} with { encode "GeneralRule" } \ No newline at end of file diff --git a/ATS/core_language/27_specifying_attributes/2701_attribute_mechanism/270102_overwriting_rules/27010200_general/Sem_27010200_general_005.ttcn b/ATS/core_language/27_specifying_attributes/2701_attribute_mechanism/270102_overwriting_rules/27010200_general/Sem_27010200_general_005.ttcn new file mode 100644 index 00000000..f2be5296 --- /dev/null +++ b/ATS/core_language/27_specifying_attributes/2701_attribute_mechanism/270102_overwriting_rules/27010200_general/Sem_27010200_general_005.ttcn @@ -0,0 +1,43 @@ +/***************************************************************** + ** @author STF 548 + ** @version 0.0.1 + ** @purpose 1:27.1.2.0, Verify that attributes from type reference override attributes from higher scopes + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirement is tested: +// Attributes inherited from a type reference will override general attributes from a higher scope unit. + +// Note: +// 1. The type R gets its attribute from the module +// 2. The constant c_r gets its attribute from two sources: the R type and the scope unit (the test case) +// 3. Because the R reference is preferred, the attribute originating from the module level will be used +// even though the scope unit where the c_r unit seemingly overrides it + + +module Sem_27010200_general_005 { + + type component GeneralComp { + } + + type record R { + } + + type record of universal charstring RoUC; + + testcase TC_Sem_27010200_general_005 () runs on GeneralComp { + const R c_r := {}; + var RoUC v_enc := c_r.encode; + if(v_enc[0] == "GeneralRule") { + setverdict(pass); + } else { + setverdict(fail); + } + } with { encode "RuleA" } + + + control{ + execute(TC_Sem_27010200_general_005()); + } + +} with { encode "GeneralRule" } \ No newline at end of file diff --git a/ATS/core_language/27_specifying_attributes/2701_attribute_mechanism/270102_overwriting_rules/27010200_general/Sem_27010200_general_006.ttcn b/ATS/core_language/27_specifying_attributes/2701_attribute_mechanism/270102_overwriting_rules/27010200_general/Sem_27010200_general_006.ttcn new file mode 100644 index 00000000..ef3a54c3 --- /dev/null +++ b/ATS/core_language/27_specifying_attributes/2701_attribute_mechanism/270102_overwriting_rules/27010200_general/Sem_27010200_general_006.ttcn @@ -0,0 +1,43 @@ +/***************************************************************** + ** @author STF 548 + ** @version 0.0.1 + ** @purpose 1:27.1.2.0, Verify that attributes from lower group scopes override attribute from higher group scopes + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirement is tested: +// A with statement that is placed inside the scope of another with statement shall override the outermost with. +// This shall also apply to the use of the with statement with groups. + +module Sem_27010200_general_006 { + + type component GeneralComp { + } + + group myPDUs + { + type record MyPDU1 { } + group mySpecialPDUs { + type record MyPDU2 { } + } with { extension "MySpecialRule" } + } with { + extension "MyRule"; + } + + type record of universal charstring RoUC; + + testcase TC_Sem_27010200_general_006 () runs on GeneralComp { + var RoUC v_enc1 := MyPDU1.extension, + v_enc2 := MyPDU2.extension; + if(v_enc1[0] == "MyRule" and v_enc2[0] == "MySpecialRule") { + setverdict(pass); + } else { + setverdict(fail); + } + } + + control { + execute(TC_Sem_27010200_general_006()); + } + +} with { extension "GeneralRule" } \ No newline at end of file diff --git a/ATS/core_language/27_specifying_attributes/2701_attribute_mechanism/270102_overwriting_rules/27010200_general/Sem_27010200_general_007.ttcn b/ATS/core_language/27_specifying_attributes/2701_attribute_mechanism/270102_overwriting_rules/27010200_general/Sem_27010200_general_007.ttcn new file mode 100644 index 00000000..6ffb7362 --- /dev/null +++ b/ATS/core_language/27_specifying_attributes/2701_attribute_mechanism/270102_overwriting_rules/27010200_general/Sem_27010200_general_007.ttcn @@ -0,0 +1,42 @@ +/***************************************************************** + ** @author STF 548 + ** @version 0.0.1 + ** @purpose 1:27.1.2.0, Verify that in case of multiple attributes all attributes are overridden + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirement is tested: +// If multiple attributes of the same type are allowed, all of them are overridden unless specified otherwise. + +module Sem_27010200_general_007 { + + type component GeneralComp { + } + + group myPDUs + { + type record MyPDU1 { } + group mySpecialPDUs { + type record MyPDU2 { } + } with { extension "MySpecialRule" } + } with { + extension "MyRule"; + extension "MyAdditionalRule" + } + + type record of universal charstring RoUC; + + testcase TC_Sem_27010200_general_007 () runs on GeneralComp { + var RoUC v_enc := MyPDU2.extension; + if(lengthof(v_enc) == 1 and v_enc[0] == "MySpecialRule") { + setverdict(pass); + } else { + setverdict(fail); + } + } + + control { + execute(TC_Sem_27010200_general_007()); + } + +} with { extension "GeneralRule" } \ No newline at end of file diff --git a/ATS/core_language/27_specifying_attributes/2701_attribute_mechanism/270102_overwriting_rules/27010200_general/Sem_27010200_general_008.ttcn b/ATS/core_language/27_specifying_attributes/2701_attribute_mechanism/270102_overwriting_rules/27010200_general/Sem_27010200_general_008.ttcn new file mode 100644 index 00000000..a1965638 --- /dev/null +++ b/ATS/core_language/27_specifying_attributes/2701_attribute_mechanism/270102_overwriting_rules/27010200_general/Sem_27010200_general_008.ttcn @@ -0,0 +1,42 @@ +/***************************************************************** + ** @author STF 548 + ** @version 0.0.1 + ** @purpose 1:27.1.2.0, Verify that attributes of synonym types do not override existing attributes of fields + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirement is tested: +// Attributes defined for a synonym type don't override existing attributes of fields or elements of this synonym type. + +module Sem_27010200_general_008 { + + type component GeneralComp { + } + + type record SourceType2 { + integer field1, + integer field2 + } with { encode "Rule1" } + + type SourceType2 SynonymType2 with { encode "Rule3" } + + type record of universal charstring RoUC; + + testcase TC_Sem_27010200_general_008 () runs on GeneralComp { + var RoUC v_enc1 := SynonymType2.encode, + v_enc2 := SynonymType2.field1.encode, + v_enc3 := SynonymType2.field2.encode; + if(lengthof(v_enc1) == 1 and v_enc1[0] == "Rule3" and + lengthof(v_enc2) == 1 and v_enc2[0] == "Rule1" and + lengthof(v_enc3) == 1 and v_enc3[0] == "Rule1") { + setverdict(pass); + } else { + setverdict(fail); + } + } + + control { + execute(TC_Sem_27010200_general_008()); + } + +} \ No newline at end of file diff --git a/ATS/core_language/27_specifying_attributes/2701_attribute_mechanism/270102_overwriting_rules/27010200_general/Sem_27010200_general_009.ttcn b/ATS/core_language/27_specifying_attributes/2701_attribute_mechanism/270102_overwriting_rules/27010200_general/Sem_27010200_general_009.ttcn new file mode 100644 index 00000000..68703a8a --- /dev/null +++ b/ATS/core_language/27_specifying_attributes/2701_attribute_mechanism/270102_overwriting_rules/27010200_general/Sem_27010200_general_009.ttcn @@ -0,0 +1,43 @@ +/***************************************************************** + ** @author STF 548 + ** @version 0.0.1 + ** @purpose 1:27.1.2.0, Verify that attributes of synonym types apply to fields with no existing attributes + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirement is tested: +// The attributes are applied to the fields or elements of synonym types only if the fields or elements have no +// valid attributes. + +module Sem_27010200_general_009 { + + type component GeneralComp { + } + + type record SourceType1 { + integer field1, + integer field2 + } + + type SourceType1 SynonymType1 with { encode "Rule2" } + + type record of universal charstring RoUC; + + testcase TC_Sem_27010200_general_009 () runs on GeneralComp { + var RoUC v_enc1 := SynonymType1.encode, + v_enc2 := SynonymType1.field1.encode, + v_enc3 := SynonymType1.field2.encode; + if(lengthof(v_enc1) == 1 and v_enc1[0] == "Rule2" and + lengthof(v_enc2) == 1 and v_enc2[0] == "Rule2" and + lengthof(v_enc3) == 1 and v_enc3[0] == "Rule2") { + setverdict(pass); + } else { + setverdict(fail); + } + } + + control { + execute(TC_Sem_27010200_general_009()); + } + +} \ No newline at end of file diff --git a/ATS/core_language/27_specifying_attributes/2701_attribute_mechanism/270102_overwriting_rules/27010200_general/Sem_27010200_general_010.ttcn b/ATS/core_language/27_specifying_attributes/2701_attribute_mechanism/270102_overwriting_rules/27010200_general/Sem_27010200_general_010.ttcn new file mode 100644 index 00000000..615c373a --- /dev/null +++ b/ATS/core_language/27_specifying_attributes/2701_attribute_mechanism/270102_overwriting_rules/27010200_general/Sem_27010200_general_010.ttcn @@ -0,0 +1,42 @@ +/***************************************************************** + ** @author STF 548 + ** @version 0.0.1 + ** @purpose 1:27.1.2.0, Verify that @local attribute is not applied to lower scopes + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirement is tested: +// Attributes with the @local modifier override attributes from higher scope, but they are valid for the associated +// language element only. They do not affect definitions inside the associated language element as the @local +// attribute is completely transparent to lower scopes. + +module Sem_27010200_general_010 { + + type component GeneralComp { + } + + type record R { + integer field1, + integer field2 + } with { encode @local "Rule1" } + + type record of universal charstring RoUC; + + testcase TC_Sem_27010200_general_010 () runs on GeneralComp { + var RoUC v_enc1 := R.encode, + v_enc2 := R.field1.encode, + v_enc3 := R.field2.encode; + if(lengthof(v_enc1) == 1 and v_enc1[0] == "Rule1" and + lengthof(v_enc2) == 0 and + lengthof(v_enc3) == 0) { + setverdict(pass); + } else { + setverdict(fail); + } + } + + control { + execute(TC_Sem_27010200_general_010()); + } + +} \ No newline at end of file diff --git a/ATS/core_language/27_specifying_attributes/2701_attribute_mechanism/270102_overwriting_rules/27010200_general/Sem_27010200_general_011.ttcn b/ATS/core_language/27_specifying_attributes/2701_attribute_mechanism/270102_overwriting_rules/27010200_general/Sem_27010200_general_011.ttcn new file mode 100644 index 00000000..75c36c64 --- /dev/null +++ b/ATS/core_language/27_specifying_attributes/2701_attribute_mechanism/270102_overwriting_rules/27010200_general/Sem_27010200_general_011.ttcn @@ -0,0 +1,40 @@ +/***************************************************************** + ** @author STF 548 + ** @version 0.0.1 + ** @purpose 1:27.1.2.0, Verify that attributes from higher scopes are applied to lower scopes when @local attribute is between them + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirement is tested: +// Attributes from higher scope will still affect attributes in lower scopes even if the @local attribute is +// between them. + +module Sem_27010200_general_011 { + + type component GeneralComp { + } + + type record R { + integer field1, + integer field2 + } with { encode @local "Rule1" } + + type record of universal charstring RoUC; + + testcase TC_Sem_27010200_general_011 () runs on GeneralComp { + var RoUC v_enc1 := R.encode, + v_enc2 := R.field1.encode, + v_enc3 := R.field2.encode; + if(lengthof(v_enc1) == 1 and v_enc1[0] == "Rule1" and + lengthof(v_enc2) == 1 and v_enc2[0] == "GeneralRule" and + lengthof(v_enc3) == 1 and v_enc3[0] == "GeneralRule") { + setverdict(pass); + } else { + setverdict(fail); + } + } + + control { + execute(TC_Sem_27010200_general_011()); + } +} with { encode "GeneralRule" } \ No newline at end of file diff --git a/ATS/core_language/27_specifying_attributes/2701_attribute_mechanism/270102_overwriting_rules/27010200_general/Sem_27010200_general_012.ttcn b/ATS/core_language/27_specifying_attributes/2701_attribute_mechanism/270102_overwriting_rules/27010200_general/Sem_27010200_general_012.ttcn new file mode 100644 index 00000000..c52c71b4 --- /dev/null +++ b/ATS/core_language/27_specifying_attributes/2701_attribute_mechanism/270102_overwriting_rules/27010200_general/Sem_27010200_general_012.ttcn @@ -0,0 +1,41 @@ +/***************************************************************** + ** @author STF 548 + ** @version 0.0.1 + ** @purpose 1:27.1.2.0, Verify that override directive overrides attribute from a reference + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirement is tested: +// An attribute definition in a lower scope or those inherited from a referenced type can be overwritten +// in a higher scope by using the override directive. + +module Sem_27010200_general_012 { + + type component GeneralComp { + } + + type record MyRecordA { + integer field1 + } with { encode "RuleA" } + + // In the following, fieldA of a MyRecordB instance is encoded according to RuleB + type record MyRecordB { + MyRecordA fieldA + } with { encode override "RuleB" } + + type record of universal charstring RoUC; + + testcase TC_Sem_27010200_general_012 () runs on GeneralComp { + var RoUC v_enc1 := MyRecordB.fieldA.encode; + if(lengthof(v_enc1) == 1 and v_enc1[0] == "RuleB") { + setverdict(pass); + } else { + setverdict(fail); + } + } + + control { + execute(TC_Sem_27010200_general_012()); + } + +} \ No newline at end of file diff --git a/ATS/core_language/27_specifying_attributes/2701_attribute_mechanism/270102_overwriting_rules/27010200_general/Sem_27010200_general_013.ttcn b/ATS/core_language/27_specifying_attributes/2701_attribute_mechanism/270102_overwriting_rules/27010200_general/Sem_27010200_general_013.ttcn new file mode 100644 index 00000000..fc7d2140 --- /dev/null +++ b/ATS/core_language/27_specifying_attributes/2701_attribute_mechanism/270102_overwriting_rules/27010200_general/Sem_27010200_general_013.ttcn @@ -0,0 +1,44 @@ +/***************************************************************** + ** @author STF 548 + ** @version 0.0.1 + ** @purpose 1:27.1.2.0, Verify that override is applied to lower scopes that do not declare the attribute + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirement is tested: +// The override directive overrides the specified attribute for all declarations at all lower scopes +// that do not also declare the specified attribute. + +module Sem_27010200_general_013 { + + type component GeneralComp { + } + + type record R { + integer field1, + integer field2 + } with { encode "Rule1" } + + type record R2 { + R field + } + + type record of universal charstring RoUC; + + testcase TC_Sem_27010200_general_013 () runs on GeneralComp { + var RoUC v_enc1 := R.encode, + v_enc2 := R2.encode, + v_enc3 := R2.field.encode; + if(lengthof(v_enc1) == 1 and v_enc1[0] == "Rule1" and + lengthof(v_enc2) == 1 and v_enc2[0] == "GeneralRule" and + lengthof(v_enc3) == 1 and v_enc3[0] == "GeneralRule") { + setverdict(pass); + } else { + setverdict(fail); + } + } + + control { + execute(TC_Sem_27010200_general_013()); + } +} with { encode override "GeneralRule" } \ No newline at end of file diff --git a/ATS/core_language/27_specifying_attributes/2701_attribute_mechanism/270102_overwriting_rules/27010200_general/Sem_27010200_general_014.ttcn b/ATS/core_language/27_specifying_attributes/2701_attribute_mechanism/270102_overwriting_rules/27010200_general/Sem_27010200_general_014.ttcn new file mode 100644 index 00000000..bd242776 --- /dev/null +++ b/ATS/core_language/27_specifying_attributes/2701_attribute_mechanism/270102_overwriting_rules/27010200_general/Sem_27010200_general_014.ttcn @@ -0,0 +1,44 @@ +/***************************************************************** + ** @author STF 548 + ** @version 0.0.1 + ** @purpose 1:27.1.2.0, Verify that explicit attribute declaration prevents overwriting + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirement is tested: +// The override directive overrides the specified attribute for all declarations at all lower scopes +// that do not also declare the specified attribute. + +module Sem_27010200_general_014 { + + type component GeneralComp { + } + + // In the following, rule "RuleB" is overridden by "RuleC" for fieldC, but it is + // not overridden by "RuleA" of the group because the direct attachment to fieldC and + // MyRecordC override the encode of the outer scope. + group myGroup { + type record MyRecordC { + integer field1 + } with { encode override "RuleB" } + + type record MyRecordD { + MyRecordC fieldC + } with { encode override (fieldC) "RuleC" } + } with { encode override "RuleA" } + + type record of universal charstring RoUC; + + testcase TC_Sem_27010200_general_014 () runs on GeneralComp { + var RoUC v_enc1 := MyRecordD.fieldC.encode; + if(lengthof(v_enc1) == 1 and v_enc1[0] == "RuleC") { + setverdict(pass); + } else { + setverdict(fail); + } + } + + control { + execute(TC_Sem_27010200_general_014()); + } +} \ No newline at end of file diff --git a/ATS/core_language/27_specifying_attributes/2701_attribute_mechanism/270102_overwriting_rules/27010200_general/Sem_27010200_general_015.ttcn b/ATS/core_language/27_specifying_attributes/2701_attribute_mechanism/270102_overwriting_rules/27010200_general/Sem_27010200_general_015.ttcn new file mode 100644 index 00000000..7f80c719 --- /dev/null +++ b/ATS/core_language/27_specifying_attributes/2701_attribute_mechanism/270102_overwriting_rules/27010200_general/Sem_27010200_general_015.ttcn @@ -0,0 +1,43 @@ +/***************************************************************** + ** @author STF 548 + ** @version 0.0.1 + ** @purpose 1:27.1.2.0, Verify that override directive applied to a type reference does not affect the referenced type + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirement is tested: +// If the override directive is applied to a type reference, it doesn't affect the attributes of the +// original referenced type. + +module Sem_27010200_general_015 { + + type component GeneralComp { + } + + type record MyRecordA { + integer field1 + } with { encode override "RuleA" } + + type record MyRecordB { + MyRecordA fieldA + } with { encode override "RuleB" } + + // The following template will use "RuleA" as the override directive for MyRecordB affects only + // MyRecordB.fieldA, but not the original MyRecordA. + template MyRecordA mw_msg := ?; + + type record of universal charstring RoUC; + + testcase TC_Sem_27010200_general_015 () runs on GeneralComp { + var RoUC v_enc1 := mw_msg.encode; + if(lengthof(v_enc1) == 1 and v_enc1[0] == "RuleA") { + setverdict(pass); + } else { + setverdict(fail); + } + } + + control { + execute(TC_Sem_27010200_general_015()); + } +} \ No newline at end of file diff --git a/ATS/core_language/27_specifying_attributes/2701_attribute_mechanism/270102_overwriting_rules/27010200_general/Sem_27010200_general_016.ttcn b/ATS/core_language/27_specifying_attributes/2701_attribute_mechanism/270102_overwriting_rules/27010200_general/Sem_27010200_general_016.ttcn new file mode 100644 index 00000000..33c58d30 --- /dev/null +++ b/ATS/core_language/27_specifying_attributes/2701_attribute_mechanism/270102_overwriting_rules/27010200_general/Sem_27010200_general_016.ttcn @@ -0,0 +1,49 @@ +/***************************************************************** + ** @author STF 548 + ** @version 0.0.1 + ** @purpose 1:27.1.2.0, Verify that override directive applied to a synonym type overrides field attributes + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirement is tested: +// Override attribute applied to a synonym type(clause 6.4) overrides attributes of all fields or +// elements of the synonym type unless the synonym type definition contains an explicit attribute +// definition for the field or element + +module Sem_27010200_general_016 { + + type component GeneralComp { + } + + // MyRecordG and its "field1" member will be encoded with "RuleB", but its field2 member + // will be encoded with "RuleA", because there's an encode attribute explicitly declared + // for this field. + type record MyRecordF { + integer field1, + integer field2 + } with { encode "RuleA" } + + type MyRecordF MyRecordG with { + encode override "RuleB"; + encode(field2) "RuleA" + } + + type record of universal charstring RoUC; + + testcase TC_Sem_27010200_general_016 () runs on GeneralComp { + var RoUC v_enc1 := MyRecordG.encode, + v_enc2 := MyRecordG.field1.encode, + v_enc3 := MyRecordG.field2.encode; + if(lengthof(v_enc1) == 1 and v_enc1[0] == "RuleB" and + lengthof(v_enc2) == 1 and v_enc2[0] == "RuleB" and + lengthof(v_enc3) == 1 and v_enc3[0] == "RuleA") { + setverdict(pass); + } else { + setverdict(fail); + } + } + + control { + execute(TC_Sem_27010200_general_016()); + } +} \ No newline at end of file diff --git a/ATS/core_language/27_specifying_attributes/2701_attribute_mechanism/270102_overwriting_rules/27010201_rules_for_variant_attributes/Sem_27010201_rules_for_variant_attributes_001.ttcn b/ATS/core_language/27_specifying_attributes/2701_attribute_mechanism/270102_overwriting_rules/27010201_rules_for_variant_attributes/Sem_27010201_rules_for_variant_attributes_001.ttcn new file mode 100644 index 00000000..b3ec810b --- /dev/null +++ b/ATS/core_language/27_specifying_attributes/2701_attribute_mechanism/270102_overwriting_rules/27010201_rules_for_variant_attributes/Sem_27010201_rules_for_variant_attributes_001.ttcn @@ -0,0 +1,43 @@ +/***************************************************************** + ** @author STF 548 + ** @version 0.0.1 + ** @purpose 1:27.1.2.1, Verify that variant attributes can be overridden + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirement is tested: +// A variant attribute overwrites a current variant attribute according to the rules defined +// in clause 27.1.2; + +module Sem_27010201_rules_for_variant_attributes_001 { + + type component GeneralComp { + } + + type record MyRecordA { + } with { variant "VariantA" } + + type record MyRecordB + { + MyRecordA field + } with { variant "VariantB" } + + type record of universal charstring RoUC; + + testcase TC_Sem_27010201_rules_for_variant_attributes_001 () runs on GeneralComp { + var RoUC v_var1 := MyRecordB.variant, + v_var2 := MyRecordB.field.variant; + if(v_var1[0] == "VariantB" and + v_var2[0] == "VariantA") { + setverdict(pass); + } else { + setverdict(fail); + } + } + + + control{ + execute(TC_Sem_27010201_rules_for_variant_attributes_001()); + } + +} with { encode "GeneralRule" } \ No newline at end of file diff --git a/ATS/core_language/27_specifying_attributes/2701_attribute_mechanism/270102_overwriting_rules/27010201_rules_for_variant_attributes/Sem_27010201_rules_for_variant_attributes_002.ttcn b/ATS/core_language/27_specifying_attributes/2701_attribute_mechanism/270102_overwriting_rules/27010201_rules_for_variant_attributes/Sem_27010201_rules_for_variant_attributes_002.ttcn new file mode 100644 index 00000000..d1f2f712 --- /dev/null +++ b/ATS/core_language/27_specifying_attributes/2701_attribute_mechanism/270102_overwriting_rules/27010201_rules_for_variant_attributes/Sem_27010201_rules_for_variant_attributes_002.ttcn @@ -0,0 +1,38 @@ +/***************************************************************** + ** @author STF 548 + ** @version 0.0.1 + ** @purpose 1:27.1.2.1, Verify that encode attribute change disables existing variant attributes + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirement is tested: +// An encoding attribute, which overwrites a current encoding attribute according to +// the rules defined in clause 27.1.2, also overwrites a corresponding current variant +// attribute, i.e. no new variant attribute is provided, but the current variant attribute +// becomes inactive. + +module Sem_27010201_rules_for_variant_attributes_002 { + + type component GeneralComp { + } + + type record MyRecordA { + } with { encode "RuleA" } + + type record of universal charstring RoUC; + + testcase TC_Sem_27010201_rules_for_variant_attributes_002 () runs on GeneralComp { + var RoUC v_var := MyRecordA.variant; + if(lengthof(v_var) == 0) { + setverdict(pass); + } else { + setverdict(fail); + } + } + + + control{ + execute(TC_Sem_27010201_rules_for_variant_attributes_002()); + } + +} with { encode "GeneralRule" variant "Variant1" } \ No newline at end of file diff --git a/ATS/core_language/27_specifying_attributes/2701_attribute_mechanism/270102_overwriting_rules/27010201_rules_for_variant_attributes/Sem_27010201_rules_for_variant_attributes_003.ttcn b/ATS/core_language/27_specifying_attributes/2701_attribute_mechanism/270102_overwriting_rules/27010201_rules_for_variant_attributes/Sem_27010201_rules_for_variant_attributes_003.ttcn new file mode 100644 index 00000000..a0fb7db9 --- /dev/null +++ b/ATS/core_language/27_specifying_attributes/2701_attribute_mechanism/270102_overwriting_rules/27010201_rules_for_variant_attributes/Sem_27010201_rules_for_variant_attributes_003.ttcn @@ -0,0 +1,38 @@ +/***************************************************************** + ** @author STF 548 + ** @version 0.0.1 + ** @purpose 1:27.1.2.1, Verify that encode attribute repeating doesn't disable existing variant attributes + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirement is tested: +// An encoding attribute, which overwrites a current encoding attribute according to +// the rules defined in clause 27.1.2, also overwrites a corresponding current variant +// attribute, i.e. no new variant attribute is provided, but the current variant attribute +// becomes inactive. + +module Sem_27010201_rules_for_variant_attributes_003 { + + type component GeneralComp { + } + + type record MyRecordA { + } with { encode "GeneralRule" } // the same as in upper scope, variant should not change + + type record of universal charstring RoUC; + + testcase TC_Sem_27010201_rules_for_variant_attributes_003 () runs on GeneralComp { + var RoUC v_var := MyRecordA.variant; + if(lengthof(v_var) == 1 and v_var[0] == "Variant1") { + setverdict(pass); + } else { + setverdict(fail); + } + } + + + control{ + execute(TC_Sem_27010201_rules_for_variant_attributes_003()); + } + +} with { encode "GeneralRule" variant "Variant1" } \ No newline at end of file diff --git a/ATS/core_language/27_specifying_attributes/2701_attribute_mechanism/270102_overwriting_rules/27010202_rules_for_multiple_encodings/Sem_27010202_rules_for_multiple_encodings_001.ttcn b/ATS/core_language/27_specifying_attributes/2701_attribute_mechanism/270102_overwriting_rules/27010202_rules_for_multiple_encodings/Sem_27010202_rules_for_multiple_encodings_001.ttcn new file mode 100644 index 00000000..a2f41418 --- /dev/null +++ b/ATS/core_language/27_specifying_attributes/2701_attribute_mechanism/270102_overwriting_rules/27010202_rules_for_multiple_encodings/Sem_27010202_rules_for_multiple_encodings_001.ttcn @@ -0,0 +1,48 @@ +/***************************************************************** + ** @author STF 548 + ** @version 0.0.1 + ** @purpose 1:27.1.2.2, Verify that listed encode attributes retain variants + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirement is tested: +// Explicitly listed encode attributes that occur on the higher scope and are not overwritten +// will retain all variants related to them. + +module Sem_27010202_rules_for_multiple_encodings_001 { + + type component GeneralComp { + } + + type integer Int with { + encode "CodecA"; variant "CodecA"."Rule1"; + encode "CodecB"; variant "CodecB"."Rule2"; + } + + // Modifying list of allowed encodings + type Int Int2 with { + encode "CodecA"; // variant "CodecA"."Rule1" is kept + encode "CodecC"; variant "CodecC"."Rule6"; // new encoding and related variant + // "CodecB" encoding together with its variant are discarded as "CodecB" is not + // explicitly referenced + } + + type record of universal charstring RoUC; + + testcase TC_Sem_27010202_rules_for_multiple_encodings_001 () runs on GeneralComp { + var RoUC v_var1 := Int2.variant("CodecA"), + v_var2 := Int2.variant("CodecC"); + if(lengthof(v_var1) == 1 and v_var1[0] == "Rule1" and + lengthof(v_var2) == 1 and v_var2[0] == "Rule6") { + setverdict(pass); + } else { + setverdict(fail); + } + } + + + control{ + execute(TC_Sem_27010202_rules_for_multiple_encodings_001()); + } + +} \ No newline at end of file diff --git a/ATS/core_language/27_specifying_attributes/2701_attribute_mechanism/270102_overwriting_rules/27010202_rules_for_multiple_encodings/Sem_27010202_rules_for_multiple_encodings_002.ttcn b/ATS/core_language/27_specifying_attributes/2701_attribute_mechanism/270102_overwriting_rules/27010202_rules_for_multiple_encodings/Sem_27010202_rules_for_multiple_encodings_002.ttcn new file mode 100644 index 00000000..45e41799 --- /dev/null +++ b/ATS/core_language/27_specifying_attributes/2701_attribute_mechanism/270102_overwriting_rules/27010202_rules_for_multiple_encodings/Sem_27010202_rules_for_multiple_encodings_002.ttcn @@ -0,0 +1,47 @@ +/***************************************************************** + ** @author STF 548 + ** @version 0.0.1 + ** @purpose 1:27.1.2.2, Verify that encoding related variant doesn't overwrite variants of other encodings + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirement is tested: +// An encoding related variant will overwrite only variants related to the same encoding. + +module Sem_27010202_rules_for_multiple_encodings_002 { + + type component GeneralComp { + } + + type integer Int with { + encode "CodecA"; variant "CodecA"."Rule1"; + encode "CodecB"; variant "CodecB"."Rule2"; + } + + // Overwriting variant with an encoding reference + type Int Int3 with { + variant "CodecB"."Rule4"; // new variant for encoding "CodecB" overwrites + // the original variant "CodecB"."Rule2" + // Variant "CodecA"."Rule1" is unchanged as this definition contains no reference + // to "CodecB" + } + + type record of universal charstring RoUC; + + testcase TC_Sem_27010202_rules_for_multiple_encodings_002 () runs on GeneralComp { + var RoUC v_var1 := Int3.variant("CodecA"), + v_var2 := Int3.variant("CodecB"); + if(lengthof(v_var1) == 1 and v_var1[0] == "Rule1" and + lengthof(v_var2) == 1 and v_var2[0] == "Rule4") { + setverdict(pass); + } else { + setverdict(fail); + } + } + + + control{ + execute(TC_Sem_27010202_rules_for_multiple_encodings_002()); + } + +} \ No newline at end of file diff --git a/ATS/core_language/27_specifying_attributes/2701_attribute_mechanism/270103_attributes_of_imported_elements/Sem_270103_attributes_of_imported_elements_001.ttcn b/ATS/core_language/27_specifying_attributes/2701_attribute_mechanism/270103_attributes_of_imported_elements/Sem_270103_attributes_of_imported_elements_001.ttcn new file mode 100644 index 00000000..f590bac0 --- /dev/null +++ b/ATS/core_language/27_specifying_attributes/2701_attribute_mechanism/270103_attributes_of_imported_elements/Sem_270103_attributes_of_imported_elements_001.ttcn @@ -0,0 +1,43 @@ +/***************************************************************** + ** @author STF 548 + ** @version 0.0.1 + ** @purpose 1:27.1.3, Verify that attributes can be added to imported elements + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirement is tested: +// In general, a language element is imported together with its attributes. In some cases these +// attributes may have to be changed when importing the language element, e.g. a type may be +// displayed in one module as ASP, then it is imported by another module where it should be +// displayed as PDU. For such cases it is allowed to change attributes on the import statement. +// When resolving the attributes, the import statement works as an additional higher scope unit +// on the top of the imported module. Attributes set in the import statement are valid only +// within the importing module. + +module Sem_270103_attributes_of_imported_elements_001 { + + import from Sem_270103_attributes_of_imported_elements_001_import { + type MyType + } with { + display "ASP" + }; + + type component GeneralComp {} + + testcase TC_Sem_270103_attributes_of_imported_elements_001() runs on GeneralComp { + if (MyType.display == "ASP") { + setverdict(pass); + } else { + setverdict(fail); + } + } + + control{ + execute(TC_Sem_270103_attributes_of_imported_elements_001()); + } +} + +module Sem_270103_attributes_of_imported_elements_001_import { + type integer MyType; +} + diff --git a/ATS/core_language/27_specifying_attributes/2702_the_with_statement/NegSem_2702_the_with_statement_001.ttcn b/ATS/core_language/27_specifying_attributes/2702_the_with_statement/NegSem_2702_the_with_statement_001.ttcn new file mode 100644 index 00000000..e413331e --- /dev/null +++ b/ATS/core_language/27_specifying_attributes/2702_the_with_statement/NegSem_2702_the_with_statement_001.ttcn @@ -0,0 +1,37 @@ +/***************************************************************** + ** @author STF 548 + ** @version 0.0.1 + ** @purpose 1:27.2, Verify that error is generated for an unknown DefinitionRef in module attributes + ** @verdict pass reject + *****************************************************************/ + +// The following requirement is tested: +// Restriction a: +// DefinitionRef and FieldReference shall refer to a definition or field respectively which is within the module, +// group or definition to which the with statement is associated + +module NegSem_2702_the_with_statement_001 { + + type component GeneralComp { + } + + type record R { + } + + type record of universal charstring RoUC; + + testcase TC_NegSem_2702_the_with_statement_001 () runs on GeneralComp { + var RoUC v_enc := R.encode; + if(v_enc[0] == "RuleA") { + setverdict(pass); + } else { + setverdict(fail); + } + } + + + control{ + execute(TC_NegSem_2702_the_with_statement_001()); + } + +} with { encode(R2) "RuleA" } \ No newline at end of file diff --git a/ATS/core_language/27_specifying_attributes/2702_the_with_statement/NegSem_2702_the_with_statement_002.ttcn b/ATS/core_language/27_specifying_attributes/2702_the_with_statement/NegSem_2702_the_with_statement_002.ttcn new file mode 100644 index 00000000..a0687dcc --- /dev/null +++ b/ATS/core_language/27_specifying_attributes/2702_the_with_statement/NegSem_2702_the_with_statement_002.ttcn @@ -0,0 +1,38 @@ +/***************************************************************** + ** @author STF 548 + ** @version 0.0.1 + ** @purpose 1:27.2, Verify that error is generated for an unknown DefinitionRef in group attributes + ** @verdict pass reject + *****************************************************************/ + +// The following requirement is tested: +// Restriction a: +// DefinitionRef and FieldReference shall refer to a definition or field respectively which is within the module, +// group or definition to which the with statement is associated + +module NegSem_2702_the_with_statement_002 { + group G { + type component GeneralComp { + } + + type record R { + } + } with { encode(R2) "RuleA" } + + type record of universal charstring RoUC; + + testcase TC_NegSem_2702_the_with_statement_002 () runs on GeneralComp { + var RoUC v_enc := R.encode; + if(v_enc[0] == "RuleA") { + setverdict(pass); + } else { + setverdict(fail); + } + } + + + control{ + execute(TC_NegSem_2702_the_with_statement_002()); + } + +} \ No newline at end of file diff --git a/ATS/core_language/27_specifying_attributes/2702_the_with_statement/NegSem_2702_the_with_statement_003.ttcn b/ATS/core_language/27_specifying_attributes/2702_the_with_statement/NegSem_2702_the_with_statement_003.ttcn new file mode 100644 index 00000000..94bf5744 --- /dev/null +++ b/ATS/core_language/27_specifying_attributes/2702_the_with_statement/NegSem_2702_the_with_statement_003.ttcn @@ -0,0 +1,39 @@ +/***************************************************************** + ** @author STF 548 + ** @version 0.0.1 + ** @purpose 1:27.2, Verify that error is generated for an unknown FieldReference in type attributes + ** @verdict pass reject + *****************************************************************/ + +// The following requirement is tested: +// Restriction a: +// DefinitionRef and FieldReference shall refer to a definition or field respectively which is within the module, +// group or definition to which the with statement is associated + +module NegSem_2702_the_with_statement_003 { + + type component GeneralComp { + } + + type record R { + R field optional + } with { encode(field.field2) "RuleA" } + + type record of universal charstring RoUC; + + testcase TC_NegSem_2702_the_with_statement_003 () runs on GeneralComp { + var RoUC v_enc1 := R.field.encode, + v_enc2 := R.field.field.encode; + + if(lengthof(v_enc1) == 0 and v_enc2[0] == "RuleA") { + setverdict(pass); + } else { + setverdict(fail); + } + } + + + control{ + execute(TC_NegSem_2702_the_with_statement_003()); + } +} \ No newline at end of file diff --git a/ATS/core_language/27_specifying_attributes/2702_the_with_statement/NegSem_2702_the_with_statement_004.ttcn b/ATS/core_language/27_specifying_attributes/2702_the_with_statement/NegSem_2702_the_with_statement_004.ttcn new file mode 100644 index 00000000..23037a11 --- /dev/null +++ b/ATS/core_language/27_specifying_attributes/2702_the_with_statement/NegSem_2702_the_with_statement_004.ttcn @@ -0,0 +1,40 @@ +/***************************************************************** + ** @author STF 548 + ** @version 0.0.1 + ** @purpose 1:27.2, Verify that excluded definition cannot refer to a non-existent module item + ** @verdict pass reject + *****************************************************************/ + +// The following requirement is tested: +// Restriction a: +// DefinitionRef and FieldReference shall refer to a definition or field respectively which is within the module, +// group or definition to which the with statement is associated + +module NegSem_2702_the_with_statement_004 { + + type component GeneralComp { + } + + const integer c_int1 := 1; + const integer c_int2 := 2; + const integer c_int3 := 3; + + type record of universal charstring RoUC; + + testcase TC_NegSem_2702_the_with_statement_004 () runs on GeneralComp { + var RoUC v_enc1 := c_int1.encode, + v_enc2 := c_int2.encode, + v_enc3 := c_int3.encode; + if(v_enc1[0] == "RuleA" and v_enc2[0] == "RuleA" and v_enc3[0] == "RuleA") { + setverdict(pass); + } else { + setverdict(fail); + } + } + + + control{ + execute(TC_NegSem_2702_the_with_statement_004()); + } + +} with { encode(const all except {c_int4}) "RuleA" } \ No newline at end of file diff --git a/ATS/core_language/27_specifying_attributes/2702_the_with_statement/NegSem_2702_the_with_statement_005.ttcn b/ATS/core_language/27_specifying_attributes/2702_the_with_statement/NegSem_2702_the_with_statement_005.ttcn new file mode 100644 index 00000000..5ffc4872 --- /dev/null +++ b/ATS/core_language/27_specifying_attributes/2702_the_with_statement/NegSem_2702_the_with_statement_005.ttcn @@ -0,0 +1,46 @@ +/***************************************************************** + ** @author STF 548 + ** @version 0.0.1 + ** @purpose 1:27.2, Verify that excluded definition cannot refer to a non-existent group item + ** @verdict pass reject + *****************************************************************/ + +// The following requirement is tested: +// Restriction a: +// DefinitionRef and FieldReference shall refer to a definition or field respectively which is within the module, +// group or definition to which the with statement is associated + + +module NegSem_2702_the_with_statement_005 { + + group G { + type component GeneralComp { + } + + const integer c_int1 := 1; + const integer c_int2 := 2; + const integer c_int3 := 3; + } with { encode(const all except {c_int4}) "RuleA" } + + const integer c_int4 := 4; + + type record of universal charstring RoUC; + + testcase TC_NegSem_2702_the_with_statement_005 () runs on GeneralComp { + var RoUC v_enc1 := c_int1.encode, + v_enc2 := c_int2.encode, + v_enc3 := c_int3.encode, + v_enc4 := c_int4.encode; + if(v_enc1[0] == "RuleA" and v_enc2[0] == "RuleA" and v_enc3[0] == "RuleA" and lengthof(v_enc4) == 0) { + setverdict(pass); + } else { + setverdict(fail); + } + } + + + control{ + execute(TC_NegSem_2702_the_with_statement_005()); + } + +} \ No newline at end of file diff --git a/ATS/core_language/27_specifying_attributes/2702_the_with_statement/NegSem_2702_the_with_statement_006.ttcn b/ATS/core_language/27_specifying_attributes/2702_the_with_statement/NegSem_2702_the_with_statement_006.ttcn new file mode 100644 index 00000000..b2cc7a39 --- /dev/null +++ b/ATS/core_language/27_specifying_attributes/2702_the_with_statement/NegSem_2702_the_with_statement_006.ttcn @@ -0,0 +1,42 @@ +/***************************************************************** + ** @author STF 548 + ** @version 0.0.1 + ** @purpose 1:27.2, Verify that multiple attributes of the same kind cannot have different modifiers + ** @verdict pass reject + *****************************************************************/ + +// The following requirement is tested: +// Restriction b +// In case multiple attributes of the same type are allowed, all of them shall be without +// an additional modifier (override, @local) or the modifier shall be the same for all +// attributes. + +module NegSem_2702_the_with_statement_006 { + type component GeneralComp { + } + + type record R { + integer field1 + } with { + encode @local "RuleA"; + encode override "RuleB" + } + + type record of universal charstring RoUC; + + testcase TC_NegSem_2702_the_with_statement_006 () runs on GeneralComp { + var RoUC v_enc1 := R.encode, + v_enc2 := R.field1.encode; + if(v_enc1 == { "RuleA", "RuleB" } and + lengthof(v_enc2) == 0) { + setverdict(pass); + } else { + setverdict(fail); + } + } + + + control{ + execute(TC_NegSem_2702_the_with_statement_006()); + } +} \ No newline at end of file diff --git a/ATS/core_language/27_specifying_attributes/2702_the_with_statement/NegSem_2702_the_with_statement_007.ttcn b/ATS/core_language/27_specifying_attributes/2702_the_with_statement/NegSem_2702_the_with_statement_007.ttcn new file mode 100644 index 00000000..790be803 --- /dev/null +++ b/ATS/core_language/27_specifying_attributes/2702_the_with_statement/NegSem_2702_the_with_statement_007.ttcn @@ -0,0 +1,42 @@ +/***************************************************************** + ** @author STF 548 + ** @version 0.0.1 + ** @purpose 1:27.2, Verify that defining attributes of the same kind with and without a modifier is not possible + ** @verdict pass reject + *****************************************************************/ + +// The following requirement is tested: +// Restriction b +// In case multiple attributes of the same type are allowed, all of them shall be without +// an additional modifier (override, @local) or the modifier shall be the same for all +// attributes. + +module NegSem_2702_the_with_statement_007 { + type component GeneralComp { + } + + type record R { + integer field1 + } with { + encode @local "RuleA"; + encode "RuleB" + } + + type record of universal charstring RoUC; + + testcase TC_NegSem_2702_the_with_statement_007 () runs on GeneralComp { + var RoUC v_enc1 := R.encode, + v_enc2 := R.field1.encode; + if(v_enc1 == { "RuleA", "RuleB" } and + lengthof(v_enc2) == 0) { + setverdict(pass); + } else { + setverdict(fail); + } + } + + + control{ + execute(TC_NegSem_2702_the_with_statement_007()); + } +} \ No newline at end of file diff --git a/ATS/core_language/27_specifying_attributes/2702_the_with_statement/NegSem_2702_the_with_statement_008.ttcn b/ATS/core_language/27_specifying_attributes/2702_the_with_statement/NegSem_2702_the_with_statement_008.ttcn new file mode 100644 index 00000000..27528979 --- /dev/null +++ b/ATS/core_language/27_specifying_attributes/2702_the_with_statement/NegSem_2702_the_with_statement_008.ttcn @@ -0,0 +1,32 @@ +/***************************************************************** + ** @author STF 548 + ** @version 0.0.1 + ** @purpose 1:27.2, Verify that dot notation in the FreeText part in not possible for encode attributes + ** @verdict pass reject + *****************************************************************/ + +// The following requirement is tested: +// Restriction c +// Dot notation in the FreeText part is allowed for variant attributes only. + +module NegSem_2702_the_with_statement_008 { + type component GeneralComp { + } + + type record R { + integer field1 + } with { + encode "RuleA"."Version1"; + } + + type record of universal charstring RoUC; + + testcase TC_NegSem_2702_the_with_statement_008 () runs on GeneralComp { + var RoUC v_enc1 := R.encode; + setverdict(pass); + } + + control{ + execute(TC_NegSem_2702_the_with_statement_008()); + } +} \ No newline at end of file diff --git a/ATS/core_language/27_specifying_attributes/2702_the_with_statement/NegSem_2702_the_with_statement_009.ttcn b/ATS/core_language/27_specifying_attributes/2702_the_with_statement/NegSem_2702_the_with_statement_009.ttcn new file mode 100644 index 00000000..3fa7290a --- /dev/null +++ b/ATS/core_language/27_specifying_attributes/2702_the_with_statement/NegSem_2702_the_with_statement_009.ttcn @@ -0,0 +1,30 @@ +/***************************************************************** + ** @author STF 548 + ** @version 0.0.1 + ** @purpose 1:27.2, Verify that dot notation in the FreeText part in not possible for display attributes + ** @verdict pass reject + *****************************************************************/ + +// The following requirement is tested: +// Restriction c +// Dot notation in the FreeText part is allowed for variant attributes only. + +module NegSem_2702_the_with_statement_009 { + type component GeneralComp { + } + + type record R { + integer field1 + } with { + display "RuleA"."Version1"; + } + + testcase TC_NegSem_2702_the_with_statement_009 () runs on GeneralComp { + var universal charstring v_d := R.display; + setverdict(pass); + } + + control{ + execute(TC_NegSem_2702_the_with_statement_009()); + } +} \ No newline at end of file diff --git a/ATS/core_language/27_specifying_attributes/2702_the_with_statement/NegSem_2702_the_with_statement_010.ttcn b/ATS/core_language/27_specifying_attributes/2702_the_with_statement/NegSem_2702_the_with_statement_010.ttcn new file mode 100644 index 00000000..3edaa8b6 --- /dev/null +++ b/ATS/core_language/27_specifying_attributes/2702_the_with_statement/NegSem_2702_the_with_statement_010.ttcn @@ -0,0 +1,34 @@ +/***************************************************************** + ** @author STF 548 + ** @version 0.0.1 + ** @purpose 1:27.2, Verify that dot notation in the FreeText part in not possible for optional attributes + ** @verdict pass reject + *****************************************************************/ + +// The following requirement is tested: +// Restriction c +// Dot notation in the FreeText part is allowed for variant attributes only. + +module NegSem_2702_the_with_statement_010 { + type component GeneralComp { + } + + type record R { + integer field1, + integer field2 + } + + template R m_msg := { + } with { + optional "implicit omit".""; + } + + testcase TC_NegSem_2702_the_with_statement_010 () runs on GeneralComp { + var universal charstring v_opt := m_msg.optional; + setverdict(pass); + } + + control{ + execute(TC_NegSem_2702_the_with_statement_010()); + } +} \ No newline at end of file diff --git a/ATS/core_language/27_specifying_attributes/2702_the_with_statement/NegSem_2702_the_with_statement_011.ttcn b/ATS/core_language/27_specifying_attributes/2702_the_with_statement/NegSem_2702_the_with_statement_011.ttcn new file mode 100644 index 00000000..193f73cf --- /dev/null +++ b/ATS/core_language/27_specifying_attributes/2702_the_with_statement/NegSem_2702_the_with_statement_011.ttcn @@ -0,0 +1,32 @@ +/***************************************************************** + ** @author STF 548 + ** @version 0.0.1 + ** @purpose 1:27.2, Verify that dot notation in the FreeText part in not possible for extension attributes + ** @verdict pass reject + *****************************************************************/ + +// The following requirement is tested: +// Restriction c +// Dot notation in the FreeText part is allowed for variant attributes only. + +module NegSem_2702_the_with_statement_011 { + type component GeneralComp { + } + + type record R { + integer field1 + } with { + extension "RuleA"."Version1"; + } + + type record of universal charstring RoUC; + + testcase TC_NegSem_2702_the_with_statement_011 () runs on GeneralComp { + var RoUC v_ext := R.extension; + setverdict(pass); + } + + control{ + execute(TC_NegSem_2702_the_with_statement_011()); + } +} \ No newline at end of file diff --git a/ATS/core_language/27_specifying_attributes/2702_the_with_statement/NegSyn_2702_the_with_statement_001.ttcn b/ATS/core_language/27_specifying_attributes/2702_the_with_statement/NegSyn_2702_the_with_statement_001.ttcn new file mode 100644 index 00000000..e7d9a4ad --- /dev/null +++ b/ATS/core_language/27_specifying_attributes/2702_the_with_statement/NegSyn_2702_the_with_statement_001.ttcn @@ -0,0 +1,37 @@ +/***************************************************************** + ** @author STF 548 + ** @version 0.0.1 + ** @purpose 1:27.2, Verify that string constant cannot be used in an attribute definition + ** @verdict pass reject + *****************************************************************/ + +// The following requirement is tested: +// The syntax for the argument of the with statement (i.e. the actual attributes) is defined as a free text string. + +module NegSyn_2702_the_with_statement_001 { + + type component GeneralComp { + } + + const charstring c_enc := "RuleA"; + + type record R { + } with { encode c_enc } + + type record of universal charstring RoUC; + + testcase TC_NegSyn_2702_the_with_statement_001 () runs on GeneralComp { + var RoUC v_enc := R.encode; + if(v_enc[0] == "RuleA") { + setverdict(pass); + } else { + setverdict(fail); + } + } + + + control{ + execute(TC_NegSyn_2702_the_with_statement_001()); + } + +} \ No newline at end of file diff --git a/ATS/core_language/27_specifying_attributes/2702_the_with_statement/Sem_2702_the_with_statement_001.ttcn b/ATS/core_language/27_specifying_attributes/2702_the_with_statement/Sem_2702_the_with_statement_001.ttcn new file mode 100644 index 00000000..785a426f --- /dev/null +++ b/ATS/core_language/27_specifying_attributes/2702_the_with_statement/Sem_2702_the_with_statement_001.ttcn @@ -0,0 +1,36 @@ +/***************************************************************** + ** @author STF 548 + ** @version 0.0.1 + ** @purpose 1:27.2, Verify that DefinitionRef can be used to identify a field within a module + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirement is tested: +// DefinitionRef and FieldReference identify a definition or field respectively which is within the module, group or +// definition to which the with statement is associated. + +module Sem_2702_the_with_statement_001 { + + type component GeneralComp { + } + + type record R { + } + + type record of universal charstring RoUC; + + testcase TC_Sem_2702_the_with_statement_001 () runs on GeneralComp { + var RoUC v_enc := R.encode; + if(v_enc[0] == "RuleA") { + setverdict(pass); + } else { + setverdict(fail); + } + } + + + control{ + execute(TC_Sem_2702_the_with_statement_001()); + } + +} with { encode(R) "RuleA" } \ No newline at end of file diff --git a/ATS/core_language/27_specifying_attributes/2702_the_with_statement/Sem_2702_the_with_statement_002.ttcn b/ATS/core_language/27_specifying_attributes/2702_the_with_statement/Sem_2702_the_with_statement_002.ttcn new file mode 100644 index 00000000..39438b8b --- /dev/null +++ b/ATS/core_language/27_specifying_attributes/2702_the_with_statement/Sem_2702_the_with_statement_002.ttcn @@ -0,0 +1,37 @@ +/***************************************************************** + ** @author STF 548 + ** @version 0.0.1 + ** @purpose 1:27.2, Verify that DefinitionRef can be used to identify a field within a group + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirement is tested: +// DefinitionRef and FieldReference identify a definition or field respectively which is within the module, group or +// definition to which the with statement is associated. + +module Sem_2702_the_with_statement_002 { + group G { + type component GeneralComp { + } + + type record R { + } + } with { encode(R) "RuleA" } + + type record of universal charstring RoUC; + + testcase TC_Sem_2702_the_with_statement_002 () runs on GeneralComp { + var RoUC v_enc := R.encode; + if(v_enc[0] == "RuleA") { + setverdict(pass); + } else { + setverdict(fail); + } + } + + + control{ + execute(TC_Sem_2702_the_with_statement_002()); + } + +} \ No newline at end of file diff --git a/ATS/core_language/27_specifying_attributes/2702_the_with_statement/Sem_2702_the_with_statement_003.ttcn b/ATS/core_language/27_specifying_attributes/2702_the_with_statement/Sem_2702_the_with_statement_003.ttcn new file mode 100644 index 00000000..65058d43 --- /dev/null +++ b/ATS/core_language/27_specifying_attributes/2702_the_with_statement/Sem_2702_the_with_statement_003.ttcn @@ -0,0 +1,38 @@ +/***************************************************************** + ** @author STF 548 + ** @version 0.0.1 + ** @purpose 1:27.2, Verify that FieldReference can be used to identify a field within a definition + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirement is tested: +// DefinitionRef and FieldReference identify a definition or field respectively which is within the module, group or +// definition to which the with statement is associated. + +module Sem_2702_the_with_statement_003 { + + type component GeneralComp { + } + + type record R { + R field optional + } with { encode(field.field) "RuleA" } + + type record of universal charstring RoUC; + + testcase TC_Sem_2702_the_with_statement_003 () runs on GeneralComp { + var RoUC v_enc1 := R.field.encode, + v_enc2 := R.field.field.encode; + + if(lengthof(v_enc1) == 0 and v_enc2[0] == "RuleA") { + setverdict(pass); + } else { + setverdict(fail); + } + } + + + control{ + execute(TC_Sem_2702_the_with_statement_003()); + } +} \ No newline at end of file diff --git a/ATS/core_language/27_specifying_attributes/2702_the_with_statement/Sem_2702_the_with_statement_004.ttcn b/ATS/core_language/27_specifying_attributes/2702_the_with_statement/Sem_2702_the_with_statement_004.ttcn new file mode 100644 index 00000000..386bb21c --- /dev/null +++ b/ATS/core_language/27_specifying_attributes/2702_the_with_statement/Sem_2702_the_with_statement_004.ttcn @@ -0,0 +1,38 @@ +/***************************************************************** + ** @author STF 548 + ** @version 0.0.1 + ** @purpose 1:27.2, Verify that AllRef can be used to apply attributes to multiple module items + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirement is tested: +// AllRef can be used to apply attributes to multiple language elements defined within the scope to +// which the with statement is associated. AllRef provides a flexible mechanism to select all language +// elements or all language elements of a certain kind defined in a given scope. + +module Sem_2702_the_with_statement_004 { + + type component GeneralComp { + } + + const integer c_int := 1; + modulepar integer PX_INT := 1; + + type record of universal charstring RoUC; + + testcase TC_Sem_2702_the_with_statement_004 () runs on GeneralComp { + var RoUC v_enc1 := c_int.encode, + v_enc2 := PX_INT.encode; + if(v_enc1[0] == "RuleA" and lengthof(v_enc2) == 0) { + setverdict(pass); + } else { + setverdict(fail); + } + } + + + control{ + execute(TC_Sem_2702_the_with_statement_004()); + } + +} with { encode(const all) "RuleA" } \ No newline at end of file diff --git a/ATS/core_language/27_specifying_attributes/2702_the_with_statement/Sem_2702_the_with_statement_005.ttcn b/ATS/core_language/27_specifying_attributes/2702_the_with_statement/Sem_2702_the_with_statement_005.ttcn new file mode 100644 index 00000000..969d9606 --- /dev/null +++ b/ATS/core_language/27_specifying_attributes/2702_the_with_statement/Sem_2702_the_with_statement_005.ttcn @@ -0,0 +1,43 @@ +/***************************************************************** + ** @author STF 548 + ** @version 0.0.1 + ** @purpose 1:27.2, Verify that AllRef can be used to apply attributes to multiple group items + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirement is tested: +// AllRef can be used to apply attributes to multiple language elements defined within the scope to +// which the with statement is associated. AllRef provides a flexible mechanism to select all language +// elements or all language elements of a certain kind defined in a given scope. + +module Sem_2702_the_with_statement_005 { + + group G { + type component GeneralComp { + } + + const integer c_int := 1; + modulepar integer PX_INT := 1; + } with { encode(const all) "RuleA" } + + const integer c_int2 := 0; + + type record of universal charstring RoUC; + + testcase TC_Sem_2702_the_with_statement_005 () runs on GeneralComp { + var RoUC v_enc1 := c_int.encode, + v_enc2 := PX_INT.encode, + v_enc3 := c_int2.encode; + if(v_enc1[0] == "RuleA" and lengthof(v_enc2) == 0 and lengthof(v_enc3) == 0) { + setverdict(pass); + } else { + setverdict(fail); + } + } + + + control{ + execute(TC_Sem_2702_the_with_statement_005()); + } + +} \ No newline at end of file diff --git a/ATS/core_language/27_specifying_attributes/2702_the_with_statement/Sem_2702_the_with_statement_006.ttcn b/ATS/core_language/27_specifying_attributes/2702_the_with_statement/Sem_2702_the_with_statement_006.ttcn new file mode 100644 index 00000000..6abcff37 --- /dev/null +++ b/ATS/core_language/27_specifying_attributes/2702_the_with_statement/Sem_2702_the_with_statement_006.ttcn @@ -0,0 +1,39 @@ +/***************************************************************** + ** @author STF 548 + ** @version 0.0.1 + ** @purpose 1:27.2, Verify that definitions can be excluded if AllRef is used in the with clause on a module level + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirement is tested: +// Individual language elements that are not affected by an attribute can be excluded from a set of selected +// language elements in the except clause. + +module Sem_2702_the_with_statement_006 { + + type component GeneralComp { + } + + const integer c_int1 := 1; + const integer c_int2 := 2; + const integer c_int3 := 3; + + type record of universal charstring RoUC; + + testcase TC_Sem_2702_the_with_statement_006 () runs on GeneralComp { + var RoUC v_enc1 := c_int1.encode, + v_enc2 := c_int2.encode, + v_enc3 := c_int3.encode; + if(v_enc1[0] == "RuleA" and lengthof(v_enc2) == 0 and v_enc3[0] == "RuleA") { + setverdict(pass); + } else { + setverdict(fail); + } + } + + + control{ + execute(TC_Sem_2702_the_with_statement_006()); + } + +} with { encode(const all except {c_int2}) "RuleA" } \ No newline at end of file diff --git a/ATS/core_language/27_specifying_attributes/2702_the_with_statement/Sem_2702_the_with_statement_007.ttcn b/ATS/core_language/27_specifying_attributes/2702_the_with_statement/Sem_2702_the_with_statement_007.ttcn new file mode 100644 index 00000000..75819bfa --- /dev/null +++ b/ATS/core_language/27_specifying_attributes/2702_the_with_statement/Sem_2702_the_with_statement_007.ttcn @@ -0,0 +1,44 @@ +/***************************************************************** + ** @author STF 548 + ** @version 0.0.1 + ** @purpose 1:27.2, Verify that definitions can be excluded if AllRef is used in the with clause on a module level + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirement is tested: +// Individual language elements that are not affected by an attribute can be excluded from a set of selected +// language elements in the except clause. + +module Sem_2702_the_with_statement_007 { + + group G { + type component GeneralComp { + } + + const integer c_int1 := 1; + const integer c_int2 := 2; + const integer c_int3 := 3; + } with { encode(const all except {c_int2}) "RuleA" } + + const integer c_int4 := 4; + + type record of universal charstring RoUC; + + testcase TC_Sem_2702_the_with_statement_007 () runs on GeneralComp { + var RoUC v_enc1 := c_int1.encode, + v_enc2 := c_int2.encode, + v_enc3 := c_int3.encode, + v_enc4 := c_int4.encode; + if(v_enc1[0] == "RuleA" and lengthof(v_enc2) == 0 and v_enc3[0] == "RuleA" and lengthof(v_enc4) == 0) { + setverdict(pass); + } else { + setverdict(fail); + } + } + + + control{ + execute(TC_Sem_2702_the_with_statement_007()); + } + +} \ No newline at end of file diff --git a/ATS/core_language/27_specifying_attributes/2702_the_with_statement/Sem_2702_the_with_statement_008.ttcn b/ATS/core_language/27_specifying_attributes/2702_the_with_statement/Sem_2702_the_with_statement_008.ttcn new file mode 100644 index 00000000..526d77ee --- /dev/null +++ b/ATS/core_language/27_specifying_attributes/2702_the_with_statement/Sem_2702_the_with_statement_008.ttcn @@ -0,0 +1,43 @@ +/***************************************************************** + ** @author STF 548 + ** @version 0.0.1 + ** @purpose 1:27.2, Verify that multiple attributes of the same kind can have the same modifier + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirement is tested: +// Restriction b +// In case multiple attributes of the same type are allowed, all of them shall be without +// an additional modifier (override, @local) or the modifier shall be the same for all +// attributes. + +module Sem_2702_the_with_statement_008 { + type component GeneralComp { + } + + type record R { + integer field1 + } with { + encode @local "RuleA"; + encode @local "RuleB" + } + + type record of universal charstring RoUC; + + testcase TC_Sem_2702_the_with_statement_008 () runs on GeneralComp { + var RoUC v_enc1 := R.encode, + v_enc2 := R.field1.encode; + if(v_enc1 == { "RuleA", "RuleB" } and + lengthof(v_enc2) == 0) { + setverdict(pass); + } else { + setverdict(fail); + } + } + + + control{ + execute(TC_Sem_2702_the_with_statement_008()); + } + +} \ No newline at end of file diff --git a/ATS/core_language/27_specifying_attributes/2703_display_attributes/NegSem_2703_display_attributes_001.ttcn b/ATS/core_language/27_specifying_attributes/2703_display_attributes/NegSem_2703_display_attributes_001.ttcn new file mode 100644 index 00000000..b525d012 --- /dev/null +++ b/ATS/core_language/27_specifying_attributes/2703_display_attributes/NegSem_2703_display_attributes_001.ttcn @@ -0,0 +1,36 @@ +/***************************************************************** + ** @author STF 548 + ** @version 0.0.1 + ** @purpose 1:27.3, Verify that only one display attribute can be defined for a definition + ** @verdict pass reject + *****************************************************************/ + +// The following requirement is tested: +// Restriction a +// At most one display attribute shall be applied to each definition, each individual field reference or +// language element to which a with statement is associated. + +module NegSem_2703_display_attributes_001 { + + type component GeneralComp { + } + + type record MyService { + integer i, + float f + } with { display "ServiceCall" display "blue"} // MyRecord will be displayed as a ServiceCall + + testcase TC_NegSem_2703_display_attributes_001 () runs on GeneralComp { + var universal charstring v_display := MyService.display; + if(v_display == "ServiceCall") { + setverdict(pass); + } else { + setverdict(fail); + } + } + + control{ + execute(TC_NegSem_2703_display_attributes_001()); + } + +} \ No newline at end of file diff --git a/ATS/core_language/27_specifying_attributes/2703_display_attributes/NegSem_2703_display_attributes_002.ttcn b/ATS/core_language/27_specifying_attributes/2703_display_attributes/NegSem_2703_display_attributes_002.ttcn new file mode 100644 index 00000000..95810f61 --- /dev/null +++ b/ATS/core_language/27_specifying_attributes/2703_display_attributes/NegSem_2703_display_attributes_002.ttcn @@ -0,0 +1,36 @@ +/***************************************************************** + ** @author STF 548 + ** @version 0.0.1 + ** @purpose 1:27.3, Verify that only one display attribute can be defined for a field + ** @verdict pass reject + *****************************************************************/ + +// The following requirement is tested: +// Restriction a +// At most one display attribute shall be applied to each definition, each individual field reference or +// language element to which a with statement is associated. + +module NegSem_2703_display_attributes_002 { + + type component GeneralComp { + } + + type record MyService { + integer i, + float f + } with { display(f) "ServiceCall" display(f) "blue"} + + testcase TC_NegSem_2703_display_attributes_002 () runs on GeneralComp { + var universal charstring v_display := MyService.f.display; + if(v_display == "ServiceCall") { + setverdict(pass); + } else { + setverdict(fail); + } + } + + control{ + execute(TC_NegSem_2703_display_attributes_002()); + } + +} \ No newline at end of file diff --git a/ATS/core_language/27_specifying_attributes/2703_display_attributes/NegSem_2703_display_attributes_003.ttcn b/ATS/core_language/27_specifying_attributes/2703_display_attributes/NegSem_2703_display_attributes_003.ttcn new file mode 100644 index 00000000..9c3a6c64 --- /dev/null +++ b/ATS/core_language/27_specifying_attributes/2703_display_attributes/NegSem_2703_display_attributes_003.ttcn @@ -0,0 +1,36 @@ +/***************************************************************** + ** @author STF 548 + ** @version 0.0.1 + ** @purpose 1:27.3, Verify that only one display attribute can be defined for a definition + ** @verdict pass reject + *****************************************************************/ + +// The following requirement is tested: +// Restriction a +// At most one display attribute shall be applied to each definition, each individual field reference or +// language element to which a with statement is associated. + +module NegSem_2703_display_attributes_003 { + + type component GeneralComp { + } + + type record MyService { + integer i, + float f + } + + testcase TC_NegSem_2703_display_attributes_003 () runs on GeneralComp { + var universal charstring v_display := MyService.display; + if(v_display == "ServiceCall") { + setverdict(pass); + } else { + setverdict(fail); + } + } + + control{ + execute(TC_NegSem_2703_display_attributes_003()); + } + +} with { display "ServiceCall" display "blue"} \ No newline at end of file diff --git a/ATS/core_language/27_specifying_attributes/2703_display_attributes/Sem_2703_display_attributes_001.ttcn b/ATS/core_language/27_specifying_attributes/2703_display_attributes/Sem_2703_display_attributes_001.ttcn new file mode 100644 index 00000000..36fe8a17 --- /dev/null +++ b/ATS/core_language/27_specifying_attributes/2703_display_attributes/Sem_2703_display_attributes_001.ttcn @@ -0,0 +1,35 @@ +/***************************************************************** + ** @author STF 548 + ** @version 0.0.1 + ** @purpose 1:27.3, Verify that display attribute can be defined + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirement is tested: +// All TTCN-3 language elements can have display attributes to specify how particular language elements shall be +// displayed in. + +module Sem_2703_display_attributes_001 { + + type component GeneralComp { + } + + type record MyService { + integer i, + float f + } with { display "ServiceCall" } // MyRecord will be displayed as a ServiceCall + + testcase TC_Sem_2703_display_attributes_001 () runs on GeneralComp { + var universal charstring v_display := MyService.display; + if(v_display == "ServiceCall") { + setverdict(pass); + } else { + setverdict(fail); + } + } + + control{ + execute(TC_Sem_2703_display_attributes_001()); + } + +} \ No newline at end of file diff --git a/ATS/core_language/27_specifying_attributes/2704_encoding_attributes/Sem_2704_encoding_attributes_001.ttcn b/ATS/core_language/27_specifying_attributes/2704_encoding_attributes/Sem_2704_encoding_attributes_001.ttcn new file mode 100644 index 00000000..bd054ae5 --- /dev/null +++ b/ATS/core_language/27_specifying_attributes/2704_encoding_attributes/Sem_2704_encoding_attributes_001.ttcn @@ -0,0 +1,45 @@ +/***************************************************************** + ** @author STF 548 + ** @version 0.0.1 + ** @purpose 1:27.4, Verify that a single encode attribute can be defined + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirement is tested: +// Encoding rules define how a particular value, template, etc. shall be encoded and transmitted +// over a communication port and how received signals shall be decoded. TTCN-3 does not have +// a default encoding mechanism. This means that encoding rules or encoding directives are defined +// in some external manner to TTCN-3. +// The encode attribute allows the association of some referenced encoding rule or encoding +// directive to be made to a TTCN-3 definition. + +module Sem_2704_encoding_attributes_001 { + + type component GeneralComp { + } + + type charstring MyType; // Normally encoded according to the "Global encoding rule" + group myRecords { + type record MyPDU1 { + integer field1, // field1 will be encoded according to "Rule 3" + boolean field2, // field2 will be encoded according to "Rule 3" + MyType field3 // field3 will be encoded according to "Rule 2" + } with { encode (field1, field2) "Rule 3" } + } with { encode "Rule 2" } + + type record of universal charstring RoUC; + + testcase TC_Sem_2704_encoding_attributes_001 () runs on GeneralComp { + var RoUC v_enc := MyPDU1.encode; + if(v_enc == { "Rule 2" }) { + setverdict(pass); + } else { + setverdict(fail); + } + } + + control{ + execute(TC_Sem_2704_encoding_attributes_001()); + } + +} with { encode "Global encoding rule" } \ No newline at end of file diff --git a/ATS/core_language/27_specifying_attributes/2704_encoding_attributes/Sem_2704_encoding_attributes_002.ttcn b/ATS/core_language/27_specifying_attributes/2704_encoding_attributes/Sem_2704_encoding_attributes_002.ttcn new file mode 100644 index 00000000..39ace971 --- /dev/null +++ b/ATS/core_language/27_specifying_attributes/2704_encoding_attributes/Sem_2704_encoding_attributes_002.ttcn @@ -0,0 +1,37 @@ +/***************************************************************** + ** @author STF 548 + ** @version 0.0.1 + ** @purpose 1:27.4, Verify that multiple encode attributes can be defined + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirement is tested: +// The with statement may contain more than one encode attribute. In this case, multiple encodings are +// supported in the context where the attribute is used. + +module Sem_2704_encoding_attributes_002 { + + type component GeneralComp { + } + + type record MyPDU { + integer field1, + boolean field2 + } with { encode "Codec A" encode "Codec B" encode "Codec C" } + + type record of universal charstring RoUC; + + testcase TC_Sem_2704_encoding_attributes_002 () runs on GeneralComp { + var RoUC v_enc := MyPDU.encode; + if(v_enc == { "Codec A", "Codec B", "Codec C" }) { + setverdict(pass); + } else { + setverdict(fail); + } + } + + control{ + execute(TC_Sem_2704_encoding_attributes_002()); + } + +} \ No newline at end of file diff --git a/ATS/core_language/27_specifying_attributes/2705_variant_attributes/NegSem_2705_variant_attributes_001.ttcn b/ATS/core_language/27_specifying_attributes/2705_variant_attributes/NegSem_2705_variant_attributes_001.ttcn new file mode 100644 index 00000000..35aa613f --- /dev/null +++ b/ATS/core_language/27_specifying_attributes/2705_variant_attributes/NegSem_2705_variant_attributes_001.ttcn @@ -0,0 +1,38 @@ +/***************************************************************** + ** @author STF 548 + ** @version 0.0.1 + ** @purpose 1:27.5, Verify that a variant with no encoding references is not allowed for multiple encodings + ** @verdict pass reject + *****************************************************************/ + +// The following requirement is tested: +// It is not allowed to define variant attributes with no encoding reference if multiple encodings +// are used. + +module NegSem_2705_variant_attributes_001 { + + type component GeneralComp { + } + + type charstring Multi3 with { + encode "Codec1"; encode "Codec2"; + variant "Rule1"; + } // the statement will produce an error as there are multiple encodings and the + // variant attribute doesn't specify encoding reference + + type record of universal charstring RoUC; + + testcase TC_NegSem_2705_variant_attributes_001 () runs on GeneralComp { + var RoUC v_variant := Multi3.variant; + if(v_variant == { "Rule1" }) { + setverdict(pass); + } else { + setverdict(fail); + } + } + + control{ + execute(TC_NegSem_2705_variant_attributes_001()); + } + +} \ No newline at end of file diff --git a/ATS/core_language/27_specifying_attributes/2705_variant_attributes/NegSem_2705_variant_attributes_002.ttcn b/ATS/core_language/27_specifying_attributes/2705_variant_attributes/NegSem_2705_variant_attributes_002.ttcn new file mode 100644 index 00000000..a3ca4389 --- /dev/null +++ b/ATS/core_language/27_specifying_attributes/2705_variant_attributes/NegSem_2705_variant_attributes_002.ttcn @@ -0,0 +1,34 @@ +/***************************************************************** + ** @author STF 548 + ** @version 0.0.1 + ** @purpose 1:27.5, Verify that an error is generated if variant contains an unknown encoding reference + ** @verdict pass reject + *****************************************************************/ + +// The following requirement is tested: +// Restriction a) +// When dot notation is used in the variant attribute value for an element, the strings preceding +// the dot symbol shall resolve into one of the encode attribute values associated with the same +// element. + +module NegSem_2705_variant_attributes_002 { + + type component GeneralComp { + } + + type charstring Multi with { + encode "Codec1"; encode "Codec2"; + variant "Codec3"."Rule1"; + } + + type record of universal charstring RoUC; + + testcase TC_NegSem_2705_variant_attributes_002 () runs on GeneralComp { + setverdict(pass); + } + + control{ + execute(TC_NegSem_2705_variant_attributes_002()); + } + +} \ No newline at end of file diff --git a/ATS/core_language/27_specifying_attributes/2705_variant_attributes/NegSem_2705_variant_attributes_003.ttcn b/ATS/core_language/27_specifying_attributes/2705_variant_attributes/NegSem_2705_variant_attributes_003.ttcn new file mode 100644 index 00000000..d85bc6b9 --- /dev/null +++ b/ATS/core_language/27_specifying_attributes/2705_variant_attributes/NegSem_2705_variant_attributes_003.ttcn @@ -0,0 +1,34 @@ +/***************************************************************** + ** @author STF 548 + ** @version 0.0.1 + ** @purpose 1:27.5, Verify that an error is generated if variant contains an unknown encoding reference (inside a list) + ** @verdict pass reject + *****************************************************************/ + +// The following requirement is tested: +// Restriction a) +// When dot notation is used in the variant attribute value for an element, the strings preceding +// the dot symbol shall resolve into one of the encode attribute values associated with the same +// element. + +module NegSem_2705_variant_attributes_003 { + + type component GeneralComp { + } + + type charstring Multi with { + encode "Codec1"; encode "Codec2"; + variant {"Codec1", "Codec3"}."Rule1"; + } + + type record of universal charstring RoUC; + + testcase TC_NegSem_2705_variant_attributes_003 () runs on GeneralComp { + setverdict(pass); + } + + control{ + execute(TC_NegSem_2705_variant_attributes_003()); + } + +} \ No newline at end of file diff --git a/ATS/core_language/27_specifying_attributes/2705_variant_attributes/Sem_2705_variant_attributes_001.ttcn b/ATS/core_language/27_specifying_attributes/2705_variant_attributes/Sem_2705_variant_attributes_001.ttcn new file mode 100644 index 00000000..7fcee9e3 --- /dev/null +++ b/ATS/core_language/27_specifying_attributes/2705_variant_attributes/Sem_2705_variant_attributes_001.ttcn @@ -0,0 +1,39 @@ +/***************************************************************** + ** @author STF 548 + ** @version 0.0.1 + ** @purpose 1:27.5, Verify that a single variant attribute can be defined + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirement is tested: +// To specify a refinement of the currently specified encoding scheme instead of its replacement, +// the variant attribute shall be used. The variant attributes are different from other attributes, +// because they are closely related to encode attributes. Therefore, for variant attributes, +// additional overwriting rules apply (see clause 27.1.2.1). + +module Sem_2705_variant_attributes_001 { + + type component GeneralComp { + } + + type record MyPDU { + integer field1, + boolean field2 + } with { variant "Rule A" } + + type record of universal charstring RoUC; + + testcase TC_Sem_2705_variant_attributes_001 () runs on GeneralComp { + var RoUC v_variant := MyPDU.variant; + if(v_variant == { "Rule A" }) { + setverdict(pass); + } else { + setverdict(fail); + } + } + + control{ + execute(TC_Sem_2705_variant_attributes_001()); + } + +} \ No newline at end of file diff --git a/ATS/core_language/27_specifying_attributes/2705_variant_attributes/Sem_2705_variant_attributes_002.ttcn b/ATS/core_language/27_specifying_attributes/2705_variant_attributes/Sem_2705_variant_attributes_002.ttcn new file mode 100644 index 00000000..3c49410b --- /dev/null +++ b/ATS/core_language/27_specifying_attributes/2705_variant_attributes/Sem_2705_variant_attributes_002.ttcn @@ -0,0 +1,36 @@ +/***************************************************************** + ** @author STF 548 + ** @version 0.0.1 + ** @purpose 1:27.5, Verify that multiple variant attributes can be defined + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirement is tested: +// The with statement can contain any number of variant attributes. + +module Sem_2705_variant_attributes_002 { + + type component GeneralComp { + } + + type record MyPDU { + integer field1, + boolean field2 + } with { variant "Rule A" encode "Rule B" encode "Rule C" } + + type record of universal charstring RoUC; + + testcase TC_Sem_2705_variant_attributes_002 () runs on GeneralComp { + var RoUC v_enc := MyPDU.encode; + if(v_enc == { "Rule A", "Rule B", "Rule C" }) { + setverdict(pass); + } else { + setverdict(fail); + } + } + + control{ + execute(TC_Sem_2705_variant_attributes_002()); + } + +} \ No newline at end of file diff --git a/ATS/core_language/27_specifying_attributes/2705_variant_attributes/Sem_2705_variant_attributes_003.ttcn b/ATS/core_language/27_specifying_attributes/2705_variant_attributes/Sem_2705_variant_attributes_003.ttcn new file mode 100644 index 00000000..a8cda6ec --- /dev/null +++ b/ATS/core_language/27_specifying_attributes/2705_variant_attributes/Sem_2705_variant_attributes_003.ttcn @@ -0,0 +1,44 @@ +/***************************************************************** + ** @author STF 548 + ** @version 0.0.1 + ** @purpose 1:27.5, Verify that a dot notation is available for variant attributes + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirement is tested: +// If multiple encodings (see clause 27.4) are used, the variant attribute value shall be composed +// of two parts separated by a dot. Such variant attributes are called encoding related variant +// attributes. The first part of the attribute specifies the encodings the variant is related to. +// One possible notation is a simple string when the variant is related to a single encode attribute. +// The second part of the attribute (following the dot symbol) is a simple string that specifies the +// variant value. + +module Sem_2705_variant_attributes_003 { + + type component GeneralComp { + } + + type charstring Multi with { + encode "Codec1"; variant "Codec1"."Rule1"; + encode "Codec2"; variant "Codec2"."Rule3"; + }; // multiple encodings ("Codec1", "Codec2"), the variant "Rule1" is valid + // for the "Codec1" encoding only, while the variant "Rule3" applies only + // for the "Codec2" encoding + + type record of universal charstring RoUC; + + testcase TC_Sem_2705_variant_attributes_003 () runs on GeneralComp { + var RoUC v_variant1 := Multi.variant("Codec1"), + v_variant2 := Multi.variant("Codec2"); + if(v_variant1 == { "Rule1" } and v_variant2 == { "Rule3" }) { + setverdict(pass); + } else { + setverdict(fail); + } + } + + control{ + execute(TC_Sem_2705_variant_attributes_003()); + } + +} \ No newline at end of file diff --git a/ATS/core_language/27_specifying_attributes/2705_variant_attributes/Sem_2705_variant_attributes_004.ttcn b/ATS/core_language/27_specifying_attributes/2705_variant_attributes/Sem_2705_variant_attributes_004.ttcn new file mode 100644 index 00000000..d417ebbe --- /dev/null +++ b/ATS/core_language/27_specifying_attributes/2705_variant_attributes/Sem_2705_variant_attributes_004.ttcn @@ -0,0 +1,42 @@ +/***************************************************************** + ** @author STF 548 + ** @version 0.0.1 + ** @purpose 1:27.5, Verify that a dot notation is available for variant attributes + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirement is tested: +// If multiple encodings (see clause 27.4) are used, the variant attribute value shall be composed +// of two parts separated by a dot. Such variant attributes are called encoding related variant +// attributes. The first part of the attribute specifies the encodings the variant is related to. +// One possible notation is a comma separated list of strings enclosed in curly brackets if +// the variant is related to multiple encodings. The second part of the attribute (following the dot +// symbol) is a simple string that specifies the variant value. + +module Sem_2705_variant_attributes_004 { + + type component GeneralComp { + } + + type charstring Multi2 with { + encode "Codec1"; encode "Codec2"; + variant {"Codec1","Codec2"}."Rule1"; + }; // multiple encodings ("Codec1", "Codec2"), variant "Rule1" applies to both of them + + type record of universal charstring RoUC; + + testcase TC_Sem_2705_variant_attributes_004 () runs on GeneralComp { + var RoUC v_variant1 := Multi2.variant("Codec1"), + v_variant2 := Multi2.variant("Codec2"); + if(v_variant1 == { "Rule1" } and v_variant2 == { "Rule1" }) { + setverdict(pass); + } else { + setverdict(fail); + } + } + + control{ + execute(TC_Sem_2705_variant_attributes_004()); + } + +} \ No newline at end of file diff --git a/ATS/core_language/27_specifying_attributes/2706_extension_attributes/Sem_2706_extension_attributes_001.ttcn b/ATS/core_language/27_specifying_attributes/2706_extension_attributes/Sem_2706_extension_attributes_001.ttcn new file mode 100644 index 00000000..1e12c2f6 --- /dev/null +++ b/ATS/core_language/27_specifying_attributes/2706_extension_attributes/Sem_2706_extension_attributes_001.ttcn @@ -0,0 +1,34 @@ +/***************************************************************** + ** @author STF 548 + ** @version 0.0.1 + ** @purpose 1:27.6, Verify that a single extension attribute can be defined + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirement is tested: +// Extension attributes can be used for proprietary extensions to TTCN-3. The with statement may contain +// any number of extension attributes. + +module Sem_2706_extension_attributes_001 { + + type component GeneralComp { + } + + type charstring MyType with { extension "My custom extension" }; + + type record of universal charstring RoUC; + + testcase TC_Sem_2706_extension_attributes_001 () runs on GeneralComp { + var RoUC v_ext := MyType.extension; + if(v_ext == { "My custom extension" }) { + setverdict(pass); + } else { + setverdict(fail); + } + } + + control{ + execute(TC_Sem_2706_extension_attributes_001()); + } + +} \ No newline at end of file diff --git a/ATS/core_language/27_specifying_attributes/2706_extension_attributes/Sem_2706_extension_attributes_002.ttcn b/ATS/core_language/27_specifying_attributes/2706_extension_attributes/Sem_2706_extension_attributes_002.ttcn new file mode 100644 index 00000000..0e520c4d --- /dev/null +++ b/ATS/core_language/27_specifying_attributes/2706_extension_attributes/Sem_2706_extension_attributes_002.ttcn @@ -0,0 +1,38 @@ +/***************************************************************** + ** @author STF 548 + ** @version 0.0.1 + ** @purpose 1:27.6, Verify that multiple extension attributes can be defined + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirement is tested: +// Extension attributes can be used for proprietary extensions to TTCN-3. The with statement may contain +// any number of extension attributes. + +module Sem_2706_extension_attributes_002 { + + type component GeneralComp { + } + + type charstring MyType with { + extension "My custom extension"; + extension "Second extension"; + extension "Yet another extension"; + }; + + type record of universal charstring RoUC; + + testcase TC_Sem_2706_extension_attributes_002 () runs on GeneralComp { + var RoUC v_ext := MyType.extension; + if(v_ext == { "My custom extension", "Second extension", "Yet another extension" }) { + setverdict(pass); + } else { + setverdict(fail); + } + } + + control{ + execute(TC_Sem_2706_extension_attributes_002()); + } + +} \ No newline at end of file diff --git a/ATS/core_language/27_specifying_attributes/2707_optional_attributes/NegSem_2707_OptionalAttributes_001.ttcn b/ATS/core_language/27_specifying_attributes/2707_optional_attributes/NegSem_2707_OptionalAttributes_001.ttcn new file mode 100644 index 00000000..fb3700e3 --- /dev/null +++ b/ATS/core_language/27_specifying_attributes/2707_optional_attributes/NegSem_2707_OptionalAttributes_001.ttcn @@ -0,0 +1,95 @@ +/*************************************************** + ** @author STF 433 (updated by STF 521) + ** @version 0.0.2 + ** @purpose 1:27.7, Ensure that the IUT correctly handles attribute definitions and their scoping rules + ** @verdict pass reject + ***************************************************/ + +module NegSem_2707_OptionalAttributes_001 { + + type enumerated EnumeratedType {e_black, e_white}; + + type record RecordType { + integer a optional, + integer b optional, + boolean c + } + + type set SetType { + integer a optional, + integer b optional, + boolean c + } + + type record length (1..2) of integer IntegerList; + + type set length (1..2) of integer IntegerUList; + + type union UnionType { + integer a, + EnumeratedType b, + boolean c + } + + type record MessageType { + integer field1, + charstring field2, + boolean field3, + integer field4[4], + EnumeratedType field5, + RecordType field6, + SetType field7, + UnionType field8, + IntegerList field9, + IntegerUList field10 + } + + type port loopbackPort message { + inout MessageType + } with { optional "implicit omit"} + // the optional keyword is forbidden here, because according to the restriction 27.7.a + // a port type shall not have an optional attribute associated to them directly. + + +type component GeneralComp { + port loopbackPort messagePort +} + +testcase TC_NegSem_2707_OptionalAttributes_001() runs on GeneralComp { + + var MessageType v_testMessage; + + template MessageType mw_matchingTemplate:= + { + field1 := 1, + field2 := "test string", + field3 := true, + field4 := {1,2,3,4}, + field5 := e_black, + field6 := {a:=1,b:=2,c:=true}, + field7 := {a:=1,b:=2,c:=true}, + field8 := {a:=1}, + field9 := {1}, + field10 := {1,2} + } + + v_testMessage:= { + field1 := 1, + field2 := "test string", + field3 := true, + field4 := {1,2,3,4}, + field5 := e_black, + field6 := {a:=omit,b:=omit,c:=true}, + field7 := {a:=omit,b:=omit,c:=true}, + field8 := {a:=1}, + field9 := {1}, + field10 := {1,2} + } + +} + +control{ + execute(TC_NegSem_2707_OptionalAttributes_001()); +} + +} diff --git a/ATS/core_language/27_specifying_attributes/2707_optional_attributes/NegSem_2707_OptionalAttributes_002.ttcn b/ATS/core_language/27_specifying_attributes/2707_optional_attributes/NegSem_2707_OptionalAttributes_002.ttcn new file mode 100644 index 00000000..ca27c377 --- /dev/null +++ b/ATS/core_language/27_specifying_attributes/2707_optional_attributes/NegSem_2707_OptionalAttributes_002.ttcn @@ -0,0 +1,94 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:27.7, Ensure that the IUT correctly handles attribute definitions and their scoping rules + ** @verdict pass reject + ***************************************************/ + +module NegSem_2707_OptionalAttributes_002 { + + type enumerated EnumeratedType {e_black, e_white}; + + type record RecordType { + integer a optional, + integer b optional, + boolean c + } + + type set SetType { + integer a optional, + integer b optional, + boolean c + } + + type record length (1..2) of integer IntegerList; + + type set length (1..2) of integer IntegerUList; + + type union UnionType { + integer a, + EnumeratedType b, + boolean c + } + + type record MessageType { + integer field1, + charstring field2, + boolean field3, + integer field4[4], + EnumeratedType field5, + RecordType field6, + SetType field7, + UnionType field8, + IntegerList field9, + IntegerUList field10 + } with { optional "implicit omit"} //not valid optional attribute + // TT: this is not forbidden, it just should not have any effect on the templates + + type port loopbackPort message { + inout MessageType + } + + +type component GeneralComp { + port loopbackPort messagePort +} + +testcase TC_NegSem_2707_OptionalAttributes_002() runs on GeneralComp { + + var MessageType v_testMessage; + + template MessageType mw_matchingTemplate:= + { + field1 := 1, + field2 := "test string", + field3 := true, + field4 := {1,2,3,4}, + field5 := e_black, + field6 := {a:=1,b:=2,c:=true}, + field7 := {a:=1,b:=2,c:=true}, + field8 := {a:=1}, + field9 := {1}, + field10 := {1,2} + } + + v_testMessage:= { + field1 := 1, + field2 := "test string", + field3 := true, + field4 := {1,2,3,4}, + field5 := e_black, + field6 := {a:=omit,b:=omit,c:=true}, + field7 := {a:=omit,b:=omit,c:=true}, + field8 := {a:=1}, + field9 := {1}, + field10 := {1,2} + } + +} + +control{ + execute(TC_NegSem_2707_OptionalAttributes_002()); +} + +} diff --git a/ATS/core_language/27_specifying_attributes/2707_optional_attributes/NegSem_2707_OptionalAttributes_003.ttcn b/ATS/core_language/27_specifying_attributes/2707_optional_attributes/NegSem_2707_OptionalAttributes_003.ttcn new file mode 100644 index 00000000..b9fbec0f --- /dev/null +++ b/ATS/core_language/27_specifying_attributes/2707_optional_attributes/NegSem_2707_OptionalAttributes_003.ttcn @@ -0,0 +1,103 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:27.7, Ensure that the IUT correctly handles attribute definitions and their scoping rules + ** @verdict pass reject + ***************************************************/ + +module NegSem_2707_OptionalAttributes_003 { + + type enumerated EnumeratedType {e_black, e_white}; + + type record RecordType { + integer a optional, + integer b optional, + boolean c + } + + type set SetType { + integer a optional, + integer b optional, + boolean c + } + + type record length (1..2) of integer IntegerList; + + type set length (1..2) of integer IntegerUList; + + type union UnionType { + integer a, + EnumeratedType b, + boolean c + } + + type record MessageType { + integer field1, + charstring field2, + boolean field3, + integer field4[4], + EnumeratedType field5, + RecordType field6, + SetType field7, + UnionType field8, + IntegerList field9, + IntegerUList field10 + } + + template MessageType mw_matchingTemplate:= + { + field1 := 1, + field2 := "test string", + field3 := true, + field4 := {1,2,3,4}, + field5 := e_black, + field6 := {b:=3,c:=true}, //a is still undefined + field7 := {a:=3,c:=true}, //b is still undefined + field8 := {a:=1}, + field9 := {1}, + field10 := {1,2} + } with { optional (field6.a, field7.b) "implicit omit"} + + const MessageType c_testMessage:= { + field1 := 1, + field2 := "test string", + field3 := true, + field4 := {1,2,3,4}, + field5 := e_black, + field6 := {a:=3,b:=3,c:=true}, + field7 := {a:=3,b:=3,c:=true}, + field8 := {a:=1}, + field9 := {1}, + field10 := {1,2} + } + + type port loopbackPort message { + inout MessageType + } + + +type component GeneralComp { + port loopbackPort messagePort +} + +testcase TC_NegSem_2707_OptionalAttributes_003() runs on GeneralComp { + + var MessageType v_testMessage:=c_testMessage; + + messagePort.send(v_testMessage); + + alt { + [] messagePort.receive(mw_matchingTemplate) { //cannot match not fully defined template + setverdict(pass); + } + [] messagePort.receive { + setverdict(fail); + } + } +} + +control{ + execute(TC_NegSem_2707_OptionalAttributes_003()); +} + +} with { optional override "explicit omit"} diff --git a/ATS/core_language/27_specifying_attributes/2707_optional_attributes/Sem_2707_OptionalAttributes_001.ttcn b/ATS/core_language/27_specifying_attributes/2707_optional_attributes/Sem_2707_OptionalAttributes_001.ttcn new file mode 100644 index 00000000..3db024f4 --- /dev/null +++ b/ATS/core_language/27_specifying_attributes/2707_optional_attributes/Sem_2707_OptionalAttributes_001.ttcn @@ -0,0 +1,104 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:27.7, Ensure that the IUT correctly handles attribute definitions and their scoping rules + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +module Sem_2707_OptionalAttributes_001 { + + type enumerated EnumeratedType {e_black, e_white}; + + type record RecordType { + integer a optional, + integer b optional, + boolean c + } + + type set SetType { + integer a optional, + integer b optional, + boolean c + } + + type record length (1..2) of integer IntegerList; + + type set length (1..2) of integer IntegerUList; + + type union UnionType { + integer a, + EnumeratedType b, + boolean c + } + + type record MessageType { + integer field1, + charstring field2, + boolean field3, + integer field4[4], + EnumeratedType field5, + RecordType field6, + SetType field7, + UnionType field8, + IntegerList field9, + IntegerUList field10 + } + + template MessageType mw_matchingTemplate:= + { + field1 := 1, + field2 := "test string", + field3 := true, + field4 := {1,2,3,4}, + field5 := e_black, + field6 := {c:=true}, //a and b fields are omitted + field7 := {c:=true}, //a and b fields are omitted + field8 := {a:=1}, + field9 := {1}, + field10 := {1,2} + } with { optional "implicit omit"} + + const MessageType c_testMessage:= { + field1 := 1, + field2 := "test string", + field3 := true, + field4 := {1,2,3,4}, + field5 := e_black, + field6 := {a:=1,b:=omit,c:=true}, + field7 := {a:=omit,b:=1,c:=true}, + field8 := {a:=1}, + field9 := {1}, + field10 := {1,2} + } + + + type port loopbackPort message { + inout MessageType + } + + +type component GeneralComp { + port loopbackPort messagePort +} + +testcase TC_Sem_2707_OptionalAttributes_001() runs on GeneralComp { + + var MessageType v_testMessage:=c_testMessage; + + messagePort.send(v_testMessage); + + alt { + [] messagePort.receive(mw_matchingTemplate) { + setverdict(fail); + } + [] messagePort.receive { + setverdict(pass); + } + } +} + +control{ + execute(TC_Sem_2707_OptionalAttributes_001()); +} + +} diff --git a/ATS/core_language/27_specifying_attributes/2707_optional_attributes/Sem_2707_OptionalAttributes_002.ttcn b/ATS/core_language/27_specifying_attributes/2707_optional_attributes/Sem_2707_OptionalAttributes_002.ttcn new file mode 100644 index 00000000..9b74564e --- /dev/null +++ b/ATS/core_language/27_specifying_attributes/2707_optional_attributes/Sem_2707_OptionalAttributes_002.ttcn @@ -0,0 +1,103 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:27.7, Ensure that the IUT correctly handles attribute definitions and their scoping rules + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +module Sem_2707_OptionalAttributes_002 { + + type enumerated EnumeratedType {e_black, e_white}; + + type record RecordType { + integer a optional, + integer b optional, + boolean c + } + + type set SetType { + integer a optional, + integer b optional, + boolean c + } + + type record length (1..2) of integer IntegerList; + + type set length (1..2) of integer IntegerUList; + + type union UnionType { + integer a, + EnumeratedType b, + boolean c + } + + type record MessageType { + integer field1, + charstring field2, + boolean field3, + integer field4[4], + EnumeratedType field5, + RecordType field6, + SetType field7, + UnionType field8, + IntegerList field9, + IntegerUList field10 + } + + template MessageType mw_matchingTemplate:= + { + field1 := 1, + field2 := "test string", + field3 := true, + field4 := {1,2,3,4}, + field5 := e_black, + field6 := {a:=1,b:=2,c:=true}, //a and b fields are specifically defined + field7 := {a:=1,b:=2,c:=true}, //a and b fields are specifically defined + field8 := {a:=1}, + field9 := {1}, + field10 := {1,2} + } with { optional "implicit omit"} + + const MessageType c_testMessage:= { + field1 := 1, + field2 := "test string", + field3 := true, + field4 := {1,2,3,4}, + field5 := e_black, + field6 := {a:=1,b:=2,c:=true}, + field7 := {a:=1,b:=2,c:=true}, + field8 := {a:=1}, + field9 := {1}, + field10 := {1,2} + } + + type port loopbackPort message { + inout MessageType + } + + +type component GeneralComp { + port loopbackPort messagePort +} + +testcase TC_Sem_2707_OptionalAttributes_002() runs on GeneralComp { + + var MessageType v_testMessage:=c_testMessage; + + messagePort.send(v_testMessage); + + alt { + [] messagePort.receive(mw_matchingTemplate) { + setverdict(pass); + } + [] messagePort.receive { + setverdict(fail); + } + } +} + +control{ + execute(TC_Sem_2707_OptionalAttributes_002()); +} + +} diff --git a/ATS/core_language/27_specifying_attributes/2707_optional_attributes/Sem_2707_OptionalAttributes_003.ttcn b/ATS/core_language/27_specifying_attributes/2707_optional_attributes/Sem_2707_OptionalAttributes_003.ttcn new file mode 100644 index 00000000..7f82f758 --- /dev/null +++ b/ATS/core_language/27_specifying_attributes/2707_optional_attributes/Sem_2707_OptionalAttributes_003.ttcn @@ -0,0 +1,103 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:27.7, Ensure that the IUT correctly handles attribute definitions and their scoping rules + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +module Sem_2707_OptionalAttributes_003 { + + type enumerated EnumeratedType {e_black, e_white}; + + type record RecordType { + integer a optional, + integer b optional, + boolean c + } + + type set SetType { + integer a optional, + integer b optional, + boolean c + } + + type record length (1..2) of integer IntegerList; + + type set length (1..2) of integer IntegerUList; + + type union UnionType { + integer a, + EnumeratedType b, + boolean c + } + + type record MessageType { + integer field1, + charstring field2, + boolean field3, + integer field4[4], + EnumeratedType field5, + RecordType field6, + SetType field7, + UnionType field8, + IntegerList field9, + IntegerUList field10 + } + + template MessageType mw_matchingTemplate:= + { + field1 := 1, + field2 := "test string", + field3 := true, + field4 := {1,2,3,4}, + field5 := e_black, + field6 := {a:=1,b:=2,c:=true}, //a and b fields are specifically defined + field7 := {a:=1,b:=2,c:=true}, //a and b fields are specifically defined + field8 := {a:=1}, + field9 := {1}, + field10 := {1,2} + } with { optional "explicit omit"} + + const MessageType c_testMessage:= { + field1 := 1, + field2 := "test string", + field3 := true, + field4 := {1,2,3,4}, + field5 := e_black, + field6 := {a:=omit,b:=omit,c:=true}, + field7 := {a:=omit,b:=omit,c:=true}, + field8 := {a:=1}, + field9 := {1}, + field10 := {1,2} + } + + type port loopbackPort message { + inout MessageType + } + + +type component GeneralComp { + port loopbackPort messagePort +} + +testcase TC_Sem_2707_OptionalAttributes_003() runs on GeneralComp { + + var MessageType v_testMessage:=c_testMessage; + + messagePort.send(v_testMessage); + + alt { + [] messagePort.receive(mw_matchingTemplate) { + setverdict(fail); + } + [] messagePort.receive { + setverdict(pass); + } + } +} + +control{ + execute(TC_Sem_2707_OptionalAttributes_003()); +} + +} diff --git a/ATS/core_language/27_specifying_attributes/2707_optional_attributes/Sem_2707_OptionalAttributes_004.ttcn b/ATS/core_language/27_specifying_attributes/2707_optional_attributes/Sem_2707_OptionalAttributes_004.ttcn new file mode 100644 index 00000000..b05ef9d5 --- /dev/null +++ b/ATS/core_language/27_specifying_attributes/2707_optional_attributes/Sem_2707_OptionalAttributes_004.ttcn @@ -0,0 +1,103 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:27.7, Ensure that the IUT correctly handles attribute definitions and their scoping rules + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +module Sem_2707_OptionalAttributes_004 { + + type enumerated EnumeratedType {e_black, e_white}; + + type record RecordType { + integer a optional, + integer b optional, + boolean c + } + + type set SetType { + integer a optional, + integer b optional, + boolean c + } + + type record length (1..2) of integer IntegerList; + + type set length (1..2) of integer IntegerUList; + + type union UnionType { + integer a, + EnumeratedType b, + boolean c + } + + type record MessageType { + integer field1, + charstring field2, + boolean field3, + integer field4[4], + EnumeratedType field5, + RecordType field6, + SetType field7, + UnionType field8, + IntegerList field9, + IntegerUList field10 + } + + template MessageType mw_matchingTemplate:= + { + field1 := 1, + field2 := "test string", + field3 := true, + field4 := {1,2,3,4}, + field5 := e_black, + field6 := {a:=omit,b:=omit,c:=true}, //a and b fields are specifically defined + field7 := {a:=omit,b:=omit,c:=true}, //a and b fields are specifically defined + field8 := {a:=1}, + field9 := {1}, + field10 := {1,2} + } with { optional "explicit omit"} + + const MessageType c_testMessage:= { + field1 := 1, + field2 := "test string", + field3 := true, + field4 := {1,2,3,4}, + field5 := e_black, + field6 := {a:=omit,b:=omit,c:=true}, + field7 := {a:=omit,b:=omit,c:=true}, + field8 := {a:=1}, + field9 := {1}, + field10 := {1,2} + } + + type port loopbackPort message { + inout MessageType + } + + +type component GeneralComp { + port loopbackPort messagePort +} + +testcase TC_Sem_2707_OptionalAttributes_004() runs on GeneralComp { + + var MessageType v_testMessage:=c_testMessage; + + messagePort.send(v_testMessage); + + alt { + [] messagePort.receive(mw_matchingTemplate) { + setverdict(pass); + } + [] messagePort.receive { + setverdict(fail); + } + } +} + +control{ + execute(TC_Sem_2707_OptionalAttributes_004()); +} + +} diff --git a/ATS/core_language/27_specifying_attributes/2707_optional_attributes/Sem_2707_OptionalAttributes_005.ttcn b/ATS/core_language/27_specifying_attributes/2707_optional_attributes/Sem_2707_OptionalAttributes_005.ttcn new file mode 100644 index 00000000..b42a7415 --- /dev/null +++ b/ATS/core_language/27_specifying_attributes/2707_optional_attributes/Sem_2707_OptionalAttributes_005.ttcn @@ -0,0 +1,104 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:27.7, Ensure that the IUT correctly handles attribute definitions and their scoping rules + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +module Sem_2707_OptionalAttributes_005 { + + type enumerated EnumeratedType {e_black, e_white}; + + type record RecordType { + integer a optional, + integer b optional, + boolean c + } + + type set SetType { + integer a optional, + integer b optional, + boolean c + } + + type record length (1..2) of integer IntegerList; + + type set length (1..2) of integer IntegerUList; + + type union UnionType { + integer a, + EnumeratedType b, + boolean c + } + + type record MessageType { + integer field1, + charstring field2, + boolean field3, + integer field4[4], + EnumeratedType field5, + RecordType field6, + SetType field7, + UnionType field8, + IntegerList field9, + IntegerUList field10 + } + + template MessageType mw_matchingTemplate:= + { + field1 := 1, + field2 := "test string", + field3 := true, + field4 := {1,2,3,4}, + field5 := e_black, + field6 := {b:=3,c:=true}, //a is omitted + field7 := {a:=3,c:=true}, //b is omitted + field8 := {a:=1}, + field9 := {1}, + field10 := {1,2} + } with { optional (field6, field7) "implicit omit"} + + + const MessageType c_testMessage:= { + field1 := 1, + field2 := "test string", + field3 := true, + field4 := {1,2,3,4}, + field5 := e_black, + field6 := {a:=3,b:=3,c:=true}, + field7 := {a:=3,b:=3,c:=true}, + field8 := {a:=1}, + field9 := {1}, + field10 := {1,2} + } + + type port loopbackPort message { + inout MessageType + } + + +type component GeneralComp { + port loopbackPort messagePort +} + +testcase TC_Sem_2707_OptionalAttributes_005() runs on GeneralComp { + + var MessageType v_testMessage:=c_testMessage; + + messagePort.send(v_testMessage); + + alt { + [] messagePort.receive(mw_matchingTemplate) { + setverdict(fail); + } + [] messagePort.receive { + setverdict(pass); + } + } +} + +control{ + execute(TC_Sem_2707_OptionalAttributes_005()); +} + +} with { optional "explicit omit"} diff --git a/ATS/core_language/27_specifying_attributes/2707_optional_attributes/Sem_2707_OptionalAttributes_006.ttcn b/ATS/core_language/27_specifying_attributes/2707_optional_attributes/Sem_2707_OptionalAttributes_006.ttcn new file mode 100644 index 00000000..260ce5df --- /dev/null +++ b/ATS/core_language/27_specifying_attributes/2707_optional_attributes/Sem_2707_OptionalAttributes_006.ttcn @@ -0,0 +1,103 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:27.7, Ensure that the IUT correctly handles attribute definitions and their scoping rules + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +module Sem_2707_OptionalAttributes_006 { + + type enumerated EnumeratedType {e_black, e_white}; + + type record RecordType { + integer a optional, + integer b optional, + boolean c + } + + type set SetType { + integer a optional, + integer b optional, + boolean c + } + + type record length (1..2) of integer IntegerList; + + type set length (1..2) of integer IntegerUList; + + type union UnionType { + integer a, + EnumeratedType b, + boolean c + } + + type record MessageType { + integer field1, + charstring field2, + boolean field3, + integer field4[4], + EnumeratedType field5, + RecordType field6, + SetType field7, + UnionType field8, + IntegerList field9, + IntegerUList field10 + } + + template MessageType mw_matchingTemplate:= + { + field1 := 1, + field2 := "test string", + field3 := true, + field4 := {1,2,3,4}, + field5 := e_black, + field6 := {c:=true}, //a and b fields are omitted + field7 := {c:=true}, //a and b fields are omitted + field8 := {a:=1}, + field9 := {1}, + field10 := {1,2} + } + + const MessageType c_testMessage:= { + field1 := 1, + field2 := "test string", + field3 := true, + field4 := {1,2,3,4}, + field5 := e_black, + field6 := {a:=1,b:=omit,c:=true}, + field7 := {a:=omit,b:=1,c:=true}, + field8 := {a:=1}, + field9 := {1}, + field10 := {1,2} + } + + type port loopbackPort message { + inout MessageType + } + + +type component GeneralComp { + port loopbackPort messagePort +} + +testcase TC_Sem_2707_OptionalAttributes_006() runs on GeneralComp { + + var MessageType v_testMessage:=c_testMessage; + + messagePort.send(v_testMessage); + + alt { + [] messagePort.receive(mw_matchingTemplate) { + setverdict(fail); + } + [] messagePort.receive { + setverdict(pass); + } + } +} + +control{ + execute(TC_Sem_2707_OptionalAttributes_006()); +} + +} with { optional "implicit omit"} //this attribute has an effect only on the template definition in the module diff --git a/ATS/core_language/27_specifying_attributes/2707_optional_attributes/Sem_2707_OptionalAttributes_007.ttcn b/ATS/core_language/27_specifying_attributes/2707_optional_attributes/Sem_2707_OptionalAttributes_007.ttcn new file mode 100644 index 00000000..a942c148 --- /dev/null +++ b/ATS/core_language/27_specifying_attributes/2707_optional_attributes/Sem_2707_OptionalAttributes_007.ttcn @@ -0,0 +1,103 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:27.7, Ensure that the IUT correctly handles attribute definitions and their scoping rules + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +module Sem_2707_OptionalAttributes_007 { + + type enumerated EnumeratedType {e_black, e_white}; + + type record RecordType { + integer a optional, + integer b optional, + boolean c + } + + type set SetType { + integer a optional, + integer b optional, + boolean c + } + + type record length (1..2) of integer IntegerList; + + type set length (1..2) of integer IntegerUList; + + type union UnionType { + integer a, + EnumeratedType b, + boolean c + } + + type record MessageType { + integer field1, + charstring field2, + boolean field3, + integer field4[4], + EnumeratedType field5, + RecordType field6, + SetType field7, + UnionType field8, + IntegerList field9, + IntegerUList field10 + } + + template MessageType mw_matchingTemplate:= + { + field1 := 1, + field2 := "test string", + field3 := true, + field4 := {1,2,3,4}, + field5 := e_black, + field6 := {c:=true}, //a and b fields are omitted + field7 := {c:=true}, //a and b fields are omitted + field8 := {a:=1}, + field9 := {1}, + field10 := {1,2} + } with { optional "implicit omit"} + + const MessageType c_testMessage:= { + field1 := 1, + field2 := "test string", + field3 := true, + field4 := {1,2,3,4}, + field5 := e_black, + field6 := {a:=omit,b:=omit,c:=true}, + field7 := {a:=omit,b:=omit,c:=true}, + field8 := {a:=1}, + field9 := {1}, + field10 := {1,2} + } + + type port loopbackPort message { + inout MessageType + } + + +type component GeneralComp { + port loopbackPort messagePort +} + +testcase TC_Sem_2707_OptionalAttributes_007() runs on GeneralComp { + + var MessageType v_testMessage:=c_testMessage; + + messagePort.send(v_testMessage); + + alt { + [] messagePort.receive(mw_matchingTemplate) { + setverdict(pass); + } + [] messagePort.receive { + setverdict(fail); + } + } +} + +control{ + execute(TC_Sem_2707_OptionalAttributes_007()); +} + +} diff --git a/ATS/core_language/27_specifying_attributes/2707_optional_attributes/Syn_2707_OptionalAttributes_001.ttcn b/ATS/core_language/27_specifying_attributes/2707_optional_attributes/Syn_2707_OptionalAttributes_001.ttcn new file mode 100644 index 00000000..67042f9c --- /dev/null +++ b/ATS/core_language/27_specifying_attributes/2707_optional_attributes/Syn_2707_OptionalAttributes_001.ttcn @@ -0,0 +1,93 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:27.7, Ensure that the IUT correctly handles attribute definitions and their scoping rules + ** @verdict pass accept, noexecution + ***************************************************/ + +module Syn_2707_OptionalAttributes_001 { + + type enumerated EnumeratedType {e_black, e_white}; + + type record RecordType { + integer a optional, + integer b optional, + boolean c + } + + type set SetType { + integer a optional, + integer b optional, + boolean c + } + + type record length (1..2) of integer IntegerList; + + type set length (1..2) of integer IntegerUList; + + type union UnionType { + integer a, + EnumeratedType b, + boolean c + } + + type record MessageType { + integer field1, + charstring field2, + boolean field3, + integer field4[4], + EnumeratedType field5, + RecordType field6, + SetType field7, + UnionType field8, + IntegerList field9, + IntegerUList field10 + } + + type port loopbackPort message { + inout MessageType + } + + template MessageType mw_matchingTemplate:= + { + field1 := 1, + field2 := "test string", + field3 := true, + field4 := {1,2,3,4}, + field5 := e_black, + field6 := {a:=1,b:=2,c:=true}, + field7 := {a:=1,b:=2,c:=true}, + field8 := {a:=1}, + field9 := {1}, + field10 := {1,2} + } + + const MessageType c_testMessage:= { + field1 := 1, + field2 := "test string", + field3 := true, + field4 := {1,2,3,4}, + field5 := e_black, + field6 := {a:=omit,b:=omit,c:=true}, + field7 := {a:=omit,b:=omit,c:=true}, + field8 := {a:=1}, + field9 := {1}, + field10 := {1,2} + } with { optional "implicit omit"} //optional attribute can be accepted on constants + +type component GeneralComp { + port loopbackPort messagePort +} + +testcase TC_Syn_2707_OptionalAttributes_001() runs on GeneralComp { + + var MessageType v_testMessage:=c_testMessage; + +} + +control{ + + execute(TC_Syn_2707_OptionalAttributes_001()); +} + +} diff --git a/ATS/core_language/27_specifying_attributes/2709_dynamic_configuration/NegSem_2709_dynamic_configuration_001.ttcn b/ATS/core_language/27_specifying_attributes/2709_dynamic_configuration/NegSem_2709_dynamic_configuration_001.ttcn new file mode 100644 index 00000000..410db2f4 --- /dev/null +++ b/ATS/core_language/27_specifying_attributes/2709_dynamic_configuration/NegSem_2709_dynamic_configuration_001.ttcn @@ -0,0 +1,56 @@ +/***************************************************************** + ** @author STF 548 + ** @version 0.0.1 + ** @purpose 1:27.9, Verify that the setencode can reference only types listed in port definitions + ** @verdict pass reject + *****************************************************************/ + +// The following requirement is tested: +// Restriction a +// If the setencode operation is applied to a single port, the referenced type shall be +// either listed in the in or out type list of the related port type or it shall be +// a reference to a field or element on any level of nesting of a type listed in the in +// or out type list of the related port type. + +module NegSem_2709_dynamic_configuration_001 { + + type port P message { + inout MyPDU; + } + + type component GeneralComp { + port P p; + } + + type record MyPDU { + integer field1, + boolean field2 + } with { + encode "Codec 1"; + encode "Codec 2"; + encode "Codec 3" + } + + type record MyPDU2 { + charstring field1, + charstring field2 + } with { + encode "Codec 1"; + encode "Codec 2"; + encode "Codec 3" + } + + type record of universal charstring RoUC; + + testcase TC_NegSem_2709_dynamic_configuration_001 () runs on GeneralComp { + p.setencode(MyPDU2, "Codec 1"); + // Compilation and seamless execution tested. + // Actual effect not tested as it would require dedicated TCI implementation + setverdict(pass); + } + + control{ + execute(TC_NegSem_2709_dynamic_configuration_001()); + } + +} \ No newline at end of file diff --git a/ATS/core_language/27_specifying_attributes/2709_dynamic_configuration/NegSem_2709_dynamic_configuration_002.ttcn b/ATS/core_language/27_specifying_attributes/2709_dynamic_configuration/NegSem_2709_dynamic_configuration_002.ttcn new file mode 100644 index 00000000..82a3bf48 --- /dev/null +++ b/ATS/core_language/27_specifying_attributes/2709_dynamic_configuration/NegSem_2709_dynamic_configuration_002.ttcn @@ -0,0 +1,56 @@ +/***************************************************************** + ** @author STF 548 + ** @version 0.0.1 + ** @purpose 1:27.9, Verify that the setencode can reference only fields of types listed in port definitions + ** @verdict pass reject + *****************************************************************/ + +// The following requirement is tested: +// Restriction a +// If the setencode operation is applied to a single port, the referenced type shall be +// either listed in the in or out type list of the related port type or it shall be +// a reference to a field or element on any level of nesting of a type listed in the in +// or out type list of the related port type. + +module NegSem_2709_dynamic_configuration_002 { + + type port P message { + inout MyPDU; + } + + type component GeneralComp { + port P p; + } + + type record MyPDU { + integer field1, + boolean field2 + } with { + encode "Codec 1"; + encode "Codec 2"; + encode "Codec 3" + } + + type record MyPDU2 { + charstring field1, + charstring field2 + } with { + encode "Codec 1"; + encode "Codec 2"; + encode "Codec 3" + } + + type record of universal charstring RoUC; + + testcase TC_NegSem_2709_dynamic_configuration_002 () runs on GeneralComp { + p.setencode(MyPDU2.field1, "Codec 1"); + // Compilation and seamless execution tested. + // Actual effect not tested as it would require dedicated TCI implementation + setverdict(pass); + } + + control{ + execute(TC_NegSem_2709_dynamic_configuration_002()); + } + +} \ No newline at end of file diff --git a/ATS/core_language/27_specifying_attributes/2709_dynamic_configuration/NegSem_2709_dynamic_configuration_003.ttcn b/ATS/core_language/27_specifying_attributes/2709_dynamic_configuration/NegSem_2709_dynamic_configuration_003.ttcn new file mode 100644 index 00000000..2fa0e9b3 --- /dev/null +++ b/ATS/core_language/27_specifying_attributes/2709_dynamic_configuration/NegSem_2709_dynamic_configuration_003.ttcn @@ -0,0 +1,50 @@ +/***************************************************************** + ** @author STF 548 + ** @version 0.0.1 + ** @purpose 1:27.9, Verify that the setencode cannot reference templates in the first parameter + ** @verdict pass reject + *****************************************************************/ + +// The following requirement is tested: +// The setencode operation can be used on a port or set of ports to dynamically select +// for the affected ports a single encode attribute value to be used for a type that +// has multiple encode attributes attached to it. + +module NegSem_2709_dynamic_configuration_003 { + + type port P message { + inout MyPDU; + } + + type component GeneralComp { + port P p; + } + + type record MyPDU { + integer field1, + boolean field2 + } with { + encode "Codec 1"; + encode "Codec 2"; + encode "Codec 3" + } + + template MyPDU m_msg := { + field1 := 1, + field2 := true + } + + type record of universal charstring RoUC; + + testcase TC_NegSem_2709_dynamic_configuration_003 () runs on GeneralComp { + p.setencode(m_msg, "Codec 1"); + // Compilation and seamless execution tested. + // Actual effect not tested as it would require dedicated TCI implementation + setverdict(pass); + } + + control{ + execute(TC_NegSem_2709_dynamic_configuration_003()); + } + +} \ No newline at end of file diff --git a/ATS/core_language/27_specifying_attributes/2709_dynamic_configuration/NegSem_2709_dynamic_configuration_004.ttcn b/ATS/core_language/27_specifying_attributes/2709_dynamic_configuration/NegSem_2709_dynamic_configuration_004.ttcn new file mode 100644 index 00000000..42315737 --- /dev/null +++ b/ATS/core_language/27_specifying_attributes/2709_dynamic_configuration/NegSem_2709_dynamic_configuration_004.ttcn @@ -0,0 +1,45 @@ +/***************************************************************** + ** @author STF 548 + ** @version 0.0.1 + ** @purpose 1:27.9, Verify that an error is generated if the second parameter of the setencode operation is not a universal charstring + ** @verdict pass reject + *****************************************************************/ + +// The following requirement is tested: +// Restriction b +// The SingleExpression used in the second parameter of the setencode operation shall be +// compatible with the universal charstring type. + +module NegSem_2709_dynamic_configuration_004 { + + type port P message { + inout MyPDU; + } + + type component GeneralComp { + port P p; + } + + type record MyPDU { + integer field1, + boolean field2 + } with { + encode "Codec 1"; + encode "Codec 2"; + encode "Codec 3" + } + + type record of universal charstring RoUC; + + testcase TC_NegSem_2709_dynamic_configuration_004 () runs on GeneralComp { + p.setencode(MyPDU, 1); + // Compilation and seamless execution tested. + // Actual effect not tested as it would require dedicated TCI implementation + setverdict(pass); + } + + control{ + execute(TC_NegSem_2709_dynamic_configuration_004()); + } + +} \ No newline at end of file diff --git a/ATS/core_language/27_specifying_attributes/2709_dynamic_configuration/Sem_2709_dynamic_configuration_001.ttcn b/ATS/core_language/27_specifying_attributes/2709_dynamic_configuration/Sem_2709_dynamic_configuration_001.ttcn new file mode 100644 index 00000000..074979ac --- /dev/null +++ b/ATS/core_language/27_specifying_attributes/2709_dynamic_configuration/Sem_2709_dynamic_configuration_001.ttcn @@ -0,0 +1,46 @@ +/***************************************************************** + ** @author STF 548 + ** @version 0.0.1 + ** @purpose 1:27.9, Verify that the setencode operation can be applied to a port + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirement is tested: +// The setencode operation dynamically restricts the number of encode attribute values of +// a referenced type or its fields or elements to a single value. Dependent on the +// language element preceding the dot, the encoding configuration is valid ... for all +// sending and receiving operations of a single port (single port reference)... + +module Sem_2709_dynamic_configuration_001 { + + type port P message { + inout MyPDU; + } + + type component GeneralComp { + port P p; + } + + type record MyPDU { + integer field1, + boolean field2 + } with { + encode "Codec 1"; + encode "Codec 2"; + encode "Codec 3" + } + + type record of universal charstring RoUC; + + testcase TC_Sem_2709_dynamic_configuration_001 () runs on GeneralComp { + p.setencode(MyPDU, "Codec 1"); + // Compilation and seamless execution tested. + // Actual effect not tested as it would require dedicated TCI implementation + setverdict(pass); + } + + control{ + execute(TC_Sem_2709_dynamic_configuration_001()); + } + +} \ No newline at end of file diff --git a/ATS/core_language/27_specifying_attributes/2709_dynamic_configuration/Sem_2709_dynamic_configuration_002.ttcn b/ATS/core_language/27_specifying_attributes/2709_dynamic_configuration/Sem_2709_dynamic_configuration_002.ttcn new file mode 100644 index 00000000..339f0778 --- /dev/null +++ b/ATS/core_language/27_specifying_attributes/2709_dynamic_configuration/Sem_2709_dynamic_configuration_002.ttcn @@ -0,0 +1,47 @@ +/***************************************************************** + ** @author STF 548 + ** @version 0.0.1 + ** @purpose 1:27.9, Verify that the setencode operation can be applied to all ports + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirement is tested: +// The setencode operation dynamically restricts the number of encode attribute values of +// a referenced type or its fields or elements to a single value. Dependent on the +// language element preceding the dot, the encoding configuration is valid ... for all +// sending and receiving operations of all ports of the current component (all port +// notation)... + +module Sem_2709_dynamic_configuration_002 { + + type port P message { + inout MyPDU; + } + + type component GeneralComp { + port P p; + } + + type record MyPDU { + integer field1, + boolean field2 + } with { + encode "Codec 1"; + encode "Codec 2"; + encode "Codec 3" + } + + type record of universal charstring RoUC; + + testcase TC_Sem_2709_dynamic_configuration_002 () runs on GeneralComp { + all port.setencode(MyPDU, "Codec 1"); + // Compilation and seamless execution tested. + // Actual effect not tested as it would require dedicated TCI implementation + setverdict(pass); + } + + control{ + execute(TC_Sem_2709_dynamic_configuration_002()); + } + +} \ No newline at end of file diff --git a/ATS/core_language/27_specifying_attributes/2709_dynamic_configuration/Sem_2709_dynamic_configuration_003.ttcn b/ATS/core_language/27_specifying_attributes/2709_dynamic_configuration/Sem_2709_dynamic_configuration_003.ttcn new file mode 100644 index 00000000..94fc7153 --- /dev/null +++ b/ATS/core_language/27_specifying_attributes/2709_dynamic_configuration/Sem_2709_dynamic_configuration_003.ttcn @@ -0,0 +1,46 @@ +/***************************************************************** + ** @author STF 548 + ** @version 0.0.1 + ** @purpose 1:27.9, Verify that the setencode operation can be applied to a port + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirement is tested: +// The setencode operation dynamically restricts the number of encode attribute values of +// a referenced type or its fields or elements to a single value. Dependent on the +// language element preceding the dot, the encoding configuration is valid ... all codec +// functions and communication operations of the current component (self keyword). + +module Sem_2709_dynamic_configuration_003 { + + type port P message { + inout MyPDU; + } + + type component GeneralComp { + port P p; + } + + type record MyPDU { + integer field1, + boolean field2 + } with { + encode "Codec 1"; + encode "Codec 2"; + encode "Codec 3" + } + + type record of universal charstring RoUC; + + testcase TC_Sem_2709_dynamic_configuration_003 () runs on GeneralComp { + self.setencode(MyPDU, "Codec 1"); + // Compilation and seamless execution tested. + // Actual effect not tested as it would require dedicated TCI implementation + setverdict(pass); + } + + control{ + execute(TC_Sem_2709_dynamic_configuration_003()); + } + +} \ No newline at end of file diff --git a/ATS/core_language/27_specifying_attributes/2709_dynamic_configuration/Sem_2709_dynamic_configuration_004.ttcn b/ATS/core_language/27_specifying_attributes/2709_dynamic_configuration/Sem_2709_dynamic_configuration_004.ttcn new file mode 100644 index 00000000..3c4a5c78 --- /dev/null +++ b/ATS/core_language/27_specifying_attributes/2709_dynamic_configuration/Sem_2709_dynamic_configuration_004.ttcn @@ -0,0 +1,44 @@ +/***************************************************************** + ** @author STF 548 + ** @version 0.0.1 + ** @purpose 1:27.9, Verify that an extended type reference can be used in the setencode operation + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirement is tested: +// It is allowed to reference a field or element of a type using an extended type +// reference in the setencode operation. + +module Sem_2709_dynamic_configuration_004 { + + type port P message { + inout MyPDU; + } + + type component GeneralComp { + port P p; + } + + type record MyPDU { + integer field1, + boolean field2 + } with { + encode "Codec 1"; + encode "Codec 2"; + encode "Codec 3" + } + + type record of universal charstring RoUC; + + testcase TC_Sem_2709_dynamic_configuration_004 () runs on GeneralComp { + p.setencode(MyPDU.field1, "Codec 1"); + // Compilation and seamless execution tested. + // Actual effect not tested as it would require dedicated TCI implementation + setverdict(pass); + } + + control{ + execute(TC_Sem_2709_dynamic_configuration_004()); + } + +} \ No newline at end of file diff --git a/ATS/core_language/27_specifying_attributes/NOTES b/ATS/core_language/27_specifying_attributes/NOTES new file mode 100644 index 00000000..3ecc7fd3 --- /dev/null +++ b/ATS/core_language/27_specifying_attributes/NOTES @@ -0,0 +1,4 @@ +Semantics tests of section 27.7 also validate generic attribute handling behavior, +which applies to whole section 27. The reason it is in subsection 27.7, is because +optional attribute matching provides a means of semantic validation through message +loopback port. \ No newline at end of file diff --git a/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0101_matching_specific_values/B010101_omitting_values/NegSem_B010101_omitting_values_001.ttcn b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0101_matching_specific_values/B010101_omitting_values/NegSem_B010101_omitting_values_001.ttcn new file mode 100644 index 00000000..10004424 --- /dev/null +++ b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0101_matching_specific_values/B010101_omitting_values/NegSem_B010101_omitting_values_001.ttcn @@ -0,0 +1,59 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:B.1.1.1, Ensure that the IUT correctly handles template matching of omitted values + ** @verdict pass reject + ***************************************************/ + +module NegSem_B010101_omitting_values_001 { + + type record RecordType { + integer a optional, + integer b optional, + boolean c + } + + type set SetType { + integer a optional, + integer b optional, + boolean c + } + + type record MessageType { + RecordType field1, + SetType field2 + } + + type port loopbackPort message { + inout MessageType + } + + +type component GeneralComp { + port loopbackPort messagePort +} + +testcase TC_NegSem_B010101_omitting_values_001() runs on GeneralComp { + + var MessageType v_testMessage; + + template MessageType mw_matchingTemplate:= + { + field1 := {a:=1,b:=omit,c:=omit}, //omitting a mandatory field + field2 := {a:=1,b:=omit,c:=omit} + } + + v_testMessage:= { + field1 := {a:=1,b:=omit,c:=true}, + field2 := {a:=1,b:=omit,c:=true} + } + + messagePort.send(v_testMessage); + +} + +control{ + execute(TC_NegSem_B010101_omitting_values_001()); +} + +} diff --git a/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0101_matching_specific_values/B010101_omitting_values/Sem_B010101_omitting_values_001.ttcn b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0101_matching_specific_values/B010101_omitting_values/Sem_B010101_omitting_values_001.ttcn new file mode 100644 index 00000000..0df4dca7 --- /dev/null +++ b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0101_matching_specific_values/B010101_omitting_values/Sem_B010101_omitting_values_001.ttcn @@ -0,0 +1,67 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:B.1.1.1, Ensure that the IUT correctly handles template matching of omitted values + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +module Sem_B010101_omitting_values_001 { + + type record RecordType { + integer a optional, + integer b optional, + boolean c + } + + type set SetType { + integer a optional, + integer b optional, + boolean c + } + + type record MessageType { + RecordType field1, + SetType field2 + } + + type port loopbackPort message { + inout MessageType + } + + +type component GeneralComp { + port loopbackPort messagePort +} + +testcase TC_Sem_B010101_omitting_values_001() runs on GeneralComp { + + var MessageType v_testMessage; + + template MessageType mw_matchingTemplate:= + { + field1 := {a:=1,b:=omit,c:=true}, + field2 := {a:=1,b:=omit,c:=true} + } + + v_testMessage:= { + field1 := {a:=1,b:=omit,c:=true}, + field2 := {a:=1,b:=omit,c:=true} + } + + messagePort.send(v_testMessage); + + alt { + [] messagePort.receive(mw_matchingTemplate) { + setverdict(pass); + } + [] messagePort.receive { + setverdict(fail); + } + } +} + +control{ + execute(TC_Sem_B010101_omitting_values_001()); +} + +} diff --git a/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0101_matching_specific_values/B010101_omitting_values/Sem_B010101_omitting_values_002.ttcn b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0101_matching_specific_values/B010101_omitting_values/Sem_B010101_omitting_values_002.ttcn new file mode 100644 index 00000000..8339199d --- /dev/null +++ b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0101_matching_specific_values/B010101_omitting_values/Sem_B010101_omitting_values_002.ttcn @@ -0,0 +1,67 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:B.1.1.1, Ensure that the IUT correctly handles template matching of omitted values + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +module Sem_B010101_omitting_values_002 { + + type record RecordType { + integer a optional, + integer b optional, + boolean c + } + + type set SetType { + integer a optional, + integer b optional, + boolean c + } + + type record MessageType { + RecordType field1, + SetType field2 + } + + type port loopbackPort message { + inout MessageType + } + + +type component GeneralComp { + port loopbackPort messagePort +} + +testcase TC_Sem_B010101_omitting_values_002() runs on GeneralComp { + + var MessageType v_testMessage; + + template MessageType mw_matchingTemplate:= + { + field1 := {a:=1,b:=omit,c:=true}, //value mismatch + field2 := {a:=1,b:=omit,c:=true} + } + + v_testMessage:= { + field1 := {a:=1,b:=2,c:=true}, + field2 := {a:=1,b:=omit,c:=true} + } + + messagePort.send(v_testMessage); + + alt { + [] messagePort.receive(mw_matchingTemplate) { + setverdict(fail); + } + [] messagePort.receive { + setverdict(pass); + } + } +} + +control{ + execute(TC_Sem_B010101_omitting_values_002()); +} + +} diff --git a/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0101_matching_specific_values/B0101_toplevel/Sem_B0101_matching_specific_value_001.ttcn b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0101_matching_specific_values/B0101_toplevel/Sem_B0101_matching_specific_value_001.ttcn new file mode 100644 index 00000000..ecc9e82e --- /dev/null +++ b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0101_matching_specific_values/B0101_toplevel/Sem_B0101_matching_specific_value_001.ttcn @@ -0,0 +1,103 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:B.1.1, Ensure that the IUT correctly handles template matching of specific values + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +module Sem_B0101_matching_specific_value_001 { + + type enumerated EnumeratedType {e_black, e_white}; + + type record RecordType { + integer a optional, + integer b optional, + boolean c + } + + type set SetType { + integer a optional, + integer b optional, + boolean c + } + + type record length (1..2) of integer IntegerList; + + type set length (1..2) of integer IntegerUList; + + type union UnionType { + integer a, + EnumeratedType b, + boolean c + } + + type record MessageType { + integer field1, + charstring field2, + boolean field3, + integer field4[4], + EnumeratedType field5, + RecordType field6, + SetType field7, + UnionType field8, + IntegerList field9, + IntegerUList field10 + } + + type port loopbackPort message { + inout MessageType + } + + +type component GeneralComp { + port loopbackPort messagePort +} + +testcase TC_Sem_B0101_matching_specific_value_001() runs on GeneralComp { + + var MessageType v_testMessage; + + template MessageType mw_matchingTemplate:= + { + field1 := 1, + field2 := "test string", + field3 := true, + field4 := {1,2,3,4}, + field5 := e_black, + field6 := {a:=1,b:=2,c:=true}, + field7 := {a:=1,b:=2,c:=true}, + field8 := {a:=1}, + field9 := {1}, + field10 := {1,2} + } + + v_testMessage:= { + field1 := 1, + field2 := "test string", + field3 := true, + field4 := {1,2,3,4}, + field5 := e_black, + field6 := {a:=1,b:=2,c:=true}, + field7 := {a:=1,b:=2,c:=true}, + field8 := {a:=1}, + field9 := {1}, + field10 := {1,2} + } + + messagePort.send(v_testMessage); + + alt { + [] messagePort.receive(mw_matchingTemplate) { + setverdict(pass); + } + [] messagePort.receive { + setverdict(fail); + } + } +} + +control{ + execute(TC_Sem_B0101_matching_specific_value_001()); +} + +} diff --git a/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0101_matching_specific_values/B0101_toplevel/Sem_B0101_matching_specific_value_002.ttcn b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0101_matching_specific_values/B0101_toplevel/Sem_B0101_matching_specific_value_002.ttcn new file mode 100644 index 00000000..5387410b --- /dev/null +++ b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0101_matching_specific_values/B0101_toplevel/Sem_B0101_matching_specific_value_002.ttcn @@ -0,0 +1,103 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:B.1.1, Ensure that the IUT correctly handles template matching of specific values + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +module Sem_B0101_matching_specific_value_002 { + + type enumerated EnumeratedType {e_black, e_white}; + + type record RecordType { + integer a optional, + integer b optional, + boolean c + } + + type set SetType { + integer a optional, + integer b optional, + boolean c + } + + type record length (1..2) of integer IntegerList; + + type set length (1..2) of integer IntegerUList; + + type union UnionType { + integer a, + EnumeratedType b, + boolean c + } + + type record MessageType { + integer field1, + charstring field2, + boolean field3, + integer field4[4], + EnumeratedType field5, + RecordType field6, + SetType field7, + UnionType field8, + IntegerList field9, + IntegerUList field10 + } + + type port loopbackPort message { + inout MessageType + } + + +type component GeneralComp { + port loopbackPort messagePort +} + +testcase TC_Sem_B0101_matching_specific_value_002() runs on GeneralComp { + + var MessageType v_testMessage; + + template MessageType mw_matchingTemplate:= + { + field1 := 0, //mismatching value + field2 := "test string", + field3 := true, + field4 := {1,2,3,4}, + field5 := e_black, + field6 := {a:=1,b:=2,c:=true}, + field7 := {a:=1,b:=2,c:=true}, + field8 := {a:=1}, + field9 := {1}, + field10 := {1,2} + } + + v_testMessage:= { + field1 := 1, + field2 := "test string", + field3 := true, + field4 := {1,2,3,4}, + field5 := e_black, + field6 := {a:=1,b:=2,c:=true}, + field7 := {a:=1,b:=2,c:=true}, + field8 := {a:=1}, + field9 := {1}, + field10 := {1,2} + } + + messagePort.send(v_testMessage); + + alt { + [] messagePort.receive(mw_matchingTemplate) { + setverdict(fail); + } + [] messagePort.receive { + setverdict(pass); + } + } +} + +control{ + execute(TC_Sem_B0101_matching_specific_value_002()); +} + +} diff --git a/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0101_matching_specific_values/B0101_toplevel/Sem_B0101_matching_specific_value_003.ttcn b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0101_matching_specific_values/B0101_toplevel/Sem_B0101_matching_specific_value_003.ttcn new file mode 100644 index 00000000..470ae65e --- /dev/null +++ b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0101_matching_specific_values/B0101_toplevel/Sem_B0101_matching_specific_value_003.ttcn @@ -0,0 +1,103 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:B.1.1, Ensure that the IUT correctly handles template matching of specific values + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +module Sem_B0101_matching_specific_value_003 { + + type enumerated EnumeratedType {e_black, e_white}; + + type record RecordType { + integer a optional, + integer b optional, + boolean c + } + + type set SetType { + integer a optional, + integer b optional, + boolean c + } + + type record length (1..2) of integer IntegerList; + + type set length (1..2) of integer IntegerUList; + + type union UnionType { + integer a, + EnumeratedType b, + boolean c + } + + type record MessageType { + integer field1, + charstring field2, + boolean field3, + integer field4[4], + EnumeratedType field5, + RecordType field6, + SetType field7, + UnionType field8, + IntegerList field9, + IntegerUList field10 + } + + type port loopbackPort message { + inout MessageType + } + + +type component GeneralComp { + port loopbackPort messagePort +} + +testcase TC_Sem_B0101_matching_specific_value_003() runs on GeneralComp { + + var MessageType v_testMessage; + + template MessageType mw_matchingTemplate:= + { + field1 := 1, + field2 := "test strin", //mismatching value + field3 := true, + field4 := {1,2,3,4}, + field5 := e_black, + field6 := {a:=1,b:=2,c:=true}, + field7 := {a:=1,b:=2,c:=true}, + field8 := {a:=1}, + field9 := {1}, + field10 := {1,2} + } + + v_testMessage:= { + field1 := 1, + field2 := "test string", + field3 := true, + field4 := {1,2,3,4}, + field5 := e_black, + field6 := {a:=1,b:=2,c:=true}, + field7 := {a:=1,b:=2,c:=true}, + field8 := {a:=1}, + field9 := {1}, + field10 := {1,2} + } + + messagePort.send(v_testMessage); + + alt { + [] messagePort.receive(mw_matchingTemplate) { + setverdict(fail); + } + [] messagePort.receive { + setverdict(pass); + } + } +} + +control{ + execute(TC_Sem_B0101_matching_specific_value_003()); +} + +} diff --git a/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0101_matching_specific_values/B0101_toplevel/Sem_B0101_matching_specific_value_004.ttcn b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0101_matching_specific_values/B0101_toplevel/Sem_B0101_matching_specific_value_004.ttcn new file mode 100644 index 00000000..85cdfa69 --- /dev/null +++ b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0101_matching_specific_values/B0101_toplevel/Sem_B0101_matching_specific_value_004.ttcn @@ -0,0 +1,103 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:B.1.1, Ensure that the IUT correctly handles template matching of specific values + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +module Sem_B0101_matching_specific_value_004 { + + type enumerated EnumeratedType {e_black, e_white}; + + type record RecordType { + integer a optional, + integer b optional, + boolean c + } + + type set SetType { + integer a optional, + integer b optional, + boolean c + } + + type record length (1..2) of integer IntegerList; + + type set length (1..2) of integer IntegerUList; + + type union UnionType { + integer a, + EnumeratedType b, + boolean c + } + + type record MessageType { + integer field1, + charstring field2, + boolean field3, + integer field4[4], + EnumeratedType field5, + RecordType field6, + SetType field7, + UnionType field8, + IntegerList field9, + IntegerUList field10 + } + + type port loopbackPort message { + inout MessageType + } + + +type component GeneralComp { + port loopbackPort messagePort +} + +testcase TC_Sem_B0101_matching_specific_value_004() runs on GeneralComp { + + var MessageType v_testMessage; + + template MessageType mw_matchingTemplate:= + { + field1 := 1, + field2 := "test string", + field3 := false, //mismatching value + field4 := {1,2,3,4}, + field5 := e_black, + field6 := {a:=1,b:=2,c:=true}, + field7 := {a:=1,b:=2,c:=true}, + field8 := {a:=1}, + field9 := {1}, + field10 := {1,2} + } + + v_testMessage:= { + field1 := 1, + field2 := "test string", + field3 := true, + field4 := {1,2,3,4}, + field5 := e_black, + field6 := {a:=1,b:=2,c:=true}, + field7 := {a:=1,b:=2,c:=true}, + field8 := {a:=1}, + field9 := {1}, + field10 := {1,2} + } + + messagePort.send(v_testMessage); + + alt { + [] messagePort.receive(mw_matchingTemplate) { + setverdict(fail); + } + [] messagePort.receive { + setverdict(pass); + } + } +} + +control{ + execute(TC_Sem_B0101_matching_specific_value_004()); +} + +} diff --git a/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0101_matching_specific_values/B0101_toplevel/Sem_B0101_matching_specific_value_005.ttcn b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0101_matching_specific_values/B0101_toplevel/Sem_B0101_matching_specific_value_005.ttcn new file mode 100644 index 00000000..ca698f04 --- /dev/null +++ b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0101_matching_specific_values/B0101_toplevel/Sem_B0101_matching_specific_value_005.ttcn @@ -0,0 +1,103 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:B.1.1, Ensure that the IUT correctly handles template matching of specific values + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +module Sem_B0101_matching_specific_value_005 { + + type enumerated EnumeratedType {e_black, e_white}; + + type record RecordType { + integer a optional, + integer b optional, + boolean c + } + + type set SetType { + integer a optional, + integer b optional, + boolean c + } + + type record length (1..2) of integer IntegerList; + + type set length (1..2) of integer IntegerUList; + + type union UnionType { + integer a, + EnumeratedType b, + boolean c + } + + type record MessageType { + integer field1, + charstring field2, + boolean field3, + integer field4[4], + EnumeratedType field5, + RecordType field6, + SetType field7, + UnionType field8, + IntegerList field9, + IntegerUList field10 + } + + type port loopbackPort message { + inout MessageType + } + + +type component GeneralComp { + port loopbackPort messagePort +} + +testcase TC_Sem_B0101_matching_specific_value_005() runs on GeneralComp { + + var MessageType v_testMessage; + + template MessageType mw_matchingTemplate:= + { + field1 := 1, + field2 := "test string", + field3 := true, + field4 := {1,2,3,5}, //mismatching value + field5 := e_black, + field6 := {a:=1,b:=2,c:=true}, + field7 := {a:=1,b:=2,c:=true}, + field8 := {a:=1}, + field9 := {1}, + field10 := {1,2} + } + + v_testMessage:= { + field1 := 1, + field2 := "test string", + field3 := true, + field4 := {1,2,3,4}, + field5 := e_black, + field6 := {a:=1,b:=2,c:=true}, + field7 := {a:=1,b:=2,c:=true}, + field8 := {a:=1}, + field9 := {1}, + field10 := {1,2} + } + + messagePort.send(v_testMessage); + + alt { + [] messagePort.receive(mw_matchingTemplate) { + setverdict(fail); + } + [] messagePort.receive { + setverdict(pass); + } + } +} + +control{ + execute(TC_Sem_B0101_matching_specific_value_005()); +} + +} diff --git a/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0101_matching_specific_values/B0101_toplevel/Sem_B0101_matching_specific_value_006.ttcn b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0101_matching_specific_values/B0101_toplevel/Sem_B0101_matching_specific_value_006.ttcn new file mode 100644 index 00000000..694360f8 --- /dev/null +++ b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0101_matching_specific_values/B0101_toplevel/Sem_B0101_matching_specific_value_006.ttcn @@ -0,0 +1,103 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:B.1.1, Ensure that the IUT correctly handles template matching of specific values + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +module Sem_B0101_matching_specific_value_006 { + + type enumerated EnumeratedType {e_black, e_white}; + + type record RecordType { + integer a optional, + integer b optional, + boolean c + } + + type set SetType { + integer a optional, + integer b optional, + boolean c + } + + type record length (1..2) of integer IntegerList; + + type set length (1..2) of integer IntegerUList; + + type union UnionType { + integer a, + EnumeratedType b, + boolean c + } + + type record MessageType { + integer field1, + charstring field2, + boolean field3, + integer field4[4], + EnumeratedType field5, + RecordType field6, + SetType field7, + UnionType field8, + IntegerList field9, + IntegerUList field10 + } + + type port loopbackPort message { + inout MessageType + } + + +type component GeneralComp { + port loopbackPort messagePort +} + +testcase TC_Sem_B0101_matching_specific_value_006() runs on GeneralComp { + + var MessageType v_testMessage; + + template MessageType mw_matchingTemplate:= + { + field1 := 1, + field2 := "test string", + field3 := true, + field4 := {1,2,3,4}, + field5 := e_white, //mismatching value + field6 := {a:=1,b:=2,c:=true}, + field7 := {a:=1,b:=2,c:=true}, + field8 := {a:=1}, + field9 := {1}, + field10 := {1,2} + } + + v_testMessage:= { + field1 := 1, + field2 := "test string", + field3 := true, + field4 := {1,2,3,4}, + field5 := e_black, + field6 := {a:=1,b:=2,c:=true}, + field7 := {a:=1,b:=2,c:=true}, + field8 := {a:=1}, + field9 := {1}, + field10 := {1,2} + } + + messagePort.send(v_testMessage); + + alt { + [] messagePort.receive(mw_matchingTemplate) { + setverdict(fail); + } + [] messagePort.receive { + setverdict(pass); + } + } +} + +control{ + execute(TC_Sem_B0101_matching_specific_value_006()); +} + +} diff --git a/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0101_matching_specific_values/B0101_toplevel/Sem_B0101_matching_specific_value_007.ttcn b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0101_matching_specific_values/B0101_toplevel/Sem_B0101_matching_specific_value_007.ttcn new file mode 100644 index 00000000..7dee698e --- /dev/null +++ b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0101_matching_specific_values/B0101_toplevel/Sem_B0101_matching_specific_value_007.ttcn @@ -0,0 +1,103 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:B.1.1, Ensure that the IUT correctly handles template matching of specific values + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +module Sem_B0101_matching_specific_value_007 { + + type enumerated EnumeratedType {e_black, e_white}; + + type record RecordType { + integer a optional, + integer b optional, + boolean c + } + + type set SetType { + integer a optional, + integer b optional, + boolean c + } + + type record length (1..2) of integer IntegerList; + + type set length (1..2) of integer IntegerUList; + + type union UnionType { + integer a, + EnumeratedType b, + boolean c + } + + type record MessageType { + integer field1, + charstring field2, + boolean field3, + integer field4[4], + EnumeratedType field5, + RecordType field6, + SetType field7, + UnionType field8, + IntegerList field9, + IntegerUList field10 + } + + type port loopbackPort message { + inout MessageType + } + + +type component GeneralComp { + port loopbackPort messagePort +} + +testcase TC_Sem_B0101_matching_specific_value_007() runs on GeneralComp { + + var MessageType v_testMessage; + + template MessageType mw_matchingTemplate:= + { + field1 := 1, + field2 := "test string", + field3 := true, + field4 := {1,2,3,4}, + field5 := e_black, + field6 := {a:=1,b:=3,c:=true}, //mismatching value + field7 := {a:=1,b:=2,c:=true}, + field8 := {a:=1}, + field9 := {1}, + field10 := {1,2} + } + + v_testMessage:= { + field1 := 1, + field2 := "test string", + field3 := true, + field4 := {1,2,3,4}, + field5 := e_black, + field6 := {a:=1,b:=2,c:=true}, + field7 := {a:=1,b:=2,c:=true}, + field8 := {a:=1}, + field9 := {1}, + field10 := {1,2} + } + + messagePort.send(v_testMessage); + + alt { + [] messagePort.receive(mw_matchingTemplate) { + setverdict(fail); + } + [] messagePort.receive { + setverdict(pass); + } + } +} + +control{ + execute(TC_Sem_B0101_matching_specific_value_007()); +} + +} diff --git a/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0101_matching_specific_values/B0101_toplevel/Sem_B0101_matching_specific_value_008.ttcn b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0101_matching_specific_values/B0101_toplevel/Sem_B0101_matching_specific_value_008.ttcn new file mode 100644 index 00000000..069a831b --- /dev/null +++ b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0101_matching_specific_values/B0101_toplevel/Sem_B0101_matching_specific_value_008.ttcn @@ -0,0 +1,103 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:B.1.1, Ensure that the IUT correctly handles template matching of specific values + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +module Sem_B0101_matching_specific_value_008 { + + type enumerated EnumeratedType {e_black, e_white}; + + type record RecordType { + integer a optional, + integer b optional, + boolean c + } + + type set SetType { + integer a optional, + integer b optional, + boolean c + } + + type record length (1..2) of integer IntegerList; + + type set length (1..2) of integer IntegerUList; + + type union UnionType { + integer a, + EnumeratedType b, + boolean c + } + + type record MessageType { + integer field1, + charstring field2, + boolean field3, + integer field4[4], + EnumeratedType field5, + RecordType field6, + SetType field7, + UnionType field8, + IntegerList field9, + IntegerUList field10 + } + + type port loopbackPort message { + inout MessageType + } + + +type component GeneralComp { + port loopbackPort messagePort +} + +testcase TC_Sem_B0101_matching_specific_value_008() runs on GeneralComp { + + var MessageType v_testMessage; + + template MessageType mw_matchingTemplate:= + { + field1 := 1, + field2 := "test string", + field3 := true, + field4 := {1,2,3,4}, + field5 := e_black, + field6 := {a:=1,b:=2,c:=true}, + field7 := {a:=2,b:=1,c:=true}, //mismatching value + field8 := {a:=1}, + field9 := {1}, + field10 := {1,2} + } + + v_testMessage:= { + field1 := 1, + field2 := "test string", + field3 := true, + field4 := {1,2,3,4}, + field5 := e_black, + field6 := {a:=1,b:=2,c:=true}, + field7 := {a:=1,b:=2,c:=true}, + field8 := {a:=1}, + field9 := {1}, + field10 := {1,2} + } + + messagePort.send(v_testMessage); + + alt { + [] messagePort.receive(mw_matchingTemplate) { + setverdict(fail); + } + [] messagePort.receive { + setverdict(pass); + } + } +} + +control{ + execute(TC_Sem_B0101_matching_specific_value_008()); +} + +} diff --git a/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0101_matching_specific_values/B0101_toplevel/Sem_B0101_matching_specific_value_009.ttcn b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0101_matching_specific_values/B0101_toplevel/Sem_B0101_matching_specific_value_009.ttcn new file mode 100644 index 00000000..8d37caf7 --- /dev/null +++ b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0101_matching_specific_values/B0101_toplevel/Sem_B0101_matching_specific_value_009.ttcn @@ -0,0 +1,103 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:B.1.1, Ensure that the IUT correctly handles template matching of specific values + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +module Sem_B0101_matching_specific_value_009 { + + type enumerated EnumeratedType {e_black, e_white}; + + type record RecordType { + integer a optional, + integer b optional, + boolean c + } + + type set SetType { + integer a optional, + integer b optional, + boolean c + } + + type record length (1..2) of integer IntegerList; + + type set length (1..2) of integer IntegerUList; + + type union UnionType { + integer a, + EnumeratedType b, + boolean c + } + + type record MessageType { + integer field1, + charstring field2, + boolean field3, + integer field4[4], + EnumeratedType field5, + RecordType field6, + SetType field7, + UnionType field8, + IntegerList field9, + IntegerUList field10 + } + + type port loopbackPort message { + inout MessageType + } + + +type component GeneralComp { + port loopbackPort messagePort +} + +testcase TC_Sem_B0101_matching_specific_value_009() runs on GeneralComp { + + var MessageType v_testMessage; + + template MessageType mw_matchingTemplate:= + { + field1 := 1, + field2 := "test string", + field3 := true, + field4 := {1,2,3,4}, + field5 := e_black, + field6 := {a:=1,b:=2,c:=true}, + field7 := {a:=1,b:=2,c:=true}, + field8 := {c:=true}, //mismatching value + field9 := {1}, + field10 := {1,2} + } + + v_testMessage:= { + field1 := 1, + field2 := "test string", + field3 := true, + field4 := {1,2,3,4}, + field5 := e_black, + field6 := {a:=1,b:=2,c:=true}, + field7 := {a:=1,b:=2,c:=true}, + field8 := {a:=1}, + field9 := {1}, + field10 := {1,2} + } + + messagePort.send(v_testMessage); + + alt { + [] messagePort.receive(mw_matchingTemplate) { + setverdict(fail); + } + [] messagePort.receive { + setverdict(pass); + } + } +} + +control{ + execute(TC_Sem_B0101_matching_specific_value_009()); +} + +} diff --git a/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0101_matching_specific_values/B0101_toplevel/Sem_B0101_matching_specific_value_010.ttcn b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0101_matching_specific_values/B0101_toplevel/Sem_B0101_matching_specific_value_010.ttcn new file mode 100644 index 00000000..21738e28 --- /dev/null +++ b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0101_matching_specific_values/B0101_toplevel/Sem_B0101_matching_specific_value_010.ttcn @@ -0,0 +1,103 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:B.1.1, Ensure that the IUT correctly handles template matching of specific values + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +module Sem_B0101_matching_specific_value_010 { + + type enumerated EnumeratedType {e_black, e_white}; + + type record RecordType { + integer a optional, + integer b optional, + boolean c + } + + type set SetType { + integer a optional, + integer b optional, + boolean c + } + + type record length (1..2) of integer IntegerList; + + type set length (1..2) of integer IntegerUList; + + type union UnionType { + integer a, + EnumeratedType b, + boolean c + } + + type record MessageType { + integer field1, + charstring field2, + boolean field3, + integer field4[4], + EnumeratedType field5, + RecordType field6, + SetType field7, + UnionType field8, + IntegerList field9, + IntegerUList field10 + } + + type port loopbackPort message { + inout MessageType + } + + +type component GeneralComp { + port loopbackPort messagePort +} + +testcase TC_Sem_B0101_matching_specific_value_010() runs on GeneralComp { + + var MessageType v_testMessage; + + template MessageType mw_matchingTemplate:= + { + field1 := 1, + field2 := "test string", + field3 := true, + field4 := {1,2,3,4}, + field5 := e_black, + field6 := {a:=1,b:=2,c:=true}, + field7 := {a:=1,b:=2,c:=true}, + field8 := {a:=1}, + field9 := {1,2}, //mismatching value + field10 := {1,2} + } + + v_testMessage:= { + field1 := 1, + field2 := "test string", + field3 := true, + field4 := {1,2,3,4}, + field5 := e_black, + field6 := {a:=1,b:=2,c:=true}, + field7 := {a:=1,b:=2,c:=true}, + field8 := {a:=1}, + field9 := {1}, + field10 := {1,2} + } + + messagePort.send(v_testMessage); + + alt { + [] messagePort.receive(mw_matchingTemplate) { + setverdict(fail); + } + [] messagePort.receive { + setverdict(pass); + } + } +} + +control{ + execute(TC_Sem_B0101_matching_specific_value_010()); +} + +} diff --git a/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0101_matching_specific_values/B0101_toplevel/Sem_B0101_matching_specific_value_011.ttcn b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0101_matching_specific_values/B0101_toplevel/Sem_B0101_matching_specific_value_011.ttcn new file mode 100644 index 00000000..579d41bc --- /dev/null +++ b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0101_matching_specific_values/B0101_toplevel/Sem_B0101_matching_specific_value_011.ttcn @@ -0,0 +1,103 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:B.1.1, Ensure that the IUT correctly handles template matching of specific values + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +module Sem_B0101_matching_specific_value_011 { + + type enumerated EnumeratedType {e_black, e_white}; + + type record RecordType { + integer a optional, + integer b optional, + boolean c + } + + type set SetType { + integer a optional, + integer b optional, + boolean c + } + + type record length (1..2) of integer IntegerList; + + type set length (1..2) of integer IntegerUList; + + type union UnionType { + integer a, + EnumeratedType b, + boolean c + } + + type record MessageType { + integer field1, + charstring field2, + boolean field3, + integer field4[4], + EnumeratedType field5, + RecordType field6, + SetType field7, + UnionType field8, + IntegerList field9, + IntegerUList field10 + } + + type port loopbackPort message { + inout MessageType + } + + +type component GeneralComp { + port loopbackPort messagePort +} + +testcase TC_Sem_B0111_matching_specific_value_011() runs on GeneralComp { + + var MessageType v_testMessage; + + template MessageType mw_matchingTemplate:= + { + field1 := 1, + field2 := "test string", + field3 := true, + field4 := {1,2,3,4}, + field5 := e_black, + field6 := {a:=1,b:=2,c:=true}, + field7 := {a:=1,b:=2,c:=true}, + field8 := {a:=1}, + field9 := {1}, + field10 := {2,1} //different order + } + + v_testMessage:= { + field1 := 1, + field2 := "test string", + field3 := true, + field4 := {1,2,3,4}, + field5 := e_black, + field6 := {a:=1,b:=2,c:=true}, + field7 := {a:=1,b:=2,c:=true}, + field8 := {a:=1}, + field9 := {1}, + field10 := {1,2} + } + + messagePort.send(v_testMessage); + + alt { + [] messagePort.receive(mw_matchingTemplate) { + setverdict(pass); + } + [] messagePort.receive { + setverdict(fail); + } + } +} + +control{ + execute(TC_Sem_B0111_matching_specific_value_011()); +} + +} diff --git a/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010201_value_list/NegSem_B010201_value_list_001.ttcn b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010201_value_list/NegSem_B010201_value_list_001.ttcn new file mode 100644 index 00000000..62dea96f --- /dev/null +++ b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010201_value_list/NegSem_B010201_value_list_001.ttcn @@ -0,0 +1,53 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:B.1.2.1, Ensure that the IUT correctly handles template matching with all from clause + ** @verdict pass reject + ***************************************************/ + +// The following requirements are tested: +//The type of the template list and the member type of the template in the all from clause shall be compatible. +// Restriction B + +module NegSem_B010201_value_list_001 { + + type set of integer SoI; + + type record MessageType { + integer field1, + charstring field2 + } + template SoI m_SoI := {1,2,3,4}; + template float mw_SoI := (all from m_SoI); //error: m_SoI is integer, mw_SoI is float + + type port loopbackPort message { + inout float + } + + +type component GeneralComp { + port loopbackPort messagePort +} + +testcase TC_NegSem_B010201_value_list_001() runs on GeneralComp { + + var float v_testMessage; + v_testMessage:= 2.0; + + messagePort.send(v_testMessage); + + alt { + [] messagePort.receive(mw_SoI) { + setverdict(pass); + } + [] messagePort.receive { + setverdict(fail); + } + } +} + +control{ + execute(TC_NegSem_B010201_value_list_001()); +} + +} diff --git a/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010201_value_list/NegSem_B010201_value_list_002.ttcn b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010201_value_list/NegSem_B010201_value_list_002.ttcn new file mode 100644 index 00000000..bee56a53 --- /dev/null +++ b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010201_value_list/NegSem_B010201_value_list_002.ttcn @@ -0,0 +1,52 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:B.1.2.1, Ensure that the IUT correctly handles template matching with all from clause + ** @verdict pass reject + ***************************************************/ + +// The following requirements are tested: +// Restriction D,E: Individual members of the template in the all from clause shall not resolve to any of the following matching mechanisms: AnyElementsOrNone, permutation. + +module NegSem_B010201_value_list_002 { + + type set of integer SoI; + + type record MessageType { + integer field1, + charstring field2 + } + template SoI m_SoI := {1,*,4}; + template integer mw_SoI := (all from m_SoI); //error: m_SoI contains AnyElementsOrNone + + type port loopbackPort message { + inout integer + } + + +type component GeneralComp { + port loopbackPort messagePort +} + +testcase TC_NegSem_B010201_value_list_002() runs on GeneralComp { + + var integer v_testMessage; + v_testMessage:= 2; + + messagePort.send(v_testMessage); + + alt { + [] messagePort.receive(mw_SoI) { + setverdict(pass); + } + [] messagePort.receive { + setverdict(fail); + } + } +} + +control{ + execute(TC_NegSem_B010201_value_list_002()); +} + +} diff --git a/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010201_value_list/NegSem_B010201_value_list_003.ttcn b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010201_value_list/NegSem_B010201_value_list_003.ttcn new file mode 100644 index 00000000..848a69c3 --- /dev/null +++ b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010201_value_list/NegSem_B010201_value_list_003.ttcn @@ -0,0 +1,52 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:B.1.2.1, Ensure that the IUT correctly handles template matching with all from clause + ** @verdict pass reject + ***************************************************/ + +// The following requirements are tested: +// Restriction D,E: Individual members of the template in the all from clause shall not resolve to any of the following matching mechanisms: AnyElementsOrNone, permutation. + +module NegSem_B010201_value_list_003 { + + type record of integer RoI; + + type record MessageType { + integer field1, + charstring field2 + } + template RoI m_RoI := {permutation(0,1,3,*),2}; + template integer mw_RoI := (all from m_RoI); //error: m_RoI contains permutation + + type port loopbackPort message { + inout integer + } + + +type component GeneralComp { + port loopbackPort messagePort +} + +testcase TC_NegSem_B010201_value_list_003() runs on GeneralComp { + + var integer v_testMessage; + v_testMessage:= 2; + + messagePort.send(v_testMessage); + + alt { + [] messagePort.receive(mw_RoI) { + setverdict(pass); + } + [] messagePort.receive { + setverdict(fail); + } + } +} + +control{ + execute(TC_NegSem_B010201_value_list_003()); +} + +} diff --git a/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010201_value_list/NegSem_B010201_value_list_004.ttcn b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010201_value_list/NegSem_B010201_value_list_004.ttcn new file mode 100644 index 00000000..78e97822 --- /dev/null +++ b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010201_value_list/NegSem_B010201_value_list_004.ttcn @@ -0,0 +1,57 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:B.1.2.1, Ensure that the IUT correctly handles template list corretly + ** @verdict pass accept reject + ***************************************************/ + +// The following requirements are tested: +// Restriction C: Templates in the template list shall obey the template(present) restriction + +module NegSem_B010201_value_list_004 { + + + type record MessageType { + integer field1, + charstring field2 optional + } + + template(present) MessageType mw_examplePresent := {1, ?}; + + type port loopbackPort message { + inout MessageType + } + + +type component GeneralComp { + port loopbackPort messagePort +} + +testcase TC_NegSem_B010201_value_list_004() runs on GeneralComp { + + var MessageType v_testMessage; + var template(omit) MessageType v_present; + v_present := mw_examplePresent; // error: incorrect + + v_testMessage:= { + field1:= 1, + field2:= "abc" + } + + messagePort.send(v_testMessage); + + alt { + [] messagePort.receive(v_present) { + setverdict(pass); + } + [] messagePort.receive { + setverdict(fail); + } + } +} + +control{ + execute(TC_NegSem_B010201_value_list_004()); +} + +} \ No newline at end of file diff --git a/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010201_value_list/Sem_B010201_value_list_001.ttcn b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010201_value_list/Sem_B010201_value_list_001.ttcn new file mode 100644 index 00000000..c5437570 --- /dev/null +++ b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010201_value_list/Sem_B010201_value_list_001.ttcn @@ -0,0 +1,78 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:B.1.2.1, Ensure that the IUT correctly handles template matching of listed multiple values + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +module Sem_B010201_value_list_001 { + + type enumerated EnumeratedType {e_black, e_white, e_green}; + + type record RecordType { + integer a optional, + integer b optional, + boolean c + } + + type union UnionType { + integer a, + EnumeratedType b, + boolean c + } + + type record MessageType { + integer field1, + charstring field2, + EnumeratedType field3, + RecordType field4, + UnionType field5 + } + + type port loopbackPort message { + inout MessageType + } + + +type component GeneralComp { + port loopbackPort messagePort +} + +testcase TC_Sem_B010201_value_list_001() runs on GeneralComp { + + var MessageType v_testMessage; + + template MessageType mw_matchingTemplate:= + { + field1 := (1,2), + field2 := ("test string","something else"), + field3 := (e_green,e_black), + field4 := ({a:=1,b:=1,c:=false},{a:=1,b:=2,c:=true}), + field5 := ({a:=1},{b:=e_white}) + } + + v_testMessage:= { + field1 := 2, + field2 := "test string", + field3 := e_black, + field4 := {a:=1,b:=2,c:=true}, + field5 := {a:=1} + } + + messagePort.send(v_testMessage); + + alt { + [] messagePort.receive(mw_matchingTemplate) { + setverdict(pass); + } + [] messagePort.receive { + setverdict(fail); + } + } +} + +control{ + execute(TC_Sem_B010201_value_list_001()); +} + +} diff --git a/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010201_value_list/Sem_B010201_value_list_002.ttcn b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010201_value_list/Sem_B010201_value_list_002.ttcn new file mode 100644 index 00000000..424bd201 --- /dev/null +++ b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010201_value_list/Sem_B010201_value_list_002.ttcn @@ -0,0 +1,52 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:B.1.2.1, Ensure that the IUT correctly handles template matching with all from clause + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirements are tested: +//A template list may contain values, templates obeying the template(present) restriction, and members added by all from clauses. + +module Sem_B010201_value_list_002 { + + type record of integer RoI; + + type record MessageType { + integer field1, + charstring field2 + } + template RoI m_RoI := {1,2,3,4}; + template integer mw_RoI := (all from m_RoI); + + type port loopbackPort message { + inout integer + } + + +type component GeneralComp { + port loopbackPort messagePort +} + +testcase TC_Sem_B010201_value_list_002() runs on GeneralComp { + + var integer v_testMessage; + v_testMessage:= 2; + + messagePort.send(v_testMessage); + + alt { + [] messagePort.receive(mw_RoI) { + setverdict(pass); + } + [] messagePort.receive { + setverdict(fail); + } + } +} + +control{ + execute(TC_Sem_B010201_value_list_002()); +} + +} diff --git a/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010201_value_list/Sem_B010201_value_list_003.ttcn b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010201_value_list/Sem_B010201_value_list_003.ttcn new file mode 100644 index 00000000..de8d3514 --- /dev/null +++ b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010201_value_list/Sem_B010201_value_list_003.ttcn @@ -0,0 +1,51 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:B.1.2.1, Ensure that the IUT correctly handles template matching with all from clause + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirements are tested: +//A template list may contain values, templates obeying the template(present) restriction, and members added by all from clauses. +module Sem_B010201_value_list_003 { + + type set of integer SoI; + + type record MessageType { + integer field1, + charstring field2 + } + template SoI m_SoI := {1,2,3,4}; + template integer mw_SoI := (all from m_SoI); + + type port loopbackPort message { + inout integer + } + + +type component GeneralComp { + port loopbackPort messagePort +} + +testcase TC_Sem_B010201_value_list_003() runs on GeneralComp { + + var integer v_testMessage; + v_testMessage:= 2; + + messagePort.send(v_testMessage); + + alt { + [] messagePort.receive(mw_SoI) { + setverdict(pass); + } + [] messagePort.receive { + setverdict(fail); + } + } +} + +control{ + execute(TC_Sem_B010201_value_list_003()); +} + +} diff --git a/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010201_value_list/Sem_B010201_value_list_004.ttcn b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010201_value_list/Sem_B010201_value_list_004.ttcn new file mode 100644 index 00000000..458224d1 --- /dev/null +++ b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010201_value_list/Sem_B010201_value_list_004.ttcn @@ -0,0 +1,54 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:B.1.2.1, Ensure that the IUT correctly handles template list corretly + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirements are tested: +// Restriction C: Templates in the template list shall obey the template(present) restriction + +module Sem_B010201_value_list_004 { + + + type record MessageType { + integer field1, + charstring field2 optional + } + + template(present) MessageType mw_examplePresent := {1, ?}; + + type port loopbackPort message { + inout MessageType + } + + +type component GeneralComp { + port loopbackPort messagePort +} + +testcase TC_Sem_B010201_value_list_004() runs on GeneralComp { + + var MessageType v_testMessage; + v_testMessage:= { + field1:= 1, + field2:= "abc" + } + + messagePort.send(v_testMessage); + + alt { + [] messagePort.receive(mw_examplePresent) { + setverdict(pass); + } + [] messagePort.receive { + setverdict(fail); + } + } +} + +control{ + execute(TC_Sem_B010201_value_list_004()); +} + +} \ No newline at end of file diff --git a/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010202_complemented_value_list/NegSem_B010202_complemented_value_list_001.ttcn b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010202_complemented_value_list/NegSem_B010202_complemented_value_list_001.ttcn new file mode 100644 index 00000000..9e94aa44 --- /dev/null +++ b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010202_complemented_value_list/NegSem_B010202_complemented_value_list_001.ttcn @@ -0,0 +1,59 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:B.1.2.2, Ensure that the IUT correctly handles template matching of complemented value listing + ** @verdict pass reject + ***************************************************/ + +module NegSem_B010202_complemented_value_list_001 { + + type record MessageType { + integer field1, + RoI field2 + } + + type record of integer RoI; + + type port loopbackPort message { + inout MessageType + } + + +type component GeneralComp { + port loopbackPort messagePort +} + +testcase TC_NegSem_B010202_complemented_value_list_001() runs on GeneralComp { + + var MessageType v_testMessage; + + template RoI m_RoI2 := {2, *, 4}; + + template MessageType mw_matchingTemplate:= + { + field1 := complement(0, all from m_RoI2), // shall cause an error because t_RoI2 contains AnyElementsOrNone + field2 := complement({2, 3, (6..9)}) + } + + v_testMessage:= { + field1 := 0, + field2 := {0,1} + } + + messagePort.send(v_testMessage); + + alt { + [] messagePort.receive(mw_matchingTemplate) { + setverdict(pass); + } + [] messagePort.receive { + setverdict(fail); + } + } +} + +control{ + execute(TC_NegSem_B010202_complemented_value_list_001()); +} + +} diff --git a/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010202_complemented_value_list/NegSem_B010202_complemented_value_list_002.ttcn b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010202_complemented_value_list/NegSem_B010202_complemented_value_list_002.ttcn new file mode 100644 index 00000000..6dc2a8a7 --- /dev/null +++ b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010202_complemented_value_list/NegSem_B010202_complemented_value_list_002.ttcn @@ -0,0 +1,61 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:B.1.2.2, Ensure that the IUT correctly handles template matching of complemented value listing + ** @verdict pass reject + ***************************************************/ + +module NegSem_B010202_complemented_value_list_002 { + + type record MessageType { + integer field1, + RoI field2 + } + + type record of integer RoI; + + type port loopbackPort message { + inout MessageType + } + + +type component GeneralComp { + port loopbackPort messagePort +} + +testcase TC_NegSem_B010202_complemented_value_list_002() runs on GeneralComp { + + var MessageType v_testMessage; + + template RoI m_RoI1 := {2, 3, (6..9)}; + + template MessageType mw_matchingTemplate:= + { + field1 := complement(0, 100), + field2 := complement(all from m_RoI1)// causes an error because member type of t_RoI1 (integer) is not compatible + // with the complemented list template type (RoI) + + } + + v_testMessage:= { + field1 := 0, + field2 := {0,1} + } + + messagePort.send(v_testMessage); + + alt { + [] messagePort.receive(mw_matchingTemplate) { + setverdict(pass); + } + [] messagePort.receive { + setverdict(fail); + } + } +} + +control{ + execute(TC_NegSem_B010202_complemented_value_list_002()); +} + +} diff --git a/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010202_complemented_value_list/NegSem_B010202_complemented_value_list_003.ttcn b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010202_complemented_value_list/NegSem_B010202_complemented_value_list_003.ttcn new file mode 100644 index 00000000..23202d6c --- /dev/null +++ b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010202_complemented_value_list/NegSem_B010202_complemented_value_list_003.ttcn @@ -0,0 +1,73 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:B.1.2.2, Ensure that the IUT correctly handles template matching of complemented value listing + ** @verdict pass reject + ***************************************************/ + +module NegSem_B010202_complemented_value_list_003 { + +// type enumerated EnumeratedType {e_black, e_white, e_green}; + +// type record RecordType { +// integer a optional, +// integer b optional, +// boolean c +// } + +// type union UnionType { +// integer a, +// EnumeratedType b, +// boolean c +// } + + type record MessageType { + integer field1, + RoI field2 + } + + type record of integer RoI; + + type port loopbackPort message { + inout MessageType + } + + +type component GeneralComp { + port loopbackPort messagePort +} + +testcase TC_NegSem_B010202_complemented_value_list_003() runs on GeneralComp { + + var MessageType v_testMessage; + + template RoI m_RoI4 := ?; + + template MessageType mw_matchingTemplate:= + { + field1 := complement(0, 100), + field2 := complement(all from m_RoI4)// causes an error because t_RoI4 resolves into a matching mechanism + } + + v_testMessage:= { + field1 := 0, + field2 := {0,1} + } + + messagePort.send(v_testMessage); + + alt { + [] messagePort.receive(mw_matchingTemplate) { + setverdict(pass); + } + [] messagePort.receive { + setverdict(fail); + } + } +} + +control{ + execute(TC_NegSem_B010202_complemented_value_list_003()); +} + +} diff --git a/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010202_complemented_value_list/NegSem_B010202_complemented_value_list_004.ttcn b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010202_complemented_value_list/NegSem_B010202_complemented_value_list_004.ttcn new file mode 100644 index 00000000..34717eef --- /dev/null +++ b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010202_complemented_value_list/NegSem_B010202_complemented_value_list_004.ttcn @@ -0,0 +1,46 @@ +/*************************************************** + ** @author STF 487 (updated by STF 527) + ** @version 0.0.2 + ** @purpose 1:B.1.2.2, Ensure that the IUT correctly handles template matching of complemented value omit + ** @verdict pass accept, ttcn3verdict:fail + ***************************************************/ + +//Restriction e) The complement of a template list shall not match omit. + +module NegSem_B010202_complemented_value_list_004 { + + type record MyRec { + integer field1, + float field2 optional + } + + type port loopbackPort message { + inout MyRec + } + + + type component GeneralComp { + port loopbackPort messagePort + } + + testcase TC_NegSem_B010202_complemented_value_list_004() runs on GeneralComp { + var MyRec v_testMessage := { field1 := 1, field2 := omit}; + var template MyRec mw_matchingTemplate:= { field1 := ?, field2 := complement(1.0, (2.0 .. 5.0)) }; + + messagePort.send(v_testMessage); + + alt { + [] messagePort.receive(mw_matchingTemplate) { // won't match as complement never matches omit + setverdict(pass); + } + [] messagePort.receive { + setverdict(fail); + } + } + } + + control { + execute(TC_NegSem_B010202_complemented_value_list_004()); + } + +} diff --git a/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010202_complemented_value_list/Sem_B010202_complemented_value_list_001.ttcn b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010202_complemented_value_list/Sem_B010202_complemented_value_list_001.ttcn new file mode 100644 index 00000000..9e1b061e --- /dev/null +++ b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010202_complemented_value_list/Sem_B010202_complemented_value_list_001.ttcn @@ -0,0 +1,78 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:B.1.2.2, Ensure that the IUT correctly handles template matching of complemented value listing + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +module Sem_B010202_complemented_value_list_001 { + + type enumerated EnumeratedType {e_black, e_white, e_green}; + + type record RecordType { + integer a optional, + integer b optional, + boolean c + } + + type union UnionType { + integer a, + EnumeratedType b, + boolean c + } + + type record MessageType { + integer field1, + charstring field2, + EnumeratedType field3, + RecordType field4, + UnionType field5 + } + + type port loopbackPort message { + inout MessageType + } + + +type component GeneralComp { + port loopbackPort messagePort +} + +testcase TC_Sem_B010202_complemented_value_list_001() runs on GeneralComp { + + var MessageType v_testMessage; + + template MessageType mw_matchingTemplate:= + { + field1 := complement(1,2), + field2 := complement("test string","something else"), + field3 := complement(e_green,e_black), + field4 := complement({a:=1,b:=1,c:=false},{a:=1,b:=2,c:=true}), + field5 := complement({a:=1},{b:=e_white}) + } + + v_testMessage:= { + field1 := 0, + field2 := "test", + field3 := e_white, + field4 := {a:=1,b:=2,c:=false}, + field5 := {a:=2} + } + + messagePort.send(v_testMessage); + + alt { + [] messagePort.receive(mw_matchingTemplate) { + setverdict(pass); + } + [] messagePort.receive { + setverdict(fail); + } + } +} + +control{ + execute(TC_Sem_B010202_complemented_value_list_001()); +} + +} diff --git a/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010202_complemented_value_list/Sem_B010202_complemented_value_list_002.ttcn b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010202_complemented_value_list/Sem_B010202_complemented_value_list_002.ttcn new file mode 100644 index 00000000..5ab4acd4 --- /dev/null +++ b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010202_complemented_value_list/Sem_B010202_complemented_value_list_002.ttcn @@ -0,0 +1,78 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:B.1.2.2, Ensure that the IUT correctly handles template matching of complemented value listing + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +module Sem_B010202_complemented_value_list_002 { + + type enumerated EnumeratedType {e_black, e_white, e_green}; + + type record RecordType { + integer a optional, + integer b optional, + boolean c + } + + type union UnionType { + integer a, + EnumeratedType b, + boolean c + } + + type record MessageType { + integer field1, + charstring field2, + EnumeratedType field3, + RecordType field4, + UnionType field5 + } + + type port loopbackPort message { + inout MessageType + } + + +type component GeneralComp { + port loopbackPort messagePort +} + +testcase TC_Sem_B010202_complemented_value_list_002() runs on GeneralComp { + + var MessageType v_testMessage; + + template MessageType mw_matchingTemplate:= + { + field1 := complement(1,2), + field2 := complement("test string","something else"), + field3 := complement(e_green,e_black), + field4 := complement({a:=1,b:=1,c:=false},{a:=1,b:=2,c:=true}), + field5 := complement({a:=1},{b:=e_white}) + } + + v_testMessage:= { + field1 := 2, //mismatching complement in the template + field2 := "test", + field3 := e_white, + field4 := {a:=1,b:=2,c:=false}, + field5 := {a:=2} + } + + messagePort.send(v_testMessage); + + alt { + [] messagePort.receive(mw_matchingTemplate) { + setverdict(fail); + } + [] messagePort.receive { + setverdict(pass); + } + } +} + +control{ + execute(TC_Sem_B010202_complemented_value_list_002()); +} + +} diff --git a/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010202_complemented_value_list/Sem_B010202_complemented_value_list_003.ttcn b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010202_complemented_value_list/Sem_B010202_complemented_value_list_003.ttcn new file mode 100644 index 00000000..c863d6a6 --- /dev/null +++ b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010202_complemented_value_list/Sem_B010202_complemented_value_list_003.ttcn @@ -0,0 +1,78 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:B.1.2.2, Ensure that the IUT correctly handles template matching of complemented value listing + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +module Sem_B010202_complemented_value_list_003 { + + type enumerated EnumeratedType {e_black, e_white, e_green}; + + type record RecordType { + integer a optional, + integer b optional, + boolean c + } + + type union UnionType { + integer a, + EnumeratedType b, + boolean c + } + + type record MessageType { + integer field1, + charstring field2, + EnumeratedType field3, + RecordType field4, + UnionType field5 + } + + type port loopbackPort message { + inout MessageType + } + + +type component GeneralComp { + port loopbackPort messagePort +} + +testcase TC_Sem_B010202_complemented_value_list_003() runs on GeneralComp { + + var MessageType v_testMessage; + + template MessageType mw_matchingTemplate:= + { + field1 := complement(1,2), + field2 := complement("test string","something else"), + field3 := complement(e_green,e_black), + field4 := complement({a:=1,b:=1,c:=false},{a:=1,b:=2,c:=true}), + field5 := complement({a:=1},{b:=e_white}) + } + + v_testMessage:= { + field1 := 0, + field2 := "test string", //mismatching complement in the template + field3 := e_white, + field4 := {a:=1,b:=2,c:=false}, + field5 := {a:=2} + } + + messagePort.send(v_testMessage); + + alt { + [] messagePort.receive(mw_matchingTemplate) { + setverdict(fail); + } + [] messagePort.receive { + setverdict(pass); + } + } +} + +control{ + execute(TC_Sem_B010202_complemented_value_list_003()); +} + +} diff --git a/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010202_complemented_value_list/Sem_B010202_complemented_value_list_004.ttcn b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010202_complemented_value_list/Sem_B010202_complemented_value_list_004.ttcn new file mode 100644 index 00000000..f52791fc --- /dev/null +++ b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010202_complemented_value_list/Sem_B010202_complemented_value_list_004.ttcn @@ -0,0 +1,78 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:B.1.2.2, Ensure that the IUT correctly handles template matching of complemented value listing + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +module Sem_B010202_complemented_value_list_004 { + + type enumerated EnumeratedType {e_black, e_white, e_green}; + + type record RecordType { + integer a optional, + integer b optional, + boolean c + } + + type union UnionType { + integer a, + EnumeratedType b, + boolean c + } + + type record MessageType { + integer field1, + charstring field2, + EnumeratedType field3, + RecordType field4, + UnionType field5 + } + + type port loopbackPort message { + inout MessageType + } + + +type component GeneralComp { + port loopbackPort messagePort +} + +testcase TC_Sem_B010202_complemented_value_list_004() runs on GeneralComp { + + var MessageType v_testMessage; + + template MessageType mw_matchingTemplate:= + { + field1 := complement(1,2), + field2 := complement("test string","something else"), + field3 := complement(e_green,e_black), + field4 := complement({a:=1,b:=1,c:=false},{a:=1,b:=2,c:=true}), + field5 := complement({a:=1},{b:=e_white}) + } + + v_testMessage:= { + field1 := 0, + field2 := "test ", + field3 := e_green, //mismatching complement in the template + field4 := {a:=1,b:=2,c:=false}, + field5 := {a:=2} + } + + messagePort.send(v_testMessage); + + alt { + [] messagePort.receive(mw_matchingTemplate) { + setverdict(fail); + } + [] messagePort.receive { + setverdict(pass); + } + } +} + +control{ + execute(TC_Sem_B010202_complemented_value_list_004()); +} + +} diff --git a/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010202_complemented_value_list/Sem_B010202_complemented_value_list_005.ttcn b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010202_complemented_value_list/Sem_B010202_complemented_value_list_005.ttcn new file mode 100644 index 00000000..556cf9a9 --- /dev/null +++ b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010202_complemented_value_list/Sem_B010202_complemented_value_list_005.ttcn @@ -0,0 +1,78 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:B.1.2.2, Ensure that the IUT correctly handles template matching of complemented value listing + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +module Sem_B010202_complemented_value_list_005 { + + type enumerated EnumeratedType {e_black, e_white, e_green}; + + type record RecordType { + integer a optional, + integer b optional, + boolean c + } + + type union UnionType { + integer a, + EnumeratedType b, + boolean c + } + + type record MessageType { + integer field1, + charstring field2, + EnumeratedType field3, + RecordType field4, + UnionType field5 + } + + type port loopbackPort message { + inout MessageType + } + + +type component GeneralComp { + port loopbackPort messagePort +} + +testcase TC_Sem_B010202_complemented_value_list_005() runs on GeneralComp { + + var MessageType v_testMessage; + + template MessageType mw_matchingTemplate:= + { + field1 := complement(1,2), + field2 := complement("test string","something else"), + field3 := complement(e_green,e_black), + field4 := complement({a:=1,b:=1,c:=false},{a:=1,b:=2,c:=true}), + field5 := complement({a:=1},{b:=e_white}) + } + + v_testMessage:= { + field1 := 0, + field2 := "test ", + field3 := e_white, + field4 := {a:=1,b:=2,c:=true}, //mismatching complement in the template + field5 := {a:=2} + } + + messagePort.send(v_testMessage); + + alt { + [] messagePort.receive(mw_matchingTemplate) { + setverdict(fail); + } + [] messagePort.receive { + setverdict(pass); + } + } +} + +control{ + execute(TC_Sem_B010202_complemented_value_list_005()); +} + +} diff --git a/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010202_complemented_value_list/Sem_B010202_complemented_value_list_006.ttcn b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010202_complemented_value_list/Sem_B010202_complemented_value_list_006.ttcn new file mode 100644 index 00000000..650d864b --- /dev/null +++ b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010202_complemented_value_list/Sem_B010202_complemented_value_list_006.ttcn @@ -0,0 +1,78 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:B.1.2.2, Ensure that the IUT correctly handles template matching of complemented value listing + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +module Sem_B010202_complemented_value_list_006 { + + type enumerated EnumeratedType {e_black, e_white, e_green}; + + type record RecordType { + integer a optional, + integer b optional, + boolean c + } + + type union UnionType { + integer a, + EnumeratedType b, + boolean c + } + + type record MessageType { + integer field1, + charstring field2, + EnumeratedType field3, + RecordType field4, + UnionType field5 + } + + type port loopbackPort message { + inout MessageType + } + + +type component GeneralComp { + port loopbackPort messagePort +} + +testcase TC_Sem_B010202_complemented_value_list_006() runs on GeneralComp { + + var MessageType v_testMessage; + + template MessageType mw_matchingTemplate:= + { + field1 := complement(1,2), + field2 := complement("test string","something else"), + field3 := complement(e_green,e_black), + field4 := complement({a:=1,b:=1,c:=false},{a:=1,b:=2,c:=true}), + field5 := complement({a:=1},{b:=e_white}) + } + + v_testMessage:= { + field1 := 0, + field2 := "test ", + field3 := e_white, + field4 := {a:=1,b:=2,c:=false}, + field5 := {b:=e_white} //mismatching complement in the template + } + + messagePort.send(v_testMessage); + + alt { + [] messagePort.receive(mw_matchingTemplate) { + setverdict(fail); + } + [] messagePort.receive { + setverdict(pass); + } + } +} + +control{ + execute(TC_Sem_B010202_complemented_value_list_006()); +} + +} diff --git a/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010202_complemented_value_list/Sem_B010202_complemented_value_list_007.ttcn b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010202_complemented_value_list/Sem_B010202_complemented_value_list_007.ttcn new file mode 100644 index 00000000..a7ce041f --- /dev/null +++ b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010202_complemented_value_list/Sem_B010202_complemented_value_list_007.ttcn @@ -0,0 +1,81 @@ +/*************************************************** + ** @author STF 470 (updated by STF 521) + ** @version 0.0.2 + ** @purpose 1:B.1.2.2, Ensure that the IUT correctly handles template matching of complemented value listing + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +module Sem_B010202_complemented_value_list_007 { + + type enumerated EnumeratedType {e_black, e_white, e_green}; + + type record RecordType { + integer a optional, + integer b optional, + boolean c + } + + type union UnionType { + integer a, + EnumeratedType b, + boolean c + } + + type record MessageType { + integer field1, + charstring field2, + EnumeratedType field3, + RecordType field4, + UnionType field5 + } + + type record of integer RoI; + + type port loopbackPort message { + inout MessageType + } + +type component GeneralComp { + port loopbackPort messagePort +} + +testcase TC_Sem_B010202_complemented_value_list_007() runs on GeneralComp { + + var MessageType v_testMessage; + + template RoI m_RoI1 := {1, 2, (6..9)}; + + template MessageType mw_matchingTemplate:= + { + field1 := complement(all from m_RoI1, 100), // fine as items from m_RoI1 resolve to integer templates + field2 := complement("test string","something else"), + field3 := complement(e_green,e_black), + field4 := complement({a:=1,b:=1,c:=false},{a:=1,b:=2,c:=true}), + field5 := complement({a:=1},{b:=e_white}) + } + + v_testMessage:= { + field1 := 0, + field2 := "test ", + field3 := e_white, + field4 := {a:=1,b:=2,c:=false}, + field5 := {a:=2} + } + + messagePort.send(v_testMessage); + + alt { + [] messagePort.receive(mw_matchingTemplate) { + setverdict(pass); + } + [] messagePort.receive { + setverdict(fail); + } + } +} + +control{ + execute(TC_Sem_B010202_complemented_value_list_007()); +} + +} diff --git a/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010202_complemented_value_list/Sem_B010202_complemented_value_list_008.ttcn b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010202_complemented_value_list/Sem_B010202_complemented_value_list_008.ttcn new file mode 100644 index 00000000..9595b182 --- /dev/null +++ b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010202_complemented_value_list/Sem_B010202_complemented_value_list_008.ttcn @@ -0,0 +1,54 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:B.1.2.2, Ensure that the IUT correctly handles template matching of complemented value omit + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +//Restriction e) The complement of a template list shall not match omit. + +module Sem_B010202_complemented_value_list_008 { + +type record MyRec{ + integer field1, + float field2 optional + } + + type port loopbackPort message { + inout MyRec + } + + +type component GeneralComp { + port loopbackPort messagePort +} + +testcase TC_Sem_B010202_complemented_value_list_008() runs on GeneralComp { + + var MyRec v_testMessage; + + template MyRec mw_matchingTemp:={field1:=1,field2:=omit}; + + template MyRec mw_matchingTemplate:=complement(mw_matchingTemp); + + + v_testMessage:= {field1:=11,field2:=omit}; // correct, field2 is omit and is not matched + + + messagePort.send(v_testMessage); + + alt { + [] messagePort.receive(mw_matchingTemplate) { + setverdict(pass); + } + [] messagePort.receive { + setverdict(fail); + } + } +} + +control{ + execute(TC_Sem_B010202_complemented_value_list_008()); +} + +} diff --git a/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010203_any_value/Sem_B010203_any_value_001.ttcn b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010203_any_value/Sem_B010203_any_value_001.ttcn new file mode 100644 index 00000000..22859cd5 --- /dev/null +++ b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010203_any_value/Sem_B010203_any_value_001.ttcn @@ -0,0 +1,82 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:B.1.2.3, Ensure that the IUT correctly handles template matching of ? values + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +module Sem_B010203_any_value_001 { + + type enumerated EnumeratedType {e_black, e_white, e_green}; + + type record RecordType { + integer a optional, + integer b optional, + boolean c + } + + type union UnionType { + integer a, + EnumeratedType b, + boolean c + } + + type record MessageType { + integer field1, + charstring field2, + EnumeratedType field3, + RecordType field4, + UnionType field5, + RecordType field6, + UnionType field7 + } + + type port loopbackPort message { + inout MessageType + } + + +type component GeneralComp { + port loopbackPort messagePort +} + +testcase TC_Sem_B010203_any_value_001() runs on GeneralComp { + + template MessageType mw_matchingTemplate:= + { + field1 := ?, + field2 := ?, + field3 := ?, + field4 := ?, + field5 := ?, + field6 := {a:=1,b:=?,c:=true}, + field7 := {a:=?} + } + + var MessageType v_testMessage:= { + field1 := 2, + field2 := "test string", + field3 := e_black, + field4 := {a:=1,b:=omit,c:=true}, + field5 := {a:=1}, + field6 := {a:=1,b:=2,c:=true}, + field7 := {a:=1} + } + + messagePort.send(v_testMessage); + + alt { + [] messagePort.receive(mw_matchingTemplate) { + setverdict(pass); + } + [] messagePort.receive { + setverdict(fail); + } + } +} + +control{ + execute(TC_Sem_B010203_any_value_001()); +} + +} diff --git a/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010203_any_value/Sem_B010203_any_value_002.ttcn b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010203_any_value/Sem_B010203_any_value_002.ttcn new file mode 100644 index 00000000..79fbe580 --- /dev/null +++ b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010203_any_value/Sem_B010203_any_value_002.ttcn @@ -0,0 +1,84 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:B.1.2.3, Ensure that the IUT correctly handles template matching of ? values + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +module Sem_B010203_any_value_002 { + + type enumerated EnumeratedType {e_black, e_white, e_green}; + + type record RecordType { + integer a optional, + integer b optional, + boolean c + } + + type union UnionType { + integer a, + EnumeratedType b, + boolean c + } + + type record MessageType { + integer field1, + charstring field2, + EnumeratedType field3, + RecordType field4, + UnionType field5, + RecordType field6, + UnionType field7 + } + + type port loopbackPort message { + inout MessageType + } + + +type component GeneralComp { + port loopbackPort messagePort +} + +testcase TC_Sem_B010203_any_value_002() runs on GeneralComp { + + var MessageType v_testMessage; + + template MessageType mw_matchingTemplate:= + { + field1 := ?, + field2 := ?, + field3 := ?, + field4 := ?, + field5 := ?, + field6 := {a:=1,b:=?,c:=true}, //omitted value does not match ? + field7 := {a:=?} + } + + v_testMessage:= { + field1 := 2, + field2 := "test string", + field3 := e_black, + field4 := {a:=1,b:=omit,c:=true}, + field5 := {a:=1}, + field6 := {a:=1,b:=omit,c:=true}, + field7 := {a:=1} + } + + messagePort.send(v_testMessage); + + alt { + [] messagePort.receive(mw_matchingTemplate) { + setverdict(fail); + } + [] messagePort.receive { + setverdict(pass); + } + } +} + +control{ + execute(TC_Sem_B010203_any_value_002()); +} + +} diff --git a/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010204_any_value_or_none/NegSem_B010204_any_value_or_none_001.ttcn b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010204_any_value_or_none/NegSem_B010204_any_value_or_none_001.ttcn new file mode 100644 index 00000000..80078c7a --- /dev/null +++ b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010204_any_value_or_none/NegSem_B010204_any_value_or_none_001.ttcn @@ -0,0 +1,73 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:B.1.2.4, Ensure that the IUT correctly handles template matching of * values + ** @verdict pass reject + ***************************************************/ + +module NegSem_B010204_any_value_or_none_001 { + + type enumerated EnumeratedType {e_black, e_white, e_green}; + + type record RecordType { + integer a optional, + integer b optional, + boolean c + } + + type union UnionType { + integer a, + EnumeratedType b, + boolean c + } + + type record MessageType { + integer field1, + charstring field2, + EnumeratedType field3, + RecordType field4, + UnionType field5, + RecordType field6 + } + + type port loopbackPort message { + inout MessageType + } + + +type component GeneralComp { + port loopbackPort messagePort +} + +testcase TC_NegSem_B010204_any_value_or_none_001() runs on GeneralComp { + + var MessageType v_testMessage; + + template MessageType mw_matchingTemplate:= + { + field1 := *, // * is used on non-optional fields + field2 := *, + field3 := *, + field4 := *, + field5 := *, + field6 := {a:=1,b:=*,c:=true} + } + + v_testMessage:= { + field1 := 2, + field2 := "test string", + field3 := e_black, + field4 := {a:=1,b:=omit,c:=true}, + field5 := {a:=1}, + field6 := {a:=1,b:=omit,c:=true} + } + + messagePort.send(v_testMessage); + +} + +control{ + execute(TC_NegSem_B010204_any_value_or_none_001()); +} + +} diff --git a/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010204_any_value_or_none/NegSem_B010204_any_value_or_none_002.ttcn b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010204_any_value_or_none/NegSem_B010204_any_value_or_none_002.ttcn new file mode 100644 index 00000000..2faa8df6 --- /dev/null +++ b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010204_any_value_or_none/NegSem_B010204_any_value_or_none_002.ttcn @@ -0,0 +1,76 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:B.1.2.4, Ensure that the IUT correctly handles template matching of * values + ** @verdict pass reject + ***************************************************/ + +module NegSem_B010204_any_value_or_none_002 { + + type enumerated EnumeratedType {e_black, e_white, e_green}; + + type record RecordType { + integer a optional, + integer b optional, + boolean c + } + + type union UnionType { + integer a, + EnumeratedType b, + boolean c + } + + type record MessageType { + integer field1 optional, + charstring field2 optional, + EnumeratedType field3 optional, + RecordType field4 optional, + UnionType field5 optional, + RecordType field6, + UnionType field7 + } + + type port loopbackPort message { + inout MessageType + } + + +type component GeneralComp { + port loopbackPort messagePort +} + +testcase TC_NegSem_B010204_any_value_or_none_002() runs on GeneralComp { + + var MessageType v_testMessage; + + template MessageType mw_matchingTemplate:= + { + field1 := *, + field2 := *, + field3 := *, + field4 := *, + field5 := *, + field6 := {a:=1,b:=*,c:=true}, + field7 := {a:=*} //use of * on a union element + } + + v_testMessage:= { + field1 := 2, + field2 := "test string", + field3 := e_black, + field4 := {a:=1,b:=omit,c:=true}, + field5 := {a:=1}, + field6 := {a:=1,b:=omit,c:=true}, + field7 := {a:=1} + } + + messagePort.send(v_testMessage); + +} + +control{ + execute(TC_NegSem_B010204_any_value_or_none_002()); +} + +} diff --git a/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010204_any_value_or_none/Sem_B010204_any_value_or_none_001.ttcn b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010204_any_value_or_none/Sem_B010204_any_value_or_none_001.ttcn new file mode 100644 index 00000000..4aae6445 --- /dev/null +++ b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010204_any_value_or_none/Sem_B010204_any_value_or_none_001.ttcn @@ -0,0 +1,81 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:B.1.2.4, Ensure that the IUT correctly handles template matching of * values + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +module Sem_B010204_any_value_or_none_001 { + + type enumerated EnumeratedType {e_black, e_white, e_green}; + + type record RecordType { + integer a optional, + integer b optional, + boolean c + } + + type union UnionType { + integer a, + EnumeratedType b, + boolean c + } + + type record MessageType { + integer field1 optional, + charstring field2 optional, + EnumeratedType field3 optional, + RecordType field4 optional, + UnionType field5 optional, + RecordType field6 + } + + type port loopbackPort message { + inout MessageType + } + + +type component GeneralComp { + port loopbackPort messagePort +} + +testcase TC_Sem_B010204_any_value_or_none_001() runs on GeneralComp { + + var MessageType v_testMessage; + + template MessageType mw_matchingTemplate:= + { + field1 := *, + field2 := *, + field3 := *, + field4 := *, + field5 := *, + field6 := {a:=1,b:=*,c:=true} + } + + v_testMessage:= { + field1 := 2, + field2 := "test string", + field3 := e_black, + field4 := {a:=1,b:=omit,c:=true}, + field5 := {a:=1}, + field6 := {a:=1,b:=omit,c:=true} + } + + messagePort.send(v_testMessage); + + alt { + [] messagePort.receive(mw_matchingTemplate) { + setverdict(pass); + } + [] messagePort.receive { + setverdict(fail); + } + } +} + +control{ + execute(TC_Sem_B010204_any_value_or_none_001()); +} + +} diff --git a/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010204_any_value_or_none/Sem_B010204_any_value_or_none_002.ttcn b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010204_any_value_or_none/Sem_B010204_any_value_or_none_002.ttcn new file mode 100644 index 00000000..8a50677e --- /dev/null +++ b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010204_any_value_or_none/Sem_B010204_any_value_or_none_002.ttcn @@ -0,0 +1,33 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:B.1.2.4, Ensure that AnyValueOrNone can be assigned to top-level template + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// It can be assigned to templates of any type as a whole. + +module Sem_B010204_any_value_or_none_002 { + + template integer t_anyOrNone := *; // top-level static template + + + type component GeneralComp { + } + + function f(in template integer p1) { + } + + testcase TC_Sem_B010204_any_value_or_none_002() runs on GeneralComp { + + var template integer vt_anyOrNone := *; // top-level template variable + f(*); // top-level template parameter + setverdict(pass); + } + + control{ + execute(TC_Sem_B010204_any_value_or_none_002()); + } + +} diff --git a/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010204_any_value_or_none/Sem_B010204_any_value_or_none_003.ttcn b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010204_any_value_or_none/Sem_B010204_any_value_or_none_003.ttcn new file mode 100644 index 00000000..7f691dfd --- /dev/null +++ b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010204_any_value_or_none/Sem_B010204_any_value_or_none_003.ttcn @@ -0,0 +1,36 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:B.1.2.4, Ensure that AnyValueOrNone can be used for matching optional fields + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// At the time of matching, it shall be applied to optional fields of record and set +// templates only. + +module Sem_B010204_any_value_or_none_003 { + + type set Set1 { + integer field1, + integer field2 optional + } + template integer t_anyOrNone := *; // top-level static template + + type component GeneralComp { + } + + testcase TC_Sem_B010204_any_value_or_none_003() runs on GeneralComp { + var Set1 v_val := { field1 := 5, field2 := 23 }; + if (match(v_val.field2, t_anyOrNone)) { + setverdict(pass); + } else { + setverdict(fail); + } + } + + control{ + execute(TC_Sem_B010204_any_value_or_none_003()); + } + +} diff --git a/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010204_any_value_or_none/Sem_B010204_any_value_or_none_004.ttcn b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010204_any_value_or_none/Sem_B010204_any_value_or_none_004.ttcn new file mode 100644 index 00000000..4318f550 --- /dev/null +++ b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010204_any_value_or_none/Sem_B010204_any_value_or_none_004.ttcn @@ -0,0 +1,38 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:B.1.2.4, Ensure that AnyValueOrNone can be used for matching non-optional value + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// At the time of matching, it shall be applied to optional fields of record and set +// templates only. + +//formerly: NegSem_B010204_any_value_or_none_003 + +module Sem_B010204_any_value_or_none_004 { + + type set Set1 { + integer field1, + integer field2 optional + } + template Set1 t_anyOrNone := *; // top-level static template + + type component GeneralComp { + } + + testcase TC_Sem_B010204_any_value_or_none_004() runs on GeneralComp { + var Set1 v_val := { field1 := 5, field2 := 23 }; + if (match(v_val, t_anyOrNone)) { + setverdict(pass); + } else { + setverdict(fail); + } + } + + control{ + execute(TC_Sem_B010204_any_value_or_none_004()); + } + +} diff --git a/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010204_any_value_or_none/Sem_B010204_any_value_or_none_005.ttcn b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010204_any_value_or_none/Sem_B010204_any_value_or_none_005.ttcn new file mode 100644 index 00000000..6bc1b179 --- /dev/null +++ b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010204_any_value_or_none/Sem_B010204_any_value_or_none_005.ttcn @@ -0,0 +1,38 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:B.1.2.4, Ensure that AnyValueOrNone can be used for matching compulsory fields + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// At the time of matching, it shall be applied to optional fields of record and set +// templates only. + +//formerly: NegSem_B010204_any_value_or_none_004 + +module Sem_B010204_any_value_or_none_005 { + + type set Set1 { + integer field1, + integer field2 optional + } + template integer t_anyOrNone := *; // top-level static template + + type component GeneralComp { + } + + testcase TC_Sem_B010204_any_value_or_none_005() runs on GeneralComp { + var Set1 v_val := { field1 := 5, field2 := 23 }; + if (match(v_val.field1, t_anyOrNone)) { + setverdict(pass); + } else { + setverdict(fail); + } + } + + control{ + execute(TC_Sem_B010204_any_value_or_none_005()); + } + +} diff --git a/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010205_value_range/NegSem_B010205_value_range_001.ttcn b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010205_value_range/NegSem_B010205_value_range_001.ttcn new file mode 100644 index 00000000..80b55c6d --- /dev/null +++ b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010205_value_range/NegSem_B010205_value_range_001.ttcn @@ -0,0 +1,67 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:B.1.2.5, Ensure that the IUT correctly handles template matching of value range definitions + ** @verdict pass reject + ***************************************************/ + +module NegSem_B010205_value_range_001 { + + type enumerated EnumeratedType {e_black, e_white, e_green}; + + type record RecordType { + integer a optional, + integer b optional, + boolean c + } + + type union UnionType { + integer a, + EnumeratedType b, + boolean c + } + + type record MessageType { + integer field1, + EnumeratedType field2, + RecordType field3, + UnionType field4 + } + + type port loopbackPort message { + inout MessageType + } + + +type component GeneralComp { + port loopbackPort messagePort +} + +testcase TC_NegSem_B010205_value_range_001() runs on GeneralComp { + + var MessageType v_testMessage; + + template MessageType mw_matchingTemplate:= + { + field1 := (0..2), + field2 := (e_black..e_white), //attempt to use range on enumerated type + field3 := {a:=1,b:=(0..2),c:=true}, + field4 := {a:=(0..2)} + } + + v_testMessage:= { + field1 := 2, + field2 := e_black, + field3 := {a:=1,b:=2,c:=true}, + field4 := {a:=1} + } + + messagePort.send(v_testMessage); + +} + +control{ + execute(TC_NegSem_B010205_value_range_001()); +} + +} diff --git a/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010205_value_range/NegSem_B010205_value_range_002.ttcn b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010205_value_range/NegSem_B010205_value_range_002.ttcn new file mode 100644 index 00000000..22947893 --- /dev/null +++ b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010205_value_range/NegSem_B010205_value_range_002.ttcn @@ -0,0 +1,67 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:B.1.2.5, Ensure that the IUT correctly handles template matching of value range definitions + ** @verdict pass reject + ***************************************************/ + +module NegSem_B010205_value_range_002 { + + type enumerated EnumeratedType {e_black, e_white, e_green}; + + type record RecordType { + integer a optional, + integer b optional, + boolean c + } + + type union UnionType { + integer a, + EnumeratedType b, + boolean c + } + + type record MessageType { + integer field1, + charstring field2, + RecordType field3, + UnionType field4 + } + + type port loopbackPort message { + inout MessageType + } + + +type component GeneralComp { + port loopbackPort messagePort +} + +testcase TC_NegSem_B010205_value_range_002() runs on GeneralComp { + + var MessageType v_testMessage; + + template MessageType mw_matchingTemplate:= + { + field1 := (2..0), //boundaries in wrong order + field2 := ("aaa".."fff"), + field3 := {a:=1,b:=(0..2),c:=true}, + field4 := {a:=(0..2)} + } + + v_testMessage:= { + field1 := 2, + field2 := "abc", + field3 := {a:=1,b:=2,c:=true}, + field4 := {a:=1} + } + + messagePort.send(v_testMessage); + +} + +control{ + execute(TC_NegSem_B010205_value_range_002()); +} + +} diff --git a/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010205_value_range/NegSem_B010205_value_range_003.ttcn b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010205_value_range/NegSem_B010205_value_range_003.ttcn new file mode 100644 index 00000000..13b6533e --- /dev/null +++ b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010205_value_range/NegSem_B010205_value_range_003.ttcn @@ -0,0 +1,67 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:B.1.2.5, Ensure that the IUT correctly handles template matching of value range definitions + ** @verdict pass reject + ***************************************************/ + +module NegSem_B010205_value_range_003 { + + type enumerated EnumeratedType {e_black, e_white, e_green}; + + type record RecordType { + integer a optional, + integer b optional, + boolean c + } + + type union UnionType { + integer a, + EnumeratedType b, + boolean c + } + + type record MessageType { + integer field1, + charstring field2, + RecordType field3, + UnionType field4 + } + + type port loopbackPort message { + inout MessageType + } + + +type component GeneralComp { + port loopbackPort messagePort +} + +testcase TC_NegSem_B010205_value_range_003() runs on GeneralComp { + + var MessageType v_testMessage; + + template MessageType mw_matchingTemplate:= + { + field1 := (0..2), + field2 := ("fff".."aaa"), //boundaries in wrong order + field3 := {a:=1,b:=(0..2),c:=true}, + field4 := {a:=(0..2)} + } + + v_testMessage:= { + field1 := 2, + field2 := "abc", + field3 := {a:=1,b:=2,c:=true}, + field4 := {a:=1} + } + + messagePort.send(v_testMessage); + +} + +control{ + execute(TC_NegSem_B010205_value_range_003()); +} + +} diff --git a/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010205_value_range/Sem_B010205_value_range_001.ttcn b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010205_value_range/Sem_B010205_value_range_001.ttcn new file mode 100644 index 00000000..82201af2 --- /dev/null +++ b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010205_value_range/Sem_B010205_value_range_001.ttcn @@ -0,0 +1,75 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:B.1.2.5, Ensure that the IUT correctly handles template matching of value range definitions + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +module Sem_B010205_value_range_001 { + + type enumerated EnumeratedType {e_black, e_white, e_green}; + + type record RecordType { + integer a optional, + integer b optional, + boolean c + } + + type union UnionType { + integer a, + EnumeratedType b, + boolean c + } + + type record MessageType { + integer field1, + charstring field2, + RecordType field3, + UnionType field4 + } + + type port loopbackPort message { + inout MessageType + } + + +type component GeneralComp { + port loopbackPort messagePort +} + +testcase TC_Sem_B010205_value_range_001() runs on GeneralComp { + + var MessageType v_testMessage; + + template MessageType mw_matchingTemplate:= + { + field1 := (0..2), + field2 := ("a".."f") length (3), + field3 := {a:=1,b:=(0..2),c:=true}, + field4 := {a:=(0..2)} + } + + v_testMessage:= { + field1 := 2, + field2 := "abc", + field3 := {a:=1,b:=2,c:=true}, + field4 := {a:=1} + } + + messagePort.send(v_testMessage); + + alt { + [] messagePort.receive(mw_matchingTemplate) { + setverdict(pass); + } + [] messagePort.receive { + setverdict(fail); + } + } +} + +control{ + execute(TC_Sem_B010205_value_range_001()); +} + +} diff --git a/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010205_value_range/Sem_B010205_value_range_002.ttcn b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010205_value_range/Sem_B010205_value_range_002.ttcn new file mode 100644 index 00000000..f56f3bc6 --- /dev/null +++ b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010205_value_range/Sem_B010205_value_range_002.ttcn @@ -0,0 +1,75 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:B.1.2.5, Ensure that the IUT correctly handles template matching of value range definitions + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +module Sem_B010205_value_range_002 { + + type enumerated EnumeratedType {e_black, e_white, e_green}; + + type record RecordType { + integer a optional, + integer b optional, + boolean c + } + + type union UnionType { + integer a, + EnumeratedType b, + boolean c + } + + type record MessageType { + integer field1, + charstring field2, + RecordType field3, + UnionType field4 + } + + type port loopbackPort message { + inout MessageType + } + + +type component GeneralComp { + port loopbackPort messagePort +} + +testcase TC_Sem_B010205_value_range_002() runs on GeneralComp { + + var MessageType v_testMessage; + + template MessageType mw_matchingTemplate:= + { + field1 := (0..1), //value is out of range + field2 := ("a".."f") length (3), + field3 := {a:=1,b:=(0..2),c:=true}, + field4 := {a:=(0..2)} + } + + v_testMessage:= { + field1 := 2, + field2 := "abc", + field3 := {a:=1,b:=2,c:=true}, + field4 := {a:=1} + } + + messagePort.send(v_testMessage); + + alt { + [] messagePort.receive(mw_matchingTemplate) { + setverdict(fail); + } + [] messagePort.receive { + setverdict(pass); + } + } +} + +control{ + execute(TC_Sem_B010205_value_range_002()); +} + +} diff --git a/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010205_value_range/Sem_B010205_value_range_003.ttcn b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010205_value_range/Sem_B010205_value_range_003.ttcn new file mode 100644 index 00000000..5230db34 --- /dev/null +++ b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010205_value_range/Sem_B010205_value_range_003.ttcn @@ -0,0 +1,75 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:B.1.2.5, Ensure that the IUT correctly handles template matching of value range definitions + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +module Sem_B010205_value_range_003 { + + type enumerated EnumeratedType {e_black, e_white, e_green}; + + type record RecordType { + integer a optional, + integer b optional, + boolean c + } + + type union UnionType { + integer a, + EnumeratedType b, + boolean c + } + + type record MessageType { + integer field1, + charstring field2, + RecordType field3, + UnionType field4 + } + + type port loopbackPort message { + inout MessageType + } + + +type component GeneralComp { + port loopbackPort messagePort +} + +testcase TC_Sem_B010205_value_range_003() runs on GeneralComp { + + var MessageType v_testMessage; + + template MessageType mw_matchingTemplate:= + { + field1 := (0..2), + field2 := ("a".."f") length (3), + field3 := {a:=1,b:=(0..1),c:=true}, //value is out of range + field4 := {a:=(0..2)} + } + + v_testMessage:= { + field1 := 2, + field2 := "abc", + field3 := {a:=1,b:=2,c:=true}, + field4 := {a:=1} + } + + messagePort.send(v_testMessage); + + alt { + [] messagePort.receive(mw_matchingTemplate) { + setverdict(fail); + } + [] messagePort.receive { + setverdict(pass); + } + } +} + +control{ + execute(TC_Sem_B010205_value_range_003()); +} + +} diff --git a/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010205_value_range/Sem_B010205_value_range_004.ttcn b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010205_value_range/Sem_B010205_value_range_004.ttcn new file mode 100644 index 00000000..3fc56d84 --- /dev/null +++ b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010205_value_range/Sem_B010205_value_range_004.ttcn @@ -0,0 +1,75 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:B.1.2.5, Ensure that the IUT correctly handles template matching of value range definitions + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +module Sem_B010205_value_range_004 { + + type enumerated EnumeratedType {e_black, e_white, e_green}; + + type record RecordType { + integer a optional, + integer b optional, + boolean c + } + + type union UnionType { + float a, + EnumeratedType b, + boolean c + } + + type record MessageType { + integer field1, + charstring field2, + RecordType field3, + UnionType field4 + } + + type port loopbackPort message { + inout MessageType + } + + +type component GeneralComp { + port loopbackPort messagePort +} + +testcase TC_Sem_B010205_value_range_004() runs on GeneralComp { + + var MessageType v_testMessage; + + template MessageType mw_matchingTemplate:= + { + field1 := (0..2), + field2 := ("a".."f") length (3), + field3 := {a:=1,b:=(0..2),c:=true}, + field4 := {a:=(1.000001 .. 2.0)} //float value is out of range + } + + v_testMessage:= { + field1 := 2, + field2 := "abc", + field3 := {a:=1,b:=2,c:=true}, + field4 := {a:=1.0} + } + + messagePort.send(v_testMessage); + + alt { + [] messagePort.receive(mw_matchingTemplate) { + setverdict(fail); + } + [] messagePort.receive { + setverdict(pass); + } + } +} + +control{ + execute(TC_Sem_B010205_value_range_004()); +} + +} diff --git a/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010205_value_range/Sem_B010205_value_range_005.ttcn b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010205_value_range/Sem_B010205_value_range_005.ttcn new file mode 100644 index 00000000..44ddc640 --- /dev/null +++ b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010205_value_range/Sem_B010205_value_range_005.ttcn @@ -0,0 +1,75 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:B.1.2.5, Ensure that the IUT correctly handles template matching of value range definitions + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +module Sem_B010205_value_range_005 { + + type enumerated EnumeratedType {e_black, e_white, e_green}; + + type record RecordType { + integer a optional, + integer b optional, + boolean c + } + + type union UnionType { + float a, + EnumeratedType b, + boolean c + } + + type record MessageType { + integer field1, + charstring field2, + RecordType field3, + UnionType field4 + } + + type port loopbackPort message { + inout MessageType + } + + +type component GeneralComp { + port loopbackPort messagePort +} + +testcase TC_Sem_B010205_value_range_005() runs on GeneralComp { + + var MessageType v_testMessage; + + template MessageType mw_matchingTemplate:= + { + field1 := (0..2), + field2 := ("a".."f") length (3), //character is out of range + field3 := {a:=1,b:=(0..2),c:=true}, + field4 := {a:=(1.0 .. 2.0)} + } + + v_testMessage:= { + field1 := 2, + field2 := "akc", + field3 := {a:=1,b:=2,c:=true}, + field4 := {a:=1.0} + } + + messagePort.send(v_testMessage); + + alt { + [] messagePort.receive(mw_matchingTemplate) { + setverdict(fail); + } + [] messagePort.receive { + setverdict(pass); + } + } +} + +control{ + execute(TC_Sem_B010205_value_range_005()); +} + +} diff --git a/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010205_value_range/Sem_B010205_value_range_006.ttcn b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010205_value_range/Sem_B010205_value_range_006.ttcn new file mode 100644 index 00000000..d9a730a4 --- /dev/null +++ b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010205_value_range/Sem_B010205_value_range_006.ttcn @@ -0,0 +1,75 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:B.1.2.5, Ensure that the IUT correctly handles template matching of value range definitions + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +module Sem_B010205_value_range_006 { + + type enumerated EnumeratedType {e_black, e_white, e_green}; + + type record RecordType { + integer a optional, + integer b optional, + boolean c + } + + type union UnionType { + float a, + EnumeratedType b, + boolean c + } + + type record MessageType { + integer field1, + charstring field2, + RecordType field3, + UnionType field4 + } + + type port loopbackPort message { + inout MessageType + } + + +type component GeneralComp { + port loopbackPort messagePort +} + +testcase TC_Sem_B010205_value_range_006() runs on GeneralComp { + + var MessageType v_testMessage; + + template MessageType mw_matchingTemplate:= + { + field1 := (0..2), + field2 := ("a".."f") length (3), //character is out of range because of an empty character + field3 := {a:=1,b:=(0..2),c:=true}, + field4 := {a:=(1.0 .. 2.0)} + } + + v_testMessage:= { + field1 := 2, + field2 := "ab", + field3 := {a:=1,b:=2,c:=true}, + field4 := {a:=1.0} + } + + messagePort.send(v_testMessage); + + alt { + [] messagePort.receive(mw_matchingTemplate) { + setverdict(fail); + } + [] messagePort.receive { + setverdict(pass); + } + } +} + +control{ + execute(TC_Sem_B010205_value_range_006()); +} + +} diff --git a/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010205_value_range/Sem_B010205_value_range_007.ttcn b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010205_value_range/Sem_B010205_value_range_007.ttcn new file mode 100644 index 00000000..f1b053f2 --- /dev/null +++ b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010205_value_range/Sem_B010205_value_range_007.ttcn @@ -0,0 +1,75 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:B.1.2.5, Ensure that the IUT correctly handles template matching of value range definitions + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +module Sem_B010205_value_range_007 { + + type enumerated EnumeratedType {e_black, e_white, e_green}; + + type record RecordType { + integer a optional, + integer b optional, + boolean c + } + + type union UnionType { + integer a, + EnumeratedType b, + boolean c + } + + type record MessageType { + integer field1, + charstring field2, + RecordType field3, + UnionType field4 + } + + type port loopbackPort message { + inout MessageType + } + + +type component GeneralComp { + port loopbackPort messagePort +} + +testcase TC_Sem_B010205_value_range_007() runs on GeneralComp { + + var MessageType v_testMessage; + + template MessageType mw_matchingTemplate:= + { + field1 := (0..!2), //value is out of range because of exclusive upper boundary + field2 := ("a".."f") length (3), + field3 := {a:=1,b:=(0..2),c:=true}, + field4 := {a:=(0..2)} + } + + v_testMessage:= { + field1 := 2, + field2 := "abc", + field3 := {a:=1,b:=2,c:=true}, + field4 := {a:=1} + } + + messagePort.send(v_testMessage); + + alt { + [] messagePort.receive(mw_matchingTemplate) { + setverdict(fail); + } + [] messagePort.receive { + setverdict(pass); + } + } +} + +control{ + execute(TC_Sem_B010205_value_range_007()); +} + +} diff --git a/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010205_value_range/Sem_B010205_value_range_008.ttcn b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010205_value_range/Sem_B010205_value_range_008.ttcn new file mode 100644 index 00000000..e8e46236 --- /dev/null +++ b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010205_value_range/Sem_B010205_value_range_008.ttcn @@ -0,0 +1,75 @@ +/*************************************************** + ** @author STF 433 + ** @version 0.0.1 + ** @purpose 1:B.1.2.5, Ensure that the IUT correctly handles template matching of value range definitions + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +module Sem_B010205_value_range_008 { + + type enumerated EnumeratedType {e_black, e_white, e_green}; + + type record RecordType { + integer a optional, + integer b optional, + boolean c + } + + type union UnionType { + integer a, + EnumeratedType b, + boolean c + } + + type record MessageType { + integer field1, + charstring field2, + RecordType field3, + UnionType field4 + } + + type port loopbackPort message { + inout MessageType + } + + +type component GeneralComp { + port loopbackPort messagePort +} + +testcase TC_Sem_B010205_value_range_008() runs on GeneralComp { + + var MessageType v_testMessage; + + template MessageType mw_matchingTemplate:= + { + field1 := (!0..2), //value is out of range because of exclusive lower boundary + field2 := ("a".."f") length (3), + field3 := {a:=1,b:=(0..2),c:=true}, + field4 := {a:=(0..2)} + } + + v_testMessage:= { + field1 := 0, + field2 := "abc", + field3 := {a:=1,b:=2,c:=true}, + field4 := {a:=1} + } + + messagePort.send(v_testMessage); + + alt { + [] messagePort.receive(mw_matchingTemplate) { + setverdict(fail); + } + [] messagePort.receive { + setverdict(pass); + } + } +} + +control{ + execute(TC_Sem_B010205_value_range_008()); +} + +} diff --git a/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010206_superset/NegSem_B010206_superset_001.ttcn b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010206_superset/NegSem_B010206_superset_001.ttcn new file mode 100644 index 00000000..5dde62be --- /dev/null +++ b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010206_superset/NegSem_B010206_superset_001.ttcn @@ -0,0 +1,36 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:B.1.2.6, Ensure that the IUT correctly handles template matching of superset definitions + ** @verdict pass reject + ***************************************************/ + +module NegSem_B010206_superset_001 { + type record MessageType { + record of integer field1 // superset definition is only allowed over set of + } + + type port loopbackPort message { + inout MessageType; + } + + + type component GeneralComp { + port loopbackPort messagePort; + } + + testcase TC_NegSem_B010206_superset_001() runs on GeneralComp { + + var MessageType v_testMessage; + + template MessageType mw_matchingTemplate := {field1 := superset(1, 2)} + + v_testMessage := {field1 := {1, 3, 2}}; + + messagePort.send(v_testMessage); + setverdict(pass); + } + control { + execute(TC_NegSem_B010206_superset_001()); + } +} diff --git a/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010206_superset/NegSem_B010206_superset_002.ttcn b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010206_superset/NegSem_B010206_superset_002.ttcn new file mode 100644 index 00000000..a00b9777 --- /dev/null +++ b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010206_superset/NegSem_B010206_superset_002.ttcn @@ -0,0 +1,40 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:B.1.2.6, Ensure that the IUT correctly handles template matching of superset definitions + ** @verdict pass reject + ***************************************************/ + +module NegSem_B010206_superset_002 { + type set SetType { + integer a optional, integer b optional, integer c optional + } + + type record MessageType { + SetType field1 // superset definition is only allowed over set of + } + + type port loopbackPort message { + inout MessageType; + } + + + type component GeneralComp { + port loopbackPort messagePort; + } + + testcase TC_NegSem_B010206_superset_002() runs on GeneralComp { + + var MessageType v_testMessage; + + template MessageType mw_matchingTemplate := {field1 := superset(1, 2)} + + v_testMessage := {field1 := {1, 3, 2}}; + + messagePort.send(v_testMessage); + setverdict(pass); + } + control { + execute(TC_NegSem_B010206_superset_002()); + } +} diff --git a/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010206_superset/NegSem_B010206_superset_003.ttcn b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010206_superset/NegSem_B010206_superset_003.ttcn new file mode 100644 index 00000000..4b50b9f6 --- /dev/null +++ b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010206_superset/NegSem_B010206_superset_003.ttcn @@ -0,0 +1,45 @@ +/*************************************************** + ** @author STF 487 (updated by STF 521) + ** @version 0.0.2 + ** @purpose 1:B.1.2.6, Ensure that the IUT correctly handles template matching of superset definition + ** @verdict pass accept, ttcn3verdict:fail + ***************************************************/ + +module NegSem_B010206_superset_003 { + type set of integer SoI; + + type SoI MessageType; + + type port loopbackPort message { + inout MessageType; + } + + + type component GeneralComp { + port loopbackPort messagePort; + } + + testcase TC_NegSem_B010206_superset_003() runs on GeneralComp { + + var MessageType v_testMessage; + + template MessageType mw_matchingTemplate := superset(1,10,3); + + v_testMessage := {1}; + + messagePort.send(v_testMessage); + + alt { + [] messagePort.receive(mw_matchingTemplate) { // mismatch + setverdict(pass); + } + [] messagePort.receive { + setverdict(fail); + } + } + + } + control { + execute(TC_NegSem_B010206_superset_003()); + } +} diff --git a/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010206_superset/NegSem_B010206_superset_004.ttcn b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010206_superset/NegSem_B010206_superset_004.ttcn new file mode 100644 index 00000000..d256d4ae --- /dev/null +++ b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010206_superset/NegSem_B010206_superset_004.ttcn @@ -0,0 +1,45 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:B.1.2.6, Ensure that the IUT correctly handles template matching of superset definition + ** @verdict pass reject + ***************************************************/ + +module NegSem_B010206_superset_004 { + type set of integer SoI; + + type SoI MessageType; + + type port loopbackPort message { + inout MessageType; + } + + + type component GeneralComp { + port loopbackPort messagePort; + } + + testcase TC_NegSem_B010206_superset_004() runs on GeneralComp { + + var MessageType v_testMessage; + + template MessageType mw_matchingTemplate := superset(1,10,3) length (2..5); //error:minimal length allowed by the length attribute shall not be less than the number of the elements in the SuperSet + + v_testMessage := {1,11,5}; + + messagePort.send(v_testMessage); + + alt { + [] messagePort.receive(mw_matchingTemplate) { + setverdict(pass); + } + [] messagePort.receive { + setverdict(fail); + } + } + + } + control { + execute(TC_NegSem_B010206_superset_004()); + } +} diff --git a/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010206_superset/NegSem_B010206_superset_005.ttcn b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010206_superset/NegSem_B010206_superset_005.ttcn new file mode 100644 index 00000000..a2f6f9c1 --- /dev/null +++ b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010206_superset/NegSem_B010206_superset_005.ttcn @@ -0,0 +1,54 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:B.1.2.6, Ensure that the IUT correctly handles template matching of superset definition + ** @verdict pass reject + ***************************************************/ + +//Restriction e) +/*The individual members of the SuperSet's argument and the elements of the template in the all from clause +shall not be the matching mechanisms omit, SuperSet, SubSet and the matching attributes (length restriction +and ifpresent). In addition, the individual members shall not resolve to AnyValueOrNone and individual +elements of the template in the all from clause shall not resolve to AnyElementsOrNone or permutation.*/ + +module NegSem_B010206_superset_005 { + + type set of integer SoI; + type record of integer RoI; + + type port loopbackPort message { + inout SoI + } + + +type component GeneralComp { + port loopbackPort messagePort +} + +testcase TC_NegSem_B010206_superset_005() runs on GeneralComp { + + var SoI v_testMessage; + + template RoI Template:= {omit}; + + template SoI mw_matchingTemplate:= superset(all from Template); //error + + v_testMessage:={2}; + + messagePort.send(v_testMessage); + + alt { + [] messagePort.receive(mw_matchingTemplate) { + setverdict(pass); + } + [] messagePort.receive { + setverdict(fail); + } + } +} + +control{ + execute(TC_NegSem_B010206_superset_005()); +} + +} diff --git a/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010206_superset/NegSem_B010206_superset_006.ttcn b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010206_superset/NegSem_B010206_superset_006.ttcn new file mode 100644 index 00000000..3749d177 --- /dev/null +++ b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010206_superset/NegSem_B010206_superset_006.ttcn @@ -0,0 +1,53 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:B.1.2.6, Ensure that the IUT correctly handles template matching of subset definition + ** @verdict pass reject + ***************************************************/ + +//Restriction e) +/*The individual members of the SuperSet's argument and the elements of the template in the all from clause +shall not be the matching mechanisms omit, SuperSet, SubSet and the matching attributes (length restriction +and ifpresent). In addition, the individual members shall not resolve to AnyValueOrNone and individual +elements of the template in the all from clause shall not resolve to AnyElementsOrNone or permutation.*/ + +module NegSem_B010206_superset_006 { + + type set of integer SoI; + + type port loopbackPort message { + inout SoI + } + + +type component GeneralComp { + port loopbackPort messagePort +} + +testcase TC_NegSem_B010206_superset_006() runs on GeneralComp { + + var SoI v_testMessage; + + template SoI Template:= superset(1,2); + + template SoI mw_matchingTemplate:= subset(all from Template); //error + + v_testMessage:={2}; + + messagePort.send(v_testMessage); + + alt { + [] messagePort.receive(mw_matchingTemplate) { + setverdict(pass); + } + [] messagePort.receive { + setverdict(fail); + } + } +} + +control{ + execute(TC_NegSem_B010206_superset_006()); +} + +} diff --git a/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010206_superset/NegSem_B010206_superset_007.ttcn b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010206_superset/NegSem_B010206_superset_007.ttcn new file mode 100644 index 00000000..12c96b19 --- /dev/null +++ b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010206_superset/NegSem_B010206_superset_007.ttcn @@ -0,0 +1,53 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:B.1.2.6, Ensure that the IUT correctly handles template matching of superset definition + ** @verdict pass reject + ***************************************************/ + +//Restriction e) +/*The individual members of the SuperSet's argument and the elements of the template in the all from clause +shall not be the matching mechanisms omit, SuperSet, SubSet and the matching attributes (length restriction +and ifpresent). In addition, the individual members shall not resolve to AnyValueOrNone and individual +elements of the template in the all from clause shall not resolve to AnyElementsOrNone or permutation.*/ + +module NegSem_B010206_superset_007 { + + type set of integer SoI; + + type port loopbackPort message { + inout SoI + } + + +type component GeneralComp { + port loopbackPort messagePort +} + +testcase TC_NegSem_B010206_superset_007() runs on GeneralComp { + + var SoI v_testMessage; + + template SoI Template:= subset(1,2); + + template SoI mw_matchingTemplate:= superset(all from Template); //error + + v_testMessage:={2}; + + messagePort.send(v_testMessage); + + alt { + [] messagePort.receive(mw_matchingTemplate) { + setverdict(pass); + } + [] messagePort.receive { + setverdict(fail); + } + } +} + +control{ + execute(TC_NegSem_B010206_superset_007()); +} + +} diff --git a/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010206_superset/NegSem_B010206_superset_008.ttcn b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010206_superset/NegSem_B010206_superset_008.ttcn new file mode 100644 index 00000000..5c86517a --- /dev/null +++ b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010206_superset/NegSem_B010206_superset_008.ttcn @@ -0,0 +1,53 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:B.1.2.6, Ensure that the IUT correctly handles template matching of superset definitions + ** @verdict pass reject + ***************************************************/ + +//Restriction e) +/*The individual members of the SuperSet's argument and the elements of the template in the all from clause +shall not be the matching mechanisms omit, SuperSet, SubSet and the matching attributes (length restriction +and ifpresent). In addition, the individual members shall not resolve to AnyValueOrNone and individual +elements of the template in the all from clause shall not resolve to AnyElementsOrNone or permutation.*/ + +module NegSem_B010206_superset_008 { + + type set of integer SoI; + + type port loopbackPort message { + inout SoI + } + + +type component GeneralComp { + port loopbackPort messagePort +} + +testcase TC_NegSem_B010206_superset_008() runs on GeneralComp { + + var SoI v_testMessage; + + template SoI Template:= {*}; + + template SoI mw_matchingTemplate:= superset(all from Template); //error + + v_testMessage:={2}; + + messagePort.send(v_testMessage); + + alt { + [] messagePort.receive(mw_matchingTemplate) { + setverdict(pass); + } + [] messagePort.receive { + setverdict(fail); + } + } +} + +control{ + execute(TC_NegSem_B010206_superset_008()); +} + +} diff --git a/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010206_superset/NegSem_B010206_superset_009.ttcn b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010206_superset/NegSem_B010206_superset_009.ttcn new file mode 100644 index 00000000..1b4d4435 --- /dev/null +++ b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010206_superset/NegSem_B010206_superset_009.ttcn @@ -0,0 +1,53 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:B.1.2.6, Ensure that the IUT correctly handles template matching of superset definition + ** @verdict pass reject + ***************************************************/ + +//Restriction e) +/*The individual members of the SuperSet's argument and the elements of the template in the all from clause +shall not be the matching mechanisms omit, SuperSet, SubSet and the matching attributes (length restriction +and ifpresent). In addition, the individual members shall not resolve to AnyValueOrNone and individual +elements of the template in the all from clause shall not resolve to AnyElementsOrNone or permutation.*/ + +module NegSem_B010206_superset_009 { + type record of integer RoI; + type set of integer SoI; + + type port loopbackPort message { + inout SoI + } + + +type component GeneralComp { + port loopbackPort messagePort +} + +testcase TC_NegSem_B010206_superset_009() runs on GeneralComp { + + var SoI v_testMessage; + + template RoI Template:= {permutation(1,2,3)}; + + template SoI mw_matchingTemplate:= superset(all from Template); //error + + v_testMessage:={2}; + + messagePort.send(v_testMessage); + + alt { + [] messagePort.receive(mw_matchingTemplate) { + setverdict(pass); + } + [] messagePort.receive { + setverdict(fail); + } + } +} + +control{ + execute(TC_NegSem_B010206_superset_009()); +} + +} diff --git a/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010206_superset/Sem_B010206_superset_001.ttcn b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010206_superset/Sem_B010206_superset_001.ttcn new file mode 100644 index 00000000..fb93e0ae --- /dev/null +++ b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010206_superset/Sem_B010206_superset_001.ttcn @@ -0,0 +1,53 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:B.1.2.6, Ensure that the IUT correctly handles template matching of superset definitions + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +module Sem_B010206_superset_001 { + + + type record MessageType { + set of integer field1 + } + + type port loopbackPort message { + inout MessageType + } + + +type component GeneralComp { + port loopbackPort messagePort +} + +testcase TC_Sem_B010206_superset_001() runs on GeneralComp { + + var MessageType v_testMessage; + + template MessageType mw_matchingTemplate:= + { + field1 := superset(1,2) + } + + v_testMessage:= { + field1 := {1,3,2} + } + + messagePort.send(v_testMessage); + + alt { + [] messagePort.receive(mw_matchingTemplate) { + setverdict(pass); + } + [] messagePort.receive { + setverdict(fail); + } + } +} + +control{ + execute(TC_Sem_B010206_superset_001()); +} + +} diff --git a/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010206_superset/Sem_B010206_superset_002.ttcn b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010206_superset/Sem_B010206_superset_002.ttcn new file mode 100644 index 00000000..678f9c6d --- /dev/null +++ b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010206_superset/Sem_B010206_superset_002.ttcn @@ -0,0 +1,53 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:B.1.2.6, Ensure that the IUT correctly handles template matching of superset definitions + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +module Sem_B010206_superset_002 { + + + type record MessageType { + set of integer field1 + } + + type port loopbackPort message { + inout MessageType + } + + +type component GeneralComp { + port loopbackPort messagePort +} + +testcase TC_Sem_B010206_superset_002() runs on GeneralComp { + + var MessageType v_testMessage; + + template MessageType mw_matchingTemplate:= + { + field1 := superset(1,2) //no match for element 2 + } + + v_testMessage:= { + field1 := {1,3,4} + } + + messagePort.send(v_testMessage); + + alt { + [] messagePort.receive(mw_matchingTemplate) { + setverdict(fail); + } + [] messagePort.receive { + setverdict(pass); + } + } +} + +control{ + execute(TC_Sem_B010206_superset_002()); +} + +} diff --git a/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010206_superset/Sem_B010206_superset_003.ttcn b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010206_superset/Sem_B010206_superset_003.ttcn new file mode 100644 index 00000000..e7efe36c --- /dev/null +++ b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010206_superset/Sem_B010206_superset_003.ttcn @@ -0,0 +1,53 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:B.1.2.6, Ensure that the IUT correctly handles template matching of superset definitions + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +module Sem_B010206_superset_003 { + + + type record MessageType { + set of integer field1 + } + + type port loopbackPort message { + inout MessageType + } + + +type component GeneralComp { + port loopbackPort messagePort +} + +testcase TC_Sem_B010206_superset_003() runs on GeneralComp { + + var MessageType v_testMessage; + + template MessageType mw_matchingTemplate:= + { + field1 := superset(1,2) //no match for element 2 + } + + v_testMessage:= { + field1 := {1,1} + } + + messagePort.send(v_testMessage); + + alt { + [] messagePort.receive(mw_matchingTemplate) { + setverdict(fail); + } + [] messagePort.receive { + setverdict(pass); + } + } +} + +control{ + execute(TC_Sem_B010206_superset_003()); +} + +} diff --git a/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010206_superset/Sem_B010206_superset_004.ttcn b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010206_superset/Sem_B010206_superset_004.ttcn new file mode 100644 index 00000000..d03b9523 --- /dev/null +++ b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010206_superset/Sem_B010206_superset_004.ttcn @@ -0,0 +1,51 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:B.1.2.6, Ensure that the IUT correctly handles template matching of superset definitions + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + + //Restriction c) +/*The member type of the set of associated with the SuperSet template and the member type of the template in +the all from clause shall be compatible.*/ + +module Sem_B010206_superset_004 { + + type set of integer SoI; + + type port loopbackPort message { + inout SoI + } + + +type component GeneralComp { + port loopbackPort messagePort +} + +testcase TC_Sem_B010206_superset_004() runs on GeneralComp { + + var SoI v_testMessage; + + template SoI Template:= {1,2}; + template SoI mw_matchingTemplate:= superset(all from Template); + + + v_testMessage:={1,2}; + + messagePort.send(v_testMessage); + + alt { + [] messagePort.receive(mw_matchingTemplate) { + setverdict(pass); + } + [] messagePort.receive { + setverdict(fail); + } + } +} + +control{ + execute(TC_Sem_B010206_superset_004()); +} + +} diff --git a/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010206_superset/Sem_B010206_superset_005.ttcn b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010206_superset/Sem_B010206_superset_005.ttcn new file mode 100644 index 00000000..d36fb29a --- /dev/null +++ b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010206_superset/Sem_B010206_superset_005.ttcn @@ -0,0 +1,53 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:B.1.2.6, Ensure that the IUT correctly handles template matching of superset definition + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + + //Restriction e) +/*The individual members of the SuperSet's argument and the elements of the template in the all from clause +shall not be the matching mechanisms omit, SuperSet, SubSet and the matching attributes (length restriction +and ifpresent). In addition, the individual members shall not resolve to AnyValueOrNone and individual +elements of the template in the all from clause shall not resolve to AnyElementsOrNone or permutation.*/ + +module Sem_B010206_superset_005 { + + type set of integer SoI; + template SoI Template:= {1,2} length(1..10); + + type port loopbackPort message { + inout SoI + } + + +type component GeneralComp { + port loopbackPort messagePort +} + +testcase TC_Sem_B010206_superset_005() runs on GeneralComp { + + var SoI v_testMessage; + + template SoI mw_matchingTemplate:= superset(all from Template); + + + v_testMessage:={1,2}; + + messagePort.send(v_testMessage); + + alt { + [] messagePort.receive(mw_matchingTemplate) { + setverdict(pass); + } + [] messagePort.receive { + setverdict(fail); + } + } +} + +control{ + execute(TC_Sem_B010206_superset_005()); +} + +} diff --git a/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010206_superset/Sem_B010206_superset_006.ttcn b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010206_superset/Sem_B010206_superset_006.ttcn new file mode 100644 index 00000000..9a699154 --- /dev/null +++ b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010206_superset/Sem_B010206_superset_006.ttcn @@ -0,0 +1,54 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:B.1.2.6, Ensure that the IUT correctly handles template matching of superset definition + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + + //Restriction e) +/*The individual members of the SuperSet's argument and the elements of the template in the all from clause +shall not be the matching mechanisms omit, SuperSet, SubSet and the matching attributes (length restriction +and ifpresent). In addition, the individual members shall not resolve to AnyValueOrNone and individual +elements of the template in the all from clause shall not resolve to AnyElementsOrNone or permutation.*/ + +module Sem_B010206_superset_006 { + + type set of integer SoI; + template SoI Template:= {1,2} ifpresent; + + type port loopbackPort message { + inout SoI + } + + +type component GeneralComp { + port loopbackPort messagePort +} + +testcase TC_Sem_B010206_superset_006() runs on GeneralComp { + + var SoI v_testMessage; + + + template SoI mw_matchingTemplate:= superset(all from Template); + + + v_testMessage:={1,2}; + + messagePort.send(v_testMessage); + + alt { + [] messagePort.receive(mw_matchingTemplate) { + setverdict(pass); + } + [] messagePort.receive { + setverdict(fail); + } + } +} + +control{ + execute(TC_Sem_B010206_superset_006()); +} + +} diff --git a/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010206_superset/Sem_B010206_superset_007.ttcn b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010206_superset/Sem_B010206_superset_007.ttcn new file mode 100644 index 00000000..cd5a17ab --- /dev/null +++ b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010206_superset/Sem_B010206_superset_007.ttcn @@ -0,0 +1,53 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:B.1.2.6, Ensure that the IUT correctly handles template matching of superset definitions + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + + //Restriction e) +/*The individual members of the SuperSet's argument and the elements of the template in the all from clause +shall not be the matching mechanisms omit, SuperSet, SubSet and the matching attributes (length restriction +and ifpresent). In addition, the individual members shall not resolve to AnyValueOrNone and individual +elements of the template in the all from clause shall not resolve to AnyElementsOrNone or permutation.*/ + +module Sem_B010206_superset_007 { + + type set of integer SoI; + + type port loopbackPort message { + inout SoI + } + + +type component GeneralComp { + port loopbackPort messagePort +} + +testcase TC_Sem_B010206_superset_007() runs on GeneralComp { + + var SoI v_testMessage; + + template SoI Template:= {1,?}; + template SoI mw_matchingTemplate:= superset(all from Template); + + + v_testMessage:={1,2}; + + messagePort.send(v_testMessage); + + alt { + [] messagePort.receive(mw_matchingTemplate) { + setverdict(pass); + } + [] messagePort.receive { + setverdict(fail); + } + } +} + +control{ + execute(TC_Sem_B010206_superset_007()); +} + +} diff --git a/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010206_superset/Sem_B010206_superset_008.ttcn b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010206_superset/Sem_B010206_superset_008.ttcn new file mode 100644 index 00000000..0a653521 --- /dev/null +++ b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010206_superset/Sem_B010206_superset_008.ttcn @@ -0,0 +1,52 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:B.1.2.6, Ensure that the IUT correctly handles template matching of superset definition + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + + //Restriction c) +/*The member type of the set of associated with the SuperSet template and the member type of the template in +the all from clause shall be compatible.*/ + +module Sem_B010206_superset_008 { + + type set of integer SoI; + type record of integer RoI; + + type port loopbackPort message { + inout SoI + } + + +type component GeneralComp { + port loopbackPort messagePort +} + +testcase TC_Sem_B010206_superset_008() runs on GeneralComp { + + var SoI v_testMessage; + + template RoI Template:= {1,2}; + template SoI mw_matchingTemplate:= superset(all from Template); //Template is a record of integers + + + v_testMessage:={1,2}; + + messagePort.send(v_testMessage); + + alt { + [] messagePort.receive(mw_matchingTemplate) { + setverdict(pass); + } + [] messagePort.receive { + setverdict(fail); + } + } +} + +control{ + execute(TC_Sem_B010206_superset_008()); +} + +} diff --git a/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010207_subset/NegSem_B010207_subset_001.ttcn b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010207_subset/NegSem_B010207_subset_001.ttcn new file mode 100644 index 00000000..55bb2534 --- /dev/null +++ b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010207_subset/NegSem_B010207_subset_001.ttcn @@ -0,0 +1,36 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:B.1.2.7, Ensure that the IUT correctly handles template matching of superset definitions + ** @verdict pass reject + ***************************************************/ +module NegSem_B010207_subset_001 { + type record MessageType { + record of integer + field1 // subset definition is only allowed over set of + } + + type port loopbackPort message { + inout MessageType; + } + + + type component GeneralComp { + port loopbackPort messagePort; + } + + testcase TC_NegSem_B010207_subset_001() runs on GeneralComp { + + var MessageType v_testMessage; + + template MessageType mw_matchingTemplate := {field1 := subset(1, 2)} + + v_testMessage := {field1 := {1}}; + + messagePort.send(v_testMessage); + setverdict(pass); + } + control { + execute(TC_NegSem_B010207_subset_001()); + } +} diff --git a/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010207_subset/NegSem_B010207_subset_002.ttcn b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010207_subset/NegSem_B010207_subset_002.ttcn new file mode 100644 index 00000000..ef870f0f --- /dev/null +++ b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010207_subset/NegSem_B010207_subset_002.ttcn @@ -0,0 +1,50 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:B.1.2.7, Ensure that the IUT correctly handles template matching of superset definitions + ** @verdict pass reject + ***************************************************/ + +module NegSem_B010207_subset_002 { + + type set SetType { + integer a optional, + integer b optional, + integer c optional + } + + type record MessageType { + SetType field1 //subset definition is only allowed over set of + } + + type port loopbackPort message { + inout MessageType + } + + +type component GeneralComp { + port loopbackPort messagePort +} + +testcase TC_NegSem_B010207_subset_002() runs on GeneralComp { + + var MessageType v_testMessage; + + template MessageType mw_matchingTemplate:= + { + field1 := subset(1,2) + } + + v_testMessage:= { + field1 := {1} + } + + messagePort.send(v_testMessage); + +} + +control{ + execute(TC_NegSem_B010207_subset_002()); +} + +} diff --git a/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010207_subset/NegSem_B010207_subset_003.ttcn b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010207_subset/NegSem_B010207_subset_003.ttcn new file mode 100644 index 00000000..987e4dd0 --- /dev/null +++ b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010207_subset/NegSem_B010207_subset_003.ttcn @@ -0,0 +1,49 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:B.1.2.6, Ensure that the IUT correctly handles template matching of subset definitions + ** @verdict pass reject + ***************************************************/ + +//Restriction f:If the length matching attribute is attached to the SubSet, the maximum length allowed by the length attribute +//shall not exceed the number of the elements in the SubSet. + +module NegSem_B010207_subset_003{ + type set of integer SoI; + + type SoI MessageType; + + type port loopbackPort message { + inout MessageType; + } + + + type component GeneralComp { + port loopbackPort messagePort; + } + + testcase TC_NegSem_B010207_subset_003() runs on GeneralComp { + + var MessageType v_testMessage; + + template MessageType mw_matchingTemplate := subset(1,10,3) length (1..5); //error:the upper bound of length attribute contradicts to the maximum number of + // elements imposed by the subset argument + + v_testMessage := {1,10,3}; + + messagePort.send(v_testMessage); + + alt { + [] messagePort.receive(mw_matchingTemplate) { + setverdict(pass); + } + [] messagePort.receive { + setverdict(fail); + } + } + + } + control { + execute(TC_NegSem_B010207_subset_003()); + } +} diff --git a/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010207_subset/NegSem_B010207_subset_004.ttcn b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010207_subset/NegSem_B010207_subset_004.ttcn new file mode 100644 index 00000000..360dcaeb --- /dev/null +++ b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010207_subset/NegSem_B010207_subset_004.ttcn @@ -0,0 +1,53 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:B.1.2.6, Ensure that the IUT correctly handles template matching of subset definitions + ** @verdict pass reject + ***************************************************/ + +//Restriction e) +/*The individual members of the SubSet's argument and the elements of the template in the all from clause +shall not be the matching mechanisms omit, SuperSet, SubSet and the matching attributes (length restriction +and ifpresent). In addition, individual members shall not resolve to AnyValueOrNone and individual fields of +the template in the all from clause shall not resolve to AnyElementsOrNone or permutation.*/ + +module NegSem_B010207_subset_004 { + + type set of integer SoI; + + type port loopbackPort message { + inout SoI + } + + +type component GeneralComp { + port loopbackPort messagePort +} + +testcase TC_NegSem_B010207_subset_004() runs on GeneralComp { + + var SoI v_testMessage; + + template SoI Template:= {omit}; + + template SoI mw_matchingTemplate:= subset(all from Template); //error: Compulsory item cannot be omitted. + + v_testMessage:={2}; + + messagePort.send(v_testMessage); + + alt { + [] messagePort.receive(mw_matchingTemplate) { + setverdict(pass); + } + [] messagePort.receive { + setverdict(fail); + } + } +} + +control{ + execute(TC_NegSem_B010207_subset_004()); +} + +} diff --git a/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010207_subset/NegSem_B010207_subset_005.ttcn b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010207_subset/NegSem_B010207_subset_005.ttcn new file mode 100644 index 00000000..82f722fe --- /dev/null +++ b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010207_subset/NegSem_B010207_subset_005.ttcn @@ -0,0 +1,53 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:B.1.2.6, Ensure that the IUT correctly handles template matching of subset definitions + ** @verdict pass reject + ***************************************************/ + +//Restriction e) +/*The individual members of the SubSet's argument and the elements of the template in the all from clause +shall not be the matching mechanisms omit, SuperSet, SubSet and the matching attributes (length restriction +and ifpresent). In addition, individual members shall not resolve to AnyValueOrNone and individual fields of +the template in the all from clause shall not resolve to AnyElementsOrNone or permutation.*/ + +module NegSem_B010207_subset_005 { + + type set of integer SoI; + + type port loopbackPort message { + inout SoI + } + + +type component GeneralComp { + port loopbackPort messagePort +} + +testcase TC_NegSem_B010207_subset_005() runs on GeneralComp { + + var SoI v_testMessage; + + template SoI Template:= superset(3,4); + + template SoI mw_matchingTemplate:= subset(all from Template); //error: The "all from" clause contains a matching mechanism. + + v_testMessage:={2}; + + messagePort.send(v_testMessage); + + alt { + [] messagePort.receive(mw_matchingTemplate) { + setverdict(pass); + } + [] messagePort.receive { + setverdict(fail); + } + } +} + +control{ + execute(TC_NegSem_B010207_subset_005()); +} + +} diff --git a/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010207_subset/NegSem_B010207_subset_006.ttcn b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010207_subset/NegSem_B010207_subset_006.ttcn new file mode 100644 index 00000000..28b4231f --- /dev/null +++ b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010207_subset/NegSem_B010207_subset_006.ttcn @@ -0,0 +1,53 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:B.1.2.6, Ensure that the IUT correctly handles template matching of subset definitions + ** @verdict pass reject + ***************************************************/ + +//Restriction e) +/*The individual members of the SubSet's argument and the elements of the template in the all from clause +shall not be the matching mechanisms omit, SuperSet, SubSet and the matching attributes (length restriction +and ifpresent). In addition, individual members shall not resolve to AnyValueOrNone and individual fields of +the template in the all from clause shall not resolve to AnyElementsOrNone or permutation.*/ + +module NegSem_B010207_subset_006 { + + type set of integer SoI; + + type port loopbackPort message { + inout SoI + } + + +type component GeneralComp { + port loopbackPort messagePort +} + +testcase TC_NegSem_B010207_subset_006() runs on GeneralComp { + + var SoI v_testMessage; + + template SoI Template:= subset(3,4); + + template SoI mw_matchingTemplate:= subset(all from Template); //error: The "all from" clause contains a matching mechanism. + + v_testMessage:={2}; + + messagePort.send(v_testMessage); + + alt { + [] messagePort.receive(mw_matchingTemplate) { + setverdict(pass); + } + [] messagePort.receive { + setverdict(fail); + } + } +} + +control{ + execute(TC_NegSem_B010207_subset_006()); +} + +} diff --git a/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010207_subset/NegSem_B010207_subset_007.ttcn b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010207_subset/NegSem_B010207_subset_007.ttcn new file mode 100644 index 00000000..0da038e5 --- /dev/null +++ b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010207_subset/NegSem_B010207_subset_007.ttcn @@ -0,0 +1,53 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:B.1.2.6, Ensure that the IUT correctly handles template matching of subset definitions + ** @verdict pass reject + ***************************************************/ + +//Restriction e) +/*The individual members of the SubSet's argument and the elements of the template in the all from clause +shall not be the matching mechanisms omit, SuperSet, SubSet and the matching attributes (length restriction +and ifpresent). In addition, individual members shall not resolve to AnyValueOrNone and individual fields of +the template in the all from clause shall not resolve to AnyElementsOrNone or permutation.*/ + +module NegSem_B010207_subset_007 { + + type set of integer SoI; + + type port loopbackPort message { + inout SoI + } + + +type component GeneralComp { + port loopbackPort messagePort +} + +testcase TC_NegSem_B010207_subset_007() runs on GeneralComp { + + var SoI v_testMessage; + + template SoI Template:= {*}; + + template SoI mw_matchingTemplate:= subset(all from Template); //error: forbidden matching mechanism. + + v_testMessage:={2}; + + messagePort.send(v_testMessage); + + alt { + [] messagePort.receive(mw_matchingTemplate) { + setverdict(pass); + } + [] messagePort.receive { + setverdict(fail); + } + } +} + +control{ + execute(TC_NegSem_B010207_subset_007()); +} + +} diff --git a/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010207_subset/NegSem_B010207_subset_008.ttcn b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010207_subset/NegSem_B010207_subset_008.ttcn new file mode 100644 index 00000000..ca7fcb9d --- /dev/null +++ b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010207_subset/NegSem_B010207_subset_008.ttcn @@ -0,0 +1,54 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:B.1.2.6, Ensure that the IUT correctly handles template matching of subset definitions + ** @verdict pass reject + ***************************************************/ + +//Restriction e) +/*The individual members of the SubSet's argument and the elements of the template in the all from clause +shall not be the matching mechanisms omit, SuperSet, SubSet and the matching attributes (length restriction +and ifpresent). In addition, individual members shall not resolve to AnyValueOrNone and individual fields of +the template in the all from clause shall not resolve to AnyElementsOrNone or permutation.*/ + +module NegSem_B010207_subset_008 { + + type set of integer SoI; + type record of integer RoI; + + type port loopbackPort message { + inout SoI + } + + +type component GeneralComp { + port loopbackPort messagePort +} + +testcase TC_NegSem_B010207_subset_008() runs on GeneralComp { + + var SoI v_testMessage; + + template RoI Template:= {permutation(1,2,4)}; + + template SoI mw_matchingTemplate:= subset(all from Template); //error: forbidden matching mechanism. + + v_testMessage:={2}; + + messagePort.send(v_testMessage); + + alt { + [] messagePort.receive(mw_matchingTemplate) { + setverdict(pass); + } + [] messagePort.receive { + setverdict(fail); + } + } +} + +control{ + execute(TC_NegSem_B010207_subset_008()); +} + +} diff --git a/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010207_subset/Sem_B010207_subset_001.ttcn b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010207_subset/Sem_B010207_subset_001.ttcn new file mode 100644 index 00000000..c9bc079e --- /dev/null +++ b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010207_subset/Sem_B010207_subset_001.ttcn @@ -0,0 +1,53 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:B.1.2.7, Ensure that the IUT correctly handles template matching of superset definitions + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +module Sem_B010207_subset_001 { + + + type record MessageType { + set of integer field1 + } + + type port loopbackPort message { + inout MessageType + } + + +type component GeneralComp { + port loopbackPort messagePort +} + +testcase TC_Sem_B010207_subset_001() runs on GeneralComp { + + var MessageType v_testMessage; + + template MessageType mw_matchingTemplate:= + { + field1 := subset(1,2) + } + + v_testMessage:= { + field1 := {2} + } + + messagePort.send(v_testMessage); + + alt { + [] messagePort.receive(mw_matchingTemplate) { + setverdict(pass); + } + [] messagePort.receive { + setverdict(fail); + } + } +} + +control{ + execute(TC_Sem_B010207_subset_001()); +} + +} diff --git a/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010207_subset/Sem_B010207_subset_002.ttcn b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010207_subset/Sem_B010207_subset_002.ttcn new file mode 100644 index 00000000..6caa1b83 --- /dev/null +++ b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010207_subset/Sem_B010207_subset_002.ttcn @@ -0,0 +1,53 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:B.1.2.7, Ensure that the IUT correctly handles template matching of superset definitions + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +module Sem_B010207_subset_002 { + + + type record MessageType { + set of integer field1 + } + + type port loopbackPort message { + inout MessageType + } + + +type component GeneralComp { + port loopbackPort messagePort +} + +testcase TC_Sem_B010207_subset_002() runs on GeneralComp { + + var MessageType v_testMessage; + + template MessageType mw_matchingTemplate:= + { + field1 := subset(1,2) //no match for subset elements + } + + v_testMessage:= { + field1 := {3} + } + + messagePort.send(v_testMessage); + + alt { + [] messagePort.receive(mw_matchingTemplate) { + setverdict(fail); + } + [] messagePort.receive { + setverdict(pass); + } + } +} + +control{ + execute(TC_Sem_B010207_subset_002()); +} + +} diff --git a/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010207_subset/Sem_B010207_subset_003.ttcn b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010207_subset/Sem_B010207_subset_003.ttcn new file mode 100644 index 00000000..ff69f331 --- /dev/null +++ b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010207_subset/Sem_B010207_subset_003.ttcn @@ -0,0 +1,53 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:B.1.2.7, Ensure that the IUT correctly handles template matching of superset definitions + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +module Sem_B010207_subset_003 { + + + type record MessageType { + set of integer field1 + } + + type port loopbackPort message { + inout MessageType + } + + +type component GeneralComp { + port loopbackPort messagePort +} + +testcase TC_Sem_B010207_subset_003() runs on GeneralComp { + + var MessageType v_testMessage; + + template MessageType mw_matchingTemplate:= + { + field1 := subset(1,2) //more elements than subset list + } + + v_testMessage:= { + field1 := {1,2,3} + } + + messagePort.send(v_testMessage); + + alt { + [] messagePort.receive(mw_matchingTemplate) { + setverdict(fail); + } + [] messagePort.receive { + setverdict(pass); + } + } +} + +control{ + execute(TC_Sem_B010207_subset_003()); +} + +} diff --git a/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010207_subset/Sem_B010207_subset_004.ttcn b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010207_subset/Sem_B010207_subset_004.ttcn new file mode 100644 index 00000000..a337ef79 --- /dev/null +++ b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010207_subset/Sem_B010207_subset_004.ttcn @@ -0,0 +1,49 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:B.1.2.7, Ensure that the IUT correctly handles template matching of subset definition + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +//Restriction c) The member type of the set of type associated with the SubSet and the member type of the template in the all from clause shall be compatible. + +module Sem_B010207_subset_004 { + + type set of integer SoI; + + type port loopbackPort message { + inout SoI + } + + +type component GeneralComp { + port loopbackPort messagePort +} + +testcase TC_Sem_B010207_subset_004() runs on GeneralComp { + + var SoI v_testMessage; + + template SoI Template:= {1,2}; + + template SoI mw_matchingTemplate:= subset(all from Template); //subset(1,2); + + v_testMessage:={2}; + + messagePort.send(v_testMessage); + + alt { + [] messagePort.receive(mw_matchingTemplate) { + setverdict(pass); + } + [] messagePort.receive { + setverdict(fail); + } + } +} + +control{ + execute(TC_Sem_B010207_subset_004()); +} + +} diff --git a/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010207_subset/Sem_B010207_subset_005.ttcn b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010207_subset/Sem_B010207_subset_005.ttcn new file mode 100644 index 00000000..65407e51 --- /dev/null +++ b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010207_subset/Sem_B010207_subset_005.ttcn @@ -0,0 +1,52 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:B.1.2.7, Ensure that the IUT correctly handles template matching of subset definition + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +//Restriction e) +/*The individual members of the SubSet's argument and the elements of the template in the all from clause +shall not be the matching mechanisms length restriction and ifpresent).*/ + +module Sem_B010207_subset_005 { + + type set of integer SoI; + template SoI Template:= {1,2} length(1..5); + + type port loopbackPort message { + inout SoI + } + + +type component GeneralComp { + port loopbackPort messagePort +} + +testcase TC_Sem_B010207_subset_005() runs on GeneralComp { + + var SoI v_testMessage; + + + + template SoI mw_matchingTemplate:= subset(all from Template); //subset(1,2); + + v_testMessage:={2}; + + messagePort.send(v_testMessage); + + alt { + [] messagePort.receive(mw_matchingTemplate) { + setverdict(pass); + } + [] messagePort.receive { + setverdict(fail); + } + } +} + +control{ + execute(TC_Sem_B010207_subset_005()); +} + +} diff --git a/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010207_subset/Sem_B010207_subset_006.ttcn b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010207_subset/Sem_B010207_subset_006.ttcn new file mode 100644 index 00000000..cfd15289 --- /dev/null +++ b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010207_subset/Sem_B010207_subset_006.ttcn @@ -0,0 +1,53 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:B.1.2.7, Ensure that the IUT correctly handles template matching of subset definition + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +//Restriction e) +/*The individual members of the SubSet's argument and the elements of the template in the all from clause +shall not be the matching mechanisms length restriction and ifpresent).*/ + +module Sem_B010207_subset_006 { + + type set of integer SoI; + + template SoI Template:= {1,2} ifpresent; + + type port loopbackPort message { + inout SoI + } + + +type component GeneralComp { + port loopbackPort messagePort +} + +testcase TC_Sem_B010207_subset_006() runs on GeneralComp { + + var SoI v_testMessage; + + + + template SoI mw_matchingTemplate:= subset(all from Template); //subset(1,2); + + v_testMessage:={2}; + + messagePort.send(v_testMessage); + + alt { + [] messagePort.receive(mw_matchingTemplate) { + setverdict(pass); + } + [] messagePort.receive { + setverdict(fail); + } + } +} + +control{ + execute(TC_Sem_B010207_subset_006()); +} + +} diff --git a/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010207_subset/Sem_B010207_subset_007.ttcn b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010207_subset/Sem_B010207_subset_007.ttcn new file mode 100644 index 00000000..2c464760 --- /dev/null +++ b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010207_subset/Sem_B010207_subset_007.ttcn @@ -0,0 +1,50 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:B.1.2.7, Ensure that the IUT correctly handles template matching of subset definition + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +//Restriction e) +/*individual members shall not resolve to AnyValueOrNone and individual fields of the template in the all from clause shall not resolve to AnyElementsOrNone or permutation..*/ + +module Sem_B010207_subset_007 { + + type set of integer SoI; + + type port loopbackPort message { + inout SoI + } + + +type component GeneralComp { + port loopbackPort messagePort +} + +testcase TC_Sem_B010207_subset_007() runs on GeneralComp { + + var SoI v_testMessage; + + template SoI Template:= {1,?}; + + template SoI mw_matchingTemplate:= subset(all from Template); + + v_testMessage:={2}; + + messagePort.send(v_testMessage); + + alt { + [] messagePort.receive(mw_matchingTemplate) { + setverdict(pass); + } + [] messagePort.receive { + setverdict(fail); + } + } +} + +control{ + execute(TC_Sem_B010207_subset_007()); +} + +} diff --git a/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010207_subset/Sem_B010207_subset_008.ttcn b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010207_subset/Sem_B010207_subset_008.ttcn new file mode 100644 index 00000000..1ce232f4 --- /dev/null +++ b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010207_subset/Sem_B010207_subset_008.ttcn @@ -0,0 +1,50 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:B.1.2.7, Ensure that the IUT correctly handles template matching of subset definition + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +//Restriction c) + +module Sem_B010207_subset_008 { + + type set of integer SoI; + type record of integer RoI; + + type port loopbackPort message { + inout SoI + } + + +type component GeneralComp { + port loopbackPort messagePort +} + +testcase TC_Sem_B010207_subset_008() runs on GeneralComp { + + var SoI v_testMessage; + + template RoI Template:= {1,?}; + + template SoI mw_matchingTemplate:= subset(all from Template); //Template is a record of integers + + v_testMessage:={2}; + + messagePort.send(v_testMessage); + + alt { + [] messagePort.receive(mw_matchingTemplate) { + setverdict(pass); + } + [] messagePort.receive { + setverdict(fail); + } + } +} + +control{ + execute(TC_Sem_B010207_subset_008()); +} + +} diff --git a/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010208_omit_value/NegSem_B010208_omit_value_001.ttcn b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010208_omit_value/NegSem_B010208_omit_value_001.ttcn new file mode 100644 index 00000000..53e8cacd --- /dev/null +++ b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010208_omit_value/NegSem_B010208_omit_value_001.ttcn @@ -0,0 +1,82 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:B.1.2.8, Ensure that the IUT correctly handles template matching of omit values + ** @verdict pass reject + ***************************************************/ + +module NegSem_B010208_omit_value_001 { + + type enumerated EnumeratedType {e_black, e_white, e_green}; + + type record RecordType { + integer a optional, + integer b optional, + boolean c + } + + type union UnionType { + integer a, + EnumeratedType b, + boolean c + } + + type record MessageType { + integer field1, + charstring field2 optional, + EnumeratedType field3 optional, + RecordType field4 optional, + UnionType field5 optional, + RecordType field6 optional, + UnionType field7 optional + } + + type port loopbackPort message { + inout MessageType + } + + +type component GeneralComp { + port loopbackPort messagePort +} + +testcase TC_NegSem_B010208_omit_value_001() runs on GeneralComp { + + template MessageType mw_matchingTemplate:= + { + field1 := omit,// causes an error as field1 is mandatory + field2 := *, + field3 := *, + field4 := *, + field5 := *, + field6 := *, + field7 := * + } + + var MessageType v_testMessage:= { + field1 := 2, + field2 := omit, + field3 := omit, + field4 := omit, + field5 := omit, + field6 := omit, + field7 := omit + } + + messagePort.send(v_testMessage); + + alt { + [] messagePort.receive(mw_matchingTemplate) { + setverdict(pass); + } + [] messagePort.receive { + setverdict(fail); + } + } +} + +control{ + execute(TC_NegSem_B010208_omit_value_001()); +} + +} diff --git a/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010208_omit_value/NegSem_B010208_omit_value_002.ttcn b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010208_omit_value/NegSem_B010208_omit_value_002.ttcn new file mode 100644 index 00000000..5539e835 --- /dev/null +++ b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010208_omit_value/NegSem_B010208_omit_value_002.ttcn @@ -0,0 +1,82 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:B.1.2.8, Ensure that the IUT correctly handles template matching of omit values + ** @verdict pass reject + ***************************************************/ + +module NegSem_B010208_omit_value_002 { + + type enumerated EnumeratedType {e_black, e_white, e_green}; + + type record RecordType { + integer a optional, + integer b optional, + boolean c + } + + type union UnionType { + integer a, + EnumeratedType b, + boolean c + } + + type record MessageType { + integer field1, + charstring field2 optional, + EnumeratedType field3 optional, + RecordType field4 optional, + UnionType field5 optional, + RecordType field6 optional, + UnionType field7 optional + } + + type port loopbackPort message { + inout MessageType + } + + +type component GeneralComp { + port loopbackPort messagePort +} + +testcase TC_NegSem_B010208_omit_value_002() runs on GeneralComp { + + template MessageType mw_matchingTemplate:= + { + field1 := ?, + field2 := *, + field3 := *, + field4 := *, + field5 := *, + field6 := {a:=1,b:=2,c:=omit},// causes an error as c field is mandatory + field7 := * + } + + var MessageType v_testMessage:= { + field1 := 2, + field2 := "test string", + field3 := e_black, + field4 := {a:=1,b:=omit,c:=true}, + field5 := {a:=1}, + field6 := {a:=1,b:=2,c:=true}, + field7 := {a:=1} + } + + messagePort.send(v_testMessage); + + alt { + [] messagePort.receive(mw_matchingTemplate) { + setverdict(pass); + } + [] messagePort.receive { + setverdict(fail); + } + } +} + +control{ + execute(TC_NegSem_B010208_omit_value_002()); +} + +} diff --git a/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010208_omit_value/NegSyn_B010208_omit_value_001.ttcn b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010208_omit_value/NegSyn_B010208_omit_value_001.ttcn new file mode 100644 index 00000000..7734373d --- /dev/null +++ b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010208_omit_value/NegSyn_B010208_omit_value_001.ttcn @@ -0,0 +1,19 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:B.1.2.8, Ensure that the IUT correctly handles template matching of omit values + ** @verdict pass reject, noexecution + ***************************************************/ +// Restriction A: It can be assigned to templates of any type as a whole or to optional fields of set or record templates. + +module NegSyn_B010208_omit_value_001 { + + type integer My_Int; + + type component GeneralComp {} + +testcase TC_NegSyn_B010208_omit_value_001() runs on GeneralComp { + var My_Int v_int:= omit; // not allowed. It can be assigned to templates of any type as a whole or to optional fields of set or record templates +} + +} diff --git a/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010208_omit_value/Sem_B010208_omit_value_001.ttcn b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010208_omit_value/Sem_B010208_omit_value_001.ttcn new file mode 100644 index 00000000..c78e5195 --- /dev/null +++ b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010208_omit_value/Sem_B010208_omit_value_001.ttcn @@ -0,0 +1,82 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:B.1.2.8, Ensure that the IUT correctly handles template matching of omit values + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +module Sem_B010208_omit_value_001 { + + type enumerated EnumeratedType {e_black, e_white, e_green}; + + type record RecordType { + integer a optional, + integer b optional, + boolean c + } + + type union UnionType { + integer a, + EnumeratedType b, + boolean c + } + + type record MessageType { + integer field1, + charstring field2 optional, + EnumeratedType field3 optional, + RecordType field4 optional, + UnionType field5 optional, + RecordType field6 optional, + UnionType field7 optional + } + + type port loopbackPort message { + inout MessageType + } + + +type component GeneralComp { + port loopbackPort messagePort +} + +testcase TC_Sem_B010208_omit_value_001() runs on GeneralComp { + + template MessageType mw_matchingTemplate:= + { + field1 := ?, + field2 := omit, + field3 := omit, + field4 := omit, + field5 := omit, + field6 := omit, + field7 := omit + } + + var MessageType v_testMessage:= { + field1 := 2, + field2 := omit, + field3 := omit, + field4 := omit, + field5 := omit, + field6 := omit, + field7 := omit + } + + messagePort.send(v_testMessage); + + alt { + [] messagePort.receive(mw_matchingTemplate) { + setverdict(pass); + } + [] messagePort.receive { + setverdict(fail); + } + } +} + +control{ + execute(TC_Sem_B010208_omit_value_001()); +} + +} diff --git a/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010208_omit_value/Sem_B010208_omit_value_002.ttcn b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010208_omit_value/Sem_B010208_omit_value_002.ttcn new file mode 100644 index 00000000..31159d96 --- /dev/null +++ b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010208_omit_value/Sem_B010208_omit_value_002.ttcn @@ -0,0 +1,84 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:B.1.2.8, Ensure that the IUT correctly handles template matching of omit values + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +module Sem_B010208_omit_value_002 { + + type enumerated EnumeratedType {e_black, e_white, e_green}; + + type record RecordType { + integer a optional, + integer b optional, + boolean c + } + + type union UnionType { + integer a, + EnumeratedType b, + boolean c + } + + type record MessageType { + integer field1, + charstring field2 optional, + EnumeratedType field3 optional, + RecordType field4 optional, + UnionType field5 optional, + RecordType field6 optional, + UnionType field7 optional + } + + type port loopbackPort message { + inout MessageType + } + + +type component GeneralComp { + port loopbackPort messagePort +} + +testcase TC_Sem_B010208_omit_value_002() runs on GeneralComp { + + var MessageType v_testMessage; + + template MessageType mw_matchingTemplate:= + { + field1 := ?, + field2 := *, + field3 := *, + field4 := *, + field5 := *, + field6 := {a:=1,b:=omit,c:=true}, //omits the optional field + field7 := * + } + + v_testMessage:= { + field1 := 2, + field2 := omit, + field3 := omit, + field4 := omit, + field5 := omit, + field6 := {a:=1,b:=omit,c:=true}, + field7 := omit + } + + messagePort.send(v_testMessage); + + alt { + [] messagePort.receive(mw_matchingTemplate) { + setverdict(pass); + } + [] messagePort.receive { + setverdict(fail); + } + } +} + +control{ + execute(TC_Sem_B010208_omit_value_002()); +} + +} diff --git a/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010208_omit_value/Sem_B010208_omit_value_003.ttcn b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010208_omit_value/Sem_B010208_omit_value_003.ttcn new file mode 100644 index 00000000..9d950890 --- /dev/null +++ b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010208_omit_value/Sem_B010208_omit_value_003.ttcn @@ -0,0 +1,64 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:B.1.2.8, Ensure that the IUT correctly handles template matching of omit values + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +module Sem_B010208_omit_value_003 { + + type record MessageType { + integer field1, + MyRecordof field2 optional, + boolean field3 optional + } + + type record of integer MyRecordof; + + type port loopbackPort message { + inout MessageType + } + + +type component GeneralComp { + port loopbackPort messagePort +} + +testcase TC_Sem_B010208_omit_value_003() runs on GeneralComp { + + var MessageType v_testMessage; + var boolean v_boolean; + template MyRecordof mw_MyRecofTemplate := omit; // this assignment is allowed + template boolean mw_MyBoolTemplate := omit; // this assignment is allowed + + + template MessageType mw_matchingTemplate:= + { + field1 := ?, + field2 := mw_MyRecofTemplate, + field3 := mw_MyBoolTemplate + } + + v_testMessage:= { + field1 := 2, + field2 := omit, + field3 := omit + } + + messagePort.send(v_testMessage); + + alt { + [] messagePort.receive(mw_matchingTemplate) { + setverdict(pass); + } + [] messagePort.receive { + setverdict(fail); + } + } +} + +control{ + execute(TC_Sem_B010208_omit_value_003()); +} + +} diff --git a/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010208_omit_value/Sem_B010208_omit_value_004.ttcn b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010208_omit_value/Sem_B010208_omit_value_004.ttcn new file mode 100644 index 00000000..ab28d430 --- /dev/null +++ b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010208_omit_value/Sem_B010208_omit_value_004.ttcn @@ -0,0 +1,65 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:B.1.2.8, Ensure that the IUT correctly handles template matching of omit values + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +module Sem_B010208_omit_value_004 { + + type record MessageType { + integer field1, + MyRecordof field2 optional, + boolean field3 optional + } + + type record of integer MyRecordof; + + type port loopbackPort message { + inout MessageType + } + + +type component GeneralComp { + port loopbackPort messagePort +} + +testcase TC_Sem_B010208_omit_value_004() runs on GeneralComp { + + var MessageType v_testMessage; + var boolean v_boolean; + template MyRecordof mw_MyRecofTemplate := omit; // this assignment is allowed + template boolean mw_MyBoolTemplate := omit; // this assignment is allowed + + + template MessageType mw_matchingTemplate:= + { + field1 := ?, + field2 := mw_MyRecofTemplate, + field3 := mw_MyBoolTemplate + } + + v_testMessage:= { + field1 := 2, + field2 := omit, + field3 := omit + } + + messagePort.send(v_testMessage); + + alt { + [] messagePort.receive(mw_matchingTemplate) { + v_boolean := match({2,omit,omit},mw_matchingTemplate);// matches and returns true + setverdict(pass); + } + [] messagePort.receive { + setverdict(fail); + } + } +} + +control{ + execute(TC_Sem_B010208_omit_value_004()); +} + +} diff --git a/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010208_omit_value/Sem_B010208_omit_value_005.ttcn b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010208_omit_value/Sem_B010208_omit_value_005.ttcn new file mode 100644 index 00000000..d1e797ea --- /dev/null +++ b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010208_omit_value/Sem_B010208_omit_value_005.ttcn @@ -0,0 +1,70 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:B.1.2.8, Ensure that the IUT correctly handles template matching of omit values + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + + +// formerly: NegSem_B010208_omit_value_003 + +module Sem_B010208_omit_value_005 { + + type record MessageType { + integer field1, + MyRecordof field2 optional, + boolean field3 optional + } + + type record of integer MyRecordof; + + type port loopbackPort message { + inout MessageType + } + + +type component GeneralComp { + port loopbackPort messagePort +} + +testcase TC_Sem_B010208_omit_value_005() runs on GeneralComp { + + var MessageType v_testMessage; + var boolean v_boolean; + template MyRecordof mw_MyRecofTemplate := omit; // this assignment is allowed + template boolean mw_MyBoolTemplate := omit; // this assignment is allowed + + + template MessageType mw_matchingTemplate:= + { + field1 := ?, + field2 := mw_MyRecofTemplate, + field3 := mw_MyBoolTemplate + } + + v_testMessage:= { + field1 := 2, + field2 := omit, + field3 := omit + } + + messagePort.send(v_testMessage); + + alt { + [] messagePort.receive(mw_matchingTemplate) { + v_boolean := match({},mw_MyRecofTemplate); // does not match and returns false + if(v_boolean == false){ + setverdict(pass); + } + } + [] messagePort.receive { + setverdict(fail); + } + } +} + +control{ + execute(TC_Sem_B010208_omit_value_005()); +} + +} diff --git a/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010209_decoded_content/Sem_B010209_decoded_content_001.ttcn b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010209_decoded_content/Sem_B010209_decoded_content_001.ttcn new file mode 100644 index 00000000..9d232382 --- /dev/null +++ b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010209_decoded_content/Sem_B010209_decoded_content_001.ttcn @@ -0,0 +1,67 @@ +/*************************************************** + ** @author STF 487 (updated by STF 521) + ** @version 0.0.2 + ** @purpose 1:B.1.2.8, Ensure that the IUT correctly handles content decoding + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +//Restriction a) +/*It can be assigned to templates and template fields of bitstring, hexstring, octetstring, +charstring and universal charstring types.*/ + +module Sem_B010209_decoded_content_001 { + + type record MessageType { + bitstring payload + } + + type record Mymessage { + integer field1, + bitstring field2 optional + } + + + type port loopbackPort message{inout MessageType}; + + +type component GeneralComp { + port loopbackPort messagePort +} + +testcase TC_Sem_B010209_decoded_content_001() runs on GeneralComp { + var bitstring v_enc; + var Mymessage v_testMessage; + var MessageType Message; + template MessageType mw_matchingTemplate:= { + payload := decmatch Mymessage: {field1:= 10, field2 := '1001'B} + } + + v_testMessage:= { + field1 := 10, + field2 := '1001'B + } + + Message.payload := encvalue(v_testMessage); //encode message to payload + + + + + + messagePort.send(Message); //send message + + alt { + [] messagePort.receive(mw_matchingTemplate) { + setverdict(pass); + } + [] messagePort.receive { + setverdict(fail); + } + } + +} + +control{ + execute(TC_Sem_B010209_decoded_content_001()); +} + +} diff --git a/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010209_decoded_content/Sem_B010209_decoded_content_002.ttcn b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010209_decoded_content/Sem_B010209_decoded_content_002.ttcn new file mode 100644 index 00000000..5e9d3e12 --- /dev/null +++ b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010209_decoded_content/Sem_B010209_decoded_content_002.ttcn @@ -0,0 +1,63 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:B.1.2.8, Ensure that the IUT correctly handles content decoding + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +//Restriction a) +/*It can be assigned to templates and template fields of bitstring, hexstring, octetstring, +charstring and universal charstring types.*/ + +module Sem_B010209_decoded_content_002 { + + type record MessageType { + hexstring payload + } + + type record Mymessage { + integer field1, + bitstring field2 optional + } + + + type port loopbackPort message{inout MessageType}; + + +type component GeneralComp { + port loopbackPort messagePort +} + +testcase TC_Sem_B010209_decoded_content_002() runs on GeneralComp { + var bitstring v_enc; + var Mymessage v_testMessage; + var MessageType Message; + template MessageType mw_matchingTemplate:= { + payload := decmatch Mymessage: {field1:= 10, field2 := '1001'B} + } + + v_testMessage:= { + field1 := 10, + field2 := '1001'B + } + + Message.payload := bit2hex(encvalue(v_testMessage)); //encode message to payload, hexstring + + messagePort.send(Message); //send message + + alt { + [] messagePort.receive(mw_matchingTemplate) { + setverdict(pass); + } + [] messagePort.receive { + setverdict(fail); + } + } + +} + +control{ + execute(TC_Sem_B010209_decoded_content_002()); +} + +} diff --git a/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010209_decoded_content/Sem_B010209_decoded_content_003.ttcn b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010209_decoded_content/Sem_B010209_decoded_content_003.ttcn new file mode 100644 index 00000000..649d209b --- /dev/null +++ b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010209_decoded_content/Sem_B010209_decoded_content_003.ttcn @@ -0,0 +1,68 @@ +/*************************************************** + ** @author STF 487 (updated by STF 512) + ** @version 0.0.2 + ** @purpose 1:B.1.2.8, Ensure that the IUT correctly handles content decoding + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +//Restriction a) +/*It can be assigned to templates and template fields of bitstring, hexstring, octetstring, +charstring and universal charstring types.*/ + +module Sem_B010209_decoded_content_003 { + + type record MessageType { + octetstring payload + } + + type record Mymessage { + integer field1, + bitstring field2 optional + } + + + type port loopbackPort message{inout MessageType}; + + +type component GeneralComp { + port loopbackPort messagePort +} + +testcase TC_Sem_B010209_decoded_content_003() runs on GeneralComp { + var bitstring v_enc; + var Mymessage v_testMessage; + var MessageType Message; + template MessageType mw_matchingTemplate := { + payload := decmatch Mymessage: {field1:= 10, field2 := '1001'B} + } + + v_testMessage:= { + field1 := 10, + field2 := '1001'B + } + + Message.payload := bit2oct(encvalue(v_testMessage)); //encode message to payload, octetstring + + + + + + + messagePort.send(Message); //send message + + alt { + [] messagePort.receive(mw_matchingTemplate) { + setverdict(pass); + } + [] messagePort.receive { + setverdict(fail); + } + } + +} + +control{ + execute(TC_Sem_B010209_decoded_content_003()); +} + +} diff --git a/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010209_decoded_content/Sem_B010209_decoded_content_004.ttcn b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010209_decoded_content/Sem_B010209_decoded_content_004.ttcn new file mode 100644 index 00000000..4f368084 --- /dev/null +++ b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010209_decoded_content/Sem_B010209_decoded_content_004.ttcn @@ -0,0 +1,55 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:B.1.2.8, Ensure that the IUT correctly handles content decoding + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +//Restriction a) +/*It can be assigned to templates and template fields of bitstring, hexstring, octetstring, +charstring and universal charstring types.*/ + + +module Sem_B010209_decoded_content_004 { + + type record MessageType { + charstring payload + } + + type integer MyInt with { encode "32bit" } + + type port loopbackPort message{inout MessageType}; + + + type component GeneralComp { + port loopbackPort messagePort + } + + const MyInt c_input := 1633837665; + + template MessageType mw_matchingTemplate:= { + payload := decmatch MyInt:c_input + } + + testcase TC_Sem_B010209_decoded_content_004() runs on GeneralComp { + var MessageType v_message; + + v_message.payload := encvalue_unichar(c_input); //encode message to payload, charstring + + messagePort.send(v_message); //send message + + alt { + [] messagePort.receive(mw_matchingTemplate) { + setverdict(pass); + } + [] messagePort.receive { + setverdict(fail,mw_matchingTemplate); + } + } + } + + control{ + execute(TC_Sem_B010209_decoded_content_004()); + } + +} diff --git a/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010209_decoded_content/Sem_B010209_decoded_content_005.ttcn b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010209_decoded_content/Sem_B010209_decoded_content_005.ttcn new file mode 100644 index 00000000..d4805f8d --- /dev/null +++ b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010209_decoded_content/Sem_B010209_decoded_content_005.ttcn @@ -0,0 +1,55 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:B.1.2.8, Ensure that the IUT correctly handles content decoding + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +//Restriction a) +/*It can be assigned to templates and template fields of bitstring, hexstring, octetstring, +charstring and universal charstring types.*/ + + +module Sem_B010209_decoded_content_005 { + + type record MessageType { + universal charstring payload + } + + type integer MyInt with { encode "32bit" } + + type port loopbackPort message{inout MessageType}; + + type component GeneralComp { + port loopbackPort messagePort + } + + const MyInt c_input := 1633837665; + + template MessageType mw_matchingTemplate:= { + payload := decmatch MyInt:c_input + } + + testcase TC_Sem_B010209_decoded_content_005() runs on GeneralComp { + var MessageType v_message; + + v_message.payload := encvalue_unichar(c_input); //encode message to payload, charstring + + messagePort.send(v_message); //send message + + alt { + [] messagePort.receive(mw_matchingTemplate) { + setverdict(pass); + } + [] messagePort.receive { + setverdict(fail,mw_matchingTemplate); + } + } + + } + + control{ + execute(TC_Sem_B010209_decoded_content_005()); + } + +} diff --git a/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010210_enumerated_value_list/Sem_B010210_enumerated_value_list_001.ttcn b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010210_enumerated_value_list/Sem_B010210_enumerated_value_list_001.ttcn new file mode 100644 index 00000000..2f0389ff --- /dev/null +++ b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010210_enumerated_value_list/Sem_B010210_enumerated_value_list_001.ttcn @@ -0,0 +1,53 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:B.1.2.10, Ensure that the IUT correctly handles enum matching + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirements are tested: +/*The template matches only those enumerated values of the same name where the associated integer values is matched by at least one of the integer templates.*/ + + +module Sem_B010210_enumerated_value_list_001 { + + + type enumerated MyFirstEnum { + First_enum(0), Second_enum(1), other_enum(2..200) + } + + type port messagePortType message { + inout MyFirstEnum; + } + + template integer m_Int :=(10..100); + + + type component GeneralComp { + port messagePortType messagePort; + } + + + testcase TC_Sem_B010210_enumerated_value_list_001() runs on GeneralComp { + + template MyFirstEnum mw_matchingTemplate:= other_enum(m_Int); // matches other_enum(10..100) + + var MyFirstEnum v_message := other_enum(11); + + messagePort.send(v_message); //send message + + alt { + [] messagePort.receive(mw_matchingTemplate) { + setverdict(pass); + } + [] messagePort.receive { + setverdict(fail, mw_matchingTemplate); + } + } + } + + control{ + execute(TC_Sem_B010210_enumerated_value_list_001()); + } + +} diff --git a/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0103_matching_inside_values/B010301_any_element/Sem_B010301_any_element_001.ttcn b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0103_matching_inside_values/B010301_any_element/Sem_B010301_any_element_001.ttcn new file mode 100644 index 00000000..7a29658e --- /dev/null +++ b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0103_matching_inside_values/B010301_any_element/Sem_B010301_any_element_001.ttcn @@ -0,0 +1,59 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:B.1.3.1, Ensure that the IUT correctly handles template matching of ? symbols in value elements + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +module Sem_B010301_any_element_001 { + + + type record MessageType { + charstring field1, + bitstring field2, + hexstring field3 + } + + type port loopbackPort message { + inout MessageType + } + + +type component GeneralComp { + port loopbackPort messagePort +} + +testcase TC_Sem_B010301_any_element_001() runs on GeneralComp { + + var MessageType v_testMessage; + + template MessageType mw_matchingTemplate:= + { + field1 := pattern "test s?ring", + field2 := '10???'B, + field3 := '8?A?C'H + } + + v_testMessage:= { + field1 := "test string", + field2 := '10101'B, + field3 := '89ABC'H + } + + messagePort.send(v_testMessage); + + alt { + [] messagePort.receive(mw_matchingTemplate) { + setverdict(pass); + } + [] messagePort.receive { + setverdict(fail); + } + } +} + +control{ + execute(TC_Sem_B010301_any_element_001()); +} + +} diff --git a/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0103_matching_inside_values/B010301_any_element/Sem_B010301_any_element_002.ttcn b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0103_matching_inside_values/B010301_any_element/Sem_B010301_any_element_002.ttcn new file mode 100644 index 00000000..c114e099 --- /dev/null +++ b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0103_matching_inside_values/B010301_any_element/Sem_B010301_any_element_002.ttcn @@ -0,0 +1,59 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:B.1.3.1, Ensure that the IUT correctly handles template matching of ? symbols in value elements + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +module Sem_B010301_any_element_002 { + + + type record MessageType { + charstring field1, + bitstring field2, + hexstring field3 + } + + type port loopbackPort message { + inout MessageType + } + + +type component GeneralComp { + port loopbackPort messagePort +} + +testcase TC_Sem_B010301_any_element_002() runs on GeneralComp { + + var MessageType v_testMessage; + + template MessageType mw_matchingTemplate:= + { + field1 := pattern "test s?ring", //attempting to match a missing character + field2 := '10???'B, + field3 := '8?A?C'H + } + + v_testMessage:= { + field1 := "test sring", + field2 := '10101'B, + field3 := '89ABC'H + } + + messagePort.send(v_testMessage); + + alt { + [] messagePort.receive(mw_matchingTemplate) { + setverdict(fail); + } + [] messagePort.receive { + setverdict(pass); + } + } +} + +control{ + execute(TC_Sem_B010301_any_element_002()); +} + +} diff --git a/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0103_matching_inside_values/B010301_any_element/Sem_B010301_any_element_003.ttcn b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0103_matching_inside_values/B010301_any_element/Sem_B010301_any_element_003.ttcn new file mode 100644 index 00000000..e433083f --- /dev/null +++ b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0103_matching_inside_values/B010301_any_element/Sem_B010301_any_element_003.ttcn @@ -0,0 +1,59 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:B.1.3.1, Ensure that the IUT correctly handles template matching of ? symbols in value elements + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +module Sem_B010301_any_element_003 { + + + type record MessageType { + charstring field1, + bitstring field2, + hexstring field3 + } + + type port loopbackPort message { + inout MessageType + } + + +type component GeneralComp { + port loopbackPort messagePort +} + +testcase TC_Sem_B010301_any_element_003() runs on GeneralComp { + + var MessageType v_testMessage; + + template MessageType mw_matchingTemplate:= + { + field1 := "test string", + field2 := '10???'B, + field3 := '8?A?C'H //attempting to match several characters + } + + v_testMessage:= { + field1 := "test sring", + field2 := '10101'B, + field3 := '89ABBC'H + } + + messagePort.send(v_testMessage); + + alt { + [] messagePort.receive(mw_matchingTemplate) { + setverdict(fail); + } + [] messagePort.receive { + setverdict(pass); + } + } +} + +control{ + execute(TC_Sem_B010301_any_element_003()); +} + +} diff --git a/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0103_matching_inside_values/B010301_any_element/Sem_B010301_any_element_004.ttcn b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0103_matching_inside_values/B010301_any_element/Sem_B010301_any_element_004.ttcn new file mode 100644 index 00000000..c350dd03 --- /dev/null +++ b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0103_matching_inside_values/B010301_any_element/Sem_B010301_any_element_004.ttcn @@ -0,0 +1,59 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:B.1.3.1, Ensure that the IUT correctly handles template matching of ? symbols in value elements + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +module Sem_B010301_any_element_004 { + + + type record MessageType { + charstring field1, + bitstring field2, + hexstring field3 + } + + type port loopbackPort message { + inout MessageType + } + + +type component GeneralComp { + port loopbackPort messagePort +} + +testcase TC_Sem_B010301_any_element_004() runs on GeneralComp { + + var MessageType v_testMessage; + + template MessageType mw_matchingTemplate:= + { + field1 := "test string", + field2 := '10???'B, //mismatching string lengths + field3 := '8?A?C'H + } + + v_testMessage:= { + field1 := "test sring", + field2 := '10'B, + field3 := '89ABC'H + } + + messagePort.send(v_testMessage); + + alt { + [] messagePort.receive(mw_matchingTemplate) { + setverdict(fail); + } + [] messagePort.receive { + setverdict(pass); + } + } +} + +control{ + execute(TC_Sem_B010301_any_element_004()); +} + +} diff --git a/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0103_matching_inside_values/B010301_any_element/Sem_B010301_any_element_005.ttcn b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0103_matching_inside_values/B010301_any_element/Sem_B010301_any_element_005.ttcn new file mode 100644 index 00000000..6c9a7a55 --- /dev/null +++ b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0103_matching_inside_values/B010301_any_element/Sem_B010301_any_element_005.ttcn @@ -0,0 +1,59 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:B.1.3.1, Ensure that the IUT correctly handles template matching of ? symbols in value elements + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +module Sem_B010301_any_element_005 { + + + type record MessageType { + charstring field1, + bitstring field2, + hexstring field3 + } + + type port loopbackPort message { + inout MessageType + } + + +type component GeneralComp { + port loopbackPort messagePort +} + +testcase TC_Sem_B010301_any_element_005() runs on GeneralComp { + + var MessageType v_testMessage; + + template MessageType mw_matchingTemplate:= + { + field1 := "test s?ring", //literally interpreted string without the pattern keyword + field2 := '10???'B, + field3 := '8?A?C'H + } + + v_testMessage:= { + field1 := "test string", + field2 := '10101'B, + field3 := '89ABC'H + } + + messagePort.send(v_testMessage); + + alt { + [] messagePort.receive(mw_matchingTemplate) { + setverdict(fail); + } + [] messagePort.receive { + setverdict(pass); + } + } +} + +control{ + execute(TC_Sem_B010301_any_element_005()); +} + +} diff --git a/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0103_matching_inside_values/B010301_any_element/Sem_B010301_any_element_006.ttcn b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0103_matching_inside_values/B010301_any_element/Sem_B010301_any_element_006.ttcn new file mode 100644 index 00000000..a6e7e97b --- /dev/null +++ b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0103_matching_inside_values/B010301_any_element/Sem_B010301_any_element_006.ttcn @@ -0,0 +1,53 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:B.1.3.1, Ensure that the IUT correctly handles template matching of ? symbols in value elements + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +module Sem_B010301_any_element_006 { + + + type record MessageType { + record of integer field1 + } + + type port loopbackPort message { + inout MessageType + } + + +type component GeneralComp { + port loopbackPort messagePort +} + +testcase TC_Sem_B010301_any_element_006() runs on GeneralComp { + + var MessageType v_testMessage; + + template MessageType mw_matchingTemplate:= + { + field1 := {8,?,10,?,12} + } + + v_testMessage:= { + field1 := {8,9,10,11,12} + } + + messagePort.send(v_testMessage); + + alt { + [] messagePort.receive(mw_matchingTemplate) { + setverdict(pass); + } + [] messagePort.receive { + setverdict(fail); + } + } +} + +control{ + execute(TC_Sem_B010301_any_element_006()); +} + +} diff --git a/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0103_matching_inside_values/B010301_any_element/Sem_B010301_any_element_007.ttcn b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0103_matching_inside_values/B010301_any_element/Sem_B010301_any_element_007.ttcn new file mode 100644 index 00000000..08927085 --- /dev/null +++ b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0103_matching_inside_values/B010301_any_element/Sem_B010301_any_element_007.ttcn @@ -0,0 +1,53 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:B.1.3.1, Ensure that the IUT correctly handles template matching of ? symbols in value elements + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +module Sem_B010301_any_element_007 { + + + type record MessageType { + record of integer field1 + } + + type port loopbackPort message { + inout MessageType + } + + +type component GeneralComp { + port loopbackPort messagePort +} + +testcase TC_Sem_B010301_any_element_007() runs on GeneralComp { + + var MessageType v_testMessage; + + template MessageType mw_matchingTemplate:= + { + field1 := {8,?,10,?,12} + } + + v_testMessage:= { + field1 := {8,9,10,12} + } + + messagePort.send(v_testMessage); + + alt { + [] messagePort.receive(mw_matchingTemplate) { + setverdict(fail); + } + [] messagePort.receive { + setverdict(pass); + } + } +} + +control{ + execute(TC_Sem_B010301_any_element_007()); +} + +} diff --git a/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0103_matching_inside_values/B010301_any_element/Sem_B010301_any_element_008.ttcn b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0103_matching_inside_values/B010301_any_element/Sem_B010301_any_element_008.ttcn new file mode 100644 index 00000000..85c0a178 --- /dev/null +++ b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0103_matching_inside_values/B010301_any_element/Sem_B010301_any_element_008.ttcn @@ -0,0 +1,53 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:B.1.3.1, Ensure that the IUT correctly handles template matching of ? symbols in value elements + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +module Sem_B010301_any_element_008 { + + + type record MessageType { + record of integer field1 + } + + type port loopbackPort message { + inout MessageType + } + + +type component GeneralComp { + port loopbackPort messagePort +} + +testcase TC_Sem_B010301_any_element_008() runs on GeneralComp { + + var MessageType v_testMessage; + + template MessageType mw_matchingTemplate:= + { + field1 := {8,?,?,12} + } + + v_testMessage:= { + field1 := {8,9,10,11,12} + } + + messagePort.send(v_testMessage); + + alt { + [] messagePort.receive(mw_matchingTemplate) { + setverdict(fail); + } + [] messagePort.receive { + setverdict(pass); + } + } +} + +control{ + execute(TC_Sem_B010301_any_element_008()); +} + +} diff --git a/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0103_matching_inside_values/B010302_any_number_of_elements_or_none/Sem_B010302_any_number_of_elements_or_none_001.ttcn b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0103_matching_inside_values/B010302_any_number_of_elements_or_none/Sem_B010302_any_number_of_elements_or_none_001.ttcn new file mode 100644 index 00000000..ae45f55a --- /dev/null +++ b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0103_matching_inside_values/B010302_any_number_of_elements_or_none/Sem_B010302_any_number_of_elements_or_none_001.ttcn @@ -0,0 +1,59 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:B.1.3.2, Ensure that the IUT correctly handles template matching of * symbols in value elements + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +module Sem_B010302_any_number_of_elements_or_none_001 { + + + type record MessageType { + charstring field1, + bitstring field2, + hexstring field3 + } + + type port loopbackPort message { + inout MessageType + } + + +type component GeneralComp { + port loopbackPort messagePort +} + +testcase TC_Sem_B010302_any_number_of_elements_or_none_001() runs on GeneralComp { + + var MessageType v_testMessage; + + template MessageType mw_matchingTemplate:= + { + field1 := pattern "test s*g", + field2 := '10*'B, + field3 := '89*ABC'H + } + + v_testMessage:= { + field1 := "test string", + field2 := '10101'B, + field3 := '89ABC'H + } + + messagePort.send(v_testMessage); + + alt { + [] messagePort.receive(mw_matchingTemplate) { + setverdict(pass); + } + [] messagePort.receive { + setverdict(fail); + } + } +} + +control{ + execute(TC_Sem_B010302_any_number_of_elements_or_none_001()); +} + +} diff --git a/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0103_matching_inside_values/B010302_any_number_of_elements_or_none/Sem_B010302_any_number_of_elements_or_none_002.ttcn b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0103_matching_inside_values/B010302_any_number_of_elements_or_none/Sem_B010302_any_number_of_elements_or_none_002.ttcn new file mode 100644 index 00000000..aec2021e --- /dev/null +++ b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0103_matching_inside_values/B010302_any_number_of_elements_or_none/Sem_B010302_any_number_of_elements_or_none_002.ttcn @@ -0,0 +1,59 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:B.1.3.2, Ensure that the IUT correctly handles template matching of * symbols in value elements + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +module Sem_B010302_any_number_of_elements_or_none_002 { + + + type record MessageType { + charstring field1, + bitstring field2, + hexstring field3 + } + + type port loopbackPort message { + inout MessageType + } + + +type component GeneralComp { + port loopbackPort messagePort +} + +testcase TC_Sem_B010302_any_number_of_elements_or_none_002() runs on GeneralComp { + + var MessageType v_testMessage; + + template MessageType mw_matchingTemplate:= + { + field1 := "test s*g", //literally interpreted string without the pattern keyword + field2 := '10*'B, + field3 := '89*ABC'H + } + + v_testMessage:= { + field1 := "test string", + field2 := '10101'B, + field3 := '89ABC'H + } + + messagePort.send(v_testMessage); + + alt { + [] messagePort.receive(mw_matchingTemplate) { + setverdict(fail); + } + [] messagePort.receive { + setverdict(pass); + } + } +} + +control{ + execute(TC_Sem_B010302_any_number_of_elements_or_none_002()); +} + +} diff --git a/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0103_matching_inside_values/B010302_any_number_of_elements_or_none/Sem_B010302_any_number_of_elements_or_none_003.ttcn b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0103_matching_inside_values/B010302_any_number_of_elements_or_none/Sem_B010302_any_number_of_elements_or_none_003.ttcn new file mode 100644 index 00000000..bc760368 --- /dev/null +++ b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0103_matching_inside_values/B010302_any_number_of_elements_or_none/Sem_B010302_any_number_of_elements_or_none_003.ttcn @@ -0,0 +1,59 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:B.1.3.2, Ensure that the IUT correctly handles template matching of * symbols in value elements + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +module Sem_B010302_any_number_of_elements_or_none_003 { + + + type record MessageType { + record of integer field1, + record of integer field2, + record of integer field3 + } + + type port loopbackPort message { + inout MessageType + } + + +type component GeneralComp { + port loopbackPort messagePort +} + +testcase TC_Sem_B010302_any_number_of_elements_or_none_003() runs on GeneralComp { + + var MessageType v_testMessage; + + template MessageType mw_matchingTemplate:= + { + field1 := {8,*,10,*,12}, + field2 := {8,*,10,*,12}, + field3 := {8,*,10,*,12} + } + + v_testMessage:= { + field1 := {8,9,10,11,12}, + field2 := {8,9,10,12}, + field3 := {8,9,9,10,10,11,12} + } + + messagePort.send(v_testMessage); + + alt { + [] messagePort.receive(mw_matchingTemplate) { + setverdict(pass); + } + [] messagePort.receive { + setverdict(fail); + } + } +} + +control{ + execute(TC_Sem_B010302_any_number_of_elements_or_none_003()); +} + +} diff --git a/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0103_matching_inside_values/B010303_permutation/NegSem_B010303_permutation_001.ttcn b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0103_matching_inside_values/B010303_permutation/NegSem_B010303_permutation_001.ttcn new file mode 100644 index 00000000..9e1d647e --- /dev/null +++ b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0103_matching_inside_values/B010303_permutation/NegSem_B010303_permutation_001.ttcn @@ -0,0 +1,59 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:B.1.3.3, Ensure that the IUT correctly handles template matching of ? symbols in value elements + ** @verdict pass reject + ***************************************************/ + +module NegSem_B010303_permutation_001 { + type record MessageType { + set of integer field1, + // permutation can only be applied to a record of type + set of integer field2, + set of integer field3, + set of integer field4 + } + + type port loopbackPort message { + inout MessageType; + } + + + type component GeneralComp { + port loopbackPort messagePort; + } + + testcase TC_NegSem_B010303_permutation_001() runs on GeneralComp { + timer t := 1.0; + var MessageType v_testMessage; + + template MessageType mw_matchingTemplate := { + field1 := {permutation(1, 2, 3), 5}, + field2 := {permutation(1, 2, ?), 5}, + field3 := {permutation(1, 2, 3), *}, + field4 := {permutation((1, 2, 3), 2, 3), 5} + } + + v_testMessage := { + field1 := {2, 1, 3, 5}, + field2 := {2, 1, 8, 5}, + field3 := {3, 2, 1, 8, 8}, + field4 := {3, 2, 2, 5} + }; + + t.start; + + messagePort.send(v_testMessage); + alt { + [] messagePort.receive(mw_matchingTemplate) { + setverdict(pass); + } + [] t.timeout { + setverdict(fail); + } + } + } + control { + execute(TC_NegSem_B010303_permutation_001()); + } +} diff --git a/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0103_matching_inside_values/B010303_permutation/NegSem_B010303_permutation_002.ttcn b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0103_matching_inside_values/B010303_permutation/NegSem_B010303_permutation_002.ttcn new file mode 100644 index 00000000..27ba448a --- /dev/null +++ b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0103_matching_inside_values/B010303_permutation/NegSem_B010303_permutation_002.ttcn @@ -0,0 +1,35 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:B.1.3.3, Ensure that all from operand can be a record of or set of only + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Besides specifying all individual values, it is possible to add all elements of +// a record of or set of template into permutations using an all from clause. + +module NegSem_B010303_permutation_002 { + + type record of integer RoI; + template integer t_source := 2; + // t_source is not a record of or set of -> an error expected + template RoI t_perm1 := { permutation ( 5, all from t_source ) }; + + type component GeneralComp { + } + + testcase TC_NegSem_B010303_permutation_002() runs on GeneralComp { + if (match({ 2, 5 }, t_perm1)) { + setverdict(pass); + } else { + setverdict(fail); + } + } + + control{ + execute(TC_NegSem_B010303_permutation_002()); + } + +} + diff --git a/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0103_matching_inside_values/B010303_permutation/NegSem_B010303_permutation_003.ttcn b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0103_matching_inside_values/B010303_permutation/NegSem_B010303_permutation_003.ttcn new file mode 100644 index 00000000..0cb79748 --- /dev/null +++ b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0103_matching_inside_values/B010303_permutation/NegSem_B010303_permutation_003.ttcn @@ -0,0 +1,34 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:B.1.3.3, Ensure that type restriction for permutation elements is applied + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Each individual member listed in the permutation shall be of the type replicated +// by the record of type. + +module NegSem_B010303_permutation_003 { + + type record of integer RoI; + + template RoI t_perm1 := { permutation ( 5, 2.0 ) }; // float value is not compatible + + + type component GeneralComp { + } + + testcase TC_NegSem_B010303_permutation_003() runs on GeneralComp { + if (match({ 2, 5 }, t_perm1)) { + setverdict(pass); + } else { + setverdict(fail); + } + } + + control{ + execute(TC_NegSem_B010303_permutation_003()); + } + +} diff --git a/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0103_matching_inside_values/B010303_permutation/NegSem_B010303_permutation_004.ttcn b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0103_matching_inside_values/B010303_permutation/NegSem_B010303_permutation_004.ttcn new file mode 100644 index 00000000..7a1e8b20 --- /dev/null +++ b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0103_matching_inside_values/B010303_permutation/NegSem_B010303_permutation_004.ttcn @@ -0,0 +1,38 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:B.1.3.3, Ensure that type restriction for all from clause in permutation is applied + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// The member type of the permutation and the member type of the template in the all +// from clause shall be compatible. + +module NegSem_B010303_permutation_004 { + + type record of float RoF; + type record of integer RoI; + + template RoF t_source := { ?, * } + // float value is not compatible with integer (even though the actual symbols are + // generic and would work with integer elements too) + template RoI t_perm1 := { permutation ( 3, all from t_source ) }; + + + type component GeneralComp { + } + + testcase TC_NegSem_B010303_permutation_004() runs on GeneralComp { + if (match({ 2, 3 }, t_perm1)) { + setverdict(pass); + } else { + setverdict(fail); + } + } + + control{ + execute(TC_NegSem_B010303_permutation_004()); + } + +} diff --git a/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0103_matching_inside_values/B010303_permutation/NegSem_B010303_permutation_005.ttcn b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0103_matching_inside_values/B010303_permutation/NegSem_B010303_permutation_005.ttcn new file mode 100644 index 00000000..90f2b0a9 --- /dev/null +++ b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0103_matching_inside_values/B010303_permutation/NegSem_B010303_permutation_005.ttcn @@ -0,0 +1,36 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:B.1.3.3, Verify restriction on individual members of all from operand in permutation + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// The template in the all from clause as a whole shall not resolve into a matching +// mechanism + +module NegSem_B010303_permutation_005 { + + type record of integer RoI; + + template RoI t_source := ?; + // The source template resolves to a matching mechanism. It should cause an error. + template RoI t_perm1 := { permutation ( all from t_source, 2 ) }; + + + type component GeneralComp { + } + + testcase TC_NegSem_B010303_permutation_005() runs on GeneralComp { + if (match({ 2, 3 }, t_perm1)) { + setverdict(pass); + } else { + setverdict(fail); + } + } + + control{ + execute(TC_NegSem_B010303_permutation_005()); + } + +} diff --git a/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0103_matching_inside_values/B010303_permutation/NegSem_B010303_permutation_006.ttcn b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0103_matching_inside_values/B010303_permutation/NegSem_B010303_permutation_006.ttcn new file mode 100644 index 00000000..0c8b2c52 --- /dev/null +++ b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0103_matching_inside_values/B010303_permutation/NegSem_B010303_permutation_006.ttcn @@ -0,0 +1,39 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:B.1.3.3, Verify restriction on individual members of all from operand in permutation + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Individual members of a permutation and elements of the template in the all from +// clause shall only be expressions, templates, and the AnyElement and +// AnyElementsOrNone matching mechanisms. + +module NegSem_B010303_permutation_006 { + + type record of integer RoI; + + template RoI t_source := { 1, permutation(2, 3) } + // The source template contains a matching mechanism inside value (permutation) + // that is not mentioned as a valid content of the all from operand in + // B.1.3.3. restriction c + template RoI t_perm1 := { permutation ( all from t_source, * ) }; + + + type component GeneralComp { + } + + testcase TC_NegSem_B010303_permutation_006() runs on GeneralComp { + if (match({ 1, 4, 2, 3 }, t_perm1)) { + setverdict(pass); + } else { + setverdict(fail); + } + } + + control{ + execute(TC_NegSem_B010303_permutation_006()); + } + +} diff --git a/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0103_matching_inside_values/B010303_permutation/Sem_B010303_permutation_001.ttcn b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0103_matching_inside_values/B010303_permutation/Sem_B010303_permutation_001.ttcn new file mode 100644 index 00000000..0f0620c1 --- /dev/null +++ b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0103_matching_inside_values/B010303_permutation/Sem_B010303_permutation_001.ttcn @@ -0,0 +1,62 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:B.1.3.3, Ensure that the IUT correctly handles template matching of ? symbols in value elements + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +module Sem_B010303_permutation_001 { + + + type record MessageType { + record of integer field1, + record of integer field2, + record of integer field3, + record of integer field4 + } + + type port loopbackPort message { + inout MessageType + } + + +type component GeneralComp { + port loopbackPort messagePort +} + +testcase TC_Sem_B010303_permutation_001() runs on GeneralComp { + + var MessageType v_testMessage; + + template MessageType mw_matchingTemplate:= + { + field1 := { permutation ( 1, 2, 3 ), 5 }, + field2 := { permutation ( 1, 2, ? ), 5 }, + field3 := { permutation ( 1, 2, 3 ), * }, + field4 := { permutation ( (1,2,3), 2, 3 ), 5 } + } + + v_testMessage:= { + field1 := {2,1,3,5}, + field2 := {2,1,8,5}, + field3 := {3,2,1,8,8}, + field4 := {3,2,2,5} + } + + messagePort.send(v_testMessage); + + alt { + [] messagePort.receive(mw_matchingTemplate) { + setverdict(pass); + } + [] messagePort.receive { + setverdict(fail); + } + } +} + +control{ + execute(TC_Sem_B010303_permutation_001()); +} + +} diff --git a/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0103_matching_inside_values/B010303_permutation/Sem_B010303_permutation_002.ttcn b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0103_matching_inside_values/B010303_permutation/Sem_B010303_permutation_002.ttcn new file mode 100644 index 00000000..7a33a56a --- /dev/null +++ b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0103_matching_inside_values/B010303_permutation/Sem_B010303_permutation_002.ttcn @@ -0,0 +1,62 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:B.1.3.3, Ensure that the IUT correctly handles template matching of ? symbols in value elements + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +module Sem_B010303_permutation_002 { + + + type record MessageType { + record of integer field1, + record of integer field2, + record of integer field3, + record of integer field4 + } + + type port loopbackPort message { + inout MessageType + } + + +type component GeneralComp { + port loopbackPort messagePort +} + +testcase TC_Sem_B010303_permutation_002() runs on GeneralComp { + + var MessageType v_testMessage; + + template MessageType mw_matchingTemplate:= + { + field1 := { permutation ( 1, 2, 3 ), 5 }, //3 is missing from the match + field2 := { permutation ( 1, 2, ? ), 5 }, + field3 := { permutation ( 1, 2, 3 ), * }, + field4 := { permutation ( (1,2,3), 2, 3 ), 5 } + } + + v_testMessage:= { + field1 := {2,1,2,5}, + field2 := {2,1,8,5}, + field3 := {3,2,1,8}, + field4 := {3,2,2,5} + } + + messagePort.send(v_testMessage); + + alt { + [] messagePort.receive(mw_matchingTemplate) { + setverdict(fail); + } + [] messagePort.receive { + setverdict(pass); + } + } +} + +control{ + execute(TC_Sem_B010303_permutation_002()); +} + +} diff --git a/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0103_matching_inside_values/B010303_permutation/Sem_B010303_permutation_003.ttcn b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0103_matching_inside_values/B010303_permutation/Sem_B010303_permutation_003.ttcn new file mode 100644 index 00000000..20a6fd05 --- /dev/null +++ b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0103_matching_inside_values/B010303_permutation/Sem_B010303_permutation_003.ttcn @@ -0,0 +1,62 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:B.1.3.3, Ensure that the IUT correctly handles template matching of ? symbols in value elements + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +module Sem_B010303_permutation_003 { + + + type record MessageType { + record of integer field1, + record of integer field2, + record of integer field3, + record of integer field4 + } + + type port loopbackPort message { + inout MessageType + } + + +type component GeneralComp { + port loopbackPort messagePort +} + +testcase TC_Sem_B010303_permutation_003() runs on GeneralComp { + + var MessageType v_testMessage; + + template MessageType mw_matchingTemplate:= + { + field1 := { permutation ( 1, 2, 3 ), 5 }, + field2 := { permutation ( 1, 2, ? ), 5 }, //there is an extra element in the sequence + field3 := { permutation ( 1, 2, 3 ), * }, + field4 := { permutation ( (1,2,3), 2, 3 ), 5 } + } + + v_testMessage:= { + field1 := {2,1,3,5}, + field2 := {2,1,8,8,5}, + field3 := {3,2,1,8}, + field4 := {3,2,2,5} + } + + messagePort.send(v_testMessage); + + alt { + [] messagePort.receive(mw_matchingTemplate) { + setverdict(fail); + } + [] messagePort.receive { + setverdict(pass); + } + } +} + +control{ + execute(TC_Sem_B010303_permutation_003()); +} + +} diff --git a/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0103_matching_inside_values/B010303_permutation/Sem_B010303_permutation_004.ttcn b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0103_matching_inside_values/B010303_permutation/Sem_B010303_permutation_004.ttcn new file mode 100644 index 00000000..5c981dee --- /dev/null +++ b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0103_matching_inside_values/B010303_permutation/Sem_B010303_permutation_004.ttcn @@ -0,0 +1,62 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:B.1.3.3, Ensure that the IUT correctly handles template matching of ? symbols in value elements + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +module Sem_B010303_permutation_004 { + + + type record MessageType { + record of integer field1, + record of integer field2, + record of integer field3, + record of integer field4 + } + + type port loopbackPort message { + inout MessageType + } + + +type component GeneralComp { + port loopbackPort messagePort +} + +testcase TC_Sem_B010303_permutation_004() runs on GeneralComp { + + var MessageType v_testMessage; + + template MessageType mw_matchingTemplate:= + { + field1 := { permutation ( 1, 2, 3 ), 5 }, + field2 := { permutation ( 1, 2, ? ), 5 }, + field3 := { permutation ( 1, 2, 3 ), * }, //wrong order of elements + field4 := { permutation ( (1,2,3), 2, 3 ), 5 } + } + + v_testMessage:= { + field1 := {2,1,3,5}, + field2 := {2,1,8,5}, + field3 := {3,2,8,1}, + field4 := {3,2,2,5} + } + + messagePort.send(v_testMessage); + + alt { + [] messagePort.receive(mw_matchingTemplate) { + setverdict(fail); + } + [] messagePort.receive { + setverdict(pass); + } + } +} + +control{ + execute(TC_Sem_B010303_permutation_004()); +} + +} diff --git a/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0103_matching_inside_values/B010303_permutation/Sem_B010303_permutation_005.ttcn b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0103_matching_inside_values/B010303_permutation/Sem_B010303_permutation_005.ttcn new file mode 100644 index 00000000..6671a0b0 --- /dev/null +++ b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0103_matching_inside_values/B010303_permutation/Sem_B010303_permutation_005.ttcn @@ -0,0 +1,62 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:B.1.3.3, Ensure that the IUT correctly handles template matching of ? symbols in value elements + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +module Sem_B010303_permutation_005 { + + + type record MessageType { + record of integer field1, + record of integer field2, + record of integer field3, + record of integer field4 + } + + type port loopbackPort message { + inout MessageType + } + + +type component GeneralComp { + port loopbackPort messagePort +} + +testcase TC_Sem_B010303_permutation_005() runs on GeneralComp { + + var MessageType v_testMessage; + + template MessageType mw_matchingTemplate:= + { + field1 := { permutation ( 1, 2, 3 ), 5 }, + field2 := { permutation ( 1, 2, ? ), 5 }, + field3 := { permutation ( 1, 2, 3 ), * }, + field4 := { permutation ( (1,2,3), 2, 3 ), 5 } //wrong set of elements + } + + v_testMessage:= { + field1 := {2,1,3,5}, + field2 := {2,1,8,5}, + field3 := {3,2,8,1}, + field4 := {3,1,1,5} + } + + messagePort.send(v_testMessage); + + alt { + [] messagePort.receive(mw_matchingTemplate) { + setverdict(fail); + } + [] messagePort.receive { + setverdict(pass); + } + } +} + +control{ + execute(TC_Sem_B010303_permutation_005()); +} + +} diff --git a/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0103_matching_inside_values/B010303_permutation/Sem_B010303_permutation_006.ttcn b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0103_matching_inside_values/B010303_permutation/Sem_B010303_permutation_006.ttcn new file mode 100644 index 00000000..2930942d --- /dev/null +++ b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0103_matching_inside_values/B010303_permutation/Sem_B010303_permutation_006.ttcn @@ -0,0 +1,66 @@ +/*************************************************** + ** @author STF 451 + ** @version 0.0.1 + ** @purpose 1:B.1.3.3, Ensure that the IUT correctly handles permutation within arrays + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +module Sem_B010303_permutation_006 { + + + type record MessageType { + record of integer field1, + record of integer field2, + record of integer field3, + record of integer field4 + } + + type port loopbackPort message { + inout MessageType + } + + +type component GeneralComp { + port loopbackPort messagePort +} + +testcase TC_Sem_B010303_permutation_006() runs on GeneralComp { + + var MessageType v_testMessage; + var template integer mw_field1 [4] := { permutation ( 1, 2, 3 ), 5 }; + var template integer mw_field2 [4] := { permutation ( 1, 2, ? ), 5 }; + var template integer mw_field3 [4] := { permutation ( 1, 2, 3 ), * }; + var template integer mw_field4 [4] := { permutation ( (1,2,3), 2, 3 ), 5 }; + + template MessageType mw_matchingTemplate:= + { + mw_field1, + mw_field2, + mw_field3, + mw_field4 + } + + v_testMessage:= { + field1 := {2,1,3,5}, + field2 := {2,1,8,5}, + field3 := {3,2,1,8}, + field4 := {3,2,2,5} + } + + messagePort.send(v_testMessage); + + alt { + [] messagePort.receive(mw_matchingTemplate) { + setverdict(pass); + } + [] messagePort.receive { + setverdict(fail); + } + } +} + +control{ + execute(TC_Sem_B010303_permutation_006()); +} + +} diff --git a/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0103_matching_inside_values/B010303_permutation/Sem_B010303_permutation_007.ttcn b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0103_matching_inside_values/B010303_permutation/Sem_B010303_permutation_007.ttcn new file mode 100644 index 00000000..84b54519 --- /dev/null +++ b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0103_matching_inside_values/B010303_permutation/Sem_B010303_permutation_007.ttcn @@ -0,0 +1,36 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:B.1.3.3, Ensure that all from clause can be used inside permutation + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Besides specifying all individual values, it is possible to add all elements of +// a record of template into permutations using an all from clause. + +module Sem_B010303_permutation_007 { + + type record of integer RoI; + + template RoI t_source := { 1, 2 }; + template RoI t_perm1 := { permutation (all from t_source), 5 }; + template RoI t_perm2 := { -1, permutation (0, all from t_source, 3) }; + + + type component GeneralComp { + } + + testcase TC_Sem_B010303_permutation_007() runs on GeneralComp { + if (match({ 2, 1, 5 }, t_perm1) and match({ -1, 1, 0, 2, 3 }, t_perm2)) { + setverdict(pass); + } else { + setverdict(fail); + } + } + + control{ + execute(TC_Sem_B010303_permutation_007()); + } + +} diff --git a/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0103_matching_inside_values/B010303_permutation/Sem_B010303_permutation_008.ttcn b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0103_matching_inside_values/B010303_permutation/Sem_B010303_permutation_008.ttcn new file mode 100644 index 00000000..26cd5f2e --- /dev/null +++ b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0103_matching_inside_values/B010303_permutation/Sem_B010303_permutation_008.ttcn @@ -0,0 +1,38 @@ +/*************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:B.1.3.3, Ensure that all from clause operand can be a set of value + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Besides specifying all individual values, it is possible to add all elements of +// a set of template into permutations using an all from clause. +// + +module Sem_B010303_permutation_008 { + + type set of integer SoI; + type record of integer RoI; + + template SoI t_source := { 1, 2 }; + template RoI t_perm1 := { permutation (all from t_source), 5 }; + template RoI t_perm2 := { -1, permutation (0, all from t_source, 3) }; + + + type component GeneralComp { + } + + testcase TC_Sem_B010303_permutation_008() runs on GeneralComp { + if (match({ 2, 1, 5 }, t_perm1) and match({ -1, 1, 0, 2, 3 }, t_perm2)) { + setverdict(pass); + } else { + setverdict(fail); + } + } + + control{ + execute(TC_Sem_B010303_permutation_008()); + } + +} diff --git a/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0103_matching_inside_values/B010303_permutation/Sem_B010303_permutation_009.ttcn b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0103_matching_inside_values/B010303_permutation/Sem_B010303_permutation_009.ttcn new file mode 100644 index 00000000..78f3b675 --- /dev/null +++ b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0103_matching_inside_values/B010303_permutation/Sem_B010303_permutation_009.ttcn @@ -0,0 +1,62 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:B.1.3.3, Ensure that all from clause operand can be a set of value + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +/* Restriction d) Individual members of a permutation and elements of the template in the all from clause shall only be +expressions, templates obeying to restriction c) above, and the AnyElement and AnyElementsOrNone matching +mechanisms.*/ + +module Sem_B010303_permutation_009 { + + type set of integer SoI; + type record of integer RoI; + + type record MessageType { + record of integer field1 + } + + type port loopbackPort message { + inout MessageType + } + + +type component GeneralComp { + port loopbackPort messagePort +} + + template SoI t_source := { 1, 2 ,?}; + template RoI t_perm1 := { permutation (all from t_source), 5 }; //using all from with ? + + testcase TC_Sem_B010303_permutation_009() runs on GeneralComp { + + var MessageType v_testMessage; + + template MessageType mw_matchingTemplate:= + { + field1 := t_perm1 + } + + v_testMessage:= { + field1 := {2,1,3,5} + } + + messagePort.send(v_testMessage); + + alt { + [] messagePort.receive(mw_matchingTemplate) { + setverdict(pass); + } + [] messagePort.receive { + setverdict(fail); + } + } +} + control{ + execute(TC_Sem_B010303_permutation_009()); + } + +} diff --git a/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0104_matching_attributes_of_values/B010401_length_restrictions/NegSem_B010401_length_restrictions_003.ttcn b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0104_matching_attributes_of_values/B010401_length_restrictions/NegSem_B010401_length_restrictions_003.ttcn new file mode 100644 index 00000000..0a36f1c2 --- /dev/null +++ b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0104_matching_attributes_of_values/B010401_length_restrictions/NegSem_B010401_length_restrictions_003.ttcn @@ -0,0 +1,64 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:B.1.4.1, Ensure that the IUT correctly handles template matching of value length definitions + ** @verdict pass reject + ***************************************************/ + +module NegSem_B010401_length_restrictions_003 { + + + type record MessageType { + record of integer field1, + record of integer field2, + record of integer field3, + record of integer field4, + record of integer field5, + record of integer field6 + } + + type port loopbackPort message { + inout MessageType + } + + +type component GeneralComp { + port loopbackPort messagePort +} + +testcase TC_NegSem_B010401_length_restrictions_003() runs on GeneralComp { + + var MessageType v_testMessage; + + template MessageType mw_matchingTemplate:= + { + field1 := { permutation ( 1, 2, 3 ), * } length (4), // message length is too short + field2 := { (1,2),* } length (2 .. 5), + field3 := { permutation ( 1, 2, 3 ), ? } length (4), + field4 := { (1,2),? } length (2 .. 5) + } + + v_testMessage:= { + field1 := {2,1,3}, + field2 := {2,1,3,5}, + field3 := {2,1,3,5}, + field4 := {1,1} + } + + messagePort.send(v_testMessage); + + alt { + [] messagePort.receive(mw_matchingTemplate) { + setverdict(fail); + } + [] messagePort.receive { + setverdict(pass); + } + } +} + +control{ + execute(TC_NegSem_B010401_length_restrictions_003()); +} + +} diff --git a/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0104_matching_attributes_of_values/B010401_length_restrictions/NegSem_B010401_length_restrictions_004.ttcn b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0104_matching_attributes_of_values/B010401_length_restrictions/NegSem_B010401_length_restrictions_004.ttcn new file mode 100644 index 00000000..422a78db --- /dev/null +++ b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0104_matching_attributes_of_values/B010401_length_restrictions/NegSem_B010401_length_restrictions_004.ttcn @@ -0,0 +1,64 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:B.1.4.1, Ensure that the IUT correctly handles template matching of value length definitions + ** @verdict pass reject + ***************************************************/ + +module NegSem_B010401_length_restrictions_004 { + + + type record MessageType { + record of integer field1, + record of integer field2, + record of integer field3, + record of integer field4, + record of integer field5, + record of integer field6 + } + + type port loopbackPort message { + inout MessageType + } + + +type component GeneralComp { + port loopbackPort messagePort +} + +testcase TC_NegSem_B010401_length_restrictions_004() runs on GeneralComp { + + var MessageType v_testMessage; + + template MessageType mw_matchingTemplate:= + { + field1 := { permutation ( 1, 2, 3 ), * } length (3..4), + field2 := { (1,2),* } length (2 .. 5), + field3 := { permutation ( 1, 2, 3 ), ? } length (2..3), // message length is too long + field4 := { (1,2),? } length (2 .. 5) + } + + v_testMessage:= { + field1 := {2,1,3}, + field2 := {2,1,3,5}, + field3 := {2,1,3,5}, + field4 := {1,1} + } + + messagePort.send(v_testMessage); + + alt { + [] messagePort.receive(mw_matchingTemplate) { + setverdict(fail); + } + [] messagePort.receive { + setverdict(pass); + } + } +} + +control{ + execute(TC_NegSem_B010401_length_restrictions_004()); +} + +} diff --git a/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0104_matching_attributes_of_values/B010401_length_restrictions/Sem_B010401_length_restrictions_001.ttcn b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0104_matching_attributes_of_values/B010401_length_restrictions/Sem_B010401_length_restrictions_001.ttcn new file mode 100644 index 00000000..19c2c1e1 --- /dev/null +++ b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0104_matching_attributes_of_values/B010401_length_restrictions/Sem_B010401_length_restrictions_001.ttcn @@ -0,0 +1,68 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:B.1.4.1, Ensure that the IUT correctly handles template matching of value length definitions + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +module Sem_B010401_length_restrictions_001 { + + + type record MessageType { + charstring field1, + bitstring field2, + hexstring field3, + charstring field4, + bitstring field5, + hexstring field6 + } + + type port loopbackPort message { + inout MessageType + } + + +type component GeneralComp { + port loopbackPort messagePort +} + +testcase TC_Sem_B010401_length_restrictions_001() runs on GeneralComp { + + var MessageType v_testMessage; + + template MessageType mw_matchingTemplate:= + { + field1 := pattern "test s*g" length (6 .. 13), + field2 := '10*'B length (3 .. 5), + field3 := '89*ABC'H length (5), + field4 := pattern "tes?" length (4 .. 13), + field5 := '10?'B length (3 .. 5), + field6 := '89?ABC'H length (6) + } + + v_testMessage:= { + field1 := "test string", + field2 := '10101'B, + field3 := '89ABC'H, + field4 := "test", + field5 := '101'B, + field6 := '899ABC'H + } + + messagePort.send(v_testMessage); + + alt { + [] messagePort.receive(mw_matchingTemplate) { + setverdict(pass); + } + [] messagePort.receive { + setverdict(fail); + } + } +} + +control{ + execute(TC_Sem_B010401_length_restrictions_001()); +} + +} diff --git a/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0104_matching_attributes_of_values/B010401_length_restrictions/Sem_B010401_length_restrictions_002.ttcn b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0104_matching_attributes_of_values/B010401_length_restrictions/Sem_B010401_length_restrictions_002.ttcn new file mode 100644 index 00000000..dffa2c5a --- /dev/null +++ b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0104_matching_attributes_of_values/B010401_length_restrictions/Sem_B010401_length_restrictions_002.ttcn @@ -0,0 +1,62 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:B.1.4.1, Ensure that the IUT correctly handles template matching of value length definitions + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +module Sem_B010401_length_restrictions_002 { + + + type record MessageType { + record of integer field1, + record of integer field2, + record of integer field3, + record of integer field4 + } + + type port loopbackPort message { + inout MessageType + } + + +type component GeneralComp { + port loopbackPort messagePort +} + +testcase TC_Sem_B010401_length_restrictions_002() runs on GeneralComp { + + var MessageType v_testMessage; + + template MessageType mw_matchingTemplate:= + { + field1 := { permutation ( 1, 2, 3 ), * } length (3 .. 4), + field2 := { (1,2),* } length (2 .. 5), + field3 := { permutation ( 1, 2, 3 ), ? } length (4), + field4 := { (1,2),? } length (2 .. 5) + } + + v_testMessage:= { + field1 := {2,1,3}, + field2 := {2,1,3,5}, + field3 := {2,1,3,5}, + field4 := {1,1} + } + + messagePort.send(v_testMessage); + + alt { + [] messagePort.receive(mw_matchingTemplate) { + setverdict(pass); + } + [] messagePort.receive { + setverdict(fail); + } + } +} + +control{ + execute(TC_Sem_B010401_length_restrictions_002()); +} + +} diff --git a/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0104_matching_attributes_of_values/B010401_length_restrictions/Sem_B010401_length_restrictions_003.ttcn b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0104_matching_attributes_of_values/B010401_length_restrictions/Sem_B010401_length_restrictions_003.ttcn new file mode 100644 index 00000000..9104dde0 --- /dev/null +++ b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0104_matching_attributes_of_values/B010401_length_restrictions/Sem_B010401_length_restrictions_003.ttcn @@ -0,0 +1,68 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:B.1.4.1, Ensure that the IUT correctly handles template matching of value length definitions + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +module Sem_B010401_length_restrictions_003 { + + + type record MessageType { + charstring field1, + bitstring field2, + hexstring field3, + charstring field4, + bitstring field5, + hexstring field6 + } + + type port loopbackPort message { + inout MessageType + } + + +type component GeneralComp { + port loopbackPort messagePort +} + +testcase TC_Sem_B010401_length_restrictions_003() runs on GeneralComp { + + var MessageType v_testMessage; + + template MessageType mw_matchingTemplate:= + { + field1 := pattern "test mess*ge" length (6 .. 8), //pattern is longer than length restriction - valid, but never matches + field2 := '10*'B length (3 .. 5), + field3 := '89*ABC'H length (5), + field4 := pattern "tes?" length (4 .. 13), + field5 := '10?'B length (3 .. 5), + field6 := '89?ABC'H length (6) + } + + v_testMessage:= { + field1 := "test string", + field2 := '10101'B, + field3 := '89ABC'H, + field4 := "test", + field5 := '101'B, + field6 := '899ABC'H + } + + messagePort.send(v_testMessage); + + alt { + [] messagePort.receive(mw_matchingTemplate) { + setverdict(fail); + } + [] messagePort.receive { + setverdict(pass); + } + } +} + +control{ + execute(TC_Sem_B010401_length_restrictions_003()); +} + +} diff --git a/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0104_matching_attributes_of_values/B010401_length_restrictions/Sem_B010401_length_restrictions_004.ttcn b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0104_matching_attributes_of_values/B010401_length_restrictions/Sem_B010401_length_restrictions_004.ttcn new file mode 100644 index 00000000..b3528fad --- /dev/null +++ b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0104_matching_attributes_of_values/B010401_length_restrictions/Sem_B010401_length_restrictions_004.ttcn @@ -0,0 +1,68 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:B.1.4.1, Ensure that the IUT correctly handles template matching of value length definitions + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +module Sem_B010401_length_restrictions_004 { + + + type record MessageType { + charstring field1, + bitstring field2, + hexstring field3, + charstring field4, + bitstring field5, + hexstring field6 + } + + type port loopbackPort message { + inout MessageType + } + + +type component GeneralComp { + port loopbackPort messagePort +} + +testcase TC_Sem_B010401_length_restrictions_004() runs on GeneralComp { + + var MessageType v_testMessage; + + template MessageType mw_matchingTemplate:= + { + field1 := pattern "test s*g" length (6 .. 15), + field2 := '10*'B length (3 .. 5), + field3 := '89?AB'H length (6), //pattern is shorter than length restriction + field4 := pattern "tes?" length (4 .. 13), + field5 := '10?'B length (3 .. 5), + field6 := '89?ABC'H length (6) + } + + v_testMessage:= { + field1 := "test string", + field2 := '10101'B, + field3 := '89ABC'H, + field4 := "test", + field5 := '101'B, + field6 := '899ABC'H + } + + messagePort.send(v_testMessage); + + alt { + [] messagePort.receive(mw_matchingTemplate) { + setverdict(fail); + } + [] messagePort.receive { + setverdict(pass); + } + } +} + +control{ + execute(TC_Sem_B010401_length_restrictions_004()); +} + +} diff --git a/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0104_matching_attributes_of_values/B010402_ifPresent_indicator/NegSem_B010402_ifPresent_indicator_001.ttcn b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0104_matching_attributes_of_values/B010402_ifPresent_indicator/NegSem_B010402_ifPresent_indicator_001.ttcn new file mode 100644 index 00000000..4258cce5 --- /dev/null +++ b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0104_matching_attributes_of_values/B010402_ifPresent_indicator/NegSem_B010402_ifPresent_indicator_001.ttcn @@ -0,0 +1,66 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:B.1.4.2, Ensure that the IUT correctly handles template matching of ifpresent indicators + ** @verdict pass reject + ***************************************************/ + +module NegSem_B010402_ifPresent_indicator_001 { + + type enumerated EnumeratedType {e_black, e_white, e_green}; + + type record RecordType { + integer a optional, + integer b optional, + boolean c + } + + type union UnionType { + integer a, + EnumeratedType b, + boolean c + } + + type record MessageType { + integer field1 optional, + charstring field2 optional, + RecordType field3, + UnionType field4 optional + } + + type port loopbackPort message { + inout MessageType + } + + +type component GeneralComp { + port loopbackPort messagePort +} + +testcase TC_NegSem_B010402_ifPresent_indicator_001() runs on GeneralComp { + + var MessageType v_testMessage; + + template MessageType mw_matchingTemplate:= + { + field1 := (0..2) ifpresent, + field2 := ("aaa".."fff") ifpresent, + field3 := {a:=1,b:=(0..2) ifpresent,c:=true} ifpresent, //use of ifpresent on non-optional field + field4 := {a:=(0..2)} ifpresent + } + + v_testMessage:= { + field1 := omit, + field2 := omit, + field3 := {a:=1,b:=omit,c:=true}, + field4 := omit + } + + messagePort.send(v_testMessage); +} + +control{ + execute(TC_NegSem_B010402_ifPresent_indicator_001()); +} + +} diff --git a/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0104_matching_attributes_of_values/B010402_ifPresent_indicator/Sem_B010402_ifPresent_indicator_001.ttcn b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0104_matching_attributes_of_values/B010402_ifPresent_indicator/Sem_B010402_ifPresent_indicator_001.ttcn new file mode 100644 index 00000000..53d8830e --- /dev/null +++ b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0104_matching_attributes_of_values/B010402_ifPresent_indicator/Sem_B010402_ifPresent_indicator_001.ttcn @@ -0,0 +1,75 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:B.1.4.2, Ensure that the IUT correctly handles template matching of ifpresent indicators + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +module Sem_B010402_ifPresent_indicator_001 { + + type enumerated EnumeratedType {e_black, e_white, e_green}; + + type record RecordType { + integer a optional, + integer b optional, + boolean c + } + + type union UnionType { + integer a, + EnumeratedType b, + boolean c + } + + type record MessageType { + integer field1 optional, + charstring field2 optional, + RecordType field3, + UnionType field4 optional + } + + type port loopbackPort message { + inout MessageType + } + + +type component GeneralComp { + port loopbackPort messagePort +} + +testcase TC_Sem_B010402_ifPresent_indicator_001() runs on GeneralComp { + + var MessageType v_testMessage; + + template MessageType mw_matchingTemplate:= + { + field1 := (0..2) ifpresent, + field2 := "[a-f]" ifpresent, + field3 := {a:=1,b:=(0..2) ifpresent,c:=true}, + field4 := {a:=(0..2)} ifpresent + } + + v_testMessage:= { + field1 := omit, + field2 := omit, + field3 := {a:=1,b:=omit,c:=true}, + field4 := omit + } + + messagePort.send(v_testMessage); + + alt { + [] messagePort.receive(mw_matchingTemplate) { + setverdict(pass); + } + [] messagePort.receive { + setverdict(fail); + } + } +} + +control{ + execute(TC_Sem_B010402_ifPresent_indicator_001()); +} + +} diff --git a/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0104_matching_attributes_of_values/B010402_ifPresent_indicator/Sem_B010402_ifPresent_indicator_002.ttcn b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0104_matching_attributes_of_values/B010402_ifPresent_indicator/Sem_B010402_ifPresent_indicator_002.ttcn new file mode 100644 index 00000000..68cef213 --- /dev/null +++ b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0104_matching_attributes_of_values/B010402_ifPresent_indicator/Sem_B010402_ifPresent_indicator_002.ttcn @@ -0,0 +1,75 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:B.1.4.2, Ensure that the IUT correctly handles template matching of ifpresent indicators + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +module Sem_B010402_ifPresent_indicator_002 { + + type enumerated EnumeratedType {e_black, e_white, e_green}; + + type record RecordType { + integer a optional, + integer b optional, + boolean c + } + + type union UnionType { + integer a, + EnumeratedType b, + boolean c + } + + type record MessageType { + integer field1 optional, + charstring field2 optional, + RecordType field3, + UnionType field4 optional + } + + type port loopbackPort message { + inout MessageType + } + + +type component GeneralComp { + port loopbackPort messagePort +} + +testcase TC_Sem_B010402_ifPresent_indicator_002() runs on GeneralComp { + + var MessageType v_testMessage; + + template MessageType mw_matchingTemplate:= + { + field1 := (0..2) ifpresent, + field2 := ("a".."f") length (3) ifpresent, + field3 := {a:=1,b:=(0..2) ifpresent,c:=true}, //element b is present and out of range + field4 := {a:=(0..2)} ifpresent + } + + v_testMessage:= { + field1 := omit, + field2 := omit, + field3 := {a:=1,b:=3,c:=true}, + field4 := omit + } + + messagePort.send(v_testMessage); + + alt { + [] messagePort.receive(mw_matchingTemplate) { + setverdict(fail); + } + [] messagePort.receive { + setverdict(pass); + } + } +} + +control{ + execute(TC_Sem_B010402_ifPresent_indicator_002()); +} + +} diff --git a/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0105_matching_character_pattern/B010501_set_expression/Sem_B010501_set_expression_001.ttcn b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0105_matching_character_pattern/B010501_set_expression/Sem_B010501_set_expression_001.ttcn new file mode 100644 index 00000000..f695d918 --- /dev/null +++ b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0105_matching_character_pattern/B010501_set_expression/Sem_B010501_set_expression_001.ttcn @@ -0,0 +1,59 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:B.1.5.1, Ensure that the IUT correctly handles template matching of character pattern set expressions + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +module Sem_B010501_set_expression_001 { + + + type record MessageType { + charstring field1, + charstring field2, + charstring field3 + } + + type port loopbackPort message { + inout MessageType + } + + +type component GeneralComp { + port loopbackPort messagePort +} + +testcase TC_Sem_B010501_set_expression_001() runs on GeneralComp { + + var MessageType v_testMessage; + + template MessageType mw_matchingTemplate:= + { + field1 := pattern "te[pqrs]t[0-9]", + field2 := pattern "test[^a-z]", + field3 := pattern "[A-Z]est" + } + + v_testMessage:= { + field1 := "test1", + field2 := "test1", + field3 := "Test" + } + + messagePort.send(v_testMessage); + + alt { + [] messagePort.receive(mw_matchingTemplate) { + setverdict(pass); + } + [] messagePort.receive { + setverdict(fail); + } + } +} + +control{ + execute(TC_Sem_B010501_set_expression_001()); +} + +} diff --git a/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0105_matching_character_pattern/B010501_set_expression/Sem_B010501_set_expression_002.ttcn b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0105_matching_character_pattern/B010501_set_expression/Sem_B010501_set_expression_002.ttcn new file mode 100644 index 00000000..8a460abf --- /dev/null +++ b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0105_matching_character_pattern/B010501_set_expression/Sem_B010501_set_expression_002.ttcn @@ -0,0 +1,59 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:B.1.5.1, Ensure that the IUT correctly handles template matching of character pattern set expressions + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +module Sem_B010501_set_expression_002 { + + + type record MessageType { + charstring field1, + charstring field2, + charstring field3 + } + + type port loopbackPort message { + inout MessageType + } + + +type component GeneralComp { + port loopbackPort messagePort +} + +testcase TC_Sem_B010501_set_expression_002() runs on GeneralComp { + + var MessageType v_testMessage; + + template MessageType mw_matchingTemplate:= + { + field1 := pattern "te[pqrs]t[0-9]", //mismatching set + field2 := pattern "test[^a-z]", + field3 := pattern "[A-Z]est" + } + + v_testMessage:= { + field1 := "text1", + field2 := "test1", + field3 := "Test" + } + + messagePort.send(v_testMessage); + + alt { + [] messagePort.receive(mw_matchingTemplate) { + setverdict(fail); + } + [] messagePort.receive { + setverdict(pass); + } + } +} + +control{ + execute(TC_Sem_B010501_set_expression_002()); +} + +} diff --git a/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0105_matching_character_pattern/B010501_set_expression/Sem_B010501_set_expression_003.ttcn b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0105_matching_character_pattern/B010501_set_expression/Sem_B010501_set_expression_003.ttcn new file mode 100644 index 00000000..86d077d2 --- /dev/null +++ b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0105_matching_character_pattern/B010501_set_expression/Sem_B010501_set_expression_003.ttcn @@ -0,0 +1,59 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:B.1.5.1, Ensure that the IUT correctly handles template matching of character pattern set expressions + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +module Sem_B010501_set_expression_003 { + + + type record MessageType { + charstring field1, + charstring field2, + charstring field3 + } + + type port loopbackPort message { + inout MessageType + } + + +type component GeneralComp { + port loopbackPort messagePort +} + +testcase TC_Sem_B010501_set_expression_003() runs on GeneralComp { + + var MessageType v_testMessage; + + template MessageType mw_matchingTemplate:= + { + field1 := pattern "te[pqrs]t[0-9]", + field2 := pattern "test[^a-z]", //mismatching negation + field3 := pattern "[A-Z]est" + } + + v_testMessage:= { + field1 := "test1", + field2 := "testx", + field3 := "Test" + } + + messagePort.send(v_testMessage); + + alt { + [] messagePort.receive(mw_matchingTemplate) { + setverdict(fail); + } + [] messagePort.receive { + setverdict(pass); + } + } +} + +control{ + execute(TC_Sem_B010501_set_expression_003()); +} + +} diff --git a/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0105_matching_character_pattern/B010501_set_expression/Sem_B010501_set_expression_004.ttcn b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0105_matching_character_pattern/B010501_set_expression/Sem_B010501_set_expression_004.ttcn new file mode 100644 index 00000000..d17c74b3 --- /dev/null +++ b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0105_matching_character_pattern/B010501_set_expression/Sem_B010501_set_expression_004.ttcn @@ -0,0 +1,59 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:B.1.5.1, Ensure that the IUT correctly handles template matching of character pattern set expressions + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +module Sem_B010501_set_expression_004 { + + + type record MessageType { + charstring field1, + charstring field2, + charstring field3 + } + + type port loopbackPort message { + inout MessageType + } + + +type component GeneralComp { + port loopbackPort messagePort +} + +testcase TC_Sem_B010501_set_expression_004() runs on GeneralComp { + + var MessageType v_testMessage; + + template MessageType mw_matchingTemplate:= + { + field1 := pattern "te[pqrs]t[0-9]", + field2 := pattern "test[^a-z]", + field3 := pattern "[A-Z]est" //mismatching small/large caps + } + + v_testMessage:= { + field1 := "test1", + field2 := "test1", + field3 := "test" + } + + messagePort.send(v_testMessage); + + alt { + [] messagePort.receive(mw_matchingTemplate) { + setverdict(fail); + } + [] messagePort.receive { + setverdict(pass); + } + } +} + +control{ + execute(TC_Sem_B010501_set_expression_004()); +} + +} diff --git a/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0105_matching_character_pattern/B010501_set_expression/Sem_B010501_set_expression_005.ttcn b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0105_matching_character_pattern/B010501_set_expression/Sem_B010501_set_expression_005.ttcn new file mode 100644 index 00000000..602931f1 --- /dev/null +++ b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0105_matching_character_pattern/B010501_set_expression/Sem_B010501_set_expression_005.ttcn @@ -0,0 +1,59 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:B.1.5.1, Ensure that the IUT correctly handles template matching of character pattern set expressions + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +module Sem_B010501_set_expression_005 { + + + type record MessageType { + charstring field1, + charstring field2, + charstring field3 + } + + type port loopbackPort message { + inout MessageType + } + + +type component GeneralComp { + port loopbackPort messagePort +} + +testcase TC_Sem_B010501_set_expression_005() runs on GeneralComp { + + var MessageType v_testMessage; + + template MessageType mw_matchingTemplate:= + { + field1 := pattern "te[pqrs]t[0-9]", + field2 := pattern "test[^a-z]", + field3 := pattern "test[-]string" //mismatching literal - separator + } + + v_testMessage:= { + field1 := "test1", + field2 := "test1", + field3 := "test string" + } + + messagePort.send(v_testMessage); + + alt { + [] messagePort.receive(mw_matchingTemplate) { + setverdict(fail); + } + [] messagePort.receive { + setverdict(pass); + } + } +} + +control{ + execute(TC_Sem_B010501_set_expression_005()); +} + +} diff --git a/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0105_matching_character_pattern/B010501_set_expression/Sem_B010501_set_expression_006.ttcn b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0105_matching_character_pattern/B010501_set_expression/Sem_B010501_set_expression_006.ttcn new file mode 100644 index 00000000..4d84ac40 --- /dev/null +++ b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0105_matching_character_pattern/B010501_set_expression/Sem_B010501_set_expression_006.ttcn @@ -0,0 +1,56 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:B.1.5.1, Ensure that the IUT correctly handles template matching of character pattern set expressions + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +module Sem_B010501_set_expression_006 { + + + type record MessageType { + universal charstring field1, + universal charstring field2 + } + + type port loopbackPort message { + inout MessageType + } + + +type component GeneralComp { + port loopbackPort messagePort +} + +testcase TC_Sem_B010501_set_expression_006() runs on GeneralComp { + + var MessageType v_testMessage; + + template MessageType mw_matchingTemplate:= + { + field1 := pattern "test[\q{0,0,1,113}]", //accepted \q character is ű + field2 := pattern "test[^\q{0,0,1,113}]" //accepted characters are: anything execpt ű + } + + v_testMessage:= { + field1 := "testű", + field2 := "testb" + } + + messagePort.send(v_testMessage); + + alt { + [] messagePort.receive(mw_matchingTemplate) { + setverdict(pass); + } + [] messagePort.receive { + setverdict(fail); + } + } +} + +control{ + execute(TC_Sem_B010501_set_expression_006()); +} + +} diff --git a/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0105_matching_character_pattern/B010502_reference_expression/Sem_B010502_reference_expression_001.ttcn b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0105_matching_character_pattern/B010502_reference_expression/Sem_B010502_reference_expression_001.ttcn new file mode 100644 index 00000000..18c82c00 --- /dev/null +++ b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0105_matching_character_pattern/B010502_reference_expression/Sem_B010502_reference_expression_001.ttcn @@ -0,0 +1,77 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:B.1.5.2, Ensure that the IUT correctly handles template matching of character pattern reference expressions + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +module Sem_B010502_reference_expression_001 { + + modulepar { + charstring MOD_REF:="modulepar reference"; + } + + type record MessageType { + charstring field1, + charstring field2, + charstring field3, + charstring field4, + charstring field5, + charstring field6, + charstring field7 + } + + type port loopbackPort message { + inout MessageType + } + + const charstring c_Ref:="constant reference"; + +type component GeneralComp { + port loopbackPort messagePort; +} + +testcase TC_Sem_B010502_reference_expression_001(charstring p_Ref) runs on GeneralComp { + + var MessageType v_testMessage; + var charstring v_Ref:="variable reference"; + template charstring m_Ref:= pattern "{c_Ref}"; + + template MessageType mw_matchingTemplate:= + { + field1 := pattern "{v_Ref}", + field2 := pattern "{c_Ref}", + field3 := pattern "{MOD_REF}", + field4 := pattern "{p_Ref}", + field5 := pattern "{m_Ref}", + field6 := pattern "{m_"&"Ref}!", + field7 := pattern "{v_Ref} and {c_Ref}" + }; + + v_testMessage:= { + field1 := "variable reference", + field2 := "constant reference", + field3 := "modulepar reference", + field4 := "parameter reference", + field5 := "constant reference", + field6 := "constant reference!", + field7 := "variable reference and constant reference" + }; + + messagePort.send(v_testMessage); + + alt { + [] messagePort.receive(mw_matchingTemplate) { + setverdict(pass); + } + [] messagePort.receive { + setverdict(fail); + } + } +} + +control{ + execute(TC_Sem_B010502_reference_expression_001("parameter reference")); +} + +} diff --git a/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0105_matching_character_pattern/B010502_reference_expression/Sem_B010502_reference_expression_002.ttcn b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0105_matching_character_pattern/B010502_reference_expression/Sem_B010502_reference_expression_002.ttcn new file mode 100644 index 00000000..e0e67115 --- /dev/null +++ b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0105_matching_character_pattern/B010502_reference_expression/Sem_B010502_reference_expression_002.ttcn @@ -0,0 +1,77 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:B.1.5.2, Ensure that the IUT correctly handles template matching of character pattern reference expressions + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +module Sem_B010502_reference_expression_002 { + + modulepar { + charstring MOD_REF:="modulepar reference"; + } + + type record MessageType { + charstring field1, + charstring field2, + charstring field3, + charstring field4, + charstring field5, + charstring field6, + charstring field7 + } + + type port loopbackPort message { + inout MessageType + } + + const charstring c_Ref:="constant reference"; + +type component GeneralComp { + port loopbackPort messagePort +} + +testcase TC_Sem_B010502_reference_expression_002(charstring p_Ref) runs on GeneralComp { + + var MessageType v_testMessage; + var charstring v_Ref:="variable reference"; + template charstring m_Ref:= pattern "{c_Ref}"; + + template MessageType mw_matchingTemplate:= + { + field1 := pattern "{v_Ref}", //mismatch in this reference + field2 := pattern "{c_Ref}", + field3 := pattern "{MOD_REF}", + field4 := pattern "{p_Ref}", + field5 := pattern "{m_Ref}", + field6 := pattern "{m_"&"Ref}!", + field7 := pattern "{v_Ref} and {c_Ref}" + }; + + v_testMessage:= { + field1 := "variable reference ", + field2 := "constant reference", + field3 := "modulepar reference", + field4 := "parameter reference", + field5 := "constant reference", + field6 := "constant reference!", + field7 := "variable reference and constant reference" + }; + + messagePort.send(v_testMessage); + + alt { + [] messagePort.receive(mw_matchingTemplate) { + setverdict(fail); + } + [] messagePort.receive { + setverdict(pass); + } + } +} + +control{ + execute(TC_Sem_B010502_reference_expression_002("parameter reference")); +} + +} diff --git a/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0105_matching_character_pattern/B010502_reference_expression/Sem_B010502_reference_expression_003.ttcn b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0105_matching_character_pattern/B010502_reference_expression/Sem_B010502_reference_expression_003.ttcn new file mode 100644 index 00000000..8cde0e0e --- /dev/null +++ b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0105_matching_character_pattern/B010502_reference_expression/Sem_B010502_reference_expression_003.ttcn @@ -0,0 +1,77 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:B.1.5.2, Ensure that the IUT correctly handles template matching of character pattern reference expressions + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +module Sem_B010502_reference_expression_003 { + + modulepar { + charstring MOD_REF:="modulepar reference"; + } + + type record MessageType { + charstring field1, + charstring field2, + charstring field3, + charstring field4, + charstring field5, + charstring field6, + charstring field7 + } + + type port loopbackPort message { + inout MessageType + } + + const charstring c_Ref:="constant reference"; + +type component GeneralComp { + port loopbackPort messagePort +} + +testcase TC_Sem_B010502_reference_expression_003(charstring p_Ref) runs on GeneralComp { + + var MessageType v_testMessage; + var charstring v_Ref:="variable reference"; + template charstring m_Ref:= pattern "{c_Ref}"; + + template MessageType mw_matchingTemplate:= + { + field1 := pattern "{v_Ref}", + field2 := pattern "{c_Ref}", //mismatch in this reference + field3 := pattern "{MOD_REF}", + field4 := pattern "{p_Ref}", + field5 := pattern "{m_Ref}", + field6 := pattern "{m_"&"Ref}!", + field7 := pattern "{v_Ref} and {c_Ref}" + }; + + v_testMessage:= { + field1 := "variable reference", + field2 := "constant reference ", + field3 := "modulepar reference", + field4 := "parameter reference", + field5 := "constant reference", + field6 := "constant reference!", + field7 := "variable reference and constant reference" + }; + + messagePort.send(v_testMessage); + + alt { + [] messagePort.receive(mw_matchingTemplate) { + setverdict(fail); + } + [] messagePort.receive { + setverdict(pass); + } + } +} + +control{ + execute(TC_Sem_B010502_reference_expression_003("parameter reference")); +} + +} diff --git a/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0105_matching_character_pattern/B010502_reference_expression/Sem_B010502_reference_expression_004.ttcn b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0105_matching_character_pattern/B010502_reference_expression/Sem_B010502_reference_expression_004.ttcn new file mode 100644 index 00000000..5072009f --- /dev/null +++ b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0105_matching_character_pattern/B010502_reference_expression/Sem_B010502_reference_expression_004.ttcn @@ -0,0 +1,77 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:B.1.5.2, Ensure that the IUT correctly handles template matching of character pattern reference expressions + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +module Sem_B010502_reference_expression_004 { + + modulepar { + charstring MOD_REF:="modulepar reference"; + } + + type record MessageType { + charstring field1, + charstring field2, + charstring field3, + charstring field4, + charstring field5, + charstring field6, + charstring field7 + } + + type port loopbackPort message { + inout MessageType + } + + const charstring c_Ref:="constant reference"; + +type component GeneralComp { + port loopbackPort messagePort +} + +testcase TC_Sem_B010502_reference_expression_004(charstring p_Ref) runs on GeneralComp { + + var MessageType v_testMessage; + var charstring v_Ref:="variable reference"; + template charstring m_Ref:= pattern "{c_Ref}"; + + template MessageType mw_matchingTemplate:= + { + field1 := pattern "{v_Ref}", + field2 := pattern "{c_Ref}", + field3 := pattern "{MOD_REF}", //mismatch in this reference + field4 := pattern "{p_Ref}", + field5 := pattern "{m_Ref}", + field6 := pattern "{m_"&"Ref}!", + field7 := pattern "{v_Ref} and {c_Ref}" + }; + + v_testMessage:= { + field1 := "variable reference", + field2 := "constant reference", + field3 := "modulepar reference ", + field4 := "parameter reference", + field5 := "constant reference", + field6 := "constant reference!", + field7 := "variable reference and constant reference" + }; + + messagePort.send(v_testMessage); + + alt { + [] messagePort.receive(mw_matchingTemplate) { + setverdict(fail); + } + [] messagePort.receive { + setverdict(pass); + } + } +} + +control{ + execute(TC_Sem_B010502_reference_expression_004("parameter reference")); +} + +} diff --git a/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0105_matching_character_pattern/B010502_reference_expression/Sem_B010502_reference_expression_005.ttcn b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0105_matching_character_pattern/B010502_reference_expression/Sem_B010502_reference_expression_005.ttcn new file mode 100644 index 00000000..d747165f --- /dev/null +++ b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0105_matching_character_pattern/B010502_reference_expression/Sem_B010502_reference_expression_005.ttcn @@ -0,0 +1,79 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:B.1.5.2, Ensure that the IUT correctly handles template matching of character pattern reference expressions + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +module Sem_B010502_reference_expression_005 { + + modulepar { + charstring MOD_REF:="modulepar reference"; + } + + type record MessageType { + charstring field1, + charstring field2, + charstring field3, + charstring field4, + charstring field5, + charstring field6, + charstring field7 + } + + type port loopbackPort message { + inout MessageType + } + + const charstring c_Ref:="constant reference"; + +type component GeneralComp { + port loopbackPort messagePort +} + +testcase TC_Sem_B010502_reference_expression_005(charstring p_Ref) runs on GeneralComp { + + var MessageType v_testMessage; + var charstring v_Ref:="variable reference"; + template charstring m_Ref:= pattern "{c_Ref}"; + template charstring m_RefExp_p1 := pattern "{m_"; + template charstring m_RefExp_p2 := pattern "Ref}!"; + + template MessageType mw_matchingTemplate:= + { + field1 := pattern "{v_Ref}", + field2 := pattern "{c_Ref}", + field3 := pattern "{MOD_REF}", + field4 := pattern "{p_Ref}", //mismatch in this reference + field5 := pattern "{m_Ref}", + field6 := pattern "{m_"&"Ref}!", + field7 := pattern "{v_Ref} and {c_Ref}" + }; + + v_testMessage:= { + field1 := "variable reference", + field2 := "constant reference", + field3 := "modulepar reference", + field4 := "parameter reference ", + field5 := "constant reference", + field6 := "constant reference!", + field7 := "variable reference and constant reference" + }; + + messagePort.send(v_testMessage); + + alt { + [] messagePort.receive(mw_matchingTemplate) { + setverdict(fail); + } + [] messagePort.receive { + setverdict(pass); + } + } +} + +control{ + execute(TC_Sem_B010502_reference_expression_005("parameter reference")); +} + +} diff --git a/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0105_matching_character_pattern/B010502_reference_expression/Sem_B010502_reference_expression_006.ttcn b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0105_matching_character_pattern/B010502_reference_expression/Sem_B010502_reference_expression_006.ttcn new file mode 100644 index 00000000..3f9866b5 --- /dev/null +++ b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0105_matching_character_pattern/B010502_reference_expression/Sem_B010502_reference_expression_006.ttcn @@ -0,0 +1,77 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:B.1.5.2, Ensure that the IUT correctly handles template matching of character pattern reference expressions + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +module Sem_B010502_reference_expression_006 { + + modulepar { + charstring MOD_REF:="modulepar reference"; + } + + type record MessageType { + charstring field1, + charstring field2, + charstring field3, + charstring field4, + charstring field5, + charstring field6, + charstring field7 + } + + type port loopbackPort message { + inout MessageType + } + + const charstring c_Ref:="constant reference"; + +type component GeneralComp { + port loopbackPort messagePort +} + +testcase TC_Sem_B010502_reference_expression_006(charstring p_Ref) runs on GeneralComp { + + var MessageType v_testMessage; + var charstring v_Ref:="variable reference"; + template charstring m_Ref:= pattern "{c_Ref}"; + + template MessageType mw_matchingTemplate:= + { + field1 := pattern "{v_Ref}", + field2 := pattern "{c_Ref}", + field3 := pattern "{MOD_REF}", + field4 := pattern "{p_Ref}", + field5 := pattern "{m_Ref}", //mismatch in this reference + field6 := pattern "{m_"&"Ref}!", + field7 := pattern "{v_Ref} and {c_Ref}" + }; + + v_testMessage:= { + field1 := "variable reference", + field2 := "constant reference", + field3 := "modulepar reference", + field4 := "parameter reference", + field5 := "constant reference ", + field6 := "constant reference!", + field7 := "variable reference and constant reference" + }; + + messagePort.send(v_testMessage); + + alt { + [] messagePort.receive(mw_matchingTemplate) { + setverdict(fail); + } + [] messagePort.receive { + setverdict(pass); + } + } +} + +control{ + execute(TC_Sem_B010502_reference_expression_006("parameter reference")); +} + +} diff --git a/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0105_matching_character_pattern/B010502_reference_expression/Sem_B010502_reference_expression_007.ttcn b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0105_matching_character_pattern/B010502_reference_expression/Sem_B010502_reference_expression_007.ttcn new file mode 100644 index 00000000..5da71fae --- /dev/null +++ b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0105_matching_character_pattern/B010502_reference_expression/Sem_B010502_reference_expression_007.ttcn @@ -0,0 +1,77 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:B.1.5.2, Ensure that the IUT correctly handles template matching of character pattern reference expressions + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +module Sem_B010502_reference_expression_007 { + + modulepar { + charstring MOD_REF:="modulepar reference"; + } + + type record MessageType { + charstring field1, + charstring field2, + charstring field3, + charstring field4, + charstring field5, + charstring field6, + charstring field7 + } + + type port loopbackPort message { + inout MessageType + } + + const charstring c_Ref:="constant reference"; + +type component GeneralComp { + port loopbackPort messagePort +} + +testcase TC_Sem_B010502_reference_expression_007(charstring p_Ref) runs on GeneralComp { + + var MessageType v_testMessage; + var charstring v_Ref:="variable reference"; + template charstring m_Ref:= pattern "{c_Ref}"; + + template MessageType mw_matchingTemplate:= + { + field1 := pattern "{v_Ref}", + field2 := pattern "{c_Ref}", + field3 := pattern "{MOD_REF}", + field4 := pattern "{p_Ref}", + field5 := pattern "{m_Ref}", + field6 := pattern "{m_"&"Ref}!", //mismatch in this reference + field7 := pattern "{v_Ref} and {c_Ref}" + }; + + v_testMessage:= { + field1 := "variable reference", + field2 := "constant reference", + field3 := "modulepar reference", + field4 := "parameter reference", + field5 := "constant reference", + field6 := "{m_Ref}!", + field7 := "variable reference and constant reference" + }; + + messagePort.send(v_testMessage); + + alt { + [] messagePort.receive(mw_matchingTemplate) { + setverdict(fail); + } + [] messagePort.receive { + setverdict(pass); + } + } +} + +control{ + execute(TC_Sem_B010502_reference_expression_007("parameter reference")); +} + +} diff --git a/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0105_matching_character_pattern/B010502_reference_expression/Sem_B010502_reference_expression_008.ttcn b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0105_matching_character_pattern/B010502_reference_expression/Sem_B010502_reference_expression_008.ttcn new file mode 100644 index 00000000..2f4a1b89 --- /dev/null +++ b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0105_matching_character_pattern/B010502_reference_expression/Sem_B010502_reference_expression_008.ttcn @@ -0,0 +1,77 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:B.1.5.2, Ensure that the IUT correctly handles template matching of character pattern reference expressions + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +module Sem_B010502_reference_expression_008 { + + modulepar { + charstring MOD_REF:="modulepar reference"; + } + + type record MessageType { + charstring field1, + charstring field2, + charstring field3, + charstring field4, + charstring field5, + charstring field6, + charstring field7 + } + + type port loopbackPort message { + inout MessageType + } + + const charstring c_Ref:="constant reference"; + +type component GeneralComp { + port loopbackPort messagePort +} + +testcase TC_Sem_B010502_reference_expression_008(charstring p_Ref) runs on GeneralComp { + + var MessageType v_testMessage; + var charstring v_Ref:="variable reference"; + template charstring m_Ref:= pattern "{c_Ref}"; + + template MessageType mw_matchingTemplate:= + { + field1 := pattern "{v_Ref}", + field2 := pattern "{c_Ref}", + field3 := pattern "{MOD_REF}", + field4 := pattern "{p_Ref}", + field5 := pattern "{m_Ref}", + field6 := pattern "{m_"&"Ref}!", + field7 := pattern "{v_Ref} and {c_Ref}" //mismatch in this reference + }; + + v_testMessage:= { + field1 := "variable reference", + field2 := "constant reference", + field3 := "modulepar reference", + field4 := "parameter reference", + field5 := "constant reference", + field6 := "constant reference!", + field7 := " and constant reference" + }; + + messagePort.send(v_testMessage); + + alt { + [] messagePort.receive(mw_matchingTemplate) { + setverdict(fail); + } + [] messagePort.receive { + setverdict(pass); + } + } +} + +control{ + execute(TC_Sem_B010502_reference_expression_008("parameter reference")); +} + +} diff --git a/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0105_matching_character_pattern/B010502_reference_expression/Sem_B010502_reference_expression_009.ttcn b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0105_matching_character_pattern/B010502_reference_expression/Sem_B010502_reference_expression_009.ttcn new file mode 100644 index 00000000..1beca273 --- /dev/null +++ b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0105_matching_character_pattern/B010502_reference_expression/Sem_B010502_reference_expression_009.ttcn @@ -0,0 +1,54 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:B.1.5.2, Ensure that the IUT correctly handles template matching of character pattern reference expressions + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +module Sem_B010502_reference_expression_009 { + + + type record MessageType { + charstring field1 + } + + type port loopbackPort message { + inout MessageType + } + + +type component GeneralComp { + port loopbackPort messagePort +} + +testcase TC_Sem_B010502_reference_expression_009() runs on GeneralComp { + + var MessageType v_testMessage; + template charstring m_Ref:="a-z"; + + template MessageType mw_matchingTemplate:= + { + field1 := pattern "[{m_Ref}]" //mismatch as {} looses its meaning inside [] + }; + + v_testMessage:= { + field1 := "x" + }; + + messagePort.send(v_testMessage); + + alt { + [] messagePort.receive(mw_matchingTemplate) { + setverdict(fail); + } + [] messagePort.receive { + setverdict(pass); + } + } +} + +control{ + execute(TC_Sem_B010502_reference_expression_009()); +} + +} diff --git a/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0105_matching_character_pattern/B010502_reference_expression/Sem_B010502_reference_expression_010.ttcn b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0105_matching_character_pattern/B010502_reference_expression/Sem_B010502_reference_expression_010.ttcn new file mode 100644 index 00000000..e6ce7bd4 --- /dev/null +++ b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0105_matching_character_pattern/B010502_reference_expression/Sem_B010502_reference_expression_010.ttcn @@ -0,0 +1,60 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:B.1.5.2, Ensure that the IUT correctly handles template matching of character pattern reference expressions + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +module Sem_B010502_reference_expression_010 { + + + type record MessageType { + universal charstring field1, + universal charstring field2, + universal charstring field3 + } + + type port loopbackPort message { + inout MessageType + } + + +type component GeneralComp { + port loopbackPort messagePort +} + +testcase TC_Sem_B010502_reference_expression_010() runs on GeneralComp { + + var MessageType v_testMessage; + const charstring m_Ref:="abc?def?"; + + template MessageType mw_matchingTemplate:= + { + field1 := pattern "{\m_Ref}", // this should accept pattern "abc?def?" only + field2 := pattern "{m_Ref}\q{0,0,1,113}", // this should accept pattern "abc?def?" only, with any character in ? + field3 := pattern "{\m_Ref}\q{0,0,1,113}" // this should accept pattern "abc?def?ű" only + + }; + v_testMessage:= { + field1 := "abc?def?", + field2 := "abcDdefGű", + field3 := "abc?def?ű" + }; + + messagePort.send(v_testMessage); + + alt { + [] messagePort.receive(mw_matchingTemplate) { + setverdict(pass,v_testMessage); + } + [] messagePort.receive { + setverdict(fail,"Unexpected decoding result:",v_testMessage); + } + } +} + +control{ + execute(TC_Sem_B010502_reference_expression_010()); +} + +} diff --git a/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0105_matching_character_pattern/B010502_reference_expression/Sem_B010502_reference_expression_011.ttcn b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0105_matching_character_pattern/B010502_reference_expression/Sem_B010502_reference_expression_011.ttcn new file mode 100644 index 00000000..0c801ba8 --- /dev/null +++ b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0105_matching_character_pattern/B010502_reference_expression/Sem_B010502_reference_expression_011.ttcn @@ -0,0 +1,60 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:B.1.5.2, Ensure that the IUT correctly handles template matching of character pattern reference expressions + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +module Sem_B010502_reference_expression_011 { + + + type record MessageType { + universal charstring field1, + universal charstring field2 + } + + type port loopbackPort message { + inout MessageType + } + + +type component GeneralComp { + port loopbackPort messagePort +} + +testcase TC_Sem_B010502_reference_expression_011() runs on GeneralComp { + + var MessageType v_testMessage; + const MessageType m_Ref:={"1","ABCabc"}; + const charstring referencedConstant_1 := m_Ref.field1; + const charstring referencedConstant_2 := m_Ref.field2; + + + template MessageType mw_matchingTemplate:= + { + field1 := pattern "{referencedConstant_1}", + field2 := pattern "{referencedConstant_2}" + }; + + v_testMessage:= { + field1 := "1", + field2 := "ABCabc" + }; + + messagePort.send(v_testMessage); + + alt { + [] messagePort.receive(mw_matchingTemplate) { + setverdict(pass,v_testMessage); + } + [] messagePort.receive { + setverdict(fail,"Unexpected decoding result:",v_testMessage); + } + } +} + +control{ + execute(TC_Sem_B010502_reference_expression_011()); +} + +} diff --git a/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0105_matching_character_pattern/B010503_match_n_times/Sem_B010503_match_n_times_001.ttcn b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0105_matching_character_pattern/B010503_match_n_times/Sem_B010503_match_n_times_001.ttcn new file mode 100644 index 00000000..9700b2c6 --- /dev/null +++ b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0105_matching_character_pattern/B010503_match_n_times/Sem_B010503_match_n_times_001.ttcn @@ -0,0 +1,65 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:B.1.5.3, Ensure that the IUT correctly handles template matching of character pattern expression multiplicity + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +module Sem_B010503_match_n_times_001 { + + + type record MessageType { + charstring field1, + charstring field2, + charstring field3, + charstring field4, + charstring field5 + } + + type port loopbackPort message { + inout MessageType + } + + +type component GeneralComp { + port loopbackPort messagePort +} + +testcase TC_Sem_B010503_match_n_times_001() runs on GeneralComp { + + var MessageType v_testMessage; + + template MessageType mw_matchingTemplate:= + { + field1 := pattern "[e-t]#4", + field2 := pattern "[e-t]+", + field3 := pattern "[e-t]#(3,5)", + field4 := pattern "[e-t]#(3,)", + field5 := pattern "[e-t]#(,5)" + } + + v_testMessage:= { + field1 := "test", + field2 := "test", + field3 := "test", + field4 := "test", + field5 := "test" + } + + messagePort.send(v_testMessage); + + alt { + [] messagePort.receive(mw_matchingTemplate) { + setverdict(pass); + } + [] messagePort.receive { + setverdict(fail); + } + } +} + +control{ + execute(TC_Sem_B010503_match_n_times_001()); +} + +} diff --git a/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0105_matching_character_pattern/B010503_match_n_times/Sem_B010503_match_n_times_002.ttcn b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0105_matching_character_pattern/B010503_match_n_times/Sem_B010503_match_n_times_002.ttcn new file mode 100644 index 00000000..550baf63 --- /dev/null +++ b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0105_matching_character_pattern/B010503_match_n_times/Sem_B010503_match_n_times_002.ttcn @@ -0,0 +1,65 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:B.1.5.3, Ensure that the IUT correctly handles template matching of character pattern expression multiplicity + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +module Sem_B010503_match_n_times_002 { + + + type record MessageType { + charstring field1, + charstring field2, + charstring field3, + charstring field4, + charstring field5 + } + + type port loopbackPort message { + inout MessageType + } + + +type component GeneralComp { + port loopbackPort messagePort +} + +testcase TC_Sem_B010503_match_n_times_002() runs on GeneralComp { + + var MessageType v_testMessage; + + template MessageType mw_matchingTemplate:= + { + field1 := pattern "[e-t]#5", //mismatching number of characters + field2 := pattern "[e-t]+", + field3 := pattern "[e-t]#(3,5)", + field4 := pattern "[e-t]#(3,)", + field5 := pattern "[e-t]#(,5)" + } + + v_testMessage:= { + field1 := "test", + field2 := "test", + field3 := "test", + field4 := "test", + field5 := "test" + } + + messagePort.send(v_testMessage); + + alt { + [] messagePort.receive(mw_matchingTemplate) { + setverdict(fail); + } + [] messagePort.receive { + setverdict(pass); + } + } +} + +control{ + execute(TC_Sem_B010503_match_n_times_002()); +} + +} diff --git a/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0105_matching_character_pattern/B010503_match_n_times/Sem_B010503_match_n_times_003.ttcn b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0105_matching_character_pattern/B010503_match_n_times/Sem_B010503_match_n_times_003.ttcn new file mode 100644 index 00000000..2bb58678 --- /dev/null +++ b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0105_matching_character_pattern/B010503_match_n_times/Sem_B010503_match_n_times_003.ttcn @@ -0,0 +1,65 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:B.1.5.3, Ensure that the IUT correctly handles template matching of character pattern expression multiplicity + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +module Sem_B010503_match_n_times_003 { + + + type record MessageType { + charstring field1, + charstring field2, + charstring field3, + charstring field4, + charstring field5 + } + + type port loopbackPort message { + inout MessageType + } + + +type component GeneralComp { + port loopbackPort messagePort +} + +testcase TC_Sem_B010503_match_n_times_003() runs on GeneralComp { + + var MessageType v_testMessage; + + template MessageType mw_matchingTemplate:= + { + field1 := pattern "[e-t]#4", + field2 := pattern "test[e-t]+", //mismatching number of characters + field3 := pattern "[e-t]#(3,5)", + field4 := pattern "[e-t]#(3,)", + field5 := pattern "[e-t]#(,5)" + } + + v_testMessage:= { + field1 := "test", + field2 := "test", + field3 := "test", + field4 := "test", + field5 := "test" + } + + messagePort.send(v_testMessage); + + alt { + [] messagePort.receive(mw_matchingTemplate) { + setverdict(fail); + } + [] messagePort.receive { + setverdict(pass); + } + } +} + +control{ + execute(TC_Sem_B010503_match_n_times_003()); +} + +} diff --git a/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0105_matching_character_pattern/B010503_match_n_times/Sem_B010503_match_n_times_004.ttcn b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0105_matching_character_pattern/B010503_match_n_times/Sem_B010503_match_n_times_004.ttcn new file mode 100644 index 00000000..155c1b37 --- /dev/null +++ b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0105_matching_character_pattern/B010503_match_n_times/Sem_B010503_match_n_times_004.ttcn @@ -0,0 +1,65 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:B.1.5.3, Ensure that the IUT correctly handles template matching of character pattern expression multiplicity + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +module Sem_B010503_match_n_times_004 { + + + type record MessageType { + charstring field1, + charstring field2, + charstring field3, + charstring field4, + charstring field5 + } + + type port loopbackPort message { + inout MessageType + } + + +type component GeneralComp { + port loopbackPort messagePort +} + +testcase TC_Sem_B010503_match_n_times_004() runs on GeneralComp { + + var MessageType v_testMessage; + + template MessageType mw_matchingTemplate:= + { + field1 := pattern "[e-t]#4", + field2 := pattern "test[e-t]+", + field3 := pattern "[e-t]#(3,5)", + field4 := pattern "[e-t]#(5,)", //mismatching number of characters + field5 := pattern "[e-t]#(,5)" + } + + v_testMessage:= { + field1 := "test", + field2 := "test", + field3 := "test", + field4 := "test", + field5 := "test" + } + + messagePort.send(v_testMessage); + + alt { + [] messagePort.receive(mw_matchingTemplate) { + setverdict(fail); + } + [] messagePort.receive { + setverdict(pass); + } + } +} + +control{ + execute(TC_Sem_B010503_match_n_times_004()); +} + +} diff --git a/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0105_matching_character_pattern/B010503_match_n_times/Sem_B010503_match_n_times_005.ttcn b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0105_matching_character_pattern/B010503_match_n_times/Sem_B010503_match_n_times_005.ttcn new file mode 100644 index 00000000..e3e0bb87 --- /dev/null +++ b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0105_matching_character_pattern/B010503_match_n_times/Sem_B010503_match_n_times_005.ttcn @@ -0,0 +1,65 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:B.1.5.3, Ensure that the IUT correctly handles template matching of character pattern expression multiplicity + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +module Sem_B010503_match_n_times_005 { + + + type record MessageType { + charstring field1, + charstring field2, + charstring field3, + charstring field4, + charstring field5 + } + + type port loopbackPort message { + inout MessageType + } + + +type component GeneralComp { + port loopbackPort messagePort +} + +testcase TC_Sem_B010503_match_n_times_005() runs on GeneralComp { + + var MessageType v_testMessage; + + template MessageType mw_matchingTemplate:= + { + field1 := pattern "[e-t]#4", + field2 := pattern "test[e-t]+", + field3 := pattern "[e-t]#(3,5)", + field4 := pattern "[e-t]#(3,)", + field5 := pattern "[e-t]#(,3)" //mismatching number of characters + } + + v_testMessage:= { + field1 := "test", + field2 := "test", + field3 := "test", + field4 := "test", + field5 := "test" + } + + messagePort.send(v_testMessage); + + alt { + [] messagePort.receive(mw_matchingTemplate) { + setverdict(fail); + } + [] messagePort.receive { + setverdict(pass); + } + } +} + +control{ + execute(TC_Sem_B010503_match_n_times_005()); +} + +} diff --git a/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0105_matching_character_pattern/B010504_match_referenced_characters/NegSem_B010504_match_referenced_characters_001.ttcn b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0105_matching_character_pattern/B010504_match_referenced_characters/NegSem_B010504_match_referenced_characters_001.ttcn new file mode 100644 index 00000000..99a69432 --- /dev/null +++ b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0105_matching_character_pattern/B010504_match_referenced_characters/NegSem_B010504_match_referenced_characters_001.ttcn @@ -0,0 +1,68 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:B.1.5.4, Ensure that the IUT correctly handles template matching of character pattern reference characters + ** @verdict pass reject + ***************************************************/ + +module NegSem_B010504_match_referenced_characters_001 { + + modulepar { + charstring MOD_REF:="ef"; + } + + type charstring CharRange ("e".."t"); + + type record MessageType { + charstring field1, + charstring field2, + charstring field3, + charstring field4, + charstring field5, + charstring field6 + } + + type port loopbackPort message { + inout MessageType + } + + +type component GeneralComp { + port loopbackPort messagePort; + const charstring c_Ref:="s"; +} + +testcase TC_NegSem_B010504_match_referenced_characters_001(charstring p_Ref) runs on GeneralComp { + + var MessageType v_testMessage; + var charstring v_Ref:="s"; + template charstring m_Ref:="s"; + + template MessageType mw_matchingTemplate:= + { + field1 := pattern "te[\N{v_Ref}]t", + field2 := pattern "[\N{c_Ref}et]+", + field3 := pattern "[\N{MOD_REF}-t]+", //reference length is more than one character + field4 := pattern "te[\N{p_Ref}]t", + field5 := pattern "te[\N{m_Ref}]t", + field6 := pattern "\N{CharRange}+" + }; + + v_testMessage:= { + field1 := "test", + field2 := "test", + field3 := "test", + field4 := "test", + field5 := "test", + field6 := "test" + }; + + messagePort.send(v_testMessage); + +} + +control{ + execute(TC_NegSem_B010504_match_referenced_characters_001("s")); +} + +} diff --git a/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0105_matching_character_pattern/B010504_match_referenced_characters/Sem_B010504_match_referenced_characters_001.ttcn b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0105_matching_character_pattern/B010504_match_referenced_characters/Sem_B010504_match_referenced_characters_001.ttcn new file mode 100644 index 00000000..674bbd4e --- /dev/null +++ b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0105_matching_character_pattern/B010504_match_referenced_characters/Sem_B010504_match_referenced_characters_001.ttcn @@ -0,0 +1,76 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:B.1.5.4, Ensure that the IUT correctly handles template matching of character pattern reference characters + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +module Sem_B010504_match_referenced_characters_001 { + + modulepar { + charstring MOD_REF:="e"; + } + + type charstring CharRange ("e".."t"); + + type record MessageType { + charstring field1, + charstring field2, + charstring field3, + charstring field4, + charstring field5, + charstring field6 + } + + type port loopbackPort message { + inout MessageType + } + + const charstring c_Ref:="s"; + +type component GeneralComp { + port loopbackPort messagePort +} + +testcase TC_Sem_B010504_match_referenced_characters_001(charstring p_Ref) runs on GeneralComp { + + var MessageType v_testMessage; + var charstring v_Ref:="s"; + template charstring m_Ref:="s"; + + template MessageType mw_matchingTemplate:= + { + field1 := pattern "te[\N{v_Ref}]t", + field2 := pattern "[\N{c_Ref}et]+", + field3 := pattern "[\N{MOD_REF}-t]+", + field4 := pattern "te[\N{p_Ref}]t", + field5 := pattern "te\N{m_Ref}t", + field6 := pattern "\N{CharRange}+" + }; + + v_testMessage:= { + field1 := "test", + field2 := "test", + field3 := "test", + field4 := "test", + field5 := "test", + field6 := "test" + }; + + messagePort.send(v_testMessage); + + alt { + [] messagePort.receive(mw_matchingTemplate) { + setverdict(pass); + } + [] messagePort.receive { + setverdict(fail); + } + } +} + +control{ + execute(TC_Sem_B010504_match_referenced_characters_001("s")); +} + +} diff --git a/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0105_matching_character_pattern/B010504_match_referenced_characters/Sem_B010504_match_referenced_characters_002.ttcn b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0105_matching_character_pattern/B010504_match_referenced_characters/Sem_B010504_match_referenced_characters_002.ttcn new file mode 100644 index 00000000..88810868 --- /dev/null +++ b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0105_matching_character_pattern/B010504_match_referenced_characters/Sem_B010504_match_referenced_characters_002.ttcn @@ -0,0 +1,76 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:B.1.5.4, Ensure that the IUT correctly handles template matching of character pattern reference characters + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +module Sem_B010504_match_referenced_characters_002 { + + modulepar { + charstring MOD_REF:="e"; + } + + type charstring CharRange ("e".."t"); + + type record MessageType { + charstring field1, + charstring field2, + charstring field3, + charstring field4, + charstring field5, + charstring field6 + } + + type port loopbackPort message { + inout MessageType + } + + const charstring c_Ref:="s"; + +type component GeneralComp { + port loopbackPort messagePort +} + +testcase TC_Sem_B010504_match_referenced_characters_002(charstring p_Ref) runs on GeneralComp { + + var MessageType v_testMessage; + var charstring v_Ref:="x"; + template charstring m_Ref:="s"; + + template MessageType mw_matchingTemplate:= + { + field1 := pattern "te[\N{v_Ref}]t", //reference character mismatch + field2 := pattern "[\N{c_Ref}et]+", + field3 := pattern "[\N{MOD_REF}-t]+", + field4 := pattern "te[\N{p_Ref}]t", + field5 := pattern "te\N{m_Ref}t", + field6 := pattern "\N{CharRange}+" + }; + + v_testMessage:= { + field1 := "test", + field2 := "test", + field3 := "test", + field4 := "test", + field5 := "test", + field6 := "test" + }; + + messagePort.send(v_testMessage); + + alt { + [] messagePort.receive(mw_matchingTemplate) { + setverdict(fail); + } + [] messagePort.receive { + setverdict(pass); + } + } +} + +control{ + execute(TC_Sem_B010504_match_referenced_characters_002("s")); +} + +} diff --git a/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0105_matching_character_pattern/B010504_match_referenced_characters/Sem_B010504_match_referenced_characters_003.ttcn b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0105_matching_character_pattern/B010504_match_referenced_characters/Sem_B010504_match_referenced_characters_003.ttcn new file mode 100644 index 00000000..f67fcf54 --- /dev/null +++ b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0105_matching_character_pattern/B010504_match_referenced_characters/Sem_B010504_match_referenced_characters_003.ttcn @@ -0,0 +1,76 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:B.1.5.4, Ensure that the IUT correctly handles template matching of character pattern reference characters + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +module Sem_B010504_match_referenced_characters_003 { + + modulepar { + charstring MOD_REF:="e"; + } + + type charstring CharRange ("e".."t"); + + type record MessageType { + charstring field1, + charstring field2, + charstring field3, + charstring field4, + charstring field5, + charstring field6 + } + + type port loopbackPort message { + inout MessageType + } + + const charstring c_Ref:="x"; + +type component GeneralComp { + port loopbackPort messagePort +} + +testcase TC_Sem_B010504_match_referenced_characters_003(charstring p_Ref) runs on GeneralComp { + + var MessageType v_testMessage; + var charstring v_Ref:="s"; + template charstring m_Ref:="s"; + + template MessageType mw_matchingTemplate:= + { + field1 := pattern "te[\N{v_Ref}]t", + field2 := pattern "[\N{c_Ref}et]+", //reference character mismatch + field3 := pattern "[\N{MOD_REF}-t]+", + field4 := pattern "te[\N{p_Ref}]t", + field5 := pattern "te\N{m_Ref}t", + field6 := pattern "\N{CharRange}+" + }; + + v_testMessage:= { + field1 := "test", + field2 := "test", + field3 := "test", + field4 := "test", + field5 := "test", + field6 := "test" + }; + + messagePort.send(v_testMessage); + + alt { + [] messagePort.receive(mw_matchingTemplate) { + setverdict(fail); + } + [] messagePort.receive { + setverdict(pass); + } + } +} + +control{ + execute(TC_Sem_B010504_match_referenced_characters_003("s")); +} + +} diff --git a/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0105_matching_character_pattern/B010504_match_referenced_characters/Sem_B010504_match_referenced_characters_004.ttcn b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0105_matching_character_pattern/B010504_match_referenced_characters/Sem_B010504_match_referenced_characters_004.ttcn new file mode 100644 index 00000000..d1d25c38 --- /dev/null +++ b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0105_matching_character_pattern/B010504_match_referenced_characters/Sem_B010504_match_referenced_characters_004.ttcn @@ -0,0 +1,76 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:B.1.5.4, Ensure that the IUT correctly handles template matching of character pattern reference characters + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +module Sem_B010504_match_referenced_characters_004 { + + modulepar { + charstring MOD_REF:="s"; + } + + type charstring CharRange ("e".."t"); + + type record MessageType { + charstring field1, + charstring field2, + charstring field3, + charstring field4, + charstring field5, + charstring field6 + } + + type port loopbackPort message { + inout MessageType + } + + const charstring c_Ref:="s"; + +type component GeneralComp { + port loopbackPort messagePort +} + +testcase TC_Sem_B010504_match_referenced_characters_004(charstring p_Ref) runs on GeneralComp { + + var MessageType v_testMessage; + var charstring v_Ref:="s"; + template charstring m_Ref:="s"; + + template MessageType mw_matchingTemplate:= + { + field1 := pattern "te[\N{v_Ref}]t", + field2 := pattern "[\N{c_Ref}et]+", + field3 := pattern "[\N{MOD_REF}-t]+", //reference character mismatch + field4 := pattern "te[\N{p_Ref}]t", + field5 := pattern "te\N{m_Ref}t", + field6 := pattern "\N{CharRange}+" + }; + + v_testMessage:= { + field1 := "test", + field2 := "test", + field3 := "test", + field4 := "test", + field5 := "test", + field6 := "test" + }; + + messagePort.send(v_testMessage); + + alt { + [] messagePort.receive(mw_matchingTemplate) { + setverdict(fail); + } + [] messagePort.receive { + setverdict(pass); + } + } +} + +control{ + execute(TC_Sem_B010504_match_referenced_characters_004("s")); +} + +} diff --git a/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0105_matching_character_pattern/B010504_match_referenced_characters/Sem_B010504_match_referenced_characters_005.ttcn b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0105_matching_character_pattern/B010504_match_referenced_characters/Sem_B010504_match_referenced_characters_005.ttcn new file mode 100644 index 00000000..7a2c811f --- /dev/null +++ b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0105_matching_character_pattern/B010504_match_referenced_characters/Sem_B010504_match_referenced_characters_005.ttcn @@ -0,0 +1,74 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:B.1.5.4, Ensure that the IUT correctly handles template matching of character pattern reference characters + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +module Sem_B010504_match_referenced_characters_005 { + + modulepar charstring MOD_REF:="e"; + + type charstring CharRange ("s".."t"); + + type record MessageType { + charstring field1, + charstring field2, + charstring field3, + charstring field4, + charstring field5, + charstring field6 + } + + type port loopbackPort message { + inout MessageType + } + + const charstring c_Ref:="s"; + +type component GeneralComp { + port loopbackPort messagePort +} + +testcase TC_Sem_B010504_match_referenced_characters_005(charstring p_Ref) runs on GeneralComp { + + var MessageType v_testMessage; + var charstring v_Ref:="s"; + template charstring m_Ref:="s"; + + template MessageType mw_matchingTemplate:= + { + field1 := pattern "te[\N{v_Ref}]t", + field2 := pattern "[\N{c_Ref}et]+", + field3 := pattern "[\N{MOD_REF}-t]+", + field4 := pattern "te[\N{p_Ref}]t", + field5 := pattern "te\N{m_Ref}t", + field6 := pattern "\N{CharRange}+" //reference character mismatch + }; + + v_testMessage:= { + field1 := "test", + field2 := "test", + field3 := "test", + field4 := "test", + field5 := "test", + field6 := "test" + }; + + messagePort.send(v_testMessage); + + alt { + [] messagePort.receive(mw_matchingTemplate) { + setverdict(fail); + } + [] messagePort.receive { + setverdict(pass); + } + } +} + +control{ + execute(TC_Sem_B010504_match_referenced_characters_005("s")); +} + +} diff --git a/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0105_matching_character_pattern/B010504_match_referenced_characters/Sem_B010504_match_referenced_characters_006.ttcn b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0105_matching_character_pattern/B010504_match_referenced_characters/Sem_B010504_match_referenced_characters_006.ttcn new file mode 100644 index 00000000..8015ca9f --- /dev/null +++ b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0105_matching_character_pattern/B010504_match_referenced_characters/Sem_B010504_match_referenced_characters_006.ttcn @@ -0,0 +1,74 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:B.1.5.4, Ensure that the IUT correctly handles template matching of character pattern reference characters + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +module Sem_B010504_match_referenced_characters_006 { + + modulepar charstring MOD_REF:="e"; + + type charstring CharRange ("e".."t"); + + type record MessageType { + charstring field1, + charstring field2, + charstring field3, + charstring field4, + charstring field5, + charstring field6 + } + + type port loopbackPort message { + inout MessageType + } + + const charstring c_Ref:="s"; + +type component GeneralComp { + port loopbackPort messagePort +} + +testcase TC_Sem_B010504_match_referenced_characters_006(charstring p_Ref) runs on GeneralComp { + + var MessageType v_testMessage; + var charstring v_Ref:="s"; + template charstring m_Ref:="s"; + + template MessageType mw_matchingTemplate:= + { + field1 := pattern "te[\N{v_Ref}]t", + field2 := pattern "[\N{c_Ref}et]+", + field3 := pattern "[\N{MOD_REF}-t]+", + field4 := pattern "te[\N{p_Ref}]t", //reference character mismatch + field5 := pattern "te\N{m_Ref}t", + field6 := pattern "\N{CharRange}+" + }; + + v_testMessage:= { + field1 := "test", + field2 := "test", + field3 := "test", + field4 := "test", + field5 := "test", + field6 := "test" + }; + + messagePort.send(v_testMessage); + + alt { + [] messagePort.receive(mw_matchingTemplate) { + setverdict(fail); + } + [] messagePort.receive { + setverdict(pass); + } + } +} + +control{ + execute(TC_Sem_B010504_match_referenced_characters_006("x")); +} + +} diff --git a/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0105_matching_character_pattern/B010504_match_referenced_characters/Sem_B010504_match_referenced_characters_007.ttcn b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0105_matching_character_pattern/B010504_match_referenced_characters/Sem_B010504_match_referenced_characters_007.ttcn new file mode 100644 index 00000000..c5302bcb --- /dev/null +++ b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0105_matching_character_pattern/B010504_match_referenced_characters/Sem_B010504_match_referenced_characters_007.ttcn @@ -0,0 +1,76 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:B.1.5.4, Ensure that the IUT correctly handles template matching of character pattern reference characters + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +module Sem_B010504_match_referenced_characters_007 { + + modulepar { + charstring MOD_REF:="e"; + } + + type charstring CharRange ("e".."t"); + + type record MessageType { + charstring field1, + charstring field2, + charstring field3, + charstring field4, + charstring field5, + charstring field6 + } + + type port loopbackPort message { + inout MessageType + } + + const charstring c_Ref:="s"; + +type component GeneralComp { + port loopbackPort messagePort +} + +testcase TC_Sem_B010504_match_referenced_characters_007(charstring p_Ref) runs on GeneralComp { + + var MessageType v_testMessage; + var charstring v_Ref:="s"; + template charstring m_Ref:="{c_Ref}"; //assuming dereferencing is only done once, no chained references + + template MessageType mw_matchingTemplate:= + { + field1 := pattern "te[\N{v_Ref}]t", + field2 := pattern "[\N{c_Ref}et]+", + field3 := pattern "[\N{MOD_REF}-t]+", + field4 := pattern "te[\N{p_Ref}]t", + field5 := pattern "te{m_Ref}t", + field6 := pattern "\N{CharRange}+" + }; + + v_testMessage:= { + field1 := "test", + field2 := "test", + field3 := "test", + field4 := "test", + field5 := "te{c_Ref}t", + field6 := "test" + }; + + messagePort.send(v_testMessage); + + alt { + [] messagePort.receive(mw_matchingTemplate) { + setverdict(pass); + } + [] messagePort.receive { + setverdict(fail); + } + } +} + +control{ + execute(TC_Sem_B010504_match_referenced_characters_007("s")); +} + +} diff --git a/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0105_matching_character_pattern/B010505_pattern_compatibility/NegSyn_B010505_pattern_compatibility_001.ttcn b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0105_matching_character_pattern/B010505_pattern_compatibility/NegSyn_B010505_pattern_compatibility_001.ttcn new file mode 100644 index 00000000..045847ef --- /dev/null +++ b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0105_matching_character_pattern/B010505_pattern_compatibility/NegSyn_B010505_pattern_compatibility_001.ttcn @@ -0,0 +1,23 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:B.1.5.0, Ensure that the IUT correctly handles character pattern metacharacters + compatibility rules of template matching + ** @verdict pass reject + ***************************************************/ + +module NegSyn_B010505_pattern_compatibility_001 { + + type component GeneralComp {} + +testcase TC_NegSyn_B010505_pattern_compatibility_001() runs on GeneralComp { + + template charstring mw_matchingTemplate:= pattern "??riable reference"; + var charstring mw_matchingTemplate_2:= pattern mw_matchingTemplate; // error: Cannot assign a template to a non-template variable. + +} +control{ + execute(TC_NegSyn_B010505_pattern_compatibility_001()); +} + +} diff --git a/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0105_matching_character_pattern/B010505_pattern_compatibility/Sem_B010505_pattern_compatibility_001.ttcn b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0105_matching_character_pattern/B010505_pattern_compatibility/Sem_B010505_pattern_compatibility_001.ttcn new file mode 100644 index 00000000..3ed3b50d --- /dev/null +++ b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0105_matching_character_pattern/B010505_pattern_compatibility/Sem_B010505_pattern_compatibility_001.ttcn @@ -0,0 +1,80 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:B.1.5.5, Ensure that the IUT correctly handles character pattern compatibility rules of template matching + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +module Sem_B010505_pattern_compatibility_001 { + + modulepar { + charstring MOD_REF:="modulepar reference"; + } + + type record MessageType { + universal charstring field1, + universal charstring field2, + universal charstring field3, + universal charstring field4, + universal charstring field5, + universal charstring field6, + universal charstring field7 + } + + type port loopbackPort message { + inout MessageType + } + + const charstring c_Ref:="constant reference"; + + +type component GeneralComp { + port loopbackPort messagePort +} + +testcase TC_Sem_B010505_pattern_compatibility_001(charstring p_Ref) runs on GeneralComp { + + var MessageType v_testMessage; + var charstring v_Ref:="variable reference"; + template charstring m_Ref:= pattern "{c_Ref}"; + template charstring m_RefExp_p1 := "{m_"; + template charstring m_RefExp_p2 := "Ref}!"; + + template MessageType mw_matchingTemplate:= + { + field1 := pattern "{v_Ref}", + field2 := pattern "{c_Ref}", + field3 := pattern "{MOD_REF}", + field4 := pattern "{p_Ref}", + field5 := pattern "{m_Ref}", + field6 := pattern "{m_"&"Ref}!", + field7 := pattern "{m_RefExp_p1}{m_RefExp_p2}" + } + + v_testMessage:= { + field1 := "variable reference", + field2 := "constant reference", + field3 := "modulepar reference", + field4 := "parameter reference", + field5 := "constant reference", + field6 := "constant reference!", + field7 := "{m_Ref}!" + } + + messagePort.send(v_testMessage); + + alt { + [] messagePort.receive(mw_matchingTemplate) { + setverdict(pass); + } + [] messagePort.receive { + setverdict(fail); + } + } +} + +control{ + execute(TC_Sem_B010505_pattern_compatibility_001("parameter reference")); +} + +} diff --git a/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0105_matching_character_pattern/B010505_pattern_compatibility/Sem_B010505_pattern_compatibility_002.ttcn b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0105_matching_character_pattern/B010505_pattern_compatibility/Sem_B010505_pattern_compatibility_002.ttcn new file mode 100644 index 00000000..55138407 --- /dev/null +++ b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0105_matching_character_pattern/B010505_pattern_compatibility/Sem_B010505_pattern_compatibility_002.ttcn @@ -0,0 +1,80 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:B.1.5.5, Ensure that the IUT correctly handles character pattern compatibility rules of template matching + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +module Sem_B010505_pattern_compatibility_002 { + + modulepar { + universal charstring MOD_REF:="modulepar reference"; + } + + type record MessageType { + charstring field1, + charstring field2, + charstring field3, + charstring field4, + charstring field5, + charstring field6, + charstring field7 + } + + type port loopbackPort message { + inout MessageType + } + + const universal charstring c_Ref:="constant reference"; + + +type component GeneralComp { + port loopbackPort messagePort +} + +testcase TC_Sem_B010505_pattern_compatibility_002(universal charstring p_Ref) runs on GeneralComp { + + var MessageType v_testMessage; + var universal charstring v_Ref:="variable reference"; + template universal charstring m_Ref:= pattern "{c_Ref}"; + template universal charstring m_RefExp_p1 := pattern "{m_"; + template universal charstring m_RefExp_p2 := pattern "Ref}!"; + + template MessageType mw_matchingTemplate:= + { + field1 := pattern "{v_Ref}", + field2 := pattern "{c_Ref}", + field3 := pattern "{MOD_REF}", + field4 := pattern "{p_Ref}", + field5 := pattern "{m_Ref}", + field6 := pattern "{m_"&"Ref}!", + field7 := pattern "{m_RefExp_p1}{m_RefExp_p2}" + } + + v_testMessage:= { + field1 := "variable reference", + field2 := "constant reference", + field3 := "modulepar reference", + field4 := "parameter reference", + field5 := "constant reference", + field6 := "constant reference!", + field7 := "{m_Ref}!" + } + + messagePort.send(v_testMessage); + + alt { + [] messagePort.receive(mw_matchingTemplate) { + setverdict(pass); + } + [] messagePort.receive { + setverdict(fail); + } + } +} + +control{ + execute(TC_Sem_B010505_pattern_compatibility_002("parameter reference")); +} + +} diff --git a/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0105_matching_character_pattern/B010506_case_sensitive_pattern_matching/Sem_B010506_case_sensitive_pattern_matching_001.ttcn b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0105_matching_character_pattern/B010506_case_sensitive_pattern_matching/Sem_B010506_case_sensitive_pattern_matching_001.ttcn new file mode 100644 index 00000000..3d97d20d --- /dev/null +++ b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0105_matching_character_pattern/B010506_case_sensitive_pattern_matching/Sem_B010506_case_sensitive_pattern_matching_001.ttcn @@ -0,0 +1,87 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:B.1.5.6, Ensure that the IUT correctly handles character pattern compatibility rules of template case sensitive matching (@nocase) + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +/* The following requirements are tested: +When the "@nocase" modifier is used after the pattern keyword, the matching is evaluated in a case insensitive way +*/ + +module Sem_B010506_case_sensitive_pattern_matching_001 { + + modulepar { + charstring MOD_REF:="modulepar reference"; + } + + type record MessageType { + universal charstring field1, + universal charstring field2, + universal charstring field3, + universal charstring field4, + universal charstring field5, + universal charstring field6, + universal charstring field7, + universal charstring field8 + } + + type port loopbackPort message { + inout MessageType + } + + const charstring c_Ref:="constant reference"; + + +type component GeneralComp { + port loopbackPort messagePort +} + +testcase TC_Sem_B010506_case_sensitive_pattern_matching_001(charstring p_Ref) runs on GeneralComp { + + var MessageType v_testMessage; + var charstring v_Ref:="variable reference"; + template charstring m_Ref:= pattern "{c_Ref}"; + template charstring m_RefExp_p1 := "{m_"; + template charstring m_RefExp_p2 := "Ref}!"; + + template MessageType mw_matchingTemplate:= + { + field1 := pattern @nocase "{v_Ref}", + field2 := pattern @nocase"{c_Ref}", + field3 := pattern @nocase"{MOD_REF}", + field4 := pattern @nocase"{p_Ref}", + field5 := pattern @nocase"{m_Ref}", + field6 := pattern @nocase"{m_"&"Ref}!", + field7 := pattern @nocase"{m_RefExp_p1}{m_RefExp_p2}", + field8 := pattern @nocase"var*?e" + } + + v_testMessage:= { + field1 := "VaRiAbLe ReFeReNcE", + field2 := "conSTant ReFeReNcE", + field3 := "modulepar ReFeReNcE", + field4 := "PARAMETER ReFeReNcE", + field5 := "CONStant ReFeReNcE", + field6 := "consTANT ReFeReNcE!", + field7 := "{m_ref}!", + field8 := "VaRiAbLe ReFeReNcE" + } + + messagePort.send(v_testMessage); + + alt { + [] messagePort.receive(mw_matchingTemplate) { + setverdict(pass,v_testMessage); + } + [] messagePort.receive { + setverdict(fail,v_testMessage); + } + } +} + +control{ + execute(TC_Sem_B010506_case_sensitive_pattern_matching_001("parameter reference")); +} + +} diff --git a/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0105_matching_character_pattern/B010506_case_sensitive_pattern_matching/Sem_B010506_case_sensitive_pattern_matching_002.ttcn b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0105_matching_character_pattern/B010506_case_sensitive_pattern_matching/Sem_B010506_case_sensitive_pattern_matching_002.ttcn new file mode 100644 index 00000000..9ae811d2 --- /dev/null +++ b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0105_matching_character_pattern/B010506_case_sensitive_pattern_matching/Sem_B010506_case_sensitive_pattern_matching_002.ttcn @@ -0,0 +1,62 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:B.1.5.6, Ensure that the IUT correctly handles character pattern compatibility rules of template case sensitive matching (@nocase) + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +/* The following requirements are tested: +When the "@nocase" modifier is used after the pattern keyword, the matching is evaluated in a case insensitive way +*/ + +module Sem_B010506_case_sensitive_pattern_matching_002 { + + + type record MessageType { + universal charstring field1, + universal charstring field2 + } + + type port loopbackPort message { + inout MessageType + } + +type component GeneralComp { + port loopbackPort messagePort +} + const universal charstring MyCons :="A"; + +testcase TC_Sem_B010506_case_sensitive_pattern_matching_002(charstring p_Ref) runs on GeneralComp { + + var MessageType v_testMessage; + template charstring m_Ref:= pattern "abc"; + + + template MessageType mw_matchingTemplate:= + { + field1 := pattern @nocase "{m_Ref} \q{0,0,1,113}", // expected value: abc ű + field2 := pattern @nocase "\N{MyCons}" // expected value: A + } + + v_testMessage:= { + field1 := "aBc Ű", // with @nocase - this is also valid + field2 := "a" // with @nocase - this is also valid + } + + messagePort.send(v_testMessage); + + alt { + [] messagePort.receive(mw_matchingTemplate) { + setverdict(pass,v_testMessage); + } + [] messagePort.receive { + setverdict(fail,v_testMessage); + } + } +} + +control{ + execute(TC_Sem_B010506_case_sensitive_pattern_matching_002("parameter reference")); +} + +} diff --git a/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0105_matching_character_pattern/B0105_toplevel/Sem_B0105_toplevel_001.ttcn b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0105_matching_character_pattern/B0105_toplevel/Sem_B0105_toplevel_001.ttcn new file mode 100644 index 00000000..3cbd9efe --- /dev/null +++ b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0105_matching_character_pattern/B0105_toplevel/Sem_B0105_toplevel_001.ttcn @@ -0,0 +1,65 @@ +/*************************************************** + ** @author STF 409 + ** @version 0.0.1 + ** @purpose 1:B.1.5, Ensure that the IUT correctly handles template matching of character pattern definitions + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +module Sem_B0105_toplevel_001 { + + + type record MessageType { + charstring field1, + charstring field2, + charstring field3, + charstring field4, + charstring field5 + } + + type port loopbackPort message { + inout MessageType + } + + +type component GeneralComp { + port loopbackPort messagePort +} + +testcase TC_Sem_B0105_toplevel_001() runs on GeneralComp { + + var MessageType v_testMessage; + + template MessageType mw_matchingTemplate:= + { + field1 := pattern "te?t\?", + field2 := pattern "test|string", + field3 := pattern "test" & " " & "string", + field4 := pattern "tes\w\b\s\d", + field5 := pattern "\[\\\]" + } + + v_testMessage:= { + field1 := "test?", + field2 := "string", + field3 := "test string", + field4 := "test 1", + field5 := "[\]" + } + + messagePort.send(v_testMessage); + + alt { + [] messagePort.receive(mw_matchingTemplate) { + setverdict(pass); + } + [] messagePort.receive { + setverdict(fail); + } + } +} + +control{ + execute(TC_Sem_B0105_toplevel_001()); +} + +} diff --git a/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0105_matching_character_pattern/B0105_toplevel/Sem_B0105_toplevel_002.ttcn b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0105_matching_character_pattern/B0105_toplevel/Sem_B0105_toplevel_002.ttcn new file mode 100644 index 00000000..40df24f0 --- /dev/null +++ b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0105_matching_character_pattern/B0105_toplevel/Sem_B0105_toplevel_002.ttcn @@ -0,0 +1,59 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:B.1.5, Ensure that the IUT correctly handles template quadruple and USI-like syntax matching of character pattern definitions + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +module Sem_B0105_toplevel_002 { + + + type record MessageType { + universal charstring field1, + universal charstring field2, + universal charstring field3 + } + + type port loopbackPort message { + inout MessageType + } + + +type component GeneralComp { + port loopbackPort messagePort +} + +testcase TC_Sem_B0105_toplevel_002() runs on GeneralComp { + + var MessageType v_testMessage; + + template MessageType mw_matchingTemplate:= + { + field1 := pattern "\q{0,0,1,113}", //"quadruple" notation for character "ű" + field2 := pattern "\q{0,0,1,113}*\q{0,0,1,116}", //"quadruple" notation for character "ű" and "Ŵ" + field3 := pattern "\q{U0171}" // USI like notation for character "ű" + } + + v_testMessage:= { + field1 := "ű", + field2 := "ű1234Ŵ", + field3 := "ű" + } + + messagePort.send(v_testMessage); + + alt { + [] messagePort.receive(mw_matchingTemplate) { + setverdict(pass,v_testMessage); + } + [] messagePort.receive { + setverdict(fail,"Unexpected decoding result:",v_testMessage); + } + } +} + +control{ + execute(TC_Sem_B0105_toplevel_002()); +} + +} diff --git a/ATS/core_language/C_predefined_functions/C06_Other_functions/C0602_The_testcasename_function/Sem_C0602_The_hostid_function_001.ttcn b/ATS/core_language/C_predefined_functions/C06_Other_functions/C0602_The_testcasename_function/Sem_C0602_The_hostid_function_001.ttcn new file mode 100644 index 00000000..1fbbf6ac --- /dev/null +++ b/ATS/core_language/C_predefined_functions/C06_Other_functions/C0602_The_testcasename_function/Sem_C0602_The_hostid_function_001.ttcn @@ -0,0 +1,46 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 1:C.6.2, Ensure that the IUT correctly handles the hostid function + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +/* The following requirements are tested: + * check that hostid function correctly evaluates the IPv4 or IPv6 address of the host. + * The output of this test must be manually validated. Todo for future STF: automated validation via external function. + * */ + +module Sem_C0602_The_hostid_function_001 { + + type component GeneralComp {} + type charstring IPaddressV4 (pattern "[0-9,.]#(7,15)"); // size of charstring is limited to 7-15 and contains numbers from 1-9 and "." + type charstring IPaddressV6 (pattern @nocase "[0-9,a-f,:]#(1,37)"); // contains numbers from 1-9, a-f and ":". The size of chastring is limited to 37 + + testcase TC_Sem_C0602_The_hostid_function_001() runs on GeneralComp { + + var IPaddressV4 v_ipv4hostid; + var IPaddressV6 v_ipv6hostid; + + if ((lengthof(hostid("IPv4")) == 0) or (lengthof(hostid("IPv6"))==0 )) // in case of no ip address is given + { + setverdict(pass, "No ip address on interface"); + } + + else{ + + v_ipv4hostid := hostid("IPv4"); // check IPv4 address with subtyping + setverdict(pass, v_ipv4hostid); + + v_ipv6hostid := hostid("IPv6"); // check IPv6 address with subtyping + setverdict(pass, v_ipv6hostid); + } + + + } + control{ + // execute(TC_Sem_C0602_The_hostid_function_001(), -, "127.0.0.1"); //not supported by TestCast + execute(TC_Sem_C0602_The_hostid_function_001()); + + } + +} \ No newline at end of file diff --git a/ATS/core_language/C_predefined_functions/C06_Other_functions/C0602_The_testcasename_function/Sem_C0602_The_testcasename_function_001.ttcn b/ATS/core_language/C_predefined_functions/C06_Other_functions/C0602_The_testcasename_function/Sem_C0602_The_testcasename_function_001.ttcn new file mode 100644 index 00000000..a39ef17e --- /dev/null +++ b/ATS/core_language/C_predefined_functions/C06_Other_functions/C0602_The_testcasename_function/Sem_C0602_The_testcasename_function_001.ttcn @@ -0,0 +1,29 @@ +/*************************************************** + ** @author STF 451 + ** @version 0.0.1 + ** @purpose 1:C.6.2, Ensure that the IUT correctly handles the testcasename function + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Sem_C0602_The_testcasename_function_001 { + + type component GeneralComp { + } + + // add a second testcase in order to see that the right TC name is returned + testcase TC_Sem_C0602_The_testcasename_function_001_other() runs on GeneralComp { + } + + testcase TC_Sem_C0602_The_testcasename_function_001() runs on GeneralComp { + var charstring v_TCname := testcasename(); + if (match(v_TCname, "TC_Sem_C0602_The_testcasename_function_001")) { + setverdict(pass); + } else { + setverdict(fail, "Expected TC name TC_Sem_C0602_The_testcasename_function_001 observer " & v_TCname); + } + } + + control{ + execute(TC_Sem_C0602_The_testcasename_function_001()); + } + +} \ No newline at end of file diff --git a/ATS/core_language/C_predefined_functions/NOTES b/ATS/core_language/C_predefined_functions/NOTES new file mode 100644 index 00000000..b7817420 --- /dev/null +++ b/ATS/core_language/C_predefined_functions/NOTES @@ -0,0 +1 @@ +- NOTE: The contents of Annex C are tested by the tests under section 16.1.2. \ No newline at end of file diff --git a/ATS/core_language/D_preprocessing_macros/D01_macro_module/Sem_D01_macro_module_001.ttcn b/ATS/core_language/D_preprocessing_macros/D01_macro_module/Sem_D01_macro_module_001.ttcn new file mode 100644 index 00000000..1a319592 --- /dev/null +++ b/ATS/core_language/D_preprocessing_macros/D01_macro_module/Sem_D01_macro_module_001.ttcn @@ -0,0 +1,26 @@ +/***************************************************************** + ** @author STF 451 + ** @version 0.0.1 + ** @purpose 1:D, Ensure that __MODULE__ replaces the module name + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +// The name of the module is stored in __MODULE__ macro +module Sem_D01_macro_module_001 { + + type component GeneralComp {} + function f1 ( ) runs on GeneralComp {} + + testcase TC_Sem_D01_macro_module_001() runs on GeneralComp system GeneralComp { + + const charstring MyConst:= __MODULE__; + + if(match(MyConst, "Sem_D01_macro_module_001")){ + setverdict(pass);} + else { + setverdict(fail);} + } + + control { + execute(TC_Sem_D01_macro_module_001()); + } +} \ No newline at end of file diff --git a/ATS/core_language/D_preprocessing_macros/D02_macro_file/Sem_D02_macro_file_001.ttcn b/ATS/core_language/D_preprocessing_macros/D02_macro_file/Sem_D02_macro_file_001.ttcn new file mode 100644 index 00000000..2756bb84 --- /dev/null +++ b/ATS/core_language/D_preprocessing_macros/D02_macro_file/Sem_D02_macro_file_001.ttcn @@ -0,0 +1,28 @@ +/***************************************************************** + ** @author STF 451 + ** @version 0.0.1 + ** @purpose 1:D, Ensure that __FILE__ macro stores the path and file name in a charstring + ** @verdict pass accept, noexecution + *****************************************************************/ + +module Sem_D02_macro_file_001 { + + type component GeneralComp { } + + testcase TC_Sem_D02_macro_file_001() runs on GeneralComp system GeneralComp { + + const charstring MyConst:= __FILE__; + // will match file paths of the form .../Sem_D02_macro_file_001.ttcn or ...\Sem_D02_macro_file_001.ttcn + template charstring namePattern := pattern "*[\\/]Sem_D02_macro_file_001.ttcn"; + + if(match(MyConst, namePattern)){ + setverdict(pass); + } else { + setverdict(fail); + } + } + + control { + execute(TC_Sem_D02_macro_file_001()); + } +} \ No newline at end of file diff --git a/ATS/core_language/D_preprocessing_macros/D03_macro_bfile/Sem_D03_macro_bfile_001.ttcn b/ATS/core_language/D_preprocessing_macros/D03_macro_bfile/Sem_D03_macro_bfile_001.ttcn new file mode 100644 index 00000000..6ae2db0b --- /dev/null +++ b/ATS/core_language/D_preprocessing_macros/D03_macro_bfile/Sem_D03_macro_bfile_001.ttcn @@ -0,0 +1,26 @@ +/***************************************************************** + ** @author STF 451 + ** @version 0.0.1 + ** @purpose 1:D, Ensure that the __BFILE__ macro replaces the actual file name + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +// the actual file name is given in __BFILE__ macro. +module Sem_D03_macro_bfile_001 { + + type component GeneralComp {} + + testcase TC_Sem_D03_macro_bfile_001() runs on GeneralComp system GeneralComp { + + const charstring MyConst:=__BFILE__; + + if(match(MyConst, "Sem_D03_macro_bfile_001.ttcn")){ + setverdict(pass); + } else { + setverdict(fail); + } + } + + control { + execute(TC_Sem_D03_macro_bfile_001()); + } +} \ No newline at end of file diff --git a/ATS/core_language/D_preprocessing_macros/D04_macro_line/Sem_D04_macro_line_001.ttcn b/ATS/core_language/D_preprocessing_macros/D04_macro_line/Sem_D04_macro_line_001.ttcn new file mode 100644 index 00000000..9af470c7 --- /dev/null +++ b/ATS/core_language/D_preprocessing_macros/D04_macro_line/Sem_D04_macro_line_001.ttcn @@ -0,0 +1,27 @@ +/***************************************************************** + ** @author STF 451 + ** @version 0.0.1 + ** @purpose 1:D, Ensure that __LINE__ macro stores the actual line number when it is called + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +// In this case the line number when the macro is called at line 15. +module Sem_D04_macro_line_001 { + + type component GeneralComp {} + function f1 ( ) runs on GeneralComp {} + + testcase TC_Sem_D04_macro_line_001() runs on GeneralComp system GeneralComp { + + const integer MyConst:= __LINE__; // line 15 + + if (match(MyConst, 15)) { + setverdict(pass); + } else { + setverdict(fail, "Expected line 15, wrong line number"); + } + } + + control { + execute(TC_Sem_D04_macro_line_001()); + } +} \ No newline at end of file diff --git a/ATS/core_language/D_preprocessing_macros/D05_macro_scope/NegSem_D05_macro_scope_001.ttcn b/ATS/core_language/D_preprocessing_macros/D05_macro_scope/NegSem_D05_macro_scope_001.ttcn new file mode 100644 index 00000000..d0495a29 --- /dev/null +++ b/ATS/core_language/D_preprocessing_macros/D05_macro_scope/NegSem_D05_macro_scope_001.ttcn @@ -0,0 +1,31 @@ +/***************************************************************** + ** @author STF 451 + ** @version 0.0.1 + ** @purpose 1:D, Ensure that __SCOPE__ replaces the actual higher named basic scope unit + ** @verdict pass reject + *****************************************************************/ +// __SCOPE__ replaces the actual higher basic unit + +module NegSem_D05_macro_scope_001 { + + type component GeneralComp { + var charstring variable1:=__SCOPE__; //variable1=="GeneralComp" + } + + type record MyRecord { + charstring variable0 ("1","2",__SCOPE__) // variable0=="MyRecord" + } + + testcase TC_NegSem_D05_macro_scope_001() runs on GeneralComp system GeneralComp { + + template MyRecord Mytemplate:={ + variable0:="__SCOPE__" //Causes an error as __SCOPE__ is replaced with Mytemplate + } + + + } + + control { + execute(TC_NegSem_D05_macro_scope_001()); + } +} \ No newline at end of file diff --git a/ATS/core_language/D_preprocessing_macros/D05_macro_scope/Sem_D05_macro_scope_001.ttcn b/ATS/core_language/D_preprocessing_macros/D05_macro_scope/Sem_D05_macro_scope_001.ttcn new file mode 100644 index 00000000..6f10f4b8 --- /dev/null +++ b/ATS/core_language/D_preprocessing_macros/D05_macro_scope/Sem_D05_macro_scope_001.ttcn @@ -0,0 +1,26 @@ +/***************************************************************** + ** @author STF 451 (updated by STF 521) + ** @version 0.0.1 + ** @purpose 1:D, Ensure that __SCOPE__ replaces the actual higher basic unit + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +// __SCOPE__ replaces the actual higher basic unit (name of the test component) +module Sem_D05_macro_scope_001 { + type component GeneralComp { + const charstring MyConst := __SCOPE__; + } + + testcase TC_Sem_D05_macro_scope_001() + runs on GeneralComp system GeneralComp { + + + if (match(MyConst, "GeneralComp")) { + setverdict(pass); + } else { + setverdict(fail); + } + } + control { + execute(TC_Sem_D05_macro_scope_001()); + } +} \ No newline at end of file diff --git a/ATS/core_language/D_preprocessing_macros/D05_macro_scope/Sem_D05_macro_scope_002.ttcn b/ATS/core_language/D_preprocessing_macros/D05_macro_scope/Sem_D05_macro_scope_002.ttcn new file mode 100644 index 00000000..87af2448 --- /dev/null +++ b/ATS/core_language/D_preprocessing_macros/D05_macro_scope/Sem_D05_macro_scope_002.ttcn @@ -0,0 +1,35 @@ +/***************************************************************** + ** @author STF 451 + ** @version 0.0.1 + ** @purpose 1:D, Ensure that __SCOPE__ replaces the actual higher basic unit + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +// __SCOPE__ replaces the actual higher basic unit +module Sem_D05_macro_scope_002 { + + type component GeneralComp { + var charstring variable1:=__SCOPE__; //variable1=="GeneralComp" + } + + type record MyRecord { + charstring variable0 ("1","2",__SCOPE__) + } + + testcase TC_Sem_D05_macro_scope_002() runs on GeneralComp system GeneralComp { + + template MyRecord Mytemplate:={ + variable0:="MyRecord" //MyRecord is a legal element because of __SCOPE__ + } + + if(match(variable1, "GeneralComp")){ + setverdict(pass); + } else { + setverdict(fail); + } + + } + + control { + execute(TC_Sem_D05_macro_scope_002()); + } +} \ No newline at end of file diff --git a/ATS/core_language/NOTES b/ATS/core_language/NOTES new file mode 100644 index 00000000..4298b543 --- /dev/null +++ b/ATS/core_language/NOTES @@ -0,0 +1,11 @@ +The @configuration port:XYZ directive in the header indicates the type of adapter being used. +The two possible port: values are broadcast/loopback. +For historical reasons, the absence of this directive means loopback adapter. +Example: + ** @configuration port:broadcast + +The following example indicates external functions used in the test case + ** @configuration external_functions + + +- TODO: check that each match operation is used correctly (must not be used to compare templates!!) \ No newline at end of file diff --git a/ATS/core_language/PROGRESS_FILE.txt b/ATS/core_language/PROGRESS_FILE.txt new file mode 100644 index 00000000..032947e8 --- /dev/null +++ b/ATS/core_language/PROGRESS_FILE.txt @@ -0,0 +1,105 @@ +This file is used for tracking progress of implementation of new test cases. +The exact description of required updates is in /trunk/standards/4.7.1/part-1-changes.txt + +3.1 Definitions (Tomas, implemented in 5.4) +5.4.1 Formal parameters (Tomas, done: 32 new tests, 29 positive, 3 negative) +5.4.1.1 Formal parameters of kind value (Tomas, done: 48 new tests, 18 positive, 30 negative) +5.4.1.2 Formal parameters of kind template (Tomas, done: 54 new tests, 34 positive, 18 negative) +5.4.2 Actual parameters (Tomas, done: 345 new tests, 200 positive, 145 negative; 14 CRs) +6.1.1 Basic string types and values (Andras, done: 1 new test, 1 positive) +6.1.2.5 Pattern subtyping (Andras, done: 3 new tests, 1 positive, 2 negative) +6.1.2.6.2 Using length restriction with other constraints (Andras, done: 1 new test, 1 positive) +6.2.1.1 Referencing fields of a record type (Tomas, done: 16 new tests, 13 positive, 3 negative) +6.2.3 Records and sets of single types (Tomas, done: 24 new tests, 16 positive, 8 negative) +6.2.4 Enumerated type and values (Tomas, done: 21 new tests, 8 positive, 13 negative; 1 CR) +6.2.5 Unions (Tomas, done: 9 new tests, 3 positive, 6 negative) +6.2.5.1 Referencing fields of a union type (Tomas, done: 13 new tests, 5 positive, 8 negative) +6.2.5.1 Option and union (Tomas, done: 1 new test, 0 positive, 1 negative) +6.2.5.1 Nested type definition for field types (Tomas, done: 1 new test, 1 positive, 0 negative) +6.2.7 Arrays (Tomas, done: 36 new tests, 17 positive, 19 negative; 3 CR) +6.2.9 Communication port type (Andras, done: 1 new test, 1 positive) +6.2.10.2 Reuse of component types (Andras, done: 6 new tests, 3 positive, 3 negative) +6.2.12 Addressing entities inside the SUT (Andras, done: 3 new tests, 3 negative) +6.3.4 Type compatibility of communication and connection operations (Tomas, done: 5 new tests, 0 positive, 5 negative; 2 CR) +7 Expressions (Tomas, done: 11 new tests, 6 positive, 5 negative; 2 CR) +7.1.1 Arithmetic operators (Andras, WIP) +7.1.3 Relational operators (Andras, WIP) +8.1 Definition of a module (Andras, WIP) +8.2.3.1 General format of import (Andras, WIP) +8.2.3.8 Compatibility of language specifications in imports (Andras, WIP) +9.1 Communication ports (Andras, done: 11 new tests, 3 positive, 8 negative) +10 Declaring constants (Andras, done: 2 new tests, 2 negative) +11.1 Value variables (Andras, done: 2 new tests, 2 negative) +11.2 Template variables (Andras, done: 2 new tests, 2 negative) +15.5 Modified templates (Andras, WIP) +15.6 Referencing elements of templates or template fields (Andras, WIP) +15.6.2 Referencing record and set fields (Andras, WIP) +15.6.3 Referencing record of and set of elements (Andras, WIP) +15.6.5 Referencing union alternatives (Andras, WIP) +15.8 Template restrictions (Andras, WIP) +15.9 Match operation (Andras, WIP) +15.11 Concatenating templates of string and list types (Andras, WIP) +16.1.2 Predefined functions (Andras, done: 71 new tests, 68 positive, 3 negative) +16.1.3 External functions (Andras, done: remove 2 tests from ATS) +19.1 Assignments (Andras, WIP) +19.3.2 The select union statement (Tomas, done: 11 new tests, 6 positive, 5 negative; 3 CRs) +19.9 The stop operation (Tomas, done: 2 new tests, 2 positive, 0 negative) +20.2 The alt statement (Tomas, done: 17 new tests, 1 positive, 16 negative; 2 CRs) +20.3 The repeat statement (Tomas, done: 3 new tests, 3 positive, 0 negative) +20.4 The interleave statement (Tomas, done: 12 new tests, 1 positive, 11 negative) +20.5.2 The activate operation (Tomas, done: 4 new tests, 2 positive, 2 negative) +20.5.3 The deactivate operation (Tomas, done: no change needed) +21.1.1 The connect and map operations (Tomas, done: 7 new tests, 0 positive, 7 negative) +21.1.2 The disconnect and unmap operations (Tomas, done: 7 new tests, 0 positive, 7 negative) +21.2.1 Test case stop operation (Tomas, done: no change needed) +21.3.1 The create operation (Tomas, done: no change needed) +21.3.2 The start operation (Tomas, done: 19 new tests, 9 positive, 10 negative; 1 CR) +21.3.3 The stop operation (Tomas, done: 13 new tests, 9 positive, 4 negative) +21.3.4 The kill operation (Tomas, done: 7 new tests, 2 positive, 5 negative) +21.3.5 The alive operation (Tomas, done: 1 new test (negative); added not validated tests from STF 470) +21.3.6 The running operation (Tomas, done: 1 new test (negative); added not validated tests from STF 470) +21.3.7 The done operation (Tomas, done: 5 new tests, 1 positive, 4 negative; added not validated tests from STF 470) +21.3.8 The killed operation (Tomas, done: 5 new tests, 1 positive, 4 negative; added not validated tests from STF 470) +22.2.1 The send operation (Tomas, done: 10 new tests, 3 positive, 7 negative) +22.2.2 The receive operation (Tomas, done: 45 new tests, 23 positive, 22 negative; 2 CR) +22.2.3 The trigger operation (Tomas, done: 44 new tests, 22 positive, 22 negative) +22.3.1 The call operation (Tomas, done: 15 new tests, 6 positive, 9 negative) +22.3.2 The getcall operation (Tomas, done: 2 new tests, 0 positive, 2 negative) +22.3.3 The reply operation (Tomas, done: 2 new tests, 0 positive, 2 negative) +22.3.2 The getreply operation (Tomas, done: 27 new tests, 12 positive, 15 negative) +22.3.5 The raise operation (Tomas, done: 13 new tests, 4 positive, 9 negative; 1 CR) +22.3.6 The catch operation (Tomas, done: 15 new tests, 6 positive, 9 negative) +22.4 The check operation (Tomas, done: 3 new tests, 0 positive, 3 negative) +22.5.1 The clear port operation (Tomas, done: no change needed) +22.5.2 The start port operation (Tomas, done: no change needed) +22.5.3 The stop port operation (Tomas, done: no change needed) +22.5.4 The halt port operation (Tomas, done: no change needed) +22.5.5 The checkstate port operation (Tomas, done: no change needed) +23.2 The start timer operation (Tomas, done: no change needed) +23.3 The stop timer operation (Tomas, done: no change needed) +23.4 The read timer operation (Tomas, done: no change needed) +23.2 The running timer operation (Tomas, done: added corrected version of not validated test from STF 470, otherwise no change needed) +23.2 The timeout operation (Tomas, done: 1 new test (positive); added corrected version of not validated tests from STF 470) +24.2 The setverdict operation (Tomas, done: no change needed) +24.3 The getverdict operation (Tomas, done: no change needed) +25 External actions (Tomas, done: no change needed) +26.1 The execute statement (Tomas, done: no change needed) +B.1.2.2 Complemented template list (Andras, WIP) +B.1.2.6 SuperSet (Andras, WIP) +B.1.2.7 SubSet (Andras, WIP) +B.1.2.9 Matching decoded content (Andras, WIP) +B.1.3.3 Permutation (Andras, WIP) +B.1.5 Matching character pattern (Andras, done: 5 new tests, 4 positive, 1 negative) +B.1.5.6 Case insensitive pattern matching (Andras, done: 2 new tests, 2 positive) +C.1.31 Octetstring to universal character string (Andras, implemented in 16.1.2) +C.1.32 Universal character string to octetstring (Andras, implemented in 16.1.2) +C.1.33 Value or template to universal charstring (Andras, implemented in 16.1.2) +C.3.3 The IsValue function (Andras, implemented in 16.1.2) +C.3.5 Matching mechanism detection (Andras, implemented in 16.1.2) +C.4.1 The Regexp function (Andras, implemented in 16.1.2) +C.4.2 The Substring function (Andras, implemented in 16.1.2) +C.4.3 The Replace function (Andras, implemented in 16.1.2) +C.5.5 Retrieving the type of string encoding (Andras, implemented in 16.1.2) +C.5.6 Removing BOMs of UCS encoding schemes (Andras, implemented in 16.1.2) +C.6.1 The random number generator function (Andras, implemented in 16.1.2) + diff --git a/ATS/xml/05_mapping_xml_schemas/0501_namespaces/050101_namespaces/Pos_050101_namespaces_001/Pos_050101_namespaces_001.ttcn b/ATS/xml/05_mapping_xml_schemas/0501_namespaces/050101_namespaces/Pos_050101_namespaces_001/Pos_050101_namespaces_001.ttcn new file mode 100644 index 00000000..1f5fca6d --- /dev/null +++ b/ATS/xml/05_mapping_xml_schemas/0501_namespaces/050101_namespaces/Pos_050101_namespaces_001/Pos_050101_namespaces_001.ttcn @@ -0,0 +1,88 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:5.1.1, Verify that schema with target namespace is correctly translated into single module + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// A single XML Schema may be composed of a single or several schema element information +// items, and shall be translated to one or more TTCN-3 modules, corresponding to schema +// components that have the same target namespace. For XSD schemas with the same target +// namespace (including absence of the target namespace) exactly one TTCN-3 module shall +// be generated. + +module Pos_050101_namespaces_001 { + + import from schema_Pos_050101_namespaces_001 language "XSD" all; + + template MyType m_msg := 1; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_050101_namespaces_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_050101_namespaces_001.xml", { "Pos_050101_namespaces_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_050101_namespaces_001(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/ATS/xml/05_mapping_xml_schemas/0501_namespaces/050101_namespaces/Pos_050101_namespaces_001/Pos_050101_namespaces_001.xml b/ATS/xml/05_mapping_xml_schemas/0501_namespaces/050101_namespaces/Pos_050101_namespaces_001/Pos_050101_namespaces_001.xml new file mode 100644 index 00000000..a79f1fdf --- /dev/null +++ b/ATS/xml/05_mapping_xml_schemas/0501_namespaces/050101_namespaces/Pos_050101_namespaces_001/Pos_050101_namespaces_001.xml @@ -0,0 +1,2 @@ + +1 \ No newline at end of file diff --git a/ATS/xml/05_mapping_xml_schemas/0501_namespaces/050101_namespaces/Pos_050101_namespaces_001/Pos_050101_namespaces_001.xsd b/ATS/xml/05_mapping_xml_schemas/0501_namespaces/050101_namespaces/Pos_050101_namespaces_001/Pos_050101_namespaces_001.xsd new file mode 100644 index 00000000..d102f3d3 --- /dev/null +++ b/ATS/xml/05_mapping_xml_schemas/0501_namespaces/050101_namespaces/Pos_050101_namespaces_001/Pos_050101_namespaces_001.xsd @@ -0,0 +1,6 @@ + + + + diff --git a/ATS/xml/05_mapping_xml_schemas/0501_namespaces/050101_namespaces/Pos_050101_namespaces_002/Pos_050101_namespaces_002.ttcn b/ATS/xml/05_mapping_xml_schemas/0501_namespaces/050101_namespaces/Pos_050101_namespaces_002/Pos_050101_namespaces_002.ttcn new file mode 100644 index 00000000..f2bf1845 --- /dev/null +++ b/ATS/xml/05_mapping_xml_schemas/0501_namespaces/050101_namespaces/Pos_050101_namespaces_002/Pos_050101_namespaces_002.ttcn @@ -0,0 +1,91 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:5.1.1, Verify schema with no target namespace is correctly translated into single module + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// A single XML Schema may be composed of a single or several schema element information +// items, and shall be translated to one or more TTCN-3 modules, corresponding to schema +// components that have the same target namespace. For XSD schemas with the same target +// namespace (including absence of the target namespace) exactly one TTCN-3 module shall +// be generated. +// The names of the TTCN 3 modules generated based on this clause shall be the result of +// applying the name transformation rules in clause 5.2.2 to ... the predefined name +// "NoTargetNamespace". + +module Pos_050101_namespaces_002 { + + import from NoTargetNamespace language "XSD" all; + + template MyType m_msg := 2; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_050101_namespaces_002() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_050101_namespaces_002.xml", { "Pos_050101_namespaces_002.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_050101_namespaces_002(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/ATS/xml/05_mapping_xml_schemas/0501_namespaces/050101_namespaces/Pos_050101_namespaces_002/Pos_050101_namespaces_002.xml b/ATS/xml/05_mapping_xml_schemas/0501_namespaces/050101_namespaces/Pos_050101_namespaces_002/Pos_050101_namespaces_002.xml new file mode 100644 index 00000000..f6423a76 --- /dev/null +++ b/ATS/xml/05_mapping_xml_schemas/0501_namespaces/050101_namespaces/Pos_050101_namespaces_002/Pos_050101_namespaces_002.xml @@ -0,0 +1,2 @@ + +2 \ No newline at end of file diff --git a/ATS/xml/05_mapping_xml_schemas/0501_namespaces/050101_namespaces/Pos_050101_namespaces_002/Pos_050101_namespaces_002.xsd b/ATS/xml/05_mapping_xml_schemas/0501_namespaces/050101_namespaces/Pos_050101_namespaces_002/Pos_050101_namespaces_002.xsd new file mode 100644 index 00000000..a0291684 --- /dev/null +++ b/ATS/xml/05_mapping_xml_schemas/0501_namespaces/050101_namespaces/Pos_050101_namespaces_002/Pos_050101_namespaces_002.xsd @@ -0,0 +1,5 @@ + + + + diff --git a/ATS/xml/05_mapping_xml_schemas/0501_namespaces/050101_namespaces/Pos_050101_namespaces_003/Pos_050101_namespaces_003.ttcn b/ATS/xml/05_mapping_xml_schemas/0501_namespaces/050101_namespaces/Pos_050101_namespaces_003/Pos_050101_namespaces_003.ttcn new file mode 100644 index 00000000..3010b05c --- /dev/null +++ b/ATS/xml/05_mapping_xml_schemas/0501_namespaces/050101_namespaces/Pos_050101_namespaces_003/Pos_050101_namespaces_003.ttcn @@ -0,0 +1,87 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:5.1.1, Verify that two schemas with the same target namespace are correctly translated + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// A single XML Schema may be composed of a single or several schema element information +// items, and shall be translated to one or more TTCN-3 modules, corresponding to schema +// components that have the same target namespace. For XSD schemas with the same target +// namespace (including absence of the target namespace) exactly one TTCN-3 module shall +// be generated. +module Pos_050101_namespaces_003 { + + import from schema_Pos_050101_namespaces_003 language "XSD" all; + + template MyType m_msg := 3; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_050101_namespaces_003() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_050101_namespaces_003.xml", { "test_data/Pos_050101_namespaces_003_merged.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_050101_namespaces_003(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/ATS/xml/05_mapping_xml_schemas/0501_namespaces/050101_namespaces/Pos_050101_namespaces_003/Pos_050101_namespaces_003.xml b/ATS/xml/05_mapping_xml_schemas/0501_namespaces/050101_namespaces/Pos_050101_namespaces_003/Pos_050101_namespaces_003.xml new file mode 100644 index 00000000..70476acd --- /dev/null +++ b/ATS/xml/05_mapping_xml_schemas/0501_namespaces/050101_namespaces/Pos_050101_namespaces_003/Pos_050101_namespaces_003.xml @@ -0,0 +1,2 @@ + +3 \ No newline at end of file diff --git a/ATS/xml/05_mapping_xml_schemas/0501_namespaces/050101_namespaces/Pos_050101_namespaces_003/Pos_050101_namespaces_003.xsd b/ATS/xml/05_mapping_xml_schemas/0501_namespaces/050101_namespaces/Pos_050101_namespaces_003/Pos_050101_namespaces_003.xsd new file mode 100644 index 00000000..038f6ff7 --- /dev/null +++ b/ATS/xml/05_mapping_xml_schemas/0501_namespaces/050101_namespaces/Pos_050101_namespaces_003/Pos_050101_namespaces_003.xsd @@ -0,0 +1,6 @@ + + + + diff --git a/ATS/xml/05_mapping_xml_schemas/0501_namespaces/050101_namespaces/Pos_050101_namespaces_003/Pos_050101_namespaces_003_1.xsd b/ATS/xml/05_mapping_xml_schemas/0501_namespaces/050101_namespaces/Pos_050101_namespaces_003/Pos_050101_namespaces_003_1.xsd new file mode 100644 index 00000000..ee7a323c --- /dev/null +++ b/ATS/xml/05_mapping_xml_schemas/0501_namespaces/050101_namespaces/Pos_050101_namespaces_003/Pos_050101_namespaces_003_1.xsd @@ -0,0 +1,6 @@ + + + + \ No newline at end of file diff --git a/ATS/xml/05_mapping_xml_schemas/0501_namespaces/050101_namespaces/Pos_050101_namespaces_003/XmlDiff.log b/ATS/xml/05_mapping_xml_schemas/0501_namespaces/050101_namespaces/Pos_050101_namespaces_003/XmlDiff.log new file mode 100644 index 00000000..52ff9470 --- /dev/null +++ b/ATS/xml/05_mapping_xml_schemas/0501_namespaces/050101_namespaces/Pos_050101_namespaces_003/XmlDiff.log @@ -0,0 +1,114 @@ + + + + + 2015-10-05T15:13:38 + 1444047218167 + 0 + FINE + org.etsi.mts.ttcn.part9.xmldiff.XmlDiff + <init> + 18 + XmlDiff.java:101:Reference file: C:\SVN\SVN 475\trunk\ATS\06_built_in_data_types\0601_mapping_of_facets\060101_length\Pos_060101_length_002\Pos_060101_length_002.xml, xsd file names: [Pos_060101_length_002.xsd], xsd search path: null + + + 2015-10-05T15:13:38 + 1444047218326 + 1 + FINE + org.etsi.mts.ttcn.part9.xmldiff.XmlDiff + findXsdFiles + 18 + XmlDiff.java:248:Looking for XSD file Pos_060101_length_002.xsd + + + 2015-10-05T15:13:38 + 1444047218327 + 2 + SEVERE + org.etsi.mts.ttcn.part9.xmldiff.XmlDiff + <init> + 18 + XmlDiff.java:124:Missing XSD files [Pos_060101_length_002.xsd] in search path null + + + + + + + 2017-04-03T15:17:08 + 1491221828805 + 0 + FINE + org.etsi.mts.ttcn.part9.xmldiff.XmlDiff + <init> + 17 + XmlDiff.java:101:Reference file: C:\Work\STF\STF 521\Tmp\05_mapping_xml_schemas\0501_namespaces\050101_namespaces\Pos_050101_namespaces_003\Pos_050101_namespaces_003.xml, xsd file names: [test_data/Pos_050101_namespaces_003_merged.xsd], xsd search path: null + + + 2017-04-03T15:17:09 + 1491221829023 + 1 + FINE + org.etsi.mts.ttcn.part9.xmldiff.XmlDiff + findXsdFiles + 17 + XmlDiff.java:248:Looking for XSD file test_data/Pos_050101_namespaces_003_merged.xsd + + + 2017-04-03T15:17:09 + 1491221829294 + 2 + FINE + org.etsi.mts.ttcn.part9.xmldiff.XmlDiff + diff + 17 + XmlDiff.java:140:Looking for difference: reference file C:\Work\STF\STF 521\Tmp\05_mapping_xml_schemas\0501_namespaces\050101_namespaces\Pos_050101_namespaces_003\Pos_050101_namespaces_003.xml, input {<?xml version="1.0" encoding="utf-8"?> +<ns1:MyType xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns1="schema:Pos_050101_namespaces_003">3</ns1:MyType>} + + + 2017-04-03T15:17:09 + 1491221829726 + 3 + FINE + org.etsi.mts.ttcn.part9.xmldiff.XmlDiff + diff + 17 + XmlDiff.java:155:No differences found between reference file C:\Work\STF\STF 521\Tmp\05_mapping_xml_schemas\0501_namespaces\050101_namespaces\Pos_050101_namespaces_003\Pos_050101_namespaces_003.xml and input {<?xml version="1.0" encoding="utf-8"?> +<ns1:MyType xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns1="schema:Pos_050101_namespaces_003">3</ns1:MyType>} + + + + + + + 2017-04-04T12:33:32 + 1491298412165 + 0 + FINE + org.etsi.mts.ttcn.part9.xmldiff.XmlDiff + <init> + 18 + XmlDiff.java:101:Reference file: C:\Work\STF\STF 521\Tmp\07_mapping_xsd_components\0707_any_and_anyattribute\070701_the_any_element\Pos_070701_the_any_element_001\Pos_070701_the_any_element_001.xml, xsd file names: [Pos_070701_the_any_element_001.xsd], xsd search path: null + + + 2017-04-04T12:33:32 + 1491298412455 + 1 + FINE + org.etsi.mts.ttcn.part9.xmldiff.XmlDiff + findXsdFiles + 18 + XmlDiff.java:248:Looking for XSD file Pos_070701_the_any_element_001.xsd + + + 2017-04-04T12:33:32 + 1491298412456 + 2 + SEVERE + org.etsi.mts.ttcn.part9.xmldiff.XmlDiff + <init> + 18 + XmlDiff.java:124:Missing XSD files [Pos_070701_the_any_element_001.xsd] in search path null + + diff --git a/ATS/xml/05_mapping_xml_schemas/0501_namespaces/050101_namespaces/Pos_050101_namespaces_003/test_data/Pos_050101_namespaces_003_merged.xsd b/ATS/xml/05_mapping_xml_schemas/0501_namespaces/050101_namespaces/Pos_050101_namespaces_003/test_data/Pos_050101_namespaces_003_merged.xsd new file mode 100644 index 00000000..6955c128 --- /dev/null +++ b/ATS/xml/05_mapping_xml_schemas/0501_namespaces/050101_namespaces/Pos_050101_namespaces_003/test_data/Pos_050101_namespaces_003_merged.xsd @@ -0,0 +1,13 @@ + + + + + + diff --git a/ATS/xml/05_mapping_xml_schemas/0501_namespaces/050101_namespaces/Pos_050101_namespaces_004/Pos_050101_namespaces_004.ttcn b/ATS/xml/05_mapping_xml_schemas/0501_namespaces/050101_namespaces/Pos_050101_namespaces_004/Pos_050101_namespaces_004.ttcn new file mode 100644 index 00000000..bb45c7f5 --- /dev/null +++ b/ATS/xml/05_mapping_xml_schemas/0501_namespaces/050101_namespaces/Pos_050101_namespaces_004/Pos_050101_namespaces_004.ttcn @@ -0,0 +1,91 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:5.1.1, Verify that two schemas with no target namespace are correctly translated + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// A single XML Schema may be composed of a single or several schema element information +// items, and shall be translated to one or more TTCN-3 modules, corresponding to schema +// components that have the same target namespace. For XSD schemas with the same target +// namespace (including absence of the target namespace) exactly one TTCN-3 module shall +// be generated. +// The names of the TTCN 3 modules generated based on this clause shall be the result of +// applying the name transformation rules in clause 5.2.2 to ... the predefined name +// "NoTargetNamespace". + +module Pos_050101_namespaces_004 { + + import from NoTargetNamespace language "XSD" all; + + template MyType m_msg := 4; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_050101_namespaces_004() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_050101_namespaces_004.xml", { "test_data/Pos_050101_namespaces_004_merged.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_050101_namespaces_004(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/ATS/xml/05_mapping_xml_schemas/0501_namespaces/050101_namespaces/Pos_050101_namespaces_004/Pos_050101_namespaces_004.xml b/ATS/xml/05_mapping_xml_schemas/0501_namespaces/050101_namespaces/Pos_050101_namespaces_004/Pos_050101_namespaces_004.xml new file mode 100644 index 00000000..aa4ad732 --- /dev/null +++ b/ATS/xml/05_mapping_xml_schemas/0501_namespaces/050101_namespaces/Pos_050101_namespaces_004/Pos_050101_namespaces_004.xml @@ -0,0 +1,2 @@ + +4 diff --git a/ATS/xml/05_mapping_xml_schemas/0501_namespaces/050101_namespaces/Pos_050101_namespaces_004/Pos_050101_namespaces_004.xsd b/ATS/xml/05_mapping_xml_schemas/0501_namespaces/050101_namespaces/Pos_050101_namespaces_004/Pos_050101_namespaces_004.xsd new file mode 100644 index 00000000..09dc725a --- /dev/null +++ b/ATS/xml/05_mapping_xml_schemas/0501_namespaces/050101_namespaces/Pos_050101_namespaces_004/Pos_050101_namespaces_004.xsd @@ -0,0 +1,4 @@ + + + + diff --git a/ATS/xml/05_mapping_xml_schemas/0501_namespaces/050101_namespaces/Pos_050101_namespaces_004/Pos_050101_namespaces_004_1.xsd b/ATS/xml/05_mapping_xml_schemas/0501_namespaces/050101_namespaces/Pos_050101_namespaces_004/Pos_050101_namespaces_004_1.xsd new file mode 100644 index 00000000..1969efeb --- /dev/null +++ b/ATS/xml/05_mapping_xml_schemas/0501_namespaces/050101_namespaces/Pos_050101_namespaces_004/Pos_050101_namespaces_004_1.xsd @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/ATS/xml/05_mapping_xml_schemas/0501_namespaces/050101_namespaces/Pos_050101_namespaces_004/test_data/Pos_050101_namespaces_004_merged.xsd b/ATS/xml/05_mapping_xml_schemas/0501_namespaces/050101_namespaces/Pos_050101_namespaces_004/test_data/Pos_050101_namespaces_004_merged.xsd new file mode 100644 index 00000000..f1099ca3 --- /dev/null +++ b/ATS/xml/05_mapping_xml_schemas/0501_namespaces/050101_namespaces/Pos_050101_namespaces_004/test_data/Pos_050101_namespaces_004_merged.xsd @@ -0,0 +1,5 @@ + + + + + diff --git a/ATS/xml/05_mapping_xml_schemas/0501_namespaces/050102_includes/Pos_050102_includes_001/Pos_050102_includes_001.ttcn b/ATS/xml/05_mapping_xml_schemas/0501_namespaces/050102_includes/Pos_050102_includes_001/Pos_050102_includes_001.ttcn new file mode 100644 index 00000000..02bfbaa1 --- /dev/null +++ b/ATS/xml/05_mapping_xml_schemas/0501_namespaces/050102_includes/Pos_050102_includes_001/Pos_050102_includes_001.ttcn @@ -0,0 +1,85 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:5.1.2, Test inclusion of a schema with the same namespace + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// XSD include element information items shall be ignored if the included schema element has the same target +// namespace as the including one (implying the absence of the target namespace). + +module Pos_050102_includes_001 { + + import from schema_Pos_050102_includes_001 language "XSD" all; + + template MyType m_msg := 1; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_050102_includes_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_050102_includes_001.xml", { "Pos_050102_includes_001.xsd", "Pos_050102_includes_001_1.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_050102_includes_001(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/ATS/xml/05_mapping_xml_schemas/0501_namespaces/050102_includes/Pos_050102_includes_001/Pos_050102_includes_001.xml b/ATS/xml/05_mapping_xml_schemas/0501_namespaces/050102_includes/Pos_050102_includes_001/Pos_050102_includes_001.xml new file mode 100644 index 00000000..42f7278b --- /dev/null +++ b/ATS/xml/05_mapping_xml_schemas/0501_namespaces/050102_includes/Pos_050102_includes_001/Pos_050102_includes_001.xml @@ -0,0 +1,2 @@ + +1 \ No newline at end of file diff --git a/ATS/xml/05_mapping_xml_schemas/0501_namespaces/050102_includes/Pos_050102_includes_001/Pos_050102_includes_001.xsd b/ATS/xml/05_mapping_xml_schemas/0501_namespaces/050102_includes/Pos_050102_includes_001/Pos_050102_includes_001.xsd new file mode 100644 index 00000000..97c30216 --- /dev/null +++ b/ATS/xml/05_mapping_xml_schemas/0501_namespaces/050102_includes/Pos_050102_includes_001/Pos_050102_includes_001.xsd @@ -0,0 +1,7 @@ + + + + + diff --git a/ATS/xml/05_mapping_xml_schemas/0501_namespaces/050102_includes/Pos_050102_includes_001/Pos_050102_includes_001_1.xsd b/ATS/xml/05_mapping_xml_schemas/0501_namespaces/050102_includes/Pos_050102_includes_001/Pos_050102_includes_001_1.xsd new file mode 100644 index 00000000..8f3fadc4 --- /dev/null +++ b/ATS/xml/05_mapping_xml_schemas/0501_namespaces/050102_includes/Pos_050102_includes_001/Pos_050102_includes_001_1.xsd @@ -0,0 +1,6 @@ + + + + \ No newline at end of file diff --git a/ATS/xml/05_mapping_xml_schemas/0501_namespaces/050102_includes/Pos_050102_includes_002/Pos_050102_includes_002.ttcn b/ATS/xml/05_mapping_xml_schemas/0501_namespaces/050102_includes/Pos_050102_includes_002/Pos_050102_includes_002.ttcn new file mode 100644 index 00000000..8a6686a2 --- /dev/null +++ b/ATS/xml/05_mapping_xml_schemas/0501_namespaces/050102_includes/Pos_050102_includes_002/Pos_050102_includes_002.ttcn @@ -0,0 +1,88 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:5.1.2, Verify that included schema with no target namespace is transformed twice (inclusion) + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// If the included schema element has no target namespace but the including schema has +// (i.e. it is not absent), all definitions of the included schema shall be mapped twice, +// i.e. the resulted TTCN-3 definitions shall be inserted to the TTCN-3 module generated +// for the schema element(s) with no target namespace as well as to the module generated +// for the schema element(s) with the target namespace of the including schema. + +module Pos_050102_includes_002 { + + import from schema_Pos_050102_includes_002 language "XSD" all; + + template MyType m_msg := 2; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_050102_includes_002() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_050102_includes_002.xml", { "Pos_050102_includes_002.xsd", "Pos_050102_includes_002_1.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_050102_includes_002(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/ATS/xml/05_mapping_xml_schemas/0501_namespaces/050102_includes/Pos_050102_includes_002/Pos_050102_includes_002.xml b/ATS/xml/05_mapping_xml_schemas/0501_namespaces/050102_includes/Pos_050102_includes_002/Pos_050102_includes_002.xml new file mode 100644 index 00000000..72cd21a5 --- /dev/null +++ b/ATS/xml/05_mapping_xml_schemas/0501_namespaces/050102_includes/Pos_050102_includes_002/Pos_050102_includes_002.xml @@ -0,0 +1,2 @@ + +2 \ No newline at end of file diff --git a/ATS/xml/05_mapping_xml_schemas/0501_namespaces/050102_includes/Pos_050102_includes_002/Pos_050102_includes_002.xsd b/ATS/xml/05_mapping_xml_schemas/0501_namespaces/050102_includes/Pos_050102_includes_002/Pos_050102_includes_002.xsd new file mode 100644 index 00000000..8ed2d19b --- /dev/null +++ b/ATS/xml/05_mapping_xml_schemas/0501_namespaces/050102_includes/Pos_050102_includes_002/Pos_050102_includes_002.xsd @@ -0,0 +1,7 @@ + + + + + diff --git a/ATS/xml/05_mapping_xml_schemas/0501_namespaces/050102_includes/Pos_050102_includes_002/Pos_050102_includes_002_1.xsd b/ATS/xml/05_mapping_xml_schemas/0501_namespaces/050102_includes/Pos_050102_includes_002/Pos_050102_includes_002_1.xsd new file mode 100644 index 00000000..97e4e32f --- /dev/null +++ b/ATS/xml/05_mapping_xml_schemas/0501_namespaces/050102_includes/Pos_050102_includes_002/Pos_050102_includes_002_1.xsd @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/ATS/xml/05_mapping_xml_schemas/0501_namespaces/050102_includes/Pos_050102_includes_003/Pos_050102_includes_003.ttcn b/ATS/xml/05_mapping_xml_schemas/0501_namespaces/050102_includes/Pos_050102_includes_003/Pos_050102_includes_003.ttcn new file mode 100644 index 00000000..c0c2ffae --- /dev/null +++ b/ATS/xml/05_mapping_xml_schemas/0501_namespaces/050102_includes/Pos_050102_includes_003/Pos_050102_includes_003.ttcn @@ -0,0 +1,88 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:5.1.2, Verify that included schema with no target namespace is transformed twice (no namespace) + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// If the included schema element has no target namespace but the including schema has +// (i.e. it is not absent), all definitions of the included schema shall be mapped twice, +// i.e. the resulted TTCN-3 definitions shall be inserted to the TTCN-3 module generated +// for the schema element(s) with no target namespace as well as to the module generated +// for the schema element(s) with the target namespace of the including schema. + +module Pos_050102_includes_003 { + + import from NoTargetNamespace language "XSD" all; + + template MyType m_msg := 3; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_050102_includes_003() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_050102_includes_003.xml", { "Pos_050102_includes_003.xsd", "Pos_050102_includes_003_1.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_050102_includes_003(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/ATS/xml/05_mapping_xml_schemas/0501_namespaces/050102_includes/Pos_050102_includes_003/Pos_050102_includes_003.xml b/ATS/xml/05_mapping_xml_schemas/0501_namespaces/050102_includes/Pos_050102_includes_003/Pos_050102_includes_003.xml new file mode 100644 index 00000000..cba20604 --- /dev/null +++ b/ATS/xml/05_mapping_xml_schemas/0501_namespaces/050102_includes/Pos_050102_includes_003/Pos_050102_includes_003.xml @@ -0,0 +1,2 @@ + +3 \ No newline at end of file diff --git a/ATS/xml/05_mapping_xml_schemas/0501_namespaces/050102_includes/Pos_050102_includes_003/Pos_050102_includes_003.xsd b/ATS/xml/05_mapping_xml_schemas/0501_namespaces/050102_includes/Pos_050102_includes_003/Pos_050102_includes_003.xsd new file mode 100644 index 00000000..2bdfe525 --- /dev/null +++ b/ATS/xml/05_mapping_xml_schemas/0501_namespaces/050102_includes/Pos_050102_includes_003/Pos_050102_includes_003.xsd @@ -0,0 +1,7 @@ + + + + + diff --git a/ATS/xml/05_mapping_xml_schemas/0501_namespaces/050102_includes/Pos_050102_includes_003/Pos_050102_includes_003_1.xsd b/ATS/xml/05_mapping_xml_schemas/0501_namespaces/050102_includes/Pos_050102_includes_003/Pos_050102_includes_003_1.xsd new file mode 100644 index 00000000..0d351875 --- /dev/null +++ b/ATS/xml/05_mapping_xml_schemas/0501_namespaces/050102_includes/Pos_050102_includes_003/Pos_050102_includes_003_1.xsd @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/ATS/xml/05_mapping_xml_schemas/0501_namespaces/050103_imports/Neg_050103_imports_001/Neg_050103_imports_001.ttcn b/ATS/xml/05_mapping_xml_schemas/0501_namespaces/050103_imports/Neg_050103_imports_001/Neg_050103_imports_001.ttcn new file mode 100644 index 00000000..a2d004fc --- /dev/null +++ b/ATS/xml/05_mapping_xml_schemas/0501_namespaces/050103_imports/Neg_050103_imports_001/Neg_050103_imports_001.ttcn @@ -0,0 +1,51 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:5.1.3, Verify that it is not allowed to import imports from XSD schemas + ** @verdict pass reject +***************************************************/ +// The following requirements are tested: +// It is not allowed to import XSD import statements to TTCN-3 (i.e. there is no transitive import +// of XSD import statements as defined for TTCN-3, see clause 8.2.3.7 of ES 201 873-1 [1]). + +module Neg_050103_imports_001 { + + import from schema_Neg_050103_imports_001 language "XSD" { import all }; + + template MyType m_msg := 1; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type port P message { + inout all; + } + + type component C { + port P p; + } + + testcase TC_Neg_050103_imports_001() runs on C system C { + map(self:p, system:p); + + // encode the message + p.send(m_msg); + log("template should either be rejected by compiler or by runtime latest while encoding"); + + setverdict(fail, "Invalid template should not be encoded"); + + unmap(self:p, system:p); + } + + control { + execute(TC_Neg_050103_imports_001(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/ATS/xml/05_mapping_xml_schemas/0501_namespaces/050103_imports/Neg_050103_imports_001/Neg_050103_imports_001.xsd b/ATS/xml/05_mapping_xml_schemas/0501_namespaces/050103_imports/Neg_050103_imports_001/Neg_050103_imports_001.xsd new file mode 100644 index 00000000..3a669657 --- /dev/null +++ b/ATS/xml/05_mapping_xml_schemas/0501_namespaces/050103_imports/Neg_050103_imports_001/Neg_050103_imports_001.xsd @@ -0,0 +1,7 @@ + + + + + diff --git a/ATS/xml/05_mapping_xml_schemas/0501_namespaces/050103_imports/Neg_050103_imports_001/Neg_050103_imports_001_1.xsd b/ATS/xml/05_mapping_xml_schemas/0501_namespaces/050103_imports/Neg_050103_imports_001/Neg_050103_imports_001_1.xsd new file mode 100644 index 00000000..ab84a427 --- /dev/null +++ b/ATS/xml/05_mapping_xml_schemas/0501_namespaces/050103_imports/Neg_050103_imports_001/Neg_050103_imports_001_1.xsd @@ -0,0 +1,6 @@ + + + + \ No newline at end of file diff --git a/ATS/xml/05_mapping_xml_schemas/0501_namespaces/050103_imports/Pos_050103_imports_001/Pos_050103_imports_001.ttcn b/ATS/xml/05_mapping_xml_schemas/0501_namespaces/050103_imports/Pos_050103_imports_001/Pos_050103_imports_001.ttcn new file mode 100644 index 00000000..1f8b3efa --- /dev/null +++ b/ATS/xml/05_mapping_xml_schemas/0501_namespaces/050103_imports/Pos_050103_imports_001/Pos_050103_imports_001.ttcn @@ -0,0 +1,91 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:5.1.3, Verify that XSD import statement is handled correctly + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// All XSD import statements (i.e. import element information items and the related xmlns attributes, +// where present) shall be mapped to equivalent TTCN-3 import statements, importing all definitions +// from the other TTCN-3 module. All XSD components are public by default (see clause 8.2.3 of +// ES 201 873-1 [1]). + +// Note: It is not possible to verify presence of the import clause in the generated code directly +// since XSD import statements cannot be imported. This test only tests if XSD schema containing +// an import element is processed correctly. + +module Pos_050103_imports_001 { + + import from schema_Pos_050103_imports_001 language "XSD" all; + + template MyType m_msg := 1; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_050103_imports_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_050103_imports_001.xml", { "Pos_050103_imports_001.xsd", "Pos_050103_imports_001_1.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_050103_imports_001(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/ATS/xml/05_mapping_xml_schemas/0501_namespaces/050103_imports/Pos_050103_imports_001/Pos_050103_imports_001.xml b/ATS/xml/05_mapping_xml_schemas/0501_namespaces/050103_imports/Pos_050103_imports_001/Pos_050103_imports_001.xml new file mode 100644 index 00000000..939def1d --- /dev/null +++ b/ATS/xml/05_mapping_xml_schemas/0501_namespaces/050103_imports/Pos_050103_imports_001/Pos_050103_imports_001.xml @@ -0,0 +1,2 @@ + +1 \ No newline at end of file diff --git a/ATS/xml/05_mapping_xml_schemas/0501_namespaces/050103_imports/Pos_050103_imports_001/Pos_050103_imports_001.xsd b/ATS/xml/05_mapping_xml_schemas/0501_namespaces/050103_imports/Pos_050103_imports_001/Pos_050103_imports_001.xsd new file mode 100644 index 00000000..e07a690e --- /dev/null +++ b/ATS/xml/05_mapping_xml_schemas/0501_namespaces/050103_imports/Pos_050103_imports_001/Pos_050103_imports_001.xsd @@ -0,0 +1,8 @@ + + + + + diff --git a/ATS/xml/05_mapping_xml_schemas/0501_namespaces/050103_imports/Pos_050103_imports_001/Pos_050103_imports_001_1.xsd b/ATS/xml/05_mapping_xml_schemas/0501_namespaces/050103_imports/Pos_050103_imports_001/Pos_050103_imports_001_1.xsd new file mode 100644 index 00000000..e3e9d58f --- /dev/null +++ b/ATS/xml/05_mapping_xml_schemas/0501_namespaces/050103_imports/Pos_050103_imports_001/Pos_050103_imports_001_1.xsd @@ -0,0 +1,8 @@ + + + + + + \ No newline at end of file diff --git a/ATS/xml/05_mapping_xml_schemas/0501_namespaces/050104_attributes/Pos_050104_attributes_of_the_xsd_schema_element_001/Pos_050104_attributes_of_the_xsd_schema_element_001.ttcn b/ATS/xml/05_mapping_xml_schemas/0501_namespaces/050104_attributes/Pos_050104_attributes_of_the_xsd_schema_element_001/Pos_050104_attributes_of_the_xsd_schema_element_001.ttcn new file mode 100644 index 00000000..c9da9c08 --- /dev/null +++ b/ATS/xml/05_mapping_xml_schemas/0501_namespaces/050104_attributes/Pos_050104_attributes_of_the_xsd_schema_element_001/Pos_050104_attributes_of_the_xsd_schema_element_001.ttcn @@ -0,0 +1,94 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:5.1.4, Verify that qualified default element form is correctly processed (no namespace prefix) + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// If the TTCN-3 module corresponds to a (present) target namespace and the value of the ... +// elementFormDefault attributes of any schema element information items that contribute to +// the given TTCN-3 module is qualified, the encoding instructions ... "elementFormQualified" +// shall be attached accordingly to the given TTCN-3 module. +// +// Note: as only end-to-end solution is tested, the presence of encoding attributes is not +// checked directly, but through the encoded messages. + +module Pos_050104_attributes_of_the_xsd_schema_element_001 { + + import from schema_Pos_050104_attributes_of_the_xsd_schema_element_001 language "XSD" all; + + template MyType m_msg := + { + item1 := "abc", + item2 := "def" + }; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_050104_attributes_of_the_xsd_schema_element_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_050104_attributes_of_the_xsd_schema_element_001.xml", { "Pos_050104_attributes_of_the_xsd_schema_element_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_050104_attributes_of_the_xsd_schema_element_001(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/ATS/xml/05_mapping_xml_schemas/0501_namespaces/050104_attributes/Pos_050104_attributes_of_the_xsd_schema_element_001/Pos_050104_attributes_of_the_xsd_schema_element_001.xml b/ATS/xml/05_mapping_xml_schemas/0501_namespaces/050104_attributes/Pos_050104_attributes_of_the_xsd_schema_element_001/Pos_050104_attributes_of_the_xsd_schema_element_001.xml new file mode 100644 index 00000000..c18cb49a --- /dev/null +++ b/ATS/xml/05_mapping_xml_schemas/0501_namespaces/050104_attributes/Pos_050104_attributes_of_the_xsd_schema_element_001/Pos_050104_attributes_of_the_xsd_schema_element_001.xml @@ -0,0 +1,5 @@ + + + abc + def + \ No newline at end of file diff --git a/ATS/xml/05_mapping_xml_schemas/0501_namespaces/050104_attributes/Pos_050104_attributes_of_the_xsd_schema_element_001/Pos_050104_attributes_of_the_xsd_schema_element_001.xsd b/ATS/xml/05_mapping_xml_schemas/0501_namespaces/050104_attributes/Pos_050104_attributes_of_the_xsd_schema_element_001/Pos_050104_attributes_of_the_xsd_schema_element_001.xsd new file mode 100644 index 00000000..78aa7df5 --- /dev/null +++ b/ATS/xml/05_mapping_xml_schemas/0501_namespaces/050104_attributes/Pos_050104_attributes_of_the_xsd_schema_element_001/Pos_050104_attributes_of_the_xsd_schema_element_001.xsd @@ -0,0 +1,14 @@ + + + + + + + + + + + diff --git a/ATS/xml/05_mapping_xml_schemas/0501_namespaces/050104_attributes/Pos_050104_attributes_of_the_xsd_schema_element_002/Pos_050104_attributes_of_the_xsd_schema_element_002.ttcn b/ATS/xml/05_mapping_xml_schemas/0501_namespaces/050104_attributes/Pos_050104_attributes_of_the_xsd_schema_element_002/Pos_050104_attributes_of_the_xsd_schema_element_002.ttcn new file mode 100644 index 00000000..b4e9feb8 --- /dev/null +++ b/ATS/xml/05_mapping_xml_schemas/0501_namespaces/050104_attributes/Pos_050104_attributes_of_the_xsd_schema_element_002/Pos_050104_attributes_of_the_xsd_schema_element_002.ttcn @@ -0,0 +1,93 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:5.1.4, Verify that qualified default element form is correctly processed (namespace prefix used) + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// If the TTCN-3 module corresponds to a (present) target namespace and the value of the ... +// elementFormDefault attributes of any schema element information items that contribute to +// the given TTCN-3 module is qualified, the encoding instructions ... "elementFormQualified" +// shall be attached accordingly to the given TTCN-3 module. +// +// Note: as only end-to-end solution is tested, the presence of encoding attributes is not +// checked directly, but through the encoded messages. +module Pos_050104_attributes_of_the_xsd_schema_element_002 { + + import from schema_Pos_050104_attributes_of_the_xsd_schema_element_002 language "XSD" all; + + template MyType m_msg := + { + item1 := "abc", + item2 := "def" + }; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_050104_attributes_of_the_xsd_schema_element_002() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_050104_attributes_of_the_xsd_schema_element_002.xml", { "Pos_050104_attributes_of_the_xsd_schema_element_002.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_050104_attributes_of_the_xsd_schema_element_002(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/ATS/xml/05_mapping_xml_schemas/0501_namespaces/050104_attributes/Pos_050104_attributes_of_the_xsd_schema_element_002/Pos_050104_attributes_of_the_xsd_schema_element_002.xml b/ATS/xml/05_mapping_xml_schemas/0501_namespaces/050104_attributes/Pos_050104_attributes_of_the_xsd_schema_element_002/Pos_050104_attributes_of_the_xsd_schema_element_002.xml new file mode 100644 index 00000000..c525cbdd --- /dev/null +++ b/ATS/xml/05_mapping_xml_schemas/0501_namespaces/050104_attributes/Pos_050104_attributes_of_the_xsd_schema_element_002/Pos_050104_attributes_of_the_xsd_schema_element_002.xml @@ -0,0 +1,5 @@ + + + abc + def + \ No newline at end of file diff --git a/ATS/xml/05_mapping_xml_schemas/0501_namespaces/050104_attributes/Pos_050104_attributes_of_the_xsd_schema_element_002/Pos_050104_attributes_of_the_xsd_schema_element_002.xsd b/ATS/xml/05_mapping_xml_schemas/0501_namespaces/050104_attributes/Pos_050104_attributes_of_the_xsd_schema_element_002/Pos_050104_attributes_of_the_xsd_schema_element_002.xsd new file mode 100644 index 00000000..a2fd3ee3 --- /dev/null +++ b/ATS/xml/05_mapping_xml_schemas/0501_namespaces/050104_attributes/Pos_050104_attributes_of_the_xsd_schema_element_002/Pos_050104_attributes_of_the_xsd_schema_element_002.xsd @@ -0,0 +1,14 @@ + + + + + + + + + + + diff --git a/ATS/xml/05_mapping_xml_schemas/0501_namespaces/050104_attributes/Pos_050104_attributes_of_the_xsd_schema_element_003/Pos_050104_attributes_of_the_xsd_schema_element_003.ttcn b/ATS/xml/05_mapping_xml_schemas/0501_namespaces/050104_attributes/Pos_050104_attributes_of_the_xsd_schema_element_003/Pos_050104_attributes_of_the_xsd_schema_element_003.ttcn new file mode 100644 index 00000000..abf63cb9 --- /dev/null +++ b/ATS/xml/05_mapping_xml_schemas/0501_namespaces/050104_attributes/Pos_050104_attributes_of_the_xsd_schema_element_003/Pos_050104_attributes_of_the_xsd_schema_element_003.ttcn @@ -0,0 +1,95 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:5.1.4, Verify that unqualified default element form is correctly processed + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// All fields of TTCN-3 definitions in the given TTCN-3 module corresponding to local +// element declarations or element and model group references in schema element information +// items with the value of its elementFormDefault attribute unqualified (explicitly or +// implicitly via defaulting) shall be supplied with the "form as unqualified" encoding +// instruction, unless a form attribute of the given declaration requires differently +// (see clause 7.1.6). +// +// Note: as only end-to-end solution is tested, the presence of encoding attributes is not +// checked directly, but through the encoded messages. +module Pos_050104_attributes_of_the_xsd_schema_element_003 { + + import from schema_Pos_050104_attributes_of_the_xsd_schema_element_003 language "XSD" all; + + template MyType m_msg := + { + item1 := "abc", + item2 := "def" + }; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_050104_attributes_of_the_xsd_schema_element_003() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_050104_attributes_of_the_xsd_schema_element_003.xml", { "Pos_050104_attributes_of_the_xsd_schema_element_003.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_050104_attributes_of_the_xsd_schema_element_003(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/ATS/xml/05_mapping_xml_schemas/0501_namespaces/050104_attributes/Pos_050104_attributes_of_the_xsd_schema_element_003/Pos_050104_attributes_of_the_xsd_schema_element_003.xml b/ATS/xml/05_mapping_xml_schemas/0501_namespaces/050104_attributes/Pos_050104_attributes_of_the_xsd_schema_element_003/Pos_050104_attributes_of_the_xsd_schema_element_003.xml new file mode 100644 index 00000000..71a38124 --- /dev/null +++ b/ATS/xml/05_mapping_xml_schemas/0501_namespaces/050104_attributes/Pos_050104_attributes_of_the_xsd_schema_element_003/Pos_050104_attributes_of_the_xsd_schema_element_003.xml @@ -0,0 +1,5 @@ + + + abc + def + \ No newline at end of file diff --git a/ATS/xml/05_mapping_xml_schemas/0501_namespaces/050104_attributes/Pos_050104_attributes_of_the_xsd_schema_element_003/Pos_050104_attributes_of_the_xsd_schema_element_003.xsd b/ATS/xml/05_mapping_xml_schemas/0501_namespaces/050104_attributes/Pos_050104_attributes_of_the_xsd_schema_element_003/Pos_050104_attributes_of_the_xsd_schema_element_003.xsd new file mode 100644 index 00000000..d6b48c0b --- /dev/null +++ b/ATS/xml/05_mapping_xml_schemas/0501_namespaces/050104_attributes/Pos_050104_attributes_of_the_xsd_schema_element_003/Pos_050104_attributes_of_the_xsd_schema_element_003.xsd @@ -0,0 +1,14 @@ + + + + + + + + + + + diff --git a/ATS/xml/05_mapping_xml_schemas/0501_namespaces/050104_attributes/Pos_050104_attributes_of_the_xsd_schema_element_004/Pos_050104_attributes_of_the_xsd_schema_element_004.ttcn b/ATS/xml/05_mapping_xml_schemas/0501_namespaces/050104_attributes/Pos_050104_attributes_of_the_xsd_schema_element_004/Pos_050104_attributes_of_the_xsd_schema_element_004.ttcn new file mode 100644 index 00000000..7bdea507 --- /dev/null +++ b/ATS/xml/05_mapping_xml_schemas/0501_namespaces/050104_attributes/Pos_050104_attributes_of_the_xsd_schema_element_004/Pos_050104_attributes_of_the_xsd_schema_element_004.ttcn @@ -0,0 +1,93 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:5.1.4, Verify that qualified default attribute form is correctly processed (no namespace prefix) + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// If the TTCN-3 module corresponds to a (present) target namespace and the value of the +// attributeFormDefault ... attribute of any schema element information items that contribute +// to the given TTCN-3 module is qualified, the encoding instructions "attributeFormQualified" +// ... shall be attached accordingly to the given TTCN-3 module. +// +// Note: as only end-to-end solution is tested, the presence of encoding attributes is not +// checked directly, but through the encoded messages. +module Pos_050104_attributes_of_the_xsd_schema_element_004 { + + import from schema_Pos_050104_attributes_of_the_xsd_schema_element_004 language "XSD" all; + + template MyType m_msg := + { + item := "abc", + attr := "def" + }; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_050104_attributes_of_the_xsd_schema_element_004() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_050104_attributes_of_the_xsd_schema_element_004.xml", { "Pos_050104_attributes_of_the_xsd_schema_element_004.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_050104_attributes_of_the_xsd_schema_element_004(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/ATS/xml/05_mapping_xml_schemas/0501_namespaces/050104_attributes/Pos_050104_attributes_of_the_xsd_schema_element_004/Pos_050104_attributes_of_the_xsd_schema_element_004.xml b/ATS/xml/05_mapping_xml_schemas/0501_namespaces/050104_attributes/Pos_050104_attributes_of_the_xsd_schema_element_004/Pos_050104_attributes_of_the_xsd_schema_element_004.xml new file mode 100644 index 00000000..2adbe415 --- /dev/null +++ b/ATS/xml/05_mapping_xml_schemas/0501_namespaces/050104_attributes/Pos_050104_attributes_of_the_xsd_schema_element_004/Pos_050104_attributes_of_the_xsd_schema_element_004.xml @@ -0,0 +1,4 @@ + + + abc + \ No newline at end of file diff --git a/ATS/xml/05_mapping_xml_schemas/0501_namespaces/050104_attributes/Pos_050104_attributes_of_the_xsd_schema_element_004/Pos_050104_attributes_of_the_xsd_schema_element_004.xsd b/ATS/xml/05_mapping_xml_schemas/0501_namespaces/050104_attributes/Pos_050104_attributes_of_the_xsd_schema_element_004/Pos_050104_attributes_of_the_xsd_schema_element_004.xsd new file mode 100644 index 00000000..6542e372 --- /dev/null +++ b/ATS/xml/05_mapping_xml_schemas/0501_namespaces/050104_attributes/Pos_050104_attributes_of_the_xsd_schema_element_004/Pos_050104_attributes_of_the_xsd_schema_element_004.xsd @@ -0,0 +1,13 @@ + + + + + + + + + + + diff --git a/ATS/xml/05_mapping_xml_schemas/0501_namespaces/050104_attributes/Pos_050104_attributes_of_the_xsd_schema_element_005/Pos_050104_attributes_of_the_xsd_schema_element_005.ttcn b/ATS/xml/05_mapping_xml_schemas/0501_namespaces/050104_attributes/Pos_050104_attributes_of_the_xsd_schema_element_005/Pos_050104_attributes_of_the_xsd_schema_element_005.ttcn new file mode 100644 index 00000000..d78e64f1 --- /dev/null +++ b/ATS/xml/05_mapping_xml_schemas/0501_namespaces/050104_attributes/Pos_050104_attributes_of_the_xsd_schema_element_005/Pos_050104_attributes_of_the_xsd_schema_element_005.ttcn @@ -0,0 +1,93 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:5.1.4, Verify that qualified default attribute form is correctly processed (namespace prefix used) + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// If the TTCN-3 module corresponds to a (present) target namespace and the value of the +// attributeFormDefault ... attribute of any schema element information items that contribute +// to the given TTCN-3 module is qualified, the encoding instructions "attributeFormQualified" +// ... shall be attached accordingly to the given TTCN-3 module. +// +// Note: as only end-to-end solution is tested, the presence of encoding attributes is not +// checked directly, but through the encoded messages. +module Pos_050104_attributes_of_the_xsd_schema_element_005 { + + import from schema_Pos_050104_attributes_of_the_xsd_schema_element_005 language "XSD" all; + + template MyType m_msg := + { + item := "abc", + attr := "def" + }; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_050104_attributes_of_the_xsd_schema_element_005() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_050104_attributes_of_the_xsd_schema_element_005.xml", { "Pos_050104_attributes_of_the_xsd_schema_element_005.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_050104_attributes_of_the_xsd_schema_element_005(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/ATS/xml/05_mapping_xml_schemas/0501_namespaces/050104_attributes/Pos_050104_attributes_of_the_xsd_schema_element_005/Pos_050104_attributes_of_the_xsd_schema_element_005.xml b/ATS/xml/05_mapping_xml_schemas/0501_namespaces/050104_attributes/Pos_050104_attributes_of_the_xsd_schema_element_005/Pos_050104_attributes_of_the_xsd_schema_element_005.xml new file mode 100644 index 00000000..b19190ef --- /dev/null +++ b/ATS/xml/05_mapping_xml_schemas/0501_namespaces/050104_attributes/Pos_050104_attributes_of_the_xsd_schema_element_005/Pos_050104_attributes_of_the_xsd_schema_element_005.xml @@ -0,0 +1,4 @@ + + + abc + \ No newline at end of file diff --git a/ATS/xml/05_mapping_xml_schemas/0501_namespaces/050104_attributes/Pos_050104_attributes_of_the_xsd_schema_element_005/Pos_050104_attributes_of_the_xsd_schema_element_005.xsd b/ATS/xml/05_mapping_xml_schemas/0501_namespaces/050104_attributes/Pos_050104_attributes_of_the_xsd_schema_element_005/Pos_050104_attributes_of_the_xsd_schema_element_005.xsd new file mode 100644 index 00000000..24c65a88 --- /dev/null +++ b/ATS/xml/05_mapping_xml_schemas/0501_namespaces/050104_attributes/Pos_050104_attributes_of_the_xsd_schema_element_005/Pos_050104_attributes_of_the_xsd_schema_element_005.xsd @@ -0,0 +1,14 @@ + + + + + + + + + + + diff --git a/ATS/xml/05_mapping_xml_schemas/0501_namespaces/050104_attributes/Pos_050104_attributes_of_the_xsd_schema_element_006/Pos_050104_attributes_of_the_xsd_schema_element_006.ttcn b/ATS/xml/05_mapping_xml_schemas/0501_namespaces/050104_attributes/Pos_050104_attributes_of_the_xsd_schema_element_006/Pos_050104_attributes_of_the_xsd_schema_element_006.ttcn new file mode 100644 index 00000000..3374a95b --- /dev/null +++ b/ATS/xml/05_mapping_xml_schemas/0501_namespaces/050104_attributes/Pos_050104_attributes_of_the_xsd_schema_element_006/Pos_050104_attributes_of_the_xsd_schema_element_006.ttcn @@ -0,0 +1,95 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:5.1.4, Verify that unqualified default attribute form is correctly processed + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// All fields of TTCN-3 definitions in the given TTCN 3 module corresponding to local +// attribute declarations or to attribute and attributeGroup references in schema element +// information items with the value of its attributeFormDefault attribute being unqualified +//(explicitly or implicitly via defaulting) shall be supplied with the "form as unqualified" +// encoding instruction, unless a form attribute of the given declaration requires +// differently (see clause 7.1.6). +// +// Note: as only end-to-end solution is tested, the presence of encoding attributes is not +// checked directly, but through the encoded messages. +module Pos_050104_attributes_of_the_xsd_schema_element_006 { + + import from schema_Pos_050104_attributes_of_the_xsd_schema_element_006 language "XSD" all; + + template MyType m_msg := + { + item := "abc", + attr := "def" + }; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_050104_attributes_of_the_xsd_schema_element_006() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_050104_attributes_of_the_xsd_schema_element_006.xml", { "Pos_050104_attributes_of_the_xsd_schema_element_006.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_050104_attributes_of_the_xsd_schema_element_006(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/ATS/xml/05_mapping_xml_schemas/0501_namespaces/050104_attributes/Pos_050104_attributes_of_the_xsd_schema_element_006/Pos_050104_attributes_of_the_xsd_schema_element_006.xml b/ATS/xml/05_mapping_xml_schemas/0501_namespaces/050104_attributes/Pos_050104_attributes_of_the_xsd_schema_element_006/Pos_050104_attributes_of_the_xsd_schema_element_006.xml new file mode 100644 index 00000000..5385d64e --- /dev/null +++ b/ATS/xml/05_mapping_xml_schemas/0501_namespaces/050104_attributes/Pos_050104_attributes_of_the_xsd_schema_element_006/Pos_050104_attributes_of_the_xsd_schema_element_006.xml @@ -0,0 +1,4 @@ + + + abc + \ No newline at end of file diff --git a/ATS/xml/05_mapping_xml_schemas/0501_namespaces/050104_attributes/Pos_050104_attributes_of_the_xsd_schema_element_006/Pos_050104_attributes_of_the_xsd_schema_element_006.xsd b/ATS/xml/05_mapping_xml_schemas/0501_namespaces/050104_attributes/Pos_050104_attributes_of_the_xsd_schema_element_006/Pos_050104_attributes_of_the_xsd_schema_element_006.xsd new file mode 100644 index 00000000..6e3894af --- /dev/null +++ b/ATS/xml/05_mapping_xml_schemas/0501_namespaces/050104_attributes/Pos_050104_attributes_of_the_xsd_schema_element_006/Pos_050104_attributes_of_the_xsd_schema_element_006.xsd @@ -0,0 +1,14 @@ + + + + + + + + + + + diff --git a/ATS/xml/05_mapping_xml_schemas/0501_namespaces_and_document_references/050101_namespaces/Pos_050101_namespaces_004/Pos_050101_namespaces_004.xml b/ATS/xml/05_mapping_xml_schemas/0501_namespaces_and_document_references/050101_namespaces/Pos_050101_namespaces_004/Pos_050101_namespaces_004.xml new file mode 100644 index 00000000..aa4ad732 --- /dev/null +++ b/ATS/xml/05_mapping_xml_schemas/0501_namespaces_and_document_references/050101_namespaces/Pos_050101_namespaces_004/Pos_050101_namespaces_004.xml @@ -0,0 +1,2 @@ + +4 diff --git a/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_001/Pos_050202_name_conversion_rules_001.ttcn b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_001/Pos_050202_name_conversion_rules_001.ttcn new file mode 100644 index 00000000..b643fee0 --- /dev/null +++ b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_001/Pos_050202_name_conversion_rules_001.ttcn @@ -0,0 +1,90 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:5.2.2, Verify conversion of symbols into U+005f (low line) + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// Rule b: +// the characters " " (SPACE), "." (FULL STOP), "-" (HYPEN-MINUS), ":" (COLON) and "/" +// (SOLIDUS) shall all be replaced by a "_" (LOW LINE); +module Pos_050202_name_conversion_rules_001 { + + import from schema_Pos_050202_name_conversion_rules_001_test language "XSD" all; + + template A_b_c m_src := + { + d_e_f := 1, + g_h_i := 2 + }; + template MyType m_msg := m_src; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_050202_name_conversion_rules_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_050202_name_conversion_rules_001.xml", { "Pos_050202_name_conversion_rules_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_050202_name_conversion_rules_001(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_001/Pos_050202_name_conversion_rules_001.xml b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_001/Pos_050202_name_conversion_rules_001.xml new file mode 100644 index 00000000..b988e2aa --- /dev/null +++ b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_001/Pos_050202_name_conversion_rules_001.xml @@ -0,0 +1,4 @@ + + + 1 + \ No newline at end of file diff --git a/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_001/Pos_050202_name_conversion_rules_001.xsd b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_001/Pos_050202_name_conversion_rules_001.xsd new file mode 100644 index 00000000..fabd8a8d --- /dev/null +++ b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_001/Pos_050202_name_conversion_rules_001.xsd @@ -0,0 +1,12 @@ + + + + + + + + + + diff --git a/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_002/Pos_050202_name_conversion_rules_002.ttcn b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_002/Pos_050202_name_conversion_rules_002.ttcn new file mode 100644 index 00000000..dc025e77 --- /dev/null +++ b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_002/Pos_050202_name_conversion_rules_002.ttcn @@ -0,0 +1,90 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:5.2.2, Verify that non-ASCI letters are not present in transforming identifiers + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// Rule c: +// any character except "A" to "Z" (LATIN CAPITAL LETTER A to LATIN CAPITAL LETTER Z), +// "a" to "z" (LATIN SMALL LETTER A to LATIN SMALL LETTER Z), "0" to "9" (DIGIT ZERO +// to DIGIT NINE), and "_" (LOW LINE) shall be removed; +module Pos_050202_name_conversion_rules_002 { + import from schema_Pos_050202_name_conversion_rules_002 language "XSD" all; + + template Xx m_src := + { + aa := 1, + bb := 2 + }; + template MyType m_msg := m_src; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_050202_name_conversion_rules_002() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_050202_name_conversion_rules_002.xml", { "Pos_050202_name_conversion_rules_002.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_050202_name_conversion_rules_002(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_002/Pos_050202_name_conversion_rules_002.xml b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_002/Pos_050202_name_conversion_rules_002.xml new file mode 100644 index 00000000..ba0b7b28 --- /dev/null +++ b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_002/Pos_050202_name_conversion_rules_002.xml @@ -0,0 +1,4 @@ + + + 1 + \ No newline at end of file diff --git a/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_002/Pos_050202_name_conversion_rules_002.xsd b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_002/Pos_050202_name_conversion_rules_002.xsd new file mode 100644 index 00000000..20003f19 --- /dev/null +++ b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_002/Pos_050202_name_conversion_rules_002.xsd @@ -0,0 +1,12 @@ + + + + + + + + + + diff --git a/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_003/Pos_050202_name_conversion_rules_003.ttcn b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_003/Pos_050202_name_conversion_rules_003.ttcn new file mode 100644 index 00000000..7a485cc0 --- /dev/null +++ b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_003/Pos_050202_name_conversion_rules_003.ttcn @@ -0,0 +1,91 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:5.2.2, Verify that multiple "_" are simplified in transforming identifiers + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// Rule d: +// a sequence of two or more "_" (LOW LINE) characters shall be replaced with +// a single "_" (LOW LINE); +module Pos_050202_name_conversion_rules_003 { + + import from schema_Pos_050202_name_conversion_rules_003 language "XSD" all; + + template A_b m_src := + { + c_d := 1, + e_f := 2 + }; + template MyType m_msg := m_src; + + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_050202_name_conversion_rules_003() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_050202_name_conversion_rules_003.xml", { "Pos_050202_name_conversion_rules_003.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_050202_name_conversion_rules_003(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_003/Pos_050202_name_conversion_rules_003.xml b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_003/Pos_050202_name_conversion_rules_003.xml new file mode 100644 index 00000000..f5c4074b --- /dev/null +++ b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_003/Pos_050202_name_conversion_rules_003.xml @@ -0,0 +1,4 @@ + + + 1 + \ No newline at end of file diff --git a/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_003/Pos_050202_name_conversion_rules_003.xsd b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_003/Pos_050202_name_conversion_rules_003.xsd new file mode 100644 index 00000000..c4ecd1fe --- /dev/null +++ b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_003/Pos_050202_name_conversion_rules_003.xsd @@ -0,0 +1,12 @@ + + + + + + + + + + diff --git a/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_004/Pos_050202_name_conversion_rules_004.ttcn b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_004/Pos_050202_name_conversion_rules_004.ttcn new file mode 100644 index 00000000..a5874cc2 --- /dev/null +++ b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_004/Pos_050202_name_conversion_rules_004.ttcn @@ -0,0 +1,90 @@ +/*************************************************** + ** @author STF 475, updated by STF 521 + ** @version 0.0.2 + ** @purpose 9:5.2.2, Verify that leading and trailing low lines are removed + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// Rule e: +// "_" (LOW LINE) characters occurring at the beginning or at the end of the name shall +// be removed; +module Pos_050202_name_conversion_rules_004 { + + import from schema_Pos_050202_name_conversion_rules_004 language "XSD" all; + + template Abc m_src := + { + def := 1, + ghi := 2 + }; + template MyType m_msg := m_src; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_050202_name_conversion_rules_004() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_050202_name_conversion_rules_004.xml", { "Pos_050202_name_conversion_rules_004.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_050202_name_conversion_rules_004(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_004/Pos_050202_name_conversion_rules_004.xml b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_004/Pos_050202_name_conversion_rules_004.xml new file mode 100644 index 00000000..8effe763 --- /dev/null +++ b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_004/Pos_050202_name_conversion_rules_004.xml @@ -0,0 +1,4 @@ + + + <__def>1 + \ No newline at end of file diff --git a/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_004/Pos_050202_name_conversion_rules_004.xsd b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_004/Pos_050202_name_conversion_rules_004.xsd new file mode 100644 index 00000000..de348d0a --- /dev/null +++ b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_004/Pos_050202_name_conversion_rules_004.xsd @@ -0,0 +1,12 @@ + + + + + + + + + + diff --git a/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_005/Pos_050202_name_conversion_rules_005.ttcn b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_005/Pos_050202_name_conversion_rules_005.ttcn new file mode 100644 index 00000000..6f9bdf78 --- /dev/null +++ b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_005/Pos_050202_name_conversion_rules_005.ttcn @@ -0,0 +1,85 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:5.2.2, Verify that type names are capitalized + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// Rule f: +// if a character string that is to be used as a name of a TTCN-3 type starts with +// a lower-case letter, the first letter shall be capitalized (converted to upper-case); +module Pos_050202_name_conversion_rules_005 { + + import from schema_Pos_050202_name_conversion_rules_005 language "XSD" all; + + template MyType m_msg := 5; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_050202_name_conversion_rules_005() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_050202_name_conversion_rules_005.xml", { "Pos_050202_name_conversion_rules_005.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_050202_name_conversion_rules_005(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_005/Pos_050202_name_conversion_rules_005.xml b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_005/Pos_050202_name_conversion_rules_005.xml new file mode 100644 index 00000000..39a88a17 --- /dev/null +++ b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_005/Pos_050202_name_conversion_rules_005.xml @@ -0,0 +1,2 @@ + +5 \ No newline at end of file diff --git a/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_005/Pos_050202_name_conversion_rules_005.xsd b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_005/Pos_050202_name_conversion_rules_005.xsd new file mode 100644 index 00000000..c7d8f433 --- /dev/null +++ b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_005/Pos_050202_name_conversion_rules_005.xsd @@ -0,0 +1,6 @@ + + + + diff --git a/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_006/Pos_050202_name_conversion_rules_006.ttcn b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_006/Pos_050202_name_conversion_rules_006.ttcn new file mode 100644 index 00000000..b4bc2af3 --- /dev/null +++ b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_006/Pos_050202_name_conversion_rules_006.ttcn @@ -0,0 +1,86 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:5.2.2, Verify that prefixing type names with "X" works correctly + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// Rule f: +// If [a character string that is to be used as a name of a TTCN-3 type] starts with +// a digit (DIGIT ZERO to DIGIT NINE), it shall be prefixed with an "X" (LATIN CAPITAL +// LETTER X) character; +module Pos_050202_name_conversion_rules_006 { + + import from schema_Pos_050202_name_conversion_rules_006 language "XSD" all; + + template X01MyType m_msg := 6; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_050202_name_conversion_rules_006() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_050202_name_conversion_rules_006.xml", { "Pos_050202_name_conversion_rules_006.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_050202_name_conversion_rules_006(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_006/Pos_050202_name_conversion_rules_006.xml b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_006/Pos_050202_name_conversion_rules_006.xml new file mode 100644 index 00000000..f1721fde --- /dev/null +++ b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_006/Pos_050202_name_conversion_rules_006.xml @@ -0,0 +1,2 @@ + +6 \ No newline at end of file diff --git a/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_006/Pos_050202_name_conversion_rules_006.xsd b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_006/Pos_050202_name_conversion_rules_006.xsd new file mode 100644 index 00000000..82534d35 --- /dev/null +++ b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_006/Pos_050202_name_conversion_rules_006.xsd @@ -0,0 +1,6 @@ + + + + diff --git a/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_007/Pos_050202_name_conversion_rules_007.ttcn b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_007/Pos_050202_name_conversion_rules_007.ttcn new file mode 100644 index 00000000..c52573a5 --- /dev/null +++ b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_007/Pos_050202_name_conversion_rules_007.ttcn @@ -0,0 +1,90 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:5.2.2, Verify that names of field of structure types are uncapitalized + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// Rule g: +// if a character string that is to be used as an identifier of a structured type field +// ... starts with an upper-case letter, the first letter shall be uncapitalized +// (converted to lower-case); +module Pos_050202_name_conversion_rules_007 { + + import from schema_Pos_050202_name_conversion_rules_007 language "XSD" all; + + template MyType m_msg := + { + abc := 1, + def := 2 + }; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_050202_name_conversion_rules_007() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_050202_name_conversion_rules_007.xml", { "Pos_050202_name_conversion_rules_007.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_050202_name_conversion_rules_007(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_007/Pos_050202_name_conversion_rules_007.xml b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_007/Pos_050202_name_conversion_rules_007.xml new file mode 100644 index 00000000..515240ae --- /dev/null +++ b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_007/Pos_050202_name_conversion_rules_007.xml @@ -0,0 +1,4 @@ + + + 1 + \ No newline at end of file diff --git a/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_007/Pos_050202_name_conversion_rules_007.xsd b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_007/Pos_050202_name_conversion_rules_007.xsd new file mode 100644 index 00000000..06049357 --- /dev/null +++ b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_007/Pos_050202_name_conversion_rules_007.xsd @@ -0,0 +1,13 @@ + + + + + + + + + + + diff --git a/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_008/Pos_050202_name_conversion_rules_008.ttcn b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_008/Pos_050202_name_conversion_rules_008.ttcn new file mode 100644 index 00000000..fce6ef17 --- /dev/null +++ b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_008/Pos_050202_name_conversion_rules_008.ttcn @@ -0,0 +1,86 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:5.2.2, Verify that names of enumerated items are uncapitalized + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// Rule g: +// if a character string that is to be used as an identifier of a structured ... +// enumeration value starts with an upper-case letter, the first letter shall be +// uncapitalized (converted to lower-case); +module Pos_050202_name_conversion_rules_008 { + + import from schema_Pos_050202_name_conversion_rules_008 language "XSD" all; + + template MyType m_msg := indigo; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_050202_name_conversion_rules_008() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_050202_name_conversion_rules_008.xml", { "Pos_050202_name_conversion_rules_008.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_050202_name_conversion_rules_008(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_008/Pos_050202_name_conversion_rules_008.xml b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_008/Pos_050202_name_conversion_rules_008.xml new file mode 100644 index 00000000..5f1981dd --- /dev/null +++ b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_008/Pos_050202_name_conversion_rules_008.xml @@ -0,0 +1,2 @@ + +Indigo \ No newline at end of file diff --git a/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_008/Pos_050202_name_conversion_rules_008.xsd b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_008/Pos_050202_name_conversion_rules_008.xsd new file mode 100644 index 00000000..13f3d1d6 --- /dev/null +++ b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_008/Pos_050202_name_conversion_rules_008.xsd @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + diff --git a/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_009/Pos_050202_name_conversion_rules_009.ttcn b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_009/Pos_050202_name_conversion_rules_009.ttcn new file mode 100644 index 00000000..46c85e6f --- /dev/null +++ b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_009/Pos_050202_name_conversion_rules_009.ttcn @@ -0,0 +1,90 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:5.2.2, Verify that prefixing field names of structured types with "x" works correctly + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// Rule g: +// if [a character string that is to be used as an identifier of a structured type field] +// starts with a digit (DIGIT ZERO to DIGIT NINE), it shall be prefixed with an "x" +// (LATIN SMALL LETTER X) character; +module Pos_050202_name_conversion_rules_009 { + + import from schema_Pos_050202_name_conversion_rules_009 language "XSD" all; + + template MyType m_msg := + { + x01abc := 1, + x02def := 2 + }; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_050202_name_conversion_rules_009() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_050202_name_conversion_rules_009.xml", { "Pos_050202_name_conversion_rules_009.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_050202_name_conversion_rules_009(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_009/Pos_050202_name_conversion_rules_009.xml b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_009/Pos_050202_name_conversion_rules_009.xml new file mode 100644 index 00000000..b53d8a92 --- /dev/null +++ b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_009/Pos_050202_name_conversion_rules_009.xml @@ -0,0 +1,4 @@ + + + <中国01abc>1 + \ No newline at end of file diff --git a/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_009/Pos_050202_name_conversion_rules_009.xsd b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_009/Pos_050202_name_conversion_rules_009.xsd new file mode 100644 index 00000000..465afd98 --- /dev/null +++ b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_009/Pos_050202_name_conversion_rules_009.xsd @@ -0,0 +1,13 @@ + + + + + + + + + + + diff --git a/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_010/Pos_050202_name_conversion_rules_010.ttcn b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_010/Pos_050202_name_conversion_rules_010.ttcn new file mode 100644 index 00000000..6f6dcd09 --- /dev/null +++ b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_010/Pos_050202_name_conversion_rules_010.ttcn @@ -0,0 +1,86 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:5.2.2, Verify that prefixing enumerated items with "x" works correctly + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// Rule g: +// if [a character string that is to be used as an identifier of an enumerated item] +// starts with a digit (DIGIT ZERO to DIGIT NINE), it shall be prefixed with an "x" +// (LATIN SMALL LETTER X) character; +module Pos_050202_name_conversion_rules_010 { + + import from schema_Pos_050202_name_conversion_rules_010 language "XSD" all; + + template MyType m_msg := x02_orange; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_050202_name_conversion_rules_010() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_050202_name_conversion_rules_010.xml", { "Pos_050202_name_conversion_rules_010.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_050202_name_conversion_rules_010(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_010/Pos_050202_name_conversion_rules_010.xml b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_010/Pos_050202_name_conversion_rules_010.xml new file mode 100644 index 00000000..75e68cd4 --- /dev/null +++ b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_010/Pos_050202_name_conversion_rules_010.xml @@ -0,0 +1,2 @@ + +橙色02_orange \ No newline at end of file diff --git a/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_010/Pos_050202_name_conversion_rules_010.xsd b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_010/Pos_050202_name_conversion_rules_010.xsd new file mode 100644 index 00000000..f863d88f --- /dev/null +++ b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_010/Pos_050202_name_conversion_rules_010.xsd @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + diff --git a/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_011/Pos_050202_name_conversion_rules_011.ttcn b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_011/Pos_050202_name_conversion_rules_011.ttcn new file mode 100644 index 00000000..4de06a5a --- /dev/null +++ b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_011/Pos_050202_name_conversion_rules_011.ttcn @@ -0,0 +1,85 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:5.2.2, Check transformation of empty type identifier into "X" + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// Rule h: +// if a character string that is to be used as a name of a TTCN-3 type definition or as +// a type reference name is empty, it shall be replaced by "X" (LATIN CAPITAL LETTER X); +module Pos_050202_name_conversion_rules_011 { + + import from schema_Pos_050202_name_conversion_rules_011 language "XSD" all; + + template X m_msg := "世界,你好!"; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_050202_name_conversion_rules_011() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_050202_name_conversion_rules_011.xml", { "Pos_050202_name_conversion_rules_011.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_050202_name_conversion_rules_011(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_011/Pos_050202_name_conversion_rules_011.xml b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_011/Pos_050202_name_conversion_rules_011.xml new file mode 100644 index 00000000..95dc8649 --- /dev/null +++ b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_011/Pos_050202_name_conversion_rules_011.xml @@ -0,0 +1,2 @@ + +世界,你好! \ No newline at end of file diff --git a/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_011/Pos_050202_name_conversion_rules_011.xsd b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_011/Pos_050202_name_conversion_rules_011.xsd new file mode 100644 index 00000000..0da0c0c5 --- /dev/null +++ b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_011/Pos_050202_name_conversion_rules_011.xsd @@ -0,0 +1,6 @@ + + + + diff --git a/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_012/Pos_050202_name_conversion_rules_012.ttcn b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_012/Pos_050202_name_conversion_rules_012.ttcn new file mode 100644 index 00000000..7cffb2b4 --- /dev/null +++ b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_012/Pos_050202_name_conversion_rules_012.ttcn @@ -0,0 +1,85 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:5.2.2, Check transformation of empty structured field identifier into "x" + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// Rule i: +// if a character string that is to be used a name of a record ... field ... is empty, it +// shall be replaced by "x" (LATIN SMALL LETTER X). +module Pos_050202_name_conversion_rules_012 { + + import from schema_Pos_050202_name_conversion_rules_012 language "XSD" all; + + template MyType m_msg := { x := "孔子" }; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_050202_name_conversion_rules_012() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_050202_name_conversion_rules_012.xml", { "Pos_050202_name_conversion_rules_012.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_050202_name_conversion_rules_012(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_012/Pos_050202_name_conversion_rules_012.xml b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_012/Pos_050202_name_conversion_rules_012.xml new file mode 100644 index 00000000..ffed47c7 --- /dev/null +++ b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_012/Pos_050202_name_conversion_rules_012.xml @@ -0,0 +1,4 @@ + + + <名称>孔子 + \ No newline at end of file diff --git a/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_012/Pos_050202_name_conversion_rules_012.xsd b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_012/Pos_050202_name_conversion_rules_012.xsd new file mode 100644 index 00000000..09c56398 --- /dev/null +++ b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_012/Pos_050202_name_conversion_rules_012.xsd @@ -0,0 +1,12 @@ + + + + + + + + + + diff --git a/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_013/Pos_050202_name_conversion_rules_013.ttcn b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_013/Pos_050202_name_conversion_rules_013.ttcn new file mode 100644 index 00000000..cdd21478 --- /dev/null +++ b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_013/Pos_050202_name_conversion_rules_013.ttcn @@ -0,0 +1,85 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:5.2.2, Check transformation of empty enumerated value into "x" + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// Rule i: +// if a character string that is to be used a name of ... [an] enumeration value +// is empty, it shall be replaced by "x" (LATIN SMALL LETTER X). +module Pos_050202_name_conversion_rules_013 { + + import from schema_Pos_050202_name_conversion_rules_013 language "XSD" all; + + template MyType m_msg := x; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_050202_name_conversion_rules_013() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_050202_name_conversion_rules_013.xml", { "Pos_050202_name_conversion_rules_013.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_050202_name_conversion_rules_013(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_013/Pos_050202_name_conversion_rules_013.xml b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_013/Pos_050202_name_conversion_rules_013.xml new file mode 100644 index 00000000..fec2709c --- /dev/null +++ b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_013/Pos_050202_name_conversion_rules_013.xml @@ -0,0 +1,2 @@ + +中文 \ No newline at end of file diff --git a/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_013/Pos_050202_name_conversion_rules_013.xsd b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_013/Pos_050202_name_conversion_rules_013.xsd new file mode 100644 index 00000000..b4f67891 --- /dev/null +++ b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_013/Pos_050202_name_conversion_rules_013.xsd @@ -0,0 +1,13 @@ + + + + + + + + + + + diff --git a/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_014/Pos_050202_name_conversion_rules_014.ttcn b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_014/Pos_050202_name_conversion_rules_014.ttcn new file mode 100644 index 00000000..23ea6a13 --- /dev/null +++ b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_014/Pos_050202_name_conversion_rules_014.ttcn @@ -0,0 +1,93 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:5.2.2, Verify that additional suffices are attached in case of name clashes between types + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// Rule j: +// If the name being generated is the name of a TTCN-3 type and the character string +// generated by items a) to i) above is identical to the name of another TTCN-3 type +// previously generated in the same TTCN-3 module, or is one of the reserved words +// specified in clause 11.27 of Recommendation ITU T X.680 [3], then a postfix shall +// be appended to the character string generated according to the above rules. The +// postfix shall consist of a "_" (LOW LINE) followed by the canonical lexical +// representation (see W3C XML Schema Part 2 [9], clause 2.3.1) of an integer. This +// integer shall be the least positive integer such that the new name is different +// from the type reference name of any other TTCN-3 type assignment previously +// generated in any of those TTCN-3 modules. +module Pos_050202_name_conversion_rules_014 { + + import from schema_Pos_050202_name_conversion_rules_014 language "XSD" all; + + template MyType_2 m_msg := 1.0; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_050202_name_conversion_rules_014() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_050202_name_conversion_rules_014.xml", { "Pos_050202_name_conversion_rules_014.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_050202_name_conversion_rules_014(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_014/Pos_050202_name_conversion_rules_014.xml b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_014/Pos_050202_name_conversion_rules_014.xml new file mode 100644 index 00000000..0476dc38 --- /dev/null +++ b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_014/Pos_050202_name_conversion_rules_014.xml @@ -0,0 +1,2 @@ + +1.0 \ No newline at end of file diff --git a/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_014/Pos_050202_name_conversion_rules_014.xsd b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_014/Pos_050202_name_conversion_rules_014.xsd new file mode 100644 index 00000000..bea557b6 --- /dev/null +++ b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_014/Pos_050202_name_conversion_rules_014.xsd @@ -0,0 +1,8 @@ + + + + + + diff --git a/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_015/Pos_050202_name_conversion_rules_015.ttcn b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_015/Pos_050202_name_conversion_rules_015.ttcn new file mode 100644 index 00000000..a3ffd089 --- /dev/null +++ b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_015/Pos_050202_name_conversion_rules_015.ttcn @@ -0,0 +1,93 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:5.2.2, Verify that suffix is attached in case of name clash between types and local module + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// Rule j (adaptation considering rules of 5.2.2 of the core language specification): +// If the name being generated is the name of a TTCN-3 type and the character string +// generated by items a) to i) above is identical to the name of another TTCN-3 type +// previously generated in the same TTCN-3 module, or is one of the reserved words +// specified in clause 11.27 of Recommendation ITU T X.680 [3], then a postfix shall +// be appended to the character string generated according to the above rules. The +// postfix shall consist of a "_" (LOW LINE) followed by the canonical lexical +// representation (see W3C XML Schema Part 2 [9], clause 2.3.1) of an integer. This +// integer shall be the least positive integer such that the new name is different +// from the type reference name of any other TTCN-3 type assignment previously +// generated in any of those TTCN-3 modules. +module Pos_050202_name_conversion_rules_015 { + + import from MyType language "XSD" all; + + template MyType_1 m_msg := 15; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_050202_name_conversion_rules_015() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_050202_name_conversion_rules_015.xml", { "Pos_050202_name_conversion_rules_015.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_050202_name_conversion_rules_015(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_015/Pos_050202_name_conversion_rules_015.xml b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_015/Pos_050202_name_conversion_rules_015.xml new file mode 100644 index 00000000..accea6db --- /dev/null +++ b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_015/Pos_050202_name_conversion_rules_015.xml @@ -0,0 +1,2 @@ + +15 \ No newline at end of file diff --git a/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_015/Pos_050202_name_conversion_rules_015.xsd b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_015/Pos_050202_name_conversion_rules_015.xsd new file mode 100644 index 00000000..ad7be898 --- /dev/null +++ b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_015/Pos_050202_name_conversion_rules_015.xsd @@ -0,0 +1,6 @@ + + + + diff --git a/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_016/Pos_050202_name_conversion_rules_016.ttcn b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_016/Pos_050202_name_conversion_rules_016.ttcn new file mode 100644 index 00000000..3f79b534 --- /dev/null +++ b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_016/Pos_050202_name_conversion_rules_016.ttcn @@ -0,0 +1,93 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:5.2.2, Verify that suffix is attached in case of name clash between types and imported module + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// Rule j (adaptation considering rules of 5.2.2 of the core language specification): +// If the name being generated is the name of a TTCN-3 type and the character string +// generated by items a) to i) above is identical to the name of another TTCN-3 type +// previously generated in the same TTCN-3 module, or is one of the reserved words +// specified in clause 11.27 of Recommendation ITU T X.680 [3], then a postfix shall +// be appended to the character string generated according to the above rules. The +// postfix shall consist of a "_" (LOW LINE) followed by the canonical lexical +// representation (see W3C XML Schema Part 2 [9], clause 2.3.1) of an integer. This +// integer shall be the least positive integer such that the new name is different +// from the type reference name of any other TTCN-3 type assignment previously +// generated in any of those TTCN-3 modules. +module Pos_050202_name_conversion_rules_016 { + + import from schema_Pos_050202_name_conversion_rules_016 language "XSD" all; + + template MyType_1 m_msg := "abc"; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_050202_name_conversion_rules_016() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_050202_name_conversion_rules_016.xml", { "Pos_050202_name_conversion_rules_016.xsd", "Pos_050202_name_conversion_rules_016_1.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_050202_name_conversion_rules_016(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_016/Pos_050202_name_conversion_rules_016.xml b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_016/Pos_050202_name_conversion_rules_016.xml new file mode 100644 index 00000000..3381a461 --- /dev/null +++ b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_016/Pos_050202_name_conversion_rules_016.xml @@ -0,0 +1,2 @@ + +abc \ No newline at end of file diff --git a/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_016/Pos_050202_name_conversion_rules_016.xsd b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_016/Pos_050202_name_conversion_rules_016.xsd new file mode 100644 index 00000000..6ed81380 --- /dev/null +++ b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_016/Pos_050202_name_conversion_rules_016.xsd @@ -0,0 +1,7 @@ + + + + + diff --git a/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_016/Pos_050202_name_conversion_rules_016_1.xsd b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_016/Pos_050202_name_conversion_rules_016_1.xsd new file mode 100644 index 00000000..0e7a0cce --- /dev/null +++ b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_016/Pos_050202_name_conversion_rules_016_1.xsd @@ -0,0 +1,6 @@ + + + + diff --git a/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_017/Pos_050202_name_conversion_rules_017.ttcn b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_017/Pos_050202_name_conversion_rules_017.ttcn new file mode 100644 index 00000000..cfa54f1b --- /dev/null +++ b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_017/Pos_050202_name_conversion_rules_017.ttcn @@ -0,0 +1,98 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:5.2.2, Verify that suffix is attached in case of name clash between field names + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// Rule k: +// If the name being generated is the identifier of a field of a record or +// a union type, and the character string generated by the rules in items +// a) to i) above is identical to the identifier of a previously generated +// field identifier of the same type, then a postfix shall be appended to +// the character string generated by the above rules. The postfix shall +// consist of a "_" (LOW LINE) followed by the canonical lexical +// representation (see W3C XML Schema Part 2 [9], clause 2.3.1) of +// an integer. This integer shall be the least positive integer such that +// the new identifier is different from the identifier of any previously +// generated component of that sequence, set, or choice type. +module Pos_050202_name_conversion_rules_017 { + + import from schema_Pos_050202_name_conversion_rules_017 language "XSD" all; + + template MyType m_msg := + { + item := 0, + item_1 := 1, + item_2 := 2 + }; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_050202_name_conversion_rules_017() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_050202_name_conversion_rules_017.xml", { "Pos_050202_name_conversion_rules_017.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_050202_name_conversion_rules_017(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_017/Pos_050202_name_conversion_rules_017.xml b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_017/Pos_050202_name_conversion_rules_017.xml new file mode 100644 index 00000000..1f9bb1c6 --- /dev/null +++ b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_017/Pos_050202_name_conversion_rules_017.xml @@ -0,0 +1,6 @@ + + + 0 + 1 + 2 + \ No newline at end of file diff --git a/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_017/Pos_050202_name_conversion_rules_017.xsd b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_017/Pos_050202_name_conversion_rules_017.xsd new file mode 100644 index 00000000..0fef5379 --- /dev/null +++ b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_017/Pos_050202_name_conversion_rules_017.xsd @@ -0,0 +1,14 @@ + + + + + + + + + + + + diff --git a/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_018/Pos_050202_name_conversion_rules_018.ttcn b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_018/Pos_050202_name_conversion_rules_018.ttcn new file mode 100644 index 00000000..635c7ba0 --- /dev/null +++ b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_018/Pos_050202_name_conversion_rules_018.ttcn @@ -0,0 +1,89 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:5.2.2, Verify that suffix is attached in case of name clash between field name and keyword + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// Rule k: +// Field names that are one of the TTCN-3 keywords (see clause A.1.5 of ES 201 873 1 +// [1]) ... after applying the postfix to clashing field names, shall be suffixed by +// a single "_" (LOW LINE) character. +module Pos_050202_name_conversion_rules_018 { + + import from schema_Pos_050202_name_conversion_rules_018 language "XSD" all; + + template MyType m_msg := + { + choice:= { variant_ := 0 } + }; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_050202_name_conversion_rules_018() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_050202_name_conversion_rules_018.xml", { "Pos_050202_name_conversion_rules_018.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_050202_name_conversion_rules_018(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_018/Pos_050202_name_conversion_rules_018.xml b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_018/Pos_050202_name_conversion_rules_018.xml new file mode 100644 index 00000000..ec203e9f --- /dev/null +++ b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_018/Pos_050202_name_conversion_rules_018.xml @@ -0,0 +1,4 @@ + + + 0 + \ No newline at end of file diff --git a/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_018/Pos_050202_name_conversion_rules_018.xsd b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_018/Pos_050202_name_conversion_rules_018.xsd new file mode 100644 index 00000000..eb28d7a5 --- /dev/null +++ b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_018/Pos_050202_name_conversion_rules_018.xsd @@ -0,0 +1,14 @@ + + + + + + + + + + + + diff --git a/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_019/Pos_050202_name_conversion_rules_019.ttcn b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_019/Pos_050202_name_conversion_rules_019.ttcn new file mode 100644 index 00000000..507b287b --- /dev/null +++ b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_019/Pos_050202_name_conversion_rules_019.ttcn @@ -0,0 +1,89 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:5.2.2, Verify that suffix is attached in case of name clash between field name and predefined function + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// Rule k: +// Field names that are one of the ... names of predefined functions (see clause 16.1.2 of +// ES 201 873 1 [1]) after applying the postfix to clashing field names, shall be suffixed +// by a single "_" (LOW LINE) character. +module Pos_050202_name_conversion_rules_019 { + + import from schema_Pos_050202_name_conversion_rules_019 language "XSD" all; + + template MyType m_msg := + { + choice:= { rnd_ := 0 } + }; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_050202_name_conversion_rules_019() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_050202_name_conversion_rules_019.xml", { "Pos_050202_name_conversion_rules_019.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_050202_name_conversion_rules_019(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_019/Pos_050202_name_conversion_rules_019.xml b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_019/Pos_050202_name_conversion_rules_019.xml new file mode 100644 index 00000000..5031f3e3 --- /dev/null +++ b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_019/Pos_050202_name_conversion_rules_019.xml @@ -0,0 +1,4 @@ + + + 0 + \ No newline at end of file diff --git a/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_019/Pos_050202_name_conversion_rules_019.xsd b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_019/Pos_050202_name_conversion_rules_019.xsd new file mode 100644 index 00000000..317c0423 --- /dev/null +++ b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_019/Pos_050202_name_conversion_rules_019.xsd @@ -0,0 +1,14 @@ + + + + + + + + + + + + diff --git a/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_020/Pos_050202_name_conversion_rules_020.ttcn b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_020/Pos_050202_name_conversion_rules_020.ttcn new file mode 100644 index 00000000..f4c67282 --- /dev/null +++ b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_020/Pos_050202_name_conversion_rules_020.ttcn @@ -0,0 +1,94 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:5.2.2, Verify that suffix is attached in case of name clash between enumerated items + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// Rule l: +// If the name being generated is the identifier of an enumeration item +// (see clause 6.2.4 of ES 201 873 1 [1]) of an enumerated type, and the +// character string generated by the rules in items a) to i) above is +// identical to the identifier of another enumeration item previously +// generated in the same enumerated type, then a postfix shall be appended +// to the character string generated by the above rules. The postfix shall +// consist of a "_" (LOW LINE) followed by the canonical lexical +// representation (see W3C XML Schema Part 2 [9], clause 2.3.1) of +// an integer. This integer shall be the least positive integer such that +// the new identifier is different from the identifier in any other +// enumeration item already present in that TTCN-3 enumerated type. +module Pos_050202_name_conversion_rules_020 { + + import from schema_Pos_050202_name_conversion_rules_020 language "XSD" all; + + template MyType m_msg := red_1; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_050202_name_conversion_rules_020() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_050202_name_conversion_rules_020.xml", { "Pos_050202_name_conversion_rules_020.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_050202_name_conversion_rules_020(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_020/Pos_050202_name_conversion_rules_020.xml b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_020/Pos_050202_name_conversion_rules_020.xml new file mode 100644 index 00000000..c2b30326 --- /dev/null +++ b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_020/Pos_050202_name_conversion_rules_020.xml @@ -0,0 +1,2 @@ + +红色red \ No newline at end of file diff --git a/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_020/Pos_050202_name_conversion_rules_020.xsd b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_020/Pos_050202_name_conversion_rules_020.xsd new file mode 100644 index 00000000..f6cdbcf8 --- /dev/null +++ b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_020/Pos_050202_name_conversion_rules_020.xsd @@ -0,0 +1,15 @@ + + + + + + + + + + + + + diff --git a/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_021/Pos_050202_name_conversion_rules_021.ttcn b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_021/Pos_050202_name_conversion_rules_021.ttcn new file mode 100644 index 00000000..f3688389 --- /dev/null +++ b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_021/Pos_050202_name_conversion_rules_021.ttcn @@ -0,0 +1,86 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:5.2.2, Verify that suffix is attached in case of name clash between enumerated item and keyword + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// Rule k: +// Enumeration names that are one of the TTCN-3 keywords (see clause A.1.5 +// of ES 201 873 1 [1]) ... after applying the postfix to clashing enumeration +// names, shall be suffixed by a single "_" (LOW LINE) character. +module Pos_050202_name_conversion_rules_021 { + + import from schema_Pos_050202_name_conversion_rules_021 language "XSD" all; + + template MyType m_msg := on_; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_050202_name_conversion_rules_021() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_050202_name_conversion_rules_021.xml", { "Pos_050202_name_conversion_rules_021.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_050202_name_conversion_rules_021(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_021/Pos_050202_name_conversion_rules_021.xml b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_021/Pos_050202_name_conversion_rules_021.xml new file mode 100644 index 00000000..0b790095 --- /dev/null +++ b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_021/Pos_050202_name_conversion_rules_021.xml @@ -0,0 +1,2 @@ + +on \ No newline at end of file diff --git a/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_021/Pos_050202_name_conversion_rules_021.xsd b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_021/Pos_050202_name_conversion_rules_021.xsd new file mode 100644 index 00000000..f52b52c3 --- /dev/null +++ b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_021/Pos_050202_name_conversion_rules_021.xsd @@ -0,0 +1,13 @@ + + + + + + + + + + + diff --git a/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_022/Pos_050202_name_conversion_rules_022.ttcn b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_022/Pos_050202_name_conversion_rules_022.ttcn new file mode 100644 index 00000000..6f8d5091 --- /dev/null +++ b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_022/Pos_050202_name_conversion_rules_022.ttcn @@ -0,0 +1,86 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:5.2.2, Verify that suffix is attached in case of name clash between enumerated item and predefined function + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// Rule k: +// Enumeration names that are one of the ... names of predefined functions +// (see clause 16.1.2 of ES 201 873 1 [1])after applying the postfix to clashing +// enumeration names, shall be suffixed by a single "_" (LOW LINE) character. +module Pos_050202_name_conversion_rules_022 { + + import from schema_Pos_050202_name_conversion_rules_022 language "XSD" all; + + template MyType m_msg := rnd_; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_050202_name_conversion_rules_022() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_050202_name_conversion_rules_022.xml", { "Pos_050202_name_conversion_rules_022.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_050202_name_conversion_rules_022(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_022/Pos_050202_name_conversion_rules_022.xml b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_022/Pos_050202_name_conversion_rules_022.xml new file mode 100644 index 00000000..628c0f4e --- /dev/null +++ b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_022/Pos_050202_name_conversion_rules_022.xml @@ -0,0 +1,2 @@ + +rnd \ No newline at end of file diff --git a/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_022/Pos_050202_name_conversion_rules_022.xsd b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_022/Pos_050202_name_conversion_rules_022.xsd new file mode 100644 index 00000000..18d5aa64 --- /dev/null +++ b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_022/Pos_050202_name_conversion_rules_022.xsd @@ -0,0 +1,13 @@ + + + + + + + + + + + diff --git a/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_023/Pos_050202_name_conversion_rules_023.ttcn b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_023/Pos_050202_name_conversion_rules_023.ttcn new file mode 100644 index 00000000..fbeee790 --- /dev/null +++ b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_023/Pos_050202_name_conversion_rules_023.ttcn @@ -0,0 +1,93 @@ +/*************************************************** + ** @author STF 475, updated by STF 521 + ** @version 0.0.2 + ** @purpose 9:5.2.2, Verify that name clash between module names is resolved using suffix + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// Rule a: If the name being generated is the name of a TTCN-3 module and the character +// string generated by items a) to e) above is identical to an another, previously +// generated TTCN-3 module name, then a postfix shall be appended to the character +// string: the postfix shall consist of a "_" (LOW LINE) followed by the canonical +// lexical representation (see W3C XML Schema Part 2 [9], clause 2.3.1) of an integer, +// unless the name already finishes with a "_" (LOW LINE) character, in which case the +// postfix is an integer only. This integer shall be the least positive integer such +// that the new name is different from all previously generated TTCN 3 modules names +// and clashing definition name. + +module Pos_050202_name_conversion_rules_023 { + + import from schema_Pos_050202_name_conversion_rules_023_ language "XSD" all; + import from schema_Pos_050202_name_conversion_rules_023_1 language "XSD" all; + + template schema_Pos_050202_name_conversion_rules_023_1.MyType m_msg := 1; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_050202_name_conversion_rules_023() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_050202_name_conversion_rules_023.xml", { "Pos_050202_name_conversion_rules_023.xsd", "Pos_050202_name_conversion_rules_023_1.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_050202_name_conversion_rules_023(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_023/Pos_050202_name_conversion_rules_023.xml b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_023/Pos_050202_name_conversion_rules_023.xml new file mode 100644 index 00000000..943f2456 --- /dev/null +++ b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_023/Pos_050202_name_conversion_rules_023.xml @@ -0,0 +1,2 @@ + +1 \ No newline at end of file diff --git a/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_023/Pos_050202_name_conversion_rules_023.xsd b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_023/Pos_050202_name_conversion_rules_023.xsd new file mode 100644 index 00000000..3277fbc5 --- /dev/null +++ b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_023/Pos_050202_name_conversion_rules_023.xsd @@ -0,0 +1,6 @@ + + + + diff --git a/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_023/Pos_050202_name_conversion_rules_023_1.xsd b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_023/Pos_050202_name_conversion_rules_023_1.xsd new file mode 100644 index 00000000..c434d369 --- /dev/null +++ b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_023/Pos_050202_name_conversion_rules_023_1.xsd @@ -0,0 +1,6 @@ + + + + \ No newline at end of file diff --git a/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_024/Pos_050202_name_conversion_rules_024.ttcn b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_024/Pos_050202_name_conversion_rules_024.ttcn new file mode 100644 index 00000000..30275315 --- /dev/null +++ b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_024/Pos_050202_name_conversion_rules_024.ttcn @@ -0,0 +1,94 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 9:5.2.2, Conversion of module names + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// Rule a: Target namespace values used in XSD schema documents shall be ordered +// alphabetically, independently from the above components (after conversion they are +// merely used as TTCN-3 module names). The string value of the target namespace values +// shall be used, i.e. without un-escaping or removing trailing “/” SOLIDUS characters +// of the authority part or any other changes to the character string. + +// Rule e: +// "_" (LOW LINE) characters occurring at the beginning or at the end of the name shall +// be removed, except trailing "_" (LOW LINE) characters resulted from converting target +// namespace values (to be used as TTCN-3 module names); + +module Pos_050202_name_conversion_rules_024 { + + import from schema_Pos_050202_name_conversion_rules_024 language "XSD" all; + import from schema_Pos_050202_name_conversion_rules_024_ language "XSD" all; + + template schema_Pos_050202_name_conversion_rules_024_.Test m_msg := "abc"; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_050202_name_conversion_rules_024() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_050202_name_conversion_rules_024.xml", { "Pos_050202_name_conversion_rules_024.xsd", "Pos_050202_name_conversion_rules_024_1.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_050202_name_conversion_rules_024(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_024/Pos_050202_name_conversion_rules_024.xml b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_024/Pos_050202_name_conversion_rules_024.xml new file mode 100644 index 00000000..718c21ff --- /dev/null +++ b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_024/Pos_050202_name_conversion_rules_024.xml @@ -0,0 +1,2 @@ + +abc \ No newline at end of file diff --git a/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_024/Pos_050202_name_conversion_rules_024.xsd b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_024/Pos_050202_name_conversion_rules_024.xsd new file mode 100644 index 00000000..276e2709 --- /dev/null +++ b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_024/Pos_050202_name_conversion_rules_024.xsd @@ -0,0 +1,6 @@ + + + + diff --git a/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_024/Pos_050202_name_conversion_rules_024_1.xsd b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_024/Pos_050202_name_conversion_rules_024_1.xsd new file mode 100644 index 00000000..6603b345 --- /dev/null +++ b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_024/Pos_050202_name_conversion_rules_024_1.xsd @@ -0,0 +1,6 @@ + + + + diff --git a/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_025/Pos_050202_name_conversion_rules_025.ttcn b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_025/Pos_050202_name_conversion_rules_025.ttcn new file mode 100644 index 00000000..b7233a8d --- /dev/null +++ b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_025/Pos_050202_name_conversion_rules_025.ttcn @@ -0,0 +1,93 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 9:5.2.2, Resolving name conflict in module names (not ending with underline) + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// Rule a: If the name being generated is the name of a TTCN-3 module and the character +// string generated by items a) to e) above is identical to an another, previously +// generated TTCN-3 module name, then a postfix shall be appended to the character +// string: the postfix shall consist of a "_" (LOW LINE) followed by the canonical +// lexical representation (see W3C XML Schema Part 2 [9], clause 2.3.1) of an integer, +// unless the name already finishes with a "_" (LOW LINE) character, in which case the +// postfix is an integer only. This integer shall be the least positive integer such +// that the new name is different from all previously generated TTCN 3 modules names +// and clashing definition name. + +module Pos_050202_name_conversion_rules_025 { + + import from schema_Pos_050202_name_conversion_rules_025 language "XSD" all; + import from schema_Pos_050202_name_conversion_rules_025_1 language "XSD" all; + + template schema_Pos_050202_name_conversion_rules_025_1.Test m_msg := "abc"; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_050202_name_conversion_rules_025() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_050202_name_conversion_rules_025.xml", { "Pos_050202_name_conversion_rules_025.xsd", "Pos_050202_name_conversion_rules_025_1.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_050202_name_conversion_rules_025(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_025/Pos_050202_name_conversion_rules_025.xml b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_025/Pos_050202_name_conversion_rules_025.xml new file mode 100644 index 00000000..0d0e2a96 --- /dev/null +++ b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_025/Pos_050202_name_conversion_rules_025.xml @@ -0,0 +1,2 @@ + +abc \ No newline at end of file diff --git a/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_025/Pos_050202_name_conversion_rules_025.xsd b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_025/Pos_050202_name_conversion_rules_025.xsd new file mode 100644 index 00000000..b37948d5 --- /dev/null +++ b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_025/Pos_050202_name_conversion_rules_025.xsd @@ -0,0 +1,6 @@ + + + + diff --git a/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_025/Pos_050202_name_conversion_rules_025_1.xsd b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_025/Pos_050202_name_conversion_rules_025_1.xsd new file mode 100644 index 00000000..e0981c11 --- /dev/null +++ b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_025/Pos_050202_name_conversion_rules_025_1.xsd @@ -0,0 +1,6 @@ + + + + diff --git a/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050203_order_of_the_mapping/Pos_050203_order_of_the_mapping_001/Pos_050203_order_of_the_mapping_001.ttcn b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050203_order_of_the_mapping/Pos_050203_order_of_the_mapping_001/Pos_050203_order_of_the_mapping_001.ttcn new file mode 100644 index 00000000..8a9dc37b --- /dev/null +++ b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050203_order_of_the_mapping/Pos_050203_order_of_the_mapping_001/Pos_050203_order_of_the_mapping_001.ttcn @@ -0,0 +1,92 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:5.2.3, Verify order of top-level schema components + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// Rule b: +// Within each target namespace, top-level schema components shall be +// divided into four sets ordered as follows: +// 1) element declarations; +// 2) attribute declarations; +// 3) complex type definitions and simple type definitions; +// 4) model group definitions. + +module Pos_050203_order_of_the_mapping_001 { + + import from schema_Pos_050203_order_of_the_mapping_001 language "XSD" all; + + template Item m_msg := "test"; + template Item_1 m_test1 := 5; + template Item_2 m_test2 := 0.1; + template Item_3 m_test3 := { field1 := 0, field2 := 1 }; + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_050203_order_of_the_mapping_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_050203_order_of_the_mapping_001.xml", { "Pos_050203_order_of_the_mapping_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_050203_order_of_the_mapping_001(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050203_order_of_the_mapping/Pos_050203_order_of_the_mapping_001/Pos_050203_order_of_the_mapping_001.xml b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050203_order_of_the_mapping/Pos_050203_order_of_the_mapping_001/Pos_050203_order_of_the_mapping_001.xml new file mode 100644 index 00000000..c623aa07 --- /dev/null +++ b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050203_order_of_the_mapping/Pos_050203_order_of_the_mapping_001/Pos_050203_order_of_the_mapping_001.xml @@ -0,0 +1,2 @@ + +test \ No newline at end of file diff --git a/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050203_order_of_the_mapping/Pos_050203_order_of_the_mapping_001/Pos_050203_order_of_the_mapping_001.xsd b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050203_order_of_the_mapping/Pos_050203_order_of_the_mapping_001/Pos_050203_order_of_the_mapping_001.xsd new file mode 100644 index 00000000..859e0fef --- /dev/null +++ b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050203_order_of_the_mapping/Pos_050203_order_of_the_mapping_001/Pos_050203_order_of_the_mapping_001.xsd @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + diff --git a/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050203_order_of_the_mapping/Pos_050203_order_of_the_mapping_002/Pos_050203_order_of_the_mapping_002.ttcn b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050203_order_of_the_mapping/Pos_050203_order_of_the_mapping_002/Pos_050203_order_of_the_mapping_002.ttcn new file mode 100644 index 00000000..45499ba9 --- /dev/null +++ b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050203_order_of_the_mapping/Pos_050203_order_of_the_mapping_002/Pos_050203_order_of_the_mapping_002.ttcn @@ -0,0 +1,94 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:5.2.3, Verify that alphabetical sorting is based on character ordinal numbers + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// Rule c: +// Within each set of item b), schema components shall be ordered by name in +// ascending alphabetical order. +// +// Alphabetical order is defined as follows (3.1): way of sorting the XSD +// names based on the code positions of their characters according to +// ISO/IEC 10646 [i.9] +// +// Note: in UCA alphabetical sorting, the order of elements would be different: +// Ä, ä, Ö +module Pos_050203_order_of_the_mapping_002 { + + import from schema_Pos_050203_order_of_the_mapping_002 language "XSD" all; + + template Type m_msg := 1; + template Type_1 m_test1 := 0.1; + template Type_2 m_test2 := "test"; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_050203_order_of_the_mapping_002() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_050203_order_of_the_mapping_002.xml", { "Pos_050203_order_of_the_mapping_002.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_050203_order_of_the_mapping_002(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050203_order_of_the_mapping/Pos_050203_order_of_the_mapping_002/Pos_050203_order_of_the_mapping_002.xml b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050203_order_of_the_mapping/Pos_050203_order_of_the_mapping_002/Pos_050203_order_of_the_mapping_002.xml new file mode 100644 index 00000000..7708e591 --- /dev/null +++ b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050203_order_of_the_mapping/Pos_050203_order_of_the_mapping_002/Pos_050203_order_of_the_mapping_002.xml @@ -0,0 +1,2 @@ + +1 \ No newline at end of file diff --git a/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050203_order_of_the_mapping/Pos_050203_order_of_the_mapping_002/Pos_050203_order_of_the_mapping_002.xsd b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050203_order_of_the_mapping/Pos_050203_order_of_the_mapping_002/Pos_050203_order_of_the_mapping_002.xsd new file mode 100644 index 00000000..1a42f744 --- /dev/null +++ b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050203_order_of_the_mapping/Pos_050203_order_of_the_mapping_002/Pos_050203_order_of_the_mapping_002.xsd @@ -0,0 +1,8 @@ + + + + + + diff --git a/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050203_order_of_the_mapping/Pos_050203_order_of_the_mapping_003/Pos_050203_order_of_the_mapping_003.ttcn b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050203_order_of_the_mapping/Pos_050203_order_of_the_mapping_003/Pos_050203_order_of_the_mapping_003.ttcn new file mode 100644 index 00000000..c8d9e0da --- /dev/null +++ b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050203_order_of_the_mapping/Pos_050203_order_of_the_mapping_003/Pos_050203_order_of_the_mapping_003.ttcn @@ -0,0 +1,92 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:5.2.3, Verify that alphabetical sorting is done only inside sets of items + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// Rule c: +// Within each set of item b), schema components shall be ordered by name in +// ascending alphabetical order. +// +// Alphabetical order is defined as follows (3.1): way of sorting the XSD +// names based on the code positions of their characters according to +// ISO/IEC 10646 [i.9] +module Pos_050203_order_of_the_mapping_003 { + + import from schema_Pos_050203_order_of_the_mapping_003 language "XSD" all; + + template Item m_msg := 3; + template Item_1 m_item1 := "test"; + template Item_2 m_item2 := 0.1; + template Item_3 m_item3 := true; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_050203_order_of_the_mapping_003() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_050203_order_of_the_mapping_003.xml", { "Pos_050203_order_of_the_mapping_003.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_050203_order_of_the_mapping_003(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050203_order_of_the_mapping/Pos_050203_order_of_the_mapping_003/Pos_050203_order_of_the_mapping_003.xml b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050203_order_of_the_mapping/Pos_050203_order_of_the_mapping_003/Pos_050203_order_of_the_mapping_003.xml new file mode 100644 index 00000000..c7ff26fa --- /dev/null +++ b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050203_order_of_the_mapping/Pos_050203_order_of_the_mapping_003/Pos_050203_order_of_the_mapping_003.xml @@ -0,0 +1,2 @@ + +3 \ No newline at end of file diff --git a/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050203_order_of_the_mapping/Pos_050203_order_of_the_mapping_003/Pos_050203_order_of_the_mapping_003.xsd b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050203_order_of_the_mapping/Pos_050203_order_of_the_mapping_003/Pos_050203_order_of_the_mapping_003.xsd new file mode 100644 index 00000000..b3eccfce --- /dev/null +++ b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050203_order_of_the_mapping/Pos_050203_order_of_the_mapping_003/Pos_050203_order_of_the_mapping_003.xsd @@ -0,0 +1,9 @@ + + + + + + + diff --git a/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050203_order_of_the_mapping/Pos_050203_order_of_the_mapping_004/Pos_050203_order_of_the_mapping_004.ttcn b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050203_order_of_the_mapping/Pos_050203_order_of_the_mapping_004/Pos_050203_order_of_the_mapping_004.ttcn new file mode 100644 index 00000000..3a4664d9 --- /dev/null +++ b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050203_order_of_the_mapping/Pos_050203_order_of_the_mapping_004/Pos_050203_order_of_the_mapping_004.ttcn @@ -0,0 +1,80 @@ +/*************************************************** + ** @author STF 487, updated by STF 521 + ** @version 0.0.2 + ** @purpose 9:5.2.3, Asure that namespaces are ordered lexically + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_050203_order_of_the_mapping_004 { + + import from schema_Pos_050203_order_of_the_mapping_004 language "XSD" all; + + template MyType m_msg := {f1 := {a:= 1}, f2 := {a:= 2}} + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_050203_order_of_the_mapping_004() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_050203_order_of_the_mapping_004.xml", { "Pos_050203_order_of_the_mapping_004.xsd", "Pos_050203_order_of_the_mapping_004_1.xsd", "Pos_050203_order_of_the_mapping_004_2.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_050203_order_of_the_mapping_004(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050203_order_of_the_mapping/Pos_050203_order_of_the_mapping_004/Pos_050203_order_of_the_mapping_004.xml b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050203_order_of_the_mapping/Pos_050203_order_of_the_mapping_004/Pos_050203_order_of_the_mapping_004.xml new file mode 100644 index 00000000..aa86d9d9 --- /dev/null +++ b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050203_order_of_the_mapping/Pos_050203_order_of_the_mapping_004/Pos_050203_order_of_the_mapping_004.xml @@ -0,0 +1,10 @@ + + + + 1 + + + 2 + + \ No newline at end of file diff --git a/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050203_order_of_the_mapping/Pos_050203_order_of_the_mapping_004/Pos_050203_order_of_the_mapping_004.xsd b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050203_order_of_the_mapping/Pos_050203_order_of_the_mapping_004/Pos_050203_order_of_the_mapping_004.xsd new file mode 100644 index 00000000..87dee208 --- /dev/null +++ b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050203_order_of_the_mapping/Pos_050203_order_of_the_mapping_004/Pos_050203_order_of_the_mapping_004.xsd @@ -0,0 +1,17 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050203_order_of_the_mapping/Pos_050203_order_of_the_mapping_004/Pos_050203_order_of_the_mapping_004_1.xsd b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050203_order_of_the_mapping/Pos_050203_order_of_the_mapping_004/Pos_050203_order_of_the_mapping_004_1.xsd new file mode 100644 index 00000000..9e30e70f --- /dev/null +++ b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050203_order_of_the_mapping/Pos_050203_order_of_the_mapping_004/Pos_050203_order_of_the_mapping_004_1.xsd @@ -0,0 +1,10 @@ + + + + + + + + \ No newline at end of file diff --git a/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050203_order_of_the_mapping/Pos_050203_order_of_the_mapping_004/Pos_050203_order_of_the_mapping_004_2.xsd b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050203_order_of_the_mapping/Pos_050203_order_of_the_mapping_004/Pos_050203_order_of_the_mapping_004_2.xsd new file mode 100644 index 00000000..1613783d --- /dev/null +++ b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050203_order_of_the_mapping/Pos_050203_order_of_the_mapping_004/Pos_050203_order_of_the_mapping_004_2.xsd @@ -0,0 +1,10 @@ + + + + + + + + \ No newline at end of file diff --git a/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050203_order_of_the_mapping/Pos_050203_order_of_the_mapping_005/Pos_050203_order_of_the_mapping_005.ttcn b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050203_order_of_the_mapping/Pos_050203_order_of_the_mapping_005/Pos_050203_order_of_the_mapping_005.ttcn new file mode 100644 index 00000000..07f2cf07 --- /dev/null +++ b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050203_order_of_the_mapping/Pos_050203_order_of_the_mapping_005/Pos_050203_order_of_the_mapping_005.ttcn @@ -0,0 +1,80 @@ +/*************************************************** + ** @author STF 487, updated by STF 521 + ** @version 0.0.2 + ** @purpose 9:5.2.3, Asure that namespaces are ordered lexically + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_050203_order_of_the_mapping_005 { + + import from schema_Pos_050203_order_of_the_mapping_005 language "XSD" all; + + template MyType m_msg := {test1 := 1, test2 := 2}; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_050203_order_of_the_mapping_005() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_050203_order_of_the_mapping_005.xml", { "Pos_050203_order_of_the_mapping_005.xsd", "Pos_050203_order_of_the_mapping_005_1.xsd", "Pos_050203_order_of_the_mapping_005_2.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_050203_order_of_the_mapping_005(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050203_order_of_the_mapping/Pos_050203_order_of_the_mapping_005/Pos_050203_order_of_the_mapping_005.xml b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050203_order_of_the_mapping/Pos_050203_order_of_the_mapping_005/Pos_050203_order_of_the_mapping_005.xml new file mode 100644 index 00000000..50ad3aec --- /dev/null +++ b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050203_order_of_the_mapping/Pos_050203_order_of_the_mapping_005/Pos_050203_order_of_the_mapping_005.xml @@ -0,0 +1,8 @@ + + + 1 + 2 + \ No newline at end of file diff --git a/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050203_order_of_the_mapping/Pos_050203_order_of_the_mapping_005/Pos_050203_order_of_the_mapping_005.xsd b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050203_order_of_the_mapping/Pos_050203_order_of_the_mapping_005/Pos_050203_order_of_the_mapping_005.xsd new file mode 100644 index 00000000..203ec83f --- /dev/null +++ b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050203_order_of_the_mapping/Pos_050203_order_of_the_mapping_005/Pos_050203_order_of_the_mapping_005.xsd @@ -0,0 +1,17 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050203_order_of_the_mapping/Pos_050203_order_of_the_mapping_005/Pos_050203_order_of_the_mapping_005_1.xsd b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050203_order_of_the_mapping/Pos_050203_order_of_the_mapping_005/Pos_050203_order_of_the_mapping_005_1.xsd new file mode 100644 index 00000000..61d9baed --- /dev/null +++ b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050203_order_of_the_mapping/Pos_050203_order_of_the_mapping_005/Pos_050203_order_of_the_mapping_005_1.xsd @@ -0,0 +1,6 @@ + + + + \ No newline at end of file diff --git a/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050203_order_of_the_mapping/Pos_050203_order_of_the_mapping_005/Pos_050203_order_of_the_mapping_005_2.xsd b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050203_order_of_the_mapping/Pos_050203_order_of_the_mapping_005/Pos_050203_order_of_the_mapping_005_2.xsd new file mode 100644 index 00000000..8b78ecb7 --- /dev/null +++ b/ATS/xml/05_mapping_xml_schemas/0502_name_conversion/050203_order_of_the_mapping/Pos_050203_order_of_the_mapping_005/Pos_050203_order_of_the_mapping_005_2.xsd @@ -0,0 +1,6 @@ + + + + \ No newline at end of file diff --git a/ATS/xml/05_mapping_xml_schemas/05_top_level/Neg_05_top_level_001/Neg_05_top_level_001.ttcn b/ATS/xml/05_mapping_xml_schemas/05_top_level/Neg_05_top_level_001/Neg_05_top_level_001.ttcn new file mode 100644 index 00000000..447ffb01 --- /dev/null +++ b/ATS/xml/05_mapping_xml_schemas/05_top_level/Neg_05_top_level_001/Neg_05_top_level_001.ttcn @@ -0,0 +1,51 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:5, Verify that error is generated for missing XSD language tag in import clause + ** @verdict pass reject +***************************************************/ + +// The following requirements are tested: +// When importing from an XSD Schema, the following language identifier string shall be used: "XSD" + +module Neg_05_top_level_001 { + + import from schema_Neg_05_top_level_001 all; + + template MyType m_msg := 1; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type port P message { + inout all; + } + + type component C { + port P p; + } + + testcase TC_Neg_05_top_level_001() runs on C system C { + map(self:p, system:p); + + // encode the message + p.send(m_msg); + log("template should either be rejected by compiler or by runtime latest while encoding"); + + setverdict(fail, "Invalid template should not be encoded"); + + unmap(self:p, system:p); + } + + control { + execute(TC_Neg_05_top_level_001(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/ATS/xml/05_mapping_xml_schemas/05_top_level/Neg_05_top_level_001/Neg_05_top_level_001.xsd b/ATS/xml/05_mapping_xml_schemas/05_top_level/Neg_05_top_level_001/Neg_05_top_level_001.xsd new file mode 100644 index 00000000..648c8ee6 --- /dev/null +++ b/ATS/xml/05_mapping_xml_schemas/05_top_level/Neg_05_top_level_001/Neg_05_top_level_001.xsd @@ -0,0 +1,6 @@ + + + + diff --git a/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060101_length/Neg_060101_length_001/Neg_060101_length_001.ttcn b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060101_length/Neg_060101_length_001/Neg_060101_length_001.ttcn new file mode 100644 index 00000000..a18e6b62 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060101_length/Neg_060101_length_001/Neg_060101_length_001.ttcn @@ -0,0 +1,45 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:6.1.1, Verify that a length-restricted XSD type shall be mapped to a corresponding length restricted TTCN 3 type. + ** @verdict pass reject + ***************************************************/ +module Neg_060101_length_001 { + + import from schema_Neg_060101_length_001 language "XSD" all; + + template E1 m_msg := {"A","B","C","D"}; //length is 3 + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type port P message { + inout all; + } + + type component C { + port P p; + } + + testcase TC_Neg_060101_length_001() runs on C system C { + map(self:p, system:p); + + // encode the message + p.send(m_msg); + log("template should either be rejected by compiler or by runtime latest while encoding"); + + setverdict(fail, "Invalid template should not be encoded"); + + unmap(self:p, system:p); + } + + control { + execute(TC_Neg_060101_length_001(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060101_length/Neg_060101_length_001/Neg_060101_length_001.xsd b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060101_length/Neg_060101_length_001/Neg_060101_length_001.xsd new file mode 100644 index 00000000..028ec2f4 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060101_length/Neg_060101_length_001/Neg_060101_length_001.xsd @@ -0,0 +1,11 @@ + + + + + + + + + diff --git a/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060101_length/Pos_060101_length_001/Pos_060101_length_001.ttcn b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060101_length/Pos_060101_length_001/Pos_060101_length_001.ttcn new file mode 100644 index 00000000..255ad179 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060101_length/Pos_060101_length_001/Pos_060101_length_001.ttcn @@ -0,0 +1,79 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:6.1.1, Verify that a length-restricted XSD type shall be mapped to a corresponding length restricted TTCN 3 type. + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_060101_length_001 { + + import from schema_Pos_060101_length_001 language "XSD" all; + + template E1 m_msg := "length_010"; + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_060101_length_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_060101_length_001.xml", { "Pos_060101_length_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_060101_length_001(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060101_length/Pos_060101_length_001/Pos_060101_length_001.xml b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060101_length/Pos_060101_length_001/Pos_060101_length_001.xml new file mode 100644 index 00000000..60541977 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060101_length/Pos_060101_length_001/Pos_060101_length_001.xml @@ -0,0 +1,4 @@ + +length_010 diff --git a/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060101_length/Pos_060101_length_001/Pos_060101_length_001.xsd b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060101_length/Pos_060101_length_001/Pos_060101_length_001.xsd new file mode 100644 index 00000000..b4f74c41 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060101_length/Pos_060101_length_001/Pos_060101_length_001.xsd @@ -0,0 +1,11 @@ + + + + + + + + + diff --git a/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060101_length/Pos_060101_length_002/Pos_060101_length_002.ttcn b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060101_length/Pos_060101_length_002/Pos_060101_length_002.ttcn new file mode 100644 index 00000000..74b18169 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060101_length/Pos_060101_length_002/Pos_060101_length_002.ttcn @@ -0,0 +1,79 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:6.1.1, Verify that a length-restricted XSD type shall be mapped to a corresponding length restricted TTCN 3 type. + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_060101_length_002 { + + import from schema_Pos_060101_length_002 language "XSD" all; + + template E1 m_msg := {"A","B","C"}; + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_060101_length_002() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_060101_length_002.xml", { "Pos_060101_length_002.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_060101_length_002(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060101_length/Pos_060101_length_002/Pos_060101_length_002.xml b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060101_length/Pos_060101_length_002/Pos_060101_length_002.xml new file mode 100644 index 00000000..f1f8b6f1 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060101_length/Pos_060101_length_002/Pos_060101_length_002.xml @@ -0,0 +1,4 @@ + +A B C diff --git a/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060101_length/Pos_060101_length_002/Pos_060101_length_002.xsd b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060101_length/Pos_060101_length_002/Pos_060101_length_002.xsd new file mode 100644 index 00000000..6dacadda --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060101_length/Pos_060101_length_002/Pos_060101_length_002.xsd @@ -0,0 +1,11 @@ + + + + + + + + + diff --git a/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060102_minlength/Neg_060102_minlength_001/Neg_060102_minlength_001.ttcn b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060102_minlength/Neg_060102_minlength_001/Neg_060102_minlength_001.ttcn new file mode 100644 index 00000000..8e48cb4b --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060102_minlength/Neg_060102_minlength_001/Neg_060102_minlength_001.ttcn @@ -0,0 +1,45 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 9:6.1.2, Verify that correct constraint is generated for the minLength facet + ** @verdict pass reject + ***************************************************/ +module Neg_060102_minlength_001 { + + import from schema_Neg_060102_minlength_001 language "XSD" all; + + template Test m_msg := "a"; // minLength is 3 -> the string "a" shall be rejected + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type port P message { + inout all; + } + + type component C { + port P p; + } + + testcase TC_Neg_060102_minlength_001() runs on C system C { + map(self:p, system:p); + + // encode the message + p.send(m_msg); + log("template should either be rejected by compiler or by runtime latest while encoding"); + + setverdict(fail, "Invalid template should not be encoded"); + + unmap(self:p, system:p); + } + + control { + execute(TC_Neg_060102_minlength_001(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060102_minlength/Neg_060102_minlength_001/Neg_060102_minlength_001.xsd b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060102_minlength/Neg_060102_minlength_001/Neg_060102_minlength_001.xsd new file mode 100644 index 00000000..ba671af9 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060102_minlength/Neg_060102_minlength_001/Neg_060102_minlength_001.xsd @@ -0,0 +1,12 @@ + + + + + + + + + + diff --git a/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060102_minlength/Pos_060102_minlength_001/Pos_060102_minlength_001.ttcn b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060102_minlength/Pos_060102_minlength_001/Pos_060102_minlength_001.ttcn new file mode 100644 index 00000000..9976ade7 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060102_minlength/Pos_060102_minlength_001/Pos_060102_minlength_001.ttcn @@ -0,0 +1,79 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 9:6.1.2, Verify mapping of the minLength facet + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_060102_minlength_001 { + + import from schema_Pos_060102_minlength_001 language "XSD" all; + + template Test m_msg := "abc"; + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_060102_minlength_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_060102_minlength_001.xml", { "Pos_060102_minlength_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_060102_minlength_001(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060102_minlength/Pos_060102_minlength_001/Pos_060102_minlength_001.xml b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060102_minlength/Pos_060102_minlength_001/Pos_060102_minlength_001.xml new file mode 100644 index 00000000..874004ce --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060102_minlength/Pos_060102_minlength_001/Pos_060102_minlength_001.xml @@ -0,0 +1,3 @@ + +abc diff --git a/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060102_minlength/Pos_060102_minlength_001/Pos_060102_minlength_001.xsd b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060102_minlength/Pos_060102_minlength_001/Pos_060102_minlength_001.xsd new file mode 100644 index 00000000..4e4ecd0e --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060102_minlength/Pos_060102_minlength_001/Pos_060102_minlength_001.xsd @@ -0,0 +1,12 @@ + + + + + + + + + + diff --git a/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060103_maxlength/Neg_060103_maxlength_001/Neg_060103_maxlength_001.ttcn b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060103_maxlength/Neg_060103_maxlength_001/Neg_060103_maxlength_001.ttcn new file mode 100644 index 00000000..aeff5f5d --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060103_maxlength/Neg_060103_maxlength_001/Neg_060103_maxlength_001.ttcn @@ -0,0 +1,45 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 9:6.1.3, Verify that correct constraint is generated for the maxLength facet + ** @verdict pass reject + ***************************************************/ +module Neg_060103_maxlength_001 { + + import from schema_Neg_060103_maxlength_001 language "XSD" all; + + template Test m_msg := "abcd"; // maxLength is 3 -> the string "abcd" shall be rejected + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type port P message { + inout all; + } + + type component C { + port P p; + } + + testcase TC_Neg_060103_maxlength_001() runs on C system C { + map(self:p, system:p); + + // encode the message + p.send(m_msg); + log("template should either be rejected by compiler or by runtime latest while encoding"); + + setverdict(fail, "Invalid template should not be encoded"); + + unmap(self:p, system:p); + } + + control { + execute(TC_Neg_060103_maxlength_001(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060103_maxlength/Neg_060103_maxlength_001/Neg_060103_maxlength_001.xsd b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060103_maxlength/Neg_060103_maxlength_001/Neg_060103_maxlength_001.xsd new file mode 100644 index 00000000..1ac79874 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060103_maxlength/Neg_060103_maxlength_001/Neg_060103_maxlength_001.xsd @@ -0,0 +1,12 @@ + + + + + + + + + + diff --git a/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060103_maxlength/Pos_060103_maxlength_001/Pos_060103_maxlength_001.ttcn b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060103_maxlength/Pos_060103_maxlength_001/Pos_060103_maxlength_001.ttcn new file mode 100644 index 00000000..43df8498 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060103_maxlength/Pos_060103_maxlength_001/Pos_060103_maxlength_001.ttcn @@ -0,0 +1,79 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 9:6.1.3, Verify mapping of the maxLength facet + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_060103_maxlength_001 { + + import from schema_Pos_060103_maxlength_001 language "XSD" all; + + template Test m_msg := "abc"; + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_060103_maxlength_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_060103_maxlength_001.xml", { "Pos_060103_maxlength_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_060103_maxlength_001(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060103_maxlength/Pos_060103_maxlength_001/Pos_060103_maxlength_001.xml b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060103_maxlength/Pos_060103_maxlength_001/Pos_060103_maxlength_001.xml new file mode 100644 index 00000000..4d522487 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060103_maxlength/Pos_060103_maxlength_001/Pos_060103_maxlength_001.xml @@ -0,0 +1,3 @@ + +abc diff --git a/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060103_maxlength/Pos_060103_maxlength_001/Pos_060103_maxlength_001.xsd b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060103_maxlength/Pos_060103_maxlength_001/Pos_060103_maxlength_001.xsd new file mode 100644 index 00000000..1425d82f --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060103_maxlength/Pos_060103_maxlength_001/Pos_060103_maxlength_001.xsd @@ -0,0 +1,12 @@ + + + + + + + + + + diff --git a/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060104_pattern/Neg_060104_pattern_001/Neg_060104_pattern_001.ttcn b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060104_pattern/Neg_060104_pattern_001/Neg_060104_pattern_001.ttcn new file mode 100644 index 00000000..5c96d54c --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060104_pattern/Neg_060104_pattern_001/Neg_060104_pattern_001.ttcn @@ -0,0 +1,45 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 9:6.1.4, Verify that correct constraint is generated for the pattern facet + ** @verdict pass reject + ***************************************************/ +module Neg_060104_pattern_001 { + + import from schema_Neg_060104_pattern_001 language "XSD" all; + + template Test m_msg := "aUser@iNstitute"; // should fail as the pattern doesn't allow capital N + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type port P message { + inout all; + } + + type component C { + port P p; + } + + testcase TC_Neg_060104_pattern_001() runs on C system C { + map(self:p, system:p); + + // encode the message + p.send(m_msg); + log("template should either be rejected by compiler or by runtime latest while encoding"); + + setverdict(fail, "Invalid template should not be encoded"); + + unmap(self:p, system:p); + } + + control { + execute(TC_Neg_060104_pattern_001(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060104_pattern/Neg_060104_pattern_001/Neg_060104_pattern_001.xsd b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060104_pattern/Neg_060104_pattern_001/Neg_060104_pattern_001.xsd new file mode 100644 index 00000000..b7d68bb1 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060104_pattern/Neg_060104_pattern_001/Neg_060104_pattern_001.xsd @@ -0,0 +1,12 @@ + + + + + + + + + + diff --git a/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060104_pattern/Pos_060104_pattern_001/Pos_060104_pattern_001.ttcn b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060104_pattern/Pos_060104_pattern_001/Pos_060104_pattern_001.ttcn new file mode 100644 index 00000000..5fdbb166 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060104_pattern/Pos_060104_pattern_001/Pos_060104_pattern_001.ttcn @@ -0,0 +1,79 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 9:6.1.4, Verify mapping of the pattern facet + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_060104_pattern_001 { + + import from schema_Pos_060104_pattern_001 language "XSD" all; + + template Test m_msg := "anotherUser@Institute"; + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_060104_pattern_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_060104_pattern_001.xml", { "Pos_060104_pattern_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_060104_pattern_001(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060104_pattern/Pos_060104_pattern_001/Pos_060104_pattern_001.xml b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060104_pattern/Pos_060104_pattern_001/Pos_060104_pattern_001.xml new file mode 100644 index 00000000..89c27af8 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060104_pattern/Pos_060104_pattern_001/Pos_060104_pattern_001.xml @@ -0,0 +1,3 @@ + +anotherUser@Institute diff --git a/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060104_pattern/Pos_060104_pattern_001/Pos_060104_pattern_001.xsd b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060104_pattern/Pos_060104_pattern_001/Pos_060104_pattern_001.xsd new file mode 100644 index 00000000..dabd509a --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060104_pattern/Pos_060104_pattern_001/Pos_060104_pattern_001.xsd @@ -0,0 +1,12 @@ + + + + + + + + + + diff --git a/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060105_enumeration/Neg_060105_enumeration_001/Neg_060105_enumeration_001.ttcn b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060105_enumeration/Neg_060105_enumeration_001/Neg_060105_enumeration_001.ttcn new file mode 100644 index 00000000..53414ebc --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060105_enumeration/Neg_060105_enumeration_001/Neg_060105_enumeration_001.ttcn @@ -0,0 +1,46 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:6.1.5, Verify if tool rejects validation in case of restricted value due xsd type declaration. + ** @verdict pass reject + ***************************************************/ +module Neg_060105_enumeration_001 { + + import from schema_Neg_060105_enumeration_001 language "XSD" all; + + template E1 m_msg :=5; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type port P message { + inout all; + } + + type component C { + port P p; + } + + testcase TC_Neg_060105_enumeration_001() runs on C system C { + map(self:p, system:p); + + // encode the message + p.send(m_msg); + log("template should either be rejected by compiler or by runtime latest while encoding"); + + setverdict(fail, "Invalid template should not be encoded"); + + unmap(self:p, system:p); + } + + control { + execute(TC_Neg_060105_enumeration_001(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060105_enumeration/Neg_060105_enumeration_001/Neg_060105_enumeration_001.xsd b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060105_enumeration/Neg_060105_enumeration_001/Neg_060105_enumeration_001.xsd new file mode 100644 index 00000000..0c294b9e --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060105_enumeration/Neg_060105_enumeration_001/Neg_060105_enumeration_001.xsd @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060105_enumeration/Neg_060105_enumeration_002/Neg_060105_enumeration_002.ttcn b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060105_enumeration/Neg_060105_enumeration_002/Neg_060105_enumeration_002.ttcn new file mode 100644 index 00000000..e2b72ecc --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060105_enumeration/Neg_060105_enumeration_002/Neg_060105_enumeration_002.ttcn @@ -0,0 +1,46 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:6.1.5, Verify if tool rejects validation in case of restricted enumerated value length due xsd type declaration. + ** @verdict pass reject + ***************************************************/ +module Neg_060105_enumeration_002 { + + import from schema_Neg_060105_enumeration_002 language "XSD" all; + + template E1 m_msg := black; // only enumeration elements with 2 to 4 chars are allowed + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type port P message { + inout all; + } + + type component C { + port P p; + } + + testcase TC_Neg_060105_enumeration_002() runs on C system C { + map(self:p, system:p); + + // encode the message + p.send(m_msg); + log("template should either be rejected by compiler or by runtime latest while encoding"); + + setverdict(fail, "Invalid template should not be encoded"); + + unmap(self:p, system:p); + } + + control { + execute(TC_Neg_060105_enumeration_002(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060105_enumeration/Neg_060105_enumeration_002/Neg_060105_enumeration_002.xsd b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060105_enumeration/Neg_060105_enumeration_002/Neg_060105_enumeration_002.xsd new file mode 100644 index 00000000..7e9096fa --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060105_enumeration/Neg_060105_enumeration_002/Neg_060105_enumeration_002.xsd @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060105_enumeration/Neg_060105_enumeration_003/Neg_060105_enumeration_003.ttcn b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060105_enumeration/Neg_060105_enumeration_003/Neg_060105_enumeration_003.ttcn new file mode 100644 index 00000000..bcc399d7 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060105_enumeration/Neg_060105_enumeration_003/Neg_060105_enumeration_003.ttcn @@ -0,0 +1,46 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 9:6.1.5, Verify if tool rejects validation in case of restricted value due xsd type declaration. + ** @verdict pass reject + ***************************************************/ +module Neg_060105_enumeration_003 { + + import from schema_Neg_060105_enumeration_003 language "XSD" all; + + template E1 m_msg := 1; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type port P message { + inout all; + } + + type component C { + port P p; + } + + testcase TC_Neg_060105_enumeration_003() runs on C system C { + map(self:p, system:p); + + // encode the message + p.send(m_msg); + log("template should either be rejected by compiler or by runtime latest while encoding"); + + setverdict(fail, "Invalid template should not be encoded"); + + unmap(self:p, system:p); + } + + control { + execute(TC_Neg_060105_enumeration_003(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060105_enumeration/Neg_060105_enumeration_003/Neg_060105_enumeration_003.xsd b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060105_enumeration/Neg_060105_enumeration_003/Neg_060105_enumeration_003.xsd new file mode 100644 index 00000000..eaa5ab4c --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060105_enumeration/Neg_060105_enumeration_003/Neg_060105_enumeration_003.xsd @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060105_enumeration/Neg_060105_enumeration_004/Neg_060105_enumeration_004.ttcn b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060105_enumeration/Neg_060105_enumeration_004/Neg_060105_enumeration_004.ttcn new file mode 100644 index 00000000..fcaf904a --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060105_enumeration/Neg_060105_enumeration_004/Neg_060105_enumeration_004.ttcn @@ -0,0 +1,46 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:6.1.5, disallow enumeration values removed by restriction + ** @verdict pass reject + ***************************************************/ +module Neg_060105_enumeration_004 { + + import from schema_Neg_060105_enumeration_004 language "XSD" all; + + template C2 m_msg := uNKNOWN; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type port P message { + inout all; + } + + type component C { + port P p; + } + + testcase TC_Neg_060105_enumeration_004() runs on C system C { + map(self:p, system:p); + + // encode the message + p.send(m_msg); + log("template should either be rejected by compiler or by runtime latest while encoding"); + + setverdict(fail, "Invalid template should not be encoded"); + + unmap(self:p, system:p); + } + + control { + execute(TC_Neg_060105_enumeration_004(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060105_enumeration/Neg_060105_enumeration_004/Neg_060105_enumeration_004.xml b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060105_enumeration/Neg_060105_enumeration_004/Neg_060105_enumeration_004.xml new file mode 100644 index 00000000..837f8bb7 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060105_enumeration/Neg_060105_enumeration_004/Neg_060105_enumeration_004.xml @@ -0,0 +1,2 @@ + +UNKNOWN diff --git a/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060105_enumeration/Neg_060105_enumeration_004/Neg_060105_enumeration_004.xsd b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060105_enumeration/Neg_060105_enumeration_004/Neg_060105_enumeration_004.xsd new file mode 100644 index 00000000..3f5efe3e --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060105_enumeration/Neg_060105_enumeration_004/Neg_060105_enumeration_004.xsd @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060105_enumeration/Pos_060105_enumeration_001/Pos_060105_enumeration_001.ttcn b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060105_enumeration/Pos_060105_enumeration_001/Pos_060105_enumeration_001.ttcn new file mode 100644 index 00000000..68731ca6 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060105_enumeration/Pos_060105_enumeration_001/Pos_060105_enumeration_001.ttcn @@ -0,0 +1,81 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:6.1.5, Verify mapping of simple type definition that is a restriction of + ** string type with an enumeration facet. + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_060105_enumeration_001 { + + import from schema_Pos_060105_enumeration_001 language "XSD" all; + + template E1 m_msg := on_; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_060105_enumeration_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_060105_enumeration_001.xml", { "Pos_060105_enumeration_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_060105_enumeration_001(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060105_enumeration/Pos_060105_enumeration_001/Pos_060105_enumeration_001.xml b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060105_enumeration/Pos_060105_enumeration_001/Pos_060105_enumeration_001.xml new file mode 100644 index 00000000..382b3d97 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060105_enumeration/Pos_060105_enumeration_001/Pos_060105_enumeration_001.xml @@ -0,0 +1,4 @@ + +on diff --git a/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060105_enumeration/Pos_060105_enumeration_001/Pos_060105_enumeration_001.xsd b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060105_enumeration/Pos_060105_enumeration_001/Pos_060105_enumeration_001.xsd new file mode 100644 index 00000000..17c7def0 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060105_enumeration/Pos_060105_enumeration_001/Pos_060105_enumeration_001.xsd @@ -0,0 +1,12 @@ + + + + + + + + + + \ No newline at end of file diff --git a/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060105_enumeration/Pos_060105_enumeration_002/Pos_060105_enumeration_002.ttcn b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060105_enumeration/Pos_060105_enumeration_002/Pos_060105_enumeration_002.ttcn new file mode 100644 index 00000000..4a7724de --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060105_enumeration/Pos_060105_enumeration_002/Pos_060105_enumeration_002.ttcn @@ -0,0 +1,82 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:6.1.5, Verify mapping of simple type definition that is a restriction of + ** integer type with an enumeration facet. + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_060105_enumeration_002 { + + import from schema_Pos_060105_enumeration_002 language "XSD" all; + + template E1 m_msg := int_5; + + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_060105_enumeration_002() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_060105_enumeration_002.xml", { "Pos_060105_enumeration_002.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_060105_enumeration_002(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060105_enumeration/Pos_060105_enumeration_002/Pos_060105_enumeration_002.xml b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060105_enumeration/Pos_060105_enumeration_002/Pos_060105_enumeration_002.xml new file mode 100644 index 00000000..00f08c1e --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060105_enumeration/Pos_060105_enumeration_002/Pos_060105_enumeration_002.xml @@ -0,0 +1,4 @@ + +-5 diff --git a/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060105_enumeration/Pos_060105_enumeration_002/Pos_060105_enumeration_002.xsd b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060105_enumeration/Pos_060105_enumeration_002/Pos_060105_enumeration_002.xsd new file mode 100644 index 00000000..1e1690db --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060105_enumeration/Pos_060105_enumeration_002/Pos_060105_enumeration_002.xsd @@ -0,0 +1,15 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060105_enumeration/Pos_060105_enumeration_003/Pos_060105_enumeration_003.ttcn b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060105_enumeration/Pos_060105_enumeration_003/Pos_060105_enumeration_003.ttcn new file mode 100644 index 00000000..5774ff87 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060105_enumeration/Pos_060105_enumeration_003/Pos_060105_enumeration_003.ttcn @@ -0,0 +1,81 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:6.1.5, Verify mapping of simple type definition that is a restriction of + ** integer type with a minInclusive and a maxInclusive facet. + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_060105_enumeration_003 { + + import from schema_Pos_060105_enumeration_003 language "XSD" all; + + template E1 m_msg :=5; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_060105_enumeration_003() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_060105_enumeration_003.xml", { "Pos_060105_enumeration_003.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_060105_enumeration_003(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060105_enumeration/Pos_060105_enumeration_003/Pos_060105_enumeration_003.xml b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060105_enumeration/Pos_060105_enumeration_003/Pos_060105_enumeration_003.xml new file mode 100644 index 00000000..cc5499e0 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060105_enumeration/Pos_060105_enumeration_003/Pos_060105_enumeration_003.xml @@ -0,0 +1,4 @@ + +5 diff --git a/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060105_enumeration/Pos_060105_enumeration_003/Pos_060105_enumeration_003.xsd b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060105_enumeration/Pos_060105_enumeration_003/Pos_060105_enumeration_003.xsd new file mode 100644 index 00000000..6343c9a0 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060105_enumeration/Pos_060105_enumeration_003/Pos_060105_enumeration_003.xsd @@ -0,0 +1,13 @@ + + + + + + + + + + \ No newline at end of file diff --git a/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060105_enumeration/Pos_060105_enumeration_004/Pos_060105_enumeration_004.ttcn b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060105_enumeration/Pos_060105_enumeration_004/Pos_060105_enumeration_004.ttcn new file mode 100644 index 00000000..5bd2ade5 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060105_enumeration/Pos_060105_enumeration_004/Pos_060105_enumeration_004.ttcn @@ -0,0 +1,82 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:6.1.5, Verify mapping of simple type definition that is a restriction of + ** another simple type definition, derived by restriction from integer type with + ** the addition of a minInclusive and a maxInclusive facet. + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_060105_enumeration_004 { + + import from schema_Pos_060105_enumeration_004 language "XSD" all; + + template E1 m_msg := 6; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_060105_enumeration_004() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_060105_enumeration_004.xml", { "Pos_060105_enumeration_004.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_060105_enumeration_004(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060105_enumeration/Pos_060105_enumeration_004/Pos_060105_enumeration_004.xml b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060105_enumeration/Pos_060105_enumeration_004/Pos_060105_enumeration_004.xml new file mode 100644 index 00000000..09f2b871 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060105_enumeration/Pos_060105_enumeration_004/Pos_060105_enumeration_004.xml @@ -0,0 +1,4 @@ + +6 \ No newline at end of file diff --git a/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060105_enumeration/Pos_060105_enumeration_004/Pos_060105_enumeration_004.xsd b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060105_enumeration/Pos_060105_enumeration_004/Pos_060105_enumeration_004.xsd new file mode 100644 index 00000000..d3305c1a --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060105_enumeration/Pos_060105_enumeration_004/Pos_060105_enumeration_004.xsd @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060105_enumeration/Pos_060105_enumeration_005/Pos_060105_enumeration_005.ttcn b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060105_enumeration/Pos_060105_enumeration_005/Pos_060105_enumeration_005.ttcn new file mode 100644 index 00000000..eab53a34 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060105_enumeration/Pos_060105_enumeration_005/Pos_060105_enumeration_005.ttcn @@ -0,0 +1,82 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:6.1.5, Verify mapping of simple type definition that is a restriction of another + ** simple type definition, derived by restriction from string with the addition of an + ** enumeration facet. + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_060105_enumeration_005 { + + import from schema_Pos_060105_enumeration_005 language "XSD" all; + + template E1 m_msg := red; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_060105_enumeration_005() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_060105_enumeration_005.xml", { "Pos_060105_enumeration_005.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_060105_enumeration_005(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060105_enumeration/Pos_060105_enumeration_005/Pos_060105_enumeration_005.xml b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060105_enumeration/Pos_060105_enumeration_005/Pos_060105_enumeration_005.xml new file mode 100644 index 00000000..677ffafc --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060105_enumeration/Pos_060105_enumeration_005/Pos_060105_enumeration_005.xml @@ -0,0 +1,4 @@ + +red diff --git a/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060105_enumeration/Pos_060105_enumeration_005/Pos_060105_enumeration_005.xsd b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060105_enumeration/Pos_060105_enumeration_005/Pos_060105_enumeration_005.xsd new file mode 100644 index 00000000..bb03e0eb --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060105_enumeration/Pos_060105_enumeration_005/Pos_060105_enumeration_005.xsd @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060105_enumeration/Pos_060105_enumeration_006/Pos_060105_enumeration_006.ttcn b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060105_enumeration/Pos_060105_enumeration_006/Pos_060105_enumeration_006.ttcn new file mode 100644 index 00000000..15e610b3 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060105_enumeration/Pos_060105_enumeration_006/Pos_060105_enumeration_006.ttcn @@ -0,0 +1,80 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:6.1.5, TODO write purpose + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_060105_enumeration_006 { + + import from schema_Pos_060105_enumeration_006 language "XSD" all; + + template C2 m_msg := b2; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_060105_enumeration_006() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_060105_enumeration_006.xml", { "Pos_060105_enumeration_006.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_060105_enumeration_006(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060105_enumeration/Pos_060105_enumeration_006/Pos_060105_enumeration_006.xml b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060105_enumeration/Pos_060105_enumeration_006/Pos_060105_enumeration_006.xml new file mode 100644 index 00000000..4a0f2bc7 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060105_enumeration/Pos_060105_enumeration_006/Pos_060105_enumeration_006.xml @@ -0,0 +1,2 @@ + +B2 diff --git a/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060105_enumeration/Pos_060105_enumeration_006/Pos_060105_enumeration_006.xsd b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060105_enumeration/Pos_060105_enumeration_006/Pos_060105_enumeration_006.xsd new file mode 100644 index 00000000..c1478039 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060105_enumeration/Pos_060105_enumeration_006/Pos_060105_enumeration_006.xsd @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060106_whitespace/Pos_060106_whitespace_001/Pos_060106_whitespace_001.ttcn b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060106_whitespace/Pos_060106_whitespace_001/Pos_060106_whitespace_001.ttcn new file mode 100644 index 00000000..784207c3 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060106_whitespace/Pos_060106_whitespace_001/Pos_060106_whitespace_001.ttcn @@ -0,0 +1,79 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 9:6.1.6, Verify mapping of the whiteSpace facet (preserve option) + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_060106_whitespace_001 { + + import from schema_Pos_060106_whitespace_001 language "XSD" all; + + template Test m_msg := " abc" & char(0,0,0,13) & char(0,0,0,10); + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_060106_whitespace_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_060106_whitespace_001.xml", { "Pos_060106_whitespace_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_060106_whitespace_001(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060106_whitespace/Pos_060106_whitespace_001/Pos_060106_whitespace_001.xml b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060106_whitespace/Pos_060106_whitespace_001/Pos_060106_whitespace_001.xml new file mode 100644 index 00000000..4b42fdb2 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060106_whitespace/Pos_060106_whitespace_001/Pos_060106_whitespace_001.xml @@ -0,0 +1,3 @@ + + abc + diff --git a/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060106_whitespace/Pos_060106_whitespace_001/Pos_060106_whitespace_001.xsd b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060106_whitespace/Pos_060106_whitespace_001/Pos_060106_whitespace_001.xsd new file mode 100644 index 00000000..5dce05d0 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060106_whitespace/Pos_060106_whitespace_001/Pos_060106_whitespace_001.xsd @@ -0,0 +1,12 @@ + + + + + + + + + + diff --git a/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060106_whitespace/Pos_060106_whitespace_002/Pos_060106_whitespace_002.ttcn b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060106_whitespace/Pos_060106_whitespace_002/Pos_060106_whitespace_002.ttcn new file mode 100644 index 00000000..23494c39 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060106_whitespace/Pos_060106_whitespace_002/Pos_060106_whitespace_002.ttcn @@ -0,0 +1,80 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 9:6.1.6, Verify mapping of the whiteSpace facet (replace option) + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_060106_whitespace_002 { + + import from schema_Pos_060106_whitespace_002 language "XSD" all; + + template Test m_msg := " abc" & char(0,0,0,9) & " def" & char(0,0,0,13) & char(0,0,0,10); + template Test m_rcv := " abc def "; + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_060106_whitespace_002() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_060106_whitespace_002.xml", { "Pos_060106_whitespace_002.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_rcv) { // The value has been changed by the encoder or decoder (in a predictable way) + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_060106_whitespace_002(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060106_whitespace/Pos_060106_whitespace_002/Pos_060106_whitespace_002.xml b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060106_whitespace/Pos_060106_whitespace_002/Pos_060106_whitespace_002.xml new file mode 100644 index 00000000..55ed6995 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060106_whitespace/Pos_060106_whitespace_002/Pos_060106_whitespace_002.xml @@ -0,0 +1,3 @@ + + abc def + diff --git a/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060106_whitespace/Pos_060106_whitespace_002/Pos_060106_whitespace_002.xsd b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060106_whitespace/Pos_060106_whitespace_002/Pos_060106_whitespace_002.xsd new file mode 100644 index 00000000..eb30d146 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060106_whitespace/Pos_060106_whitespace_002/Pos_060106_whitespace_002.xsd @@ -0,0 +1,12 @@ + + + + + + + + + + diff --git a/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060106_whitespace/Pos_060106_whitespace_003/Pos_060106_whitespace_003.ttcn b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060106_whitespace/Pos_060106_whitespace_003/Pos_060106_whitespace_003.ttcn new file mode 100644 index 00000000..b958fa2d --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060106_whitespace/Pos_060106_whitespace_003/Pos_060106_whitespace_003.ttcn @@ -0,0 +1,80 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 9:6.1.6, Verify mapping of the whiteSpace facet (collapse option) + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_060106_whitespace_003 { + + import from schema_Pos_060106_whitespace_003 language "XSD" all; + + template Test m_msg := " abc" & char(0,0,0,9) & " def" & char(0,0,0,13) & char(0,0,0,10); + template Test m_rcv := "abc def"; + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_060106_whitespace_003() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_060106_whitespace_003.xml", { "Pos_060106_whitespace_003.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_rcv) { // The value has been changed by the encoder or decoder (in a predictable way) + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_060106_whitespace_003(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060106_whitespace/Pos_060106_whitespace_003/Pos_060106_whitespace_003.xml b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060106_whitespace/Pos_060106_whitespace_003/Pos_060106_whitespace_003.xml new file mode 100644 index 00000000..99e0c51a --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060106_whitespace/Pos_060106_whitespace_003/Pos_060106_whitespace_003.xml @@ -0,0 +1,3 @@ + + abc def + diff --git a/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060106_whitespace/Pos_060106_whitespace_003/Pos_060106_whitespace_003.xsd b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060106_whitespace/Pos_060106_whitespace_003/Pos_060106_whitespace_003.xsd new file mode 100644 index 00000000..c1a86417 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060106_whitespace/Pos_060106_whitespace_003/Pos_060106_whitespace_003.xsd @@ -0,0 +1,12 @@ + + + + + + + + + + diff --git a/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060107_mininclusive/Pos_060107_mininclusive_001/Pos_060107_mininclusive_001.ttcn b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060107_mininclusive/Pos_060107_mininclusive_001/Pos_060107_mininclusive_001.ttcn new file mode 100644 index 00000000..25573a78 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060107_mininclusive/Pos_060107_mininclusive_001/Pos_060107_mininclusive_001.ttcn @@ -0,0 +1,79 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:6.1.7, Verify mapping of an integer element with a minInclusive facet + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_060107_mininclusive_001 { + + import from schema_Pos_060107_mininclusive_001 language "XSD" all; + + template E1 m_msg := -5; + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_060107_mininclusive_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_060107_mininclusive_001.xml", { "Pos_060107_mininclusive_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_060107_mininclusive_001(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060107_mininclusive/Pos_060107_mininclusive_001/Pos_060107_mininclusive_001.xml b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060107_mininclusive/Pos_060107_mininclusive_001/Pos_060107_mininclusive_001.xml new file mode 100644 index 00000000..8a908c69 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060107_mininclusive/Pos_060107_mininclusive_001/Pos_060107_mininclusive_001.xml @@ -0,0 +1,4 @@ + +-5 diff --git a/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060107_mininclusive/Pos_060107_mininclusive_001/Pos_060107_mininclusive_001.xsd b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060107_mininclusive/Pos_060107_mininclusive_001/Pos_060107_mininclusive_001.xsd new file mode 100644 index 00000000..d9227843 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060107_mininclusive/Pos_060107_mininclusive_001/Pos_060107_mininclusive_001.xsd @@ -0,0 +1,11 @@ + + + + + + + + + diff --git a/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060107_mininclusive/Pos_060107_mininclusive_002/Pos_060107_mininclusive_002.ttcn b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060107_mininclusive/Pos_060107_mininclusive_002/Pos_060107_mininclusive_002.ttcn new file mode 100644 index 00000000..a3bf63f2 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060107_mininclusive/Pos_060107_mininclusive_002/Pos_060107_mininclusive_002.ttcn @@ -0,0 +1,79 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:6.1.7, Verify mapping of a float element with a numeric minInclusive value + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_060107_mininclusive_002 { + + import from schema_Pos_060107_mininclusive_002 language "XSD" all; + + template E1 m_msg := -5.0; + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_060107_mininclusive_002() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_060107_mininclusive_002.xml", { "Pos_060107_mininclusive_002.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_060107_mininclusive_002(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060107_mininclusive/Pos_060107_mininclusive_002/Pos_060107_mininclusive_002.xml b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060107_mininclusive/Pos_060107_mininclusive_002/Pos_060107_mininclusive_002.xml new file mode 100644 index 00000000..fdf6e497 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060107_mininclusive/Pos_060107_mininclusive_002/Pos_060107_mininclusive_002.xml @@ -0,0 +1,4 @@ + +-5.0 diff --git a/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060107_mininclusive/Pos_060107_mininclusive_002/Pos_060107_mininclusive_002.xsd b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060107_mininclusive/Pos_060107_mininclusive_002/Pos_060107_mininclusive_002.xsd new file mode 100644 index 00000000..e669ef28 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060107_mininclusive/Pos_060107_mininclusive_002/Pos_060107_mininclusive_002.xsd @@ -0,0 +1,11 @@ + + + + + + + + + diff --git a/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060107_mininclusive/Pos_060107_mininclusive_003/Pos_060107_mininclusive_003.ttcn b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060107_mininclusive/Pos_060107_mininclusive_003/Pos_060107_mininclusive_003.ttcn new file mode 100644 index 00000000..189c076f --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060107_mininclusive/Pos_060107_mininclusive_003/Pos_060107_mininclusive_003.ttcn @@ -0,0 +1,79 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:6.1.7, Verify mapping of a float element with special minInclusive values + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_060107_mininclusive_003 { + + import from schema_Pos_060107_mininclusive_003 language "XSD" all; + + template E1 m_msg := -5.0; + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_060107_mininclusive_003() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_060107_mininclusive_003.xml", { "Pos_060107_mininclusive_003.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_060107_mininclusive_003(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060107_mininclusive/Pos_060107_mininclusive_003/Pos_060107_mininclusive_003.xml b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060107_mininclusive/Pos_060107_mininclusive_003/Pos_060107_mininclusive_003.xml new file mode 100644 index 00000000..5e6aa7c7 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060107_mininclusive/Pos_060107_mininclusive_003/Pos_060107_mininclusive_003.xml @@ -0,0 +1,4 @@ + +-5.0 diff --git a/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060107_mininclusive/Pos_060107_mininclusive_003/Pos_060107_mininclusive_003.xsd b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060107_mininclusive/Pos_060107_mininclusive_003/Pos_060107_mininclusive_003.xsd new file mode 100644 index 00000000..00e42dff --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060107_mininclusive/Pos_060107_mininclusive_003/Pos_060107_mininclusive_003.xsd @@ -0,0 +1,11 @@ + + + + + + + + + \ No newline at end of file diff --git a/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060107_mininclusive/Pos_060107_mininclusive_004/Pos_060107_mininclusive_004.ttcn b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060107_mininclusive/Pos_060107_mininclusive_004/Pos_060107_mininclusive_004.ttcn new file mode 100644 index 00000000..ba9149eb --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060107_mininclusive/Pos_060107_mininclusive_004/Pos_060107_mininclusive_004.ttcn @@ -0,0 +1,79 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:6.1.7, Verify mapping of a float element with special minInclusive values + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_060107_mininclusive_004 { + + import from schema_Pos_060107_mininclusive_004 language "XSD" all; + + template E1 m_msg := infinity; + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_060107_mininclusive_004() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_060107_mininclusive_004.xml", { "Pos_060107_mininclusive_004.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_060107_mininclusive_004(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060107_mininclusive/Pos_060107_mininclusive_004/Pos_060107_mininclusive_004.xml b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060107_mininclusive/Pos_060107_mininclusive_004/Pos_060107_mininclusive_004.xml new file mode 100644 index 00000000..c39e8d45 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060107_mininclusive/Pos_060107_mininclusive_004/Pos_060107_mininclusive_004.xml @@ -0,0 +1,4 @@ + +INF diff --git a/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060107_mininclusive/Pos_060107_mininclusive_004/Pos_060107_mininclusive_004.xsd b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060107_mininclusive/Pos_060107_mininclusive_004/Pos_060107_mininclusive_004.xsd new file mode 100644 index 00000000..c03f6a66 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060107_mininclusive/Pos_060107_mininclusive_004/Pos_060107_mininclusive_004.xsd @@ -0,0 +1,11 @@ + + + + + + + + + diff --git a/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060107_mininclusive/Pos_060107_mininclusive_005/Pos_060107_mininclusive_005.ttcn b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060107_mininclusive/Pos_060107_mininclusive_005/Pos_060107_mininclusive_005.ttcn new file mode 100644 index 00000000..4200c273 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060107_mininclusive/Pos_060107_mininclusive_005/Pos_060107_mininclusive_005.ttcn @@ -0,0 +1,79 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:6.1.7, Verify mapping of a float element with special minInclusive values + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_060107_mininclusive_005 { + + import from schema_Pos_060107_mininclusive_005 language "XSD" all; + + template E1 m_msg := not_a_number; + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_060107_mininclusive_005() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_060107_mininclusive_005.xml", { "Pos_060107_mininclusive_005.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_060107_mininclusive_005(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060107_mininclusive/Pos_060107_mininclusive_005/Pos_060107_mininclusive_005.xml b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060107_mininclusive/Pos_060107_mininclusive_005/Pos_060107_mininclusive_005.xml new file mode 100644 index 00000000..debd861f --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060107_mininclusive/Pos_060107_mininclusive_005/Pos_060107_mininclusive_005.xml @@ -0,0 +1,4 @@ + +NaN diff --git a/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060107_mininclusive/Pos_060107_mininclusive_005/Pos_060107_mininclusive_005.xsd b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060107_mininclusive/Pos_060107_mininclusive_005/Pos_060107_mininclusive_005.xsd new file mode 100644 index 00000000..5575d19a --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060107_mininclusive/Pos_060107_mininclusive_005/Pos_060107_mininclusive_005.xsd @@ -0,0 +1,11 @@ + + + + + + + + + diff --git a/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060108_maxinclusive/Pos_060108_maxinclusive_001/Pos_060108_maxinclusive_001.ttcn b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060108_maxinclusive/Pos_060108_maxinclusive_001/Pos_060108_maxinclusive_001.ttcn new file mode 100644 index 00000000..fd5e7d52 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060108_maxinclusive/Pos_060108_maxinclusive_001/Pos_060108_maxinclusive_001.ttcn @@ -0,0 +1,79 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:6.1.8, Verify mapping of elements of type integer with maxInclusive facet + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_060108_maxinclusive_001 { + + import from schema_Pos_060108_maxinclusive_001 language "XSD" all; + + template E1 m_msg := 100; + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_060108_maxinclusive_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_060108_maxinclusive_001.xml", { "Pos_060108_maxinclusive_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_060108_maxinclusive_001(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060108_maxinclusive/Pos_060108_maxinclusive_001/Pos_060108_maxinclusive_001.xml b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060108_maxinclusive/Pos_060108_maxinclusive_001/Pos_060108_maxinclusive_001.xml new file mode 100644 index 00000000..542a3eb2 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060108_maxinclusive/Pos_060108_maxinclusive_001/Pos_060108_maxinclusive_001.xml @@ -0,0 +1,4 @@ + +100 diff --git a/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060108_maxinclusive/Pos_060108_maxinclusive_001/Pos_060108_maxinclusive_001.xsd b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060108_maxinclusive/Pos_060108_maxinclusive_001/Pos_060108_maxinclusive_001.xsd new file mode 100644 index 00000000..f1241789 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060108_maxinclusive/Pos_060108_maxinclusive_001/Pos_060108_maxinclusive_001.xsd @@ -0,0 +1,11 @@ + + + + + + + + + diff --git a/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060108_maxinclusive/Pos_060108_maxinclusive_002/Pos_060108_maxinclusive_002.ttcn b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060108_maxinclusive/Pos_060108_maxinclusive_002/Pos_060108_maxinclusive_002.ttcn new file mode 100644 index 00000000..10ca329c --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060108_maxinclusive/Pos_060108_maxinclusive_002/Pos_060108_maxinclusive_002.ttcn @@ -0,0 +1,79 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:6.1.8, Verify mapping of a float type with a numeric maxInclusive facet + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_060108_maxinclusive_002 { +//Float possible values from http://www.w3.org/TR/xmlschema-2/#float for xsd file : -1E4, 1267.43233E12, 12.78e-2, 12 , -0, 0 and INF are all legal literals for float + import from schema_Pos_060108_maxinclusive_002 language "XSD" all; + + template E1 m_msg := -5.0; + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_060108_maxinclusive_002() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_060108_maxinclusive_002.xml", { "Pos_060108_maxinclusive_002.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_060108_maxinclusive_002(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060108_maxinclusive/Pos_060108_maxinclusive_002/Pos_060108_maxinclusive_002.xml b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060108_maxinclusive/Pos_060108_maxinclusive_002/Pos_060108_maxinclusive_002.xml new file mode 100644 index 00000000..4ef36f10 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060108_maxinclusive/Pos_060108_maxinclusive_002/Pos_060108_maxinclusive_002.xml @@ -0,0 +1,4 @@ + +-5.0 diff --git a/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060108_maxinclusive/Pos_060108_maxinclusive_002/Pos_060108_maxinclusive_002.xsd b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060108_maxinclusive/Pos_060108_maxinclusive_002/Pos_060108_maxinclusive_002.xsd new file mode 100644 index 00000000..2d042a76 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060108_maxinclusive/Pos_060108_maxinclusive_002/Pos_060108_maxinclusive_002.xsd @@ -0,0 +1,12 @@ + + + + + + + + + + diff --git a/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060108_maxinclusive/Pos_060108_maxinclusive_003/Pos_060108_maxinclusive_003.ttcn b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060108_maxinclusive/Pos_060108_maxinclusive_003/Pos_060108_maxinclusive_003.ttcn new file mode 100644 index 00000000..0290be46 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060108_maxinclusive/Pos_060108_maxinclusive_003/Pos_060108_maxinclusive_003.ttcn @@ -0,0 +1,79 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:6.1.8, Verify mapping of a float type with a numeric maxInclusive facet + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_060108_maxinclusive_003 { + + import from schema_Pos_060108_maxinclusive_003 language "XSD" all; + + template E1 m_msg := 5.0; + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_060108_maxinclusive_003() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_060108_maxinclusive_003.xml", { "Pos_060108_maxinclusive_003.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_060108_maxinclusive_003(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060108_maxinclusive/Pos_060108_maxinclusive_003/Pos_060108_maxinclusive_003.xml b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060108_maxinclusive/Pos_060108_maxinclusive_003/Pos_060108_maxinclusive_003.xml new file mode 100644 index 00000000..0b1080b0 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060108_maxinclusive/Pos_060108_maxinclusive_003/Pos_060108_maxinclusive_003.xml @@ -0,0 +1,4 @@ + +5.0 diff --git a/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060108_maxinclusive/Pos_060108_maxinclusive_003/Pos_060108_maxinclusive_003.xsd b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060108_maxinclusive/Pos_060108_maxinclusive_003/Pos_060108_maxinclusive_003.xsd new file mode 100644 index 00000000..15b4b66e --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060108_maxinclusive/Pos_060108_maxinclusive_003/Pos_060108_maxinclusive_003.xsd @@ -0,0 +1,11 @@ + + + + + + + + + diff --git a/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060108_maxinclusive/Pos_060108_maxinclusive_004/Pos_060108_maxinclusive_004.ttcn b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060108_maxinclusive/Pos_060108_maxinclusive_004/Pos_060108_maxinclusive_004.ttcn new file mode 100644 index 00000000..a14f64f4 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060108_maxinclusive/Pos_060108_maxinclusive_004/Pos_060108_maxinclusive_004.ttcn @@ -0,0 +1,79 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:6.1.8, Verify mapping of a float type with a numeric maxInclusive facet + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_060108_maxinclusive_004 { + + import from schema_Pos_060108_maxinclusive_004 language "XSD" all; + + template E1 m_msg := not_a_number; + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_060108_maxinclusive_004() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_060108_maxinclusive_004.xml", { "Pos_060108_maxinclusive_004.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_060108_maxinclusive_004(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060108_maxinclusive/Pos_060108_maxinclusive_004/Pos_060108_maxinclusive_004.xml b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060108_maxinclusive/Pos_060108_maxinclusive_004/Pos_060108_maxinclusive_004.xml new file mode 100644 index 00000000..47e0a76f --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060108_maxinclusive/Pos_060108_maxinclusive_004/Pos_060108_maxinclusive_004.xml @@ -0,0 +1,4 @@ + +NaN diff --git a/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060108_maxinclusive/Pos_060108_maxinclusive_004/Pos_060108_maxinclusive_004.xsd b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060108_maxinclusive/Pos_060108_maxinclusive_004/Pos_060108_maxinclusive_004.xsd new file mode 100644 index 00000000..2d61407f --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060108_maxinclusive/Pos_060108_maxinclusive_004/Pos_060108_maxinclusive_004.xsd @@ -0,0 +1,11 @@ + + + + + + + + + diff --git a/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060109_minexclusive/Neg_060109_minexclusive_001/Neg_060109_minexclusive_001.ttcn b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060109_minexclusive/Neg_060109_minexclusive_001/Neg_060109_minexclusive_001.ttcn new file mode 100644 index 00000000..a4fbfce6 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060109_minexclusive/Neg_060109_minexclusive_001/Neg_060109_minexclusive_001.ttcn @@ -0,0 +1,46 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:6.1.9, Verify if tool rejects validation in case of restricted value due xsd type declaration. + ** @verdict pass reject + ***************************************************/ +module Neg_060109_minexclusive_001 { + + import from schema_Neg_060109_minexclusive_001 language "XSD" all; + + template E1 m_msg := 2; // valid values 6..10 + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type port P message { + inout all; + } + + type component C { + port P p; + } + + testcase TC_Neg_060109_minexclusive_001() runs on C system C { + map(self:p, system:p); + + // encode the message + p.send(m_msg); + log("template should either be rejected by compiler or by runtime latest while encoding"); + + setverdict(fail, "Invalid template should not be encoded"); + + unmap(self:p, system:p); + } + + control { + execute(TC_Neg_060109_minexclusive_001(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060109_minexclusive/Neg_060109_minexclusive_001/Neg_060109_minexclusive_001.xsd b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060109_minexclusive/Neg_060109_minexclusive_001/Neg_060109_minexclusive_001.xsd new file mode 100644 index 00000000..0ad2219b --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060109_minexclusive/Neg_060109_minexclusive_001/Neg_060109_minexclusive_001.xsd @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060109_minexclusive/Neg_060109_minexclusive_002/Neg_060109_minexclusive_002.ttcn b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060109_minexclusive/Neg_060109_minexclusive_002/Neg_060109_minexclusive_002.ttcn new file mode 100644 index 00000000..f2ee8eee --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060109_minexclusive/Neg_060109_minexclusive_002/Neg_060109_minexclusive_002.ttcn @@ -0,0 +1,46 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:6.1.9, Verify if tool rejects validation in case of restricted value due xsd type declaration. + ** @verdict pass reject + ***************************************************/ +module Neg_060109_minexclusive_002 { + + import from schema_Neg_060109_minexclusive_002 language "XSD" all; + + template E1 m_msg := 5; // valid values 6..10 + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type port P message { + inout all; + } + + type component C { + port P p; + } + + testcase TC_Neg_060109_minexclusive_002() runs on C system C { + map(self:p, system:p); + + // encode the message + p.send(m_msg); + log("template should either be rejected by compiler or by runtime latest while encoding"); + + setverdict(fail, "Invalid template should not be encoded"); + + unmap(self:p, system:p); + } + + control { + execute(TC_Neg_060109_minexclusive_002(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060109_minexclusive/Neg_060109_minexclusive_002/Neg_060109_minexclusive_002.xsd b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060109_minexclusive/Neg_060109_minexclusive_002/Neg_060109_minexclusive_002.xsd new file mode 100644 index 00000000..850b6ebc --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060109_minexclusive/Neg_060109_minexclusive_002/Neg_060109_minexclusive_002.xsd @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060109_minexclusive/Pos_060109_minexclusive_001/Pos_060109_minexclusive_001.ttcn b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060109_minexclusive/Pos_060109_minexclusive_001/Pos_060109_minexclusive_001.ttcn new file mode 100644 index 00000000..61751975 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060109_minexclusive/Pos_060109_minexclusive_001/Pos_060109_minexclusive_001.ttcn @@ -0,0 +1,80 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:6.1.9, Verify if tool accepts values restricted by xsd type declaration. + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_060109_minexclusive_001 { + + import from schema_Pos_060109_minexclusive_001 language "XSD" all; + + template E1 m_msg := 6; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_060109_minexclusive_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_060109_minexclusive_001.xml", { "Pos_060109_minexclusive_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_060109_minexclusive_001(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060109_minexclusive/Pos_060109_minexclusive_001/Pos_060109_minexclusive_001.xml b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060109_minexclusive/Pos_060109_minexclusive_001/Pos_060109_minexclusive_001.xml new file mode 100644 index 00000000..31abf3df --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060109_minexclusive/Pos_060109_minexclusive_001/Pos_060109_minexclusive_001.xml @@ -0,0 +1,4 @@ + +6 diff --git a/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060109_minexclusive/Pos_060109_minexclusive_001/Pos_060109_minexclusive_001.xsd b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060109_minexclusive/Pos_060109_minexclusive_001/Pos_060109_minexclusive_001.xsd new file mode 100644 index 00000000..bb1ef478 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060109_minexclusive/Pos_060109_minexclusive_001/Pos_060109_minexclusive_001.xsd @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060109_minexclusive/Pos_060109_minexclusive_002/Pos_060109_minexclusive_002.ttcn b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060109_minexclusive/Pos_060109_minexclusive_002/Pos_060109_minexclusive_002.ttcn new file mode 100644 index 00000000..aa63125b --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060109_minexclusive/Pos_060109_minexclusive_002/Pos_060109_minexclusive_002.ttcn @@ -0,0 +1,80 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:6.1.9, Verify if tool accepts values restricted by xsd type declaration. + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_060109_minexclusive_002 { + + import from schema_Pos_060109_minexclusive_002 language "XSD" all; + + template E1 m_msg := 7; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_060109_minexclusive_002() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_060109_minexclusive_002.xml", { "Pos_060109_minexclusive_002.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_060109_minexclusive_002(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060109_minexclusive/Pos_060109_minexclusive_002/Pos_060109_minexclusive_002.xml b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060109_minexclusive/Pos_060109_minexclusive_002/Pos_060109_minexclusive_002.xml new file mode 100644 index 00000000..63d10d37 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060109_minexclusive/Pos_060109_minexclusive_002/Pos_060109_minexclusive_002.xml @@ -0,0 +1,2 @@ + +7 diff --git a/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060109_minexclusive/Pos_060109_minexclusive_002/Pos_060109_minexclusive_002.xsd b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060109_minexclusive/Pos_060109_minexclusive_002/Pos_060109_minexclusive_002.xsd new file mode 100644 index 00000000..ff5c8762 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060109_minexclusive/Pos_060109_minexclusive_002/Pos_060109_minexclusive_002.xsd @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060110_maxexclusive/Neg_060110_maxexclusive_001/Neg_060110_maxexclusive_001.ttcn b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060110_maxexclusive/Neg_060110_maxexclusive_001/Neg_060110_maxexclusive_001.ttcn new file mode 100644 index 00000000..0192d09c --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060110_maxexclusive/Neg_060110_maxexclusive_001/Neg_060110_maxexclusive_001.ttcn @@ -0,0 +1,44 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:6.1.10, Verify that INF (negative infinity) or NaN (not-a-number), this type shall not be translated to TTCN-3 + ** @verdict pass reject + ***************************************************/ +module Neg_060110_maxexclusive_001 { + + import from schema_Neg_060110_maxexclusive_001 language "XSD" all; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type port P message { + inout all; + } + + type component C { + port P p; + } + + testcase TC_Neg_060110_maxexclusive_001() runs on C system C { + map(self:p, system:p); + + // encode the message + p.send(m_msg); + log("template should either be rejected by compiler or by runtime latest while encoding"); + + setverdict(fail, "Invalid template should not be encoded"); + + unmap(self:p, system:p); + } + + control { + execute(TC_Neg_060110_maxexclusive_001(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060110_maxexclusive/Neg_060110_maxexclusive_001/Neg_060110_maxexclusive_001.xsd b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060110_maxexclusive/Neg_060110_maxexclusive_001/Neg_060110_maxexclusive_001.xsd new file mode 100644 index 00000000..6a24cbd5 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060110_maxexclusive/Neg_060110_maxexclusive_001/Neg_060110_maxexclusive_001.xsd @@ -0,0 +1,11 @@ + + + + + + + + + diff --git a/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060110_maxexclusive/Pos_060110_maxexclusive_001/Pos_060110_maxexclusive_001.ttcn b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060110_maxexclusive/Pos_060110_maxexclusive_001/Pos_060110_maxexclusive_001.ttcn new file mode 100644 index 00000000..963aff1b --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060110_maxexclusive/Pos_060110_maxexclusive_001/Pos_060110_maxexclusive_001.ttcn @@ -0,0 +1,79 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:6.1.10, Verify mapping of a maxExclusive facet applied to a type, which is derivative of integer + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_060110_maxexclusive_001 { + + import from schema_Pos_060110_maxexclusive_001 language "XSD" all; + + template E1 m_msg := 99; + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_060110_maxexclusive_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_060110_maxexclusive_001.xml", { "Pos_060110_maxexclusive_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_060110_maxexclusive_001(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060110_maxexclusive/Pos_060110_maxexclusive_001/Pos_060110_maxexclusive_001.xml b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060110_maxexclusive/Pos_060110_maxexclusive_001/Pos_060110_maxexclusive_001.xml new file mode 100644 index 00000000..e7bb3df3 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060110_maxexclusive/Pos_060110_maxexclusive_001/Pos_060110_maxexclusive_001.xml @@ -0,0 +1,4 @@ + +99 diff --git a/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060110_maxexclusive/Pos_060110_maxexclusive_001/Pos_060110_maxexclusive_001.xsd b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060110_maxexclusive/Pos_060110_maxexclusive_001/Pos_060110_maxexclusive_001.xsd new file mode 100644 index 00000000..c4b1b881 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060110_maxexclusive/Pos_060110_maxexclusive_001/Pos_060110_maxexclusive_001.xsd @@ -0,0 +1,11 @@ + + + + + + + + + diff --git a/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060110_maxexclusive/Pos_060110_maxexclusive_002/Pos_060110_maxexclusive_002.ttcn b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060110_maxexclusive/Pos_060110_maxexclusive_002/Pos_060110_maxexclusive_002.ttcn new file mode 100644 index 00000000..7c38e5a4 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060110_maxexclusive/Pos_060110_maxexclusive_002/Pos_060110_maxexclusive_002.ttcn @@ -0,0 +1,79 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:6.1.10, Verify mapping of a maxExclusive facet applied to the float type + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_060110_maxexclusive_002 { + + import from schema_Pos_060110_maxexclusive_002 language "XSD" all; + + template E1 m_msg := -6.0; + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_060110_maxexclusive_002() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_060110_maxexclusive_002.xml", { "Pos_060110_maxexclusive_002.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_060110_maxexclusive_002(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060110_maxexclusive/Pos_060110_maxexclusive_002/Pos_060110_maxexclusive_002.xml b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060110_maxexclusive/Pos_060110_maxexclusive_002/Pos_060110_maxexclusive_002.xml new file mode 100644 index 00000000..faed9a0e --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060110_maxexclusive/Pos_060110_maxexclusive_002/Pos_060110_maxexclusive_002.xml @@ -0,0 +1,4 @@ + +-6.0 diff --git a/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060110_maxexclusive/Pos_060110_maxexclusive_002/Pos_060110_maxexclusive_002.xsd b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060110_maxexclusive/Pos_060110_maxexclusive_002/Pos_060110_maxexclusive_002.xsd new file mode 100644 index 00000000..a0e553d0 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060110_maxexclusive/Pos_060110_maxexclusive_002/Pos_060110_maxexclusive_002.xsd @@ -0,0 +1,11 @@ + + + + + + + + + diff --git a/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060110_maxexclusive/Pos_060110_maxexclusive_003/Pos_060110_maxexclusive_003.ttcn b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060110_maxexclusive/Pos_060110_maxexclusive_003/Pos_060110_maxexclusive_003.ttcn new file mode 100644 index 00000000..e2101447 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060110_maxexclusive/Pos_060110_maxexclusive_003/Pos_060110_maxexclusive_003.ttcn @@ -0,0 +1,79 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:6.1.10, Verify mapping of a maxExclusive facet applied to the float type + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_060110_maxexclusive_003 { + + import from schema_Pos_060110_maxexclusive_003 language "XSD" all; + + template E1 m_msg := -4.1; + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_060110_maxexclusive_003() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_060110_maxexclusive_003.xml", { "Pos_060110_maxexclusive_003.xsd", "Pos_060110_maxexclusive_003_1.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_060110_maxexclusive_003(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060110_maxexclusive/Pos_060110_maxexclusive_003/Pos_060110_maxexclusive_003.xml b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060110_maxexclusive/Pos_060110_maxexclusive_003/Pos_060110_maxexclusive_003.xml new file mode 100644 index 00000000..1847ed8e --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060110_maxexclusive/Pos_060110_maxexclusive_003/Pos_060110_maxexclusive_003.xml @@ -0,0 +1,4 @@ + +-4.1 diff --git a/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060110_maxexclusive/Pos_060110_maxexclusive_003/Pos_060110_maxexclusive_003.xsd b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060110_maxexclusive/Pos_060110_maxexclusive_003/Pos_060110_maxexclusive_003.xsd new file mode 100644 index 00000000..4edc8ff2 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060110_maxexclusive/Pos_060110_maxexclusive_003/Pos_060110_maxexclusive_003.xsd @@ -0,0 +1,12 @@ + + + + + + + + + + diff --git a/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060110_maxexclusive/Pos_060110_maxexclusive_003/Pos_060110_maxexclusive_003_1.xsd b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060110_maxexclusive/Pos_060110_maxexclusive_003/Pos_060110_maxexclusive_003_1.xsd new file mode 100644 index 00000000..be626208 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060110_maxexclusive/Pos_060110_maxexclusive_003/Pos_060110_maxexclusive_003_1.xsd @@ -0,0 +1,11 @@ + + + + + + + + + diff --git a/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060111_total_digits/Neg_060111_total_digits_001/Neg_060111_total_digits_001.ttcn b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060111_total_digits/Neg_060111_total_digits_001/Neg_060111_total_digits_001.ttcn new file mode 100644 index 00000000..b0c3bbd2 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060111_total_digits/Neg_060111_total_digits_001/Neg_060111_total_digits_001.ttcn @@ -0,0 +1,46 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 9:6.1.11, Check that totalDigits are converted to value boundaries + ** @verdict pass reject + ***************************************************/ +module Neg_060111_total_digits_001 { + + import from schema_Neg_060111_total_digits_001 language "XSD" all; + + template E1 m_msg := 0; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type port P message { + inout all; + } + + type component C { + port P p; + } + + testcase TC_Neg_060111_total_digits_001() runs on C system C { + map(self:p, system:p); + + // encode the message + p.send(m_msg); + log("template should either be rejected by compiler or by runtime latest while encoding"); + + setverdict(fail, "Invalid template should not be encoded"); + + unmap(self:p, system:p); + } + + control { + execute(TC_Neg_060111_total_digits_001(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060111_total_digits/Neg_060111_total_digits_001/Neg_060111_total_digits_001.xsd b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060111_total_digits/Neg_060111_total_digits_001/Neg_060111_total_digits_001.xsd new file mode 100644 index 00000000..7ae042ae --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060111_total_digits/Neg_060111_total_digits_001/Neg_060111_total_digits_001.xsd @@ -0,0 +1,11 @@ + + + + + + + + + \ No newline at end of file diff --git a/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060111_total_digits/Neg_060111_total_digits_002/Neg_060111_total_digits_002.ttcn b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060111_total_digits/Neg_060111_total_digits_002/Neg_060111_total_digits_002.ttcn new file mode 100644 index 00000000..a4dd272c --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060111_total_digits/Neg_060111_total_digits_002/Neg_060111_total_digits_002.ttcn @@ -0,0 +1,46 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 9:6.1.11, Check that totalDigits are converted to value boundaries + ** @verdict pass reject + ***************************************************/ +module Neg_060111_total_digits_002 { + + import from schema_Neg_060111_total_digits_002 language "XSD" all; + + template E1 m_msg := -1000; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type port P message { + inout all; + } + + type component C { + port P p; + } + + testcase TC_Neg_060111_total_digits_002() runs on C system C { + map(self:p, system:p); + + // encode the message + p.send(m_msg); + log("template should either be rejected by compiler or by runtime latest while encoding"); + + setverdict(fail, "Invalid template should not be encoded"); + + unmap(self:p, system:p); + } + + control { + execute(TC_Neg_060111_total_digits_002(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060111_total_digits/Neg_060111_total_digits_002/Neg_060111_total_digits_002.xsd b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060111_total_digits/Neg_060111_total_digits_002/Neg_060111_total_digits_002.xsd new file mode 100644 index 00000000..d13aa208 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060111_total_digits/Neg_060111_total_digits_002/Neg_060111_total_digits_002.xsd @@ -0,0 +1,11 @@ + + + + + + + + + \ No newline at end of file diff --git a/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060111_total_digits/Neg_060111_total_digits_003/Neg_060111_total_digits_003.ttcn b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060111_total_digits/Neg_060111_total_digits_003/Neg_060111_total_digits_003.ttcn new file mode 100644 index 00000000..5c963838 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060111_total_digits/Neg_060111_total_digits_003/Neg_060111_total_digits_003.ttcn @@ -0,0 +1,46 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 9:6.1.11, Check that totalDigits are converted to value boundaries + ** @verdict pass reject + ***************************************************/ +module Neg_060111_total_digits_003 { + + import from schema_Neg_060111_total_digits_003 language "XSD" all; + + template E1 m_msg := -100000.0; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type port P message { + inout all; + } + + type component C { + port P p; + } + + testcase TC_Neg_060111_total_digits_003() runs on C system C { + map(self:p, system:p); + + // encode the message + p.send(m_msg); + log("template should either be rejected by compiler or by runtime latest while encoding"); + + setverdict(fail, "Invalid template should not be encoded"); + + unmap(self:p, system:p); + } + + control { + execute(TC_Neg_060111_total_digits_003(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060111_total_digits/Neg_060111_total_digits_003/Neg_060111_total_digits_003.xsd b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060111_total_digits/Neg_060111_total_digits_003/Neg_060111_total_digits_003.xsd new file mode 100644 index 00000000..36edee24 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060111_total_digits/Neg_060111_total_digits_003/Neg_060111_total_digits_003.xsd @@ -0,0 +1,11 @@ + + + + + + + + + \ No newline at end of file diff --git a/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060111_total_digits/Neg_060111_total_digits_004/Neg_060111_total_digits_004.ttcn b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060111_total_digits/Neg_060111_total_digits_004/Neg_060111_total_digits_004.ttcn new file mode 100644 index 00000000..dedde247 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060111_total_digits/Neg_060111_total_digits_004/Neg_060111_total_digits_004.ttcn @@ -0,0 +1,46 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 9:6.1.11, Check that totalDigits are converted to value boundaries + ** @verdict pass reject + ***************************************************/ +module Neg_060111_total_digits_004 { + + import from schema_Neg_060111_total_digits_004 language "XSD" all; + + template E1 m_msg := 999999.0; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type port P message { + inout all; + } + + type component C { + port P p; + } + + testcase TC_Neg_060111_total_digits_004() runs on C system C { + map(self:p, system:p); + + // encode the message + p.send(m_msg); + log("template should either be rejected by compiler or by runtime latest while encoding"); + + setverdict(fail, "Invalid template should not be encoded"); + + unmap(self:p, system:p); + } + + control { + execute(TC_Neg_060111_total_digits_004(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060111_total_digits/Neg_060111_total_digits_004/Neg_060111_total_digits_004.xsd b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060111_total_digits/Neg_060111_total_digits_004/Neg_060111_total_digits_004.xsd new file mode 100644 index 00000000..c3a6d9ee --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060111_total_digits/Neg_060111_total_digits_004/Neg_060111_total_digits_004.xsd @@ -0,0 +1,11 @@ + + + + + + + + + \ No newline at end of file diff --git a/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060111_total_digits/Pos_060111_total_digits_001/Pos_060111_total_digits_001.ttcn b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060111_total_digits/Pos_060111_total_digits_001/Pos_060111_total_digits_001.ttcn new file mode 100644 index 00000000..f1020469 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060111_total_digits/Pos_060111_total_digits_001/Pos_060111_total_digits_001.ttcn @@ -0,0 +1,80 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 9:6.1.11, Check that totalDigits are converted to value boundaries + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_060111_total_digits_001 { + + import from schema_Pos_060111_total_digits_001 language "XSD" all; + + template E1 m_msg := -999; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_060111_total_digits_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_060111_total_digits_001.xml", { "Pos_060111_total_digits_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_060111_total_digits_001(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060111_total_digits/Pos_060111_total_digits_001/Pos_060111_total_digits_001.xml b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060111_total_digits/Pos_060111_total_digits_001/Pos_060111_total_digits_001.xml new file mode 100644 index 00000000..c1ebfcdc --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060111_total_digits/Pos_060111_total_digits_001/Pos_060111_total_digits_001.xml @@ -0,0 +1,2 @@ + +-999 diff --git a/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060111_total_digits/Pos_060111_total_digits_001/Pos_060111_total_digits_001.xsd b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060111_total_digits/Pos_060111_total_digits_001/Pos_060111_total_digits_001.xsd new file mode 100644 index 00000000..8bbf1486 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060111_total_digits/Pos_060111_total_digits_001/Pos_060111_total_digits_001.xsd @@ -0,0 +1,11 @@ + + + + + + + + + \ No newline at end of file diff --git a/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060111_total_digits/Pos_060111_total_digits_002/Pos_060111_total_digits_002.ttcn b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060111_total_digits/Pos_060111_total_digits_002/Pos_060111_total_digits_002.ttcn new file mode 100644 index 00000000..0e810272 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060111_total_digits/Pos_060111_total_digits_002/Pos_060111_total_digits_002.ttcn @@ -0,0 +1,80 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 9:6.1.11, Check that totalDigits are converted to value boundaries + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_060111_total_digits_002 { + + import from schema_Pos_060111_total_digits_002 language "XSD" all; + + template E1 m_msg := -1; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_060111_total_digits_002() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_060111_total_digits_002.xml", { "Pos_060111_total_digits_002.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_060111_total_digits_002(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060111_total_digits/Pos_060111_total_digits_002/Pos_060111_total_digits_002.xml b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060111_total_digits/Pos_060111_total_digits_002/Pos_060111_total_digits_002.xml new file mode 100644 index 00000000..f0272789 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060111_total_digits/Pos_060111_total_digits_002/Pos_060111_total_digits_002.xml @@ -0,0 +1,2 @@ + +-1 diff --git a/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060111_total_digits/Pos_060111_total_digits_002/Pos_060111_total_digits_002.xsd b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060111_total_digits/Pos_060111_total_digits_002/Pos_060111_total_digits_002.xsd new file mode 100644 index 00000000..618b2d54 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060111_total_digits/Pos_060111_total_digits_002/Pos_060111_total_digits_002.xsd @@ -0,0 +1,11 @@ + + + + + + + + + \ No newline at end of file diff --git a/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060111_total_digits/Pos_060111_total_digits_003/Pos_060111_total_digits_003.ttcn b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060111_total_digits/Pos_060111_total_digits_003/Pos_060111_total_digits_003.ttcn new file mode 100644 index 00000000..c174be15 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060111_total_digits/Pos_060111_total_digits_003/Pos_060111_total_digits_003.ttcn @@ -0,0 +1,80 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 9:6.1.11, Check that totalDigits are converted to value boundaries + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_060111_total_digits_003 { + + import from schema_Pos_060111_total_digits_003 language "XSD" all; + + template E1 m_msg := 9999.0; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_060111_total_digits_003() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_060111_total_digits_003.xml", { "Pos_060111_total_digits_003.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_060111_total_digits_003(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060111_total_digits/Pos_060111_total_digits_003/Pos_060111_total_digits_003.xml b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060111_total_digits/Pos_060111_total_digits_003/Pos_060111_total_digits_003.xml new file mode 100644 index 00000000..9a564357 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060111_total_digits/Pos_060111_total_digits_003/Pos_060111_total_digits_003.xml @@ -0,0 +1,2 @@ + +9999.0 diff --git a/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060111_total_digits/Pos_060111_total_digits_003/Pos_060111_total_digits_003.xsd b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060111_total_digits/Pos_060111_total_digits_003/Pos_060111_total_digits_003.xsd new file mode 100644 index 00000000..ce25f714 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060111_total_digits/Pos_060111_total_digits_003/Pos_060111_total_digits_003.xsd @@ -0,0 +1,11 @@ + + + + + + + + + \ No newline at end of file diff --git a/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060111_total_digits/Pos_060111_total_digits_004/Pos_060111_total_digits_004.ttcn b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060111_total_digits/Pos_060111_total_digits_004/Pos_060111_total_digits_004.ttcn new file mode 100644 index 00000000..03e1d3cb --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060111_total_digits/Pos_060111_total_digits_004/Pos_060111_total_digits_004.ttcn @@ -0,0 +1,80 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 9:6.1.11, Check that totalDigits are converted to value boundaries + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_060111_total_digits_004 { + + import from schema_Pos_060111_total_digits_004 language "XSD" all; + + template E1 m_msg := -9999.0; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_060111_total_digits_004() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_060111_total_digits_004.xml", { "Pos_060111_total_digits_004.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_060111_total_digits_004(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060111_total_digits/Pos_060111_total_digits_004/Pos_060111_total_digits_004.xml b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060111_total_digits/Pos_060111_total_digits_004/Pos_060111_total_digits_004.xml new file mode 100644 index 00000000..f9a758f2 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060111_total_digits/Pos_060111_total_digits_004/Pos_060111_total_digits_004.xml @@ -0,0 +1,2 @@ + +-9999.0 diff --git a/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060111_total_digits/Pos_060111_total_digits_004/Pos_060111_total_digits_004.xsd b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060111_total_digits/Pos_060111_total_digits_004/Pos_060111_total_digits_004.xsd new file mode 100644 index 00000000..68c7e29c --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060111_total_digits/Pos_060111_total_digits_004/Pos_060111_total_digits_004.xsd @@ -0,0 +1,11 @@ + + + + + + + + + \ No newline at end of file diff --git a/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060111_total_digits/Pos_060111_total_digits_005/Pos_060111_total_digits_005.ttcn b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060111_total_digits/Pos_060111_total_digits_005/Pos_060111_total_digits_005.ttcn new file mode 100644 index 00000000..aa7d7d86 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060111_total_digits/Pos_060111_total_digits_005/Pos_060111_total_digits_005.ttcn @@ -0,0 +1,80 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 9:6.1.11, Check that totalDigits are converted to value boundaries + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_060111_total_digits_005 { + + import from schema_Pos_060111_total_digits_005 language "XSD" all; + + template E1 m_msg := 0.0; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_060111_total_digits_005() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_060111_total_digits_005.xml", { "Pos_060111_total_digits_005.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_060111_total_digits_005(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060111_total_digits/Pos_060111_total_digits_005/Pos_060111_total_digits_005.xml b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060111_total_digits/Pos_060111_total_digits_005/Pos_060111_total_digits_005.xml new file mode 100644 index 00000000..9ecad680 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060111_total_digits/Pos_060111_total_digits_005/Pos_060111_total_digits_005.xml @@ -0,0 +1,2 @@ + +0.0 diff --git a/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060111_total_digits/Pos_060111_total_digits_005/Pos_060111_total_digits_005.xsd b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060111_total_digits/Pos_060111_total_digits_005/Pos_060111_total_digits_005.xsd new file mode 100644 index 00000000..2e2a5a81 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060111_total_digits/Pos_060111_total_digits_005/Pos_060111_total_digits_005.xsd @@ -0,0 +1,11 @@ + + + + + + + + + \ No newline at end of file diff --git a/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060112_fraction_digits/Pos_060112_fraction_digits_001/Pos_060112_fraction_digits_001.ttcn b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060112_fraction_digits/Pos_060112_fraction_digits_001/Pos_060112_fraction_digits_001.ttcn new file mode 100644 index 00000000..ce234cf7 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060112_fraction_digits/Pos_060112_fraction_digits_001/Pos_060112_fraction_digits_001.ttcn @@ -0,0 +1,80 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 9:6.1.12, Check that floats having same accuracy as fractionDigits are converted correct + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_060112_fraction_digits_001 { + + import from schema_Pos_060112_fraction_digits_001 language "XSD" all; + + template ActualTemp m_msg := 99.9; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_060112_fraction_digits_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_060112_fraction_digits_001.xml", { "Pos_060112_fraction_digits_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_060112_fraction_digits_001(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060112_fraction_digits/Pos_060112_fraction_digits_001/Pos_060112_fraction_digits_001.xml b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060112_fraction_digits/Pos_060112_fraction_digits_001/Pos_060112_fraction_digits_001.xml new file mode 100644 index 00000000..c82c9d5f --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060112_fraction_digits/Pos_060112_fraction_digits_001/Pos_060112_fraction_digits_001.xml @@ -0,0 +1,2 @@ + +99.9 diff --git a/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060112_fraction_digits/Pos_060112_fraction_digits_001/Pos_060112_fraction_digits_001.xsd b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060112_fraction_digits/Pos_060112_fraction_digits_001/Pos_060112_fraction_digits_001.xsd new file mode 100644 index 00000000..c434c67d --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060112_fraction_digits/Pos_060112_fraction_digits_001/Pos_060112_fraction_digits_001.xsd @@ -0,0 +1,12 @@ + + + + + + + + + + \ No newline at end of file diff --git a/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060112_fraction_digits/Pos_060112_fraction_digits_002/Pos_060112_fraction_digits_002.ttcn b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060112_fraction_digits/Pos_060112_fraction_digits_002/Pos_060112_fraction_digits_002.ttcn new file mode 100644 index 00000000..77c50184 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060112_fraction_digits/Pos_060112_fraction_digits_002/Pos_060112_fraction_digits_002.ttcn @@ -0,0 +1,81 @@ +/*************************************************** + ** @author STF 487, updated by STF 521 + ** @version 0.0.2 + ** @purpose 9:6.1.12, Check that floats having higher accuracy than fractionDigits are converted correct + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_060112_fraction_digits_002 { + + import from schema_Pos_060112_fraction_digits_002 language "XSD" all; + + template ActualTemp m_msg := 9.999E1; + template ActualTemp m_rcv := 99.9; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_060112_fraction_digits_002() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_060112_fraction_digits_002.xml", { "Pos_060112_fraction_digits_002.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_rcv) { // The value has been changed by the encoder or decoder (in a predictable way) + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_060112_fraction_digits_002(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060112_fraction_digits/Pos_060112_fraction_digits_002/Pos_060112_fraction_digits_002.xml b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060112_fraction_digits/Pos_060112_fraction_digits_002/Pos_060112_fraction_digits_002.xml new file mode 100644 index 00000000..2ad201ba --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060112_fraction_digits/Pos_060112_fraction_digits_002/Pos_060112_fraction_digits_002.xml @@ -0,0 +1,2 @@ + +99.9 diff --git a/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060112_fraction_digits/Pos_060112_fraction_digits_002/Pos_060112_fraction_digits_002.xsd b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060112_fraction_digits/Pos_060112_fraction_digits_002/Pos_060112_fraction_digits_002.xsd new file mode 100644 index 00000000..2a6e7ae4 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060112_fraction_digits/Pos_060112_fraction_digits_002/Pos_060112_fraction_digits_002.xsd @@ -0,0 +1,12 @@ + + + + + + + + + + \ No newline at end of file diff --git a/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060113_not_mapped/Pos_060113_not_mapped_001/Pos_060113_not_mapped_001.ttcn b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060113_not_mapped/Pos_060113_not_mapped_001/Pos_060113_not_mapped_001.ttcn new file mode 100644 index 00000000..5c22b3b6 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060113_not_mapped/Pos_060113_not_mapped_001/Pos_060113_not_mapped_001.ttcn @@ -0,0 +1,80 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 9:6.1.13, Handle not mapped facets to transparent + ** @verdict pass accept, ttcn3verdict:pass + **************◊*************************************/ +module Pos_060113_not_mapped_001 { + + import from schema_Pos_060113_not_mapped_001 language "XSD" all; + + template DecimalWithWhole m_msg := 1.3; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_060113_not_mapped_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_060113_not_mapped_001.xml", { "Pos_060113_not_mapped_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_060113_not_mapped_001(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060113_not_mapped/Pos_060113_not_mapped_001/Pos_060113_not_mapped_001.xml b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060113_not_mapped/Pos_060113_not_mapped_001/Pos_060113_not_mapped_001.xml new file mode 100644 index 00000000..1954afde --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060113_not_mapped/Pos_060113_not_mapped_001/Pos_060113_not_mapped_001.xml @@ -0,0 +1,2 @@ + +1.3 diff --git a/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060113_not_mapped/Pos_060113_not_mapped_001/Pos_060113_not_mapped_001.xsd b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060113_not_mapped/Pos_060113_not_mapped_001/Pos_060113_not_mapped_001.xsd new file mode 100644 index 00000000..d396e7e9 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0601_mapping_of_facets/060113_not_mapped/Pos_060113_not_mapped_001/Pos_060113_not_mapped_001.xsd @@ -0,0 +1,11 @@ + + + + + + + + + \ No newline at end of file diff --git a/ATS/xml/06_built_in_data_types/0602_string_types/060201_string/Pos_060201_string_001/Pos_060201_string_001.ttcn b/ATS/xml/06_built_in_data_types/0602_string_types/060201_string/Pos_060201_string_001/Pos_060201_string_001.ttcn new file mode 100644 index 00000000..e23aed07 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0602_string_types/060201_string/Pos_060201_string_001/Pos_060201_string_001.ttcn @@ -0,0 +1,79 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:6.2.1, Verify mapping of a string type + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_060201_string_001 { + + import from schema_Pos_060201_string_001 language "XSD" all; + + template E1 m_msg := "string"; + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_060201_string_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_060201_string_001.xml", { "Pos_060201_string_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_060201_string_001(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/06_built_in_data_types/0602_string_types/060201_string/Pos_060201_string_001/Pos_060201_string_001.xml b/ATS/xml/06_built_in_data_types/0602_string_types/060201_string/Pos_060201_string_001/Pos_060201_string_001.xml new file mode 100644 index 00000000..e5db63fe --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0602_string_types/060201_string/Pos_060201_string_001/Pos_060201_string_001.xml @@ -0,0 +1,4 @@ + +string diff --git a/ATS/xml/06_built_in_data_types/0602_string_types/060201_string/Pos_060201_string_001/Pos_060201_string_001.xsd b/ATS/xml/06_built_in_data_types/0602_string_types/060201_string/Pos_060201_string_001/Pos_060201_string_001.xsd new file mode 100644 index 00000000..4de726b8 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0602_string_types/060201_string/Pos_060201_string_001/Pos_060201_string_001.xsd @@ -0,0 +1,9 @@ + + + + + + + diff --git a/ATS/xml/06_built_in_data_types/0602_string_types/060202_normalized_string/Pos_060202_normalized_string_001/Pos_060202_normalized_string_001.ttcn b/ATS/xml/06_built_in_data_types/0602_string_types/060202_normalized_string/Pos_060202_normalized_string_001/Pos_060202_normalized_string_001.ttcn new file mode 100644 index 00000000..e6a0a9f0 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0602_string_types/060202_normalized_string/Pos_060202_normalized_string_001/Pos_060202_normalized_string_001.ttcn @@ -0,0 +1,79 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 9:6.2.2, Verify mapping of a normalizedString type + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_060202_normalized_string_001 { + + import from schema_Pos_060202_normalized_string_001 language "XSD" all; + + template Test m_msg := "abc"; + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_060202_normalized_string_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_060202_normalized_string_001.xml", { "Pos_060202_normalized_string_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_060202_normalized_string_001(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/06_built_in_data_types/0602_string_types/060202_normalized_string/Pos_060202_normalized_string_001/Pos_060202_normalized_string_001.xml b/ATS/xml/06_built_in_data_types/0602_string_types/060202_normalized_string/Pos_060202_normalized_string_001/Pos_060202_normalized_string_001.xml new file mode 100644 index 00000000..eee868e0 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0602_string_types/060202_normalized_string/Pos_060202_normalized_string_001/Pos_060202_normalized_string_001.xml @@ -0,0 +1,3 @@ + +abc diff --git a/ATS/xml/06_built_in_data_types/0602_string_types/060202_normalized_string/Pos_060202_normalized_string_001/Pos_060202_normalized_string_001.xsd b/ATS/xml/06_built_in_data_types/0602_string_types/060202_normalized_string/Pos_060202_normalized_string_001/Pos_060202_normalized_string_001.xsd new file mode 100644 index 00000000..9d035d35 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0602_string_types/060202_normalized_string/Pos_060202_normalized_string_001/Pos_060202_normalized_string_001.xsd @@ -0,0 +1,6 @@ + + + + diff --git a/ATS/xml/06_built_in_data_types/0602_string_types/060203_token/Pos_060203_token_001/Pos_060203_token_001.ttcn b/ATS/xml/06_built_in_data_types/0602_string_types/060203_token/Pos_060203_token_001/Pos_060203_token_001.ttcn new file mode 100644 index 00000000..07709938 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0602_string_types/060203_token/Pos_060203_token_001/Pos_060203_token_001.ttcn @@ -0,0 +1,79 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 9:6.2.3, Verify mapping of a token type + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_060203_token_001 { + + import from schema_Pos_060203_token_001 language "XSD" all; + + template Test m_msg := "abc"; + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_060203_token_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_060203_token_001.xml", { "Pos_060203_token_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_060203_token_001(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/06_built_in_data_types/0602_string_types/060203_token/Pos_060203_token_001/Pos_060203_token_001.xml b/ATS/xml/06_built_in_data_types/0602_string_types/060203_token/Pos_060203_token_001/Pos_060203_token_001.xml new file mode 100644 index 00000000..1b1b0da6 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0602_string_types/060203_token/Pos_060203_token_001/Pos_060203_token_001.xml @@ -0,0 +1,3 @@ + +abc diff --git a/ATS/xml/06_built_in_data_types/0602_string_types/060203_token/Pos_060203_token_001/Pos_060203_token_001.xsd b/ATS/xml/06_built_in_data_types/0602_string_types/060203_token/Pos_060203_token_001/Pos_060203_token_001.xsd new file mode 100644 index 00000000..85c0392e --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0602_string_types/060203_token/Pos_060203_token_001/Pos_060203_token_001.xsd @@ -0,0 +1,6 @@ + + + + diff --git a/ATS/xml/06_built_in_data_types/0602_string_types/060204_name/Pos_060204_name_001/Pos_060204_name_001.ttcn b/ATS/xml/06_built_in_data_types/0602_string_types/060204_name/Pos_060204_name_001/Pos_060204_name_001.ttcn new file mode 100644 index 00000000..1dc7234f --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0602_string_types/060204_name/Pos_060204_name_001/Pos_060204_name_001.ttcn @@ -0,0 +1,79 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:6.2.4, Verify mapping of a Name type + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_060204_name_001 { + + import from schema_Pos_060204_name_001 language "XSD" all; + + template E1 m_msg := "Name"; + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_060204_name_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_060204_name_001.xml", { "Pos_060204_name_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_060204_name_001(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/06_built_in_data_types/0602_string_types/060204_name/Pos_060204_name_001/Pos_060204_name_001.xml b/ATS/xml/06_built_in_data_types/0602_string_types/060204_name/Pos_060204_name_001/Pos_060204_name_001.xml new file mode 100644 index 00000000..71652e07 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0602_string_types/060204_name/Pos_060204_name_001/Pos_060204_name_001.xml @@ -0,0 +1,4 @@ + +Name diff --git a/ATS/xml/06_built_in_data_types/0602_string_types/060204_name/Pos_060204_name_001/Pos_060204_name_001.xsd b/ATS/xml/06_built_in_data_types/0602_string_types/060204_name/Pos_060204_name_001/Pos_060204_name_001.xsd new file mode 100644 index 00000000..aead2f3d --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0602_string_types/060204_name/Pos_060204_name_001/Pos_060204_name_001.xsd @@ -0,0 +1,9 @@ + + + + + + + diff --git a/ATS/xml/06_built_in_data_types/0602_string_types/060205_nmtoken/Pos_060205_nmtoken_001/Pos_060205_nmtoken_001.ttcn b/ATS/xml/06_built_in_data_types/0602_string_types/060205_nmtoken/Pos_060205_nmtoken_001/Pos_060205_nmtoken_001.ttcn new file mode 100644 index 00000000..5d1d64bf --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0602_string_types/060205_nmtoken/Pos_060205_nmtoken_001/Pos_060205_nmtoken_001.ttcn @@ -0,0 +1,79 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 9:6.2.5, Verify mapping of a NMTOKEN type + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_060205_nmtoken_001 { + + import from schema_Pos_060205_nmtoken_001 language "XSD" all; + + template Test m_msg := "abc"; + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_060205_nmtoken_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_060205_nmtoken_001.xml", { "Pos_060205_nmtoken_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_060205_nmtoken_001(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/06_built_in_data_types/0602_string_types/060205_nmtoken/Pos_060205_nmtoken_001/Pos_060205_nmtoken_001.xml b/ATS/xml/06_built_in_data_types/0602_string_types/060205_nmtoken/Pos_060205_nmtoken_001/Pos_060205_nmtoken_001.xml new file mode 100644 index 00000000..b3987277 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0602_string_types/060205_nmtoken/Pos_060205_nmtoken_001/Pos_060205_nmtoken_001.xml @@ -0,0 +1,3 @@ + +abc diff --git a/ATS/xml/06_built_in_data_types/0602_string_types/060205_nmtoken/Pos_060205_nmtoken_001/Pos_060205_nmtoken_001.xsd b/ATS/xml/06_built_in_data_types/0602_string_types/060205_nmtoken/Pos_060205_nmtoken_001/Pos_060205_nmtoken_001.xsd new file mode 100644 index 00000000..b95100d5 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0602_string_types/060205_nmtoken/Pos_060205_nmtoken_001/Pos_060205_nmtoken_001.xsd @@ -0,0 +1,6 @@ + + + + diff --git a/ATS/xml/06_built_in_data_types/0602_string_types/060206_ncname/Pos_060206_ncname_001/Pos_060206_ncname_001.ttcn b/ATS/xml/06_built_in_data_types/0602_string_types/060206_ncname/Pos_060206_ncname_001/Pos_060206_ncname_001.ttcn new file mode 100644 index 00000000..0980a470 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0602_string_types/060206_ncname/Pos_060206_ncname_001/Pos_060206_ncname_001.ttcn @@ -0,0 +1,79 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 9:6.2.6, Verify mapping of a NCName type + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_060206_ncname_001 { + + import from schema_Pos_060206_ncname_001 language "XSD" all; + + template Test m_msg := "abc"; + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_060206_ncname_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_060206_ncname_001.xml", { "Pos_060206_ncname_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_060206_ncname_001(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/06_built_in_data_types/0602_string_types/060206_ncname/Pos_060206_ncname_001/Pos_060206_ncname_001.xml b/ATS/xml/06_built_in_data_types/0602_string_types/060206_ncname/Pos_060206_ncname_001/Pos_060206_ncname_001.xml new file mode 100644 index 00000000..d64d57c1 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0602_string_types/060206_ncname/Pos_060206_ncname_001/Pos_060206_ncname_001.xml @@ -0,0 +1,3 @@ + +abc diff --git a/ATS/xml/06_built_in_data_types/0602_string_types/060206_ncname/Pos_060206_ncname_001/Pos_060206_ncname_001.xsd b/ATS/xml/06_built_in_data_types/0602_string_types/060206_ncname/Pos_060206_ncname_001/Pos_060206_ncname_001.xsd new file mode 100644 index 00000000..2537d333 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0602_string_types/060206_ncname/Pos_060206_ncname_001/Pos_060206_ncname_001.xsd @@ -0,0 +1,6 @@ + + + + diff --git a/ATS/xml/06_built_in_data_types/0602_string_types/060207_id/Pos_060207_id_001/Pos_060207_id_001.ttcn b/ATS/xml/06_built_in_data_types/0602_string_types/060207_id/Pos_060207_id_001/Pos_060207_id_001.ttcn new file mode 100644 index 00000000..9aafde03 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0602_string_types/060207_id/Pos_060207_id_001/Pos_060207_id_001.ttcn @@ -0,0 +1,79 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 9:6.2.7, Verify mapping of an ID type + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_060207_id_001 { + + import from schema_Pos_060207_id_001 language "XSD" all; + + template Test m_msg := "abc"; + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_060207_id_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_060207_id_001.xml", { "Pos_060207_id_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_060207_id_001(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/06_built_in_data_types/0602_string_types/060207_id/Pos_060207_id_001/Pos_060207_id_001.xml b/ATS/xml/06_built_in_data_types/0602_string_types/060207_id/Pos_060207_id_001/Pos_060207_id_001.xml new file mode 100644 index 00000000..0d3448a8 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0602_string_types/060207_id/Pos_060207_id_001/Pos_060207_id_001.xml @@ -0,0 +1,3 @@ + +abc diff --git a/ATS/xml/06_built_in_data_types/0602_string_types/060207_id/Pos_060207_id_001/Pos_060207_id_001.xsd b/ATS/xml/06_built_in_data_types/0602_string_types/060207_id/Pos_060207_id_001/Pos_060207_id_001.xsd new file mode 100644 index 00000000..e7685a8e --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0602_string_types/060207_id/Pos_060207_id_001/Pos_060207_id_001.xsd @@ -0,0 +1,6 @@ + + + + diff --git a/ATS/xml/06_built_in_data_types/0602_string_types/060208_idref/Pos_060207_idref_001/Pos_060208_idref_001.ttcn b/ATS/xml/06_built_in_data_types/0602_string_types/060208_idref/Pos_060207_idref_001/Pos_060208_idref_001.ttcn new file mode 100644 index 00000000..28b40bf0 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0602_string_types/060208_idref/Pos_060207_idref_001/Pos_060208_idref_001.ttcn @@ -0,0 +1,82 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 9:6.2.8, Verify mapping of an IDREF type + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_060208_idref_001 { + + import from schema_Pos_060208_idref_001 language "XSD" all; + + template Test m_msg := { + item := "abc", + itemref := "abc" + } + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_060208_idref_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_060208_idref_001.xml", { "Pos_060208_idref_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_060208_idref_001(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/06_built_in_data_types/0602_string_types/060208_idref/Pos_060207_idref_001/Pos_060208_idref_001.xml b/ATS/xml/06_built_in_data_types/0602_string_types/060208_idref/Pos_060207_idref_001/Pos_060208_idref_001.xml new file mode 100644 index 00000000..5ac7d283 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0602_string_types/060208_idref/Pos_060207_idref_001/Pos_060208_idref_001.xml @@ -0,0 +1,6 @@ + + + abc + abc + diff --git a/ATS/xml/06_built_in_data_types/0602_string_types/060208_idref/Pos_060207_idref_001/Pos_060208_idref_001.xsd b/ATS/xml/06_built_in_data_types/0602_string_types/060208_idref/Pos_060207_idref_001/Pos_060208_idref_001.xsd new file mode 100644 index 00000000..86352bb0 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0602_string_types/060208_idref/Pos_060207_idref_001/Pos_060208_idref_001.xsd @@ -0,0 +1,13 @@ + + + + + + + + + + + diff --git a/ATS/xml/06_built_in_data_types/0602_string_types/060210_hexadecimal_binary/Pos_060210_hexadecimal_binary_001/Pos_060210_hexadecimal_binary_001.ttcn b/ATS/xml/06_built_in_data_types/0602_string_types/060210_hexadecimal_binary/Pos_060210_hexadecimal_binary_001/Pos_060210_hexadecimal_binary_001.ttcn new file mode 100644 index 00000000..54dfc2e7 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0602_string_types/060210_hexadecimal_binary/Pos_060210_hexadecimal_binary_001/Pos_060210_hexadecimal_binary_001.ttcn @@ -0,0 +1,79 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 9:6.2.10, Verify mapping of the hexBinary type + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_060210_hexadecimal_binary_001 { + + import from schema_Pos_060210_hexadecimal_binary_001 language "XSD" all; + + template Test m_msg := '0123456789ABCDEF'O; + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_060210_hexadecimal_binary_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_060210_hexadecimal_binary_001.xml", { "Pos_060210_hexadecimal_binary_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_060210_hexadecimal_binary_001(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/06_built_in_data_types/0602_string_types/060210_hexadecimal_binary/Pos_060210_hexadecimal_binary_001/Pos_060210_hexadecimal_binary_001.xml b/ATS/xml/06_built_in_data_types/0602_string_types/060210_hexadecimal_binary/Pos_060210_hexadecimal_binary_001/Pos_060210_hexadecimal_binary_001.xml new file mode 100644 index 00000000..139f9b89 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0602_string_types/060210_hexadecimal_binary/Pos_060210_hexadecimal_binary_001/Pos_060210_hexadecimal_binary_001.xml @@ -0,0 +1,3 @@ + +0123456789ABCDEF diff --git a/ATS/xml/06_built_in_data_types/0602_string_types/060210_hexadecimal_binary/Pos_060210_hexadecimal_binary_001/Pos_060210_hexadecimal_binary_001.xsd b/ATS/xml/06_built_in_data_types/0602_string_types/060210_hexadecimal_binary/Pos_060210_hexadecimal_binary_001/Pos_060210_hexadecimal_binary_001.xsd new file mode 100644 index 00000000..1cb281f2 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0602_string_types/060210_hexadecimal_binary/Pos_060210_hexadecimal_binary_001/Pos_060210_hexadecimal_binary_001.xsd @@ -0,0 +1,6 @@ + + + + diff --git a/ATS/xml/06_built_in_data_types/0602_string_types/060211_base_64_binary/Pos_060211_base_64_binary_001/Pos_060211_base_64_binary_001.ttcn b/ATS/xml/06_built_in_data_types/0602_string_types/060211_base_64_binary/Pos_060211_base_64_binary_001/Pos_060211_base_64_binary_001.ttcn new file mode 100644 index 00000000..5c50a68a --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0602_string_types/060211_base_64_binary/Pos_060211_base_64_binary_001/Pos_060211_base_64_binary_001.ttcn @@ -0,0 +1,79 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 9:6.2.11, Verify mapping of the base64Binary type + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_060211_base_64_binary_001 { + + import from schema_Pos_060211_base_64_binary_001 language "XSD" all; + + template Test m_msg := '4A6F686E20536D697468'O; + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_060211_base_64_binary_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_060211_base_64_binary_001.xml", { "Pos_060211_base_64_binary_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_060211_base_64_binary_001(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/06_built_in_data_types/0602_string_types/060211_base_64_binary/Pos_060211_base_64_binary_001/Pos_060211_base_64_binary_001.xml b/ATS/xml/06_built_in_data_types/0602_string_types/060211_base_64_binary/Pos_060211_base_64_binary_001/Pos_060211_base_64_binary_001.xml new file mode 100644 index 00000000..f6488705 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0602_string_types/060211_base_64_binary/Pos_060211_base_64_binary_001/Pos_060211_base_64_binary_001.xml @@ -0,0 +1,3 @@ + +Sm9obiBTbWl0aA== diff --git a/ATS/xml/06_built_in_data_types/0602_string_types/060211_base_64_binary/Pos_060211_base_64_binary_001/Pos_060211_base_64_binary_001.xsd b/ATS/xml/06_built_in_data_types/0602_string_types/060211_base_64_binary/Pos_060211_base_64_binary_001/Pos_060211_base_64_binary_001.xsd new file mode 100644 index 00000000..9b53aa41 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0602_string_types/060211_base_64_binary/Pos_060211_base_64_binary_001/Pos_060211_base_64_binary_001.xsd @@ -0,0 +1,6 @@ + + + + diff --git a/ATS/xml/06_built_in_data_types/0602_string_types/060212_any_uri/Neg_060212_any_uri_001/Neg_060212_any_uri_001.ttcn b/ATS/xml/06_built_in_data_types/0602_string_types/060212_any_uri/Neg_060212_any_uri_001/Neg_060212_any_uri_001.ttcn new file mode 100644 index 00000000..0dc00430 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0602_string_types/060212_any_uri/Neg_060212_any_uri_001/Neg_060212_any_uri_001.ttcn @@ -0,0 +1,46 @@ +/*************************************************** + ** @author STF 475, updated by STF 521 + ** @version 0.0.1 + ** @purpose 9:6.2.12, Verify mapping of an anyURI type + ** @verdict pass reject + ***************************************************/ +module Neg_060212_any_uri_001 { + + import from schema_Neg_060212_any_uri_001 language "XSD" all; + + template E1 m_msg := "http://etsi.org" & char(0,0,0,13) & char(0,0,0,10) & char (0,0,0,9);//String with no CRLFHT + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type port P message { + inout all; + } + + type component C { + port P p; + } + + testcase TC_Neg_060212_any_uri_001() runs on C system C { + map(self:p, system:p); + + // encode the message + p.send(m_msg); + log("template should either be rejected by compiler or by runtime latest while encoding"); + + setverdict(fail, "Invalid template should not be encoded"); + + unmap(self:p, system:p); + } + + control { + execute(TC_Neg_060212_any_uri_001(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/06_built_in_data_types/0602_string_types/060212_any_uri/Neg_060212_any_uri_001/Neg_060212_any_uri_001.xsd b/ATS/xml/06_built_in_data_types/0602_string_types/060212_any_uri/Neg_060212_any_uri_001/Neg_060212_any_uri_001.xsd new file mode 100644 index 00000000..148a0739 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0602_string_types/060212_any_uri/Neg_060212_any_uri_001/Neg_060212_any_uri_001.xsd @@ -0,0 +1,9 @@ + + + + + + + \ No newline at end of file diff --git a/ATS/xml/06_built_in_data_types/0602_string_types/060212_any_uri/Neg_060212_any_uri_002/Neg_060212_any_uri_002.ttcn b/ATS/xml/06_built_in_data_types/0602_string_types/060212_any_uri/Neg_060212_any_uri_002/Neg_060212_any_uri_002.ttcn new file mode 100644 index 00000000..5a883c6a --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0602_string_types/060212_any_uri/Neg_060212_any_uri_002/Neg_060212_any_uri_002.ttcn @@ -0,0 +1,46 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:6.2.12, Verify mapping of an anyURI type + ** @verdict pass reject + ***************************************************/ +module Neg_060212_any_uri_002 { + + import from schema_Neg_060212_any_uri_002 language "XSD" all; + + template E1 m_msg := "http://etsi.org ";//String with no HT - Horizontal TAB + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type port P message { + inout all; + } + + type component C { + port P p; + } + + testcase TC_Neg_060212_any_uri_002() runs on C system C { + map(self:p, system:p); + + // encode the message + p.send(m_msg); + log("template should either be rejected by compiler or by runtime latest while encoding"); + + setverdict(fail, "Invalid template should not be encoded"); + + unmap(self:p, system:p); + } + + control { + execute(TC_Neg_060212_any_uri_002(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/06_built_in_data_types/0602_string_types/060212_any_uri/Neg_060212_any_uri_002/Neg_060212_any_uri_002.xsd b/ATS/xml/06_built_in_data_types/0602_string_types/060212_any_uri/Neg_060212_any_uri_002/Neg_060212_any_uri_002.xsd new file mode 100644 index 00000000..86bedd75 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0602_string_types/060212_any_uri/Neg_060212_any_uri_002/Neg_060212_any_uri_002.xsd @@ -0,0 +1,9 @@ + + + + + + + \ No newline at end of file diff --git a/ATS/xml/06_built_in_data_types/0602_string_types/060212_any_uri/Pos_060212_any_uri_001/Pos_060212_any_uri_001.ttcn b/ATS/xml/06_built_in_data_types/0602_string_types/060212_any_uri/Pos_060212_any_uri_001/Pos_060212_any_uri_001.ttcn new file mode 100644 index 00000000..2fedd3f3 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0602_string_types/060212_any_uri/Pos_060212_any_uri_001/Pos_060212_any_uri_001.ttcn @@ -0,0 +1,80 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:6.2.12, Verify mapping of an anyURI type + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_060212_any_uri_001 { + + import from schema_Pos_060212_any_uri_001 language "XSD" all; + + template E1 m_msg := "http://etsi.org"; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_060212_any_uri_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_060212_any_uri_001.xml", { "Pos_060212_any_uri_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_060212_any_uri_001(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/06_built_in_data_types/0602_string_types/060212_any_uri/Pos_060212_any_uri_001/Pos_060212_any_uri_001.xml b/ATS/xml/06_built_in_data_types/0602_string_types/060212_any_uri/Pos_060212_any_uri_001/Pos_060212_any_uri_001.xml new file mode 100644 index 00000000..0f1e3322 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0602_string_types/060212_any_uri/Pos_060212_any_uri_001/Pos_060212_any_uri_001.xml @@ -0,0 +1,4 @@ + +http://etsi.org diff --git a/ATS/xml/06_built_in_data_types/0602_string_types/060212_any_uri/Pos_060212_any_uri_001/Pos_060212_any_uri_001.xsd b/ATS/xml/06_built_in_data_types/0602_string_types/060212_any_uri/Pos_060212_any_uri_001/Pos_060212_any_uri_001.xsd new file mode 100644 index 00000000..8cfda373 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0602_string_types/060212_any_uri/Pos_060212_any_uri_001/Pos_060212_any_uri_001.xsd @@ -0,0 +1,9 @@ + + + + + + + \ No newline at end of file diff --git a/ATS/xml/06_built_in_data_types/0602_string_types/060213_language/Pos_060213_language_001/Pos_060213_language_001.ttcn b/ATS/xml/06_built_in_data_types/0602_string_types/060213_language/Pos_060213_language_001/Pos_060213_language_001.ttcn new file mode 100644 index 00000000..6e30648d --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0602_string_types/060213_language/Pos_060213_language_001/Pos_060213_language_001.ttcn @@ -0,0 +1,79 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 9:6.2.13, Verify mapping of the language type + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_060213_language_001 { + + import from schema_Pos_060213_language_001 language "XSD" all; + + template Test m_msg := "en-GB"; + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_060213_language_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_060213_language_001.xml", { "Pos_060213_language_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_060213_language_001(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/06_built_in_data_types/0602_string_types/060213_language/Pos_060213_language_001/Pos_060213_language_001.xml b/ATS/xml/06_built_in_data_types/0602_string_types/060213_language/Pos_060213_language_001/Pos_060213_language_001.xml new file mode 100644 index 00000000..d76d23ad --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0602_string_types/060213_language/Pos_060213_language_001/Pos_060213_language_001.xml @@ -0,0 +1,3 @@ + +en-GB diff --git a/ATS/xml/06_built_in_data_types/0602_string_types/060213_language/Pos_060213_language_001/Pos_060213_language_001.xsd b/ATS/xml/06_built_in_data_types/0602_string_types/060213_language/Pos_060213_language_001/Pos_060213_language_001.xsd new file mode 100644 index 00000000..3a22b71f --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0602_string_types/060213_language/Pos_060213_language_001/Pos_060213_language_001.xsd @@ -0,0 +1,6 @@ + + + + diff --git a/ATS/xml/06_built_in_data_types/0603_integer_types/060301_integer/Pos_060301_integer_001/Pos_060301_integer_001.ttcn b/ATS/xml/06_built_in_data_types/0603_integer_types/060301_integer/Pos_060301_integer_001/Pos_060301_integer_001.ttcn new file mode 100644 index 00000000..3425bcd8 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0603_integer_types/060301_integer/Pos_060301_integer_001/Pos_060301_integer_001.ttcn @@ -0,0 +1,79 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:6.3.1, Verify that the integer type shall be translated to TTCN-3 as a plain integer + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_060301_integer_001 { + + import from schema_Pos_060301_integer_001 language "XSD" all; + + template E1 m_msg := 2147483647; + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_060301_integer_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_060301_integer_001.xml", { "Pos_060301_integer_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_060301_integer_001(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/06_built_in_data_types/0603_integer_types/060301_integer/Pos_060301_integer_001/Pos_060301_integer_001.xml b/ATS/xml/06_built_in_data_types/0603_integer_types/060301_integer/Pos_060301_integer_001/Pos_060301_integer_001.xml new file mode 100644 index 00000000..46ec6174 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0603_integer_types/060301_integer/Pos_060301_integer_001/Pos_060301_integer_001.xml @@ -0,0 +1,4 @@ + +2147483647 diff --git a/ATS/xml/06_built_in_data_types/0603_integer_types/060301_integer/Pos_060301_integer_001/Pos_060301_integer_001.xsd b/ATS/xml/06_built_in_data_types/0603_integer_types/060301_integer/Pos_060301_integer_001/Pos_060301_integer_001.xsd new file mode 100644 index 00000000..610494f2 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0603_integer_types/060301_integer/Pos_060301_integer_001/Pos_060301_integer_001.xsd @@ -0,0 +1,9 @@ + + + + + + + diff --git a/ATS/xml/06_built_in_data_types/0603_integer_types/060302_positive_integer/Pos_060302_positive_integer_001/Pos_060302_positive_integer_001.ttcn b/ATS/xml/06_built_in_data_types/0603_integer_types/060302_positive_integer/Pos_060302_positive_integer_001/Pos_060302_positive_integer_001.ttcn new file mode 100644 index 00000000..ef5bb329 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0603_integer_types/060302_positive_integer/Pos_060302_positive_integer_001/Pos_060302_positive_integer_001.ttcn @@ -0,0 +1,79 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:6.3.2, Verify that the integer type shall be translated to TTCN-3 as the range-restricted integer + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_060302_positive_integer_001 { + + import from schema_Pos_060302_positive_integer_001 language "XSD" all; + + template E1 m_msg := 2147483647; + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_060302_positive_integer_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_060302_positive_integer_001.xml", { "Pos_060302_positive_integer_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_060302_positive_integer_001(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/06_built_in_data_types/0603_integer_types/060302_positive_integer/Pos_060302_positive_integer_001/Pos_060302_positive_integer_001.xml b/ATS/xml/06_built_in_data_types/0603_integer_types/060302_positive_integer/Pos_060302_positive_integer_001/Pos_060302_positive_integer_001.xml new file mode 100644 index 00000000..3e369e84 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0603_integer_types/060302_positive_integer/Pos_060302_positive_integer_001/Pos_060302_positive_integer_001.xml @@ -0,0 +1,4 @@ + +2147483647 diff --git a/ATS/xml/06_built_in_data_types/0603_integer_types/060302_positive_integer/Pos_060302_positive_integer_001/Pos_060302_positive_integer_001.xsd b/ATS/xml/06_built_in_data_types/0603_integer_types/060302_positive_integer/Pos_060302_positive_integer_001/Pos_060302_positive_integer_001.xsd new file mode 100644 index 00000000..7a621038 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0603_integer_types/060302_positive_integer/Pos_060302_positive_integer_001/Pos_060302_positive_integer_001.xsd @@ -0,0 +1,9 @@ + + + + + + + diff --git a/ATS/xml/06_built_in_data_types/0603_integer_types/060303_non_positive_integer/Pos_060303_non_positive_integer_001/Pos_060303_non_positive_integer_001.ttcn b/ATS/xml/06_built_in_data_types/0603_integer_types/060303_non_positive_integer/Pos_060303_non_positive_integer_001/Pos_060303_non_positive_integer_001.ttcn new file mode 100644 index 00000000..30bd4a24 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0603_integer_types/060303_non_positive_integer/Pos_060303_non_positive_integer_001/Pos_060303_non_positive_integer_001.ttcn @@ -0,0 +1,79 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:6.3.3, Verify that the non positive integer type shall be translated to TTCN-3 as the range-restricted integer + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_060303_non_positive_integer_001 { + + import from schema_Pos_060303_non_positive_integer_001 language "XSD" all; + + template E1 m_msg := -2147483648; + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_060303_non_positive_integer_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_060303_non_positive_integer_001.xml", { "Pos_060303_non_positive_integer_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_060303_non_positive_integer_001(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/06_built_in_data_types/0603_integer_types/060303_non_positive_integer/Pos_060303_non_positive_integer_001/Pos_060303_non_positive_integer_001.xml b/ATS/xml/06_built_in_data_types/0603_integer_types/060303_non_positive_integer/Pos_060303_non_positive_integer_001/Pos_060303_non_positive_integer_001.xml new file mode 100644 index 00000000..75cc8597 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0603_integer_types/060303_non_positive_integer/Pos_060303_non_positive_integer_001/Pos_060303_non_positive_integer_001.xml @@ -0,0 +1,4 @@ + +-2147483648 diff --git a/ATS/xml/06_built_in_data_types/0603_integer_types/060303_non_positive_integer/Pos_060303_non_positive_integer_001/Pos_060303_non_positive_integer_001.xsd b/ATS/xml/06_built_in_data_types/0603_integer_types/060303_non_positive_integer/Pos_060303_non_positive_integer_001/Pos_060303_non_positive_integer_001.xsd new file mode 100644 index 00000000..d2d13adc --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0603_integer_types/060303_non_positive_integer/Pos_060303_non_positive_integer_001/Pos_060303_non_positive_integer_001.xsd @@ -0,0 +1,9 @@ + + + + + + + diff --git a/ATS/xml/06_built_in_data_types/0603_integer_types/060304_negative_integer/Pos_060304_negative_integer_001/Pos_060304_negative_integer_001.ttcn b/ATS/xml/06_built_in_data_types/0603_integer_types/060304_negative_integer/Pos_060304_negative_integer_001/Pos_060304_negative_integer_001.ttcn new file mode 100644 index 00000000..28ecf28e --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0603_integer_types/060304_negative_integer/Pos_060304_negative_integer_001/Pos_060304_negative_integer_001.ttcn @@ -0,0 +1,79 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:6.3.4, Verify that the negative integer type shall be translated to TTCN-3 as the range-restricted integer + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_060304_negative_integer_001 { + + import from schema_Pos_060304_negative_integer_001 language "XSD" all; + + template E1 m_msg := -1; + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_060304_negative_integer_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_060304_negative_integer_001.xml", { "Pos_060304_negative_integer_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_060304_negative_integer_001(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/06_built_in_data_types/0603_integer_types/060304_negative_integer/Pos_060304_negative_integer_001/Pos_060304_negative_integer_001.xml b/ATS/xml/06_built_in_data_types/0603_integer_types/060304_negative_integer/Pos_060304_negative_integer_001/Pos_060304_negative_integer_001.xml new file mode 100644 index 00000000..1101831f --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0603_integer_types/060304_negative_integer/Pos_060304_negative_integer_001/Pos_060304_negative_integer_001.xml @@ -0,0 +1,4 @@ + +-1 diff --git a/ATS/xml/06_built_in_data_types/0603_integer_types/060304_negative_integer/Pos_060304_negative_integer_001/Pos_060304_negative_integer_001.xsd b/ATS/xml/06_built_in_data_types/0603_integer_types/060304_negative_integer/Pos_060304_negative_integer_001/Pos_060304_negative_integer_001.xsd new file mode 100644 index 00000000..48c87555 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0603_integer_types/060304_negative_integer/Pos_060304_negative_integer_001/Pos_060304_negative_integer_001.xsd @@ -0,0 +1,9 @@ + + + + + + + diff --git a/ATS/xml/06_built_in_data_types/0603_integer_types/060305_non_negative_integer/Pos_060305_non_negative_integer_001/Pos_060305_non_negative_integer_001.ttcn b/ATS/xml/06_built_in_data_types/0603_integer_types/060305_non_negative_integer/Pos_060305_non_negative_integer_001/Pos_060305_non_negative_integer_001.ttcn new file mode 100644 index 00000000..ce7fde31 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0603_integer_types/060305_non_negative_integer/Pos_060305_non_negative_integer_001/Pos_060305_non_negative_integer_001.ttcn @@ -0,0 +1,79 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:6.3.5, Verify that the non negative integer type shall be translated to TTCN-3 as the range-restricted integer + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_060305_non_negative_integer_001 { + + import from schema_Pos_060305_non_negative_integer_001 language "XSD" all; + + template E1 m_msg := 0; + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_060305_non_negative_integer_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_060305_non_negative_integer_001.xml", { "Pos_060305_non_negative_integer_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_060305_non_negative_integer_001(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/06_built_in_data_types/0603_integer_types/060305_non_negative_integer/Pos_060305_non_negative_integer_001/Pos_060305_non_negative_integer_001.xml b/ATS/xml/06_built_in_data_types/0603_integer_types/060305_non_negative_integer/Pos_060305_non_negative_integer_001/Pos_060305_non_negative_integer_001.xml new file mode 100644 index 00000000..d9499505 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0603_integer_types/060305_non_negative_integer/Pos_060305_non_negative_integer_001/Pos_060305_non_negative_integer_001.xml @@ -0,0 +1,4 @@ + +0 diff --git a/ATS/xml/06_built_in_data_types/0603_integer_types/060305_non_negative_integer/Pos_060305_non_negative_integer_001/Pos_060305_non_negative_integer_001.xsd b/ATS/xml/06_built_in_data_types/0603_integer_types/060305_non_negative_integer/Pos_060305_non_negative_integer_001/Pos_060305_non_negative_integer_001.xsd new file mode 100644 index 00000000..dd66dd27 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0603_integer_types/060305_non_negative_integer/Pos_060305_non_negative_integer_001/Pos_060305_non_negative_integer_001.xsd @@ -0,0 +1,9 @@ + + + + + + + diff --git a/ATS/xml/06_built_in_data_types/0603_integer_types/060306_long/Pos_060306_long_001/Pos_060306_long_001.ttcn b/ATS/xml/06_built_in_data_types/0603_integer_types/060306_long/Pos_060306_long_001/Pos_060306_long_001.ttcn new file mode 100644 index 00000000..c7e0744f --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0603_integer_types/060306_long/Pos_060306_long_001/Pos_060306_long_001.ttcn @@ -0,0 +1,79 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:6.3.6, Verify that long type (64bit) shall be translated to TTCN-3 as a plain long long + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_060306_long_001 { + + import from schema_Pos_060306_long_001 language "XSD" all; + + template E1 m_msg := 9223372036854775807; + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_060306_long_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_060306_long_001.xml", { "Pos_060306_long_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_060306_long_001(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/06_built_in_data_types/0603_integer_types/060306_long/Pos_060306_long_001/Pos_060306_long_001.xml b/ATS/xml/06_built_in_data_types/0603_integer_types/060306_long/Pos_060306_long_001/Pos_060306_long_001.xml new file mode 100644 index 00000000..f332aebb --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0603_integer_types/060306_long/Pos_060306_long_001/Pos_060306_long_001.xml @@ -0,0 +1,4 @@ + +9223372036854775807 diff --git a/ATS/xml/06_built_in_data_types/0603_integer_types/060306_long/Pos_060306_long_001/Pos_060306_long_001.xsd b/ATS/xml/06_built_in_data_types/0603_integer_types/060306_long/Pos_060306_long_001/Pos_060306_long_001.xsd new file mode 100644 index 00000000..51aaf45f --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0603_integer_types/060306_long/Pos_060306_long_001/Pos_060306_long_001.xsd @@ -0,0 +1,9 @@ + + + + + + + diff --git a/ATS/xml/06_built_in_data_types/0603_integer_types/060307_unsigned_long/Pos_060307_unsigned_long_001/Pos_060307_unsigned_long_001.ttcn b/ATS/xml/06_built_in_data_types/0603_integer_types/060307_unsigned_long/Pos_060307_unsigned_long_001/Pos_060307_unsigned_long_001.ttcn new file mode 100644 index 00000000..e41d7d29 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0603_integer_types/060307_unsigned_long/Pos_060307_unsigned_long_001/Pos_060307_unsigned_long_001.ttcn @@ -0,0 +1,79 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:6.3.7, Verify that unsigned long type (64bit) shall be translated to TTCN-3 as a plain unsigned long long + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_060307_unsigned_long_001 { + + import from schema_Pos_060307_unsigned_long_001 language "XSD" all; + + template E1 m_msg := 18446744073709551615; + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_060307_unsigned_long_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_060307_unsigned_long_001.xml", { "Pos_060307_unsigned_long_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_060307_unsigned_long_001(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/06_built_in_data_types/0603_integer_types/060307_unsigned_long/Pos_060307_unsigned_long_001/Pos_060307_unsigned_long_001.xml b/ATS/xml/06_built_in_data_types/0603_integer_types/060307_unsigned_long/Pos_060307_unsigned_long_001/Pos_060307_unsigned_long_001.xml new file mode 100644 index 00000000..41ab65ad --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0603_integer_types/060307_unsigned_long/Pos_060307_unsigned_long_001/Pos_060307_unsigned_long_001.xml @@ -0,0 +1,4 @@ + +18446744073709551615 diff --git a/ATS/xml/06_built_in_data_types/0603_integer_types/060307_unsigned_long/Pos_060307_unsigned_long_001/Pos_060307_unsigned_long_001.xsd b/ATS/xml/06_built_in_data_types/0603_integer_types/060307_unsigned_long/Pos_060307_unsigned_long_001/Pos_060307_unsigned_long_001.xsd new file mode 100644 index 00000000..6d806abe --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0603_integer_types/060307_unsigned_long/Pos_060307_unsigned_long_001/Pos_060307_unsigned_long_001.xsd @@ -0,0 +1,9 @@ + + + + + + + diff --git a/ATS/xml/06_built_in_data_types/0603_integer_types/060308_int/Pos_060308_int_001/Pos_060308_int_001.ttcn b/ATS/xml/06_built_in_data_types/0603_integer_types/060308_int/Pos_060308_int_001/Pos_060308_int_001.ttcn new file mode 100644 index 00000000..2551c390 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0603_integer_types/060308_int/Pos_060308_int_001/Pos_060308_int_001.ttcn @@ -0,0 +1,79 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:6.3.8, Verify that int type (32bit) shall be translated to TTCN-3 as a plain long as defined in clause D.2.1.2 of ES 201 873 1 [1]) + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_060308_int_001 { + + import from schema_Pos_060308_int_001 language "XSD" all; + + template E1 m_msg := 2147483647; + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_060308_int_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_060308_int_001.xml", { "Pos_060308_int_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_060308_int_001(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/06_built_in_data_types/0603_integer_types/060308_int/Pos_060308_int_001/Pos_060308_int_001.xml b/ATS/xml/06_built_in_data_types/0603_integer_types/060308_int/Pos_060308_int_001/Pos_060308_int_001.xml new file mode 100644 index 00000000..f975ae1f --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0603_integer_types/060308_int/Pos_060308_int_001/Pos_060308_int_001.xml @@ -0,0 +1,4 @@ + +2147483647 diff --git a/ATS/xml/06_built_in_data_types/0603_integer_types/060308_int/Pos_060308_int_001/Pos_060308_int_001.xsd b/ATS/xml/06_built_in_data_types/0603_integer_types/060308_int/Pos_060308_int_001/Pos_060308_int_001.xsd new file mode 100644 index 00000000..4e6ad8dd --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0603_integer_types/060308_int/Pos_060308_int_001/Pos_060308_int_001.xsd @@ -0,0 +1,9 @@ + + + + + + + diff --git a/ATS/xml/06_built_in_data_types/0603_integer_types/060309_unsigned_int/Pos_060309_unsigned_int_001/Pos_060309_unsigned_int_001.ttcn b/ATS/xml/06_built_in_data_types/0603_integer_types/060309_unsigned_int/Pos_060309_unsigned_int_001/Pos_060309_unsigned_int_001.ttcn new file mode 100644 index 00000000..aa82a225 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0603_integer_types/060309_unsigned_int/Pos_060309_unsigned_int_001/Pos_060309_unsigned_int_001.ttcn @@ -0,0 +1,79 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:6.3.9, Verify that unsigned int type (32bit) shall be translated to TTCN-3 as a plain unsignedlong as defined in clause D.2.1.2 of ES 201 873 1 [1] + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_060309_unsigned_int_001 { + + import from schema_Pos_060309_unsigned_int_001 language "XSD" all; + + template E1 m_msg := 4294967295; + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_060309_unsigned_int_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_060309_unsigned_int_001.xml", { "Pos_060309_unsigned_int_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_060309_unsigned_int_001(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/06_built_in_data_types/0603_integer_types/060309_unsigned_int/Pos_060309_unsigned_int_001/Pos_060309_unsigned_int_001.xml b/ATS/xml/06_built_in_data_types/0603_integer_types/060309_unsigned_int/Pos_060309_unsigned_int_001/Pos_060309_unsigned_int_001.xml new file mode 100644 index 00000000..a58bdaa4 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0603_integer_types/060309_unsigned_int/Pos_060309_unsigned_int_001/Pos_060309_unsigned_int_001.xml @@ -0,0 +1,4 @@ + +4294967295 diff --git a/ATS/xml/06_built_in_data_types/0603_integer_types/060309_unsigned_int/Pos_060309_unsigned_int_001/Pos_060309_unsigned_int_001.xsd b/ATS/xml/06_built_in_data_types/0603_integer_types/060309_unsigned_int/Pos_060309_unsigned_int_001/Pos_060309_unsigned_int_001.xsd new file mode 100644 index 00000000..afaa1eed --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0603_integer_types/060309_unsigned_int/Pos_060309_unsigned_int_001/Pos_060309_unsigned_int_001.xsd @@ -0,0 +1,9 @@ + + + + + + + diff --git a/ATS/xml/06_built_in_data_types/0603_integer_types/060310_short/Pos_060310_short_001/Pos_060310_short_001.ttcn b/ATS/xml/06_built_in_data_types/0603_integer_types/060310_short/Pos_060310_short_001/Pos_060310_short_001.ttcn new file mode 100644 index 00000000..30e509ab --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0603_integer_types/060310_short/Pos_060310_short_001/Pos_060310_short_001.ttcn @@ -0,0 +1,79 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:6.3.10, Verify that short type (16bit) shall be translated to TTCN-3 as a plain short as defined in clause D.2.1.1 of ES 201 873 1 [1] + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_060310_short_001 { + + import from schema_Pos_060310_short_001 language "XSD" all; + + template E1 m_msg := 32767; + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_060310_short_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_060310_short_001.xml", { "Pos_060310_short_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_060310_short_001(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/06_built_in_data_types/0603_integer_types/060310_short/Pos_060310_short_001/Pos_060310_short_001.xml b/ATS/xml/06_built_in_data_types/0603_integer_types/060310_short/Pos_060310_short_001/Pos_060310_short_001.xml new file mode 100644 index 00000000..af3c37d4 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0603_integer_types/060310_short/Pos_060310_short_001/Pos_060310_short_001.xml @@ -0,0 +1,4 @@ + +32767 diff --git a/ATS/xml/06_built_in_data_types/0603_integer_types/060310_short/Pos_060310_short_001/Pos_060310_short_001.xsd b/ATS/xml/06_built_in_data_types/0603_integer_types/060310_short/Pos_060310_short_001/Pos_060310_short_001.xsd new file mode 100644 index 00000000..56d280d7 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0603_integer_types/060310_short/Pos_060310_short_001/Pos_060310_short_001.xsd @@ -0,0 +1,9 @@ + + + + + + + diff --git a/ATS/xml/06_built_in_data_types/0603_integer_types/060311_unsigned_short/Pos_060311_unsigned_short_001/Pos_060311_unsigned_short_001.ttcn b/ATS/xml/06_built_in_data_types/0603_integer_types/060311_unsigned_short/Pos_060311_unsigned_short_001/Pos_060311_unsigned_short_001.ttcn new file mode 100644 index 00000000..0992cdf6 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0603_integer_types/060311_unsigned_short/Pos_060311_unsigned_short_001/Pos_060311_unsigned_short_001.ttcn @@ -0,0 +1,79 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:6.3.11, Verify that unsigned short type (16bit) shall be translated to TTCN-3 as a plain unsigned short as defined in clause D.2.1.1 of ES 201 873 1 [1] + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_060311_unsigned_short_001 { + + import from schema_Pos_060311_unsigned_short_001 language "XSD" all; + + template E1 m_msg := 65535; + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_060311_unsigned_short_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_060311_unsigned_short_001.xml", { "Pos_060311_unsigned_short_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_060311_unsigned_short_001(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/06_built_in_data_types/0603_integer_types/060311_unsigned_short/Pos_060311_unsigned_short_001/Pos_060311_unsigned_short_001.xml b/ATS/xml/06_built_in_data_types/0603_integer_types/060311_unsigned_short/Pos_060311_unsigned_short_001/Pos_060311_unsigned_short_001.xml new file mode 100644 index 00000000..fcdedfb6 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0603_integer_types/060311_unsigned_short/Pos_060311_unsigned_short_001/Pos_060311_unsigned_short_001.xml @@ -0,0 +1,4 @@ + +65535 diff --git a/ATS/xml/06_built_in_data_types/0603_integer_types/060311_unsigned_short/Pos_060311_unsigned_short_001/Pos_060311_unsigned_short_001.xsd b/ATS/xml/06_built_in_data_types/0603_integer_types/060311_unsigned_short/Pos_060311_unsigned_short_001/Pos_060311_unsigned_short_001.xsd new file mode 100644 index 00000000..7f62f225 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0603_integer_types/060311_unsigned_short/Pos_060311_unsigned_short_001/Pos_060311_unsigned_short_001.xsd @@ -0,0 +1,9 @@ + + + + + + + diff --git a/ATS/xml/06_built_in_data_types/0603_integer_types/060312_byte/Pos_060312_byte_001/Pos_060312_byte_001.ttcn b/ATS/xml/06_built_in_data_types/0603_integer_types/060312_byte/Pos_060312_byte_001/Pos_060312_byte_001.ttcn new file mode 100644 index 00000000..28870f54 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0603_integer_types/060312_byte/Pos_060312_byte_001/Pos_060312_byte_001.ttcn @@ -0,0 +1,79 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:6.3.12, Verify that byte type (8bit) shall be translated to TTCN-3 as a plain byte as defined in clause D.2.1.0 of ES 201 873 1 [1] + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_060312_byte_001 { + + import from schema_Pos_060312_byte_001 language "XSD" all; + + template E1 m_msg := 127; + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_060312_byte_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_060312_byte_001.xml", { "Pos_060312_byte_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_060312_byte_001(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/06_built_in_data_types/0603_integer_types/060312_byte/Pos_060312_byte_001/Pos_060312_byte_001.xml b/ATS/xml/06_built_in_data_types/0603_integer_types/060312_byte/Pos_060312_byte_001/Pos_060312_byte_001.xml new file mode 100644 index 00000000..8323d610 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0603_integer_types/060312_byte/Pos_060312_byte_001/Pos_060312_byte_001.xml @@ -0,0 +1,4 @@ + +127 diff --git a/ATS/xml/06_built_in_data_types/0603_integer_types/060312_byte/Pos_060312_byte_001/Pos_060312_byte_001.xsd b/ATS/xml/06_built_in_data_types/0603_integer_types/060312_byte/Pos_060312_byte_001/Pos_060312_byte_001.xsd new file mode 100644 index 00000000..c19a7fdc --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0603_integer_types/060312_byte/Pos_060312_byte_001/Pos_060312_byte_001.xsd @@ -0,0 +1,9 @@ + + + + + + + diff --git a/ATS/xml/06_built_in_data_types/0603_integer_types/060313_unsigned_byte/Pos_060313_unsigned_byte_001/Pos_060313_unsigned_byte_001.ttcn b/ATS/xml/06_built_in_data_types/0603_integer_types/060313_unsigned_byte/Pos_060313_unsigned_byte_001/Pos_060313_unsigned_byte_001.ttcn new file mode 100644 index 00000000..f05f544f --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0603_integer_types/060313_unsigned_byte/Pos_060313_unsigned_byte_001/Pos_060313_unsigned_byte_001.ttcn @@ -0,0 +1,79 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:6.3.13, Verify that unsigned byte type (8bit) shall be translated to TTCN-3 as a plain unsigned byte as defined in clause D.2.1.0 of ES 201 873 1 [1] + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_060313_unsigned_byte_001 { + + import from schema_Pos_060313_unsigned_byte_001 language "XSD" all; + + template E1 m_msg := 255; + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_060313_unsigned_byte_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_060313_unsigned_byte_001.xml", { "Pos_060313_unsigned_byte_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_060313_unsigned_byte_001(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/06_built_in_data_types/0603_integer_types/060313_unsigned_byte/Pos_060313_unsigned_byte_001/Pos_060313_unsigned_byte_001.xml b/ATS/xml/06_built_in_data_types/0603_integer_types/060313_unsigned_byte/Pos_060313_unsigned_byte_001/Pos_060313_unsigned_byte_001.xml new file mode 100644 index 00000000..8ef35976 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0603_integer_types/060313_unsigned_byte/Pos_060313_unsigned_byte_001/Pos_060313_unsigned_byte_001.xml @@ -0,0 +1,4 @@ + +255 diff --git a/ATS/xml/06_built_in_data_types/0603_integer_types/060313_unsigned_byte/Pos_060313_unsigned_byte_001/Pos_060313_unsigned_byte_001.xsd b/ATS/xml/06_built_in_data_types/0603_integer_types/060313_unsigned_byte/Pos_060313_unsigned_byte_001/Pos_060313_unsigned_byte_001.xsd new file mode 100644 index 00000000..b4f8bb39 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0603_integer_types/060313_unsigned_byte/Pos_060313_unsigned_byte_001/Pos_060313_unsigned_byte_001.xsd @@ -0,0 +1,9 @@ + + + + + + + diff --git a/ATS/xml/06_built_in_data_types/0604_float_types/060401_decimal/Pos_060401_decimal_001/Pos_060401_decimal_001.ttcn b/ATS/xml/06_built_in_data_types/0604_float_types/060401_decimal/Pos_060401_decimal_001/Pos_060401_decimal_001.ttcn new file mode 100644 index 00000000..bd50de3a --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0604_float_types/060401_decimal/Pos_060401_decimal_001/Pos_060401_decimal_001.ttcn @@ -0,0 +1,79 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:6.4.1, Verify that decimal type shall be translated to TTCN-3 as a plain float + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_060401_decimal_001 { + + import from schema_Pos_060401_decimal_001 language "XSD" all; + + template E1 m_msg := -5.0; + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_060401_decimal_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_060401_decimal_001.xml", { "Pos_060401_decimal_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_060401_decimal_001(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/06_built_in_data_types/0604_float_types/060401_decimal/Pos_060401_decimal_001/Pos_060401_decimal_001.xml b/ATS/xml/06_built_in_data_types/0604_float_types/060401_decimal/Pos_060401_decimal_001/Pos_060401_decimal_001.xml new file mode 100644 index 00000000..739b1cce --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0604_float_types/060401_decimal/Pos_060401_decimal_001/Pos_060401_decimal_001.xml @@ -0,0 +1,4 @@ + +-5.0 diff --git a/ATS/xml/06_built_in_data_types/0604_float_types/060401_decimal/Pos_060401_decimal_001/Pos_060401_decimal_001.xsd b/ATS/xml/06_built_in_data_types/0604_float_types/060401_decimal/Pos_060401_decimal_001/Pos_060401_decimal_001.xsd new file mode 100644 index 00000000..b160f8a9 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0604_float_types/060401_decimal/Pos_060401_decimal_001/Pos_060401_decimal_001.xsd @@ -0,0 +1,9 @@ + + + + + + + diff --git a/ATS/xml/06_built_in_data_types/0604_float_types/060402_float/Pos_060402_float_001/Pos_060402_float_001.ttcn b/ATS/xml/06_built_in_data_types/0604_float_types/060402_float/Pos_060402_float_001/Pos_060402_float_001.ttcn new file mode 100644 index 00000000..4315bdbc --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0604_float_types/060402_float/Pos_060402_float_001/Pos_060402_float_001.ttcn @@ -0,0 +1,85 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:6.4.2, Verify conversion of XSD float type + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// The float type shall be translated to TTCN-3 as an IEEE754float as defined in +// clause D.2.1.4 of ES 201 873-1 [1] + +module Pos_060402_float_001 { + + import from schema_Pos_060402_float_001 language "XSD" all; + + template MyType m_msg := 3.14; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_060402_float_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_060402_float_001.xml", { "Pos_060402_float_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_060402_float_001(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/ATS/xml/06_built_in_data_types/0604_float_types/060402_float/Pos_060402_float_001/Pos_060402_float_001.xml b/ATS/xml/06_built_in_data_types/0604_float_types/060402_float/Pos_060402_float_001/Pos_060402_float_001.xml new file mode 100644 index 00000000..697a4c79 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0604_float_types/060402_float/Pos_060402_float_001/Pos_060402_float_001.xml @@ -0,0 +1,2 @@ + +3.14 \ No newline at end of file diff --git a/ATS/xml/06_built_in_data_types/0604_float_types/060402_float/Pos_060402_float_001/Pos_060402_float_001.xsd b/ATS/xml/06_built_in_data_types/0604_float_types/060402_float/Pos_060402_float_001/Pos_060402_float_001.xsd new file mode 100644 index 00000000..a5f39549 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0604_float_types/060402_float/Pos_060402_float_001/Pos_060402_float_001.xsd @@ -0,0 +1,6 @@ + + + + diff --git a/ATS/xml/06_built_in_data_types/0604_float_types/060403_double/Pos_060403_double_001/Pos_060403_double_001.ttcn b/ATS/xml/06_built_in_data_types/0604_float_types/060403_double/Pos_060403_double_001/Pos_060403_double_001.ttcn new file mode 100644 index 00000000..61944c9d --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0604_float_types/060403_double/Pos_060403_double_001/Pos_060403_double_001.ttcn @@ -0,0 +1,79 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:6.4.3, Verify that double type shall be translated to TTCN-3 as an IEEE754double as defined in clause D.2.1.4 of ES 201 873 1 [1]: + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_060403_double_001 { + + import from schema_Pos_060403_double_001 language "XSD" all; + + template E1 m_msg := 1.23E9; + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_060403_double_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_060403_double_001.xml", { "Pos_060403_double_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_060403_double_001(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/06_built_in_data_types/0604_float_types/060403_double/Pos_060403_double_001/Pos_060403_double_001.xml b/ATS/xml/06_built_in_data_types/0604_float_types/060403_double/Pos_060403_double_001/Pos_060403_double_001.xml new file mode 100644 index 00000000..3f1035ba --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0604_float_types/060403_double/Pos_060403_double_001/Pos_060403_double_001.xml @@ -0,0 +1,4 @@ + +1.23E9 diff --git a/ATS/xml/06_built_in_data_types/0604_float_types/060403_double/Pos_060403_double_001/Pos_060403_double_001.xsd b/ATS/xml/06_built_in_data_types/0604_float_types/060403_double/Pos_060403_double_001/Pos_060403_double_001.xsd new file mode 100644 index 00000000..3f4408bc --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0604_float_types/060403_double/Pos_060403_double_001/Pos_060403_double_001.xsd @@ -0,0 +1,9 @@ + + + + + + + diff --git a/ATS/xml/06_built_in_data_types/0605_time_types/060501_duration/Pos_060501_duration_001/Pos_060501_duration_001.ttcn b/ATS/xml/06_built_in_data_types/0605_time_types/060501_duration/Pos_060501_duration_001/Pos_060501_duration_001.ttcn new file mode 100644 index 00000000..2874cd3f --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0605_time_types/060501_duration/Pos_060501_duration_001/Pos_060501_duration_001.ttcn @@ -0,0 +1,79 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 9:6.5.1, Verify mapping of the duration type + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_060501_duration_001 { + + import from schema_Pos_060501_duration_001 language "XSD" all; + + template Test m_msg := "P5Y"; + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_060501_duration_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_060501_duration_001.xml", { "Pos_060501_duration_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_060501_duration_001(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/06_built_in_data_types/0605_time_types/060501_duration/Pos_060501_duration_001/Pos_060501_duration_001.xml b/ATS/xml/06_built_in_data_types/0605_time_types/060501_duration/Pos_060501_duration_001/Pos_060501_duration_001.xml new file mode 100644 index 00000000..84668196 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0605_time_types/060501_duration/Pos_060501_duration_001/Pos_060501_duration_001.xml @@ -0,0 +1,3 @@ + +P5Y diff --git a/ATS/xml/06_built_in_data_types/0605_time_types/060501_duration/Pos_060501_duration_001/Pos_060501_duration_001.xsd b/ATS/xml/06_built_in_data_types/0605_time_types/060501_duration/Pos_060501_duration_001/Pos_060501_duration_001.xsd new file mode 100644 index 00000000..38f9f6bb --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0605_time_types/060501_duration/Pos_060501_duration_001/Pos_060501_duration_001.xsd @@ -0,0 +1,6 @@ + + + + diff --git a/ATS/xml/06_built_in_data_types/0605_time_types/060502_date_and_time/Neg_060502_date_and_time_001/Neg_060502_date_and_time_001.ttcn b/ATS/xml/06_built_in_data_types/0605_time_types/060502_date_and_time/Neg_060502_date_and_time_001/Neg_060502_date_and_time_001.ttcn new file mode 100644 index 00000000..d6f19206 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0605_time_types/060502_date_and_time/Neg_060502_date_and_time_001/Neg_060502_date_and_time_001.ttcn @@ -0,0 +1,45 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:6.5.2, Verify that the dateTime type shall be translated to TTCN-3 using the pattern-restricted charstring + ** @verdict pass reject + ***************************************************/ +module Neg_060502_date_and_time_001 { + + import from schema_Neg_060502_date_and_time_001 language "XSD" all; + + template E1 m_msg := "2014-04-17T13:59"; //invalid value + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type port P message { + inout all; + } + + type component C { + port P p; + } + + testcase TC_Neg_060502_date_and_time_001() runs on C system C { + map(self:p, system:p); + + // encode the message + p.send(m_msg); + log("template should either be rejected by compiler or by runtime latest while encoding"); + + setverdict(fail, "Invalid template should not be encoded"); + + unmap(self:p, system:p); + } + + control { + execute(TC_Neg_060502_date_and_time_001(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/06_built_in_data_types/0605_time_types/060502_date_and_time/Neg_060502_date_and_time_001/Neg_060502_date_and_time_001.xsd b/ATS/xml/06_built_in_data_types/0605_time_types/060502_date_and_time/Neg_060502_date_and_time_001/Neg_060502_date_and_time_001.xsd new file mode 100644 index 00000000..22ec9e82 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0605_time_types/060502_date_and_time/Neg_060502_date_and_time_001/Neg_060502_date_and_time_001.xsd @@ -0,0 +1,9 @@ + + + + + + + diff --git a/ATS/xml/06_built_in_data_types/0605_time_types/060502_date_and_time/Neg_060502_date_and_time_002/Neg_060502_date_and_time_002.ttcn b/ATS/xml/06_built_in_data_types/0605_time_types/060502_date_and_time/Neg_060502_date_and_time_002/Neg_060502_date_and_time_002.ttcn new file mode 100644 index 00000000..751cb25d --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0605_time_types/060502_date_and_time/Neg_060502_date_and_time_002/Neg_060502_date_and_time_002.ttcn @@ -0,0 +1,45 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:6.5.2, Verify that the dateTime type shall be translated to TTCN-3 using the pattern-restricted charstring + ** @verdict pass reject + ***************************************************/ +module Neg_060502_date_and_time_002 { + + import from schema_Neg_060502_date_and_time_002 language "XSD" all; + + template E1 m_msg := "2014-04-1713:59"; //invalid value + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type port P message { + inout all; + } + + type component C { + port P p; + } + + testcase TC_Neg_060502_date_and_time_002() runs on C system C { + map(self:p, system:p); + + // encode the message + p.send(m_msg); + log("template should either be rejected by compiler or by runtime latest while encoding"); + + setverdict(fail, "Invalid template should not be encoded"); + + unmap(self:p, system:p); + } + + control { + execute(TC_Neg_060502_date_and_time_002(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/06_built_in_data_types/0605_time_types/060502_date_and_time/Neg_060502_date_and_time_002/Neg_060502_date_and_time_002.xsd b/ATS/xml/06_built_in_data_types/0605_time_types/060502_date_and_time/Neg_060502_date_and_time_002/Neg_060502_date_and_time_002.xsd new file mode 100644 index 00000000..34e89d8c --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0605_time_types/060502_date_and_time/Neg_060502_date_and_time_002/Neg_060502_date_and_time_002.xsd @@ -0,0 +1,9 @@ + + + + + + + diff --git a/ATS/xml/06_built_in_data_types/0605_time_types/060502_date_and_time/Neg_060502_date_and_time_003/Neg_060502_date_and_time_003.ttcn b/ATS/xml/06_built_in_data_types/0605_time_types/060502_date_and_time/Neg_060502_date_and_time_003/Neg_060502_date_and_time_003.ttcn new file mode 100644 index 00000000..ad3b2b01 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0605_time_types/060502_date_and_time/Neg_060502_date_and_time_003/Neg_060502_date_and_time_003.ttcn @@ -0,0 +1,45 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:6.5.2, Verify that the dateTime type shall be translated to TTCN-3 using the pattern-restricted charstring + ** @verdict pass reject + ***************************************************/ +module Neg_060502_date_and_time_003 { + + import from schema_Neg_060502_date_and_time_003 language "XSD" all; + + template E1 m_msg := "99-04-17T13:59"; //invalid value + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type port P message { + inout all; + } + + type component C { + port P p; + } + + testcase TC_Neg_060502_date_and_time_003() runs on C system C { + map(self:p, system:p); + + // encode the message + p.send(m_msg); + log("template should either be rejected by compiler or by runtime latest while encoding"); + + setverdict(fail, "Invalid template should not be encoded"); + + unmap(self:p, system:p); + } + + control { + execute(TC_Neg_060502_date_and_time_003(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/06_built_in_data_types/0605_time_types/060502_date_and_time/Neg_060502_date_and_time_003/Neg_060502_date_and_time_003.xsd b/ATS/xml/06_built_in_data_types/0605_time_types/060502_date_and_time/Neg_060502_date_and_time_003/Neg_060502_date_and_time_003.xsd new file mode 100644 index 00000000..88058aba --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0605_time_types/060502_date_and_time/Neg_060502_date_and_time_003/Neg_060502_date_and_time_003.xsd @@ -0,0 +1,9 @@ + + + + + + + diff --git a/ATS/xml/06_built_in_data_types/0605_time_types/060502_date_and_time/Neg_060502_date_and_time_004/Neg_060502_date_and_time_004.ttcn b/ATS/xml/06_built_in_data_types/0605_time_types/060502_date_and_time/Neg_060502_date_and_time_004/Neg_060502_date_and_time_004.ttcn new file mode 100644 index 00000000..71e9e5d4 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0605_time_types/060502_date_and_time/Neg_060502_date_and_time_004/Neg_060502_date_and_time_004.ttcn @@ -0,0 +1,45 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:6.5.2, Verify that the dateTime type shall be translated to TTCN-3 using the pattern-restricted charstring + ** @verdict pass reject + ***************************************************/ +module Neg_060502_date_and_time_004 { + + import from schema_Neg_060502_date_and_time_004 language "XSD" all; + + template E1 m_msg := "2014-04-17"; //invalid value + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type port P message { + inout all; + } + + type component C { + port P p; + } + + testcase TC_Neg_060502_date_and_time_004() runs on C system C { + map(self:p, system:p); + + // encode the message + p.send(m_msg); + log("template should either be rejected by compiler or by runtime latest while encoding"); + + setverdict(fail, "Invalid template should not be encoded"); + + unmap(self:p, system:p); + } + + control { + execute(TC_Neg_060502_date_and_time_004(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/06_built_in_data_types/0605_time_types/060502_date_and_time/Neg_060502_date_and_time_004/Neg_060502_date_and_time_004.xsd b/ATS/xml/06_built_in_data_types/0605_time_types/060502_date_and_time/Neg_060502_date_and_time_004/Neg_060502_date_and_time_004.xsd new file mode 100644 index 00000000..1b761395 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0605_time_types/060502_date_and_time/Neg_060502_date_and_time_004/Neg_060502_date_and_time_004.xsd @@ -0,0 +1,9 @@ + + + + + + + diff --git a/ATS/xml/06_built_in_data_types/0605_time_types/060502_date_and_time/Pos_060502_date_and_time_001/Pos_060502_date_and_time_001.ttcn b/ATS/xml/06_built_in_data_types/0605_time_types/060502_date_and_time/Pos_060502_date_and_time_001/Pos_060502_date_and_time_001.ttcn new file mode 100644 index 00000000..5fa2896b --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0605_time_types/060502_date_and_time/Pos_060502_date_and_time_001/Pos_060502_date_and_time_001.ttcn @@ -0,0 +1,79 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:6.5.2, Verify that the dateTime type shall be translated to TTCN-3 using the pattern-restricted charstring + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_060502_date_and_time_001 { + + import from schema_Pos_060502_date_and_time_001 language "XSD" all; + + template E1 m_msg := "2014-04-17T13:59:00"; + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_060502_date_and_time_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_060502_date_and_time_001.xml", { "Pos_060502_date_and_time_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_060502_date_and_time_001(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/06_built_in_data_types/0605_time_types/060502_date_and_time/Pos_060502_date_and_time_001/Pos_060502_date_and_time_001.xml b/ATS/xml/06_built_in_data_types/0605_time_types/060502_date_and_time/Pos_060502_date_and_time_001/Pos_060502_date_and_time_001.xml new file mode 100644 index 00000000..5e2edc67 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0605_time_types/060502_date_and_time/Pos_060502_date_and_time_001/Pos_060502_date_and_time_001.xml @@ -0,0 +1,4 @@ + +2014-04-17T13:59:00 diff --git a/ATS/xml/06_built_in_data_types/0605_time_types/060502_date_and_time/Pos_060502_date_and_time_001/Pos_060502_date_and_time_001.xsd b/ATS/xml/06_built_in_data_types/0605_time_types/060502_date_and_time/Pos_060502_date_and_time_001/Pos_060502_date_and_time_001.xsd new file mode 100644 index 00000000..eff54617 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0605_time_types/060502_date_and_time/Pos_060502_date_and_time_001/Pos_060502_date_and_time_001.xsd @@ -0,0 +1,9 @@ + + + + + + + diff --git a/ATS/xml/06_built_in_data_types/0605_time_types/060502_date_and_time/Pos_060502_date_and_time_002/Pos_060502_date_and_time_002.ttcn b/ATS/xml/06_built_in_data_types/0605_time_types/060502_date_and_time/Pos_060502_date_and_time_002/Pos_060502_date_and_time_002.ttcn new file mode 100644 index 00000000..f7c95427 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0605_time_types/060502_date_and_time/Pos_060502_date_and_time_002/Pos_060502_date_and_time_002.ttcn @@ -0,0 +1,79 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:6.5.2, Verify that the dateTime type shall be translated to TTCN-3 using the pattern-restricted charstring + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_060502_date_and_time_002 { + + import from schema_Pos_060502_date_and_time_002 language "XSD" all; + + template E1 m_msg := "2014-04-17T13:59:00.5"; + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_060502_date_and_time_002() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_060502_date_and_time_002.xml", { "Pos_060502_date_and_time_002.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_060502_date_and_time_002(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/06_built_in_data_types/0605_time_types/060502_date_and_time/Pos_060502_date_and_time_002/Pos_060502_date_and_time_002.xml b/ATS/xml/06_built_in_data_types/0605_time_types/060502_date_and_time/Pos_060502_date_and_time_002/Pos_060502_date_and_time_002.xml new file mode 100644 index 00000000..175507d1 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0605_time_types/060502_date_and_time/Pos_060502_date_and_time_002/Pos_060502_date_and_time_002.xml @@ -0,0 +1,4 @@ + +2014-04-17T13:59:00.5 diff --git a/ATS/xml/06_built_in_data_types/0605_time_types/060502_date_and_time/Pos_060502_date_and_time_002/Pos_060502_date_and_time_002.xsd b/ATS/xml/06_built_in_data_types/0605_time_types/060502_date_and_time/Pos_060502_date_and_time_002/Pos_060502_date_and_time_002.xsd new file mode 100644 index 00000000..4ee2991d --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0605_time_types/060502_date_and_time/Pos_060502_date_and_time_002/Pos_060502_date_and_time_002.xsd @@ -0,0 +1,9 @@ + + + + + + + diff --git a/ATS/xml/06_built_in_data_types/0605_time_types/060502_date_and_time/Pos_060502_date_and_time_003/Pos_060502_date_and_time_003.ttcn b/ATS/xml/06_built_in_data_types/0605_time_types/060502_date_and_time/Pos_060502_date_and_time_003/Pos_060502_date_and_time_003.ttcn new file mode 100644 index 00000000..1c4a6089 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0605_time_types/060502_date_and_time/Pos_060502_date_and_time_003/Pos_060502_date_and_time_003.ttcn @@ -0,0 +1,79 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:6.5.2, Verify that the dateTime type shall be translated to TTCN-3 using the pattern-restricted charstring + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_060502_date_and_time_003 { + + import from schema_Pos_060502_date_and_time_003 language "XSD" all; + + template E1 m_msg := "2014-04-17T13:59:00+01:00"; //+01h = Central Europa + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_060502_date_and_time_003() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_060502_date_and_time_003.xml", { "Pos_060502_date_and_time_003.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_060502_date_and_time_003(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/06_built_in_data_types/0605_time_types/060502_date_and_time/Pos_060502_date_and_time_003/Pos_060502_date_and_time_003.xml b/ATS/xml/06_built_in_data_types/0605_time_types/060502_date_and_time/Pos_060502_date_and_time_003/Pos_060502_date_and_time_003.xml new file mode 100644 index 00000000..68c8f12e --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0605_time_types/060502_date_and_time/Pos_060502_date_and_time_003/Pos_060502_date_and_time_003.xml @@ -0,0 +1,4 @@ + +2014-04-17T13:59:00+01:00 diff --git a/ATS/xml/06_built_in_data_types/0605_time_types/060502_date_and_time/Pos_060502_date_and_time_003/Pos_060502_date_and_time_003.xsd b/ATS/xml/06_built_in_data_types/0605_time_types/060502_date_and_time/Pos_060502_date_and_time_003/Pos_060502_date_and_time_003.xsd new file mode 100644 index 00000000..221fb441 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0605_time_types/060502_date_and_time/Pos_060502_date_and_time_003/Pos_060502_date_and_time_003.xsd @@ -0,0 +1,9 @@ + + + + + + + diff --git a/ATS/xml/06_built_in_data_types/0605_time_types/060502_date_and_time/Pos_060502_date_and_time_004/Pos_060502_date_and_time_004.ttcn b/ATS/xml/06_built_in_data_types/0605_time_types/060502_date_and_time/Pos_060502_date_and_time_004/Pos_060502_date_and_time_004.ttcn new file mode 100644 index 00000000..76984878 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0605_time_types/060502_date_and_time/Pos_060502_date_and_time_004/Pos_060502_date_and_time_004.ttcn @@ -0,0 +1,79 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:6.5.2, Verify that the dateTime type shall be translated to TTCN-3 using the pattern-restricted charstring + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_060502_date_and_time_004 { + + import from schema_Pos_060502_date_and_time_004 language "XSD" all; + + template E1 m_msg := "2014-04-17T13:59:00Z";// Coordinated Universal Time (UTC) + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_060502_date_and_time_004() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_060502_date_and_time_004.xml", { "Pos_060502_date_and_time_004.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_060502_date_and_time_004(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/06_built_in_data_types/0605_time_types/060502_date_and_time/Pos_060502_date_and_time_004/Pos_060502_date_and_time_004.xml b/ATS/xml/06_built_in_data_types/0605_time_types/060502_date_and_time/Pos_060502_date_and_time_004/Pos_060502_date_and_time_004.xml new file mode 100644 index 00000000..759116dc --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0605_time_types/060502_date_and_time/Pos_060502_date_and_time_004/Pos_060502_date_and_time_004.xml @@ -0,0 +1,4 @@ + +2014-04-17T13:59:00Z diff --git a/ATS/xml/06_built_in_data_types/0605_time_types/060502_date_and_time/Pos_060502_date_and_time_004/Pos_060502_date_and_time_004.xsd b/ATS/xml/06_built_in_data_types/0605_time_types/060502_date_and_time/Pos_060502_date_and_time_004/Pos_060502_date_and_time_004.xsd new file mode 100644 index 00000000..095fbbf0 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0605_time_types/060502_date_and_time/Pos_060502_date_and_time_004/Pos_060502_date_and_time_004.xsd @@ -0,0 +1,9 @@ + + + + + + + diff --git a/ATS/xml/06_built_in_data_types/0605_time_types/060503_time/Pos_060503_time/Pos_060503_time_001.ttcn b/ATS/xml/06_built_in_data_types/0605_time_types/060503_time/Pos_060503_time/Pos_060503_time_001.ttcn new file mode 100644 index 00000000..b25db80a --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0605_time_types/060503_time/Pos_060503_time/Pos_060503_time_001.ttcn @@ -0,0 +1,79 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 9:6.5.3, Verify mapping of the time type + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_060503_time_001 { + + import from schema_Pos_060503_time_001 language "XSD" all; + + template Test m_msg := "09:30:10.5"; + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_060503_time_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_060503_time_001.xml", { "Pos_060503_time_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_060503_time_001(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/06_built_in_data_types/0605_time_types/060503_time/Pos_060503_time/Pos_060503_time_001.xml b/ATS/xml/06_built_in_data_types/0605_time_types/060503_time/Pos_060503_time/Pos_060503_time_001.xml new file mode 100644 index 00000000..1f0ebb03 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0605_time_types/060503_time/Pos_060503_time/Pos_060503_time_001.xml @@ -0,0 +1,3 @@ + +09:30:10.5 diff --git a/ATS/xml/06_built_in_data_types/0605_time_types/060503_time/Pos_060503_time/Pos_060503_time_001.xsd b/ATS/xml/06_built_in_data_types/0605_time_types/060503_time/Pos_060503_time/Pos_060503_time_001.xsd new file mode 100644 index 00000000..bea47182 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0605_time_types/060503_time/Pos_060503_time/Pos_060503_time_001.xsd @@ -0,0 +1,6 @@ + + + + diff --git a/ATS/xml/06_built_in_data_types/0605_time_types/060504_date/Neg_060504_date_001/Neg_060504_date_001.ttcn b/ATS/xml/06_built_in_data_types/0605_time_types/060504_date/Neg_060504_date_001/Neg_060504_date_001.ttcn new file mode 100644 index 00000000..21d1ac2c --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0605_time_types/060504_date/Neg_060504_date_001/Neg_060504_date_001.ttcn @@ -0,0 +1,45 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:6.5.4, Verify that the date type shall be translated to TTCN-3 using the pattern-restricted charstring + ** @verdict pass reject + ***************************************************/ +module Neg_060504_date_001 { + + import from schema_Neg_060504_date_001 language "XSD" all; + + template E1 m_msg := "99-04-12"; //wrong format + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type port P message { + inout all; + } + + type component C { + port P p; + } + + testcase TC_Neg_060504_date_001() runs on C system C { + map(self:p, system:p); + + // encode the message + p.send(m_msg); + log("template should either be rejected by compiler or by runtime latest while encoding"); + + setverdict(fail, "Invalid template should not be encoded"); + + unmap(self:p, system:p); + } + + control { + execute(TC_Neg_060504_date_001(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/06_built_in_data_types/0605_time_types/060504_date/Neg_060504_date_001/Neg_060504_date_001.xsd b/ATS/xml/06_built_in_data_types/0605_time_types/060504_date/Neg_060504_date_001/Neg_060504_date_001.xsd new file mode 100644 index 00000000..5f71502a --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0605_time_types/060504_date/Neg_060504_date_001/Neg_060504_date_001.xsd @@ -0,0 +1,9 @@ + + + + + + + diff --git a/ATS/xml/06_built_in_data_types/0605_time_types/060504_date/Neg_060504_date_002/Neg_060504_date_002.ttcn b/ATS/xml/06_built_in_data_types/0605_time_types/060504_date/Neg_060504_date_002/Neg_060504_date_002.ttcn new file mode 100644 index 00000000..19d9c298 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0605_time_types/060504_date/Neg_060504_date_002/Neg_060504_date_002.ttcn @@ -0,0 +1,45 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:6.5.4, Verify that the date type shall be translated to TTCN-3 using the pattern-restricted charstring + ** @verdict pass reject + ***************************************************/ +module Neg_060504_date_002 { + + import from schema_Neg_060504_date_002 language "XSD" all; + + template E1 m_msg := "2014-4-2"; //wrong format + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type port P message { + inout all; + } + + type component C { + port P p; + } + + testcase TC_Neg_060504_date_002() runs on C system C { + map(self:p, system:p); + + // encode the message + p.send(m_msg); + log("template should either be rejected by compiler or by runtime latest while encoding"); + + setverdict(fail, "Invalid template should not be encoded"); + + unmap(self:p, system:p); + } + + control { + execute(TC_Neg_060504_date_002(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/06_built_in_data_types/0605_time_types/060504_date/Neg_060504_date_002/Neg_060504_date_002.xsd b/ATS/xml/06_built_in_data_types/0605_time_types/060504_date/Neg_060504_date_002/Neg_060504_date_002.xsd new file mode 100644 index 00000000..e4fda32b --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0605_time_types/060504_date/Neg_060504_date_002/Neg_060504_date_002.xsd @@ -0,0 +1,9 @@ + + + + + + + diff --git a/ATS/xml/06_built_in_data_types/0605_time_types/060504_date/Neg_060504_date_003/Neg_060504_date_003.ttcn b/ATS/xml/06_built_in_data_types/0605_time_types/060504_date/Neg_060504_date_003/Neg_060504_date_003.ttcn new file mode 100644 index 00000000..d7446127 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0605_time_types/060504_date/Neg_060504_date_003/Neg_060504_date_003.ttcn @@ -0,0 +1,45 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:6.5.4, Verify that the date type shall be translated to TTCN-3 using the pattern-restricted charstring + ** @verdict pass reject + ***************************************************/ +module Neg_060504_date_003 { + + import from schema_Neg_060504_date_003 language "XSD" all; + + template E1 m_msg := "2014/04/02"; //wrong format - slash not alowed + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type port P message { + inout all; + } + + type component C { + port P p; + } + + testcase TC_Neg_060504_date_003() runs on C system C { + map(self:p, system:p); + + // encode the message + p.send(m_msg); + log("template should either be rejected by compiler or by runtime latest while encoding"); + + setverdict(fail, "Invalid template should not be encoded"); + + unmap(self:p, system:p); + } + + control { + execute(TC_Neg_060504_date_003(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/06_built_in_data_types/0605_time_types/060504_date/Neg_060504_date_003/Neg_060504_date_003.xsd b/ATS/xml/06_built_in_data_types/0605_time_types/060504_date/Neg_060504_date_003/Neg_060504_date_003.xsd new file mode 100644 index 00000000..8b9a66e6 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0605_time_types/060504_date/Neg_060504_date_003/Neg_060504_date_003.xsd @@ -0,0 +1,9 @@ + + + + + + + diff --git a/ATS/xml/06_built_in_data_types/0605_time_types/060504_date/Neg_060504_date_004/Neg_060504_date_004.ttcn b/ATS/xml/06_built_in_data_types/0605_time_types/060504_date/Neg_060504_date_004/Neg_060504_date_004.ttcn new file mode 100644 index 00000000..6ed2d443 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0605_time_types/060504_date/Neg_060504_date_004/Neg_060504_date_004.ttcn @@ -0,0 +1,45 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:6.5.4, Verify that the date type shall be translated to TTCN-3 using the pattern-restricted charstring + ** @verdict pass reject + ***************************************************/ +module Neg_060504_date_004 { + + import from schema_Neg_060504_date_004 language "XSD" all; + + template E1 m_msg := "04-12-2014"; //wrong format must be 2014-04-12 + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type port P message { + inout all; + } + + type component C { + port P p; + } + + testcase TC_Neg_060504_date_004() runs on C system C { + map(self:p, system:p); + + // encode the message + p.send(m_msg); + log("template should either be rejected by compiler or by runtime latest while encoding"); + + setverdict(fail, "Invalid template should not be encoded"); + + unmap(self:p, system:p); + } + + control { + execute(TC_Neg_060504_date_004(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/06_built_in_data_types/0605_time_types/060504_date/Neg_060504_date_004/Neg_060504_date_004.xsd b/ATS/xml/06_built_in_data_types/0605_time_types/060504_date/Neg_060504_date_004/Neg_060504_date_004.xsd new file mode 100644 index 00000000..3e8a7f94 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0605_time_types/060504_date/Neg_060504_date_004/Neg_060504_date_004.xsd @@ -0,0 +1,9 @@ + + + + + + + diff --git a/ATS/xml/06_built_in_data_types/0605_time_types/060504_date/Pos_060504_date_001/Pos_060504_date_001.ttcn b/ATS/xml/06_built_in_data_types/0605_time_types/060504_date/Pos_060504_date_001/Pos_060504_date_001.ttcn new file mode 100644 index 00000000..a25e7edb --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0605_time_types/060504_date/Pos_060504_date_001/Pos_060504_date_001.ttcn @@ -0,0 +1,80 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:6.5.4, Verify that the date type shall be translated to TTCN-3 using the pattern-restricted charstring + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_060504_date_001 { + + import from schema_Pos_060504_date_001 language "XSD" all; + + template E1 m_msg := "2014-04-12"; + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_060504_date_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_060504_date_001.xml", { "Pos_060504_date_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_060504_date_001(), PX_TC_EXECUTION_TIMEOUT); + } + +} + diff --git a/ATS/xml/06_built_in_data_types/0605_time_types/060504_date/Pos_060504_date_001/Pos_060504_date_001.xml b/ATS/xml/06_built_in_data_types/0605_time_types/060504_date/Pos_060504_date_001/Pos_060504_date_001.xml new file mode 100644 index 00000000..cc545245 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0605_time_types/060504_date/Pos_060504_date_001/Pos_060504_date_001.xml @@ -0,0 +1,4 @@ + +2014-04-12 diff --git a/ATS/xml/06_built_in_data_types/0605_time_types/060504_date/Pos_060504_date_001/Pos_060504_date_001.xsd b/ATS/xml/06_built_in_data_types/0605_time_types/060504_date/Pos_060504_date_001/Pos_060504_date_001.xsd new file mode 100644 index 00000000..ddddf8ed --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0605_time_types/060504_date/Pos_060504_date_001/Pos_060504_date_001.xsd @@ -0,0 +1,9 @@ + + + + + + + diff --git a/ATS/xml/06_built_in_data_types/0605_time_types/060504_date/Pos_060504_date_002/Pos_060504_date_002.ttcn b/ATS/xml/06_built_in_data_types/0605_time_types/060504_date/Pos_060504_date_002/Pos_060504_date_002.ttcn new file mode 100644 index 00000000..821c60c9 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0605_time_types/060504_date/Pos_060504_date_002/Pos_060504_date_002.ttcn @@ -0,0 +1,79 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:6.5.4, Verify that the date type shall be translated to TTCN-3 using the pattern-restricted charstring + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_060504_date_002 { + + import from schema_Pos_060504_date_002 language "XSD" all; + + template E1 m_msg := "12014-04-12"; //April 12, 12014 + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_060504_date_002() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_060504_date_002.xml", { "Pos_060504_date_002.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_060504_date_002(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/06_built_in_data_types/0605_time_types/060504_date/Pos_060504_date_002/Pos_060504_date_002.xml b/ATS/xml/06_built_in_data_types/0605_time_types/060504_date/Pos_060504_date_002/Pos_060504_date_002.xml new file mode 100644 index 00000000..af6813ec --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0605_time_types/060504_date/Pos_060504_date_002/Pos_060504_date_002.xml @@ -0,0 +1,4 @@ + +12014-04-12 diff --git a/ATS/xml/06_built_in_data_types/0605_time_types/060504_date/Pos_060504_date_002/Pos_060504_date_002.xsd b/ATS/xml/06_built_in_data_types/0605_time_types/060504_date/Pos_060504_date_002/Pos_060504_date_002.xsd new file mode 100644 index 00000000..1401094f --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0605_time_types/060504_date/Pos_060504_date_002/Pos_060504_date_002.xsd @@ -0,0 +1,9 @@ + + + + + + + diff --git a/ATS/xml/06_built_in_data_types/0605_time_types/060504_date/Pos_060504_date_003/Pos_060504_date_003.ttcn b/ATS/xml/06_built_in_data_types/0605_time_types/060504_date/Pos_060504_date_003/Pos_060504_date_003.ttcn new file mode 100644 index 00000000..24f4f000 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0605_time_types/060504_date/Pos_060504_date_003/Pos_060504_date_003.ttcn @@ -0,0 +1,80 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:6.5.4, Verify that the date type shall be translated to TTCN-3 using the pattern-restricted charstring + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_060504_date_003 { + + import from schema_Pos_060504_date_003 language "XSD" all; + + template E1 m_msg := "2014-04-12+01:00"; //+01:00 for CE + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_060504_date_003() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_060504_date_003.xml", { "Pos_060504_date_003.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_060504_date_003(), PX_TC_EXECUTION_TIMEOUT); + } + +} + diff --git a/ATS/xml/06_built_in_data_types/0605_time_types/060504_date/Pos_060504_date_003/Pos_060504_date_003.xml b/ATS/xml/06_built_in_data_types/0605_time_types/060504_date/Pos_060504_date_003/Pos_060504_date_003.xml new file mode 100644 index 00000000..16c1fb85 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0605_time_types/060504_date/Pos_060504_date_003/Pos_060504_date_003.xml @@ -0,0 +1,4 @@ + +2014-04-12+01:00 diff --git a/ATS/xml/06_built_in_data_types/0605_time_types/060504_date/Pos_060504_date_003/Pos_060504_date_003.xsd b/ATS/xml/06_built_in_data_types/0605_time_types/060504_date/Pos_060504_date_003/Pos_060504_date_003.xsd new file mode 100644 index 00000000..82057bac --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0605_time_types/060504_date/Pos_060504_date_003/Pos_060504_date_003.xsd @@ -0,0 +1,9 @@ + + + + + + + diff --git a/ATS/xml/06_built_in_data_types/0605_time_types/060504_date/Pos_060504_date_004/Pos_060504_date_004.ttcn b/ATS/xml/06_built_in_data_types/0605_time_types/060504_date/Pos_060504_date_004/Pos_060504_date_004.ttcn new file mode 100644 index 00000000..8716303b --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0605_time_types/060504_date/Pos_060504_date_004/Pos_060504_date_004.ttcn @@ -0,0 +1,79 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:6.5.4, Verify that the date type shall be translated to TTCN-3 using the pattern-restricted charstring + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_060504_date_004 { + + import from schema_Pos_060504_date_004 language "XSD" all; + + template E1 m_msg := "2004-04-12Z"; + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_060504_date_004() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_060504_date_004.xml", { "Pos_060504_date_004.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_060504_date_004(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/06_built_in_data_types/0605_time_types/060504_date/Pos_060504_date_004/Pos_060504_date_004.xml b/ATS/xml/06_built_in_data_types/0605_time_types/060504_date/Pos_060504_date_004/Pos_060504_date_004.xml new file mode 100644 index 00000000..34d9bba3 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0605_time_types/060504_date/Pos_060504_date_004/Pos_060504_date_004.xml @@ -0,0 +1,4 @@ + +2004-04-12Z diff --git a/ATS/xml/06_built_in_data_types/0605_time_types/060504_date/Pos_060504_date_004/Pos_060504_date_004.xsd b/ATS/xml/06_built_in_data_types/0605_time_types/060504_date/Pos_060504_date_004/Pos_060504_date_004.xsd new file mode 100644 index 00000000..a55a9752 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0605_time_types/060504_date/Pos_060504_date_004/Pos_060504_date_004.xsd @@ -0,0 +1,9 @@ + + + + + + + diff --git a/ATS/xml/06_built_in_data_types/0605_time_types/060505_gregorian_year_and_month/Neg_060505_gregorian_year_and_month_001/Neg_060505_gregorian_year_and_month_001.ttcn b/ATS/xml/06_built_in_data_types/0605_time_types/060505_gregorian_year_and_month/Neg_060505_gregorian_year_and_month_001/Neg_060505_gregorian_year_and_month_001.ttcn new file mode 100644 index 00000000..cb9fa3ff --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0605_time_types/060505_gregorian_year_and_month/Neg_060505_gregorian_year_and_month_001/Neg_060505_gregorian_year_and_month_001.ttcn @@ -0,0 +1,46 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:6.5.5, Verify that the gYearMonth type shall be translated to TTCN-3 using the pattern-restricted charstring + ** @verdict pass reject + ***************************************************/ +module Neg_060505_gregorian_year_and_month_001 { + + import from schema_Neg_060505_gregorian_year_and_month_001 language "XSD" all; + + template E1 m_msg := "99-04"; //wrong format + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type port P message { + inout all; + } + + type component C { + port P p; + } + + testcase TC_Neg_060505_gregorian_year_and_month_001() runs on C system C { + map(self:p, system:p); + + // encode the message + p.send(m_msg); + log("template should either be rejected by compiler or by runtime latest while encoding"); + + setverdict(fail, "Invalid template should not be encoded"); + + unmap(self:p, system:p); + } + + control { + execute(TC_Neg_060505_gregorian_year_and_month_001(), PX_TC_EXECUTION_TIMEOUT); + } + +} + diff --git a/ATS/xml/06_built_in_data_types/0605_time_types/060505_gregorian_year_and_month/Neg_060505_gregorian_year_and_month_001/Neg_060505_gregorian_year_and_month_001.xsd b/ATS/xml/06_built_in_data_types/0605_time_types/060505_gregorian_year_and_month/Neg_060505_gregorian_year_and_month_001/Neg_060505_gregorian_year_and_month_001.xsd new file mode 100644 index 00000000..137615fe --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0605_time_types/060505_gregorian_year_and_month/Neg_060505_gregorian_year_and_month_001/Neg_060505_gregorian_year_and_month_001.xsd @@ -0,0 +1,9 @@ + + + + + + + diff --git a/ATS/xml/06_built_in_data_types/0605_time_types/060505_gregorian_year_and_month/Neg_060505_gregorian_year_and_month_002/Neg_060505_gregorian_year_and_month_002.ttcn b/ATS/xml/06_built_in_data_types/0605_time_types/060505_gregorian_year_and_month/Neg_060505_gregorian_year_and_month_002/Neg_060505_gregorian_year_and_month_002.ttcn new file mode 100644 index 00000000..4ccf8b45 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0605_time_types/060505_gregorian_year_and_month/Neg_060505_gregorian_year_and_month_002/Neg_060505_gregorian_year_and_month_002.ttcn @@ -0,0 +1,45 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:6.5.5, Verify that the gYearMonth type shall be translated to TTCN-3 using the pattern-restricted charstring + ** @verdict pass reject + ***************************************************/ +module Neg_060505_gregorian_year_and_month_002 { + + import from schema_Neg_060505_gregorian_year_and_month_002 language "XSD" all; + + template E1 m_msg := "2014"; //wrong format + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type port P message { + inout all; + } + + type component C { + port P p; + } + + testcase TC_Neg_060505_gregorian_year_and_month_002() runs on C system C { + map(self:p, system:p); + + // encode the message + p.send(m_msg); + log("template should either be rejected by compiler or by runtime latest while encoding"); + + setverdict(fail, "Invalid template should not be encoded"); + + unmap(self:p, system:p); + } + + control { + execute(TC_Neg_060505_gregorian_year_and_month_002(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/06_built_in_data_types/0605_time_types/060505_gregorian_year_and_month/Neg_060505_gregorian_year_and_month_002/Neg_060505_gregorian_year_and_month_002.xsd b/ATS/xml/06_built_in_data_types/0605_time_types/060505_gregorian_year_and_month/Neg_060505_gregorian_year_and_month_002/Neg_060505_gregorian_year_and_month_002.xsd new file mode 100644 index 00000000..bfcc3be0 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0605_time_types/060505_gregorian_year_and_month/Neg_060505_gregorian_year_and_month_002/Neg_060505_gregorian_year_and_month_002.xsd @@ -0,0 +1,9 @@ + + + + + + + diff --git a/ATS/xml/06_built_in_data_types/0605_time_types/060505_gregorian_year_and_month/Neg_060505_gregorian_year_and_month_003/Neg_060505_gregorian_year_and_month_003.ttcn b/ATS/xml/06_built_in_data_types/0605_time_types/060505_gregorian_year_and_month/Neg_060505_gregorian_year_and_month_003/Neg_060505_gregorian_year_and_month_003.ttcn new file mode 100644 index 00000000..65739257 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0605_time_types/060505_gregorian_year_and_month/Neg_060505_gregorian_year_and_month_003/Neg_060505_gregorian_year_and_month_003.ttcn @@ -0,0 +1,45 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:6.5.5, Verify that the gYearMonth type shall be translated to TTCN-3 using the pattern-restricted charstring + ** @verdict pass reject + ***************************************************/ +module Neg_060505_gregorian_year_and_month_003 { + + import from schema_Neg_060505_gregorian_year_and_month_003 language "XSD" all; + + template E1 m_msg := "2004-4"; //wrong format + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type port P message { + inout all; + } + + type component C { + port P p; + } + + testcase TC_Neg_060505_gregorian_year_and_month_003() runs on C system C { + map(self:p, system:p); + + // encode the message + p.send(m_msg); + log("template should either be rejected by compiler or by runtime latest while encoding"); + + setverdict(fail, "Invalid template should not be encoded"); + + unmap(self:p, system:p); + } + + control { + execute(TC_Neg_060505_gregorian_year_and_month_003(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/06_built_in_data_types/0605_time_types/060505_gregorian_year_and_month/Neg_060505_gregorian_year_and_month_003/Neg_060505_gregorian_year_and_month_003.xsd b/ATS/xml/06_built_in_data_types/0605_time_types/060505_gregorian_year_and_month/Neg_060505_gregorian_year_and_month_003/Neg_060505_gregorian_year_and_month_003.xsd new file mode 100644 index 00000000..17a002fc --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0605_time_types/060505_gregorian_year_and_month/Neg_060505_gregorian_year_and_month_003/Neg_060505_gregorian_year_and_month_003.xsd @@ -0,0 +1,9 @@ + + + + + + + diff --git a/ATS/xml/06_built_in_data_types/0605_time_types/060505_gregorian_year_and_month/Neg_060505_gregorian_year_and_month_004/Neg_060505_gregorian_year_and_month_004.ttcn b/ATS/xml/06_built_in_data_types/0605_time_types/060505_gregorian_year_and_month/Neg_060505_gregorian_year_and_month_004/Neg_060505_gregorian_year_and_month_004.ttcn new file mode 100644 index 00000000..80f43a00 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0605_time_types/060505_gregorian_year_and_month/Neg_060505_gregorian_year_and_month_004/Neg_060505_gregorian_year_and_month_004.ttcn @@ -0,0 +1,45 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:6.5.5, Verify that the gYearMonth type shall be translated to TTCN-3 using the pattern-restricted charstring + ** @verdict pass reject + ***************************************************/ +module Neg_060505_gregorian_year_and_month_004 { + + import from schema_Neg_060505_gregorian_year_and_month_004 language "XSD" all; + + template E1 m_msg := "2004-13"; //wrong format + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type port P message { + inout all; + } + + type component C { + port P p; + } + + testcase TC_Neg_060505_gregorian_year_and_month_004() runs on C system C { + map(self:p, system:p); + + // encode the message + p.send(m_msg); + log("template should either be rejected by compiler or by runtime latest while encoding"); + + setverdict(fail, "Invalid template should not be encoded"); + + unmap(self:p, system:p); + } + + control { + execute(TC_Neg_060505_gregorian_year_and_month_004(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/06_built_in_data_types/0605_time_types/060505_gregorian_year_and_month/Neg_060505_gregorian_year_and_month_004/Neg_060505_gregorian_year_and_month_004.xsd b/ATS/xml/06_built_in_data_types/0605_time_types/060505_gregorian_year_and_month/Neg_060505_gregorian_year_and_month_004/Neg_060505_gregorian_year_and_month_004.xsd new file mode 100644 index 00000000..21d0872a --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0605_time_types/060505_gregorian_year_and_month/Neg_060505_gregorian_year_and_month_004/Neg_060505_gregorian_year_and_month_004.xsd @@ -0,0 +1,9 @@ + + + + + + + diff --git a/ATS/xml/06_built_in_data_types/0605_time_types/060505_gregorian_year_and_month/Pos_060505_gregorian_year_and_month_001/Pos_060505_gregorian_year_and_month_001.ttcn b/ATS/xml/06_built_in_data_types/0605_time_types/060505_gregorian_year_and_month/Pos_060505_gregorian_year_and_month_001/Pos_060505_gregorian_year_and_month_001.ttcn new file mode 100644 index 00000000..2d0d2612 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0605_time_types/060505_gregorian_year_and_month/Pos_060505_gregorian_year_and_month_001/Pos_060505_gregorian_year_and_month_001.ttcn @@ -0,0 +1,80 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:6.5.5, Verify that the gYearMonth type shall be translated to TTCN-3 using the pattern-restricted charstring + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_060505_gregorian_year_and_month_001 { + + import from schema_Pos_060505_gregorian_year_and_month_001 language "XSD" all; + + template E1 m_msg := "2014-04"; + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_060505_gregorian_year_and_month_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_060505_gregorian_year_and_month_001.xml", { "Pos_060505_gregorian_year_and_month_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_060505_gregorian_year_and_month_001(), PX_TC_EXECUTION_TIMEOUT); + } + +} + diff --git a/ATS/xml/06_built_in_data_types/0605_time_types/060505_gregorian_year_and_month/Pos_060505_gregorian_year_and_month_001/Pos_060505_gregorian_year_and_month_001.xml b/ATS/xml/06_built_in_data_types/0605_time_types/060505_gregorian_year_and_month/Pos_060505_gregorian_year_and_month_001/Pos_060505_gregorian_year_and_month_001.xml new file mode 100644 index 00000000..741c3ea9 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0605_time_types/060505_gregorian_year_and_month/Pos_060505_gregorian_year_and_month_001/Pos_060505_gregorian_year_and_month_001.xml @@ -0,0 +1,4 @@ + +2014-04 diff --git a/ATS/xml/06_built_in_data_types/0605_time_types/060505_gregorian_year_and_month/Pos_060505_gregorian_year_and_month_001/Pos_060505_gregorian_year_and_month_001.xsd b/ATS/xml/06_built_in_data_types/0605_time_types/060505_gregorian_year_and_month/Pos_060505_gregorian_year_and_month_001/Pos_060505_gregorian_year_and_month_001.xsd new file mode 100644 index 00000000..e1baf568 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0605_time_types/060505_gregorian_year_and_month/Pos_060505_gregorian_year_and_month_001/Pos_060505_gregorian_year_and_month_001.xsd @@ -0,0 +1,9 @@ + + + + + + + diff --git a/ATS/xml/06_built_in_data_types/0605_time_types/060505_gregorian_year_and_month/Pos_060505_gregorian_year_and_month_002/Pos_060505_gregorian_year_and_month_002.ttcn b/ATS/xml/06_built_in_data_types/0605_time_types/060505_gregorian_year_and_month/Pos_060505_gregorian_year_and_month_002/Pos_060505_gregorian_year_and_month_002.ttcn new file mode 100644 index 00000000..b14d3c3c --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0605_time_types/060505_gregorian_year_and_month/Pos_060505_gregorian_year_and_month_002/Pos_060505_gregorian_year_and_month_002.ttcn @@ -0,0 +1,79 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:6.5.5, Verify that the gYearMonth type shall be translated to TTCN-3 using the pattern-restricted charstring + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_060505_gregorian_year_and_month_002 { + + import from schema_Pos_060505_gregorian_year_and_month_002 language "XSD" all; + + template E1 m_msg := "2014-04-05:00"; + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_060505_gregorian_year_and_month_002() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_060505_gregorian_year_and_month_002.xml", { "Pos_060505_gregorian_year_and_month_002.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_060505_gregorian_year_and_month_002(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/06_built_in_data_types/0605_time_types/060505_gregorian_year_and_month/Pos_060505_gregorian_year_and_month_002/Pos_060505_gregorian_year_and_month_002.xml b/ATS/xml/06_built_in_data_types/0605_time_types/060505_gregorian_year_and_month/Pos_060505_gregorian_year_and_month_002/Pos_060505_gregorian_year_and_month_002.xml new file mode 100644 index 00000000..51a294c6 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0605_time_types/060505_gregorian_year_and_month/Pos_060505_gregorian_year_and_month_002/Pos_060505_gregorian_year_and_month_002.xml @@ -0,0 +1,4 @@ + +2014-04-05:00 diff --git a/ATS/xml/06_built_in_data_types/0605_time_types/060505_gregorian_year_and_month/Pos_060505_gregorian_year_and_month_002/Pos_060505_gregorian_year_and_month_002.xsd b/ATS/xml/06_built_in_data_types/0605_time_types/060505_gregorian_year_and_month/Pos_060505_gregorian_year_and_month_002/Pos_060505_gregorian_year_and_month_002.xsd new file mode 100644 index 00000000..8ca66a62 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0605_time_types/060505_gregorian_year_and_month/Pos_060505_gregorian_year_and_month_002/Pos_060505_gregorian_year_and_month_002.xsd @@ -0,0 +1,9 @@ + + + + + + + diff --git a/ATS/xml/06_built_in_data_types/0605_time_types/060506_gregorian_year/Neg_060506_gregorian_year_001/Neg_060506_gregorian_year_001.ttcn b/ATS/xml/06_built_in_data_types/0605_time_types/060506_gregorian_year/Neg_060506_gregorian_year_001/Neg_060506_gregorian_year_001.ttcn new file mode 100644 index 00000000..25c0c1cb --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0605_time_types/060506_gregorian_year/Neg_060506_gregorian_year_001/Neg_060506_gregorian_year_001.ttcn @@ -0,0 +1,45 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:6.5.6, Verify that the gYear type shall be translated to TTCN-3 using the pattern-restricted charstring + ** @verdict pass reject + ***************************************************/ +module Neg_060506_gregorian_year_001 { + + import from schema_Neg_060506_gregorian_year_001 language "XSD" all; + + template E1 m_msg := "99"; + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type port P message { + inout all; + } + + type component C { + port P p; + } + + testcase TC_Neg_060506_gregorian_year_001() runs on C system C { + map(self:p, system:p); + + // encode the message + p.send(m_msg); + log("template should either be rejected by compiler or by runtime latest while encoding"); + + setverdict(fail, "Invalid template should not be encoded"); + + unmap(self:p, system:p); + } + + control { + execute(TC_Neg_060506_gregorian_year_001(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/06_built_in_data_types/0605_time_types/060506_gregorian_year/Neg_060506_gregorian_year_001/Neg_060506_gregorian_year_001.xsd b/ATS/xml/06_built_in_data_types/0605_time_types/060506_gregorian_year/Neg_060506_gregorian_year_001/Neg_060506_gregorian_year_001.xsd new file mode 100644 index 00000000..66463d68 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0605_time_types/060506_gregorian_year/Neg_060506_gregorian_year_001/Neg_060506_gregorian_year_001.xsd @@ -0,0 +1,9 @@ + + + + + + + diff --git a/ATS/xml/06_built_in_data_types/0605_time_types/060506_gregorian_year/Pos_060506_gregorian_year_001/Pos_060506_gregorian_year_001.ttcn b/ATS/xml/06_built_in_data_types/0605_time_types/060506_gregorian_year/Pos_060506_gregorian_year_001/Pos_060506_gregorian_year_001.ttcn new file mode 100644 index 00000000..581ce5f7 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0605_time_types/060506_gregorian_year/Pos_060506_gregorian_year_001/Pos_060506_gregorian_year_001.ttcn @@ -0,0 +1,79 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:6.5.6, Verify that the gYear type shall be translated to TTCN-3 using the pattern-restricted charstring + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_060506_gregorian_year_001 { + + import from schema_Pos_060506_gregorian_year_001 language "XSD" all; + + template E1 m_msg := "2014"; + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_060506_gregorian_year_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_060506_gregorian_year_001.xml", { "Pos_060506_gregorian_year_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_060506_gregorian_year_001(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/06_built_in_data_types/0605_time_types/060506_gregorian_year/Pos_060506_gregorian_year_001/Pos_060506_gregorian_year_001.xml b/ATS/xml/06_built_in_data_types/0605_time_types/060506_gregorian_year/Pos_060506_gregorian_year_001/Pos_060506_gregorian_year_001.xml new file mode 100644 index 00000000..cb498fba --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0605_time_types/060506_gregorian_year/Pos_060506_gregorian_year_001/Pos_060506_gregorian_year_001.xml @@ -0,0 +1,4 @@ + +2014 diff --git a/ATS/xml/06_built_in_data_types/0605_time_types/060506_gregorian_year/Pos_060506_gregorian_year_001/Pos_060506_gregorian_year_001.xsd b/ATS/xml/06_built_in_data_types/0605_time_types/060506_gregorian_year/Pos_060506_gregorian_year_001/Pos_060506_gregorian_year_001.xsd new file mode 100644 index 00000000..4d6ceab6 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0605_time_types/060506_gregorian_year/Pos_060506_gregorian_year_001/Pos_060506_gregorian_year_001.xsd @@ -0,0 +1,9 @@ + + + + + + + diff --git a/ATS/xml/06_built_in_data_types/0605_time_types/060506_gregorian_year/Pos_060506_gregorian_year_002/Pos_060506_gregorian_year_002.ttcn b/ATS/xml/06_built_in_data_types/0605_time_types/060506_gregorian_year/Pos_060506_gregorian_year_002/Pos_060506_gregorian_year_002.ttcn new file mode 100644 index 00000000..da589554 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0605_time_types/060506_gregorian_year/Pos_060506_gregorian_year_002/Pos_060506_gregorian_year_002.ttcn @@ -0,0 +1,79 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:6.5.6, Verify that the gYear type shall be translated to TTCN-3 using the pattern-restricted charstring + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_060506_gregorian_year_002 { + + import from schema_Pos_060506_gregorian_year_002 language "XSD" all; + + template E1 m_msg := "2014+01:00"; + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_060506_gregorian_year_002() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_060506_gregorian_year_002.xml", { "Pos_060506_gregorian_year_002.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_060506_gregorian_year_002(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/06_built_in_data_types/0605_time_types/060506_gregorian_year/Pos_060506_gregorian_year_002/Pos_060506_gregorian_year_002.xml b/ATS/xml/06_built_in_data_types/0605_time_types/060506_gregorian_year/Pos_060506_gregorian_year_002/Pos_060506_gregorian_year_002.xml new file mode 100644 index 00000000..f31cdce5 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0605_time_types/060506_gregorian_year/Pos_060506_gregorian_year_002/Pos_060506_gregorian_year_002.xml @@ -0,0 +1,4 @@ + +2014+01:00 diff --git a/ATS/xml/06_built_in_data_types/0605_time_types/060506_gregorian_year/Pos_060506_gregorian_year_002/Pos_060506_gregorian_year_002.xsd b/ATS/xml/06_built_in_data_types/0605_time_types/060506_gregorian_year/Pos_060506_gregorian_year_002/Pos_060506_gregorian_year_002.xsd new file mode 100644 index 00000000..d3e21c4a --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0605_time_types/060506_gregorian_year/Pos_060506_gregorian_year_002/Pos_060506_gregorian_year_002.xsd @@ -0,0 +1,9 @@ + + + + + + + diff --git a/ATS/xml/06_built_in_data_types/0605_time_types/060506_gregorian_year/Pos_060506_gregorian_year_003/Pos_060506_gregorian_year_003.ttcn b/ATS/xml/06_built_in_data_types/0605_time_types/060506_gregorian_year/Pos_060506_gregorian_year_003/Pos_060506_gregorian_year_003.ttcn new file mode 100644 index 00000000..c8aa135b --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0605_time_types/060506_gregorian_year/Pos_060506_gregorian_year_003/Pos_060506_gregorian_year_003.ttcn @@ -0,0 +1,80 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:6.5.6, Verify that the gYear allows positive years greater than 9999 + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_060506_gregorian_year_003 { + + import from schema_Pos_060506_gregorian_year_003 language "XSD" all; + + template E1 m_msg := "12004"; + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_060506_gregorian_year_003() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_060506_gregorian_year_003.xml", { "Pos_060506_gregorian_year_003.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_060506_gregorian_year_003(), PX_TC_EXECUTION_TIMEOUT); + } + +} + diff --git a/ATS/xml/06_built_in_data_types/0605_time_types/060506_gregorian_year/Pos_060506_gregorian_year_003/Pos_060506_gregorian_year_003.xml b/ATS/xml/06_built_in_data_types/0605_time_types/060506_gregorian_year/Pos_060506_gregorian_year_003/Pos_060506_gregorian_year_003.xml new file mode 100644 index 00000000..4dfd21f3 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0605_time_types/060506_gregorian_year/Pos_060506_gregorian_year_003/Pos_060506_gregorian_year_003.xml @@ -0,0 +1,4 @@ + +12004 diff --git a/ATS/xml/06_built_in_data_types/0605_time_types/060506_gregorian_year/Pos_060506_gregorian_year_003/Pos_060506_gregorian_year_003.xsd b/ATS/xml/06_built_in_data_types/0605_time_types/060506_gregorian_year/Pos_060506_gregorian_year_003/Pos_060506_gregorian_year_003.xsd new file mode 100644 index 00000000..cf2e1e22 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0605_time_types/060506_gregorian_year/Pos_060506_gregorian_year_003/Pos_060506_gregorian_year_003.xsd @@ -0,0 +1,9 @@ + + + + + + + diff --git a/ATS/xml/06_built_in_data_types/0605_time_types/060506_gregorian_year/Pos_060506_gregorian_year_004/Pos_060506_gregorian_year_004.ttcn b/ATS/xml/06_built_in_data_types/0605_time_types/060506_gregorian_year/Pos_060506_gregorian_year_004/Pos_060506_gregorian_year_004.ttcn new file mode 100644 index 00000000..f8625c25 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0605_time_types/060506_gregorian_year/Pos_060506_gregorian_year_004/Pos_060506_gregorian_year_004.ttcn @@ -0,0 +1,79 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:6.5.6, Verify that the gYear type shall be translated to TTCN-3 using the pattern-restricted charstring + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_060506_gregorian_year_004 { + + import from schema_Pos_060506_gregorian_year_004 language "XSD" all; + + template E1 m_msg := "0922"; + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_060506_gregorian_year_004() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_060506_gregorian_year_004.xml", { "Pos_060506_gregorian_year_004.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_060506_gregorian_year_004(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/06_built_in_data_types/0605_time_types/060506_gregorian_year/Pos_060506_gregorian_year_004/Pos_060506_gregorian_year_004.xml b/ATS/xml/06_built_in_data_types/0605_time_types/060506_gregorian_year/Pos_060506_gregorian_year_004/Pos_060506_gregorian_year_004.xml new file mode 100644 index 00000000..4e442b9d --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0605_time_types/060506_gregorian_year/Pos_060506_gregorian_year_004/Pos_060506_gregorian_year_004.xml @@ -0,0 +1,4 @@ + +0922 diff --git a/ATS/xml/06_built_in_data_types/0605_time_types/060506_gregorian_year/Pos_060506_gregorian_year_004/Pos_060506_gregorian_year_004.xsd b/ATS/xml/06_built_in_data_types/0605_time_types/060506_gregorian_year/Pos_060506_gregorian_year_004/Pos_060506_gregorian_year_004.xsd new file mode 100644 index 00000000..aaefd2fa --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0605_time_types/060506_gregorian_year/Pos_060506_gregorian_year_004/Pos_060506_gregorian_year_004.xsd @@ -0,0 +1,9 @@ + + + + + + + diff --git a/ATS/xml/06_built_in_data_types/0605_time_types/060506_gregorian_year/Pos_060506_gregorian_year_005/Pos_060506_gregorian_year_005.ttcn b/ATS/xml/06_built_in_data_types/0605_time_types/060506_gregorian_year/Pos_060506_gregorian_year_005/Pos_060506_gregorian_year_005.ttcn new file mode 100644 index 00000000..188998f4 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0605_time_types/060506_gregorian_year/Pos_060506_gregorian_year_005/Pos_060506_gregorian_year_005.ttcn @@ -0,0 +1,79 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:6.5.6, Verify that the gYear accepts negative years + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_060506_gregorian_year_005 { + + import from schema_Pos_060506_gregorian_year_005 language "XSD" all; + + template E1 m_msg := "-0045"; + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_060506_gregorian_year_005() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_060506_gregorian_year_005.xml", { "Pos_060506_gregorian_year_005.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_060506_gregorian_year_005(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/06_built_in_data_types/0605_time_types/060506_gregorian_year/Pos_060506_gregorian_year_005/Pos_060506_gregorian_year_005.xml b/ATS/xml/06_built_in_data_types/0605_time_types/060506_gregorian_year/Pos_060506_gregorian_year_005/Pos_060506_gregorian_year_005.xml new file mode 100644 index 00000000..343f27b4 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0605_time_types/060506_gregorian_year/Pos_060506_gregorian_year_005/Pos_060506_gregorian_year_005.xml @@ -0,0 +1,4 @@ + +-0045 diff --git a/ATS/xml/06_built_in_data_types/0605_time_types/060506_gregorian_year/Pos_060506_gregorian_year_005/Pos_060506_gregorian_year_005.xsd b/ATS/xml/06_built_in_data_types/0605_time_types/060506_gregorian_year/Pos_060506_gregorian_year_005/Pos_060506_gregorian_year_005.xsd new file mode 100644 index 00000000..675e9107 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0605_time_types/060506_gregorian_year/Pos_060506_gregorian_year_005/Pos_060506_gregorian_year_005.xsd @@ -0,0 +1,9 @@ + + + + + + + diff --git a/ATS/xml/06_built_in_data_types/0605_time_types/060506_gregorian_year/Pos_060506_gregorian_year_006/Pos_060506_gregorian_year_006.ttcn b/ATS/xml/06_built_in_data_types/0605_time_types/060506_gregorian_year/Pos_060506_gregorian_year_006/Pos_060506_gregorian_year_006.ttcn new file mode 100644 index 00000000..b0d00ba5 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0605_time_types/060506_gregorian_year/Pos_060506_gregorian_year_006/Pos_060506_gregorian_year_006.ttcn @@ -0,0 +1,80 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:6.5.6, Verify that the gYear alows negative year with more than 4 digits + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_060506_gregorian_year_006 { + + import from schema_Pos_060506_gregorian_year_006 language "XSD" all; + + template E1 m_msg := "-210045"; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_060506_gregorian_year_006() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_060506_gregorian_year_006.xml", { "Pos_060506_gregorian_year_006.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_060506_gregorian_year_006(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/06_built_in_data_types/0605_time_types/060506_gregorian_year/Pos_060506_gregorian_year_006/Pos_060506_gregorian_year_006.xml b/ATS/xml/06_built_in_data_types/0605_time_types/060506_gregorian_year/Pos_060506_gregorian_year_006/Pos_060506_gregorian_year_006.xml new file mode 100644 index 00000000..ec64fc29 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0605_time_types/060506_gregorian_year/Pos_060506_gregorian_year_006/Pos_060506_gregorian_year_006.xml @@ -0,0 +1,4 @@ + +-210045 diff --git a/ATS/xml/06_built_in_data_types/0605_time_types/060506_gregorian_year/Pos_060506_gregorian_year_006/Pos_060506_gregorian_year_006.xsd b/ATS/xml/06_built_in_data_types/0605_time_types/060506_gregorian_year/Pos_060506_gregorian_year_006/Pos_060506_gregorian_year_006.xsd new file mode 100644 index 00000000..7bb2952b --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0605_time_types/060506_gregorian_year/Pos_060506_gregorian_year_006/Pos_060506_gregorian_year_006.xsd @@ -0,0 +1,9 @@ + + + + + + + diff --git a/ATS/xml/06_built_in_data_types/0605_time_types/060507_gregorian_month_and_day/Pos_060507_gregorian_month_and_day_001/Pos_060507_gregorian_month_and_day_001.ttcn b/ATS/xml/06_built_in_data_types/0605_time_types/060507_gregorian_month_and_day/Pos_060507_gregorian_month_and_day_001/Pos_060507_gregorian_month_and_day_001.ttcn new file mode 100644 index 00000000..a77bd319 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0605_time_types/060507_gregorian_month_and_day/Pos_060507_gregorian_month_and_day_001/Pos_060507_gregorian_month_and_day_001.ttcn @@ -0,0 +1,79 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 9:6.5.7, Verify mapping of the gMonthDay type + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_060507_gregorian_month_and_day_001 { + + import from schema_Pos_060507_gregorian_month_and_day_001 language "XSD" all; + + template Test m_msg := "--04-05"; + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_060507_gregorian_month_and_day_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_060507_gregorian_month_and_day_001.xml", { "Pos_060507_gregorian_month_and_day_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_060507_gregorian_month_and_day_001(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/06_built_in_data_types/0605_time_types/060507_gregorian_month_and_day/Pos_060507_gregorian_month_and_day_001/Pos_060507_gregorian_month_and_day_001.xml b/ATS/xml/06_built_in_data_types/0605_time_types/060507_gregorian_month_and_day/Pos_060507_gregorian_month_and_day_001/Pos_060507_gregorian_month_and_day_001.xml new file mode 100644 index 00000000..062fc42e --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0605_time_types/060507_gregorian_month_and_day/Pos_060507_gregorian_month_and_day_001/Pos_060507_gregorian_month_and_day_001.xml @@ -0,0 +1,3 @@ + +--04-05 diff --git a/ATS/xml/06_built_in_data_types/0605_time_types/060507_gregorian_month_and_day/Pos_060507_gregorian_month_and_day_001/Pos_060507_gregorian_month_and_day_001.xsd b/ATS/xml/06_built_in_data_types/0605_time_types/060507_gregorian_month_and_day/Pos_060507_gregorian_month_and_day_001/Pos_060507_gregorian_month_and_day_001.xsd new file mode 100644 index 00000000..48a3d30b --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0605_time_types/060507_gregorian_month_and_day/Pos_060507_gregorian_month_and_day_001/Pos_060507_gregorian_month_and_day_001.xsd @@ -0,0 +1,6 @@ + + + + diff --git a/ATS/xml/06_built_in_data_types/0605_time_types/060508_gregorian_day/Pos_060508_gregorian_day_001/Pos_060508_gregorian_day_001.ttcn b/ATS/xml/06_built_in_data_types/0605_time_types/060508_gregorian_day/Pos_060508_gregorian_day_001/Pos_060508_gregorian_day_001.ttcn new file mode 100644 index 00000000..6fea315a --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0605_time_types/060508_gregorian_day/Pos_060508_gregorian_day_001/Pos_060508_gregorian_day_001.ttcn @@ -0,0 +1,79 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 9:6.5.8, Verify mapping of the gDay type + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_060508_gregorian_day_001 { + + import from schema_Pos_060508_gregorian_day_001 language "XSD" all; + + template Test m_msg := "---01+02:00"; + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_060508_gregorian_day_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_060508_gregorian_day_001.xml", { "Pos_060508_gregorian_day_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_060508_gregorian_day_001(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/06_built_in_data_types/0605_time_types/060508_gregorian_day/Pos_060508_gregorian_day_001/Pos_060508_gregorian_day_001.xml b/ATS/xml/06_built_in_data_types/0605_time_types/060508_gregorian_day/Pos_060508_gregorian_day_001/Pos_060508_gregorian_day_001.xml new file mode 100644 index 00000000..e92a2250 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0605_time_types/060508_gregorian_day/Pos_060508_gregorian_day_001/Pos_060508_gregorian_day_001.xml @@ -0,0 +1,3 @@ + +---01+02:00 diff --git a/ATS/xml/06_built_in_data_types/0605_time_types/060508_gregorian_day/Pos_060508_gregorian_day_001/Pos_060508_gregorian_day_001.xsd b/ATS/xml/06_built_in_data_types/0605_time_types/060508_gregorian_day/Pos_060508_gregorian_day_001/Pos_060508_gregorian_day_001.xsd new file mode 100644 index 00000000..a9ad42ec --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0605_time_types/060508_gregorian_day/Pos_060508_gregorian_day_001/Pos_060508_gregorian_day_001.xsd @@ -0,0 +1,6 @@ + + + + diff --git a/ATS/xml/06_built_in_data_types/0605_time_types/060509_gregorian_month/Pos_060509_gregorian_month_001/Pos_060509_gregorian_month_001.ttcn b/ATS/xml/06_built_in_data_types/0605_time_types/060509_gregorian_month/Pos_060509_gregorian_month_001/Pos_060509_gregorian_month_001.ttcn new file mode 100644 index 00000000..91cc7d64 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0605_time_types/060509_gregorian_month/Pos_060509_gregorian_month_001/Pos_060509_gregorian_month_001.ttcn @@ -0,0 +1,79 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 9:6.5.9, Verify mapping of the gMonth type + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_060509_gregorian_month_001 { + + import from schema_Pos_060509_gregorian_month_001 language "XSD" all; + + template Test m_msg := "--11Z"; + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_060509_gregorian_month_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_060509_gregorian_month_001.xml", { "Pos_060509_gregorian_month_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_060509_gregorian_month_001(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/06_built_in_data_types/0605_time_types/060509_gregorian_month/Pos_060509_gregorian_month_001/Pos_060509_gregorian_month_001.xml b/ATS/xml/06_built_in_data_types/0605_time_types/060509_gregorian_month/Pos_060509_gregorian_month_001/Pos_060509_gregorian_month_001.xml new file mode 100644 index 00000000..aa4b9c77 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0605_time_types/060509_gregorian_month/Pos_060509_gregorian_month_001/Pos_060509_gregorian_month_001.xml @@ -0,0 +1,3 @@ + +--11Z diff --git a/ATS/xml/06_built_in_data_types/0605_time_types/060509_gregorian_month/Pos_060509_gregorian_month_001/Pos_060509_gregorian_month_001.xsd b/ATS/xml/06_built_in_data_types/0605_time_types/060509_gregorian_month/Pos_060509_gregorian_month_001/Pos_060509_gregorian_month_001.xsd new file mode 100644 index 00000000..55e1645e --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0605_time_types/060509_gregorian_month/Pos_060509_gregorian_month_001/Pos_060509_gregorian_month_001.xsd @@ -0,0 +1,6 @@ + + + + diff --git a/ATS/xml/06_built_in_data_types/0606_sequence_types/060601_nmtokens/Pos_060601_nmtokens_001/Pos_060601_nmtokens_001.ttcn b/ATS/xml/06_built_in_data_types/0606_sequence_types/060601_nmtokens/Pos_060601_nmtokens_001/Pos_060601_nmtokens_001.ttcn new file mode 100644 index 00000000..e7228b72 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0606_sequence_types/060601_nmtokens/Pos_060601_nmtokens_001/Pos_060601_nmtokens_001.ttcn @@ -0,0 +1,79 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 9:6.6.1, Verify mapping of a NMTOKENS type + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_060601_nmtokens_001 { + + import from schema_Pos_060601_nmtokens_001 language "XSD" all; + + template Test m_msg := { "brought", "classical", "music", "to", "the", "Peanuts", "strip" }; + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_060601_nmtokens_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_060601_nmtokens_001.xml", { "Pos_060601_nmtokens_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_060601_nmtokens_001(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/06_built_in_data_types/0606_sequence_types/060601_nmtokens/Pos_060601_nmtokens_001/Pos_060601_nmtokens_001.xml b/ATS/xml/06_built_in_data_types/0606_sequence_types/060601_nmtokens/Pos_060601_nmtokens_001/Pos_060601_nmtokens_001.xml new file mode 100644 index 00000000..259e92c8 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0606_sequence_types/060601_nmtokens/Pos_060601_nmtokens_001/Pos_060601_nmtokens_001.xml @@ -0,0 +1,3 @@ + +brought classical music to the Peanuts strip diff --git a/ATS/xml/06_built_in_data_types/0606_sequence_types/060601_nmtokens/Pos_060601_nmtokens_001/Pos_060601_nmtokens_001.xsd b/ATS/xml/06_built_in_data_types/0606_sequence_types/060601_nmtokens/Pos_060601_nmtokens_001/Pos_060601_nmtokens_001.xsd new file mode 100644 index 00000000..076f84a8 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0606_sequence_types/060601_nmtokens/Pos_060601_nmtokens_001/Pos_060601_nmtokens_001.xsd @@ -0,0 +1,6 @@ + + + + diff --git a/ATS/xml/06_built_in_data_types/0606_sequence_types/060602_idrefs/Pos_060602_idrefs_001/Pos_060602_idrefs_001.ttcn b/ATS/xml/06_built_in_data_types/0606_sequence_types/060602_idrefs/Pos_060602_idrefs_001/Pos_060602_idrefs_001.ttcn new file mode 100644 index 00000000..45215459 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0606_sequence_types/060602_idrefs/Pos_060602_idrefs_001/Pos_060602_idrefs_001.ttcn @@ -0,0 +1,82 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 9:6.6.2, Verify mapping of a IDREFS type + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_060602_idrefs_001 { + + import from schema_Pos_060602_idrefs_001 language "XSD" all; + + template Test m_msg := { + item_list := { "abc", "def", "ghi" }, + itemrefs := { "ghi", "def", "abc" } + } + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_060602_idrefs_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_060602_idrefs_001.xml", { "Pos_060602_idrefs_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_060602_idrefs_001(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/06_built_in_data_types/0606_sequence_types/060602_idrefs/Pos_060602_idrefs_001/Pos_060602_idrefs_001.xml b/ATS/xml/06_built_in_data_types/0606_sequence_types/060602_idrefs/Pos_060602_idrefs_001/Pos_060602_idrefs_001.xml new file mode 100644 index 00000000..368c97bd --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0606_sequence_types/060602_idrefs/Pos_060602_idrefs_001/Pos_060602_idrefs_001.xml @@ -0,0 +1,8 @@ + + + abc + def + ghi + ghi def abc + diff --git a/ATS/xml/06_built_in_data_types/0606_sequence_types/060602_idrefs/Pos_060602_idrefs_001/Pos_060602_idrefs_001.xsd b/ATS/xml/06_built_in_data_types/0606_sequence_types/060602_idrefs/Pos_060602_idrefs_001/Pos_060602_idrefs_001.xsd new file mode 100644 index 00000000..74b71ba9 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0606_sequence_types/060602_idrefs/Pos_060602_idrefs_001/Pos_060602_idrefs_001.xsd @@ -0,0 +1,13 @@ + + + + + + + + + + + diff --git a/ATS/xml/06_built_in_data_types/0606_sequence_types/060604_qname/Pos_060604_qname_001/Pos_060604_qname_001.ttcn b/ATS/xml/06_built_in_data_types/0606_sequence_types/060604_qname/Pos_060604_qname_001/Pos_060604_qname_001.ttcn new file mode 100644 index 00000000..4ffc929a --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0606_sequence_types/060604_qname/Pos_060604_qname_001/Pos_060604_qname_001.ttcn @@ -0,0 +1,82 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 9:6.6.4, Verify mapping of the QName type + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_060604_qname_001 { + + import from schema_Pos_060604_qname_001 language "XSD" all; + + template Test m_msg := { + uri := "schema:Pos_060604_qname_001", + name := "test" + }; + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_060604_qname_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_060604_qname_001.xml", { "Pos_060604_qname_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_060604_qname_001(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/06_built_in_data_types/0606_sequence_types/060604_qname/Pos_060604_qname_001/Pos_060604_qname_001.xml b/ATS/xml/06_built_in_data_types/0606_sequence_types/060604_qname/Pos_060604_qname_001/Pos_060604_qname_001.xml new file mode 100644 index 00000000..c6b10ec8 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0606_sequence_types/060604_qname/Pos_060604_qname_001/Pos_060604_qname_001.xml @@ -0,0 +1,3 @@ + +ns:test diff --git a/ATS/xml/06_built_in_data_types/0606_sequence_types/060604_qname/Pos_060604_qname_001/Pos_060604_qname_001.xsd b/ATS/xml/06_built_in_data_types/0606_sequence_types/060604_qname/Pos_060604_qname_001/Pos_060604_qname_001.xsd new file mode 100644 index 00000000..1c7b4836 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0606_sequence_types/060604_qname/Pos_060604_qname_001/Pos_060604_qname_001.xsd @@ -0,0 +1,6 @@ + + + + diff --git a/ATS/xml/06_built_in_data_types/0607_boolean_type/Pos_0607_boolean_type_001/Pos_0607_boolean_type_001.ttcn b/ATS/xml/06_built_in_data_types/0607_boolean_type/Pos_0607_boolean_type_001/Pos_0607_boolean_type_001.ttcn new file mode 100644 index 00000000..c0e3a045 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0607_boolean_type/Pos_0607_boolean_type_001/Pos_0607_boolean_type_001.ttcn @@ -0,0 +1,79 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:6.7, Verify that the XSD boolean type shall be mapped to the TTCN-3 boolean type + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_0607_boolean_type_001 { + + import from schema_Pos_0607_boolean_type_001 language "XSD" all; + + template E1 m_msg := true; + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_0607_boolean_type_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_0607_boolean_type_001.xml", { "Pos_0607_boolean_type_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_0607_boolean_type_001(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/06_built_in_data_types/0607_boolean_type/Pos_0607_boolean_type_001/Pos_0607_boolean_type_001.xml b/ATS/xml/06_built_in_data_types/0607_boolean_type/Pos_0607_boolean_type_001/Pos_0607_boolean_type_001.xml new file mode 100644 index 00000000..8e010512 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0607_boolean_type/Pos_0607_boolean_type_001/Pos_0607_boolean_type_001.xml @@ -0,0 +1,4 @@ + +true diff --git a/ATS/xml/06_built_in_data_types/0607_boolean_type/Pos_0607_boolean_type_001/Pos_0607_boolean_type_001.xsd b/ATS/xml/06_built_in_data_types/0607_boolean_type/Pos_0607_boolean_type_001/Pos_0607_boolean_type_001.xsd new file mode 100644 index 00000000..1b17dfeb --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0607_boolean_type/Pos_0607_boolean_type_001/Pos_0607_boolean_type_001.xsd @@ -0,0 +1,9 @@ + + + + + + + diff --git a/ATS/xml/06_built_in_data_types/0607_boolean_type/Pos_0607_boolean_type_002/Pos_0607_boolean_type_002.ttcn b/ATS/xml/06_built_in_data_types/0607_boolean_type/Pos_0607_boolean_type_002/Pos_0607_boolean_type_002.ttcn new file mode 100644 index 00000000..0a0534ee --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0607_boolean_type/Pos_0607_boolean_type_002/Pos_0607_boolean_type_002.ttcn @@ -0,0 +1,79 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:6.7, Verify that the XSD boolean type shall be mapped to the TTCN-3 boolean type + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_0607_boolean_type_002 { + + import from schema_Pos_0607_boolean_type_002 language "XSD" all; + + template E1 m_msg := false; + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_0607_boolean_type_002() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_0607_boolean_type_002.xml", { "Pos_0607_boolean_type_002.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_0607_boolean_type_002(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/06_built_in_data_types/0607_boolean_type/Pos_0607_boolean_type_002/Pos_0607_boolean_type_002.xml b/ATS/xml/06_built_in_data_types/0607_boolean_type/Pos_0607_boolean_type_002/Pos_0607_boolean_type_002.xml new file mode 100644 index 00000000..a21d6bd6 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0607_boolean_type/Pos_0607_boolean_type_002/Pos_0607_boolean_type_002.xml @@ -0,0 +1,4 @@ + +false diff --git a/ATS/xml/06_built_in_data_types/0607_boolean_type/Pos_0607_boolean_type_002/Pos_0607_boolean_type_002.xsd b/ATS/xml/06_built_in_data_types/0607_boolean_type/Pos_0607_boolean_type_002/Pos_0607_boolean_type_002.xsd new file mode 100644 index 00000000..2e06c0e0 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0607_boolean_type/Pos_0607_boolean_type_002/Pos_0607_boolean_type_002.xsd @@ -0,0 +1,9 @@ + + + + + + + diff --git a/ATS/xml/06_built_in_data_types/0608_anytype_and_anysimpletype_types/Pos_0608_anytype_and_anysimpletype_types_001/Pos_0608_anytype_and_anysimpletype_types_001.ttcn b/ATS/xml/06_built_in_data_types/0608_anytype_and_anysimpletype_types/Pos_0608_anytype_and_anysimpletype_types_001/Pos_0608_anytype_and_anysimpletype_types_001.ttcn new file mode 100644 index 00000000..924bf80b --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0608_anytype_and_anysimpletype_types/Pos_0608_anytype_and_anysimpletype_types_001/Pos_0608_anytype_and_anysimpletype_types_001.ttcn @@ -0,0 +1,86 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:6.8, Verify conversion of anySimpleType + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// The XSD anySimpleType can be considered as the base type of all primitive +// data types. The anySimpleType shall be translated as an XML compatible +// restricted subtype of the universal charstring. + +module Pos_0608_anytype_and_anysimpletype_types_001 { + + import from schema_Pos_0608_anytype_and_anysimpletype_types_001 language "XSD" all; + + template MyType m_msg := "test"; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_0608_anytype_and_anysimpletype_types_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_0608_anytype_and_anysimpletype_types_001.xml", { "Pos_0608_anytype_and_anysimpletype_types_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_0608_anytype_and_anysimpletype_types_001(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/ATS/xml/06_built_in_data_types/0608_anytype_and_anysimpletype_types/Pos_0608_anytype_and_anysimpletype_types_001/Pos_0608_anytype_and_anysimpletype_types_001.xml b/ATS/xml/06_built_in_data_types/0608_anytype_and_anysimpletype_types/Pos_0608_anytype_and_anysimpletype_types_001/Pos_0608_anytype_and_anysimpletype_types_001.xml new file mode 100644 index 00000000..061ea0ec --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0608_anytype_and_anysimpletype_types/Pos_0608_anytype_and_anysimpletype_types_001/Pos_0608_anytype_and_anysimpletype_types_001.xml @@ -0,0 +1,2 @@ + +test \ No newline at end of file diff --git a/ATS/xml/06_built_in_data_types/0608_anytype_and_anysimpletype_types/Pos_0608_anytype_and_anysimpletype_types_001/Pos_0608_anytype_and_anysimpletype_types_001.xsd b/ATS/xml/06_built_in_data_types/0608_anytype_and_anysimpletype_types/Pos_0608_anytype_and_anysimpletype_types_001/Pos_0608_anytype_and_anysimpletype_types_001.xsd new file mode 100644 index 00000000..9a833fc5 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0608_anytype_and_anysimpletype_types/Pos_0608_anytype_and_anysimpletype_types_001/Pos_0608_anytype_and_anysimpletype_types_001.xsd @@ -0,0 +1,6 @@ + + + + diff --git a/ATS/xml/06_built_in_data_types/0608_anytype_and_anysimpletype_types/Pos_0608_anytype_and_anysimpletype_types_002/Pos_0608_anytype_and_anysimpletype_types_002.ttcn b/ATS/xml/06_built_in_data_types/0608_anytype_and_anysimpletype_types/Pos_0608_anytype_and_anysimpletype_types_002/Pos_0608_anytype_and_anysimpletype_types_002.ttcn new file mode 100644 index 00000000..8d19215f --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0608_anytype_and_anysimpletype_types/Pos_0608_anytype_and_anysimpletype_types_002/Pos_0608_anytype_and_anysimpletype_types_002.ttcn @@ -0,0 +1,92 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:6.8, Verify conversion of anyType + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// The XSD anyType is the base type of all complex definitions and the +// anySimpleType. AnyType is translated into XML content opaque to the codec. + +module Pos_0608_anytype_and_anysimpletype_types_002 { + + import from schema_Pos_0608_anytype_and_anysimpletype_types_002 language "XSD" all; + + template MyType m_msg := { + embed_values := omit, + attr := {"schema:Pos_0608_anytype_and_anysimpletype_types_002 attr=""abc"""}, + elem_list := { + "foo", + "bar" + } + }; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_0608_anytype_and_anysimpletype_types_002() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_0608_anytype_and_anysimpletype_types_002.xml", { "Pos_0608_anytype_and_anysimpletype_types_002.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_0608_anytype_and_anysimpletype_types_002(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/ATS/xml/06_built_in_data_types/0608_anytype_and_anysimpletype_types/Pos_0608_anytype_and_anysimpletype_types_002/Pos_0608_anytype_and_anysimpletype_types_002.xml b/ATS/xml/06_built_in_data_types/0608_anytype_and_anysimpletype_types/Pos_0608_anytype_and_anysimpletype_types_002/Pos_0608_anytype_and_anysimpletype_types_002.xml new file mode 100644 index 00000000..67226185 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0608_anytype_and_anysimpletype_types/Pos_0608_anytype_and_anysimpletype_types_002/Pos_0608_anytype_and_anysimpletype_types_002.xml @@ -0,0 +1,2 @@ + +foobar \ No newline at end of file diff --git a/ATS/xml/06_built_in_data_types/0608_anytype_and_anysimpletype_types/Pos_0608_anytype_and_anysimpletype_types_002/Pos_0608_anytype_and_anysimpletype_types_002.xsd b/ATS/xml/06_built_in_data_types/0608_anytype_and_anysimpletype_types/Pos_0608_anytype_and_anysimpletype_types_002/Pos_0608_anytype_and_anysimpletype_types_002.xsd new file mode 100644 index 00000000..e1ab5210 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0608_anytype_and_anysimpletype_types/Pos_0608_anytype_and_anysimpletype_types_002/Pos_0608_anytype_and_anysimpletype_types_002.xsd @@ -0,0 +1,9 @@ + + + + + + + diff --git a/ATS/xml/06_built_in_data_types/0608_anytype_and_anysimpletype_types/Pos_0608_anytype_and_anysimpletype_types_003/Pos_0608_anytype_and_anysimpletype_types_003.ttcn b/ATS/xml/06_built_in_data_types/0608_anytype_and_anysimpletype_types/Pos_0608_anytype_and_anysimpletype_types_003/Pos_0608_anytype_and_anysimpletype_types_003.ttcn new file mode 100644 index 00000000..0e45a24f --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0608_anytype_and_anysimpletype_types/Pos_0608_anytype_and_anysimpletype_types_003/Pos_0608_anytype_and_anysimpletype_types_003.ttcn @@ -0,0 +1,96 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 9:6.8, Conversion of anyType with mixed content + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// An element of anyType is able to carry any syntactically valid (well-formed) +// XML content, including mixed content. Each TTCN-3 element of the field attr +// shall contain a complete, valid XML attribute, including its name and value. +// Each TTCN-3 element of the field elem_list shall contain a syntactically valid +// XML element. If the embed_values field is not omitted in the TTCN-3 value or +// template instance, its content shall be handled according to clause 7.6.8. + +module Pos_0608_anytype_and_anysimpletype_types_003 { + + import from schema_Pos_0608_anytype_and_anysimpletype_types_003 language "XSD" all; + + template MyType m_msg := { + embed_values := { "The ordered ", " has arrived. ", " not delivered yet."}, + attr := {"schema:Pos_0608_anytype_and_anysimpletype_types_003 attr=""abc"""}, + elem_list := { + "foo", + "bar" + } + }; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_0608_anytype_and_anysimpletype_types_003() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_0608_anytype_and_anysimpletype_types_003.xml", { "Pos_0608_anytype_and_anysimpletype_types_003.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_0608_anytype_and_anysimpletype_types_003(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/ATS/xml/06_built_in_data_types/0608_anytype_and_anysimpletype_types/Pos_0608_anytype_and_anysimpletype_types_003/Pos_0608_anytype_and_anysimpletype_types_003.xml b/ATS/xml/06_built_in_data_types/0608_anytype_and_anysimpletype_types/Pos_0608_anytype_and_anysimpletype_types_003/Pos_0608_anytype_and_anysimpletype_types_003.xml new file mode 100644 index 00000000..33c04303 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0608_anytype_and_anysimpletype_types/Pos_0608_anytype_and_anysimpletype_types_003/Pos_0608_anytype_and_anysimpletype_types_003.xml @@ -0,0 +1,2 @@ + +The ordered foo has arrived. bar not delivered yet. \ No newline at end of file diff --git a/ATS/xml/06_built_in_data_types/0608_anytype_and_anysimpletype_types/Pos_0608_anytype_and_anysimpletype_types_003/Pos_0608_anytype_and_anysimpletype_types_003.xsd b/ATS/xml/06_built_in_data_types/0608_anytype_and_anysimpletype_types/Pos_0608_anytype_and_anysimpletype_types_003/Pos_0608_anytype_and_anysimpletype_types_003.xsd new file mode 100644 index 00000000..a48ae8a6 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0608_anytype_and_anysimpletype_types/Pos_0608_anytype_and_anysimpletype_types_003/Pos_0608_anytype_and_anysimpletype_types_003.xsd @@ -0,0 +1,9 @@ + + + + + + + diff --git a/ATS/xml/06_built_in_data_types/0608_anytype_and_anysimpletype_types/Pos_0608_anytype_and_anysimpletype_types_004/Pos_0608_anytype_and_anysimpletype_types_004.ttcn b/ATS/xml/06_built_in_data_types/0608_anytype_and_anysimpletype_types/Pos_0608_anytype_and_anysimpletype_types_004/Pos_0608_anytype_and_anysimpletype_types_004.ttcn new file mode 100644 index 00000000..58e7672c --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0608_anytype_and_anysimpletype_types/Pos_0608_anytype_and_anysimpletype_types_004/Pos_0608_anytype_and_anysimpletype_types_004.ttcn @@ -0,0 +1,91 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 9:6.8, Nillable anyType element (nill option, content not present) + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// An element of anyType is able to carry any syntactically valid (well-formed) +// XML content, including mixed content. Each TTCN-3 element of the field attr +// shall contain a complete, valid XML attribute, including its name and value. +// Each TTCN-3 element of the field elem_list shall contain a syntactically valid +// XML element. If the embed_values field is not omitted in the TTCN-3 value or +// template instance, its content shall be handled according to clause 7.6.8. + +module Pos_0608_anytype_and_anysimpletype_types_004 { + + import from schema_Pos_0608_anytype_and_anysimpletype_types_004 language "XSD" all; + + template MyType m_msg := { + content := omit + }; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_0608_anytype_and_anysimpletype_types_004() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_0608_anytype_and_anysimpletype_types_004.xml", { "Pos_0608_anytype_and_anysimpletype_types_004.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_0608_anytype_and_anysimpletype_types_004(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/ATS/xml/06_built_in_data_types/0608_anytype_and_anysimpletype_types/Pos_0608_anytype_and_anysimpletype_types_004/Pos_0608_anytype_and_anysimpletype_types_004.xml b/ATS/xml/06_built_in_data_types/0608_anytype_and_anysimpletype_types/Pos_0608_anytype_and_anysimpletype_types_004/Pos_0608_anytype_and_anysimpletype_types_004.xml new file mode 100644 index 00000000..839b8ae3 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0608_anytype_and_anysimpletype_types/Pos_0608_anytype_and_anysimpletype_types_004/Pos_0608_anytype_and_anysimpletype_types_004.xml @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/ATS/xml/06_built_in_data_types/0608_anytype_and_anysimpletype_types/Pos_0608_anytype_and_anysimpletype_types_004/Pos_0608_anytype_and_anysimpletype_types_004.xsd b/ATS/xml/06_built_in_data_types/0608_anytype_and_anysimpletype_types/Pos_0608_anytype_and_anysimpletype_types_004/Pos_0608_anytype_and_anysimpletype_types_004.xsd new file mode 100644 index 00000000..ef79f8e5 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0608_anytype_and_anysimpletype_types/Pos_0608_anytype_and_anysimpletype_types_004/Pos_0608_anytype_and_anysimpletype_types_004.xsd @@ -0,0 +1,6 @@ + + + + diff --git a/ATS/xml/06_built_in_data_types/0608_anytype_and_anysimpletype_types/Pos_0608_anytype_and_anysimpletype_types_005/Pos_0608_anytype_and_anysimpletype_types_005.ttcn b/ATS/xml/06_built_in_data_types/0608_anytype_and_anysimpletype_types/Pos_0608_anytype_and_anysimpletype_types_005/Pos_0608_anytype_and_anysimpletype_types_005.ttcn new file mode 100644 index 00000000..acb32784 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0608_anytype_and_anysimpletype_types/Pos_0608_anytype_and_anysimpletype_types_005/Pos_0608_anytype_and_anysimpletype_types_005.ttcn @@ -0,0 +1,99 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 9:6.8, Nillable anyType element (content is present) + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// The following requirements are tested: +// An element of anyType is able to carry any syntactically valid (well-formed) +// XML content, including mixed content. Each TTCN-3 element of the field attr +// shall contain a complete, valid XML attribute, including its name and value. +// Each TTCN-3 element of the field elem_list shall contain a syntactically valid +// XML element. If the embed_values field is not omitted in the TTCN-3 value or +// template instance, its content shall be handled according to clause 7.6.8. + +module Pos_0608_anytype_and_anysimpletype_types_005 { + + import from schema_Pos_0608_anytype_and_anysimpletype_types_005 language "XSD" all; + + template MyType m_msg := { + content := { + embed_values := omit, + attr := omit, + elem_list := { + "foo", + "bar" + } + } + }; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_0608_anytype_and_anysimpletype_types_005() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_0608_anytype_and_anysimpletype_types_005.xml", { "Pos_0608_anytype_and_anysimpletype_types_005.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_0608_anytype_and_anysimpletype_types_005(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/ATS/xml/06_built_in_data_types/0608_anytype_and_anysimpletype_types/Pos_0608_anytype_and_anysimpletype_types_005/Pos_0608_anytype_and_anysimpletype_types_005.xml b/ATS/xml/06_built_in_data_types/0608_anytype_and_anysimpletype_types/Pos_0608_anytype_and_anysimpletype_types_005/Pos_0608_anytype_and_anysimpletype_types_005.xml new file mode 100644 index 00000000..041d89b2 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0608_anytype_and_anysimpletype_types/Pos_0608_anytype_and_anysimpletype_types_005/Pos_0608_anytype_and_anysimpletype_types_005.xml @@ -0,0 +1,2 @@ + +foobar \ No newline at end of file diff --git a/ATS/xml/06_built_in_data_types/0608_anytype_and_anysimpletype_types/Pos_0608_anytype_and_anysimpletype_types_005/Pos_0608_anytype_and_anysimpletype_types_005.xsd b/ATS/xml/06_built_in_data_types/0608_anytype_and_anysimpletype_types/Pos_0608_anytype_and_anysimpletype_types_005/Pos_0608_anytype_and_anysimpletype_types_005.xsd new file mode 100644 index 00000000..28352743 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0608_anytype_and_anysimpletype_types/Pos_0608_anytype_and_anysimpletype_types_005/Pos_0608_anytype_and_anysimpletype_types_005.xsd @@ -0,0 +1,8 @@ + + + + + + diff --git a/ATS/xml/06_built_in_data_types/0608_anytype_and_anysimpletype_types/Pos_0608_anytype_and_anysimpletype_types_006/Pos_0608_anytype_and_anysimpletype_types_006.ttcn b/ATS/xml/06_built_in_data_types/0608_anytype_and_anysimpletype_types/Pos_0608_anytype_and_anysimpletype_types_006/Pos_0608_anytype_and_anysimpletype_types_006.ttcn new file mode 100644 index 00000000..b704382a --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0608_anytype_and_anysimpletype_types/Pos_0608_anytype_and_anysimpletype_types_006/Pos_0608_anytype_and_anysimpletype_types_006.ttcn @@ -0,0 +1,63 @@ +/*************************************************** + ** @author STF 548 + ** @version 0.0.1 + ** @purpose 9:6.8, Verify conversion of XSD anySimpleType to TTCN-3 anytype + ** @verdict pass accept, ttcn3verdict:pass + ** @configuration any_to_anytype +***************************************************/ + +module Pos_Pos_0608_anytype_and_anysimpletype_types_006 { + + import from schema_Pos_0608_anytype_and_anysimpletype_types_006 language "XSD" all; + + template MyType m_msg := { integer := 1 }; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type port P message { + inout all; + } + type component C { + port P p; + } + + testcase TC_Pos_0608_anytype_and_anysimpletype_types_006() runs on C system C { + var Raw v_rcv; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_0608_anytype_and_anysimpletype_types_006(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/ATS/xml/06_built_in_data_types/0608_anytype_and_anysimpletype_types/Pos_0608_anytype_and_anysimpletype_types_006/Pos_0608_anytype_and_anysimpletype_types_006.xml b/ATS/xml/06_built_in_data_types/0608_anytype_and_anysimpletype_types/Pos_0608_anytype_and_anysimpletype_types_006/Pos_0608_anytype_and_anysimpletype_types_006.xml new file mode 100644 index 00000000..3967ff9a --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0608_anytype_and_anysimpletype_types/Pos_0608_anytype_and_anysimpletype_types_006/Pos_0608_anytype_and_anysimpletype_types_006.xml @@ -0,0 +1,2 @@ + +1 \ No newline at end of file diff --git a/ATS/xml/06_built_in_data_types/0608_anytype_and_anysimpletype_types/Pos_0608_anytype_and_anysimpletype_types_006/Pos_0608_anytype_and_anysimpletype_types_006.xsd b/ATS/xml/06_built_in_data_types/0608_anytype_and_anysimpletype_types/Pos_0608_anytype_and_anysimpletype_types_006/Pos_0608_anytype_and_anysimpletype_types_006.xsd new file mode 100644 index 00000000..08dae172 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0608_anytype_and_anysimpletype_types/Pos_0608_anytype_and_anysimpletype_types_006/Pos_0608_anytype_and_anysimpletype_types_006.xsd @@ -0,0 +1,6 @@ + + + + diff --git a/ATS/xml/06_built_in_data_types/0608_anytype_and_anysimpletype_types/Pos_0608_anytype_and_anysimpletype_types_007/Pos_0608_anytype_and_anysimpletype_types_007.ttcn b/ATS/xml/06_built_in_data_types/0608_anytype_and_anysimpletype_types/Pos_0608_anytype_and_anysimpletype_types_007/Pos_0608_anytype_and_anysimpletype_types_007.ttcn new file mode 100644 index 00000000..19915631 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0608_anytype_and_anysimpletype_types/Pos_0608_anytype_and_anysimpletype_types_007/Pos_0608_anytype_and_anysimpletype_types_007.ttcn @@ -0,0 +1,63 @@ +/*************************************************** + ** @author STF 548 + ** @version 0.0.1 + ** @purpose 9:6.8, Verify conversion of XSD anyType to TTCN-3 anytype + ** @verdict pass accept, ttcn3verdict:pass + ** @configuration any_to_anytype +***************************************************/ + +module Pos_Pos_0608_anytype_and_anysimpletype_types_007 { + + import from schema_Pos_0608_anytype_and_anysimpletype_types_007 language "XSD" all; + + template MyType m_msg := { embed_values := omit, attr := omit, elem_list := { { Something := 1 } } }; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type port P message { + inout all; + } + type component C { + port P p; + } + + testcase TC_Pos_0608_anytype_and_anysimpletype_types_007() runs on C system C { + var Raw v_rcv; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_0608_anytype_and_anysimpletype_types_007(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/ATS/xml/06_built_in_data_types/0608_anytype_and_anysimpletype_types/Pos_0608_anytype_and_anysimpletype_types_007/Pos_0608_anytype_and_anysimpletype_types_007.xml b/ATS/xml/06_built_in_data_types/0608_anytype_and_anysimpletype_types/Pos_0608_anytype_and_anysimpletype_types_007/Pos_0608_anytype_and_anysimpletype_types_007.xml new file mode 100644 index 00000000..79246653 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0608_anytype_and_anysimpletype_types/Pos_0608_anytype_and_anysimpletype_types_007/Pos_0608_anytype_and_anysimpletype_types_007.xml @@ -0,0 +1,4 @@ + + + 1 + \ No newline at end of file diff --git a/ATS/xml/06_built_in_data_types/0608_anytype_and_anysimpletype_types/Pos_0608_anytype_and_anysimpletype_types_007/Pos_0608_anytype_and_anysimpletype_types_007.xsd b/ATS/xml/06_built_in_data_types/0608_anytype_and_anysimpletype_types/Pos_0608_anytype_and_anysimpletype_types_007/Pos_0608_anytype_and_anysimpletype_types_007.xsd new file mode 100644 index 00000000..e7b9b5d5 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/0608_anytype_and_anysimpletype_types/Pos_0608_anytype_and_anysimpletype_types_007/Pos_0608_anytype_and_anysimpletype_types_007.xsd @@ -0,0 +1,8 @@ + + + + + + diff --git a/ATS/xml/06_built_in_data_types/06_top_level/Pos_06_top_level_001/Pos_06_top_level_001.ttcn b/ATS/xml/06_built_in_data_types/06_top_level/Pos_06_top_level_001/Pos_06_top_level_001.ttcn new file mode 100644 index 00000000..f070fb0b --- /dev/null +++ b/ATS/xml/06_built_in_data_types/06_top_level/Pos_06_top_level_001/Pos_06_top_level_001.ttcn @@ -0,0 +1,91 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:6, Verify conversion of simpleType based on built-in XSD type + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// XSD built-in data types may be primitive or derived types. The latter are +// gained from primitive types by means of a restriction mechanism called +// facets. For the mapping of primitive types, a specific TTCN-3 module XSD is +// provided by the present document, which defines the relation of XSD primitive +// types to TTCN-3 types. Whenever a new simpleType is defined, with +// a built-in XSD type as its base type, it shall be mapped directly from types +// defined in the module XSD. + +module Pos_06_top_level_001 { + + import from schema_Pos_06_top_level_001 language "XSD" all; + + template E1 m_base := 5; + template MyType m_msg := m_base; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_06_top_level_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_06_top_level_001.xml", { "Pos_06_top_level_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_06_top_level_001(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/ATS/xml/06_built_in_data_types/06_top_level/Pos_06_top_level_001/Pos_06_top_level_001.xml b/ATS/xml/06_built_in_data_types/06_top_level/Pos_06_top_level_001/Pos_06_top_level_001.xml new file mode 100644 index 00000000..f1551b89 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/06_top_level/Pos_06_top_level_001/Pos_06_top_level_001.xml @@ -0,0 +1,2 @@ + +5 \ No newline at end of file diff --git a/ATS/xml/06_built_in_data_types/06_top_level/Pos_06_top_level_001/Pos_06_top_level_001.xsd b/ATS/xml/06_built_in_data_types/06_top_level/Pos_06_top_level_001/Pos_06_top_level_001.xsd new file mode 100644 index 00000000..000df5b6 --- /dev/null +++ b/ATS/xml/06_built_in_data_types/06_top_level/Pos_06_top_level_001/Pos_06_top_level_001.xsd @@ -0,0 +1,9 @@ + + + + + + + diff --git a/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070101_id/Pos_070101_id_001/Pos_070101_id_001.ttcn b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070101_id/Pos_070101_id_001/Pos_070101_id_001.ttcn new file mode 100644 index 00000000..51e045e3 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070101_id/Pos_070101_id_001/Pos_070101_id_001.ttcn @@ -0,0 +1,87 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.1.1, Verify conversion of id attribute of global element + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// The attribute id enables a unique identification of an XSD component. They +// shall be mapped to TTCN-3 as simple type references, e.g. any component +// mapping to a type with name typeName and an attribute id="ID" shall result in +// an additional TTCN-3 type declaration. + +module Pos_070101_id_001 { + + import from schema_Pos_070101_id_001 language "XSD" all; + + template ProductType m_base := {name := "Moby Dick", price := "$12.4"}; + template MyType m_msg := m_base; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_070101_id_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_070101_id_001.xml", { "Pos_070101_id_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_070101_id_001(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070101_id/Pos_070101_id_001/Pos_070101_id_001.xml b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070101_id/Pos_070101_id_001/Pos_070101_id_001.xml new file mode 100644 index 00000000..80e63728 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070101_id/Pos_070101_id_001/Pos_070101_id_001.xml @@ -0,0 +1,5 @@ + + +Moby Dick +$12.4 + \ No newline at end of file diff --git a/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070101_id/Pos_070101_id_001/Pos_070101_id_001.xsd b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070101_id/Pos_070101_id_001/Pos_070101_id_001.xsd new file mode 100644 index 00000000..9a3630ba --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070101_id/Pos_070101_id_001/Pos_070101_id_001.xsd @@ -0,0 +1,13 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070101_id/Pos_070101_id_002/Pos_070101_id_002.ttcn b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070101_id/Pos_070101_id_002/Pos_070101_id_002.ttcn new file mode 100644 index 00000000..48909c8f --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070101_id/Pos_070101_id_002/Pos_070101_id_002.ttcn @@ -0,0 +1,90 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.1.1, verify conversion of id attribute of local element + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// The attribute id enables a unique identification of an XSD component. They +// shall be mapped to TTCN-3 as simple type references, e.g. any component +// mapping to a type with name typeName and an attribute id="ID" shall result in +// an additional TTCN-3 type declaration. + +module Pos_070101_id_002 { + + import from schema_Pos_070101_id_002 language "XSD" all; + + template E01 m_base := "test"; + template MyType m_msg := { + foo := m_base + }; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_070101_id_002() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_070101_id_002.xml", { "Pos_070101_id_002.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_070101_id_002(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070101_id/Pos_070101_id_002/Pos_070101_id_002.xml b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070101_id/Pos_070101_id_002/Pos_070101_id_002.xml new file mode 100644 index 00000000..fe953a7b --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070101_id/Pos_070101_id_002/Pos_070101_id_002.xml @@ -0,0 +1,4 @@ + + + test + \ No newline at end of file diff --git a/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070101_id/Pos_070101_id_002/Pos_070101_id_002.xsd b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070101_id/Pos_070101_id_002/Pos_070101_id_002.xsd new file mode 100644 index 00000000..d581a968 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070101_id/Pos_070101_id_002/Pos_070101_id_002.xsd @@ -0,0 +1,12 @@ + + + + + + + + + + diff --git a/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070104_minoccurs_and_maxoccurs/Neg_070104_minoccurs_and_maxoccurs_001/Neg_070104_minoccurs_and_maxoccurs_001.ttcn b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070104_minoccurs_and_maxoccurs/Neg_070104_minoccurs_and_maxoccurs_001/Neg_070104_minoccurs_and_maxoccurs_001.ttcn new file mode 100644 index 00000000..e4653ef7 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070104_minoccurs_and_maxoccurs/Neg_070104_minoccurs_and_maxoccurs_001/Neg_070104_minoccurs_and_maxoccurs_001.ttcn @@ -0,0 +1,47 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.1.4, a list with minOccurs 0 should not be mapped optional in TTCN-3 + ** @verdict pass reject + ***************************************************/ +module Neg_070104_minoccurs_and_maxoccurs_001 { + + import from schema_Neg_070104_minoccurs_and_maxoccurs_001 language "XSD" all; + + // foo_list should not be optional + template ElemE15b m_msg := {foo_list := omit, bar := 3.0} + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type port P message { + inout all; + } + + type component C { + port P p; + } + + testcase TC_Neg_070104_minoccurs_and_maxoccurs_001() runs on C system C { + map(self:p, system:p); + + // encode the message + p.send(m_msg); + log("template should either be rejected by compiler or by runtime latest while encoding"); + + setverdict(fail, "Invalid template should not be encoded"); + + unmap(self:p, system:p); + } + + control { + execute(TC_Neg_070104_minoccurs_and_maxoccurs_001(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070104_minoccurs_and_maxoccurs/Neg_070104_minoccurs_and_maxoccurs_001/Neg_070104_minoccurs_and_maxoccurs_001.xsd b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070104_minoccurs_and_maxoccurs/Neg_070104_minoccurs_and_maxoccurs_001/Neg_070104_minoccurs_and_maxoccurs_001.xsd new file mode 100644 index 00000000..472e7530 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070104_minoccurs_and_maxoccurs/Neg_070104_minoccurs_and_maxoccurs_001/Neg_070104_minoccurs_and_maxoccurs_001.xsd @@ -0,0 +1,13 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070104_minoccurs_and_maxoccurs/Neg_070104_minoccurs_and_maxoccurs_002/Neg_070104_minoccurs_and_maxoccurs_002.ttcn b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070104_minoccurs_and_maxoccurs/Neg_070104_minoccurs_and_maxoccurs_002/Neg_070104_minoccurs_and_maxoccurs_002.ttcn new file mode 100644 index 00000000..0fa4af48 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070104_minoccurs_and_maxoccurs/Neg_070104_minoccurs_and_maxoccurs_002/Neg_070104_minoccurs_and_maxoccurs_002.ttcn @@ -0,0 +1,46 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.1.4, A restricted length list [5, 10] should not allow less than 5 elements + ** @verdict pass reject + ***************************************************/ +module Neg_070104_minoccurs_and_maxoccurs_002 { + + import from schema_Neg_070104_minoccurs_and_maxoccurs_002 language "XSD" all; + + template ElemE15c m_msg := {foo_list := {1, 2, 3, 4}, bar := 3.0} + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type port P message { + inout all; + } + + type component C { + port P p; + } + + testcase TC_Neg_070104_minoccurs_and_maxoccurs_002() runs on C system C { + map(self:p, system:p); + + // encode the message + p.send(m_msg); + log("template should either be rejected by compiler or by runtime latest while encoding"); + + setverdict(fail, "Invalid template should not be encoded"); + + unmap(self:p, system:p); + } + + control { + execute(TC_Neg_070104_minoccurs_and_maxoccurs_002(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070104_minoccurs_and_maxoccurs/Neg_070104_minoccurs_and_maxoccurs_002/Neg_070104_minoccurs_and_maxoccurs_002.xsd b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070104_minoccurs_and_maxoccurs/Neg_070104_minoccurs_and_maxoccurs_002/Neg_070104_minoccurs_and_maxoccurs_002.xsd new file mode 100644 index 00000000..a45f19f8 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070104_minoccurs_and_maxoccurs/Neg_070104_minoccurs_and_maxoccurs_002/Neg_070104_minoccurs_and_maxoccurs_002.xsd @@ -0,0 +1,13 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070104_minoccurs_and_maxoccurs/Neg_070104_minoccurs_and_maxoccurs_003/Neg_070104_minoccurs_and_maxoccurs_003.ttcn b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070104_minoccurs_and_maxoccurs/Neg_070104_minoccurs_and_maxoccurs_003/Neg_070104_minoccurs_and_maxoccurs_003.ttcn new file mode 100644 index 00000000..8c8d23e4 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070104_minoccurs_and_maxoccurs/Neg_070104_minoccurs_and_maxoccurs_003/Neg_070104_minoccurs_and_maxoccurs_003.ttcn @@ -0,0 +1,46 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.1.4, A restricted length list [5, 10] should not allow more than 10 elements + ** @verdict pass reject + ***************************************************/ +module Neg_070104_minoccurs_and_maxoccurs_003 { + + import from schema_Neg_070104_minoccurs_and_maxoccurs_003 language "XSD" all; + + template ElemE15c m_msg := {foo_list := {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11}, bar := 3.0} + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type port P message { + inout all; + } + + type component C { + port P p; + } + + testcase TC_Neg_070104_minoccurs_and_maxoccurs_003() runs on C system C { + map(self:p, system:p); + + // encode the message + p.send(m_msg); + log("template should either be rejected by compiler or by runtime latest while encoding"); + + setverdict(fail, "Invalid template should not be encoded"); + + unmap(self:p, system:p); + } + + control { + execute(TC_Neg_070104_minoccurs_and_maxoccurs_003(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070104_minoccurs_and_maxoccurs/Neg_070104_minoccurs_and_maxoccurs_003/Neg_070104_minoccurs_and_maxoccurs_003.xsd b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070104_minoccurs_and_maxoccurs/Neg_070104_minoccurs_and_maxoccurs_003/Neg_070104_minoccurs_and_maxoccurs_003.xsd new file mode 100644 index 00000000..6f812947 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070104_minoccurs_and_maxoccurs/Neg_070104_minoccurs_and_maxoccurs_003/Neg_070104_minoccurs_and_maxoccurs_003.xsd @@ -0,0 +1,13 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070104_minoccurs_and_maxoccurs/Pos_070104_minoccurs_and_maxoccurs_001/Pos_070104_minoccurs_and_maxoccurs_001.ttcn b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070104_minoccurs_and_maxoccurs/Pos_070104_minoccurs_and_maxoccurs_001/Pos_070104_minoccurs_and_maxoccurs_001.ttcn new file mode 100644 index 00000000..76209dd2 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070104_minoccurs_and_maxoccurs/Pos_070104_minoccurs_and_maxoccurs_001/Pos_070104_minoccurs_and_maxoccurs_001.ttcn @@ -0,0 +1,80 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.1.4, Optional field defined by minOccurs has to be mapped as optional in TTCN-3 + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_070104_minoccurs_and_maxoccurs_001 { + + import from schema_Pos_070104_minoccurs_and_maxoccurs_001 language "XSD" all; + + template ElemE15a m_msg := {foo := omit, bar := 2.0} + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_070104_minoccurs_and_maxoccurs_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_070104_minoccurs_and_maxoccurs_001.xml", { "Pos_070104_minoccurs_and_maxoccurs_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_070104_minoccurs_and_maxoccurs_001(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070104_minoccurs_and_maxoccurs/Pos_070104_minoccurs_and_maxoccurs_001/Pos_070104_minoccurs_and_maxoccurs_001.xml b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070104_minoccurs_and_maxoccurs/Pos_070104_minoccurs_and_maxoccurs_001/Pos_070104_minoccurs_and_maxoccurs_001.xml new file mode 100644 index 00000000..9fa3d1b7 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070104_minoccurs_and_maxoccurs/Pos_070104_minoccurs_and_maxoccurs_001/Pos_070104_minoccurs_and_maxoccurs_001.xml @@ -0,0 +1,4 @@ + + + 2.0 + diff --git a/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070104_minoccurs_and_maxoccurs/Pos_070104_minoccurs_and_maxoccurs_001/Pos_070104_minoccurs_and_maxoccurs_001.xsd b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070104_minoccurs_and_maxoccurs/Pos_070104_minoccurs_and_maxoccurs_001/Pos_070104_minoccurs_and_maxoccurs_001.xsd new file mode 100644 index 00000000..ddb0865e --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070104_minoccurs_and_maxoccurs/Pos_070104_minoccurs_and_maxoccurs_001/Pos_070104_minoccurs_and_maxoccurs_001.xsd @@ -0,0 +1,12 @@ + + + + + + + + + + \ No newline at end of file diff --git a/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070104_minoccurs_and_maxoccurs/Pos_070104_minoccurs_and_maxoccurs_002/Pos_070104_minoccurs_and_maxoccurs_002.ttcn b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070104_minoccurs_and_maxoccurs/Pos_070104_minoccurs_and_maxoccurs_002/Pos_070104_minoccurs_and_maxoccurs_002.ttcn new file mode 100644 index 00000000..534dbe88 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070104_minoccurs_and_maxoccurs/Pos_070104_minoccurs_and_maxoccurs_002/Pos_070104_minoccurs_and_maxoccurs_002.ttcn @@ -0,0 +1,80 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.1.4, Optional field defined by minOccurs has to exist in TTCN-3 and match the value + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_070104_minoccurs_and_maxoccurs_002 { + + import from schema_Pos_070104_minoccurs_and_maxoccurs_002 language "XSD" all; + + template ElemE15a m_msg := {foo := 5, bar := 2.0} + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_070104_minoccurs_and_maxoccurs_002() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_070104_minoccurs_and_maxoccurs_002.xml", { "Pos_070104_minoccurs_and_maxoccurs_002.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_070104_minoccurs_and_maxoccurs_002(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070104_minoccurs_and_maxoccurs/Pos_070104_minoccurs_and_maxoccurs_002/Pos_070104_minoccurs_and_maxoccurs_002.xml b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070104_minoccurs_and_maxoccurs/Pos_070104_minoccurs_and_maxoccurs_002/Pos_070104_minoccurs_and_maxoccurs_002.xml new file mode 100644 index 00000000..1c16f2dd --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070104_minoccurs_and_maxoccurs/Pos_070104_minoccurs_and_maxoccurs_002/Pos_070104_minoccurs_and_maxoccurs_002.xml @@ -0,0 +1,5 @@ + + + 5 + 2.0 + diff --git a/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070104_minoccurs_and_maxoccurs/Pos_070104_minoccurs_and_maxoccurs_002/Pos_070104_minoccurs_and_maxoccurs_002.xsd b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070104_minoccurs_and_maxoccurs/Pos_070104_minoccurs_and_maxoccurs_002/Pos_070104_minoccurs_and_maxoccurs_002.xsd new file mode 100644 index 00000000..eda26ff9 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070104_minoccurs_and_maxoccurs/Pos_070104_minoccurs_and_maxoccurs_002/Pos_070104_minoccurs_and_maxoccurs_002.xsd @@ -0,0 +1,12 @@ + + + + + + + + + + \ No newline at end of file diff --git a/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070104_minoccurs_and_maxoccurs/Pos_070104_minoccurs_and_maxoccurs_003/Pos_070104_minoccurs_and_maxoccurs_003.ttcn b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070104_minoccurs_and_maxoccurs/Pos_070104_minoccurs_and_maxoccurs_003/Pos_070104_minoccurs_and_maxoccurs_003.ttcn new file mode 100644 index 00000000..82fa200c --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070104_minoccurs_and_maxoccurs/Pos_070104_minoccurs_and_maxoccurs_003/Pos_070104_minoccurs_and_maxoccurs_003.ttcn @@ -0,0 +1,80 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.1.4, a list with minOccurs 0 should allow zero elements + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_070104_minoccurs_and_maxoccurs_003 { + + import from schema_Pos_070104_minoccurs_and_maxoccurs_003 language "XSD" all; + + template ElemE15b m_msg := {foo_list := {}, bar := 3.0} + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_070104_minoccurs_and_maxoccurs_003() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_070104_minoccurs_and_maxoccurs_003.xml", { "Pos_070104_minoccurs_and_maxoccurs_003.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_070104_minoccurs_and_maxoccurs_003(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070104_minoccurs_and_maxoccurs/Pos_070104_minoccurs_and_maxoccurs_003/Pos_070104_minoccurs_and_maxoccurs_003.xml b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070104_minoccurs_and_maxoccurs/Pos_070104_minoccurs_and_maxoccurs_003/Pos_070104_minoccurs_and_maxoccurs_003.xml new file mode 100644 index 00000000..036ca8e5 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070104_minoccurs_and_maxoccurs/Pos_070104_minoccurs_and_maxoccurs_003/Pos_070104_minoccurs_and_maxoccurs_003.xml @@ -0,0 +1,4 @@ + + + 3.0 + diff --git a/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070104_minoccurs_and_maxoccurs/Pos_070104_minoccurs_and_maxoccurs_003/Pos_070104_minoccurs_and_maxoccurs_003.xsd b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070104_minoccurs_and_maxoccurs/Pos_070104_minoccurs_and_maxoccurs_003/Pos_070104_minoccurs_and_maxoccurs_003.xsd new file mode 100644 index 00000000..7abfcb15 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070104_minoccurs_and_maxoccurs/Pos_070104_minoccurs_and_maxoccurs_003/Pos_070104_minoccurs_and_maxoccurs_003.xsd @@ -0,0 +1,13 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070104_minoccurs_and_maxoccurs/Pos_070104_minoccurs_and_maxoccurs_004/Pos_070104_minoccurs_and_maxoccurs_004.ttcn b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070104_minoccurs_and_maxoccurs/Pos_070104_minoccurs_and_maxoccurs_004/Pos_070104_minoccurs_and_maxoccurs_004.ttcn new file mode 100644 index 00000000..4e004798 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070104_minoccurs_and_maxoccurs/Pos_070104_minoccurs_and_maxoccurs_004/Pos_070104_minoccurs_and_maxoccurs_004.ttcn @@ -0,0 +1,80 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.1.4, A restricted length list (0, unbounded) should allow elements + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_070104_minoccurs_and_maxoccurs_004 { + + import from schema_Pos_070104_minoccurs_and_maxoccurs_004 language "XSD" all; + + template ElemE15b m_msg := {foo_list := {1, 2, 3, 4, 5}, bar := 3.0} + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_070104_minoccurs_and_maxoccurs_004() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_070104_minoccurs_and_maxoccurs_004.xml", { "Pos_070104_minoccurs_and_maxoccurs_004.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_070104_minoccurs_and_maxoccurs_004(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070104_minoccurs_and_maxoccurs/Pos_070104_minoccurs_and_maxoccurs_004/Pos_070104_minoccurs_and_maxoccurs_004.xml b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070104_minoccurs_and_maxoccurs/Pos_070104_minoccurs_and_maxoccurs_004/Pos_070104_minoccurs_and_maxoccurs_004.xml new file mode 100644 index 00000000..79d79698 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070104_minoccurs_and_maxoccurs/Pos_070104_minoccurs_and_maxoccurs_004/Pos_070104_minoccurs_and_maxoccurs_004.xml @@ -0,0 +1,9 @@ + + + 1 + 2 + 3 + 4 + 5 + 3.0 + diff --git a/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070104_minoccurs_and_maxoccurs/Pos_070104_minoccurs_and_maxoccurs_004/Pos_070104_minoccurs_and_maxoccurs_004.xsd b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070104_minoccurs_and_maxoccurs/Pos_070104_minoccurs_and_maxoccurs_004/Pos_070104_minoccurs_and_maxoccurs_004.xsd new file mode 100644 index 00000000..edd40757 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070104_minoccurs_and_maxoccurs/Pos_070104_minoccurs_and_maxoccurs_004/Pos_070104_minoccurs_and_maxoccurs_004.xsd @@ -0,0 +1,13 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070104_minoccurs_and_maxoccurs/Pos_070104_minoccurs_and_maxoccurs_005/Pos_070104_minoccurs_and_maxoccurs_005.ttcn b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070104_minoccurs_and_maxoccurs/Pos_070104_minoccurs_and_maxoccurs_005/Pos_070104_minoccurs_and_maxoccurs_005.ttcn new file mode 100644 index 00000000..bf91c4b8 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070104_minoccurs_and_maxoccurs/Pos_070104_minoccurs_and_maxoccurs_005/Pos_070104_minoccurs_and_maxoccurs_005.ttcn @@ -0,0 +1,80 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.1.4, A restricted length list [5, 10] should allow 5 elements + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_070104_minoccurs_and_maxoccurs_005 { + + import from schema_Pos_070104_minoccurs_and_maxoccurs_005 language "XSD" all; + + template ElemE15c m_msg := {foo_list := {1, 2, 3, 4, 5}, bar := 3.0} + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_070104_minoccurs_and_maxoccurs_005() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_070104_minoccurs_and_maxoccurs_005.xml", { "Pos_070104_minoccurs_and_maxoccurs_005.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_070104_minoccurs_and_maxoccurs_005(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070104_minoccurs_and_maxoccurs/Pos_070104_minoccurs_and_maxoccurs_005/Pos_070104_minoccurs_and_maxoccurs_005.xml b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070104_minoccurs_and_maxoccurs/Pos_070104_minoccurs_and_maxoccurs_005/Pos_070104_minoccurs_and_maxoccurs_005.xml new file mode 100644 index 00000000..817efad5 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070104_minoccurs_and_maxoccurs/Pos_070104_minoccurs_and_maxoccurs_005/Pos_070104_minoccurs_and_maxoccurs_005.xml @@ -0,0 +1,9 @@ + + + 1 + 2 + 3 + 4 + 5 + 3.0 + diff --git a/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070104_minoccurs_and_maxoccurs/Pos_070104_minoccurs_and_maxoccurs_005/Pos_070104_minoccurs_and_maxoccurs_005.xsd b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070104_minoccurs_and_maxoccurs/Pos_070104_minoccurs_and_maxoccurs_005/Pos_070104_minoccurs_and_maxoccurs_005.xsd new file mode 100644 index 00000000..d6ba0d83 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070104_minoccurs_and_maxoccurs/Pos_070104_minoccurs_and_maxoccurs_005/Pos_070104_minoccurs_and_maxoccurs_005.xsd @@ -0,0 +1,13 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070104_minoccurs_and_maxoccurs/Pos_070104_minoccurs_and_maxoccurs_006/Pos_070104_minoccurs_and_maxoccurs_006.ttcn b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070104_minoccurs_and_maxoccurs/Pos_070104_minoccurs_and_maxoccurs_006/Pos_070104_minoccurs_and_maxoccurs_006.ttcn new file mode 100644 index 00000000..15e0dd53 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070104_minoccurs_and_maxoccurs/Pos_070104_minoccurs_and_maxoccurs_006/Pos_070104_minoccurs_and_maxoccurs_006.ttcn @@ -0,0 +1,80 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.1.4, A restricted length list [5, 10] should allow 10 elements + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_070104_minoccurs_and_maxoccurs_006 { + + import from schema_Pos_070104_minoccurs_and_maxoccurs_006 language "XSD" all; + + template ElemE15c m_msg := {foo_list := {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}, bar := 3.0} + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_070104_minoccurs_and_maxoccurs_006() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_070104_minoccurs_and_maxoccurs_006.xml", { "Pos_070104_minoccurs_and_maxoccurs_006.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_070104_minoccurs_and_maxoccurs_006(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070104_minoccurs_and_maxoccurs/Pos_070104_minoccurs_and_maxoccurs_006/Pos_070104_minoccurs_and_maxoccurs_006.xml b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070104_minoccurs_and_maxoccurs/Pos_070104_minoccurs_and_maxoccurs_006/Pos_070104_minoccurs_and_maxoccurs_006.xml new file mode 100644 index 00000000..5f1fdf14 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070104_minoccurs_and_maxoccurs/Pos_070104_minoccurs_and_maxoccurs_006/Pos_070104_minoccurs_and_maxoccurs_006.xml @@ -0,0 +1,14 @@ + + + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 3.0 + diff --git a/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070104_minoccurs_and_maxoccurs/Pos_070104_minoccurs_and_maxoccurs_006/Pos_070104_minoccurs_and_maxoccurs_006.xsd b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070104_minoccurs_and_maxoccurs/Pos_070104_minoccurs_and_maxoccurs_006/Pos_070104_minoccurs_and_maxoccurs_006.xsd new file mode 100644 index 00000000..64192b63 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070104_minoccurs_and_maxoccurs/Pos_070104_minoccurs_and_maxoccurs_006/Pos_070104_minoccurs_and_maxoccurs_006.xsd @@ -0,0 +1,13 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070104_minoccurs_and_maxoccurs/Pos_070104_minoccurs_and_maxoccurs_007/Pos_070104_minoccurs_and_maxoccurs_007.ttcn b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070104_minoccurs_and_maxoccurs/Pos_070104_minoccurs_and_maxoccurs_007/Pos_070104_minoccurs_and_maxoccurs_007.ttcn new file mode 100644 index 00000000..f09aa483 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070104_minoccurs_and_maxoccurs/Pos_070104_minoccurs_and_maxoccurs_007/Pos_070104_minoccurs_and_maxoccurs_007.ttcn @@ -0,0 +1,80 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.1.4, A restricted length list [5, 10] should allow 7 elements + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_070104_minoccurs_and_maxoccurs_007 { + + import from schema_Pos_070104_minoccurs_and_maxoccurs_007 language "XSD" all; + + template ElemE15c m_msg := {foo_list := {1, 2, 3, 4, 5, 6, 7}, bar := 15.0} + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_070104_minoccurs_and_maxoccurs_007() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_070104_minoccurs_and_maxoccurs_007.xml", { "Pos_070104_minoccurs_and_maxoccurs_007.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_070104_minoccurs_and_maxoccurs_007(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070104_minoccurs_and_maxoccurs/Pos_070104_minoccurs_and_maxoccurs_007/Pos_070104_minoccurs_and_maxoccurs_007.xml b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070104_minoccurs_and_maxoccurs/Pos_070104_minoccurs_and_maxoccurs_007/Pos_070104_minoccurs_and_maxoccurs_007.xml new file mode 100644 index 00000000..fca38cbb --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070104_minoccurs_and_maxoccurs/Pos_070104_minoccurs_and_maxoccurs_007/Pos_070104_minoccurs_and_maxoccurs_007.xml @@ -0,0 +1,11 @@ + + + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 15.0 + \ No newline at end of file diff --git a/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070104_minoccurs_and_maxoccurs/Pos_070104_minoccurs_and_maxoccurs_007/Pos_070104_minoccurs_and_maxoccurs_007.xsd b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070104_minoccurs_and_maxoccurs/Pos_070104_minoccurs_and_maxoccurs_007/Pos_070104_minoccurs_and_maxoccurs_007.xsd new file mode 100644 index 00000000..37145246 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070104_minoccurs_and_maxoccurs/Pos_070104_minoccurs_and_maxoccurs_007/Pos_070104_minoccurs_and_maxoccurs_007.xsd @@ -0,0 +1,13 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070105_default_and_fixed/Neg_070105_default_and_fixed_001/Neg_070105_default_and_fixed_001.ttcn b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070105_default_and_fixed/Neg_070105_default_and_fixed_001/Neg_070105_default_and_fixed_001.ttcn new file mode 100644 index 00000000..778ec1ee --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070105_default_and_fixed/Neg_070105_default_and_fixed_001/Neg_070105_default_and_fixed_001.ttcn @@ -0,0 +1,54 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.1.5, Verify constraint of type based on XSD definition with fixed attribute + ** @verdict pass reject +***************************************************/ +// The following requirements are tested: +// The fixed attribute applied to attribute or element elements shall be mapped +// to a subtype definition with the single allowed value identical to the value +// of the fixed attribute plus a "defaultForEmpty …" encoding instruction +// identifying the value of the fixed attribute as well. The fixed attribute +// applied to XSD facets shall be ignored. + +module Neg_070105_default_and_fixed_001 { + + import from schema_Neg_070105_default_and_fixed_001 language "XSD" all; + + template MyType m_msg := "notFixedValue"; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type port P message { + inout all; + } + + type component C { + port P p; + } + + testcase TC_Neg_070105_default_and_fixed_001() runs on C system C { + map(self:p, system:p); + + // encode the message + p.send(m_msg); + log("template should either be rejected by compiler or by runtime latest while encoding"); + + setverdict(fail, "Invalid template should not be encoded"); + + unmap(self:p, system:p); + } + + control { + execute(TC_Neg_070105_default_and_fixed_001(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070105_default_and_fixed/Neg_070105_default_and_fixed_001/Neg_070105_default_and_fixed_001.xsd b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070105_default_and_fixed/Neg_070105_default_and_fixed_001/Neg_070105_default_and_fixed_001.xsd new file mode 100644 index 00000000..19b2046d --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070105_default_and_fixed/Neg_070105_default_and_fixed_001/Neg_070105_default_and_fixed_001.xsd @@ -0,0 +1,6 @@ + + + + diff --git a/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070105_default_and_fixed/Pos_070105_default_and_fixed_001/Pos_070105_default_and_fixed_001.ttcn b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070105_default_and_fixed/Pos_070105_default_and_fixed_001/Pos_070105_default_and_fixed_001.ttcn new file mode 100644 index 00000000..ebe02323 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070105_default_and_fixed/Pos_070105_default_and_fixed_001/Pos_070105_default_and_fixed_001.ttcn @@ -0,0 +1,88 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.1.5, Verify conversion of fixed attribute + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// The fixed attribute applied to attribute or element elements shall be mapped +// to a subtype definition with the single allowed value identical to the value +// of the fixed attribute plus a "defaultForEmpty …" encoding instruction +// identifying the value of the fixed attribute as well. The fixed attribute +// applied to XSD facets shall be ignored. + +module Pos_070105_default_and_fixed_001 { + + import from schema_Pos_070105_default_and_fixed_001 language "XSD" all; + + template MyType m_msg := "fixedValue"; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_070105_default_and_fixed_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_070105_default_and_fixed_001.xml", { "Pos_070105_default_and_fixed_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_070105_default_and_fixed_001(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070105_default_and_fixed/Pos_070105_default_and_fixed_001/Pos_070105_default_and_fixed_001.xml b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070105_default_and_fixed/Pos_070105_default_and_fixed_001/Pos_070105_default_and_fixed_001.xml new file mode 100644 index 00000000..d02071b9 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070105_default_and_fixed/Pos_070105_default_and_fixed_001/Pos_070105_default_and_fixed_001.xml @@ -0,0 +1,2 @@ + +fixedValue \ No newline at end of file diff --git a/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070105_default_and_fixed/Pos_070105_default_and_fixed_001/Pos_070105_default_and_fixed_001.xsd b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070105_default_and_fixed/Pos_070105_default_and_fixed_001/Pos_070105_default_and_fixed_001.xsd new file mode 100644 index 00000000..97ef8b4f --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070105_default_and_fixed/Pos_070105_default_and_fixed_001/Pos_070105_default_and_fixed_001.xsd @@ -0,0 +1,6 @@ + + + + diff --git a/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070105_default_and_fixed/Pos_070105_default_and_fixed_002/Pos_070105_default_and_fixed_002.ttcn b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070105_default_and_fixed/Pos_070105_default_and_fixed_002/Pos_070105_default_and_fixed_002.ttcn new file mode 100644 index 00000000..6b17f0a3 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070105_default_and_fixed/Pos_070105_default_and_fixed_002/Pos_070105_default_and_fixed_002.ttcn @@ -0,0 +1,87 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.1.5, Verify conversion of default attribute + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// As default has no equivalent in TTCN-3 space, it shall be mapped to +// a "defaultForEmpty …" encoding instruction. + +module Pos_070105_default_and_fixed_002 { + + import from schema_Pos_070105_default_and_fixed_002 language "XSD" all; + + template MyType m_msg := { + foo := "foo" + }; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_070105_default_and_fixed_002() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_070105_default_and_fixed_002.xml", { "Pos_070105_default_and_fixed_002.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_070105_default_and_fixed_002(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070105_default_and_fixed/Pos_070105_default_and_fixed_002/Pos_070105_default_and_fixed_002.xml b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070105_default_and_fixed/Pos_070105_default_and_fixed_002/Pos_070105_default_and_fixed_002.xml new file mode 100644 index 00000000..e8ca2351 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070105_default_and_fixed/Pos_070105_default_and_fixed_002/Pos_070105_default_and_fixed_002.xml @@ -0,0 +1,4 @@ + + + foo + \ No newline at end of file diff --git a/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070105_default_and_fixed/Pos_070105_default_and_fixed_002/Pos_070105_default_and_fixed_002.xsd b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070105_default_and_fixed/Pos_070105_default_and_fixed_002/Pos_070105_default_and_fixed_002.xsd new file mode 100644 index 00000000..30a096af --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070105_default_and_fixed/Pos_070105_default_and_fixed_002/Pos_070105_default_and_fixed_002.xsd @@ -0,0 +1,12 @@ + + + + + + + + + + diff --git a/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070105_default_and_fixed/Pos_070105_default_and_fixed_003/Pos_070105_default_and_fixed_003.ttcn b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070105_default_and_fixed/Pos_070105_default_and_fixed_003/Pos_070105_default_and_fixed_003.ttcn new file mode 100644 index 00000000..0e1ca88d --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070105_default_and_fixed/Pos_070105_default_and_fixed_003/Pos_070105_default_and_fixed_003.ttcn @@ -0,0 +1,82 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.1.5, Verify that default value is automatically assigned to empty element by decoder + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// As default has no equivalent in TTCN-3 space, it shall be mapped to +// a "defaultForEmpty …" encoding instruction. +// From B.3.7: This encoding instruction ... designates that the decoder shall +// insert the value specified by freetext if the corresponding attribute is +// omitted or when the corresponding element appears without any content in the +// XML instance being decoded; it has no effect in other cases. +//////////////////////////////////////////////////////////////////////////////// + +module Pos_070105_default_and_fixed_003 { + + import from schema_Pos_070105_default_and_fixed_003 language "XSD" all; + + template MyType m_msg := { + foo := "foo" + }; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc Read a UTF-8 formated XML file from disc. + * @param p_referenceXmlFile the XML file + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return the UTF-8 contents of p_referenceXmlFile + */ + external function readFile(universal charstring p_referenceXmlFile, universal charstring p_referenceTTCN3File := __FILE__) return universal charstring; + + testcase TC_Pos_070105_default_and_fixed_003() runs on C system C { + var Raw v_rcv; + + map(self:p, system:p); + + v_rcv := readFile("Pos_070105_default_and_fixed_003.xml"); + + // send the encoded the message + p.send(v_rcv); + + alt { + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + alt { + // decode the message + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches template"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_070105_default_and_fixed_003(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070105_default_and_fixed/Pos_070105_default_and_fixed_003/Pos_070105_default_and_fixed_003.xml b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070105_default_and_fixed/Pos_070105_default_and_fixed_003/Pos_070105_default_and_fixed_003.xml new file mode 100644 index 00000000..43fb9804 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070105_default_and_fixed/Pos_070105_default_and_fixed_003/Pos_070105_default_and_fixed_003.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070105_default_and_fixed/Pos_070105_default_and_fixed_003/Pos_070105_default_and_fixed_003.xsd b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070105_default_and_fixed/Pos_070105_default_and_fixed_003/Pos_070105_default_and_fixed_003.xsd new file mode 100644 index 00000000..3247045a --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070105_default_and_fixed/Pos_070105_default_and_fixed_003/Pos_070105_default_and_fixed_003.xsd @@ -0,0 +1,12 @@ + + + + + + + + + + diff --git a/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070105_default_and_fixed/Pos_070105_default_and_fixed_004/Pos_070105_default_and_fixed_004.ttcn b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070105_default_and_fixed/Pos_070105_default_and_fixed_004/Pos_070105_default_and_fixed_004.ttcn new file mode 100644 index 00000000..b87bbc8c --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070105_default_and_fixed/Pos_070105_default_and_fixed_004/Pos_070105_default_and_fixed_004.ttcn @@ -0,0 +1,84 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.1.5, Verify that fixed value is automatically assigned to empty element by decoder + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// The fixed attribute applied to attribute or element elements shall be mapped +// to a subtype definition with the single allowed value identical to the value +// of the fixed attribute plus a "defaultForEmpty …" encoding instruction +// identifying the value of the fixed attribute as well. +// From B.3.7: This encoding instruction ... designates that the decoder shall +// insert the value specified by freetext if the corresponding attribute is +// omitted or when the corresponding element appears without any content in the +// XML instance being decoded; it has no effect in other cases. +//////////////////////////////////////////////////////////////////////////////// + +module Pos_070105_default_and_fixed_004 { + + import from schema_Pos_070105_default_and_fixed_004 language "XSD" all; + + template MyType m_msg := { + foo := "foo" + }; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc Read a UTF-8 formated XML file from disc. + * @param p_referenceXmlFile the XML file + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return the UTF-8 contents of p_referenceXmlFile + */ + external function readFile(universal charstring p_referenceXmlFile, universal charstring p_referenceTTCN3File := __FILE__) return universal charstring; + + testcase TC_Pos_070105_default_and_fixed_004() runs on C system C { + var Raw v_rcv; + + map(self:p, system:p); + + v_rcv := readFile("Pos_070105_default_and_fixed_004.xml"); + + // send the encoded the message + p.send(v_rcv); + + alt { + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + alt { + // decode the message + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches template"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_070105_default_and_fixed_004(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070105_default_and_fixed/Pos_070105_default_and_fixed_004/Pos_070105_default_and_fixed_004.xml b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070105_default_and_fixed/Pos_070105_default_and_fixed_004/Pos_070105_default_and_fixed_004.xml new file mode 100644 index 00000000..2c61b108 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070105_default_and_fixed/Pos_070105_default_and_fixed_004/Pos_070105_default_and_fixed_004.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070105_default_and_fixed/Pos_070105_default_and_fixed_004/Pos_070105_default_and_fixed_004.xsd b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070105_default_and_fixed/Pos_070105_default_and_fixed_004/Pos_070105_default_and_fixed_004.xsd new file mode 100644 index 00000000..abea4ade --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070105_default_and_fixed/Pos_070105_default_and_fixed_004/Pos_070105_default_and_fixed_004.xsd @@ -0,0 +1,12 @@ + + + + + + + + + + diff --git a/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_001/Pos_070106_form_001.ttcn b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_001/Pos_070106_form_001.ttcn new file mode 100644 index 00000000..07811070 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_001/Pos_070106_form_001.ttcn @@ -0,0 +1,91 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.1.6, Verify that unqualified attribute form is correctly converted (unqualified attributeFormDefault) + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// If the value of the form attribute is ... unqualified and no +// attributeFormQualified encoding instruction is assigned to the corresponding +// TTCN-3 module, the form attribute shall be ignored. + +module Pos_070106_form_001 { + + import from schema_Pos_070106_form_001 language "XSD" all; + + template MyType m_msg := { + foo := { + attr := "attr", + base := 5 + } + }; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_070106_form_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_070106_form_001.xml", { "Pos_070106_form_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_070106_form_001(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_001/Pos_070106_form_001.xml b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_001/Pos_070106_form_001.xml new file mode 100644 index 00000000..b45fa50f --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_001/Pos_070106_form_001.xml @@ -0,0 +1,4 @@ + + + 5 + \ No newline at end of file diff --git a/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_001/Pos_070106_form_001.xsd b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_001/Pos_070106_form_001.xsd new file mode 100644 index 00000000..3ce47e7e --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_001/Pos_070106_form_001.xsd @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + diff --git a/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_002/Pos_070106_form_002.ttcn b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_002/Pos_070106_form_002.ttcn new file mode 100644 index 00000000..1356948e --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_002/Pos_070106_form_002.ttcn @@ -0,0 +1,93 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.1.6, Verify that unqualified attribute form is correctly converted (qualified attributeFormDefault) + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// If the value of a form attribute of an XSD attribute declaration is +// unqualified and the attributeFormQualified encoding instruction is attached +// to the target TTCN-3 module ... a "form as unqualified" encoding instruction +// shall be attached to the TTCN-3 field resulted from mapping the given XSD +// attribute ... declaration. + +module Pos_070106_form_002 { + + import from schema_Pos_070106_form_002 language "XSD" all; + + template MyType m_msg := { + foo := { + attr := "attr", + base := 5 + } + }; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_070106_form_002() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_070106_form_002.xml", { "Pos_070106_form_002.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_070106_form_002(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_002/Pos_070106_form_002.xml b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_002/Pos_070106_form_002.xml new file mode 100644 index 00000000..0688535f --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_002/Pos_070106_form_002.xml @@ -0,0 +1,4 @@ + + + 5 + \ No newline at end of file diff --git a/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_002/Pos_070106_form_002.xsd b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_002/Pos_070106_form_002.xsd new file mode 100644 index 00000000..f7320229 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_002/Pos_070106_form_002.xsd @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + diff --git a/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_003/Pos_070106_form_003.ttcn b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_003/Pos_070106_form_003.ttcn new file mode 100644 index 00000000..6cb03c17 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_003/Pos_070106_form_003.ttcn @@ -0,0 +1,94 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.1.6, Verify that qualified attribute form is correctly converted (unqualified attributeFormDefault) + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// If the value of a form attribute of an XSD attribute declaration is qualified +// and no attributeFormQualified encoding instruction is attached to the target +// TTCN-3 module ... a "form as qualified" encoding instruction shall be +// attached to the TTCN-3 field resulted from mapping the given XSD attribute +// ... declaration. +//////////////////////////////////////////////////////////////////////////////// + +module Pos_070106_form_003 { + + import from schema_Pos_070106_form_003 language "XSD" all; + + template MyType m_msg := { + foo := { + attr := "attr", + base := 5 + } + }; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_070106_form_003() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_070106_form_003.xml", { "Pos_070106_form_003.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_070106_form_003(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_003/Pos_070106_form_003.xml b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_003/Pos_070106_form_003.xml new file mode 100644 index 00000000..eb484089 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_003/Pos_070106_form_003.xml @@ -0,0 +1,4 @@ + + + 5 + \ No newline at end of file diff --git a/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_003/Pos_070106_form_003.xsd b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_003/Pos_070106_form_003.xsd new file mode 100644 index 00000000..3b4641db --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_003/Pos_070106_form_003.xsd @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + diff --git a/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_004/Pos_070106_form_004.ttcn b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_004/Pos_070106_form_004.ttcn new file mode 100644 index 00000000..8684d29d --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_004/Pos_070106_form_004.ttcn @@ -0,0 +1,92 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.1.6, Verify that qualified attribute form is correctly converted (qualified attributeFormDefault) + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// If the value of the form attribute is qualified and the +// attributeFormQualified encoding instruction is attached to the TTCN-3 module +// the given XSD declaration contributes to ... the form attribute shall be +// ignored. + +module Pos_070106_form_004 { + + import from schema_Pos_070106_form_004 language "XSD" all; + + template MyType m_msg := { + foo := { + attr := "attr", + base := 5 + } + }; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_070106_form_004() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_070106_form_004.xml", { "Pos_070106_form_004.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_070106_form_004(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_004/Pos_070106_form_004.xml b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_004/Pos_070106_form_004.xml new file mode 100644 index 00000000..f5a0e995 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_004/Pos_070106_form_004.xml @@ -0,0 +1,4 @@ + + + 5 + \ No newline at end of file diff --git a/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_004/Pos_070106_form_004.xsd b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_004/Pos_070106_form_004.xsd new file mode 100644 index 00000000..300e5086 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_004/Pos_070106_form_004.xsd @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + diff --git a/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_005/Pos_070106_form_005.ttcn b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_005/Pos_070106_form_005.ttcn new file mode 100644 index 00000000..df8cb06e --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_005/Pos_070106_form_005.ttcn @@ -0,0 +1,88 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.1.6, Verify that unqualified element form is correctly converted (unqualified elementFormDefault) + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// The XSD form attribute controls if an attribute or element tag shall be +// encoded in XML by using a qualified or unqualified name. The values of the +// form attributes shall be preserved in the "form as…" encoding instructions. + +module Pos_070106_form_005 { + + import from schema_Pos_070106_form_005 language "XSD" all; + + template MyType m_msg := { + foo := "foo" + }; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_070106_form_005() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_070106_form_005.xml", { "Pos_070106_form_005.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_070106_form_005(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_005/Pos_070106_form_005.xml b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_005/Pos_070106_form_005.xml new file mode 100644 index 00000000..839cce45 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_005/Pos_070106_form_005.xml @@ -0,0 +1,4 @@ + + + foo + \ No newline at end of file diff --git a/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_005/Pos_070106_form_005.xsd b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_005/Pos_070106_form_005.xsd new file mode 100644 index 00000000..3104ce7d --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_005/Pos_070106_form_005.xsd @@ -0,0 +1,12 @@ + + + + + + + + + + diff --git a/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_006/Pos_070106_form_006.ttcn b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_006/Pos_070106_form_006.ttcn new file mode 100644 index 00000000..c1306112 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_006/Pos_070106_form_006.ttcn @@ -0,0 +1,91 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.1.6, Verify that unqualified element form is correctly converted (qualified elementFormDefault) + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// If ... the value of a form attribute of an element declaration is unqualified +// and the elementFormQualified encoding instruction is attached to the target +// TTCN-3 module, a "form as unqualified" encoding instruction shall be attached +// to the TTCN-3 field resulted from mapping the given XSD ... element +// declaration. +//////////////////////////////////////////////////////////////////////////////// + +module Pos_070106_form_006 { + + import from schema_Pos_070106_form_006 language "XSD" all; + + template MyType m_msg := { + foo := "foo" + }; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_070106_form_006() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_070106_form_006.xml", { "Pos_070106_form_006.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_070106_form_006(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_006/Pos_070106_form_006.xml b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_006/Pos_070106_form_006.xml new file mode 100644 index 00000000..915880ad --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_006/Pos_070106_form_006.xml @@ -0,0 +1,4 @@ + + + foo + \ No newline at end of file diff --git a/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_006/Pos_070106_form_006.xsd b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_006/Pos_070106_form_006.xsd new file mode 100644 index 00000000..4b12e734 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_006/Pos_070106_form_006.xsd @@ -0,0 +1,13 @@ + + + + + + + + + + diff --git a/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_007/Pos_070106_form_007.ttcn b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_007/Pos_070106_form_007.ttcn new file mode 100644 index 00000000..742ca7e3 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_007/Pos_070106_form_007.ttcn @@ -0,0 +1,90 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.1.6, Verify that qualified element form is correctly converted (unqualified elementFormDefault) + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// If ... the value of a form attribute of an element declaration is qualified +// and no elementFormQualified encoding instruction is attached to the target +// TTCN-3 module, a "form as qualified" encoding instruction shall be attached +// to the TTCN-3 field resulted from mapping the given XSD attribute or element +// declaration. + +module Pos_070106_form_007 { + + import from schema_Pos_070106_form_007 language "XSD" all; + + template MyType m_msg := { + foo:="foo" + }; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_070106_form_007() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_070106_form_007.xml", { "Pos_070106_form_007.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_070106_form_007(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_007/Pos_070106_form_007.xml b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_007/Pos_070106_form_007.xml new file mode 100644 index 00000000..66253554 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_007/Pos_070106_form_007.xml @@ -0,0 +1,4 @@ + + + foo + \ No newline at end of file diff --git a/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_007/Pos_070106_form_007.xsd b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_007/Pos_070106_form_007.xsd new file mode 100644 index 00000000..0cb9a6fc --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_007/Pos_070106_form_007.xsd @@ -0,0 +1,12 @@ + + + + + + + + + + diff --git a/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_008/Pos_070106_form_008.ttcn b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_008/Pos_070106_form_008.ttcn new file mode 100644 index 00000000..1e1c672b --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_008/Pos_070106_form_008.ttcn @@ -0,0 +1,88 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.1.6, Verify that qualified element form is correctly converted (qualified elementFormDefault) + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// The XSD form attribute controls if an attribute or element tag shall be +// encoded in XML by using a qualified or unqualified name. The values of the +// form attributes shall be preserved in the "form as…" encoding instructions. + +module Pos_070106_form_008 { + + import from schema_Pos_070106_form_008 language "XSD" all; + + template MyType m_msg := { + foo := "foo" + }; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_070106_form_008() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_070106_form_008.xml", { "Pos_070106_form_008.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_070106_form_008(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_008/Pos_070106_form_008.xml b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_008/Pos_070106_form_008.xml new file mode 100644 index 00000000..a77a15bb --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_008/Pos_070106_form_008.xml @@ -0,0 +1,4 @@ + + + foo + \ No newline at end of file diff --git a/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_008/Pos_070106_form_008.xsd b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_008/Pos_070106_form_008.xsd new file mode 100644 index 00000000..cf7c401b --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_008/Pos_070106_form_008.xsd @@ -0,0 +1,13 @@ + + + + + + + + + + diff --git a/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_009/Pos_070106_form_009.ttcn b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_009/Pos_070106_form_009.ttcn new file mode 100644 index 00000000..b87fe1cb --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_009/Pos_070106_form_009.ttcn @@ -0,0 +1,84 @@ +/*************************************************** + ** @author STF 475, updated by STF 521 + ** @version 0.0.2 + ** @purpose 9:7.1.6, check correct namespace prefix encoding for elementFormDefault + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_070106_form_009 { + + import from schema_Pos_070106_form_009 language "XSD" all; + + template MyElement m_msg := { + myField := 1, + myField2 := {myField := 2}, + myElement := {myField := 3} + } + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_070106_form_009() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_070106_form_009.xml", { "Pos_070106_form_009.xsd", "Pos_070106_form_009_2.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_070106_form_009(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_009/Pos_070106_form_009.xml b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_009/Pos_070106_form_009.xml new file mode 100644 index 00000000..4ea7d998 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_009/Pos_070106_form_009.xml @@ -0,0 +1,11 @@ + + + 1 + + 2 + + + 3 + + diff --git a/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_009/Pos_070106_form_009.xsd b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_009/Pos_070106_form_009.xsd new file mode 100644 index 00000000..6e31ce8a --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_009/Pos_070106_form_009.xsd @@ -0,0 +1,17 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_009/Pos_070106_form_009_2.xsd b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_009/Pos_070106_form_009_2.xsd new file mode 100644 index 00000000..fc15b471 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_009/Pos_070106_form_009_2.xsd @@ -0,0 +1,12 @@ + + + + + + + + + \ No newline at end of file diff --git a/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_010/Pos_070106_form_010.ttcn b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_010/Pos_070106_form_010.ttcn new file mode 100644 index 00000000..8a886009 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_010/Pos_070106_form_010.ttcn @@ -0,0 +1,84 @@ +/*************************************************** + ** @author STF 487, updated by STF 521 + ** @version 0.0.1 + ** @purpose 9:7.1.6, check correct namespace prefix encoding for elementFormDefault + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_070106_form_010 { + + import from schema_Pos_070106_form_010 language "XSD" all; + + template MyElement m_msg := { + myField := 1, + myField2 := {myField := 2}, + myElement := {myField := 3} + } + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_070106_form_010() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_070106_form_010.xml", { "Pos_070106_form_010.xsd", "Pos_070106_form_010_2.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_070106_form_010(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_010/Pos_070106_form_010.xml b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_010/Pos_070106_form_010.xml new file mode 100644 index 00000000..46382598 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_010/Pos_070106_form_010.xml @@ -0,0 +1,11 @@ + + + 1 + + 2 + + + 3 + + diff --git a/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_010/Pos_070106_form_010.xsd b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_010/Pos_070106_form_010.xsd new file mode 100644 index 00000000..da2d32b4 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_010/Pos_070106_form_010.xsd @@ -0,0 +1,17 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_010/Pos_070106_form_010_2.xsd b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_010/Pos_070106_form_010_2.xsd new file mode 100644 index 00000000..375d9a50 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_010/Pos_070106_form_010_2.xsd @@ -0,0 +1,12 @@ + + + + + + + + + \ No newline at end of file diff --git a/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_011/Pos_070106_form_011.ttcn b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_011/Pos_070106_form_011.ttcn new file mode 100644 index 00000000..b43cec1e --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_011/Pos_070106_form_011.ttcn @@ -0,0 +1,84 @@ +/*************************************************** + ** @author STF 487, updated by STF 521 + ** @version 0.0.1 + ** @purpose 9:7.1.6, check correct namespace prefix encoding for attributeFormDefault + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_070106_form_011 { + + import from schema_Pos_070106_form_011 language "XSD" all; + + template MyElement m_msg := { + myField := 1, + myField2 := {2}, + myElement := {3} + } + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_070106_form_011() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_070106_form_011.xml", { "Pos_070106_form_011.xsd", "Pos_070106_form_011_2.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_070106_form_011(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_011/Pos_070106_form_011.xml b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_011/Pos_070106_form_011.xml new file mode 100644 index 00000000..d391957d --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_011/Pos_070106_form_011.xml @@ -0,0 +1,7 @@ + + + + + diff --git a/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_011/Pos_070106_form_011.xsd b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_011/Pos_070106_form_011.xsd new file mode 100644 index 00000000..270421ae --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_011/Pos_070106_form_011.xsd @@ -0,0 +1,17 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_011/Pos_070106_form_011_2.xsd b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_011/Pos_070106_form_011_2.xsd new file mode 100644 index 00000000..167c68be --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_011/Pos_070106_form_011_2.xsd @@ -0,0 +1,10 @@ + + + + + + + \ No newline at end of file diff --git a/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_012/Pos_070106_form_012.ttcn b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_012/Pos_070106_form_012.ttcn new file mode 100644 index 00000000..d8ad553e --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_012/Pos_070106_form_012.ttcn @@ -0,0 +1,84 @@ +/*************************************************** + ** @author STF 487, updated by STF 521 + ** @version 0.0.1 + ** @purpose 9:7.1.6, check correct namespace prefix encoding for attributeFormDefault + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_070106_form_012 { + + import from schema_Pos_070106_form_012 language "XSD" all; + + template MyElement m_msg := { + myField := 1, + myField2 := {2}, + myElement := {3} + } + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_070106_form_012() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_070106_form_012.xml", { "Pos_070106_form_012.xsd", "Pos_070106_form_012_2.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_070106_form_012(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_012/Pos_070106_form_012.xml b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_012/Pos_070106_form_012.xml new file mode 100644 index 00000000..d0d8627a --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_012/Pos_070106_form_012.xml @@ -0,0 +1,7 @@ + + + + + diff --git a/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_012/Pos_070106_form_012.xsd b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_012/Pos_070106_form_012.xsd new file mode 100644 index 00000000..890710f8 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_012/Pos_070106_form_012.xsd @@ -0,0 +1,17 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_012/Pos_070106_form_012_2.xsd b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_012/Pos_070106_form_012_2.xsd new file mode 100644 index 00000000..edd09d1d --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_012/Pos_070106_form_012_2.xsd @@ -0,0 +1,10 @@ + + + + + + + \ No newline at end of file diff --git a/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070107_type/Pos_070107_type_001/Pos_070107_type_001.ttcn b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070107_type/Pos_070107_type_001/Pos_070107_type_001.ttcn new file mode 100644 index 00000000..97be4cc6 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070107_type/Pos_070107_type_001/Pos_070107_type_001.ttcn @@ -0,0 +1,85 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.1.7, Verify conversion of type attribute referencing global simpleType + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// The XSD type attribute holds the type information of the XSD component. The +// value is a reference to the global definition of simpleType. + +module Pos_070107_type_001 { + + import from schema_Pos_070107_type_001 language "XSD" all; + + template MyType m_msg := 5; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_070107_type_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_070107_type_001.xml", { "Pos_070107_type_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_070107_type_001(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070107_type/Pos_070107_type_001/Pos_070107_type_001.xml b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070107_type/Pos_070107_type_001/Pos_070107_type_001.xml new file mode 100644 index 00000000..cfbe7361 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070107_type/Pos_070107_type_001/Pos_070107_type_001.xml @@ -0,0 +1,2 @@ + +5 \ No newline at end of file diff --git a/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070107_type/Pos_070107_type_001/Pos_070107_type_001.xsd b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070107_type/Pos_070107_type_001/Pos_070107_type_001.xsd new file mode 100644 index 00000000..68a59ebb --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070107_type/Pos_070107_type_001/Pos_070107_type_001.xsd @@ -0,0 +1,9 @@ + + + + + + + diff --git a/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070107_type/Pos_070107_type_002/Pos_070107_type_002.ttcn b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070107_type/Pos_070107_type_002/Pos_070107_type_002.ttcn new file mode 100644 index 00000000..c4e55116 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070107_type/Pos_070107_type_002/Pos_070107_type_002.ttcn @@ -0,0 +1,88 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.1.7, Verify conversion of type attribute referencing global complexType + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// The XSD type attribute holds the type information of the XSD component. The +// value is a reference to the global definition of complexType. + +module Pos_070107_type_002 { + + import from schema_Pos_070107_type_002 language "XSD" all; + + template MyType m_msg := { + foo := "foo", + bar := 2 + }; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_070107_type_002() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_070107_type_002.xml", { "Pos_070107_type_002.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_070107_type_002(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070107_type/Pos_070107_type_002/Pos_070107_type_002.xml b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070107_type/Pos_070107_type_002/Pos_070107_type_002.xml new file mode 100644 index 00000000..7d98cdae --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070107_type/Pos_070107_type_002/Pos_070107_type_002.xml @@ -0,0 +1,5 @@ + + + foo + 2 + \ No newline at end of file diff --git a/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070107_type/Pos_070107_type_002/Pos_070107_type_002.xsd b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070107_type/Pos_070107_type_002/Pos_070107_type_002.xsd new file mode 100644 index 00000000..1681d69e --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070107_type/Pos_070107_type_002/Pos_070107_type_002.xsd @@ -0,0 +1,12 @@ + + + + + + + + + + diff --git a/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070107_type/Pos_070107_type_003/Pos_070107_type_003.ttcn b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070107_type/Pos_070107_type_003/Pos_070107_type_003.ttcn new file mode 100644 index 00000000..a67ec000 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070107_type/Pos_070107_type_003/Pos_070107_type_003.ttcn @@ -0,0 +1,85 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.1.7, Verify conversion of type attribute referencing built-in type + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// The XSD type attribute holds the type information of the XSD component. The +// value is a reference to the global definition of a built-in type. + +module Pos_070107_type_003 { + + import from schema_Pos_070107_type_003 language "XSD" all; + + template MyType m_msg := 5; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_070107_type_003() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_070107_type_003.xml", { "Pos_070107_type_003.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_070107_type_003(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070107_type/Pos_070107_type_003/Pos_070107_type_003.xml b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070107_type/Pos_070107_type_003/Pos_070107_type_003.xml new file mode 100644 index 00000000..a42c819a --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070107_type/Pos_070107_type_003/Pos_070107_type_003.xml @@ -0,0 +1,2 @@ + +5 \ No newline at end of file diff --git a/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070107_type/Pos_070107_type_003/Pos_070107_type_003.xsd b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070107_type/Pos_070107_type_003/Pos_070107_type_003.xsd new file mode 100644 index 00000000..0456e0be --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070107_type/Pos_070107_type_003/Pos_070107_type_003.xsd @@ -0,0 +1,6 @@ + + + + diff --git a/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070111_nillable/Pos_070111_nillable_001/Pos_070111_nillable_001.ttcn b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070111_nillable/Pos_070111_nillable_001/Pos_070111_nillable_001.ttcn new file mode 100644 index 00000000..346a5b49 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070111_nillable/Pos_070111_nillable_001/Pos_070111_nillable_001.ttcn @@ -0,0 +1,90 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 9:7.1.11, Simple nillable type (nil option) + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// A simple-type nillable XSD element shall be mapped to a TTCN-3 record type (in case of global +// elements) or field (in case of local elements), with the name resulted by applying clause 5.2.2 +// to the name of the corresponding element. The record type or field shall contain one optional +// field with the name "content" and its type shall be the TTCN 3 type of the element. The record +// type or field shall be appended with the "useNil" encoding instruction. + +module Pos_070111_nillable_001 { + + import from schema_Pos_070111_nillable_001 language "XSD" all; + + template MyType m_msg := { + content := omit + }; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_070111_nillable_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_070111_nillable_001.xml", { "Pos_070111_nillable_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_070111_nillable_001(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070111_nillable/Pos_070111_nillable_001/Pos_070111_nillable_001.xml b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070111_nillable/Pos_070111_nillable_001/Pos_070111_nillable_001.xml new file mode 100644 index 00000000..aae38b47 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070111_nillable/Pos_070111_nillable_001/Pos_070111_nillable_001.xml @@ -0,0 +1,2 @@ + + diff --git a/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070111_nillable/Pos_070111_nillable_001/Pos_070111_nillable_001.xsd b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070111_nillable/Pos_070111_nillable_001/Pos_070111_nillable_001.xsd new file mode 100644 index 00000000..9eb5f44a --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070111_nillable/Pos_070111_nillable_001/Pos_070111_nillable_001.xsd @@ -0,0 +1,6 @@ + + + + diff --git a/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070111_nillable/Pos_070111_nillable_002/Pos_070111_nillable_002.ttcn b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070111_nillable/Pos_070111_nillable_002/Pos_070111_nillable_002.ttcn new file mode 100644 index 00000000..86c21192 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070111_nillable/Pos_070111_nillable_002/Pos_070111_nillable_002.ttcn @@ -0,0 +1,90 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 9:7.1.11, Simple nillable type (value option) + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// A simple-type nillable XSD element shall be mapped to a TTCN-3 record type (in case of global +// elements) or field (in case of local elements), with the name resulted by applying clause 5.2.2 +// to the name of the corresponding element. The record type or field shall contain one optional +// field with the name "content" and its type shall be the TTCN 3 type of the element. The record +// type or field shall be appended with the "useNil" encoding instruction. + +module Pos_070111_nillable_002 { + + import from schema_Pos_070111_nillable_002 language "XSD" all; + + template MyType m_msg := { + content := "abc" + }; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_070111_nillable_002() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_070111_nillable_002.xml", { "Pos_070111_nillable_002.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_070111_nillable_002(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070111_nillable/Pos_070111_nillable_002/Pos_070111_nillable_002.xml b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070111_nillable/Pos_070111_nillable_002/Pos_070111_nillable_002.xml new file mode 100644 index 00000000..2ddca687 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070111_nillable/Pos_070111_nillable_002/Pos_070111_nillable_002.xml @@ -0,0 +1,2 @@ + +abc diff --git a/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070111_nillable/Pos_070111_nillable_002/Pos_070111_nillable_002.xsd b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070111_nillable/Pos_070111_nillable_002/Pos_070111_nillable_002.xsd new file mode 100644 index 00000000..c2fdced4 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070111_nillable/Pos_070111_nillable_002/Pos_070111_nillable_002.xsd @@ -0,0 +1,6 @@ + + + + diff --git a/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070111_nillable/Pos_070111_nillable_003/Pos_070111_nillable_003.ttcn b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070111_nillable/Pos_070111_nillable_003/Pos_070111_nillable_003.ttcn new file mode 100644 index 00000000..bdefe781 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070111_nillable/Pos_070111_nillable_003/Pos_070111_nillable_003.ttcn @@ -0,0 +1,93 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 9:7.1.11, Nillable element of simple type inside sequence (nil option) + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// A simple-type nillable XSD element shall be mapped to a TTCN-3 record type (in case of global +// elements) or field (in case of local elements), with the name resulted by applying clause 5.2.2 +// to the name of the corresponding element. The record type or field shall contain one optional +// field with the name "content" and its type shall be the TTCN 3 type of the element. The record +// type or field shall be appended with the "useNil" encoding instruction. + +module Pos_070111_nillable_003 { + + import from schema_Pos_070111_nillable_003 language "XSD" all; + + template MyType m_msg := { + foo := 1, + bar := { + content := omit + } + }; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_070111_nillable_003() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_070111_nillable_003.xml", { "Pos_070111_nillable_003.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_070111_nillable_003(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070111_nillable/Pos_070111_nillable_003/Pos_070111_nillable_003.xml b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070111_nillable/Pos_070111_nillable_003/Pos_070111_nillable_003.xml new file mode 100644 index 00000000..6b1c5d9b --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070111_nillable/Pos_070111_nillable_003/Pos_070111_nillable_003.xml @@ -0,0 +1,5 @@ + + + 1 + + diff --git a/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070111_nillable/Pos_070111_nillable_003/Pos_070111_nillable_003.xsd b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070111_nillable/Pos_070111_nillable_003/Pos_070111_nillable_003.xsd new file mode 100644 index 00000000..887c224d --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070111_nillable/Pos_070111_nillable_003/Pos_070111_nillable_003.xsd @@ -0,0 +1,13 @@ + + + + + + + + + + + diff --git a/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070111_nillable/Pos_070111_nillable_004/Pos_070111_nillable_004.ttcn b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070111_nillable/Pos_070111_nillable_004/Pos_070111_nillable_004.ttcn new file mode 100644 index 00000000..83cda805 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070111_nillable/Pos_070111_nillable_004/Pos_070111_nillable_004.ttcn @@ -0,0 +1,93 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 9:7.1.11, Nillable element of simple type inside sequence (value option) + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// A simple-type nillable XSD element shall be mapped to a TTCN-3 record type (in case of global +// elements) or field (in case of local elements), with the name resulted by applying clause 5.2.2 +// to the name of the corresponding element. The record type or field shall contain one optional +// field with the name "content" and its type shall be the TTCN 3 type of the element. The record +// type or field shall be appended with the "useNil" encoding instruction. + +module Pos_070111_nillable_004 { + + import from schema_Pos_070111_nillable_004 language "XSD" all; + + template MyType m_msg := { + foo := 1, + bar := { + content := "abc" + } + }; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_070111_nillable_004() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_070111_nillable_004.xml", { "Pos_070111_nillable_004.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_070111_nillable_004(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070111_nillable/Pos_070111_nillable_004/Pos_070111_nillable_004.xml b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070111_nillable/Pos_070111_nillable_004/Pos_070111_nillable_004.xml new file mode 100644 index 00000000..97e5890e --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070111_nillable/Pos_070111_nillable_004/Pos_070111_nillable_004.xml @@ -0,0 +1,5 @@ + + + 1 + abc + diff --git a/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070111_nillable/Pos_070111_nillable_004/Pos_070111_nillable_004.xsd b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070111_nillable/Pos_070111_nillable_004/Pos_070111_nillable_004.xsd new file mode 100644 index 00000000..56fed89c --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070111_nillable/Pos_070111_nillable_004/Pos_070111_nillable_004.xsd @@ -0,0 +1,13 @@ + + + + + + + + + + + diff --git a/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070111_nillable/Pos_070111_nillable_005/Pos_070111_nillable_005.ttcn b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070111_nillable/Pos_070111_nillable_005/Pos_070111_nillable_005.ttcn new file mode 100644 index 00000000..18eff9ab --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070111_nillable/Pos_070111_nillable_005/Pos_070111_nillable_005.ttcn @@ -0,0 +1,95 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 9:7.1.11, Nillable element of complex type (nil option) + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// ComplexType XSD elements are mapped to an outer record type or field, according to clause 7.6 . +// When the nillable XSD attribute is allocated to such an element, the element components of the +// complex type shall be enframed by an extra optional TTCN-3 record field. I.e., the attributes +// of the complex-type element, mapped to a field of the outer record, shall not be the members +// of the inner record, generated for the nillable XSD attribute. The name of the inner record +// field shall be the result of applying clause 5.2.2 to the name "content". The outer record, +// corresponding to the complexType component of the nillable element, shall be appended with the +// "useNil" encoding instruction. + +module Pos_070111_nillable_005 { + + import from schema_Pos_070111_nillable_005 language "XSD" all; + + template MyType m_msg := { + bar := 1, + content := omit, + content_1 := omit + }; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_070111_nillable_005() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_070111_nillable_005.xml", { "Pos_070111_nillable_005.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_070111_nillable_005(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070111_nillable/Pos_070111_nillable_005/Pos_070111_nillable_005.xml b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070111_nillable/Pos_070111_nillable_005/Pos_070111_nillable_005.xml new file mode 100644 index 00000000..6580c98f --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070111_nillable/Pos_070111_nillable_005/Pos_070111_nillable_005.xml @@ -0,0 +1,2 @@ + + diff --git a/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070111_nillable/Pos_070111_nillable_005/Pos_070111_nillable_005.xsd b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070111_nillable/Pos_070111_nillable_005/Pos_070111_nillable_005.xsd new file mode 100644 index 00000000..e048e2f8 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070111_nillable/Pos_070111_nillable_005/Pos_070111_nillable_005.xsd @@ -0,0 +1,14 @@ + + + + + + + + + + + + diff --git a/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070111_nillable/Pos_070111_nillable_006/Pos_070111_nillable_006.ttcn b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070111_nillable/Pos_070111_nillable_006/Pos_070111_nillable_006.ttcn new file mode 100644 index 00000000..db8d089d --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070111_nillable/Pos_070111_nillable_006/Pos_070111_nillable_006.ttcn @@ -0,0 +1,97 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 9:7.1.11, Nillable element of complex type (value option) + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// ComplexType XSD elements are mapped to an outer record type or field, according to clause 7.6 . +// When the nillable XSD attribute is allocated to such an element, the element components of the +// complex type shall be enframed by an extra optional TTCN-3 record field. I.e., the attributes +// of the complex-type element, mapped to a field of the outer record, shall not be the members +// of the inner record, generated for the nillable XSD attribute. The name of the inner record +// field shall be the result of applying clause 5.2.2 to the name "content". The outer record, +// corresponding to the complexType component of the nillable element, shall be appended with the +// "useNil" encoding instruction. + +module Pos_070111_nillable_006 { + + import from schema_Pos_070111_nillable_006 language "XSD" all; + + template MyType m_msg := { + bar := 1, + content := omit, + content_1 := { + foo := 25 + } + }; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_070111_nillable_006() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_070111_nillable_006.xml", { "Pos_070111_nillable_006.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_070111_nillable_006(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070111_nillable/Pos_070111_nillable_006/Pos_070111_nillable_006.xml b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070111_nillable/Pos_070111_nillable_006/Pos_070111_nillable_006.xml new file mode 100644 index 00000000..f1b34371 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070111_nillable/Pos_070111_nillable_006/Pos_070111_nillable_006.xml @@ -0,0 +1,4 @@ + + + 25 + diff --git a/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070111_nillable/Pos_070111_nillable_006/Pos_070111_nillable_006.xsd b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070111_nillable/Pos_070111_nillable_006/Pos_070111_nillable_006.xsd new file mode 100644 index 00000000..3c019cef --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070111_nillable/Pos_070111_nillable_006/Pos_070111_nillable_006.xsd @@ -0,0 +1,14 @@ + + + + + + + + + + + + diff --git a/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070112_use/Neg_070112_use_001/Neg_070112_use_001.ttcn b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070112_use/Neg_070112_use_001/Neg_070112_use_001.ttcn new file mode 100644 index 00000000..7d199b05 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070112_use/Neg_070112_use_001/Neg_070112_use_001.ttcn @@ -0,0 +1,56 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.1.12, Verify that attribute with required use cannot be omitted + ** @verdict pass reject +***************************************************/ +// The following requirements are tested: +// If the value of the use attribute is required, the TTCN-3 field corresponding +// to the XSD attribute shall be mandatory (i.e. without optional). + +module Neg_070112_use_001 { + + import from schema_Neg_070112_use_001 language "XSD" all; + + template MyType m_msg := { + foo := { + attr := omit, + base := 5 + } + }; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type port P message { + inout all; + } + + type component C { + port P p; + } + + testcase TC_Neg_070112_use_001() runs on C system C { + map(self:p, system:p); + + // encode the message + p.send(m_msg); + log("template should either be rejected by compiler or by runtime latest while encoding"); + + setverdict(fail, "Invalid template should not be encoded"); + + unmap(self:p, system:p); + } + + control { + execute(TC_Neg_070112_use_001(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070112_use/Neg_070112_use_001/Neq_070112_use_001.xsd b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070112_use/Neg_070112_use_001/Neq_070112_use_001.xsd new file mode 100644 index 00000000..2edae896 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070112_use/Neg_070112_use_001/Neq_070112_use_001.xsd @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + diff --git a/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070112_use/Pos_070112_use_001/Pos_070112_use_001.ttcn b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070112_use/Pos_070112_use_001/Pos_070112_use_001.ttcn new file mode 100644 index 00000000..06975ed8 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070112_use/Pos_070112_use_001/Pos_070112_use_001.ttcn @@ -0,0 +1,90 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.1.12, Verify that attribute with required use is correctly converted + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// If the value of the use attribute is required, the TTCN-3 field corresponding +// to the XSD attribute shall be mandatory (i.e. without optional). + +module Pos_070112_use_001 { + + import from schema_Pos_070112_use_001 language "XSD" all; + + template MyType m_msg := { + foo := { + attr := "attr", + base := 5 + } + }; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_070112_use_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_070112_use_001.xml", { "Pos_070112_use_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_070112_use_001(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070112_use/Pos_070112_use_001/Pos_070112_use_001.xml b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070112_use/Pos_070112_use_001/Pos_070112_use_001.xml new file mode 100644 index 00000000..1fd7c9c7 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070112_use/Pos_070112_use_001/Pos_070112_use_001.xml @@ -0,0 +1,4 @@ + + + 5 + \ No newline at end of file diff --git a/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070112_use/Pos_070112_use_001/Pos_070112_use_001.xsd b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070112_use/Pos_070112_use_001/Pos_070112_use_001.xsd new file mode 100644 index 00000000..4fd86d7f --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070112_use/Pos_070112_use_001/Pos_070112_use_001.xsd @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + diff --git a/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070112_use/Pos_070112_use_002/Pos_070112_use_002.ttcn b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070112_use/Pos_070112_use_002/Pos_070112_use_002.ttcn new file mode 100644 index 00000000..f639507c --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070112_use/Pos_070112_use_002/Pos_070112_use_002.ttcn @@ -0,0 +1,92 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.1.12, Verify that attribute with optional use is correctly converted + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// If the use attribute ... value is optional in an XSD attribute declaration, +// the TTCN-3 field resulted by the mapping of the corresponding attribute shall +// be optional. +//////////////////////////////////////////////////////////////////////////////// + +module Pos_070112_use_002 { + + import from schema_Pos_070112_use_002 language "XSD" all; + + template MyType m_msg := { + foo := { + attr := omit, + base := 5 + } + }; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_070112_use_002() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_070112_use_002.xml", { "Pos_070112_use_002.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_070112_use_002(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070112_use/Pos_070112_use_002/Pos_070112_use_002.xml b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070112_use/Pos_070112_use_002/Pos_070112_use_002.xml new file mode 100644 index 00000000..6be4b704 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070112_use/Pos_070112_use_002/Pos_070112_use_002.xml @@ -0,0 +1,4 @@ + + + 5 + \ No newline at end of file diff --git a/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070112_use/Pos_070112_use_002/Pos_070112_use_002.xsd b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070112_use/Pos_070112_use_002/Pos_070112_use_002.xsd new file mode 100644 index 00000000..cdf57ac4 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070112_use/Pos_070112_use_002/Pos_070112_use_002.xsd @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + diff --git a/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070112_use/Pos_070112_use_003/Pos_070112_use_003.ttcn b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070112_use/Pos_070112_use_003/Pos_070112_use_003.ttcn new file mode 100644 index 00000000..9ad5b074 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070112_use/Pos_070112_use_003/Pos_070112_use_003.ttcn @@ -0,0 +1,89 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.1.12, Verify that attribute with prohibited use is not converted + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// XSD attributes with the value of the use attribute prohibited shall not be +// translated to TTCN-3. + +module Pos_070112_use_003 { + + import from schema_Pos_070112_use_003 language "XSD" all; + + template MyType m_msg := { + foo := { + base := 5 + } + }; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_070112_use_003() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_070112_use_003.xml", { "Pos_070112_use_003.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_070112_use_003(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070112_use/Pos_070112_use_003/Pos_070112_use_003.xml b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070112_use/Pos_070112_use_003/Pos_070112_use_003.xml new file mode 100644 index 00000000..065de3a9 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070112_use/Pos_070112_use_003/Pos_070112_use_003.xml @@ -0,0 +1,4 @@ + + + 5 + \ No newline at end of file diff --git a/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070112_use/Pos_070112_use_003/Pos_070112_use_003.xsd b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070112_use/Pos_070112_use_003/Pos_070112_use_003.xsd new file mode 100644 index 00000000..e15bd6dc --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070112_use/Pos_070112_use_003/Pos_070112_use_003.xsd @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070114_final/Pos_070114_final_001/Pos_070114_final_001.ttcn b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070114_final/Pos_070114_final_001/Pos_070114_final_001.ttcn new file mode 100644 index 00000000..d82d2495 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070114_final/Pos_070114_final_001/Pos_070114_final_001.ttcn @@ -0,0 +1,85 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.1.14, Verify conversion of elements with final attribute + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// The final XSD attribute information item(s) shall produce no TTCN-3 language +// construct when translating an XML Schema to TTCN-3. + +module Pos_070114_final_001 { + + import from schema_Pos_070114_final_001 language "XSD" all; + + template MyType m_msg := "test"; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_070114_final_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_070114_final_001.xml", { "Pos_070114_final_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_070114_final_001(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070114_final/Pos_070114_final_001/Pos_070114_final_001.xml b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070114_final/Pos_070114_final_001/Pos_070114_final_001.xml new file mode 100644 index 00000000..c73369c3 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070114_final/Pos_070114_final_001/Pos_070114_final_001.xml @@ -0,0 +1,2 @@ + +test \ No newline at end of file diff --git a/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070114_final/Pos_070114_final_001/Pos_070114_final_001.xsd b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070114_final/Pos_070114_final_001/Pos_070114_final_001.xsd new file mode 100644 index 00000000..b8e22de2 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0701_component_attributes/070114_final/Pos_070114_final_001/Pos_070114_final_001.xsd @@ -0,0 +1,6 @@ + + + + diff --git a/ATS/xml/07_mapping_xsd_components/0703_element_component/Pos_0703_element_component_001/Pos_0703_element_component_001.ttcn b/ATS/xml/07_mapping_xsd_components/0703_element_component/Pos_0703_element_component_001/Pos_0703_element_component_001.ttcn new file mode 100644 index 00000000..27eee93f --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0703_element_component/Pos_0703_element_component_001/Pos_0703_element_component_001.ttcn @@ -0,0 +1,85 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.3, Verify conversion of global element of simple type + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// In case of XSD datatypes, and simple types defined locally as child of the +// element, the type of the XSD element mapped to TTCN-3. + +module Pos_0703_element_component_001 { + + import from schema_Pos_0703_element_component_001 language "XSD" all; + + template MyType m_msg := "abc"; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_0703_element_component_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_0703_element_component_001.xml", { "Pos_0703_element_component_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_0703_element_component_001(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/ATS/xml/07_mapping_xsd_components/0703_element_component/Pos_0703_element_component_001/Pos_0703_element_component_001.xml b/ATS/xml/07_mapping_xsd_components/0703_element_component/Pos_0703_element_component_001/Pos_0703_element_component_001.xml new file mode 100644 index 00000000..c8021582 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0703_element_component/Pos_0703_element_component_001/Pos_0703_element_component_001.xml @@ -0,0 +1,2 @@ + +abc \ No newline at end of file diff --git a/ATS/xml/07_mapping_xsd_components/0703_element_component/Pos_0703_element_component_001/Pos_0703_element_component_001.xsd b/ATS/xml/07_mapping_xsd_components/0703_element_component/Pos_0703_element_component_001/Pos_0703_element_component_001.xsd new file mode 100644 index 00000000..de9eea68 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0703_element_component/Pos_0703_element_component_001/Pos_0703_element_component_001.xsd @@ -0,0 +1,6 @@ + + + + diff --git a/ATS/xml/07_mapping_xsd_components/0703_element_component/Pos_0703_element_component_002/Pos_0703_element_component_002.ttcn b/ATS/xml/07_mapping_xsd_components/0703_element_component/Pos_0703_element_component_002/Pos_0703_element_component_002.ttcn new file mode 100644 index 00000000..cbd600c6 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0703_element_component/Pos_0703_element_component_002/Pos_0703_element_component_002.ttcn @@ -0,0 +1,86 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.3, Verify conversion of global element of user defined type + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// In case of XSD user-defined types referenced by the type attribute of the +// element, the TTCN-3 type generated for the referenced XSD type. + +module Pos_0703_element_component_002 { + + import from schema_Pos_0703_element_component_002 language "XSD" all; + + template MyBaseType m_typeBased := 1; + template MyType m_msg := m_typeBased; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_0703_element_component_002() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_0703_element_component_002.xml", { "Pos_0703_element_component_002.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_0703_element_component_002(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/ATS/xml/07_mapping_xsd_components/0703_element_component/Pos_0703_element_component_002/Pos_0703_element_component_002.xml b/ATS/xml/07_mapping_xsd_components/0703_element_component/Pos_0703_element_component_002/Pos_0703_element_component_002.xml new file mode 100644 index 00000000..9c0e1f17 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0703_element_component/Pos_0703_element_component_002/Pos_0703_element_component_002.xml @@ -0,0 +1,2 @@ + +1 \ No newline at end of file diff --git a/ATS/xml/07_mapping_xsd_components/0703_element_component/Pos_0703_element_component_002/Pos_0703_element_component_002.xsd b/ATS/xml/07_mapping_xsd_components/0703_element_component/Pos_0703_element_component_002/Pos_0703_element_component_002.xsd new file mode 100644 index 00000000..1b57ff75 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0703_element_component/Pos_0703_element_component_002/Pos_0703_element_component_002.xsd @@ -0,0 +1,9 @@ + + + + + + + diff --git a/ATS/xml/07_mapping_xsd_components/0703_element_component/Pos_0703_element_component_003/Pos_0703_element_component_003.ttcn b/ATS/xml/07_mapping_xsd_components/0703_element_component/Pos_0703_element_component_003/Pos_0703_element_component_003.ttcn new file mode 100644 index 00000000..cbc3cb7f --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0703_element_component/Pos_0703_element_component_003/Pos_0703_element_component_003.ttcn @@ -0,0 +1,88 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.3, Verify conversion of global element of locally defined complex type + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// In case the child of the element is a locally defined complexType, it shall +// be a TTCN-3 record. + +module Pos_0703_element_component_003 { + + import from schema_Pos_0703_element_component_003 language "XSD" all; + + template MyType m_msg := { + foo := "foo", + bar := "bar" + }; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_0703_element_component_003() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_0703_element_component_003.xml", { "Pos_0703_element_component_003.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_0703_element_component_003(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/ATS/xml/07_mapping_xsd_components/0703_element_component/Pos_0703_element_component_003/Pos_0703_element_component_003.xml b/ATS/xml/07_mapping_xsd_components/0703_element_component/Pos_0703_element_component_003/Pos_0703_element_component_003.xml new file mode 100644 index 00000000..9c63bed5 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0703_element_component/Pos_0703_element_component_003/Pos_0703_element_component_003.xml @@ -0,0 +1,5 @@ + + + foo + bar + \ No newline at end of file diff --git a/ATS/xml/07_mapping_xsd_components/0703_element_component/Pos_0703_element_component_003/Pos_0703_element_component_003.xsd b/ATS/xml/07_mapping_xsd_components/0703_element_component/Pos_0703_element_component_003/Pos_0703_element_component_003.xsd new file mode 100644 index 00000000..9ae08664 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0703_element_component/Pos_0703_element_component_003/Pos_0703_element_component_003.xsd @@ -0,0 +1,13 @@ + + + + + + + + + + + diff --git a/ATS/xml/07_mapping_xsd_components/0703_element_component/Pos_0703_element_component_004/Pos_0703_element_component_004.ttcn b/ATS/xml/07_mapping_xsd_components/0703_element_component/Pos_0703_element_component_004/Pos_0703_element_component_004.ttcn new file mode 100644 index 00000000..90ac13de --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0703_element_component/Pos_0703_element_component_004/Pos_0703_element_component_004.ttcn @@ -0,0 +1,93 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.3, Verify conversion of local elements defined by reference with different namespace + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// When a local element is defined by reference (the ref attribute is used) and +// the target namespace of the XSD Schema in which the referenced element is +// defined differs from the target namespace of the referencing XSD Schema +// (including the no target namespace case), the TTCN-3 field generated for this +// element reference shall be appended with a "namespace as" encoding +// instruction (see clause B.3.1), which shall identify the namespace and +// optionally the prefix of the XSD schema in which the referenced entity is +// defined. + +module Pos_0703_element_component_004 { + + import from schema_Pos_0703_element_component_004 language "XSD" all; + + template MyType m_msg := { + imported := "abc" + }; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_0703_element_component_004() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_0703_element_component_004.xml", { "Pos_0703_element_component_004.xsd", "Pos_0703_element_component_004_1.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_0703_element_component_004(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/ATS/xml/07_mapping_xsd_components/0703_element_component/Pos_0703_element_component_004/Pos_0703_element_component_004.xml b/ATS/xml/07_mapping_xsd_components/0703_element_component/Pos_0703_element_component_004/Pos_0703_element_component_004.xml new file mode 100644 index 00000000..41ce9018 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0703_element_component/Pos_0703_element_component_004/Pos_0703_element_component_004.xml @@ -0,0 +1,4 @@ + + + abc + \ No newline at end of file diff --git a/ATS/xml/07_mapping_xsd_components/0703_element_component/Pos_0703_element_component_004/Pos_0703_element_component_004.xsd b/ATS/xml/07_mapping_xsd_components/0703_element_component/Pos_0703_element_component_004/Pos_0703_element_component_004.xsd new file mode 100644 index 00000000..212696df --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0703_element_component/Pos_0703_element_component_004/Pos_0703_element_component_004.xsd @@ -0,0 +1,14 @@ + + + + + + + + + + + diff --git a/ATS/xml/07_mapping_xsd_components/0703_element_component/Pos_0703_element_component_004/Pos_0703_element_component_004_1.xsd b/ATS/xml/07_mapping_xsd_components/0703_element_component/Pos_0703_element_component_004/Pos_0703_element_component_004_1.xsd new file mode 100644 index 00000000..49bf3b42 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0703_element_component/Pos_0703_element_component_004/Pos_0703_element_component_004_1.xsd @@ -0,0 +1,6 @@ + + + + diff --git a/ATS/xml/07_mapping_xsd_components/0704_attribute_and_attribute_group_definitions/070401_attribute_element_definitions/Pos_070401_attribute_element_definitions_001/Pos_070401_attribute_element_definitions_001.ttcn b/ATS/xml/07_mapping_xsd_components/0704_attribute_and_attribute_group_definitions/070401_attribute_element_definitions/Pos_070401_attribute_element_definitions_001/Pos_070401_attribute_element_definitions_001.ttcn new file mode 100644 index 00000000..24398d10 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0704_attribute_and_attribute_group_definitions/070401_attribute_element_definitions/Pos_070401_attribute_element_definitions_001/Pos_070401_attribute_element_definitions_001.ttcn @@ -0,0 +1,80 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.4.1, Verify mapping of a globally defined attribute + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_070401_attribute_element_definitions_001 { + + import from schema_Pos_070401_attribute_element_definitions_001 language "XSD" all; + + template E1 m_msg := {a1:="test", elem := "test1234"}; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_070401_attribute_element_definitions_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_070401_attribute_element_definitions_001.xml", { "Pos_070401_attribute_element_definitions_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_070401_attribute_element_definitions_001(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/07_mapping_xsd_components/0704_attribute_and_attribute_group_definitions/070401_attribute_element_definitions/Pos_070401_attribute_element_definitions_001/Pos_070401_attribute_element_definitions_001.xml b/ATS/xml/07_mapping_xsd_components/0704_attribute_and_attribute_group_definitions/070401_attribute_element_definitions/Pos_070401_attribute_element_definitions_001/Pos_070401_attribute_element_definitions_001.xml new file mode 100644 index 00000000..df16e1ff --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0704_attribute_and_attribute_group_definitions/070401_attribute_element_definitions/Pos_070401_attribute_element_definitions_001/Pos_070401_attribute_element_definitions_001.xml @@ -0,0 +1,6 @@ + + + test1234 + diff --git a/ATS/xml/07_mapping_xsd_components/0704_attribute_and_attribute_group_definitions/070401_attribute_element_definitions/Pos_070401_attribute_element_definitions_001/Pos_070401_attribute_element_definitions_001.xsd b/ATS/xml/07_mapping_xsd_components/0704_attribute_and_attribute_group_definitions/070401_attribute_element_definitions/Pos_070401_attribute_element_definitions_001/Pos_070401_attribute_element_definitions_001.xsd new file mode 100644 index 00000000..3513c2e5 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0704_attribute_and_attribute_group_definitions/070401_attribute_element_definitions/Pos_070401_attribute_element_definitions_001/Pos_070401_attribute_element_definitions_001.xsd @@ -0,0 +1,13 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/ATS/xml/07_mapping_xsd_components/0704_attribute_and_attribute_group_definitions/070402_attribute_group_definitions/Pos_070402_attribute_group_definitions_001/Pos_070402_attribute_group_definitions_001.ttcn b/ATS/xml/07_mapping_xsd_components/0704_attribute_and_attribute_group_definitions/070402_attribute_group_definitions/Pos_070402_attribute_group_definitions_001/Pos_070402_attribute_group_definitions_001.ttcn new file mode 100644 index 00000000..c930f8da --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0704_attribute_and_attribute_group_definitions/070402_attribute_group_definitions/Pos_070402_attribute_group_definitions_001/Pos_070402_attribute_group_definitions_001.ttcn @@ -0,0 +1,85 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.4.2, Verify mapping of a globally defined attribute group + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_070402_attribute_group_definitions_001 { + + import from schema_Pos_070402_attribute_group_definitions_001 language "XSD" all; + + template E1 m_msg := { + fgroup := 10.0, + igroup := 10, + sgroup := "text", + elem := "text1234" + } + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_070402_attribute_group_definitions_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_070402_attribute_group_definitions_001.xml", { "Pos_070402_attribute_group_definitions_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_070402_attribute_group_definitions_001(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/07_mapping_xsd_components/0704_attribute_and_attribute_group_definitions/070402_attribute_group_definitions/Pos_070402_attribute_group_definitions_001/Pos_070402_attribute_group_definitions_001.xml b/ATS/xml/07_mapping_xsd_components/0704_attribute_and_attribute_group_definitions/070402_attribute_group_definitions/Pos_070402_attribute_group_definitions_001/Pos_070402_attribute_group_definitions_001.xml new file mode 100644 index 00000000..908c8c67 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0704_attribute_and_attribute_group_definitions/070402_attribute_group_definitions/Pos_070402_attribute_group_definitions_001/Pos_070402_attribute_group_definitions_001.xml @@ -0,0 +1,6 @@ + + + text1234 + \ No newline at end of file diff --git a/ATS/xml/07_mapping_xsd_components/0704_attribute_and_attribute_group_definitions/070402_attribute_group_definitions/Pos_070402_attribute_group_definitions_001/Pos_070402_attribute_group_definitions_001.xsd b/ATS/xml/07_mapping_xsd_components/0704_attribute_and_attribute_group_definitions/070402_attribute_group_definitions/Pos_070402_attribute_group_definitions_001/Pos_070402_attribute_group_definitions_001.xsd new file mode 100644 index 00000000..7b79baf2 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0704_attribute_and_attribute_group_definitions/070402_attribute_group_definitions/Pos_070402_attribute_group_definitions_001/Pos_070402_attribute_group_definitions_001.xsd @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ATS/xml/07_mapping_xsd_components/0704_attribute_defs/070401_attribute_element_definitions/Pos_070401_attribute_element_definitions_001/Pos_070401_attribute_element_definitions_001.ttcn b/ATS/xml/07_mapping_xsd_components/0704_attribute_defs/070401_attribute_element_definitions/Pos_070401_attribute_element_definitions_001/Pos_070401_attribute_element_definitions_001.ttcn new file mode 100644 index 00000000..24398d10 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0704_attribute_defs/070401_attribute_element_definitions/Pos_070401_attribute_element_definitions_001/Pos_070401_attribute_element_definitions_001.ttcn @@ -0,0 +1,80 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.4.1, Verify mapping of a globally defined attribute + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_070401_attribute_element_definitions_001 { + + import from schema_Pos_070401_attribute_element_definitions_001 language "XSD" all; + + template E1 m_msg := {a1:="test", elem := "test1234"}; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_070401_attribute_element_definitions_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_070401_attribute_element_definitions_001.xml", { "Pos_070401_attribute_element_definitions_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_070401_attribute_element_definitions_001(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/07_mapping_xsd_components/0704_attribute_defs/070401_attribute_element_definitions/Pos_070401_attribute_element_definitions_001/Pos_070401_attribute_element_definitions_001.xml b/ATS/xml/07_mapping_xsd_components/0704_attribute_defs/070401_attribute_element_definitions/Pos_070401_attribute_element_definitions_001/Pos_070401_attribute_element_definitions_001.xml new file mode 100644 index 00000000..8a0804d8 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0704_attribute_defs/070401_attribute_element_definitions/Pos_070401_attribute_element_definitions_001/Pos_070401_attribute_element_definitions_001.xml @@ -0,0 +1,6 @@ + + + test1234 + diff --git a/ATS/xml/07_mapping_xsd_components/0704_attribute_defs/070401_attribute_element_definitions/Pos_070401_attribute_element_definitions_001/Pos_070401_attribute_element_definitions_001.xsd b/ATS/xml/07_mapping_xsd_components/0704_attribute_defs/070401_attribute_element_definitions/Pos_070401_attribute_element_definitions_001/Pos_070401_attribute_element_definitions_001.xsd new file mode 100644 index 00000000..3513c2e5 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0704_attribute_defs/070401_attribute_element_definitions/Pos_070401_attribute_element_definitions_001/Pos_070401_attribute_element_definitions_001.xsd @@ -0,0 +1,13 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/ATS/xml/07_mapping_xsd_components/0704_attribute_defs/070402_attribute_group_definitions/Pos_070402_attribute_group_definitions_001/Pos_070402_attribute_group_definitions_001.ttcn b/ATS/xml/07_mapping_xsd_components/0704_attribute_defs/070402_attribute_group_definitions/Pos_070402_attribute_group_definitions_001/Pos_070402_attribute_group_definitions_001.ttcn new file mode 100644 index 00000000..c930f8da --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0704_attribute_defs/070402_attribute_group_definitions/Pos_070402_attribute_group_definitions_001/Pos_070402_attribute_group_definitions_001.ttcn @@ -0,0 +1,85 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.4.2, Verify mapping of a globally defined attribute group + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_070402_attribute_group_definitions_001 { + + import from schema_Pos_070402_attribute_group_definitions_001 language "XSD" all; + + template E1 m_msg := { + fgroup := 10.0, + igroup := 10, + sgroup := "text", + elem := "text1234" + } + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_070402_attribute_group_definitions_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_070402_attribute_group_definitions_001.xml", { "Pos_070402_attribute_group_definitions_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_070402_attribute_group_definitions_001(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/07_mapping_xsd_components/0704_attribute_defs/070402_attribute_group_definitions/Pos_070402_attribute_group_definitions_001/Pos_070402_attribute_group_definitions_001.xml b/ATS/xml/07_mapping_xsd_components/0704_attribute_defs/070402_attribute_group_definitions/Pos_070402_attribute_group_definitions_001/Pos_070402_attribute_group_definitions_001.xml new file mode 100644 index 00000000..cdd95b1b --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0704_attribute_defs/070402_attribute_group_definitions/Pos_070402_attribute_group_definitions_001/Pos_070402_attribute_group_definitions_001.xml @@ -0,0 +1,6 @@ + + + text1234 + \ No newline at end of file diff --git a/ATS/xml/07_mapping_xsd_components/0704_attribute_defs/070402_attribute_group_definitions/Pos_070402_attribute_group_definitions_001/Pos_070402_attribute_group_definitions_001.xsd b/ATS/xml/07_mapping_xsd_components/0704_attribute_defs/070402_attribute_group_definitions/Pos_070402_attribute_group_definitions_001/Pos_070402_attribute_group_definitions_001.xsd new file mode 100644 index 00000000..7b79baf2 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0704_attribute_defs/070402_attribute_group_definitions/Pos_070402_attribute_group_definitions_001/Pos_070402_attribute_group_definitions_001.xsd @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070501_derivation_by_restriction/Pos_070501_derivation_by_restriction_001/Pos_070501_derivation_by_restriction_001.ttcn b/ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070501_derivation_by_restriction/Pos_070501_derivation_by_restriction_001/Pos_070501_derivation_by_restriction_001.ttcn new file mode 100644 index 00000000..d26edc35 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070501_derivation_by_restriction/Pos_070501_derivation_by_restriction_001/Pos_070501_derivation_by_restriction_001.ttcn @@ -0,0 +1,86 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.5.1, Verify that it is possible to convert anonymous + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// It is also possible in XSD to restrict an anonymous simple type. The translation +// follows the mapping for built-in data types, but instead of using the base +// attribute to identify the type to apply the facet to, the base attribute type +// shall be omitted and the type of the inner, anonymous simpleType shall be used. +module Pos_070501_derivation_by_restriction_001 { + + import from schema_Pos_070501_derivation_by_restriction_001 language "XSD" all; + + template MyType m_msg := 1; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_070501_derivation_by_restriction_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_070501_derivation_by_restriction_001.xml", { "Pos_070501_derivation_by_restriction_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_070501_derivation_by_restriction_001(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070501_derivation_by_restriction/Pos_070501_derivation_by_restriction_001/Pos_070501_derivation_by_restriction_001.xml b/ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070501_derivation_by_restriction/Pos_070501_derivation_by_restriction_001/Pos_070501_derivation_by_restriction_001.xml new file mode 100644 index 00000000..d723d68f --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070501_derivation_by_restriction/Pos_070501_derivation_by_restriction_001/Pos_070501_derivation_by_restriction_001.xml @@ -0,0 +1,2 @@ + +1 \ No newline at end of file diff --git a/ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070501_derivation_by_restriction/Pos_070501_derivation_by_restriction_001/Pos_070501_derivation_by_restriction_001.xsd b/ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070501_derivation_by_restriction/Pos_070501_derivation_by_restriction_001/Pos_070501_derivation_by_restriction_001.xsd new file mode 100644 index 00000000..a515aaf7 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070501_derivation_by_restriction/Pos_070501_derivation_by_restriction_001/Pos_070501_derivation_by_restriction_001.xsd @@ -0,0 +1,14 @@ + + + + + + + + + + + + diff --git a/ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070501_derivation_by_restriction/Pos_070501_derivation_by_restriction_002/Pos_070501_derivation_by_restriction_002.ttcn b/ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070501_derivation_by_restriction/Pos_070501_derivation_by_restriction_002/Pos_070501_derivation_by_restriction_002.ttcn new file mode 100644 index 00000000..e9871ed6 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070501_derivation_by_restriction/Pos_070501_derivation_by_restriction_002/Pos_070501_derivation_by_restriction_002.ttcn @@ -0,0 +1,86 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.5.1, Verify that it is possible to convert anonymous + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// It is also possible in XSD to restrict an anonymous simple type. The translation +// follows the mapping for built-in data types, but instead of using the base +// attribute to identify the type to apply the facet to, the base attribute type +// shall be omitted and the type of the inner, anonymous simpleType shall be used. +module Pos_070501_derivation_by_restriction_002 { + + import from schema_Pos_070501_derivation_by_restriction_002 language "XSD" all; + + template Elem_simple_restr m_msg := 1; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_070501_derivation_by_restriction_002() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_070501_derivation_by_restriction_002.xml", { "Pos_070501_derivation_by_restriction_002.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_070501_derivation_by_restriction_002(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070501_derivation_by_restriction/Pos_070501_derivation_by_restriction_002/Pos_070501_derivation_by_restriction_002.xml b/ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070501_derivation_by_restriction/Pos_070501_derivation_by_restriction_002/Pos_070501_derivation_by_restriction_002.xml new file mode 100644 index 00000000..7a8d165f --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070501_derivation_by_restriction/Pos_070501_derivation_by_restriction_002/Pos_070501_derivation_by_restriction_002.xml @@ -0,0 +1,2 @@ + +1 \ No newline at end of file diff --git a/ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070501_derivation_by_restriction/Pos_070501_derivation_by_restriction_002/Pos_070501_derivation_by_restriction_002.xsd b/ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070501_derivation_by_restriction/Pos_070501_derivation_by_restriction_002/Pos_070501_derivation_by_restriction_002.xsd new file mode 100644 index 00000000..0b898b57 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070501_derivation_by_restriction/Pos_070501_derivation_by_restriction_002/Pos_070501_derivation_by_restriction_002.xsd @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + diff --git a/ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070502_derivation_by_list/Neg_070502_derivation_by_list_001/Neg_070502_derivation_by_list_001.ttcn b/ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070502_derivation_by_list/Neg_070502_derivation_by_list_001/Neg_070502_derivation_by_list_001.ttcn new file mode 100644 index 00000000..dfc4852f --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070502_derivation_by_list/Neg_070502_derivation_by_list_001/Neg_070502_derivation_by_list_001.ttcn @@ -0,0 +1,85 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.5.2, Verify length constraint imposed on type derived by list + ** @verdict pass reject +***************************************************/ +// The following requirements are tested: +// When using any of the supported XSD facets (length, maxLength, minLength) the +// translation shall follow the mapping for built-in list types, with the difference +// that the base type shall be determined by an anonymous inner list item type. +module Neg_070502_derivation_by_list_001 { + + import from schema_Neg_070502_derivation_by_list_001 language "XSD" all; + + template MyType m_msg := { "abcd", "efgh" }; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Neg_070502_derivation_by_list_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Neg_070502_derivation_by_list_001.xml", { "Neg_070502_derivation_by_list_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Neg_070502_derivation_by_list_001(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070502_derivation_by_list/Neg_070502_derivation_by_list_001/Neg_070502_derivation_by_list_001.xsd b/ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070502_derivation_by_list/Neg_070502_derivation_by_list_001/Neg_070502_derivation_by_list_001.xsd new file mode 100644 index 00000000..ad8f7112 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070502_derivation_by_list/Neg_070502_derivation_by_list_001/Neg_070502_derivation_by_list_001.xsd @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + diff --git a/ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070502_derivation_by_list/Neg_070502_derivation_by_list_002/Neg_070502_derivation_by_list_002.ttcn b/ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070502_derivation_by_list/Neg_070502_derivation_by_list_002/Neg_070502_derivation_by_list_002.ttcn new file mode 100644 index 00000000..2e80b002 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070502_derivation_by_list/Neg_070502_derivation_by_list_002/Neg_070502_derivation_by_list_002.ttcn @@ -0,0 +1,85 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.5.2, Verify constraint imposed on inner type defined inside XSD list + ** @verdict pass reject +***************************************************/ +// The following requirements are tested: +// The other XSD facets shall be mapped accordingly (refer to respective 6.1 clauses). +// If no itemType is given, the mapping has to be implemented using the given inner +// type (see clause 7.5.3). +module Neg_070502_derivation_by_list_002 { + + import from schema_Neg_070502_derivation_by_list_002 language "XSD" all; + + template MyType m_msg := { "abcd", "efgh", "ij" }; // "ij" contains only two characters + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Neg_070502_derivation_by_list_002() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Neg_070502_derivation_by_list_002.xml", { "Neg_070502_derivation_by_list_002.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Neg_070502_derivation_by_list_002(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070502_derivation_by_list/Neg_070502_derivation_by_list_002/Neg_070502_derivation_by_list_002.xsd b/ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070502_derivation_by_list/Neg_070502_derivation_by_list_002/Neg_070502_derivation_by_list_002.xsd new file mode 100644 index 00000000..c7d4777a --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070502_derivation_by_list/Neg_070502_derivation_by_list_002/Neg_070502_derivation_by_list_002.xsd @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + diff --git a/ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070502_derivation_by_list/Pos_070502_derivation_by_list_001/Pos_070502_derivation_by_list_001.ttcn b/ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070502_derivation_by_list/Pos_070502_derivation_by_list_001/Pos_070502_derivation_by_list_001.ttcn new file mode 100644 index 00000000..c4caef94 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070502_derivation_by_list/Pos_070502_derivation_by_list_001/Pos_070502_derivation_by_list_001.ttcn @@ -0,0 +1,85 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.5.2, Verify that derivation by list is converted to record of + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// XSD list components shall be mapped to the TTCN-3 record of type. In their +// simplest form lists shall be mapped by directly using the listItem attribute +// as the resulting type. +module Pos_070502_derivation_by_list_001 { + + import from schema_Pos_070502_derivation_by_list_001 language "XSD" all; + + template MyType m_msg := { 1.0, 2.0, 3.0 }; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_070502_derivation_by_list_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_070502_derivation_by_list_001.xml", { "Pos_070502_derivation_by_list_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_070502_derivation_by_list_001(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070502_derivation_by_list/Pos_070502_derivation_by_list_001/Pos_070502_derivation_by_list_001.xml b/ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070502_derivation_by_list/Pos_070502_derivation_by_list_001/Pos_070502_derivation_by_list_001.xml new file mode 100644 index 00000000..fe6d7050 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070502_derivation_by_list/Pos_070502_derivation_by_list_001/Pos_070502_derivation_by_list_001.xml @@ -0,0 +1,2 @@ + +1.0 2.0 3.0 \ No newline at end of file diff --git a/ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070502_derivation_by_list/Pos_070502_derivation_by_list_001/Pos_070502_derivation_by_list_001.xsd b/ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070502_derivation_by_list/Pos_070502_derivation_by_list_001/Pos_070502_derivation_by_list_001.xsd new file mode 100644 index 00000000..c8db9997 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070502_derivation_by_list/Pos_070502_derivation_by_list_001/Pos_070502_derivation_by_list_001.xsd @@ -0,0 +1,9 @@ + + + + + + + diff --git a/ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070502_derivation_by_list/Pos_070502_derivation_by_list_002/Pos_070502_derivation_by_list_002.ttcn b/ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070502_derivation_by_list/Pos_070502_derivation_by_list_002/Pos_070502_derivation_by_list_002.ttcn new file mode 100644 index 00000000..4be1c5c6 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070502_derivation_by_list/Pos_070502_derivation_by_list_002/Pos_070502_derivation_by_list_002.ttcn @@ -0,0 +1,85 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.5.2, Verify mapping of facets connected applied to derivation by list + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// When using any of the supported XSD facets (length, maxLength, minLength) the +// translation shall follow the mapping for built-in list types, with the difference +// that the base type shall be determined by an anonymous inner list item type. +module Pos_070502_derivation_by_list_002 { + + import from schema_Pos_070502_derivation_by_list_002 language "XSD" all; + + template MyType m_msg := {1.0, 2.0, 3.14 }; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_070502_derivation_by_list_002() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_070502_derivation_by_list_002.xml", { "Pos_070502_derivation_by_list_002.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_070502_derivation_by_list_002(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070502_derivation_by_list/Pos_070502_derivation_by_list_002/Pos_070502_derivation_by_list_002.xml b/ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070502_derivation_by_list/Pos_070502_derivation_by_list_002/Pos_070502_derivation_by_list_002.xml new file mode 100644 index 00000000..0011230a --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070502_derivation_by_list/Pos_070502_derivation_by_list_002/Pos_070502_derivation_by_list_002.xml @@ -0,0 +1,2 @@ + +1.0 2.0 3.14 \ No newline at end of file diff --git a/ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070502_derivation_by_list/Pos_070502_derivation_by_list_002/Pos_070502_derivation_by_list_002.xsd b/ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070502_derivation_by_list/Pos_070502_derivation_by_list_002/Pos_070502_derivation_by_list_002.xsd new file mode 100644 index 00000000..b4f72f7f --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070502_derivation_by_list/Pos_070502_derivation_by_list_002/Pos_070502_derivation_by_list_002.xsd @@ -0,0 +1,14 @@ + + + + + + + + + + + + diff --git a/ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070502_derivation_by_list/Pos_070502_derivation_by_list_003/Pos_070502_derivation_by_list_003.ttcn b/ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070502_derivation_by_list/Pos_070502_derivation_by_list_003/Pos_070502_derivation_by_list_003.ttcn new file mode 100644 index 00000000..5fd81b94 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070502_derivation_by_list/Pos_070502_derivation_by_list_003/Pos_070502_derivation_by_list_003.ttcn @@ -0,0 +1,85 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.5.2, Verify conversion of facets defined inside XSD list + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// The other XSD facets shall be mapped accordingly (refer to respective 6.1 clauses). +// If no itemType is given, the mapping has to be implemented using the given inner +// type (see clause 7.5.3). +module Pos_070502_derivation_by_list_003 { + + import from schema_Pos_070502_derivation_by_list_003 language "XSD" all; + + template MyType m_msg := { "abcd", "efgh", "ijkl" }; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_070502_derivation_by_list_003() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_070502_derivation_by_list_003.xml", { "Pos_070502_derivation_by_list_003.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_070502_derivation_by_list_003(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070502_derivation_by_list/Pos_070502_derivation_by_list_003/Pos_070502_derivation_by_list_003.xml b/ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070502_derivation_by_list/Pos_070502_derivation_by_list_003/Pos_070502_derivation_by_list_003.xml new file mode 100644 index 00000000..c9ed4003 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070502_derivation_by_list/Pos_070502_derivation_by_list_003/Pos_070502_derivation_by_list_003.xml @@ -0,0 +1,2 @@ + +abcd efgh ijkl \ No newline at end of file diff --git a/ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070502_derivation_by_list/Pos_070502_derivation_by_list_003/Pos_070502_derivation_by_list_003.xsd b/ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070502_derivation_by_list/Pos_070502_derivation_by_list_003/Pos_070502_derivation_by_list_003.xsd new file mode 100644 index 00000000..fbb3990b --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070502_derivation_by_list/Pos_070502_derivation_by_list_003/Pos_070502_derivation_by_list_003.xsd @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + diff --git a/ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070502_derivation_by_list/Pos_070502_derivation_by_list_004/Pos_070502_derivation_by_list_004.ttcn b/ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070502_derivation_by_list/Pos_070502_derivation_by_list_004/Pos_070502_derivation_by_list_004.ttcn new file mode 100644 index 00000000..147df97c --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070502_derivation_by_list/Pos_070502_derivation_by_list_004/Pos_070502_derivation_by_list_004.ttcn @@ -0,0 +1,85 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.5.2, Verify transformation of derivation by list with enumerated facets inside + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// The other XSD facets shall be mapped accordingly (refer to respective 6.1 clauses). +// If no itemType is given, the mapping has to be implemented using the given inner +// type (see clause 7.5.3). +module Pos_070502_derivation_by_list_004 { + + import from schema_Pos_070502_derivation_by_list_004 language "XSD" all; + + template MyType m_msg := { orange, blue }; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_070502_derivation_by_list_004() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_070502_derivation_by_list_004.xml", { "Pos_070502_derivation_by_list_004.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_070502_derivation_by_list_004(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070502_derivation_by_list/Pos_070502_derivation_by_list_004/Pos_070502_derivation_by_list_004.xml b/ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070502_derivation_by_list/Pos_070502_derivation_by_list_004/Pos_070502_derivation_by_list_004.xml new file mode 100644 index 00000000..bf72d925 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070502_derivation_by_list/Pos_070502_derivation_by_list_004/Pos_070502_derivation_by_list_004.xml @@ -0,0 +1,2 @@ + +Orange Blue \ No newline at end of file diff --git a/ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070502_derivation_by_list/Pos_070502_derivation_by_list_004/Pos_070502_derivation_by_list_004.xsd b/ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070502_derivation_by_list/Pos_070502_derivation_by_list_004/Pos_070502_derivation_by_list_004.xsd new file mode 100644 index 00000000..a1d60459 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070502_derivation_by_list/Pos_070502_derivation_by_list_004/Pos_070502_derivation_by_list_004.xsd @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070502_derivation_by_list/Pos_070502_derivation_by_list_005/Pos_070502_derivation_by_list_005.ttcn b/ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070502_derivation_by_list/Pos_070502_derivation_by_list_005/Pos_070502_derivation_by_list_005.ttcn new file mode 100644 index 00000000..68deb265 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070502_derivation_by_list/Pos_070502_derivation_by_list_005/Pos_070502_derivation_by_list_005.ttcn @@ -0,0 +1,81 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.5.2, Verify transformation of list containing union content + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +module Pos_070502_derivation_by_list_005 { + + import from schema_Pos_070502_derivation_by_list_005 language "XSD" all; + + template MyType m_msg := { { alt_ := true }, { alt_1 := 2.0 }, { alt_ := false } }; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_070502_derivation_by_list_005() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_070502_derivation_by_list_005.xml", { "Pos_070502_derivation_by_list_005.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_070502_derivation_by_list_005(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070502_derivation_by_list/Pos_070502_derivation_by_list_005/Pos_070502_derivation_by_list_005.xml b/ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070502_derivation_by_list/Pos_070502_derivation_by_list_005/Pos_070502_derivation_by_list_005.xml new file mode 100644 index 00000000..b814a6f5 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070502_derivation_by_list/Pos_070502_derivation_by_list_005/Pos_070502_derivation_by_list_005.xml @@ -0,0 +1,2 @@ + +true 2.0 false \ No newline at end of file diff --git a/ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070502_derivation_by_list/Pos_070502_derivation_by_list_005/Pos_070502_derivation_by_list_005.xsd b/ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070502_derivation_by_list/Pos_070502_derivation_by_list_005/Pos_070502_derivation_by_list_005.xsd new file mode 100644 index 00000000..487664fe --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070502_derivation_by_list/Pos_070502_derivation_by_list_005/Pos_070502_derivation_by_list_005.xsd @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + + diff --git a/ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070503_derivation_by_union/Pos_070503_derivation_by_union_001/Pos_070503_derivation_by_union_001.ttcn b/ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070503_derivation_by_union/Pos_070503_derivation_by_union_001/Pos_070503_derivation_by_union_001.ttcn new file mode 100644 index 00000000..8f957fbe --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070503_derivation_by_union/Pos_070503_derivation_by_union_001/Pos_070503_derivation_by_union_001.ttcn @@ -0,0 +1,90 @@ +/*************************************************** + ** @author STF 475, updated by STF 521 + ** @version 0.0.2 + ** @purpose 9:7.5.3, Verify transformation of union with memberTypes attribute + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// An XSD union is considered as a set of mutually exclusive alternative types for +// a simpleType. As this is compatible with the union type of TTCN-3, a simpleType +// derived by union in XSD shall be mapped to a union type definition in TTCN-3. The +// generated TTCN-3 union type shall contain one alternative for each member type of +// the XSD union, preserving the textual order of the member types in the initial XSD +// union type. The field names of the TTCN-3 union type shall be the result of applying +// clause 5.2.2 to either to the unqualified name of the member type (in case of built +// in XSD data types and user defined named types) ... . +module Pos_070503_derivation_by_union_001 { + + import from schema_Pos_070503_derivation_by_union_001 language "XSD" all; + + template MyType m_msg := { integer_ := 5 }; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_070503_derivation_by_union_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_070503_derivation_by_union_001.xml", { "Pos_070503_derivation_by_union_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_070503_derivation_by_union_001(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070503_derivation_by_union/Pos_070503_derivation_by_union_001/Pos_070503_derivation_by_union_001.xml b/ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070503_derivation_by_union/Pos_070503_derivation_by_union_001/Pos_070503_derivation_by_union_001.xml new file mode 100644 index 00000000..2987b08b --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070503_derivation_by_union/Pos_070503_derivation_by_union_001/Pos_070503_derivation_by_union_001.xml @@ -0,0 +1,2 @@ + +5 \ No newline at end of file diff --git a/ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070503_derivation_by_union/Pos_070503_derivation_by_union_001/Pos_070503_derivation_by_union_001.xsd b/ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070503_derivation_by_union/Pos_070503_derivation_by_union_001/Pos_070503_derivation_by_union_001.xsd new file mode 100644 index 00000000..7b6aeb1c --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070503_derivation_by_union/Pos_070503_derivation_by_union_001/Pos_070503_derivation_by_union_001.xsd @@ -0,0 +1,9 @@ + + + + + + + diff --git a/ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070503_derivation_by_union/Pos_070503_derivation_by_union_002/Pos_070503_derivation_by_union_002.ttcn b/ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070503_derivation_by_union/Pos_070503_derivation_by_union_002/Pos_070503_derivation_by_union_002.ttcn new file mode 100644 index 00000000..922cf434 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070503_derivation_by_union/Pos_070503_derivation_by_union_002/Pos_070503_derivation_by_union_002.ttcn @@ -0,0 +1,89 @@ +/*************************************************** + ** @author STF 475, updated by STF 521 + ** @version 0.0.2 + ** @purpose 9:7.5.3, Verify transformation of union with unnamed member types + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// An XSD union is considered as a set of mutually exclusive alternative types for +// a simpleType. As this is compatible with the union type of TTCN-3, a simpleType +// derived by union in XSD shall be mapped to a union type definition in TTCN-3. The +// generated TTCN-3 union type shall contain one alternative for each member type of +// the XSD union, preserving the textual order of the member types in the initial XSD +// union type. The field names of the TTCN-3 union type shall be the result of applying +// clause 5.2.2 ... to the string "alt" (in case of unnamed member types). +module Pos_070503_derivation_by_union_002 { + + import from schema_Pos_070503_derivation_by_union_002 language "XSD" all; + + template MyType m_msg := { alt_ := 1.0 }; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_070503_derivation_by_union_002() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_070503_derivation_by_union_002.xml", { "Pos_070503_derivation_by_union_002.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_070503_derivation_by_union_002(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070503_derivation_by_union/Pos_070503_derivation_by_union_002/Pos_070503_derivation_by_union_002.xml b/ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070503_derivation_by_union/Pos_070503_derivation_by_union_002/Pos_070503_derivation_by_union_002.xml new file mode 100644 index 00000000..b5d1e3cd --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070503_derivation_by_union/Pos_070503_derivation_by_union_002/Pos_070503_derivation_by_union_002.xml @@ -0,0 +1,2 @@ + +1.0 \ No newline at end of file diff --git a/ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070503_derivation_by_union/Pos_070503_derivation_by_union_002/Pos_070503_derivation_by_union_002.xsd b/ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070503_derivation_by_union/Pos_070503_derivation_by_union_002/Pos_070503_derivation_by_union_002.xsd new file mode 100644 index 00000000..7ac1c5f5 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070503_derivation_by_union/Pos_070503_derivation_by_union_002/Pos_070503_derivation_by_union_002.xsd @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + diff --git a/ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070503_derivation_by_union/Pos_070503_derivation_by_union_003/Pos_070503_derivation_by_union_003.ttcn b/ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070503_derivation_by_union/Pos_070503_derivation_by_union_003/Pos_070503_derivation_by_union_003.ttcn new file mode 100644 index 00000000..a3425bcf --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070503_derivation_by_union/Pos_070503_derivation_by_union_003/Pos_070503_derivation_by_union_003.ttcn @@ -0,0 +1,92 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.5.3, Verify transformation of union with memberTypes attribute and unnamed member types + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// An XSD union is considered as a set of mutually exclusive alternative types for +// a simpleType. As this is compatible with the union type of TTCN-3, a simpleType +// derived by union in XSD shall be mapped to a union type definition in TTCN-3. The +// generated TTCN-3 union type shall contain one alternative for each member type of +// the XSD union, preserving the textual order of the member types in the initial XSD +// union type. The field names of the TTCN-3 union type shall be the result of applying +// clause 5.2.2 to either to the unqualified name of the member type (in case of built +// in XSD data types and user defined named types) ) or to the string "alt" (in case +// of unnamed member types). +module Pos_070503_derivation_by_union_003 { + + import from schema_Pos_070503_derivation_by_union_003 language "XSD" all; + + template MyType m_msgTest := { time := "14:35:21" }; + template MyType m_msg := { alt_ := "2014-04-24" }; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_070503_derivation_by_union_003() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_070503_derivation_by_union_003.xml", { "Pos_070503_derivation_by_union_003.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_070503_derivation_by_union_003(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070503_derivation_by_union/Pos_070503_derivation_by_union_003/Pos_070503_derivation_by_union_003.xml b/ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070503_derivation_by_union/Pos_070503_derivation_by_union_003/Pos_070503_derivation_by_union_003.xml new file mode 100644 index 00000000..f67ca981 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070503_derivation_by_union/Pos_070503_derivation_by_union_003/Pos_070503_derivation_by_union_003.xml @@ -0,0 +1,2 @@ + +2014-04-24 \ No newline at end of file diff --git a/ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070503_derivation_by_union/Pos_070503_derivation_by_union_003/Pos_070503_derivation_by_union_003.xsd b/ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070503_derivation_by_union/Pos_070503_derivation_by_union_003/Pos_070503_derivation_by_union_003.xsd new file mode 100644 index 00000000..7a6b780e --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070503_derivation_by_union/Pos_070503_derivation_by_union_003/Pos_070503_derivation_by_union_003.xsd @@ -0,0 +1,15 @@ + + + + + + + + + + + + + diff --git a/ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070503_derivation_by_union/Pos_070503_derivation_by_union_004/Pos_070503_derivation_by_union_004.ttcn b/ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070503_derivation_by_union/Pos_070503_derivation_by_union_004/Pos_070503_derivation_by_union_004.ttcn new file mode 100644 index 00000000..345f7c3a --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070503_derivation_by_union/Pos_070503_derivation_by_union_004/Pos_070503_derivation_by_union_004.ttcn @@ -0,0 +1,92 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.5.3, Verify transformation of union with memberTypes attribute and unnamed enumeration + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// An XSD union is considered as a set of mutually exclusive alternative types for +// a simpleType. As this is compatible with the union type of TTCN-3, a simpleType +// derived by union in XSD shall be mapped to a union type definition in TTCN-3. The +// generated TTCN-3 union type shall contain one alternative for each member type of +// the XSD union, preserving the textual order of the member types in the initial XSD +// union type. The field names of the TTCN-3 union type shall be the result of applying +// clause 5.2.2 to either to the unqualified name of the member type (in case of built +// in XSD data types and user defined named types) ) or to the string "alt" (in case +// of unnamed member types). +module Pos_070503_derivation_by_union_004 { + + import from schema_Pos_070503_derivation_by_union_004 language "XSD" all; + + template MyType m_msgTest := { nonNegativeInteger := 5 }; + template MyType m_msg := { alt_ := unbounded }; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_070503_derivation_by_union_004() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_070503_derivation_by_union_004.xml", { "Pos_070503_derivation_by_union_004.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_070503_derivation_by_union_004(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070503_derivation_by_union/Pos_070503_derivation_by_union_004/Pos_070503_derivation_by_union_004.xml b/ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070503_derivation_by_union/Pos_070503_derivation_by_union_004/Pos_070503_derivation_by_union_004.xml new file mode 100644 index 00000000..86602c18 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070503_derivation_by_union/Pos_070503_derivation_by_union_004/Pos_070503_derivation_by_union_004.xml @@ -0,0 +1,2 @@ + +unbounded \ No newline at end of file diff --git a/ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070503_derivation_by_union/Pos_070503_derivation_by_union_004/Pos_070503_derivation_by_union_004.xsd b/ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070503_derivation_by_union/Pos_070503_derivation_by_union_004/Pos_070503_derivation_by_union_004.xsd new file mode 100644 index 00000000..47c3fbe3 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070503_derivation_by_union/Pos_070503_derivation_by_union_004/Pos_070503_derivation_by_union_004.xsd @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070503_derivation_by_union/Pos_070503_derivation_by_union_005/Pos_070503_derivation_by_union_005.ttcn b/ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070503_derivation_by_union/Pos_070503_derivation_by_union_005/Pos_070503_derivation_by_union_005.ttcn new file mode 100644 index 00000000..4a4fd544 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070503_derivation_by_union/Pos_070503_derivation_by_union_005/Pos_070503_derivation_by_union_005.ttcn @@ -0,0 +1,81 @@ +/*************************************************** + ** @author STF 475, updated by STF 521 + ** @version 0.0.1 + ** @purpose 9:7.5.3, Verify transformation of union content containing enumeration facets + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +module Pos_070503_derivation_by_union_005 { + + import from schema_Pos_070503_derivation_by_union_005 language "XSD" all; + + template MyType m_msg := { alt_2 := "small" }; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_070503_derivation_by_union_005() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_070503_derivation_by_union_005.xml", { "Pos_070503_derivation_by_union_005.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_070503_derivation_by_union_005(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070503_derivation_by_union/Pos_070503_derivation_by_union_005/Pos_070503_derivation_by_union_005.xml b/ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070503_derivation_by_union/Pos_070503_derivation_by_union_005/Pos_070503_derivation_by_union_005.xml new file mode 100644 index 00000000..75e5fde5 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070503_derivation_by_union/Pos_070503_derivation_by_union_005/Pos_070503_derivation_by_union_005.xml @@ -0,0 +1,2 @@ + +small \ No newline at end of file diff --git a/ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070503_derivation_by_union/Pos_070503_derivation_by_union_005/Pos_070503_derivation_by_union_005.xsd b/ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070503_derivation_by_union/Pos_070503_derivation_by_union_005/Pos_070503_derivation_by_union_005.xsd new file mode 100644 index 00000000..0550355e --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070503_derivation_by_union/Pos_070503_derivation_by_union_005/Pos_070503_derivation_by_union_005.xsd @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070503_derivation_by_union/Pos_070503_derivation_by_union_006/Pos_070503_derivation_by_union_006.ttcn b/ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070503_derivation_by_union/Pos_070503_derivation_by_union_006/Pos_070503_derivation_by_union_006.ttcn new file mode 100644 index 00000000..dc53e6ea --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070503_derivation_by_union/Pos_070503_derivation_by_union_006/Pos_070503_derivation_by_union_006.ttcn @@ -0,0 +1,81 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.5.3, Verify transformation of union containing list content + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +module Pos_070503_derivation_by_union_006 { + + import from schema_Pos_070503_derivation_by_union_006 language "XSD" all; + + template MyType m_msg := { alt_1 := { 1.0, 2.0, 3.0 }}; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_070503_derivation_by_union_006() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_070503_derivation_by_union_006.xml", { "Pos_070503_derivation_by_union_006.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_070503_derivation_by_union_006(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070503_derivation_by_union/Pos_070503_derivation_by_union_006/Pos_070503_derivation_by_union_006.xml b/ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070503_derivation_by_union/Pos_070503_derivation_by_union_006/Pos_070503_derivation_by_union_006.xml new file mode 100644 index 00000000..cf583511 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070503_derivation_by_union/Pos_070503_derivation_by_union_006/Pos_070503_derivation_by_union_006.xml @@ -0,0 +1,2 @@ + +1.0 2.0 3.0 \ No newline at end of file diff --git a/ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070503_derivation_by_union/Pos_070503_derivation_by_union_006/Pos_070503_derivation_by_union_006.xsd b/ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070503_derivation_by_union/Pos_070503_derivation_by_union_006/Pos_070503_derivation_by_union_006.xsd new file mode 100644 index 00000000..78ebcab0 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070503_derivation_by_union/Pos_070503_derivation_by_union_006/Pos_070503_derivation_by_union_006.xsd @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + diff --git a/ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070503_derivation_by_union/Pos_070503_derivation_by_union_007/Pos_070503_derivation_by_union_007.ttcn b/ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070503_derivation_by_union/Pos_070503_derivation_by_union_007/Pos_070503_derivation_by_union_007.ttcn new file mode 100644 index 00000000..246bb6b7 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070503_derivation_by_union/Pos_070503_derivation_by_union_007/Pos_070503_derivation_by_union_007.ttcn @@ -0,0 +1,81 @@ +/*************************************************** + ** @author STF 548 + ** @version 0.0.1 + ** @purpose 9:7.5.3, Verify transformation of union restricted by enum facets (anonymous union members) + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +module Pos_070503_derivation_by_union_007 { + + import from schema_Pos_070503_derivation_by_union_007 language "XSD" all; + + template MyType m_msg := { xsiType := alt_, content := x20 }; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_070503_derivation_by_union_007() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_070503_derivation_by_union_007.xml", { "Pos_070503_derivation_by_union_007.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_070503_derivation_by_union_007(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070503_derivation_by_union/Pos_070503_derivation_by_union_007/Pos_070503_derivation_by_union_007.xml b/ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070503_derivation_by_union/Pos_070503_derivation_by_union_007/Pos_070503_derivation_by_union_007.xml new file mode 100644 index 00000000..bb6efe61 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070503_derivation_by_union/Pos_070503_derivation_by_union_007/Pos_070503_derivation_by_union_007.xml @@ -0,0 +1,2 @@ + +20 \ No newline at end of file diff --git a/ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070503_derivation_by_union/Pos_070503_derivation_by_union_007/Pos_070503_derivation_by_union_007.xsd b/ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070503_derivation_by_union/Pos_070503_derivation_by_union_007/Pos_070503_derivation_by_union_007.xsd new file mode 100644 index 00000000..56318915 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070503_derivation_by_union/Pos_070503_derivation_by_union_007/Pos_070503_derivation_by_union_007.xsd @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070503_derivation_by_union/Pos_070503_derivation_by_union_008/Pos_070503_derivation_by_union_008.ttcn b/ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070503_derivation_by_union/Pos_070503_derivation_by_union_008/Pos_070503_derivation_by_union_008.ttcn new file mode 100644 index 00000000..296dcf74 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070503_derivation_by_union/Pos_070503_derivation_by_union_008/Pos_070503_derivation_by_union_008.ttcn @@ -0,0 +1,81 @@ +/*************************************************** + ** @author STF 548 + ** @version 0.0.1 + ** @purpose 9:7.5.3, Verify transformation of union restricted by enum facets (referenced union members) + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +module Pos_070503_derivation_by_union_008 { + + import from schema_Pos_070503_derivation_by_union_008 language "XSD" all; + + template MyType m_msg := { xsiType := integer_, content := x20 }; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_070503_derivation_by_union_008() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_070503_derivation_by_union_008.xml", { "Pos_070503_derivation_by_union_008.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_070503_derivation_by_union_008(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070503_derivation_by_union/Pos_070503_derivation_by_union_008/Pos_070503_derivation_by_union_008.xml b/ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070503_derivation_by_union/Pos_070503_derivation_by_union_008/Pos_070503_derivation_by_union_008.xml new file mode 100644 index 00000000..cd2d07c7 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070503_derivation_by_union/Pos_070503_derivation_by_union_008/Pos_070503_derivation_by_union_008.xml @@ -0,0 +1,2 @@ + +20 \ No newline at end of file diff --git a/ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070503_derivation_by_union/Pos_070503_derivation_by_union_008/Pos_070503_derivation_by_union_008.xsd b/ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070503_derivation_by_union/Pos_070503_derivation_by_union_008/Pos_070503_derivation_by_union_008.xsd new file mode 100644 index 00000000..3fe6dd11 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0705_simpletype_components/070503_derivation_by_union/Pos_070503_derivation_by_union_008/Pos_070503_derivation_by_union_008.xsd @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070601_simple_content/07060101_extending_simple_content/Pos_07060101_extending_simple_content_001/Pos_07060101_extending_simple_content_001.ttcn b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070601_simple_content/07060101_extending_simple_content/Pos_07060101_extending_simple_content_001/Pos_07060101_extending_simple_content_001.ttcn new file mode 100644 index 00000000..38cac8c7 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070601_simple_content/07060101_extending_simple_content/Pos_07060101_extending_simple_content_001/Pos_07060101_extending_simple_content_001.ttcn @@ -0,0 +1,82 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.6.1.1, Verify extension of a built-in type by adding an attribute + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_07060101_extending_simple_content_001 { + + import from schema_Pos_07060101_extending_simple_content_001 language "XSD" all; + + template E23el m_msg := {bar := 1, foo := 2.0, base := "something"} + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_07060101_extending_simple_content_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_07060101_extending_simple_content_001.xml", { "Pos_07060101_extending_simple_content_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_07060101_extending_simple_content_001(), PX_TC_EXECUTION_TIMEOUT); + } + + +} + diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070601_simple_content/07060101_extending_simple_content/Pos_07060101_extending_simple_content_001/Pos_07060101_extending_simple_content_001.xml b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070601_simple_content/07060101_extending_simple_content/Pos_07060101_extending_simple_content_001/Pos_07060101_extending_simple_content_001.xml new file mode 100644 index 00000000..6b8df4f1 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070601_simple_content/07060101_extending_simple_content/Pos_07060101_extending_simple_content_001/Pos_07060101_extending_simple_content_001.xml @@ -0,0 +1,4 @@ + +something diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070601_simple_content/07060101_extending_simple_content/Pos_07060101_extending_simple_content_001/Pos_07060101_extending_simple_content_001.xsd b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070601_simple_content/07060101_extending_simple_content/Pos_07060101_extending_simple_content_001/Pos_07060101_extending_simple_content_001.xsd new file mode 100644 index 00000000..ec04b694 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070601_simple_content/07060101_extending_simple_content/Pos_07060101_extending_simple_content_001/Pos_07060101_extending_simple_content_001.xsd @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070601_simple_content/07060101_extending_simple_content/Pos_07060101_extending_simple_content_002/Pos_07060101_extending_simple_content_002.ttcn b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070601_simple_content/07060101_extending_simple_content/Pos_07060101_extending_simple_content_002/Pos_07060101_extending_simple_content_002.ttcn new file mode 100644 index 00000000..4efd4e05 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070601_simple_content/07060101_extending_simple_content/Pos_07060101_extending_simple_content_002/Pos_07060101_extending_simple_content_002.ttcn @@ -0,0 +1,91 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 9:7.6.1.1, Verify extension without changing the base creates a synonym type + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// If the definition of a new named or unnamed complex type uses another simple or complex type as the base +// of the extension without changing the base type (i.e. no facet is applied and no attribute is added), it +// shall be translated to a TTCN-3 type synonym to the base type (see clause 6.4 of [1]), completed with +// necessary additional encoding instructions (see section 7.6 rule 1). + +// NOTE: revision required after CR7656 is resolved + +module Pos_07060101_extending_simple_content_002 { + + import from schema_Pos_07060101_extending_simple_content_002 language "XSD" all; + + template Elem_complex_ext_simple m_msg := 1; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_07060101_extending_simple_content_002() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_07060101_extending_simple_content_002.xml", { "Pos_07060101_extending_simple_content_002.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_07060101_extending_simple_content_002(), PX_TC_EXECUTION_TIMEOUT); + } + + +} + diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070601_simple_content/07060101_extending_simple_content/Pos_07060101_extending_simple_content_002/Pos_07060101_extending_simple_content_002.xml b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070601_simple_content/07060101_extending_simple_content/Pos_07060101_extending_simple_content_002/Pos_07060101_extending_simple_content_002.xml new file mode 100644 index 00000000..8780f201 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070601_simple_content/07060101_extending_simple_content/Pos_07060101_extending_simple_content_002/Pos_07060101_extending_simple_content_002.xml @@ -0,0 +1,3 @@ + +1 diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070601_simple_content/07060101_extending_simple_content/Pos_07060101_extending_simple_content_002/Pos_07060101_extending_simple_content_002.xsd b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070601_simple_content/07060101_extending_simple_content/Pos_07060101_extending_simple_content_002/Pos_07060101_extending_simple_content_002.xsd new file mode 100644 index 00000000..d24ec37b --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070601_simple_content/07060101_extending_simple_content/Pos_07060101_extending_simple_content_002/Pos_07060101_extending_simple_content_002.xsd @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070601_simple_content/07060102_restricting_simple_content/Neg_07060102_restricting_simple_content_001/Neg_07060102_restricting_simple_content_001.ttcn b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070601_simple_content/07060102_restricting_simple_content/Neg_07060102_restricting_simple_content_001/Neg_07060102_restricting_simple_content_001.ttcn new file mode 100644 index 00000000..0c2c405f --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070601_simple_content/07060102_restricting_simple_content/Neg_07060102_restricting_simple_content_001/Neg_07060102_restricting_simple_content_001.ttcn @@ -0,0 +1,50 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.6.1.2, Verify restriction of a base type + ** @verdict pass reject + ***************************************************/ +module Neg_07060102_restricting_simple_content_001 { + + import from schema_Neg_07060102_restricting_simple_content_001 language "XSD" all; + + template E1 m_msg := { + bar := 1, + foo := 2.0, + base := "someone" //error because of length 4 + } + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type port P message { + inout all; + } + + type component C { + port P p; + } + + testcase TC_Neg_07060102_restricting_simple_content_001() runs on C system C { + map(self:p, system:p); + + // encode the message + p.send(m_msg); + log("template should either be rejected by compiler or by runtime latest while encoding"); + + setverdict(fail, "Invalid template should not be encoded"); + + unmap(self:p, system:p); + } + + control { + execute(TC_Neg_07060102_restricting_simple_content_001(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070601_simple_content/07060102_restricting_simple_content/Neg_07060102_restricting_simple_content_001/Neg_07060102_restricting_simple_content_001.xsd b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070601_simple_content/07060102_restricting_simple_content/Neg_07060102_restricting_simple_content_001/Neg_07060102_restricting_simple_content_001.xsd new file mode 100644 index 00000000..b6be7b64 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070601_simple_content/07060102_restricting_simple_content/Neg_07060102_restricting_simple_content_001/Neg_07060102_restricting_simple_content_001.xsd @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070601_simple_content/07060102_restricting_simple_content/Pos_07060102_restricting_simple_content_001/Pos_07060102_restricting_simple_content_001.ttcn b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070601_simple_content/07060102_restricting_simple_content/Pos_07060102_restricting_simple_content_001/Pos_07060102_restricting_simple_content_001.ttcn new file mode 100644 index 00000000..baa63396 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070601_simple_content/07060102_restricting_simple_content/Pos_07060102_restricting_simple_content_001/Pos_07060102_restricting_simple_content_001.ttcn @@ -0,0 +1,86 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.6.1.2, Verify restriction of a base type + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_07060102_restricting_simple_content_001 { + + import from schema_Pos_07060102_restricting_simple_content_001 language "XSD" all; + + /*template E1 m_msg := { + bar := 1, + foo := 2.0, + base := "some" + }*/ + + template E1 m_msg := {bar := 1, foo := 2.0, base := "some"} + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_07060102_restricting_simple_content_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_07060102_restricting_simple_content_001.xml", { "Pos_07060102_restricting_simple_content_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_07060102_restricting_simple_content_001(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070601_simple_content/07060102_restricting_simple_content/Pos_07060102_restricting_simple_content_001/Pos_07060102_restricting_simple_content_001.xml b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070601_simple_content/07060102_restricting_simple_content/Pos_07060102_restricting_simple_content_001/Pos_07060102_restricting_simple_content_001.xml new file mode 100644 index 00000000..8bec1b68 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070601_simple_content/07060102_restricting_simple_content/Pos_07060102_restricting_simple_content_001/Pos_07060102_restricting_simple_content_001.xml @@ -0,0 +1,4 @@ + +some \ No newline at end of file diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070601_simple_content/07060102_restricting_simple_content/Pos_07060102_restricting_simple_content_001/Pos_07060102_restricting_simple_content_001.xsd b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070601_simple_content/07060102_restricting_simple_content/Pos_07060102_restricting_simple_content_001/Pos_07060102_restricting_simple_content_001.xsd new file mode 100644 index 00000000..ee184460 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070601_simple_content/07060102_restricting_simple_content/Pos_07060102_restricting_simple_content_001/Pos_07060102_restricting_simple_content_001.xsd @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070601_simple_content/07060102_restricting_simple_content/Pos_07060102_restricting_simple_content_002/Pos_07060102_restricting_simple_content_002.ttcn b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070601_simple_content/07060102_restricting_simple_content/Pos_07060102_restricting_simple_content_002/Pos_07060102_restricting_simple_content_002.ttcn new file mode 100644 index 00000000..97f7a5e8 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070601_simple_content/07060102_restricting_simple_content/Pos_07060102_restricting_simple_content_002/Pos_07060102_restricting_simple_content_002.ttcn @@ -0,0 +1,89 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 9:7.6.1.2, Verify that a synonym type is created for restriction with no base type change + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirements are tested: +// If the definition of a new named or unnamed complex type uses another simple or complex type as the base of +// the restriction without changing the base type (i.e. no facet is applied), it shall be translated to a TTCN-3 +// type synonym to the base type (see clause 6.4 of [1]), completed with necessary additional encoding +// instructions (see section 7.6 rule 1). + +// NOTE: revision required after CR7656 is resolved + +module Pos_07060102_restricting_simple_content_002 { + + import from schema_Pos_07060102_restricting_simple_content_002 language "XSD" all; + + template Elem_complex_restr_simple m_msg := 1; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_07060102_restricting_simple_content_002() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_07060102_restricting_simple_content_002.xml", { "Pos_07060102_restricting_simple_content_002.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_07060102_restricting_simple_content_002(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070601_simple_content/07060102_restricting_simple_content/Pos_07060102_restricting_simple_content_002/Pos_07060102_restricting_simple_content_002.xml b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070601_simple_content/07060102_restricting_simple_content/Pos_07060102_restricting_simple_content_002/Pos_07060102_restricting_simple_content_002.xml new file mode 100644 index 00000000..e8886101 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070601_simple_content/07060102_restricting_simple_content/Pos_07060102_restricting_simple_content_002/Pos_07060102_restricting_simple_content_002.xml @@ -0,0 +1,3 @@ + +1 \ No newline at end of file diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070601_simple_content/07060102_restricting_simple_content/Pos_07060102_restricting_simple_content_002/Pos_07060102_restricting_simple_content_002.xsd b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070601_simple_content/07060102_restricting_simple_content/Pos_07060102_restricting_simple_content_002/Pos_07060102_restricting_simple_content_002.xsd new file mode 100644 index 00000000..b5b03296 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070601_simple_content/07060102_restricting_simple_content/Pos_07060102_restricting_simple_content_002/Pos_07060102_restricting_simple_content_002.xsd @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_001/Pos_07060201_derived_by_extension_001.ttcn b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_001/Pos_07060201_derived_by_extension_001.ttcn new file mode 100644 index 00000000..e00578a4 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_001/Pos_07060201_derived_by_extension_001.ttcn @@ -0,0 +1,125 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.6.2.1, Verify mapping of complex type where both the base and the + ** extending types have the compositor sequence. + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_07060201_derived_by_extension_001 { + + import from schema_Pos_07060201_derived_by_extension_001 language "XSD" all; + //template for EXAMPLE1 and following type system shall be generated from xsd file: + /*type record E1 + { + // fields corresponding to attributes of the base and the extending type + // (in alphabetical order) + XSD.String birthDateAttrGroup optional, + XSD.String birthPlaceAttrGroup optional, + XSD.Integer genderAttrBase optional, + XSD.String jobPositionAttrGroup optional, + XSD.String unitOfAge optional, + // followed by fields corresponding to elements of the base type + XSD.String titleElemBase, + XSD.String forenameElemBase, + XSD.String surnameElemBase, + // finally fields corresponding to the extending element and group reference + XSD.Integer ageElemExt, + G25seq g25seq + } + with { + variant "name as uncapitalized "; + variant (birthDateAttrGroup, birthPlaceAttrGroup, genderAttrBase, jobPositionAttrGroup,unitOfAge) "attribute"; + }; + + type record G25seq { + XSD.String familyStatusElemInGroup, + XSD.String spouseElemInGroup optional + } + with { + variant "untagged" + }*/ + + template E1 m_msg := { + birthDateAttrGroup := omit, + birthPlaceAttrGroup := omit, + genderAttrBase := omit, + jobPositionAttrGroup := omit, + unitOfAge := omit, + titleElemBase := "titleElemBase1", + forenameElemBase := "forenameElemBase2", + surnameElemBase := "surnameElemBase3", + ageElemExt := 1, + g25seq :={ + familyStatusElemInGroup :="familyStatusElemInGroup4", + spouseElemInGroup := omit + } + } + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_07060201_derived_by_extension_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_07060201_derived_by_extension_001.xml", { "Pos_07060201_derived_by_extension_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_07060201_derived_by_extension_001(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_001/Pos_07060201_derived_by_extension_001.xml b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_001/Pos_07060201_derived_by_extension_001.xml new file mode 100644 index 00000000..048b340f --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_001/Pos_07060201_derived_by_extension_001.xml @@ -0,0 +1,10 @@ + + + titleElemBase1 + forenameElemBase2 + surnameElemBase3 + 1 + familyStatusElemInGroup4 + diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_001/Pos_07060201_derived_by_extension_001.xsd b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_001/Pos_07060201_derived_by_extension_001.xsd new file mode 100644 index 00000000..f05003b5 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_001/Pos_07060201_derived_by_extension_001.xsd @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_002/Pos_07060201_derived_by_extension_002.ttcn b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_002/Pos_07060201_derived_by_extension_002.ttcn new file mode 100644 index 00000000..96417739 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_002/Pos_07060201_derived_by_extension_002.ttcn @@ -0,0 +1,120 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.6.2.1, Verify mapping of complex type where both the base and the + ** extending types have the compositor sequence and multiple occurrences + ** are allowed. + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_07060201_derived_by_extension_002 { + + import from schema_Pos_07060201_derived_by_extension_002 language "XSD" all; + // template for EXAMPLE 2: type element e26seqReccurrence and one value of sequence_list + // and following type system shall be generated from xsd file: + /* + type record E1 { + // fields corresponding to attributes of the base and the extending type + // (in alphabetical order) + XSD.Integer genderAttrBase optional, + XSD.String jobPositionAttrGroup optional, + XSD.String unitOfAge optional, + // followed by a "simple" field list corresponding to elements of the base type + XSD.String titleElemBase, + XSD.String forenameElemBase, + XSD.String surnameElemBase, + // the extending sequence is recurring (see clause 7.6.6.6 for the mapping) + record of record { + G25seq g25seq + XSD.Integer ageElemExt, + } sequence_list + } + with { + variant "name as uncapitalized"; + variant(sequence_list) "untagged"; + variant (genderAttrBase, jobPositionAttrGroup, unitOfAge) "attribute" + + */ + template E1 m_msg := { + genderAttrBase := omit, + jobPositionAttrGroup := omit, + unitOfAge := omit, + titleElemBase := "titleElemBase", + forenameElemBase := "forenameElemBase", + surnameElemBase := "surnameElemBase", + sequence_list := {{ + g25seq :={ + familyStatusElemInGroup :="familyStatusElemInGroup", + spouseElemInGroup := omit + }, + ageElemExt := 1 + }} + } + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_07060201_derived_by_extension_002() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_07060201_derived_by_extension_002.xml", { "Pos_07060201_derived_by_extension_002.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_07060201_derived_by_extension_002(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_002/Pos_07060201_derived_by_extension_002.xml b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_002/Pos_07060201_derived_by_extension_002.xml new file mode 100644 index 00000000..7529cee0 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_002/Pos_07060201_derived_by_extension_002.xml @@ -0,0 +1,9 @@ + + + titleElemBase + forenameElemBase + surnameElemBase + familyStatusElemInGroup + 1 + \ No newline at end of file diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_002/Pos_07060201_derived_by_extension_002.xsd b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_002/Pos_07060201_derived_by_extension_002.xsd new file mode 100644 index 00000000..5f8f94d2 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_002/Pos_07060201_derived_by_extension_002.xsd @@ -0,0 +1,50 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_003/Pos_07060201_derived_by_extension_003.ttcn b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_003/Pos_07060201_derived_by_extension_003.ttcn new file mode 100644 index 00000000..4368b616 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_003/Pos_07060201_derived_by_extension_003.ttcn @@ -0,0 +1,129 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.6.2.1, Verify mapping of complex type where both the base and the + ** extending types have the compositor sequence and multiple occurrences + ** are allowed. + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_07060201_derived_by_extension_003 { + + import from schema_Pos_07060201_derived_by_extension_003 language "XSD" all; + // template for EXAMPLE 2: type element e26seqDoubleRecurrence and one value of sequence_list and sequence_list_1 + // and following type system shall be generated from xsd file: + /* + type record E26seqDoubleRecurrence { + // fields corresponding to attributes of the base and the extending type + // (in alphabetical order) + XSD.Integer genderAttrBase optional, + XSD.String jobPositionAttrGroup optional, + XSD.String unitOfAge optional, + // followed by a record of record field containing the fields corresponding to elements of + // the base type; the base type is a recurring sequence (see clause + // 7.6.6.6 for the + // mapping) + record of record { + XSD.String titleElemBase, + XSD.String forenameElemBase, + XSD.String surnameElemBase + } sequence_list, + // the extending sequence is recurring too(see clause + // 7.6.6.6 for the + // mapping) + record of record { + G25seq g25seq + XSD.Integer ageElemExt, + } sequence_list_1 + } + with { + variant "name as uncapitalized"; + variant(sequence_list, sequence_list_1) "untagged"; + variant (genderAttrBase, jobPositionAttrGroup, unitOfAge) "attribute" + } + */ + template E1 m_msg := { + genderAttrBase := omit, + jobPositionAttrGroup := omit, + unitOfAge := omit, + sequence_list := {{ + titleElemBase := "titleElemBase", + forenameElemBase := "forenameElemBase", + surnameElemBase := "surnameElemBase" + }}, + sequence_list_1 := {{ + g25seq :={ + familyStatusElemInGroup :="familyStatusElemInGroup", + spouseElemInGroup := omit + }, + ageElemExt := 1 + }} + } + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_07060201_derived_by_extension_003() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_07060201_derived_by_extension_003.xml", { "Pos_07060201_derived_by_extension_003.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_07060201_derived_by_extension_003(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_003/Pos_07060201_derived_by_extension_003.xml b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_003/Pos_07060201_derived_by_extension_003.xml new file mode 100644 index 00000000..1eb7c005 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_003/Pos_07060201_derived_by_extension_003.xml @@ -0,0 +1,9 @@ + + + titleElemBase + forenameElemBase + surnameElemBase + familyStatusElemInGroup + 1 + \ No newline at end of file diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_003/Pos_07060201_derived_by_extension_003.xsd b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_003/Pos_07060201_derived_by_extension_003.xsd new file mode 100644 index 00000000..8916eed9 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_003/Pos_07060201_derived_by_extension_003.xsd @@ -0,0 +1,49 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_004/Pos_07060201_derived_by_extension_004.ttcn b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_004/Pos_07060201_derived_by_extension_004.ttcn new file mode 100644 index 00000000..1aa2a1fc --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_004/Pos_07060201_derived_by_extension_004.ttcn @@ -0,0 +1,130 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.6.2.1, Verify mapping of complex type where both the base and the + ** extending types have the compositor sequence and multiple occurrences + ** are allowed. + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_07060201_derived_by_extension_004 { + + import from schema_Pos_07060201_derived_by_extension_004 language "XSD" all; +// template for EXAMPLE 2: type element e26seqReccurrence and two records of sequence_list + // and following type system shall be generated from xsd file: + /* + type record E1 { + // fields corresponding to attributes of the base and the extending type + // (in alphabetical order) + XSD.Integer genderAttrBase optional, + XSD.String jobPositionAttrGroup optional, + XSD.String unitOfAge optional, + // followed by a "simple" field list corresponding to elements of the base type + XSD.String titleElemBase, + XSD.String forenameElemBase, + XSD.String surnameElemBase, + // the extending sequence is recurring (see clause 7.6.6.6 for the mapping) + record of record { + G25seq g25seq + XSD.Integer ageElemExt, + } sequence_list + } + with { + variant "name as uncapitalized"; + variant(sequence_list) "untagged"; + variant (genderAttrBase, jobPositionAttrGroup, unitOfAge) "attribute" + + */ + + template E1 m_msg := { + genderAttrBase := omit, + jobPositionAttrGroup := omit, + unitOfAge := omit, + titleElemBase := "titleElemBase", + forenameElemBase := "forenameElemBase", + surnameElemBase := "surnameElemBase", + sequence_list := { + { + g25seq :={ + familyStatusElemInGroup :="familyStatusElemInGroup", + spouseElemInGroup := omit + }, + ageElemExt := 1 + }, + { + g25seq :={ + familyStatusElemInGroup :="familyStatusElemInGroup2", + spouseElemInGroup := omit + }, + ageElemExt := 2 + } + } + } + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_07060201_derived_by_extension_004() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_07060201_derived_by_extension_004.xml", { "Pos_07060201_derived_by_extension_004.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_07060201_derived_by_extension_004(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_004/Pos_07060201_derived_by_extension_004.xml b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_004/Pos_07060201_derived_by_extension_004.xml new file mode 100644 index 00000000..263c2596 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_004/Pos_07060201_derived_by_extension_004.xml @@ -0,0 +1,11 @@ + + + titleElemBase + forenameElemBase + surnameElemBase + familyStatusElemInGroup + 1 + familyStatusElemInGroup2 + 2 + \ No newline at end of file diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_004/Pos_07060201_derived_by_extension_004.xsd b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_004/Pos_07060201_derived_by_extension_004.xsd new file mode 100644 index 00000000..85eebf8f --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_004/Pos_07060201_derived_by_extension_004.xsd @@ -0,0 +1,50 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_005/Pos_07060201_derived_by_extension_005.ttcn b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_005/Pos_07060201_derived_by_extension_005.ttcn new file mode 100644 index 00000000..06b808a8 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_005/Pos_07060201_derived_by_extension_005.ttcn @@ -0,0 +1,136 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.6.2.1, Verify mapping of complex type where both the base and the + ** extending types have the compositor sequence and multiple occurrences + ** are allowed. + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_07060201_derived_by_extension_005 { + + import from schema_Pos_07060201_derived_by_extension_005 language "XSD" all; + // template for EXAMPLE 2: type element e26seqDoubleRecurrence and two records of sequence_list and one sequence_list_1 + // and following type system shall be generated from xsd file: + /* + type record E26seqDoubleRecurrence { + // fields corresponding to attributes of the base and the extending type + // (in alphabetical order) + XSD.Integer genderAttrBase optional, + XSD.String jobPositionAttrGroup optional, + XSD.String unitOfAge optional, + // followed by a record of record field containing the fields corresponding to elements of + // the base type; the base type is a recurring sequence (see clause + // 7.6.6.6 for the + // mapping) + record of record { + XSD.String titleElemBase, + XSD.String forenameElemBase, + XSD.String surnameElemBase + } sequence_list, + // the extending sequence is recurring too(see clause + // 7.6.6.6 for the + // mapping) + record of record { + G25seq g25seq + XSD.Integer ageElemExt, + } sequence_list_1 + } + with { + variant "name as uncapitalized"; + variant(sequence_list, sequence_list_1) "untagged"; + variant (genderAttrBase, jobPositionAttrGroup, unitOfAge) "attribute" + } + */ + template E1 m_msg := { + genderAttrBase := omit, + jobPositionAttrGroup := omit, + unitOfAge := omit, + sequence_list := { + { + titleElemBase := "titleElemBase", + forenameElemBase := "forenameElemBase", + surnameElemBase := "surnameElemBase" + }, + { + titleElemBase := "titleElemBase1", + forenameElemBase := "forenameElemBase1", + surnameElemBase := "surnameElemBase1" + } + }, + sequence_list_1 := {{ + g25seq :={ + familyStatusElemInGroup :="familyStatusElemInGroup", + spouseElemInGroup := omit + }, + ageElemExt := 1 + }} + } + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_07060201_derived_by_extension_005() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_07060201_derived_by_extension_005.xml", { "Pos_07060201_derived_by_extension_005.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_07060201_derived_by_extension_005(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_005/Pos_07060201_derived_by_extension_005.xml b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_005/Pos_07060201_derived_by_extension_005.xml new file mode 100644 index 00000000..0cd95e7c --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_005/Pos_07060201_derived_by_extension_005.xml @@ -0,0 +1,12 @@ + + + titleElemBase + forenameElemBase + surnameElemBase + titleElemBase1 + forenameElemBase1 + surnameElemBase1 + familyStatusElemInGroup + 1 + \ No newline at end of file diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_005/Pos_07060201_derived_by_extension_005.xsd b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_005/Pos_07060201_derived_by_extension_005.xsd new file mode 100644 index 00000000..361be2bd --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_005/Pos_07060201_derived_by_extension_005.xsd @@ -0,0 +1,49 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_006/Pos_07060201_derived_by_extension_006.ttcn b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_006/Pos_07060201_derived_by_extension_006.ttcn new file mode 100644 index 00000000..a5ada146 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_006/Pos_07060201_derived_by_extension_006.ttcn @@ -0,0 +1,111 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.6.2.1, Verify mapping of complex type where both the base and + ** the extending types have the compositor choice + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_07060201_derived_by_extension_006 { + + import from schema_Pos_07060201_derived_by_extension_006 language "XSD" all; + // template for EXAMPLE 3: type element e26cho + // and following type system shall be generated from xsd file: + /* + type record E1 { + XSD.String genderAttrBase optional, + XSD.String unitAttrExt optional, + union { + XSD.String titleElemBase, + XSD.String forenameElemBase, + XSD.String surnameElemBase + } choice, + union { + XSD.Integer ageElemExt + XSD.Date birthdayElemExt + } choice_1 + } + with { + variant "name as uncapitalized"; + variant(genderAttrBase, unitAttrExt) "attribute"; + variant(choice, choice_1) "untagged" + } + */ + template E1 m_msg := { + genderAttrBase := omit, + unitAttrExt := omit, + choice := { + surnameElemBase := "surnameElemBase" + }, + choice_1 :={ + ageElemExt := 10 + } + }; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_07060201_derived_by_extension_006() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_07060201_derived_by_extension_006.xml", { "Pos_07060201_derived_by_extension_006.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_07060201_derived_by_extension_006(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_006/Pos_07060201_derived_by_extension_006.xml b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_006/Pos_07060201_derived_by_extension_006.xml new file mode 100644 index 00000000..7c1ddd2d --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_006/Pos_07060201_derived_by_extension_006.xml @@ -0,0 +1,6 @@ + + + surnameElemBase + 10 + \ No newline at end of file diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_006/Pos_07060201_derived_by_extension_006.xsd b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_006/Pos_07060201_derived_by_extension_006.xsd new file mode 100644 index 00000000..672bbe8d --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_006/Pos_07060201_derived_by_extension_006.xsd @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_007/Pos_07060201_derived_by_extension_007.ttcn b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_007/Pos_07060201_derived_by_extension_007.ttcn new file mode 100644 index 00000000..31f89e02 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_007/Pos_07060201_derived_by_extension_007.ttcn @@ -0,0 +1,113 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.6.2.1, Verify mapping of complex type where extension of a sequence + ** base type by a choice model group + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_07060201_derived_by_extension_007 { + + import from schema_Pos_07060201_derived_by_extension_007 language "XSD" all; + // template for EXAMPLE 4: type element e27cho + // and following type system shall be generated from xsd file: + /* + type record E1 + { + XSD.Integer genderAttrBase optional, + XSD.String jobPositionAttrGroup optional, + XSD.String unitAttrExt optional, + XSD.String titleElemBase, + XSD.String forenameElemBase, + XSD.String surnameElemBase, + union { + XSD.Integer ageElemExt, + XSD.Date birthdayElemExt + } choice + } + with { + variant "name as uncapitalized"; + variant(genderAttrBase, jobPositionAttrGroup, unitAttrExt) "attribute"; + variant(choice) "untagged" + } + */ + + template E1 m_msg := { + genderAttrBase := omit, + jobPositionAttrGroup := omit, + unitAttrExt := omit, + titleElemBase :="titleElemBase", + forenameElemBase :="forenameElemBase", + surnameElemBase :="surnameElemBase", + choice := { + ageElemExt := 10 + } + }; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_07060201_derived_by_extension_007() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_07060201_derived_by_extension_007.xml", { "Pos_07060201_derived_by_extension_007.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_07060201_derived_by_extension_007(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_007/Pos_07060201_derived_by_extension_007.xml b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_007/Pos_07060201_derived_by_extension_007.xml new file mode 100644 index 00000000..62066ba2 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_007/Pos_07060201_derived_by_extension_007.xml @@ -0,0 +1,10 @@ + + + titleElemBase + forenameElemBase + surnameElemBase + + 10 + + \ No newline at end of file diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_007/Pos_07060201_derived_by_extension_007.xsd b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_007/Pos_07060201_derived_by_extension_007.xsd new file mode 100644 index 00000000..a796d6e3 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_007/Pos_07060201_derived_by_extension_007.xsd @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_008/Pos_07060201_derived_by_extension_008.ttcn b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_008/Pos_07060201_derived_by_extension_008.ttcn new file mode 100644 index 00000000..43cf4f84 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_008/Pos_07060201_derived_by_extension_008.ttcn @@ -0,0 +1,108 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.6.2.1, Verify mapping of complex type: + ** extending of a base type with choice model group by a sequence model group + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_07060201_derived_by_extension_008 { + + import from schema_Pos_07060201_derived_by_extension_008 language "XSD" all; + // template for EXAMPLE 5: type element e27seq + // and following type system shall be generated from xsd file: + /* + type record E1 { + XSD.String genderAttrBase optional, + XSD.String unitAttrExt optional, + union { + XSD.String ElemBase, + XSD.String forenameElemBase, + XSD.String surnameElemBase + } choice, + XSD.Integer ageElemExt + } + with { + variant "name as uncapitalized"; + variant(genderAttrBase, unitAttrExt) "attribute"; + variant(choice) "untagged"; + } + */ + + template E1 m_msg := { + genderAttrBase := "genderAttrBase", + unitAttrExt := omit, + choice := { + surnameElemBase := "surnameElemBase" + }, + ageElemExt := 10 + + }; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_07060201_derived_by_extension_008() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_07060201_derived_by_extension_008.xml", { "Pos_07060201_derived_by_extension_008.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_07060201_derived_by_extension_008(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_008/Pos_07060201_derived_by_extension_008.xml b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_008/Pos_07060201_derived_by_extension_008.xml new file mode 100644 index 00000000..55b6d40d --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_008/Pos_07060201_derived_by_extension_008.xml @@ -0,0 +1,10 @@ + + + + surnameElemBase + + + 10 + diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_008/Pos_07060201_derived_by_extension_008.xsd b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_008/Pos_07060201_derived_by_extension_008.xsd new file mode 100644 index 00000000..54d7b190 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_008/Pos_07060201_derived_by_extension_008.xsd @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_009/Pos_07060201_derived_by_extension_009.ttcn b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_009/Pos_07060201_derived_by_extension_009.ttcn new file mode 100644 index 00000000..38c0cee0 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_009/Pos_07060201_derived_by_extension_009.ttcn @@ -0,0 +1,101 @@ +/*************************************************** + ** @author STF 475, updated by STF 521 + ** @version 0.0.2 + ** @purpose 9:7.6.2.1, Verify mapping of complex type: + ** Recursive extension of an anonymous inner type is realized + ** using the TTCN-3 dot notation (starts from the name of the outmost type) + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_07060201_derived_by_extension_009 { + + import from schema_Pos_07060201_derived_by_extension_009 language "XSD" all; + // template for EXAMPLE 6: type element X + // and following type system shall be generated from xsd file: + /* + type record E1 { + XSD.String x, + record { + XSD.String x, + E1.y y optional, + XSD.String z + } y optional + } + */ + + template E1 m_msg := { + x := "x", + y := { + x := "x1", + y := omit, + z := "z1" + } + }; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_07060201_derived_by_extension_009() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_07060201_derived_by_extension_009.xml", { "Pos_07060201_derived_by_extension_009.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_07060201_derived_by_extension_009(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_009/Pos_07060201_derived_by_extension_009.xml b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_009/Pos_07060201_derived_by_extension_009.xml new file mode 100644 index 00000000..753fb430 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_009/Pos_07060201_derived_by_extension_009.xml @@ -0,0 +1,13 @@ + + + x + + + x1 + + z1 + + + + diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_009/Pos_07060201_derived_by_extension_009.xsd b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_009/Pos_07060201_derived_by_extension_009.xsd new file mode 100644 index 00000000..26e0d621 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_009/Pos_07060201_derived_by_extension_009.xsd @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_010/Pos_07060201_derived_by_extension_010.ttcn b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_010/Pos_07060201_derived_by_extension_010.ttcn new file mode 100644 index 00000000..c67f3f76 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_010/Pos_07060201_derived_by_extension_010.ttcn @@ -0,0 +1,92 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 9:7.6.2.1, Verify that a complex content derived by extension with no change is mapped to a synonym type + ** extending types have the compositor sequence. + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirements are tested: +// If the definition of a new named or unnamed complex type uses another simple or complex type as the base of +// the extension without changing the base type (i.e. no facet is applied and no element or attribute is added), +// it shall be translated to a TTCN-3 type synonym to the base type (see clause 6.4 of [1]), completed with +// necessary additional encoding instructions (see section 7.6 rule 1). + +module Pos_07060201_derived_by_extension_010 { + + import from schema_Pos_07060201_derived_by_extension_010 language "XSD" all; + + template Elem_complex_ext_complex m_msg := { + attr := 23, + int := 1, + str := "xyz" + } + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_07060201_derived_by_extension_010() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_07060201_derived_by_extension_010.xml", { "Pos_07060201_derived_by_extension_010.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_07060201_derived_by_extension_010(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_010/Pos_07060201_derived_by_extension_010.xml b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_010/Pos_07060201_derived_by_extension_010.xml new file mode 100644 index 00000000..2809cc50 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_010/Pos_07060201_derived_by_extension_010.xml @@ -0,0 +1,8 @@ + + + 1 + xyz + diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_010/Pos_07060201_derived_by_extension_010.xsd b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_010/Pos_07060201_derived_by_extension_010.xsd new file mode 100644 index 00000000..d539635c --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_010/Pos_07060201_derived_by_extension_010.xsd @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060202_derived_by_restriction/Pos_07060202_derived_by_restriction_001/Pos_07060202_derived_by_restriction_001.ttcn b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060202_derived_by_restriction/Pos_07060202_derived_by_restriction_001/Pos_07060202_derived_by_restriction_001.ttcn new file mode 100644 index 00000000..c740bacb --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060202_derived_by_restriction/Pos_07060202_derived_by_restriction_001/Pos_07060202_derived_by_restriction_001.ttcn @@ -0,0 +1,84 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.6.2.2, Verify mapping of complex content derived by restriction: + ** AnyType is used as the base type and it is restricted to only two elements + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_07060202_derived_by_restriction_001 { + + import from schema_Pos_07060202_derived_by_restriction_001 language "XSD" all; + + template E1 m_msg := { + size := -200, + unit:= "string" + }; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_07060202_derived_by_restriction_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_07060202_derived_by_restriction_001.xml", { "Pos_07060202_derived_by_restriction_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_07060202_derived_by_restriction_001(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060202_derived_by_restriction/Pos_07060202_derived_by_restriction_001/Pos_07060202_derived_by_restriction_001.xml b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060202_derived_by_restriction/Pos_07060202_derived_by_restriction_001/Pos_07060202_derived_by_restriction_001.xml new file mode 100644 index 00000000..9f4733cf --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060202_derived_by_restriction/Pos_07060202_derived_by_restriction_001/Pos_07060202_derived_by_restriction_001.xml @@ -0,0 +1,6 @@ + + + -200 + string + diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060202_derived_by_restriction/Pos_07060202_derived_by_restriction_001/Pos_07060202_derived_by_restriction_001.xsd b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060202_derived_by_restriction/Pos_07060202_derived_by_restriction_001/Pos_07060202_derived_by_restriction_001.xsd new file mode 100644 index 00000000..396e5612 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060202_derived_by_restriction/Pos_07060202_derived_by_restriction_001/Pos_07060202_derived_by_restriction_001.xsd @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060202_derived_by_restriction/Pos_07060202_derived_by_restriction_002/Pos_07060202_derived_by_restriction_002.ttcn b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060202_derived_by_restriction/Pos_07060202_derived_by_restriction_002/Pos_07060202_derived_by_restriction_002.ttcn new file mode 100644 index 00000000..32ceaadb --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060202_derived_by_restriction/Pos_07060202_derived_by_restriction_002/Pos_07060202_derived_by_restriction_002.ttcn @@ -0,0 +1,87 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 Verify that a complex content derived by restriction with no change is mapped to a synonym type + ** @purpose 9:7.6.2.2, + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirements are tested: +// If the definition of a new named or unnamed complex type uses another complex type as the base of +// the restriction without changing the base type (i.e. no facet is present), it shall be translated +// to a TTCN-3 type synonym to the base type (see clause 6.4 of [1]), completed with necessary +// additional encoding instructions (see section 7.6. rule 1). + +module Pos_07060202_derived_by_restriction_002 { + + import from schema_Pos_07060202_derived_by_restriction_002 language "XSD" all; + + template Elem_complex_restr_complex m_msg := {} + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_07060202_derived_by_restriction_002() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_07060202_derived_by_restriction_002.xml", { "Pos_07060202_derived_by_restriction_002.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_07060202_derived_by_restriction_002(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060202_derived_by_restriction/Pos_07060202_derived_by_restriction_002/Pos_07060202_derived_by_restriction_002.xml b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060202_derived_by_restriction/Pos_07060202_derived_by_restriction_002/Pos_07060202_derived_by_restriction_002.xml new file mode 100644 index 00000000..4f554925 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060202_derived_by_restriction/Pos_07060202_derived_by_restriction_002/Pos_07060202_derived_by_restriction_002.xml @@ -0,0 +1,3 @@ + + diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060202_derived_by_restriction/Pos_07060202_derived_by_restriction_002/Pos_07060202_derived_by_restriction_002.xsd b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060202_derived_by_restriction/Pos_07060202_derived_by_restriction_002/Pos_07060202_derived_by_restriction_002.xsd new file mode 100644 index 00000000..24980955 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060202_derived_by_restriction/Pos_07060202_derived_by_restriction_002/Pos_07060202_derived_by_restriction_002.xsd @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_001/Pos_070603_referencing_group_components_001.ttcn b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_001/Pos_070603_referencing_group_components_001.ttcn new file mode 100644 index 00000000..7bdfc555 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_001/Pos_070603_referencing_group_components_001.ttcn @@ -0,0 +1,93 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.6.3, Verify conversion of group reference occurring as child of complex type (sequence, one occurrence) + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// When group reference is a child of complexType, the compositor of the +// referenced group definition is sequence and both the minOccurs and maxOccurs +// attributes of the group reference equal to "1" (either explicitly or by +// defaulting to "1"), it shall be translated as if the child elements of the +// referenced group definition were present in the complexType definition +// directly +//////////////////////////////////////////////////////////////////////////////// + +module Pos_070603_referencing_group_components_001 { + + import from schema_Pos_070603_referencing_group_components_001 language "XSD" all; + + template MyType m_msg := { + shipTo := "New York", + billTo := "SuperMegaCorp Inc." + }; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_070603_referencing_group_components_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_070603_referencing_group_components_001.xml", { "Pos_070603_referencing_group_components_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_070603_referencing_group_components_001(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_001/Pos_070603_referencing_group_components_001.xml b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_001/Pos_070603_referencing_group_components_001.xml new file mode 100644 index 00000000..065f7f1f --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_001/Pos_070603_referencing_group_components_001.xml @@ -0,0 +1,5 @@ + + + New York + SuperMegaCorp Inc. + \ No newline at end of file diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_001/Pos_070603_referencing_group_components_001.xsd b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_001/Pos_070603_referencing_group_components_001.xsd new file mode 100644 index 00000000..05254f38 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_001/Pos_070603_referencing_group_components_001.xsd @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_002/Pos_070603_referencing_group_components_002.ttcn b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_002/Pos_070603_referencing_group_components_002.ttcn new file mode 100644 index 00000000..8b685acb --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_002/Pos_070603_referencing_group_components_002.ttcn @@ -0,0 +1,94 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.6.3, Verify conversion of group reference occurring inside sequence + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// In all other cases the referenced group component shall be translated to +// a field of the enclosing record of type (generated for the parent +// complexType, sequence or choice element) referencing the TTCN-3 type +// generated for the referenced group definition, considering also the +// attributes of the referenced group component according to clause 7.1. + +module Pos_070603_referencing_group_components_002 { + + import from schema_Pos_070603_referencing_group_components_002 language "XSD" all; + + template MyType m_msg := { + shipAndBill := { + shipTo := "Windsor Castle", + billTo := "Her Majesty" + }, + sentFrom := "Luxury department" + }; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_070603_referencing_group_components_002() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_070603_referencing_group_components_002.xml", { "Pos_070603_referencing_group_components_002.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_070603_referencing_group_components_002(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_002/Pos_070603_referencing_group_components_002.xml b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_002/Pos_070603_referencing_group_components_002.xml new file mode 100644 index 00000000..73d00f1b --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_002/Pos_070603_referencing_group_components_002.xml @@ -0,0 +1,6 @@ + + + Windsor Castle + Her Majesty + Luxury department + \ No newline at end of file diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_002/Pos_070603_referencing_group_components_002.xsd b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_002/Pos_070603_referencing_group_components_002.xsd new file mode 100644 index 00000000..a3ae310d --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_002/Pos_070603_referencing_group_components_002.xsd @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_003/Pos_070603_referencing_group_components_003.ttcn b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_003/Pos_070603_referencing_group_components_003.ttcn new file mode 100644 index 00000000..255f7f05 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_003/Pos_070603_referencing_group_components_003.ttcn @@ -0,0 +1,94 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.6.3, Verify conversion of group reference occurring as child of complex type (sequence, optional occurrence) + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// In all other cases the referenced group component shall be translated to +// a field of the enclosing record of type (generated for the parent +// complexType, sequence or choice element) referencing the TTCN-3 type +// generated for the referenced group definition, considering also the +// attributes of the referenced group component according to clause 7.1. + +module Pos_070603_referencing_group_components_003 { + + import from schema_Pos_070603_referencing_group_components_003 language "XSD" all; + + template MyType m_msg := { + "test", + { + shipTo := "Mars", + billTo := "NASA" + } + }; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_070603_referencing_group_components_003() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_070603_referencing_group_components_003.xml", { "Pos_070603_referencing_group_components_003.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_070603_referencing_group_components_003(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_003/Pos_070603_referencing_group_components_003.xml b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_003/Pos_070603_referencing_group_components_003.xml new file mode 100644 index 00000000..cbb569b9 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_003/Pos_070603_referencing_group_components_003.xml @@ -0,0 +1,5 @@ + + + Mars + NASA + \ No newline at end of file diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_003/Pos_070603_referencing_group_components_003.xsd b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_003/Pos_070603_referencing_group_components_003.xsd new file mode 100644 index 00000000..a3989250 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_003/Pos_070603_referencing_group_components_003.xsd @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_004/Pos_070603_referencing_group_components_004.ttcn b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_004/Pos_070603_referencing_group_components_004.ttcn new file mode 100644 index 00000000..f6284d2b --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_004/Pos_070603_referencing_group_components_004.ttcn @@ -0,0 +1,93 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.6.3, Verify conversion of group reference occurring as child of complex type (sequence, 0..N) + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// In all other cases the referenced group component shall be translated to +// a field of the enclosing record of type (generated for the parent +// complexType, sequence or choice element) referencing the TTCN-3 type +// generated for the referenced group definition, considering also the +// attributes of the referenced group component according to clause 7.1. + +module Pos_070603_referencing_group_components_004 { + + import from schema_Pos_070603_referencing_group_components_004 language "XSD" all; + + template MyType m_msg := { + shipAndBill_list := { + { "New York", "SuperMegaCorp Inc."}, + { "Berlin", "SuperMegaGesellschaft AG" } + } + }; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_070603_referencing_group_components_004() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_070603_referencing_group_components_004.xml", { "Pos_070603_referencing_group_components_004.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_070603_referencing_group_components_004(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_004/Pos_070603_referencing_group_components_004.xml b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_004/Pos_070603_referencing_group_components_004.xml new file mode 100644 index 00000000..77bc8b04 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_004/Pos_070603_referencing_group_components_004.xml @@ -0,0 +1,7 @@ + + + New York + SuperMegaCorp Inc. + Berlin + SuperMegaGesellschaft AG + \ No newline at end of file diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_004/Pos_070603_referencing_group_components_004.xsd b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_004/Pos_070603_referencing_group_components_004.xsd new file mode 100644 index 00000000..a122b06b --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_004/Pos_070603_referencing_group_components_004.xsd @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_005/Pos_070603_referencing_group_components_005.ttcn b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_005/Pos_070603_referencing_group_components_005.ttcn new file mode 100644 index 00000000..c029c57e --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_005/Pos_070603_referencing_group_components_005.ttcn @@ -0,0 +1,91 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.6.3, Verify conversion of group reference occurring as child of complex type (all, one occurrence) + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// When the referenced group has the compositor all, it has to be translated is +// the content of the referenced group definition was present directly, i.e. +// according to clause 7.6.4; + +module Pos_070603_referencing_group_components_005 { + + import from schema_Pos_070603_referencing_group_components_005 language "XSD" all; + + template MyType m_msg := { + { billTo, shipTo }, + omit, + "New York", + "SuperMegaCorp Inc." + }; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_070603_referencing_group_components_005() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_070603_referencing_group_components_005.xml", { "Pos_070603_referencing_group_components_005.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_070603_referencing_group_components_005(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_005/Pos_070603_referencing_group_components_005.xml b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_005/Pos_070603_referencing_group_components_005.xml new file mode 100644 index 00000000..02f61635 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_005/Pos_070603_referencing_group_components_005.xml @@ -0,0 +1,5 @@ + + + SuperMegaCorp Inc. + New York + \ No newline at end of file diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_005/Pos_070603_referencing_group_components_005.xsd b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_005/Pos_070603_referencing_group_components_005.xsd new file mode 100644 index 00000000..5680592e --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_005/Pos_070603_referencing_group_components_005.xsd @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_006/Pos_070603_referencing_group_components_006.ttcn b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_006/Pos_070603_referencing_group_components_006.ttcn new file mode 100644 index 00000000..ad6f5cfb --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_006/Pos_070603_referencing_group_components_006.ttcn @@ -0,0 +1,90 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.6.3, Verify conversion of group reference occurring as child of complex type (all, 0..1) + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// When the referenced group has the compositor all, it has to be translated is +// the content of the referenced group definition was present directly, i.e. +// according to clause 7.6.4; + +module Pos_070603_referencing_group_components_006 { + + import from schema_Pos_070603_referencing_group_components_006 language "XSD" all; + template MyType m_msg := { + { }, + omit, + omit, + omit + }; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_070603_referencing_group_components_006() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_070603_referencing_group_components_006.xml", { "Pos_070603_referencing_group_components_006.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_070603_referencing_group_components_006(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_006/Pos_070603_referencing_group_components_006.xml b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_006/Pos_070603_referencing_group_components_006.xml new file mode 100644 index 00000000..294bc4d0 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_006/Pos_070603_referencing_group_components_006.xml @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_006/Pos_070603_referencing_group_components_006.xsd b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_006/Pos_070603_referencing_group_components_006.xsd new file mode 100644 index 00000000..cf936fab --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_006/Pos_070603_referencing_group_components_006.xsd @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_007/Pos_070603_referencing_group_components_007.ttcn b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_007/Pos_070603_referencing_group_components_007.ttcn new file mode 100644 index 00000000..d69abfb7 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_007/Pos_070603_referencing_group_components_007.ttcn @@ -0,0 +1,90 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.6.3, Verify conversion of group reference occurring as child of complex type (choice, one occurrence) + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// In all other cases the referenced group component shall be translated to +// a field of the enclosing record of type (generated for the parent +// complexType, sequence or choice element) referencing the TTCN-3 type +// generated for the referenced group definition, considering also the +// attributes of the referenced group component according to clause 7.1. + +module Pos_070603_referencing_group_components_007 { + + import from schema_Pos_070603_referencing_group_components_007 language "XSD" all; + + template MyType m_msg := { + shipAndBill := { shipTo := "Beijing" } + }; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_070603_referencing_group_components_007() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_070603_referencing_group_components_007.xml", { "Pos_070603_referencing_group_components_007.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_070603_referencing_group_components_007(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_007/Pos_070603_referencing_group_components_007.xml b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_007/Pos_070603_referencing_group_components_007.xml new file mode 100644 index 00000000..462c45e8 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_007/Pos_070603_referencing_group_components_007.xml @@ -0,0 +1,4 @@ + + + Beijing + \ No newline at end of file diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_007/Pos_070603_referencing_group_components_007.xsd b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_007/Pos_070603_referencing_group_components_007.xsd new file mode 100644 index 00000000..a8786d91 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_007/Pos_070603_referencing_group_components_007.xsd @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_008/Pos_070603_referencing_group_components_008.ttcn b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_008/Pos_070603_referencing_group_components_008.ttcn new file mode 100644 index 00000000..b82a6fab --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_008/Pos_070603_referencing_group_components_008.ttcn @@ -0,0 +1,94 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.6.3, Verify conversion of group reference occurring as child of complex type (choice, 0..1) + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// In all other cases the referenced group component shall be translated to +// a field of the enclosing record of type (generated for the parent +// complexType, sequence or choice element) referencing the TTCN-3 type +// generated for the referenced group definition, considering also the +// attributes of the referenced group component according to clause 7.1. + +module Pos_070603_referencing_group_components_008 { + + import from schema_Pos_070603_referencing_group_components_008 language "XSD" all; + + template MyType m_empty := { + 1, omit + }; + template MyType m_msg := { + attr := omit, + shipAndBill := { billTo := "Bill the Bull" } + }; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_070603_referencing_group_components_008() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_070603_referencing_group_components_008.xml", { "Pos_070603_referencing_group_components_008.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_070603_referencing_group_components_008(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_008/Pos_070603_referencing_group_components_008.xml b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_008/Pos_070603_referencing_group_components_008.xml new file mode 100644 index 00000000..6b5ca0ea --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_008/Pos_070603_referencing_group_components_008.xml @@ -0,0 +1,4 @@ + + + Bill the Bull + \ No newline at end of file diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_008/Pos_070603_referencing_group_components_008.xsd b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_008/Pos_070603_referencing_group_components_008.xsd new file mode 100644 index 00000000..0301c0f3 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_008/Pos_070603_referencing_group_components_008.xsd @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_009/Pos_070603_referencing_group_components_009.ttcn b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_009/Pos_070603_referencing_group_components_009.ttcn new file mode 100644 index 00000000..900d9ce8 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_009/Pos_070603_referencing_group_components_009.ttcn @@ -0,0 +1,96 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.6.3, Verify conversion of group reference occurring as child of complex type (choice, 0..N) + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// In all other cases the referenced group component shall be translated to +// a field of the enclosing record of type (generated for the parent +// complexType, sequence or choice element) referencing the TTCN-3 type +// generated for the referenced group definition, considering also the +// attributes of the referenced group component according to clause 7.1. + +module Pos_070603_referencing_group_components_009 { + + import from schema_Pos_070603_referencing_group_components_009 language "XSD" all; + + template MyType m_msg := { + shipAndBill_list := { + { + shipTo := "Mata-Utu" + }, { + billTo := "Tamasia and Malofafa" + } + } + }; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_070603_referencing_group_components_009() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_070603_referencing_group_components_009.xml", { "Pos_070603_referencing_group_components_009.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_070603_referencing_group_components_009(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_009/Pos_070603_referencing_group_components_009.xml b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_009/Pos_070603_referencing_group_components_009.xml new file mode 100644 index 00000000..7d11750f --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_009/Pos_070603_referencing_group_components_009.xml @@ -0,0 +1,5 @@ + + + Mata-Utu + Tamasia and Malofafa + \ No newline at end of file diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_009/Pos_070603_referencing_group_components_009.xsd b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_009/Pos_070603_referencing_group_components_009.xsd new file mode 100644 index 00000000..6d4026ad --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_009/Pos_070603_referencing_group_components_009.xsd @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_010/Pos_070603_referencing_group_components_010.ttcn b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_010/Pos_070603_referencing_group_components_010.ttcn new file mode 100644 index 00000000..d4747870 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_010/Pos_070603_referencing_group_components_010.ttcn @@ -0,0 +1,94 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.6.3, Verify conversion of group reference occurring inside choice + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// In all other cases the referenced group component shall be translated to +// a field of the enclosing record of type (generated for the parent +// complexType, sequence or choice element) referencing the TTCN-3 type +// generated for the referenced group definition, considering also the +// attributes of the referenced group component according to clause 7.1. + +module Pos_070603_referencing_group_components_010 { + + import from schema_Pos_070603_referencing_group_components_010 language "XSD" all; + + template MyType m_msg := { + choice := { + shipAndBill := { + shipTo := "Ulan Bator" + } + } + }; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_070603_referencing_group_components_010() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_070603_referencing_group_components_010.xml", { "Pos_070603_referencing_group_components_010.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_070603_referencing_group_components_010(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_010/Pos_070603_referencing_group_components_010.xml b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_010/Pos_070603_referencing_group_components_010.xml new file mode 100644 index 00000000..74a306b0 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_010/Pos_070603_referencing_group_components_010.xml @@ -0,0 +1,4 @@ + + + Ulan Bator + \ No newline at end of file diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_010/Pos_070603_referencing_group_components_010.xsd b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_010/Pos_070603_referencing_group_components_010.xsd new file mode 100644 index 00000000..4a0ecc1f --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_010/Pos_070603_referencing_group_components_010.xsd @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070604_all_content/Pos_070604_all_content_001/Pos_070604_all_content_001.ttcn b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070604_all_content/Pos_070604_all_content_001/Pos_070604_all_content_001.ttcn new file mode 100644 index 00000000..b8b25424 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070604_all_content/Pos_070604_all_content_001/Pos_070604_all_content_001.ttcn @@ -0,0 +1,99 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.6.4, Verify conversion of all content containing mandatory fields + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// In the general case, when the values of both the minOccurs and maxOccurs +// attributes of the all compositor equal "1" (either explicitly or by +// defaulting to "1"), it shall be translated to TTCN-3 by adding the fields +// resulted by mapping the XSD elements to the enframing TTCN-3 record (see +// clause 7.6). +// In addition, to these fields, an extra first field named "order" shall be +// inserted into the enframing record. The type of this extra field shall be +// record of enumerated, where the names of the enumeration values shall be +// the names of the fields resulted by mapping the elements of the all +// structure. Finally, a "useOrder" variant attribute shall be attached to +// the enframing record. + +module Pos_070604_all_content_001 { + + import from schema_Pos_070604_all_content_001 language "XSD" all; + + template MyType m_msg := { + order := { bar, ding, foo }, + foo := 5, + bar := 3.14, + ding := "ding" + }; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_070604_all_content_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_070604_all_content_001.xml", { "Pos_070604_all_content_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_070604_all_content_001(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070604_all_content/Pos_070604_all_content_001/Pos_070604_all_content_001.xml b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070604_all_content/Pos_070604_all_content_001/Pos_070604_all_content_001.xml new file mode 100644 index 00000000..68604971 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070604_all_content/Pos_070604_all_content_001/Pos_070604_all_content_001.xml @@ -0,0 +1,6 @@ + + + 3.14 + ding + 5 + \ No newline at end of file diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070604_all_content/Pos_070604_all_content_001/Pos_070604_all_content_001.xsd b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070604_all_content/Pos_070604_all_content_001/Pos_070604_all_content_001.xsd new file mode 100644 index 00000000..7f426b93 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070604_all_content/Pos_070604_all_content_001/Pos_070604_all_content_001.xsd @@ -0,0 +1,14 @@ + + + + + + + + + + + + diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070604_all_content/Pos_070604_all_content_002/Pos_070604_all_content_002.ttcn b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070604_all_content/Pos_070604_all_content_002/Pos_070604_all_content_002.ttcn new file mode 100644 index 00000000..813cb95f --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070604_all_content/Pos_070604_all_content_002/Pos_070604_all_content_002.ttcn @@ -0,0 +1,99 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.6.4, Verify conversion of all content with minOccurs="0" + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// By setting the minOccurs XSD attribute of the all compositor to 0, all +// elements of the all content model are becoming optional. In this case all +// record fields corresponding to the elements of the all model group shall be +// set to optional too. +//////////////////////////////////////////////////////////////////////////////// + +module Pos_070604_all_content_002 { + + import from schema_Pos_070604_all_content_002 language "XSD" all; + + template MyType m_staticCheck := { + order := {}, + foo := omit, + bar := omit, + ding := omit + }; + template MyType m_msg := { + order := { ding, foo, bar }, + foo := 5, + bar := 3.14, + ding := "test" + }; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_070604_all_content_002() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_070604_all_content_002.xml", { "Pos_070604_all_content_002.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_070604_all_content_002(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070604_all_content/Pos_070604_all_content_002/Pos_070604_all_content_002.xml b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070604_all_content/Pos_070604_all_content_002/Pos_070604_all_content_002.xml new file mode 100644 index 00000000..874b63f8 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070604_all_content/Pos_070604_all_content_002/Pos_070604_all_content_002.xml @@ -0,0 +1,6 @@ + + + test + 5 + 3.14 + \ No newline at end of file diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070604_all_content/Pos_070604_all_content_002/Pos_070604_all_content_002.xsd b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070604_all_content/Pos_070604_all_content_002/Pos_070604_all_content_002.xsd new file mode 100644 index 00000000..1389449c --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070604_all_content/Pos_070604_all_content_002/Pos_070604_all_content_002.xsd @@ -0,0 +1,14 @@ + + + + + + + + + + + + diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070604_all_content/Pos_070604_all_content_003/Pos_070604_all_content_003.ttcn b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070604_all_content/Pos_070604_all_content_003/Pos_070604_all_content_003.ttcn new file mode 100644 index 00000000..1a0d8a4c --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070604_all_content/Pos_070604_all_content_003/Pos_070604_all_content_003.ttcn @@ -0,0 +1,92 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.6.4, Verify transformation of elements with minOccurs attribute occuring inside all content + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// An XSD all compositor shall be translated to TTCN-3 by adding the fields +// resulted by mapping the XSD elements to the enframing TTCN-3 record (see +// clause 7.6). +//////////////////////////////////////////////////////////////////////////////// + +module Pos_070604_all_content_003 { + + import from schema_Pos_070604_all_content_003 language "XSD" all; + + template MyType m_msg := { + order := { ding, foo }, + foo := 71, + bar := omit, + ding := "ding" + }; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_070604_all_content_003() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_070604_all_content_003.xml", { "Pos_070604_all_content_003.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_070604_all_content_003(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070604_all_content/Pos_070604_all_content_003/Pos_070604_all_content_003.xml b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070604_all_content/Pos_070604_all_content_003/Pos_070604_all_content_003.xml new file mode 100644 index 00000000..235c094a --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070604_all_content/Pos_070604_all_content_003/Pos_070604_all_content_003.xml @@ -0,0 +1,5 @@ + + + ding + 71 + \ No newline at end of file diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070604_all_content/Pos_070604_all_content_003/Pos_070604_all_content_003.xsd b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070604_all_content/Pos_070604_all_content_003/Pos_070604_all_content_003.xsd new file mode 100644 index 00000000..e7be6016 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070604_all_content/Pos_070604_all_content_003/Pos_070604_all_content_003.xsd @@ -0,0 +1,14 @@ + + + + + + + + + + + + diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070604_all_content/Pos_070604_all_content_004/Pos_070604_all_content_004.ttcn b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070604_all_content/Pos_070604_all_content_004/Pos_070604_all_content_004.ttcn new file mode 100644 index 00000000..0862d71e --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070604_all_content/Pos_070604_all_content_004/Pos_070604_all_content_004.ttcn @@ -0,0 +1,95 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.6.4, Verify transformation of all content containing attributes + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// The order field shall precede the fields resulted by the translation of the +// attributes and attribute and attributeGroup references of the given +// complexType. + +module Pos_070604_all_content_004 { + + import from schema_Pos_070604_all_content_004 language "XSD" all; + + template MyType m_msg := { + { foo, ding, bar }, + "attrInGroup1", + omit, + 1, + "attrGlobal", + 2, + 3.14, + "ding" + }; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_070604_all_content_004() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_070604_all_content_004.xml", { "Pos_070604_all_content_004.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_070604_all_content_004(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070604_all_content/Pos_070604_all_content_004/Pos_070604_all_content_004.xml b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070604_all_content/Pos_070604_all_content_004/Pos_070604_all_content_004.xml new file mode 100644 index 00000000..36fe01b2 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070604_all_content/Pos_070604_all_content_004/Pos_070604_all_content_004.xml @@ -0,0 +1,6 @@ + + + 2 + ding + 3.14 + \ No newline at end of file diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070604_all_content/Pos_070604_all_content_004/Pos_070604_all_content_004.xsd b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070604_all_content/Pos_070604_all_content_004/Pos_070604_all_content_004.xsd new file mode 100644 index 00000000..f131dcdf --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070604_all_content/Pos_070604_all_content_004/Pos_070604_all_content_004.xsd @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060501_choice_with_nested_elements/Pos_07060501_choice_with_nested_elements_001/Pos_07060501_choice_with_nested_elements_001.ttcn b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060501_choice_with_nested_elements/Pos_07060501_choice_with_nested_elements_001/Pos_07060501_choice_with_nested_elements_001.ttcn new file mode 100644 index 00000000..0bbcbb51 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060501_choice_with_nested_elements/Pos_07060501_choice_with_nested_elements_001/Pos_07060501_choice_with_nested_elements_001.ttcn @@ -0,0 +1,89 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.6.5.1, Verify that choice content with nested elements is correctly transformed + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// Nested elements shall be mapped as fields of the enframing TTCN-3 union or +// record of union field(see clause 7.6.5) according to clause 7.3. + +module Pos_07060501_choice_with_nested_elements_001 { + + import from schema_Pos_07060501_choice_with_nested_elements_001 language "XSD" all; + + template MyType m_msg := { + choice := { + foo := 1 + } + }; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_07060501_choice_with_nested_elements_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_07060501_choice_with_nested_elements_001.xml", { "Pos_07060501_choice_with_nested_elements_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_07060501_choice_with_nested_elements_001(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060501_choice_with_nested_elements/Pos_07060501_choice_with_nested_elements_001/Pos_07060501_choice_with_nested_elements_001.xml b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060501_choice_with_nested_elements/Pos_07060501_choice_with_nested_elements_001/Pos_07060501_choice_with_nested_elements_001.xml new file mode 100644 index 00000000..21518c96 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060501_choice_with_nested_elements/Pos_07060501_choice_with_nested_elements_001/Pos_07060501_choice_with_nested_elements_001.xml @@ -0,0 +1,4 @@ + + + 1 + \ No newline at end of file diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060501_choice_with_nested_elements/Pos_07060501_choice_with_nested_elements_001/Pos_07060501_choice_with_nested_elements_001.xsd b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060501_choice_with_nested_elements/Pos_07060501_choice_with_nested_elements_001/Pos_07060501_choice_with_nested_elements_001.xsd new file mode 100644 index 00000000..a19c8b00 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060501_choice_with_nested_elements/Pos_07060501_choice_with_nested_elements_001/Pos_07060501_choice_with_nested_elements_001.xsd @@ -0,0 +1,13 @@ + + + + + + + + + + + diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060501_elements/Pos_07060501_choice_with_nested_elements_001/Pos_07060501_choice_with_nested_elements_001.ttcn b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060501_elements/Pos_07060501_choice_with_nested_elements_001/Pos_07060501_choice_with_nested_elements_001.ttcn new file mode 100644 index 00000000..0bbcbb51 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060501_elements/Pos_07060501_choice_with_nested_elements_001/Pos_07060501_choice_with_nested_elements_001.ttcn @@ -0,0 +1,89 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.6.5.1, Verify that choice content with nested elements is correctly transformed + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// Nested elements shall be mapped as fields of the enframing TTCN-3 union or +// record of union field(see clause 7.6.5) according to clause 7.3. + +module Pos_07060501_choice_with_nested_elements_001 { + + import from schema_Pos_07060501_choice_with_nested_elements_001 language "XSD" all; + + template MyType m_msg := { + choice := { + foo := 1 + } + }; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_07060501_choice_with_nested_elements_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_07060501_choice_with_nested_elements_001.xml", { "Pos_07060501_choice_with_nested_elements_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_07060501_choice_with_nested_elements_001(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060501_elements/Pos_07060501_choice_with_nested_elements_001/Pos_07060501_choice_with_nested_elements_001.xml b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060501_elements/Pos_07060501_choice_with_nested_elements_001/Pos_07060501_choice_with_nested_elements_001.xml new file mode 100644 index 00000000..21518c96 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060501_elements/Pos_07060501_choice_with_nested_elements_001/Pos_07060501_choice_with_nested_elements_001.xml @@ -0,0 +1,4 @@ + + + 1 + \ No newline at end of file diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060501_elements/Pos_07060501_choice_with_nested_elements_001/Pos_07060501_choice_with_nested_elements_001.xsd b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060501_elements/Pos_07060501_choice_with_nested_elements_001/Pos_07060501_choice_with_nested_elements_001.xsd new file mode 100644 index 00000000..a19c8b00 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060501_elements/Pos_07060501_choice_with_nested_elements_001/Pos_07060501_choice_with_nested_elements_001.xsd @@ -0,0 +1,13 @@ + + + + + + + + + + + diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060502_choice_with_nested_group/Pos_07060502_choice_with_nested_group_001/Pos_07060502_choice_with_nested_group_001.ttcn b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060502_choice_with_nested_group/Pos_07060502_choice_with_nested_group_001/Pos_07060502_choice_with_nested_group_001.ttcn new file mode 100644 index 00000000..e47c38e0 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060502_choice_with_nested_group/Pos_07060502_choice_with_nested_group_001/Pos_07060502_choice_with_nested_group_001.ttcn @@ -0,0 +1,95 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.6.5.2, Verify that choice content with nested group is correctly transformed + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// Nested group components shall be mapped along with other content as +// a field of the enframing TTCN-3 union or record of union field (see clause +// 7.6.5). The type of this field shall refer to the TTCN-3 type generated for +// the corresponding group and the name of the field shall be the name of the +// TTCN-3 type with the first character uncapitalized. + +module Pos_07060502_choice_with_nested_group_001 { + + import from schema_Pos_07060502_choice_with_nested_group_001 language "XSD" all; + + template MyType m_msg := { + choice := { + group1 := { + foo := "foo", + bar := "bar" + } + } + }; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_07060502_choice_with_nested_group_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_07060502_choice_with_nested_group_001.xml", { "Pos_07060502_choice_with_nested_group_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_07060502_choice_with_nested_group_001(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060502_choice_with_nested_group/Pos_07060502_choice_with_nested_group_001/Pos_07060502_choice_with_nested_group_001.xml b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060502_choice_with_nested_group/Pos_07060502_choice_with_nested_group_001/Pos_07060502_choice_with_nested_group_001.xml new file mode 100644 index 00000000..ec048a56 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060502_choice_with_nested_group/Pos_07060502_choice_with_nested_group_001/Pos_07060502_choice_with_nested_group_001.xml @@ -0,0 +1,5 @@ + + + foo + bar + \ No newline at end of file diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060502_choice_with_nested_group/Pos_07060502_choice_with_nested_group_001/Pos_07060502_choice_with_nested_group_001.xsd b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060502_choice_with_nested_group/Pos_07060502_choice_with_nested_group_001/Pos_07060502_choice_with_nested_group_001.xsd new file mode 100644 index 00000000..e2ca42f8 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060502_choice_with_nested_group/Pos_07060502_choice_with_nested_group_001/Pos_07060502_choice_with_nested_group_001.xsd @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060502_group/Pos_07060502_choice_with_nested_group_001/Pos_07060502_choice_with_nested_group_001.ttcn b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060502_group/Pos_07060502_choice_with_nested_group_001/Pos_07060502_choice_with_nested_group_001.ttcn new file mode 100644 index 00000000..e47c38e0 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060502_group/Pos_07060502_choice_with_nested_group_001/Pos_07060502_choice_with_nested_group_001.ttcn @@ -0,0 +1,95 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.6.5.2, Verify that choice content with nested group is correctly transformed + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// Nested group components shall be mapped along with other content as +// a field of the enframing TTCN-3 union or record of union field (see clause +// 7.6.5). The type of this field shall refer to the TTCN-3 type generated for +// the corresponding group and the name of the field shall be the name of the +// TTCN-3 type with the first character uncapitalized. + +module Pos_07060502_choice_with_nested_group_001 { + + import from schema_Pos_07060502_choice_with_nested_group_001 language "XSD" all; + + template MyType m_msg := { + choice := { + group1 := { + foo := "foo", + bar := "bar" + } + } + }; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_07060502_choice_with_nested_group_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_07060502_choice_with_nested_group_001.xml", { "Pos_07060502_choice_with_nested_group_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_07060502_choice_with_nested_group_001(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060502_group/Pos_07060502_choice_with_nested_group_001/Pos_07060502_choice_with_nested_group_001.xml b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060502_group/Pos_07060502_choice_with_nested_group_001/Pos_07060502_choice_with_nested_group_001.xml new file mode 100644 index 00000000..ec048a56 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060502_group/Pos_07060502_choice_with_nested_group_001/Pos_07060502_choice_with_nested_group_001.xml @@ -0,0 +1,5 @@ + + + foo + bar + \ No newline at end of file diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060502_group/Pos_07060502_choice_with_nested_group_001/Pos_07060502_choice_with_nested_group_001.xsd b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060502_group/Pos_07060502_choice_with_nested_group_001/Pos_07060502_choice_with_nested_group_001.xsd new file mode 100644 index 00000000..e2ca42f8 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060502_group/Pos_07060502_choice_with_nested_group_001/Pos_07060502_choice_with_nested_group_001.xsd @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060503_choice/Pos_07060503_choice_with_nested_choice_001/Pos_07060503_choice_with_nested_choice_001.ttcn b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060503_choice/Pos_07060503_choice_with_nested_choice_001/Pos_07060503_choice_with_nested_choice_001.ttcn new file mode 100644 index 00000000..ec8eccd4 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060503_choice/Pos_07060503_choice_with_nested_choice_001/Pos_07060503_choice_with_nested_choice_001.ttcn @@ -0,0 +1,91 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.6.5.3, Verify that choice content with nested choice is correctly transformed + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// An XSD choice nested to a choice shall be translated according to clause +// 7.6.5 + +module Pos_07060503_choice_with_nested_choice_001 { + + import from schema_Pos_07060503_choice_with_nested_choice_001 language "XSD" all; + + template MyType m_msg := { + choice := { + choice_1 := { + foo := 1 + } + } + }; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_07060503_choice_with_nested_choice_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_07060503_choice_with_nested_choice_001.xml", { "Pos_07060503_choice_with_nested_choice_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_07060503_choice_with_nested_choice_001(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060503_choice/Pos_07060503_choice_with_nested_choice_001/Pos_07060503_choice_with_nested_choice_001.xml b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060503_choice/Pos_07060503_choice_with_nested_choice_001/Pos_07060503_choice_with_nested_choice_001.xml new file mode 100644 index 00000000..0d46748d --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060503_choice/Pos_07060503_choice_with_nested_choice_001/Pos_07060503_choice_with_nested_choice_001.xml @@ -0,0 +1,4 @@ + + + 1 + \ No newline at end of file diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060503_choice/Pos_07060503_choice_with_nested_choice_001/Pos_07060503_choice_with_nested_choice_001.xsd b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060503_choice/Pos_07060503_choice_with_nested_choice_001/Pos_07060503_choice_with_nested_choice_001.xsd new file mode 100644 index 00000000..ebe6e5a2 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060503_choice/Pos_07060503_choice_with_nested_choice_001/Pos_07060503_choice_with_nested_choice_001.xsd @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060503_choice_with_nested_choice/Pos_07060503_choice_with_nested_choice_001/Pos_07060503_choice_with_nested_choice_001.ttcn b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060503_choice_with_nested_choice/Pos_07060503_choice_with_nested_choice_001/Pos_07060503_choice_with_nested_choice_001.ttcn new file mode 100644 index 00000000..ec8eccd4 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060503_choice_with_nested_choice/Pos_07060503_choice_with_nested_choice_001/Pos_07060503_choice_with_nested_choice_001.ttcn @@ -0,0 +1,91 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.6.5.3, Verify that choice content with nested choice is correctly transformed + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// An XSD choice nested to a choice shall be translated according to clause +// 7.6.5 + +module Pos_07060503_choice_with_nested_choice_001 { + + import from schema_Pos_07060503_choice_with_nested_choice_001 language "XSD" all; + + template MyType m_msg := { + choice := { + choice_1 := { + foo := 1 + } + } + }; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_07060503_choice_with_nested_choice_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_07060503_choice_with_nested_choice_001.xml", { "Pos_07060503_choice_with_nested_choice_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_07060503_choice_with_nested_choice_001(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060503_choice_with_nested_choice/Pos_07060503_choice_with_nested_choice_001/Pos_07060503_choice_with_nested_choice_001.xml b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060503_choice_with_nested_choice/Pos_07060503_choice_with_nested_choice_001/Pos_07060503_choice_with_nested_choice_001.xml new file mode 100644 index 00000000..0d46748d --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060503_choice_with_nested_choice/Pos_07060503_choice_with_nested_choice_001/Pos_07060503_choice_with_nested_choice_001.xml @@ -0,0 +1,4 @@ + + + 1 + \ No newline at end of file diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060503_choice_with_nested_choice/Pos_07060503_choice_with_nested_choice_001/Pos_07060503_choice_with_nested_choice_001.xsd b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060503_choice_with_nested_choice/Pos_07060503_choice_with_nested_choice_001/Pos_07060503_choice_with_nested_choice_001.xsd new file mode 100644 index 00000000..ebe6e5a2 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060503_choice_with_nested_choice/Pos_07060503_choice_with_nested_choice_001/Pos_07060503_choice_with_nested_choice_001.xsd @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060504_choice_with_nested_sequence/Pos_07060504_choice_with_nested_sequence_001/Pos_07060504_choice_with_nested_sequence_001.ttcn b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060504_choice_with_nested_sequence/Pos_07060504_choice_with_nested_sequence_001/Pos_07060504_choice_with_nested_sequence_001.ttcn new file mode 100644 index 00000000..19fc9f54 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060504_choice_with_nested_sequence/Pos_07060504_choice_with_nested_sequence_001/Pos_07060504_choice_with_nested_sequence_001.ttcn @@ -0,0 +1,93 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.6.5.4, Verify that choice content with nested sequence is correctly transformed + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// An XSD sequence nested to a choice shall be mapped to a TTCN-3 record field +// of the enframing TTCN-3 union or record of union field (see clause 7.6.5), +// according to clause 7.6.6. + +module Pos_07060504_choice_with_nested_sequence_001 { + + import from schema_Pos_07060504_choice_with_nested_sequence_001 language "XSD" all; + + template MyType m_msg := { + choice := { + sequence := { + foo := 1, + bar := "bar" + } + } + }; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_07060504_choice_with_nested_sequence_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_07060504_choice_with_nested_sequence_001.xml", { "Pos_07060504_choice_with_nested_sequence_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_07060504_choice_with_nested_sequence_001(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060504_choice_with_nested_sequence/Pos_07060504_choice_with_nested_sequence_001/Pos_07060504_choice_with_nested_sequence_001.xml b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060504_choice_with_nested_sequence/Pos_07060504_choice_with_nested_sequence_001/Pos_07060504_choice_with_nested_sequence_001.xml new file mode 100644 index 00000000..43c6ec0a --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060504_choice_with_nested_sequence/Pos_07060504_choice_with_nested_sequence_001/Pos_07060504_choice_with_nested_sequence_001.xml @@ -0,0 +1,5 @@ + + + 1 + bar + \ No newline at end of file diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060504_choice_with_nested_sequence/Pos_07060504_choice_with_nested_sequence_001/Pos_07060504_choice_with_nested_sequence_001.xsd b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060504_choice_with_nested_sequence/Pos_07060504_choice_with_nested_sequence_001/Pos_07060504_choice_with_nested_sequence_001.xsd new file mode 100644 index 00000000..e46bf0f1 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060504_choice_with_nested_sequence/Pos_07060504_choice_with_nested_sequence_001/Pos_07060504_choice_with_nested_sequence_001.xsd @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060504_choice_with_nested_sequence/Pos_07060504_choice_with_nested_sequence_002/Pos_07060504_choice_with_nested_sequence_002.ttcn b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060504_choice_with_nested_sequence/Pos_07060504_choice_with_nested_sequence_002/Pos_07060504_choice_with_nested_sequence_002.ttcn new file mode 100644 index 00000000..db4fb3b2 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060504_choice_with_nested_sequence/Pos_07060504_choice_with_nested_sequence_002/Pos_07060504_choice_with_nested_sequence_002.ttcn @@ -0,0 +1,96 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.6.5.4, Verify that choice content with multiple nested sequences is correctly transformed + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// An XSD sequence nested to a choice shall be mapped to a TTCN-3 record field +// of the enframing TTCN-3 union or record of union field (see clause 7.6.5), +// according to clause 7.6.6. + +module Pos_07060504_choice_with_nested_sequence_002 { + + import from schema_Pos_07060504_choice_with_nested_sequence_002 language "XSD" all; + + template MyType m_msg := { + choice := { + sequence := { + foo := "abc", + bar := "cde", + ding := "fgh", + foo_1 := "ijk", + bar_1 := "lmn" + } + } + }; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_07060504_choice_with_nested_sequence_002() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_07060504_choice_with_nested_sequence_002.xml", { "Pos_07060504_choice_with_nested_sequence_002.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_07060504_choice_with_nested_sequence_002(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060504_choice_with_nested_sequence/Pos_07060504_choice_with_nested_sequence_002/Pos_07060504_choice_with_nested_sequence_002.xml b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060504_choice_with_nested_sequence/Pos_07060504_choice_with_nested_sequence_002/Pos_07060504_choice_with_nested_sequence_002.xml new file mode 100644 index 00000000..59b8aefd --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060504_choice_with_nested_sequence/Pos_07060504_choice_with_nested_sequence_002/Pos_07060504_choice_with_nested_sequence_002.xml @@ -0,0 +1,8 @@ + + + abc + cde + fgh + ijk + lmn + \ No newline at end of file diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060504_choice_with_nested_sequence/Pos_07060504_choice_with_nested_sequence_002/Pos_07060504_choice_with_nested_sequence_002.xsd b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060504_choice_with_nested_sequence/Pos_07060504_choice_with_nested_sequence_002/Pos_07060504_choice_with_nested_sequence_002.xsd new file mode 100644 index 00000000..c9bdeea3 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060504_choice_with_nested_sequence/Pos_07060504_choice_with_nested_sequence_002/Pos_07060504_choice_with_nested_sequence_002.xsd @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + + diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060504_sequence/Pos_07060504_choice_with_nested_sequence_001/Pos_07060504_choice_with_nested_sequence_001.ttcn b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060504_sequence/Pos_07060504_choice_with_nested_sequence_001/Pos_07060504_choice_with_nested_sequence_001.ttcn new file mode 100644 index 00000000..19fc9f54 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060504_sequence/Pos_07060504_choice_with_nested_sequence_001/Pos_07060504_choice_with_nested_sequence_001.ttcn @@ -0,0 +1,93 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.6.5.4, Verify that choice content with nested sequence is correctly transformed + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// An XSD sequence nested to a choice shall be mapped to a TTCN-3 record field +// of the enframing TTCN-3 union or record of union field (see clause 7.6.5), +// according to clause 7.6.6. + +module Pos_07060504_choice_with_nested_sequence_001 { + + import from schema_Pos_07060504_choice_with_nested_sequence_001 language "XSD" all; + + template MyType m_msg := { + choice := { + sequence := { + foo := 1, + bar := "bar" + } + } + }; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_07060504_choice_with_nested_sequence_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_07060504_choice_with_nested_sequence_001.xml", { "Pos_07060504_choice_with_nested_sequence_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_07060504_choice_with_nested_sequence_001(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060504_sequence/Pos_07060504_choice_with_nested_sequence_001/Pos_07060504_choice_with_nested_sequence_001.xml b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060504_sequence/Pos_07060504_choice_with_nested_sequence_001/Pos_07060504_choice_with_nested_sequence_001.xml new file mode 100644 index 00000000..43c6ec0a --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060504_sequence/Pos_07060504_choice_with_nested_sequence_001/Pos_07060504_choice_with_nested_sequence_001.xml @@ -0,0 +1,5 @@ + + + 1 + bar + \ No newline at end of file diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060504_sequence/Pos_07060504_choice_with_nested_sequence_001/Pos_07060504_choice_with_nested_sequence_001.xsd b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060504_sequence/Pos_07060504_choice_with_nested_sequence_001/Pos_07060504_choice_with_nested_sequence_001.xsd new file mode 100644 index 00000000..e46bf0f1 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060504_sequence/Pos_07060504_choice_with_nested_sequence_001/Pos_07060504_choice_with_nested_sequence_001.xsd @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060504_sequence/Pos_07060504_choice_with_nested_sequence_002/Pos_07060504_choice_with_nested_sequence_002.ttcn b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060504_sequence/Pos_07060504_choice_with_nested_sequence_002/Pos_07060504_choice_with_nested_sequence_002.ttcn new file mode 100644 index 00000000..db4fb3b2 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060504_sequence/Pos_07060504_choice_with_nested_sequence_002/Pos_07060504_choice_with_nested_sequence_002.ttcn @@ -0,0 +1,96 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.6.5.4, Verify that choice content with multiple nested sequences is correctly transformed + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// An XSD sequence nested to a choice shall be mapped to a TTCN-3 record field +// of the enframing TTCN-3 union or record of union field (see clause 7.6.5), +// according to clause 7.6.6. + +module Pos_07060504_choice_with_nested_sequence_002 { + + import from schema_Pos_07060504_choice_with_nested_sequence_002 language "XSD" all; + + template MyType m_msg := { + choice := { + sequence := { + foo := "abc", + bar := "cde", + ding := "fgh", + foo_1 := "ijk", + bar_1 := "lmn" + } + } + }; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_07060504_choice_with_nested_sequence_002() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_07060504_choice_with_nested_sequence_002.xml", { "Pos_07060504_choice_with_nested_sequence_002.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_07060504_choice_with_nested_sequence_002(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060504_sequence/Pos_07060504_choice_with_nested_sequence_002/Pos_07060504_choice_with_nested_sequence_002.xml b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060504_sequence/Pos_07060504_choice_with_nested_sequence_002/Pos_07060504_choice_with_nested_sequence_002.xml new file mode 100644 index 00000000..59b8aefd --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060504_sequence/Pos_07060504_choice_with_nested_sequence_002/Pos_07060504_choice_with_nested_sequence_002.xml @@ -0,0 +1,8 @@ + + + abc + cde + fgh + ijk + lmn + \ No newline at end of file diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060504_sequence/Pos_07060504_choice_with_nested_sequence_002/Pos_07060504_choice_with_nested_sequence_002.xsd b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060504_sequence/Pos_07060504_choice_with_nested_sequence_002/Pos_07060504_choice_with_nested_sequence_002.xsd new file mode 100644 index 00000000..c9bdeea3 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060504_sequence/Pos_07060504_choice_with_nested_sequence_002/Pos_07060504_choice_with_nested_sequence_002.xsd @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + + diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060504_sequence/Pos_07060504_choice_with_nested_sequence_003/Pos_07060504_choice_with_nested_sequence_003.ttcn b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060504_sequence/Pos_07060504_choice_with_nested_sequence_003/Pos_07060504_choice_with_nested_sequence_003.ttcn new file mode 100644 index 00000000..e9f2947b --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060504_sequence/Pos_07060504_choice_with_nested_sequence_003/Pos_07060504_choice_with_nested_sequence_003.ttcn @@ -0,0 +1,94 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 9:7.6.5.4, Verify name transformation of the "sequence" choice field + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// An XSD sequence nested to a choice shall be mapped to a TTCN-3 record field +// of the enframing TTCN-3 union or record of union field (see clause 7.6.5), +// according to clause 7.6.6. The name of the record field shall be the +// result of applying clause 5.2.2 to "sequence". + +module Pos_07060504_choice_with_nested_sequence_003 { + + import from schema_Pos_07060504_choice_with_nested_sequence_003 language "XSD" all; + + template MyType m_msg := { + choice := { + sequence_1 := { + foo := 1, + bar := "bar" + } + } + }; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_07060504_choice_with_nested_sequence_003() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_07060504_choice_with_nested_sequence_003.xml", { "Pos_07060504_choice_with_nested_sequence_003.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_07060504_choice_with_nested_sequence_003(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060504_sequence/Pos_07060504_choice_with_nested_sequence_003/Pos_07060504_choice_with_nested_sequence_003.xml b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060504_sequence/Pos_07060504_choice_with_nested_sequence_003/Pos_07060504_choice_with_nested_sequence_003.xml new file mode 100644 index 00000000..e654d4d9 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060504_sequence/Pos_07060504_choice_with_nested_sequence_003/Pos_07060504_choice_with_nested_sequence_003.xml @@ -0,0 +1,5 @@ + + + 1 + bar + \ No newline at end of file diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060504_sequence/Pos_07060504_choice_with_nested_sequence_003/Pos_07060504_choice_with_nested_sequence_003.xsd b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060504_sequence/Pos_07060504_choice_with_nested_sequence_003/Pos_07060504_choice_with_nested_sequence_003.xsd new file mode 100644 index 00000000..2f7f404e --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060504_sequence/Pos_07060504_choice_with_nested_sequence_003/Pos_07060504_choice_with_nested_sequence_003.xsd @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060505_any/Pos_07060505_choice_with_nested_any_001/Pos_07060505_choice_with_nested_any_001.ttcn b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060505_any/Pos_07060505_choice_with_nested_any_001/Pos_07060505_choice_with_nested_any_001.ttcn new file mode 100644 index 00000000..6fd01f8e --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060505_any/Pos_07060505_choice_with_nested_any_001/Pos_07060505_choice_with_nested_any_001.ttcn @@ -0,0 +1,89 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.6.5.5, Verify that choice content with nested any is correctly transformed + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// An XSD any element nested to a choice shall be translated according to +// clause 7.7. + +module Pos_07060505_choice_with_nested_any_001 { + + import from schema_Pos_07060505_choice_with_nested_any_001 language "XSD" all; + + template MyType m_msg := { + choice := { + elem := "abc" + } + }; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_07060505_choice_with_nested_any_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_07060505_choice_with_nested_any_001.xml", { "Pos_07060505_choice_with_nested_any_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_07060505_choice_with_nested_any_001(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060505_any/Pos_07060505_choice_with_nested_any_001/Pos_07060505_choice_with_nested_any_001.xml b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060505_any/Pos_07060505_choice_with_nested_any_001/Pos_07060505_choice_with_nested_any_001.xml new file mode 100644 index 00000000..2dbfc2bb --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060505_any/Pos_07060505_choice_with_nested_any_001/Pos_07060505_choice_with_nested_any_001.xml @@ -0,0 +1,2 @@ + +abc \ No newline at end of file diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060505_any/Pos_07060505_choice_with_nested_any_001/Pos_07060505_choice_with_nested_any_001.xsd b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060505_any/Pos_07060505_choice_with_nested_any_001/Pos_07060505_choice_with_nested_any_001.xsd new file mode 100644 index 00000000..5df688f0 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060505_any/Pos_07060505_choice_with_nested_any_001/Pos_07060505_choice_with_nested_any_001.xsd @@ -0,0 +1,15 @@ + + + + + + + + + + + + + diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060505_choice_with_nested_any/Pos_07060505_choice_with_nested_any_001/Pos_07060505_choice_with_nested_any_001.ttcn b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060505_choice_with_nested_any/Pos_07060505_choice_with_nested_any_001/Pos_07060505_choice_with_nested_any_001.ttcn new file mode 100644 index 00000000..6fd01f8e --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060505_choice_with_nested_any/Pos_07060505_choice_with_nested_any_001/Pos_07060505_choice_with_nested_any_001.ttcn @@ -0,0 +1,89 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.6.5.5, Verify that choice content with nested any is correctly transformed + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// An XSD any element nested to a choice shall be translated according to +// clause 7.7. + +module Pos_07060505_choice_with_nested_any_001 { + + import from schema_Pos_07060505_choice_with_nested_any_001 language "XSD" all; + + template MyType m_msg := { + choice := { + elem := "abc" + } + }; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_07060505_choice_with_nested_any_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_07060505_choice_with_nested_any_001.xml", { "Pos_07060505_choice_with_nested_any_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_07060505_choice_with_nested_any_001(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060505_choice_with_nested_any/Pos_07060505_choice_with_nested_any_001/Pos_07060505_choice_with_nested_any_001.xml b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060505_choice_with_nested_any/Pos_07060505_choice_with_nested_any_001/Pos_07060505_choice_with_nested_any_001.xml new file mode 100644 index 00000000..2dbfc2bb --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060505_choice_with_nested_any/Pos_07060505_choice_with_nested_any_001/Pos_07060505_choice_with_nested_any_001.xml @@ -0,0 +1,2 @@ + +abc \ No newline at end of file diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060505_choice_with_nested_any/Pos_07060505_choice_with_nested_any_001/Pos_07060505_choice_with_nested_any_001.xsd b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060505_choice_with_nested_any/Pos_07060505_choice_with_nested_any_001/Pos_07060505_choice_with_nested_any_001.xsd new file mode 100644 index 00000000..5df688f0 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060505_choice_with_nested_any/Pos_07060505_choice_with_nested_any_001/Pos_07060505_choice_with_nested_any_001.xsd @@ -0,0 +1,15 @@ + + + + + + + + + + + + + diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/070605_top_level/Pos_070605_top_level_001/Pos_070605_top_level_001.ttcn b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/070605_top_level/Pos_070605_top_level_001/Pos_070605_top_level_001.ttcn new file mode 100644 index 00000000..1b855f09 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/070605_top_level/Pos_070605_top_level_001/Pos_070605_top_level_001.ttcn @@ -0,0 +1,99 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.6.5, Verify that choice content with minOccurs different than 1 is correctly transformed + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// If the value of the minOccurs or the maxOccurs attributes or both differ +// from "1", the following rules shall apply: +// a) The union field shall be generated as above (including attaching the +// "untagged" encoding instruction). +// b) The procedures in clause 7.1.4 shall be called for the union field. +// NOTE: As the result of applying clause 7.1.4, the type of the field may be +// changed to record of union and in parallel the name of the field may be +// changed to "choice_list". +// c) Finally, clause 5.2.2 shall be applied to the name of the resulted field +// and subsequently the field shall be added to the enframing TTCN-3 record +// type (see clause 7.6) or record or union field corresponding to the parent +// of the mapped choice compositor. + +module Pos_070605_top_level_001 { + + import from schema_Pos_070605_top_level_001 language "XSD" all; + + template MyType m_msg := { + choice := { + foo := 1 + } + }; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_070605_top_level_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_070605_top_level_001.xml", { "Pos_070605_top_level_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_070605_top_level_001(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/070605_top_level/Pos_070605_top_level_001/Pos_070605_top_level_001.xml b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/070605_top_level/Pos_070605_top_level_001/Pos_070605_top_level_001.xml new file mode 100644 index 00000000..b83916bd --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/070605_top_level/Pos_070605_top_level_001/Pos_070605_top_level_001.xml @@ -0,0 +1,4 @@ + + + 1 + \ No newline at end of file diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/070605_top_level/Pos_070605_top_level_001/Pos_070605_top_level_001.xsd b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/070605_top_level/Pos_070605_top_level_001/Pos_070605_top_level_001.xsd new file mode 100644 index 00000000..58db3bc9 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/070605_top_level/Pos_070605_top_level_001/Pos_070605_top_level_001.xsd @@ -0,0 +1,13 @@ + + + + + + + + + + + diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/070605_top_level/Pos_070605_top_level_002/Pos_070605_top_level_002.ttcn b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/070605_top_level/Pos_070605_top_level_002/Pos_070605_top_level_002.ttcn new file mode 100644 index 00000000..209590a9 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/070605_top_level/Pos_070605_top_level_002/Pos_070605_top_level_002.ttcn @@ -0,0 +1,103 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.6.5, Verify that choice content with maxOccurs larger than 1 is correctly transformed + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// If the value of the minOccurs or the maxOccurs attributes or both differ +// from "1", the following rules shall apply: +// a) The union field shall be generated as above (including attaching the +// "untagged" encoding instruction). +// b) The procedures in clause 7.1.4 shall be called for the union field. +// NOTE: As the result of applying clause 7.1.4, the type of the field may be +// changed to record of union and in parallel the name of the field may be +// changed to "choice_list". +// c) Finally, clause 5.2.2 shall be applied to the name of the resulted field +// and subsequently the field shall be added to the enframing TTCN-3 record +// type (see clause 7.6) or record or union field corresponding to the parent +// of the mapped choice compositor. + +module Pos_070605_top_level_002 { + + import from schema_Pos_070605_top_level_002 language "XSD" all; + + template MyType m_msg := { + choice_list := { + { + foo := 1 + }, { + bar := "bar" + } + } + }; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_070605_top_level_002() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_070605_top_level_002.xml", { "Pos_070605_top_level_002.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_070605_top_level_002(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/070605_top_level/Pos_070605_top_level_002/Pos_070605_top_level_002.xml b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/070605_top_level/Pos_070605_top_level_002/Pos_070605_top_level_002.xml new file mode 100644 index 00000000..b576a6ee --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/070605_top_level/Pos_070605_top_level_002/Pos_070605_top_level_002.xml @@ -0,0 +1,5 @@ + + + 1 + bar + \ No newline at end of file diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/070605_top_level/Pos_070605_top_level_002/Pos_070605_top_level_002.xsd b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/070605_top_level/Pos_070605_top_level_002/Pos_070605_top_level_002.xsd new file mode 100644 index 00000000..ce22ef3c --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/070605_top_level/Pos_070605_top_level_002/Pos_070605_top_level_002.xsd @@ -0,0 +1,13 @@ + + + + + + + + + + + diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060601_element/Pos_07060601_sequence_with_nested_element_001/Pos_07060601_sequence_with_nested_element_001.ttcn b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060601_element/Pos_07060601_sequence_with_nested_element_001/Pos_07060601_sequence_with_nested_element_001.ttcn new file mode 100644 index 00000000..57974059 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060601_element/Pos_07060601_sequence_with_nested_element_001/Pos_07060601_sequence_with_nested_element_001.ttcn @@ -0,0 +1,90 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.6.6.1, Verify that sequence content with nested elements is correctly transformed + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// In the general case, child elements of a sequence, which is a child of +// a complexType, shall be mapped to TTCN-3 as fields of the enframing record +// (see clause 7.6) (i.e. the sequence itself is not producing any TTCN-3 +// construct). + +module Pos_07060601_sequence_with_nested_element_001 { + + import from schema_Pos_07060601_sequence_with_nested_element_001 language "XSD" all; + + template MyType m_msg := { + foo := 1, + bar := "bar" + } + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_07060601_sequence_with_nested_element_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_07060601_sequence_with_nested_element_001.xml", { "Pos_07060601_sequence_with_nested_element_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_07060601_sequence_with_nested_element_001(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060601_element/Pos_07060601_sequence_with_nested_element_001/Pos_07060601_sequence_with_nested_element_001.xml b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060601_element/Pos_07060601_sequence_with_nested_element_001/Pos_07060601_sequence_with_nested_element_001.xml new file mode 100644 index 00000000..3c48f91e --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060601_element/Pos_07060601_sequence_with_nested_element_001/Pos_07060601_sequence_with_nested_element_001.xml @@ -0,0 +1,5 @@ + + + 1 + bar + \ No newline at end of file diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060601_element/Pos_07060601_sequence_with_nested_element_001/Pos_07060601_sequence_with_nested_element_001.xsd b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060601_element/Pos_07060601_sequence_with_nested_element_001/Pos_07060601_sequence_with_nested_element_001.xsd new file mode 100644 index 00000000..ae44bdad --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060601_element/Pos_07060601_sequence_with_nested_element_001/Pos_07060601_sequence_with_nested_element_001.xsd @@ -0,0 +1,13 @@ + + + + + + + + + + + diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060601_sequence_with_nested_element/Pos_07060601_sequence_with_nested_element_001/Pos_07060601_sequence_with_nested_element_001.ttcn b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060601_sequence_with_nested_element/Pos_07060601_sequence_with_nested_element_001/Pos_07060601_sequence_with_nested_element_001.ttcn new file mode 100644 index 00000000..57974059 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060601_sequence_with_nested_element/Pos_07060601_sequence_with_nested_element_001/Pos_07060601_sequence_with_nested_element_001.ttcn @@ -0,0 +1,90 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.6.6.1, Verify that sequence content with nested elements is correctly transformed + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// In the general case, child elements of a sequence, which is a child of +// a complexType, shall be mapped to TTCN-3 as fields of the enframing record +// (see clause 7.6) (i.e. the sequence itself is not producing any TTCN-3 +// construct). + +module Pos_07060601_sequence_with_nested_element_001 { + + import from schema_Pos_07060601_sequence_with_nested_element_001 language "XSD" all; + + template MyType m_msg := { + foo := 1, + bar := "bar" + } + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_07060601_sequence_with_nested_element_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_07060601_sequence_with_nested_element_001.xml", { "Pos_07060601_sequence_with_nested_element_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_07060601_sequence_with_nested_element_001(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060601_sequence_with_nested_element/Pos_07060601_sequence_with_nested_element_001/Pos_07060601_sequence_with_nested_element_001.xml b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060601_sequence_with_nested_element/Pos_07060601_sequence_with_nested_element_001/Pos_07060601_sequence_with_nested_element_001.xml new file mode 100644 index 00000000..3c48f91e --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060601_sequence_with_nested_element/Pos_07060601_sequence_with_nested_element_001/Pos_07060601_sequence_with_nested_element_001.xml @@ -0,0 +1,5 @@ + + + 1 + bar + \ No newline at end of file diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060601_sequence_with_nested_element/Pos_07060601_sequence_with_nested_element_001/Pos_07060601_sequence_with_nested_element_001.xsd b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060601_sequence_with_nested_element/Pos_07060601_sequence_with_nested_element_001/Pos_07060601_sequence_with_nested_element_001.xsd new file mode 100644 index 00000000..ae44bdad --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060601_sequence_with_nested_element/Pos_07060601_sequence_with_nested_element_001/Pos_07060601_sequence_with_nested_element_001.xsd @@ -0,0 +1,13 @@ + + + + + + + + + + + diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060602_group/Pos_07060602_sequence_with_nested_group_001/Pos_07060602_sequence_with_nested_group_001.ttcn b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060602_group/Pos_07060602_sequence_with_nested_group_001/Pos_07060602_sequence_with_nested_group_001.ttcn new file mode 100644 index 00000000..c1bf20ee --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060602_group/Pos_07060602_sequence_with_nested_group_001/Pos_07060602_sequence_with_nested_group_001.ttcn @@ -0,0 +1,93 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.6.6.2, Verify that sequence content with group reference is correctly transformed + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// In the general case, nested group reference components shall be mapped +// to a field of the enframing record type (see clause 7.6) or field. The +// type of the field shall be the TTCN-3 type generated for the referenced +// group and the name of the field shall be the result of applying clause +// 5.2.2 to the name of the referenced group. + +module Pos_07060602_sequence_with_nested_group_001 { + + import from schema_Pos_07060602_sequence_with_nested_group_001 language "XSD" all; + + template MyType m_msg := { + group1 := { + foo := "foo" + }, + ding := "ding" + }; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_07060602_sequence_with_nested_group_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_07060602_sequence_with_nested_group_001.xml", { "Pos_07060602_sequence_with_nested_group_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_07060602_sequence_with_nested_group_001(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060602_group/Pos_07060602_sequence_with_nested_group_001/Pos_07060602_sequence_with_nested_group_001.xml b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060602_group/Pos_07060602_sequence_with_nested_group_001/Pos_07060602_sequence_with_nested_group_001.xml new file mode 100644 index 00000000..c22219ce --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060602_group/Pos_07060602_sequence_with_nested_group_001/Pos_07060602_sequence_with_nested_group_001.xml @@ -0,0 +1,5 @@ + + + foo + ding + \ No newline at end of file diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060602_group/Pos_07060602_sequence_with_nested_group_001/Pos_07060602_sequence_with_nested_group_001.xsd b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060602_group/Pos_07060602_sequence_with_nested_group_001/Pos_07060602_sequence_with_nested_group_001.xsd new file mode 100644 index 00000000..6380d0a9 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060602_group/Pos_07060602_sequence_with_nested_group_001/Pos_07060602_sequence_with_nested_group_001.xsd @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060602_sequence_with_nested_group/Pos_07060602_sequence_with_nested_group_001/Pos_07060602_sequence_with_nested_group_001.ttcn b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060602_sequence_with_nested_group/Pos_07060602_sequence_with_nested_group_001/Pos_07060602_sequence_with_nested_group_001.ttcn new file mode 100644 index 00000000..c1bf20ee --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060602_sequence_with_nested_group/Pos_07060602_sequence_with_nested_group_001/Pos_07060602_sequence_with_nested_group_001.ttcn @@ -0,0 +1,93 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.6.6.2, Verify that sequence content with group reference is correctly transformed + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// In the general case, nested group reference components shall be mapped +// to a field of the enframing record type (see clause 7.6) or field. The +// type of the field shall be the TTCN-3 type generated for the referenced +// group and the name of the field shall be the result of applying clause +// 5.2.2 to the name of the referenced group. + +module Pos_07060602_sequence_with_nested_group_001 { + + import from schema_Pos_07060602_sequence_with_nested_group_001 language "XSD" all; + + template MyType m_msg := { + group1 := { + foo := "foo" + }, + ding := "ding" + }; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_07060602_sequence_with_nested_group_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_07060602_sequence_with_nested_group_001.xml", { "Pos_07060602_sequence_with_nested_group_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_07060602_sequence_with_nested_group_001(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060602_sequence_with_nested_group/Pos_07060602_sequence_with_nested_group_001/Pos_07060602_sequence_with_nested_group_001.xml b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060602_sequence_with_nested_group/Pos_07060602_sequence_with_nested_group_001/Pos_07060602_sequence_with_nested_group_001.xml new file mode 100644 index 00000000..c22219ce --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060602_sequence_with_nested_group/Pos_07060602_sequence_with_nested_group_001/Pos_07060602_sequence_with_nested_group_001.xml @@ -0,0 +1,5 @@ + + + foo + ding + \ No newline at end of file diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060602_sequence_with_nested_group/Pos_07060602_sequence_with_nested_group_001/Pos_07060602_sequence_with_nested_group_001.xsd b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060602_sequence_with_nested_group/Pos_07060602_sequence_with_nested_group_001/Pos_07060602_sequence_with_nested_group_001.xsd new file mode 100644 index 00000000..6380d0a9 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060602_sequence_with_nested_group/Pos_07060602_sequence_with_nested_group_001/Pos_07060602_sequence_with_nested_group_001.xsd @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060603_choice/Pos_07060603_sequence_with_nested_choice_001/Pos_07060603_sequence_with_nested_choice_001.ttcn b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060603_choice/Pos_07060603_sequence_with_nested_choice_001/Pos_07060603_sequence_with_nested_choice_001.ttcn new file mode 100644 index 00000000..1edef401 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060603_choice/Pos_07060603_sequence_with_nested_choice_001/Pos_07060603_sequence_with_nested_choice_001.ttcn @@ -0,0 +1,89 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.6.6.3, Verify that sequence content with nested choice is correctly transformed + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// An XSD choice nested to a sequence shall be mapped as a field of the +// enframing record (see clauses 7.6, 7.6.5.4 and 7.6.6.4), according to clause +// 7.6.5 (i.e. the sequence itself is not producing any TTCN-3 construct). + +module Pos_07060603_sequence_with_nested_choice_001 { + + import from schema_Pos_07060603_sequence_with_nested_choice_001 language "XSD" all; + + template MyType m_msg := { + choice := { foo := "foo" }, + ding := "ding" + }; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_07060603_sequence_with_nested_choice_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_07060603_sequence_with_nested_choice_001.xml", { "Pos_07060603_sequence_with_nested_choice_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_07060603_sequence_with_nested_choice_001(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060603_choice/Pos_07060603_sequence_with_nested_choice_001/Pos_07060603_sequence_with_nested_choice_001.xml b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060603_choice/Pos_07060603_sequence_with_nested_choice_001/Pos_07060603_sequence_with_nested_choice_001.xml new file mode 100644 index 00000000..0d72c5bd --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060603_choice/Pos_07060603_sequence_with_nested_choice_001/Pos_07060603_sequence_with_nested_choice_001.xml @@ -0,0 +1,5 @@ + + + foo + ding + \ No newline at end of file diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060603_choice/Pos_07060603_sequence_with_nested_choice_001/Pos_07060603_sequence_with_nested_choice_001.xsd b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060603_choice/Pos_07060603_sequence_with_nested_choice_001/Pos_07060603_sequence_with_nested_choice_001.xsd new file mode 100644 index 00000000..cafa0098 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060603_choice/Pos_07060603_sequence_with_nested_choice_001/Pos_07060603_sequence_with_nested_choice_001.xsd @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060603_sequence_with_nested_choice/Pos_07060603_sequence_with_nested_choice_001/Pos_07060603_sequence_with_nested_choice_001.ttcn b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060603_sequence_with_nested_choice/Pos_07060603_sequence_with_nested_choice_001/Pos_07060603_sequence_with_nested_choice_001.ttcn new file mode 100644 index 00000000..1edef401 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060603_sequence_with_nested_choice/Pos_07060603_sequence_with_nested_choice_001/Pos_07060603_sequence_with_nested_choice_001.ttcn @@ -0,0 +1,89 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.6.6.3, Verify that sequence content with nested choice is correctly transformed + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// An XSD choice nested to a sequence shall be mapped as a field of the +// enframing record (see clauses 7.6, 7.6.5.4 and 7.6.6.4), according to clause +// 7.6.5 (i.e. the sequence itself is not producing any TTCN-3 construct). + +module Pos_07060603_sequence_with_nested_choice_001 { + + import from schema_Pos_07060603_sequence_with_nested_choice_001 language "XSD" all; + + template MyType m_msg := { + choice := { foo := "foo" }, + ding := "ding" + }; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_07060603_sequence_with_nested_choice_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_07060603_sequence_with_nested_choice_001.xml", { "Pos_07060603_sequence_with_nested_choice_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_07060603_sequence_with_nested_choice_001(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060603_sequence_with_nested_choice/Pos_07060603_sequence_with_nested_choice_001/Pos_07060603_sequence_with_nested_choice_001.xml b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060603_sequence_with_nested_choice/Pos_07060603_sequence_with_nested_choice_001/Pos_07060603_sequence_with_nested_choice_001.xml new file mode 100644 index 00000000..0d72c5bd --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060603_sequence_with_nested_choice/Pos_07060603_sequence_with_nested_choice_001/Pos_07060603_sequence_with_nested_choice_001.xml @@ -0,0 +1,5 @@ + + + foo + ding + \ No newline at end of file diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060603_sequence_with_nested_choice/Pos_07060603_sequence_with_nested_choice_001/Pos_07060603_sequence_with_nested_choice_001.xsd b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060603_sequence_with_nested_choice/Pos_07060603_sequence_with_nested_choice_001/Pos_07060603_sequence_with_nested_choice_001.xsd new file mode 100644 index 00000000..cafa0098 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060603_sequence_with_nested_choice/Pos_07060603_sequence_with_nested_choice_001/Pos_07060603_sequence_with_nested_choice_001.xsd @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060604_sequence/Pos_07060604_sequence_with_nested_sequence_001/Pos_07060604_sequence_with_nested_sequence_001.ttcn b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060604_sequence/Pos_07060604_sequence_with_nested_sequence_001/Pos_07060604_sequence_with_nested_sequence_001.ttcn new file mode 100644 index 00000000..a719958b --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060604_sequence/Pos_07060604_sequence_with_nested_sequence_001/Pos_07060604_sequence_with_nested_sequence_001.ttcn @@ -0,0 +1,90 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.6.6.4, Verify that sequence content with sequence is correctly transformed + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// In the general case, a sequence nested in a sequence shall be translated to +// TTCN-3 according to clause 7.6.6 and the resulted constructs shall be added +// to the enframing record type or field (see also clauses 7.6 and 7.6.5.4). + +module Pos_07060604_sequence_with_nested_sequence_001 { + + import from schema_Pos_07060604_sequence_with_nested_sequence_001 language "XSD" all; + + template MyType m_msg := { + foo := "foo", + bar := "bar", + ding := "ding" + }; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_07060604_sequence_with_nested_sequence_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_07060604_sequence_with_nested_sequence_001.xml", { "Pos_07060604_sequence_with_nested_sequence_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_07060604_sequence_with_nested_sequence_001(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060604_sequence/Pos_07060604_sequence_with_nested_sequence_001/Pos_07060604_sequence_with_nested_sequence_001.xml b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060604_sequence/Pos_07060604_sequence_with_nested_sequence_001/Pos_07060604_sequence_with_nested_sequence_001.xml new file mode 100644 index 00000000..59856a9e --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060604_sequence/Pos_07060604_sequence_with_nested_sequence_001/Pos_07060604_sequence_with_nested_sequence_001.xml @@ -0,0 +1,6 @@ + + + foo + bar + ding + \ No newline at end of file diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060604_sequence/Pos_07060604_sequence_with_nested_sequence_001/Pos_07060604_sequence_with_nested_sequence_001.xsd b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060604_sequence/Pos_07060604_sequence_with_nested_sequence_001/Pos_07060604_sequence_with_nested_sequence_001.xsd new file mode 100644 index 00000000..9378a851 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060604_sequence/Pos_07060604_sequence_with_nested_sequence_001/Pos_07060604_sequence_with_nested_sequence_001.xsd @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060604_sequence/Pos_07060604_sequence_with_nested_sequence_002/Pos_07060604_sequence_with_nested_sequence_002.ttcn b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060604_sequence/Pos_07060604_sequence_with_nested_sequence_002/Pos_07060604_sequence_with_nested_sequence_002.ttcn new file mode 100644 index 00000000..17cb8eeb --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060604_sequence/Pos_07060604_sequence_with_nested_sequence_002/Pos_07060604_sequence_with_nested_sequence_002.ttcn @@ -0,0 +1,91 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.6.6.4, Verify that sequence content with various nested particles is correctly transformed + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// In the general case, a sequence nested in a sequence shall be translated to +// TTCN-3 according to clause 7.6.6 and the resulted constructs shall be added +// to the enframing record type or field (see also clauses 7.6 and 7.6.5.4). + +module Pos_07060604_sequence_with_nested_sequence_002 { + + import from schema_Pos_07060604_sequence_with_nested_sequence_002 language "XSD" all; + + template MyType m_msg := { + foo := "foo", + bar := "bar", + choice := { bar := "bar" }, + ding := "ding" + }; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_07060604_sequence_with_nested_sequence_002() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_07060604_sequence_with_nested_sequence_002.xml", { "Pos_07060604_sequence_with_nested_sequence_002.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_07060604_sequence_with_nested_sequence_002(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060604_sequence/Pos_07060604_sequence_with_nested_sequence_002/Pos_07060604_sequence_with_nested_sequence_002.xml b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060604_sequence/Pos_07060604_sequence_with_nested_sequence_002/Pos_07060604_sequence_with_nested_sequence_002.xml new file mode 100644 index 00000000..5a3f178f --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060604_sequence/Pos_07060604_sequence_with_nested_sequence_002/Pos_07060604_sequence_with_nested_sequence_002.xml @@ -0,0 +1,7 @@ + + + foo + bar + bar + ding + \ No newline at end of file diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060604_sequence/Pos_07060604_sequence_with_nested_sequence_002/Pos_07060604_sequence_with_nested_sequence_002.xsd b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060604_sequence/Pos_07060604_sequence_with_nested_sequence_002/Pos_07060604_sequence_with_nested_sequence_002.xsd new file mode 100644 index 00000000..c33d6cd2 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060604_sequence/Pos_07060604_sequence_with_nested_sequence_002/Pos_07060604_sequence_with_nested_sequence_002.xsd @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060604_sequence_with_nested_sequence/Pos_07060604_sequence_with_nested_sequence_001/Pos_07060604_sequence_with_nested_sequence_001.ttcn b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060604_sequence_with_nested_sequence/Pos_07060604_sequence_with_nested_sequence_001/Pos_07060604_sequence_with_nested_sequence_001.ttcn new file mode 100644 index 00000000..a719958b --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060604_sequence_with_nested_sequence/Pos_07060604_sequence_with_nested_sequence_001/Pos_07060604_sequence_with_nested_sequence_001.ttcn @@ -0,0 +1,90 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.6.6.4, Verify that sequence content with sequence is correctly transformed + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// In the general case, a sequence nested in a sequence shall be translated to +// TTCN-3 according to clause 7.6.6 and the resulted constructs shall be added +// to the enframing record type or field (see also clauses 7.6 and 7.6.5.4). + +module Pos_07060604_sequence_with_nested_sequence_001 { + + import from schema_Pos_07060604_sequence_with_nested_sequence_001 language "XSD" all; + + template MyType m_msg := { + foo := "foo", + bar := "bar", + ding := "ding" + }; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_07060604_sequence_with_nested_sequence_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_07060604_sequence_with_nested_sequence_001.xml", { "Pos_07060604_sequence_with_nested_sequence_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_07060604_sequence_with_nested_sequence_001(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060604_sequence_with_nested_sequence/Pos_07060604_sequence_with_nested_sequence_001/Pos_07060604_sequence_with_nested_sequence_001.xml b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060604_sequence_with_nested_sequence/Pos_07060604_sequence_with_nested_sequence_001/Pos_07060604_sequence_with_nested_sequence_001.xml new file mode 100644 index 00000000..59856a9e --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060604_sequence_with_nested_sequence/Pos_07060604_sequence_with_nested_sequence_001/Pos_07060604_sequence_with_nested_sequence_001.xml @@ -0,0 +1,6 @@ + + + foo + bar + ding + \ No newline at end of file diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060604_sequence_with_nested_sequence/Pos_07060604_sequence_with_nested_sequence_001/Pos_07060604_sequence_with_nested_sequence_001.xsd b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060604_sequence_with_nested_sequence/Pos_07060604_sequence_with_nested_sequence_001/Pos_07060604_sequence_with_nested_sequence_001.xsd new file mode 100644 index 00000000..9378a851 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060604_sequence_with_nested_sequence/Pos_07060604_sequence_with_nested_sequence_001/Pos_07060604_sequence_with_nested_sequence_001.xsd @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060604_sequence_with_nested_sequence/Pos_07060604_sequence_with_nested_sequence_002/Pos_07060604_sequence_with_nested_sequence_002.ttcn b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060604_sequence_with_nested_sequence/Pos_07060604_sequence_with_nested_sequence_002/Pos_07060604_sequence_with_nested_sequence_002.ttcn new file mode 100644 index 00000000..17cb8eeb --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060604_sequence_with_nested_sequence/Pos_07060604_sequence_with_nested_sequence_002/Pos_07060604_sequence_with_nested_sequence_002.ttcn @@ -0,0 +1,91 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.6.6.4, Verify that sequence content with various nested particles is correctly transformed + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// In the general case, a sequence nested in a sequence shall be translated to +// TTCN-3 according to clause 7.6.6 and the resulted constructs shall be added +// to the enframing record type or field (see also clauses 7.6 and 7.6.5.4). + +module Pos_07060604_sequence_with_nested_sequence_002 { + + import from schema_Pos_07060604_sequence_with_nested_sequence_002 language "XSD" all; + + template MyType m_msg := { + foo := "foo", + bar := "bar", + choice := { bar := "bar" }, + ding := "ding" + }; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_07060604_sequence_with_nested_sequence_002() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_07060604_sequence_with_nested_sequence_002.xml", { "Pos_07060604_sequence_with_nested_sequence_002.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_07060604_sequence_with_nested_sequence_002(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060604_sequence_with_nested_sequence/Pos_07060604_sequence_with_nested_sequence_002/Pos_07060604_sequence_with_nested_sequence_002.xml b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060604_sequence_with_nested_sequence/Pos_07060604_sequence_with_nested_sequence_002/Pos_07060604_sequence_with_nested_sequence_002.xml new file mode 100644 index 00000000..5a3f178f --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060604_sequence_with_nested_sequence/Pos_07060604_sequence_with_nested_sequence_002/Pos_07060604_sequence_with_nested_sequence_002.xml @@ -0,0 +1,7 @@ + + + foo + bar + bar + ding + \ No newline at end of file diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060604_sequence_with_nested_sequence/Pos_07060604_sequence_with_nested_sequence_002/Pos_07060604_sequence_with_nested_sequence_002.xsd b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060604_sequence_with_nested_sequence/Pos_07060604_sequence_with_nested_sequence_002/Pos_07060604_sequence_with_nested_sequence_002.xsd new file mode 100644 index 00000000..c33d6cd2 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060604_sequence_with_nested_sequence/Pos_07060604_sequence_with_nested_sequence_002/Pos_07060604_sequence_with_nested_sequence_002.xsd @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060605_any/Pos_07060605_sequence_with_nested_any_content_001/Pos_07060605_sequence_with_nested_any_content_001.ttcn b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060605_any/Pos_07060605_sequence_with_nested_any_content_001/Pos_07060605_sequence_with_nested_any_content_001.ttcn new file mode 100644 index 00000000..39a94039 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060605_any/Pos_07060605_sequence_with_nested_any_content_001/Pos_07060605_sequence_with_nested_any_content_001.ttcn @@ -0,0 +1,88 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.6.6.5, Verify that sequence content with nested any content is correctly transformed + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// An XSD any element nested in a sequence shall be translated according to +// clause 7.7. + +module Pos_07060605_sequence_with_nested_any_content_001 { + + import from schema_Pos_07060605_sequence_with_nested_any_content_001 language "XSD" all; + + template MyType m_msg := { + foo := "foo", + elem := "abc" + }; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_07060605_sequence_with_nested_any_content_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_07060605_sequence_with_nested_any_content_001.xml", { "Pos_07060605_sequence_with_nested_any_content_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_07060605_sequence_with_nested_any_content_001(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060605_any/Pos_07060605_sequence_with_nested_any_content_001/Pos_07060605_sequence_with_nested_any_content_001.xml b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060605_any/Pos_07060605_sequence_with_nested_any_content_001/Pos_07060605_sequence_with_nested_any_content_001.xml new file mode 100644 index 00000000..8a591b38 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060605_any/Pos_07060605_sequence_with_nested_any_content_001/Pos_07060605_sequence_with_nested_any_content_001.xml @@ -0,0 +1,3 @@ + + + fooabc \ No newline at end of file diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060605_any/Pos_07060605_sequence_with_nested_any_content_001/Pos_07060605_sequence_with_nested_any_content_001.xsd b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060605_any/Pos_07060605_sequence_with_nested_any_content_001/Pos_07060605_sequence_with_nested_any_content_001.xsd new file mode 100644 index 00000000..7d4d1a41 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060605_any/Pos_07060605_sequence_with_nested_any_content_001/Pos_07060605_sequence_with_nested_any_content_001.xsd @@ -0,0 +1,14 @@ + + + + + + + + + + + + diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060605_sequence_with_nested_any_content/Pos_07060605_sequence_with_nested_any_content_001/Pos_07060605_sequence_with_nested_any_content_001.ttcn b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060605_sequence_with_nested_any_content/Pos_07060605_sequence_with_nested_any_content_001/Pos_07060605_sequence_with_nested_any_content_001.ttcn new file mode 100644 index 00000000..39a94039 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060605_sequence_with_nested_any_content/Pos_07060605_sequence_with_nested_any_content_001/Pos_07060605_sequence_with_nested_any_content_001.ttcn @@ -0,0 +1,88 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.6.6.5, Verify that sequence content with nested any content is correctly transformed + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// An XSD any element nested in a sequence shall be translated according to +// clause 7.7. + +module Pos_07060605_sequence_with_nested_any_content_001 { + + import from schema_Pos_07060605_sequence_with_nested_any_content_001 language "XSD" all; + + template MyType m_msg := { + foo := "foo", + elem := "abc" + }; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_07060605_sequence_with_nested_any_content_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_07060605_sequence_with_nested_any_content_001.xml", { "Pos_07060605_sequence_with_nested_any_content_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_07060605_sequence_with_nested_any_content_001(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060605_sequence_with_nested_any_content/Pos_07060605_sequence_with_nested_any_content_001/Pos_07060605_sequence_with_nested_any_content_001.xml b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060605_sequence_with_nested_any_content/Pos_07060605_sequence_with_nested_any_content_001/Pos_07060605_sequence_with_nested_any_content_001.xml new file mode 100644 index 00000000..8a591b38 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060605_sequence_with_nested_any_content/Pos_07060605_sequence_with_nested_any_content_001/Pos_07060605_sequence_with_nested_any_content_001.xml @@ -0,0 +1,3 @@ + + + fooabc \ No newline at end of file diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060605_sequence_with_nested_any_content/Pos_07060605_sequence_with_nested_any_content_001/Pos_07060605_sequence_with_nested_any_content_001.xsd b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060605_sequence_with_nested_any_content/Pos_07060605_sequence_with_nested_any_content_001/Pos_07060605_sequence_with_nested_any_content_001.xsd new file mode 100644 index 00000000..7d4d1a41 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060605_sequence_with_nested_any_content/Pos_07060605_sequence_with_nested_any_content_001/Pos_07060605_sequence_with_nested_any_content_001.xsd @@ -0,0 +1,14 @@ + + + + + + + + + + + + diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060606_effect_of_minoccurs_and_maxoccurs/Pos_07060606_effect_of_minoccurs_and_maxoccurs_001/Pos_07060606_effect_of_minoccurs_and_maxoccurs_001.ttcn b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060606_effect_of_minoccurs_and_maxoccurs/Pos_07060606_effect_of_minoccurs_and_maxoccurs_001/Pos_07060606_effect_of_minoccurs_and_maxoccurs_001.ttcn new file mode 100644 index 00000000..2b4fb1e9 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060606_effect_of_minoccurs_and_maxoccurs/Pos_07060606_effect_of_minoccurs_and_maxoccurs_001/Pos_07060606_effect_of_minoccurs_and_maxoccurs_001.ttcn @@ -0,0 +1,100 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.6.6.6, Verify that sequences with minOccurs=0 are correctly converted to optional fields + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// When either or both the minOccurs and/or the maxOccurs attributes of the +// sequence compositor specify a different value than "1", the following rules +// shall apply: +// a) First, the sequence compositor shall be mapped to a TTCN-3 record field +// (as opposed to ignoring it in the previous clauses, when both minOccurs and +// maxOccurs equal to 1) with the name "sequence". +// b) The encoding instruction "untagged" shall be attached to the field +// corresponding to sequence. +// c) The procedures in clause 7.1.4 shall be applied to this record field. +// d) Finally, clause 5.2.2 shall be applied to the name of the resulted field +// and the field shall be added to the enframing TTCN-3 record (see clauses 7.6 +// and 7.6.6) or union field (see clause 7.6.5). + +module Pos_07060606_effect_of_minoccurs_and_maxoccurs_001 { + + import from schema_Pos_07060606_effect_of_minoccurs_and_maxoccurs_001 language "XSD" all; + + template MyType m_msg := { + sequence := { + foo := "foo", + bar := "bar" + } + }; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_07060606_effect_of_minoccurs_and_maxoccurs_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_07060606_effect_of_minoccurs_and_maxoccurs_001.xml", { "Pos_07060606_effect_of_minoccurs_and_maxoccurs_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_07060606_effect_of_minoccurs_and_maxoccurs_001(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060606_effect_of_minoccurs_and_maxoccurs/Pos_07060606_effect_of_minoccurs_and_maxoccurs_001/Pos_07060606_effect_of_minoccurs_and_maxoccurs_001.xml b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060606_effect_of_minoccurs_and_maxoccurs/Pos_07060606_effect_of_minoccurs_and_maxoccurs_001/Pos_07060606_effect_of_minoccurs_and_maxoccurs_001.xml new file mode 100644 index 00000000..6cc9ed6b --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060606_effect_of_minoccurs_and_maxoccurs/Pos_07060606_effect_of_minoccurs_and_maxoccurs_001/Pos_07060606_effect_of_minoccurs_and_maxoccurs_001.xml @@ -0,0 +1,5 @@ + + + foo + bar + \ No newline at end of file diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060606_effect_of_minoccurs_and_maxoccurs/Pos_07060606_effect_of_minoccurs_and_maxoccurs_001/Pos_07060606_effect_of_minoccurs_and_maxoccurs_001.xsd b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060606_effect_of_minoccurs_and_maxoccurs/Pos_07060606_effect_of_minoccurs_and_maxoccurs_001/Pos_07060606_effect_of_minoccurs_and_maxoccurs_001.xsd new file mode 100644 index 00000000..f7f63456 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060606_effect_of_minoccurs_and_maxoccurs/Pos_07060606_effect_of_minoccurs_and_maxoccurs_001/Pos_07060606_effect_of_minoccurs_and_maxoccurs_001.xsd @@ -0,0 +1,13 @@ + + + + + + + + + + + diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060606_effect_of_minoccurs_and_maxoccurs/Pos_07060606_effect_of_minoccurs_and_maxoccurs_002/Pos_07060606_effect_of_minoccurs_and_maxoccurs_002.ttcn b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060606_effect_of_minoccurs_and_maxoccurs/Pos_07060606_effect_of_minoccurs_and_maxoccurs_002/Pos_07060606_effect_of_minoccurs_and_maxoccurs_002.ttcn new file mode 100644 index 00000000..a9176996 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060606_effect_of_minoccurs_and_maxoccurs/Pos_07060606_effect_of_minoccurs_and_maxoccurs_002/Pos_07060606_effect_of_minoccurs_and_maxoccurs_002.ttcn @@ -0,0 +1,99 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.6.6.6, Verify that nested sequences are correctly converted to optional fields + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// When either or both the minOccurs and/or the maxOccurs attributes of the +// sequence compositor specify a different value than "1", the following rules +// shall apply: +// a) First, the sequence compositor shall be mapped to a TTCN-3 record field +// (as opposed to ignoring it in the previous clauses, when both minOccurs and +// maxOccurs equal to 1) with the name "sequence". +// b) The encoding instruction "untagged" shall be attached to the field +// corresponding to sequence. +// c) The procedures in clause 7.1.4 shall be applied to this record field. +// d) Finally, clause 5.2.2 shall be applied to the name of the resulted field +// and the field shall be added to the enframing TTCN-3 record (see clauses 7.6 +// and 7.6.6) or union field (see clause 7.6.5). + +module Pos_07060606_effect_of_minoccurs_and_maxoccurs_002 { + + import from schema_Pos_07060606_effect_of_minoccurs_and_maxoccurs_002 language "XSD" all; + + template MyType m_msg := { + sequence := omit, + choice := { foo1 := "foo1" }, + ding := "ding" + }; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_07060606_effect_of_minoccurs_and_maxoccurs_002() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_07060606_effect_of_minoccurs_and_maxoccurs_002.xml", { "Pos_07060606_effect_of_minoccurs_and_maxoccurs_002.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_07060606_effect_of_minoccurs_and_maxoccurs_002(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060606_effect_of_minoccurs_and_maxoccurs/Pos_07060606_effect_of_minoccurs_and_maxoccurs_002/Pos_07060606_effect_of_minoccurs_and_maxoccurs_002.xml b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060606_effect_of_minoccurs_and_maxoccurs/Pos_07060606_effect_of_minoccurs_and_maxoccurs_002/Pos_07060606_effect_of_minoccurs_and_maxoccurs_002.xml new file mode 100644 index 00000000..4040c99f --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060606_effect_of_minoccurs_and_maxoccurs/Pos_07060606_effect_of_minoccurs_and_maxoccurs_002/Pos_07060606_effect_of_minoccurs_and_maxoccurs_002.xml @@ -0,0 +1,5 @@ + + + foo1 + ding + \ No newline at end of file diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060606_effect_of_minoccurs_and_maxoccurs/Pos_07060606_effect_of_minoccurs_and_maxoccurs_002/Pos_07060606_effect_of_minoccurs_and_maxoccurs_002.xsd b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060606_effect_of_minoccurs_and_maxoccurs/Pos_07060606_effect_of_minoccurs_and_maxoccurs_002/Pos_07060606_effect_of_minoccurs_and_maxoccurs_002.xsd new file mode 100644 index 00000000..1055e2f3 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060606_effect_of_minoccurs_and_maxoccurs/Pos_07060606_effect_of_minoccurs_and_maxoccurs_002/Pos_07060606_effect_of_minoccurs_and_maxoccurs_002.xsd @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060606_effect_of_minoccurs_and_maxoccurs/Pos_07060606_effect_of_minoccurs_and_maxoccurs_003/Pos_07060606_effect_of_minoccurs_and_maxoccurs_003.ttcn b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060606_effect_of_minoccurs_and_maxoccurs/Pos_07060606_effect_of_minoccurs_and_maxoccurs_003/Pos_07060606_effect_of_minoccurs_and_maxoccurs_003.ttcn new file mode 100644 index 00000000..85f05dee --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060606_effect_of_minoccurs_and_maxoccurs/Pos_07060606_effect_of_minoccurs_and_maxoccurs_003/Pos_07060606_effect_of_minoccurs_and_maxoccurs_003.ttcn @@ -0,0 +1,105 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.6.6.6, Verify that sequences with minOccurs=unbounded are correctly converted to record of fields + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// When either or both the minOccurs and/or the maxOccurs attributes of the +// sequence compositor specify a different value than "1", the following rules +// shall apply: +// a) First, the sequence compositor shall be mapped to a TTCN-3 record field +// (as opposed to ignoring it in the previous clauses, when both minOccurs and +// maxOccurs equal to 1) with the name "sequence". +// b) The encoding instruction "untagged" shall be attached to the field +// corresponding to sequence. +// c) The procedures in clause 7.1.4 shall be applied to this record field. +// d) Finally, clause 5.2.2 shall be applied to the name of the resulted field +// and the field shall be added to the enframing TTCN-3 record (see clauses 7.6 +// and 7.6.6) or union field (see clause 7.6.5). + +module Pos_07060606_effect_of_minoccurs_and_maxoccurs_003 { + + import from schema_Pos_07060606_effect_of_minoccurs_and_maxoccurs_003 language "XSD" all; + + template MyType m_msg := { + sequence_list := { + { + foo := "foo1", + bar := "bar1" + }, { + foo := "foo2", + bar := "bar2" + } + } + }; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_07060606_effect_of_minoccurs_and_maxoccurs_003() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_07060606_effect_of_minoccurs_and_maxoccurs_003.xml", { "Pos_07060606_effect_of_minoccurs_and_maxoccurs_003.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_07060606_effect_of_minoccurs_and_maxoccurs_003(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060606_effect_of_minoccurs_and_maxoccurs/Pos_07060606_effect_of_minoccurs_and_maxoccurs_003/Pos_07060606_effect_of_minoccurs_and_maxoccurs_003.xml b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060606_effect_of_minoccurs_and_maxoccurs/Pos_07060606_effect_of_minoccurs_and_maxoccurs_003/Pos_07060606_effect_of_minoccurs_and_maxoccurs_003.xml new file mode 100644 index 00000000..619ac8da --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060606_effect_of_minoccurs_and_maxoccurs/Pos_07060606_effect_of_minoccurs_and_maxoccurs_003/Pos_07060606_effect_of_minoccurs_and_maxoccurs_003.xml @@ -0,0 +1,7 @@ + + + foo1 + bar1 + foo2 + bar2 + \ No newline at end of file diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060606_effect_of_minoccurs_and_maxoccurs/Pos_07060606_effect_of_minoccurs_and_maxoccurs_003/Pos_07060606_effect_of_minoccurs_and_maxoccurs_003.xsd b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060606_effect_of_minoccurs_and_maxoccurs/Pos_07060606_effect_of_minoccurs_and_maxoccurs_003/Pos_07060606_effect_of_minoccurs_and_maxoccurs_003.xsd new file mode 100644 index 00000000..7cc3d871 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060606_effect_of_minoccurs_and_maxoccurs/Pos_07060606_effect_of_minoccurs_and_maxoccurs_003/Pos_07060606_effect_of_minoccurs_and_maxoccurs_003.xsd @@ -0,0 +1,13 @@ + + + + + + + + + + + diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060606_effect_of_minoccurs_and_maxoccurs/Pos_07060606_effect_of_minoccurs_and_maxoccurs_004/Pos_07060606_effect_of_minoccurs_and_maxoccurs_004.ttcn b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060606_effect_of_minoccurs_and_maxoccurs/Pos_07060606_effect_of_minoccurs_and_maxoccurs_004/Pos_07060606_effect_of_minoccurs_and_maxoccurs_004.ttcn new file mode 100644 index 00000000..6341bfa9 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060606_effect_of_minoccurs_and_maxoccurs/Pos_07060606_effect_of_minoccurs_and_maxoccurs_004/Pos_07060606_effect_of_minoccurs_and_maxoccurs_004.ttcn @@ -0,0 +1,106 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.6.6.6, Verify that nested sequences are correctly converted to record of fields + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// When either or both the minOccurs and/or the maxOccurs attributes of the +// sequence compositor specify a different value than "1", the following rules +// shall apply: +// a) First, the sequence compositor shall be mapped to a TTCN-3 record field +// (as opposed to ignoring it in the previous clauses, when both minOccurs and +// maxOccurs equal to 1) with the name "sequence". +// b) The encoding instruction "untagged" shall be attached to the field +// corresponding to sequence. +// c) The procedures in clause 7.1.4 shall be applied to this record field. +// d) Finally, clause 5.2.2 shall be applied to the name of the resulted field +// and the field shall be added to the enframing TTCN-3 record (see clauses 7.6 +// and 7.6.6) or union field (see clause 7.6.5). + +module Pos_07060606_effect_of_minoccurs_and_maxoccurs_004 { + + import from schema_Pos_07060606_effect_of_minoccurs_and_maxoccurs_004 language "XSD" all; + + template MyType m_msg := { + sequence_list := { + { + foo := "foo1", + bar := "bar1" + }, { + foo := "foo2", + bar := "bar2" + } + }, + ding := "ding" + }; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_07060606_effect_of_minoccurs_and_maxoccurs_004() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_07060606_effect_of_minoccurs_and_maxoccurs_004.xml", { "Pos_07060606_effect_of_minoccurs_and_maxoccurs_004.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_07060606_effect_of_minoccurs_and_maxoccurs_004(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060606_effect_of_minoccurs_and_maxoccurs/Pos_07060606_effect_of_minoccurs_and_maxoccurs_004/Pos_07060606_effect_of_minoccurs_and_maxoccurs_004.xml b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060606_effect_of_minoccurs_and_maxoccurs/Pos_07060606_effect_of_minoccurs_and_maxoccurs_004/Pos_07060606_effect_of_minoccurs_and_maxoccurs_004.xml new file mode 100644 index 00000000..f61f9757 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060606_effect_of_minoccurs_and_maxoccurs/Pos_07060606_effect_of_minoccurs_and_maxoccurs_004/Pos_07060606_effect_of_minoccurs_and_maxoccurs_004.xml @@ -0,0 +1,8 @@ + + + foo1 + bar1 + foo2 + bar2 + ding + \ No newline at end of file diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060606_effect_of_minoccurs_and_maxoccurs/Pos_07060606_effect_of_minoccurs_and_maxoccurs_004/Pos_07060606_effect_of_minoccurs_and_maxoccurs_004.xsd b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060606_effect_of_minoccurs_and_maxoccurs/Pos_07060606_effect_of_minoccurs_and_maxoccurs_004/Pos_07060606_effect_of_minoccurs_and_maxoccurs_004.xsd new file mode 100644 index 00000000..6b8b43f8 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060606_effect_of_minoccurs_and_maxoccurs/Pos_07060606_effect_of_minoccurs_and_maxoccurs_004/Pos_07060606_effect_of_minoccurs_and_maxoccurs_004.xsd @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060606_minmaxoccurs/Pos_07060606_effect_of_minoccurs_and_maxoccurs_001/Pos_07060606_effect_of_minoccurs_and_maxoccurs_001.ttcn b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060606_minmaxoccurs/Pos_07060606_effect_of_minoccurs_and_maxoccurs_001/Pos_07060606_effect_of_minoccurs_and_maxoccurs_001.ttcn new file mode 100644 index 00000000..2b4fb1e9 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060606_minmaxoccurs/Pos_07060606_effect_of_minoccurs_and_maxoccurs_001/Pos_07060606_effect_of_minoccurs_and_maxoccurs_001.ttcn @@ -0,0 +1,100 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.6.6.6, Verify that sequences with minOccurs=0 are correctly converted to optional fields + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// When either or both the minOccurs and/or the maxOccurs attributes of the +// sequence compositor specify a different value than "1", the following rules +// shall apply: +// a) First, the sequence compositor shall be mapped to a TTCN-3 record field +// (as opposed to ignoring it in the previous clauses, when both minOccurs and +// maxOccurs equal to 1) with the name "sequence". +// b) The encoding instruction "untagged" shall be attached to the field +// corresponding to sequence. +// c) The procedures in clause 7.1.4 shall be applied to this record field. +// d) Finally, clause 5.2.2 shall be applied to the name of the resulted field +// and the field shall be added to the enframing TTCN-3 record (see clauses 7.6 +// and 7.6.6) or union field (see clause 7.6.5). + +module Pos_07060606_effect_of_minoccurs_and_maxoccurs_001 { + + import from schema_Pos_07060606_effect_of_minoccurs_and_maxoccurs_001 language "XSD" all; + + template MyType m_msg := { + sequence := { + foo := "foo", + bar := "bar" + } + }; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_07060606_effect_of_minoccurs_and_maxoccurs_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_07060606_effect_of_minoccurs_and_maxoccurs_001.xml", { "Pos_07060606_effect_of_minoccurs_and_maxoccurs_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_07060606_effect_of_minoccurs_and_maxoccurs_001(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060606_minmaxoccurs/Pos_07060606_effect_of_minoccurs_and_maxoccurs_001/Pos_07060606_effect_of_minoccurs_and_maxoccurs_001.xml b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060606_minmaxoccurs/Pos_07060606_effect_of_minoccurs_and_maxoccurs_001/Pos_07060606_effect_of_minoccurs_and_maxoccurs_001.xml new file mode 100644 index 00000000..6cc9ed6b --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060606_minmaxoccurs/Pos_07060606_effect_of_minoccurs_and_maxoccurs_001/Pos_07060606_effect_of_minoccurs_and_maxoccurs_001.xml @@ -0,0 +1,5 @@ + + + foo + bar + \ No newline at end of file diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060606_minmaxoccurs/Pos_07060606_effect_of_minoccurs_and_maxoccurs_001/Pos_07060606_effect_of_minoccurs_and_maxoccurs_001.xsd b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060606_minmaxoccurs/Pos_07060606_effect_of_minoccurs_and_maxoccurs_001/Pos_07060606_effect_of_minoccurs_and_maxoccurs_001.xsd new file mode 100644 index 00000000..f7f63456 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060606_minmaxoccurs/Pos_07060606_effect_of_minoccurs_and_maxoccurs_001/Pos_07060606_effect_of_minoccurs_and_maxoccurs_001.xsd @@ -0,0 +1,13 @@ + + + + + + + + + + + diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060606_minmaxoccurs/Pos_07060606_effect_of_minoccurs_and_maxoccurs_002/Pos_07060606_effect_of_minoccurs_and_maxoccurs_002.ttcn b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060606_minmaxoccurs/Pos_07060606_effect_of_minoccurs_and_maxoccurs_002/Pos_07060606_effect_of_minoccurs_and_maxoccurs_002.ttcn new file mode 100644 index 00000000..a9176996 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060606_minmaxoccurs/Pos_07060606_effect_of_minoccurs_and_maxoccurs_002/Pos_07060606_effect_of_minoccurs_and_maxoccurs_002.ttcn @@ -0,0 +1,99 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.6.6.6, Verify that nested sequences are correctly converted to optional fields + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// When either or both the minOccurs and/or the maxOccurs attributes of the +// sequence compositor specify a different value than "1", the following rules +// shall apply: +// a) First, the sequence compositor shall be mapped to a TTCN-3 record field +// (as opposed to ignoring it in the previous clauses, when both minOccurs and +// maxOccurs equal to 1) with the name "sequence". +// b) The encoding instruction "untagged" shall be attached to the field +// corresponding to sequence. +// c) The procedures in clause 7.1.4 shall be applied to this record field. +// d) Finally, clause 5.2.2 shall be applied to the name of the resulted field +// and the field shall be added to the enframing TTCN-3 record (see clauses 7.6 +// and 7.6.6) or union field (see clause 7.6.5). + +module Pos_07060606_effect_of_minoccurs_and_maxoccurs_002 { + + import from schema_Pos_07060606_effect_of_minoccurs_and_maxoccurs_002 language "XSD" all; + + template MyType m_msg := { + sequence := omit, + choice := { foo1 := "foo1" }, + ding := "ding" + }; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_07060606_effect_of_minoccurs_and_maxoccurs_002() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_07060606_effect_of_minoccurs_and_maxoccurs_002.xml", { "Pos_07060606_effect_of_minoccurs_and_maxoccurs_002.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_07060606_effect_of_minoccurs_and_maxoccurs_002(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060606_minmaxoccurs/Pos_07060606_effect_of_minoccurs_and_maxoccurs_002/Pos_07060606_effect_of_minoccurs_and_maxoccurs_002.xml b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060606_minmaxoccurs/Pos_07060606_effect_of_minoccurs_and_maxoccurs_002/Pos_07060606_effect_of_minoccurs_and_maxoccurs_002.xml new file mode 100644 index 00000000..4040c99f --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060606_minmaxoccurs/Pos_07060606_effect_of_minoccurs_and_maxoccurs_002/Pos_07060606_effect_of_minoccurs_and_maxoccurs_002.xml @@ -0,0 +1,5 @@ + + + foo1 + ding + \ No newline at end of file diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060606_minmaxoccurs/Pos_07060606_effect_of_minoccurs_and_maxoccurs_002/Pos_07060606_effect_of_minoccurs_and_maxoccurs_002.xsd b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060606_minmaxoccurs/Pos_07060606_effect_of_minoccurs_and_maxoccurs_002/Pos_07060606_effect_of_minoccurs_and_maxoccurs_002.xsd new file mode 100644 index 00000000..1055e2f3 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060606_minmaxoccurs/Pos_07060606_effect_of_minoccurs_and_maxoccurs_002/Pos_07060606_effect_of_minoccurs_and_maxoccurs_002.xsd @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060606_minmaxoccurs/Pos_07060606_effect_of_minoccurs_and_maxoccurs_003/Pos_07060606_effect_of_minoccurs_and_maxoccurs_003.ttcn b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060606_minmaxoccurs/Pos_07060606_effect_of_minoccurs_and_maxoccurs_003/Pos_07060606_effect_of_minoccurs_and_maxoccurs_003.ttcn new file mode 100644 index 00000000..85f05dee --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060606_minmaxoccurs/Pos_07060606_effect_of_minoccurs_and_maxoccurs_003/Pos_07060606_effect_of_minoccurs_and_maxoccurs_003.ttcn @@ -0,0 +1,105 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.6.6.6, Verify that sequences with minOccurs=unbounded are correctly converted to record of fields + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// When either or both the minOccurs and/or the maxOccurs attributes of the +// sequence compositor specify a different value than "1", the following rules +// shall apply: +// a) First, the sequence compositor shall be mapped to a TTCN-3 record field +// (as opposed to ignoring it in the previous clauses, when both minOccurs and +// maxOccurs equal to 1) with the name "sequence". +// b) The encoding instruction "untagged" shall be attached to the field +// corresponding to sequence. +// c) The procedures in clause 7.1.4 shall be applied to this record field. +// d) Finally, clause 5.2.2 shall be applied to the name of the resulted field +// and the field shall be added to the enframing TTCN-3 record (see clauses 7.6 +// and 7.6.6) or union field (see clause 7.6.5). + +module Pos_07060606_effect_of_minoccurs_and_maxoccurs_003 { + + import from schema_Pos_07060606_effect_of_minoccurs_and_maxoccurs_003 language "XSD" all; + + template MyType m_msg := { + sequence_list := { + { + foo := "foo1", + bar := "bar1" + }, { + foo := "foo2", + bar := "bar2" + } + } + }; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_07060606_effect_of_minoccurs_and_maxoccurs_003() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_07060606_effect_of_minoccurs_and_maxoccurs_003.xml", { "Pos_07060606_effect_of_minoccurs_and_maxoccurs_003.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_07060606_effect_of_minoccurs_and_maxoccurs_003(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060606_minmaxoccurs/Pos_07060606_effect_of_minoccurs_and_maxoccurs_003/Pos_07060606_effect_of_minoccurs_and_maxoccurs_003.xml b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060606_minmaxoccurs/Pos_07060606_effect_of_minoccurs_and_maxoccurs_003/Pos_07060606_effect_of_minoccurs_and_maxoccurs_003.xml new file mode 100644 index 00000000..619ac8da --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060606_minmaxoccurs/Pos_07060606_effect_of_minoccurs_and_maxoccurs_003/Pos_07060606_effect_of_minoccurs_and_maxoccurs_003.xml @@ -0,0 +1,7 @@ + + + foo1 + bar1 + foo2 + bar2 + \ No newline at end of file diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060606_minmaxoccurs/Pos_07060606_effect_of_minoccurs_and_maxoccurs_003/Pos_07060606_effect_of_minoccurs_and_maxoccurs_003.xsd b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060606_minmaxoccurs/Pos_07060606_effect_of_minoccurs_and_maxoccurs_003/Pos_07060606_effect_of_minoccurs_and_maxoccurs_003.xsd new file mode 100644 index 00000000..7cc3d871 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060606_minmaxoccurs/Pos_07060606_effect_of_minoccurs_and_maxoccurs_003/Pos_07060606_effect_of_minoccurs_and_maxoccurs_003.xsd @@ -0,0 +1,13 @@ + + + + + + + + + + + diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060606_minmaxoccurs/Pos_07060606_effect_of_minoccurs_and_maxoccurs_004/Pos_07060606_effect_of_minoccurs_and_maxoccurs_004.ttcn b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060606_minmaxoccurs/Pos_07060606_effect_of_minoccurs_and_maxoccurs_004/Pos_07060606_effect_of_minoccurs_and_maxoccurs_004.ttcn new file mode 100644 index 00000000..6341bfa9 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060606_minmaxoccurs/Pos_07060606_effect_of_minoccurs_and_maxoccurs_004/Pos_07060606_effect_of_minoccurs_and_maxoccurs_004.ttcn @@ -0,0 +1,106 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.6.6.6, Verify that nested sequences are correctly converted to record of fields + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// When either or both the minOccurs and/or the maxOccurs attributes of the +// sequence compositor specify a different value than "1", the following rules +// shall apply: +// a) First, the sequence compositor shall be mapped to a TTCN-3 record field +// (as opposed to ignoring it in the previous clauses, when both minOccurs and +// maxOccurs equal to 1) with the name "sequence". +// b) The encoding instruction "untagged" shall be attached to the field +// corresponding to sequence. +// c) The procedures in clause 7.1.4 shall be applied to this record field. +// d) Finally, clause 5.2.2 shall be applied to the name of the resulted field +// and the field shall be added to the enframing TTCN-3 record (see clauses 7.6 +// and 7.6.6) or union field (see clause 7.6.5). + +module Pos_07060606_effect_of_minoccurs_and_maxoccurs_004 { + + import from schema_Pos_07060606_effect_of_minoccurs_and_maxoccurs_004 language "XSD" all; + + template MyType m_msg := { + sequence_list := { + { + foo := "foo1", + bar := "bar1" + }, { + foo := "foo2", + bar := "bar2" + } + }, + ding := "ding" + }; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_07060606_effect_of_minoccurs_and_maxoccurs_004() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_07060606_effect_of_minoccurs_and_maxoccurs_004.xml", { "Pos_07060606_effect_of_minoccurs_and_maxoccurs_004.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_07060606_effect_of_minoccurs_and_maxoccurs_004(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060606_minmaxoccurs/Pos_07060606_effect_of_minoccurs_and_maxoccurs_004/Pos_07060606_effect_of_minoccurs_and_maxoccurs_004.xml b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060606_minmaxoccurs/Pos_07060606_effect_of_minoccurs_and_maxoccurs_004/Pos_07060606_effect_of_minoccurs_and_maxoccurs_004.xml new file mode 100644 index 00000000..f61f9757 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060606_minmaxoccurs/Pos_07060606_effect_of_minoccurs_and_maxoccurs_004/Pos_07060606_effect_of_minoccurs_and_maxoccurs_004.xml @@ -0,0 +1,8 @@ + + + foo1 + bar1 + foo2 + bar2 + ding + \ No newline at end of file diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060606_minmaxoccurs/Pos_07060606_effect_of_minoccurs_and_maxoccurs_004/Pos_07060606_effect_of_minoccurs_and_maxoccurs_004.xsd b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060606_minmaxoccurs/Pos_07060606_effect_of_minoccurs_and_maxoccurs_004/Pos_07060606_effect_of_minoccurs_and_maxoccurs_004.xsd new file mode 100644 index 00000000..6b8b43f8 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060606_minmaxoccurs/Pos_07060606_effect_of_minoccurs_and_maxoccurs_004/Pos_07060606_effect_of_minoccurs_and_maxoccurs_004.xsd @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060606_minmaxoccurs/Pos_07060606_effect_of_minoccurs_and_maxoccurs_005/Pos_07060606_effect_of_minoccurs_and_maxoccurs_005.ttcn b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060606_minmaxoccurs/Pos_07060606_effect_of_minoccurs_and_maxoccurs_005/Pos_07060606_effect_of_minoccurs_and_maxoccurs_005.ttcn new file mode 100644 index 00000000..8ff2015e --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060606_minmaxoccurs/Pos_07060606_effect_of_minoccurs_and_maxoccurs_005/Pos_07060606_effect_of_minoccurs_and_maxoccurs_005.ttcn @@ -0,0 +1,107 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 9:7.6.6.6, Verify that a wrapping optional record is decoded as omit if none of fields contained in it is present + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// When either or both the minOccurs and/or the maxOccurs attributes of the +// sequence compositor specify a different value than "1", the following rules +// shall apply: +// a) First, the sequence compositor shall be mapped to a TTCN-3 record field +// (as opposed to ignoring it in the previous clauses, when both minOccurs and +// maxOccurs equal to 1) with the name "sequence". +// b) The encoding instruction "untagged" shall be attached to the field +// corresponding to sequence. +// c) The procedures in clause 7.1.4 shall be applied to this record field. +// d) Finally, clause 5.2.2 shall be applied to the name of the resulted field +// and the field shall be added to the enframing TTCN-3 record (see clauses 7.6 +// and 7.6.6) or union field (see clause 7.6.5). + +module Pos_07060606_effect_of_minoccurs_and_maxoccurs_005 { + + import from schema_Pos_07060606_effect_of_minoccurs_and_maxoccurs_005 language "XSD" all; + + template Optionals_in_optional m_msg := { + sequence := { + elem1 := omit, + elem2 := omit, + elem3 := omit, + elem4 := omit, + elem5 := omit + } + }; + + template Optionals_in_optional m_rcv := { + sequence := omit + } + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_07060606_effect_of_minoccurs_and_maxoccurs_005() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_07060606_effect_of_minoccurs_and_maxoccurs_005.xml", { "Pos_07060606_effect_of_minoccurs_and_maxoccurs_005.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_rcv) { // The value has been changed by the encoder or decoder (in a predictable way) + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_07060606_effect_of_minoccurs_and_maxoccurs_005(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060606_minmaxoccurs/Pos_07060606_effect_of_minoccurs_and_maxoccurs_005/Pos_07060606_effect_of_minoccurs_and_maxoccurs_005.xml b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060606_minmaxoccurs/Pos_07060606_effect_of_minoccurs_and_maxoccurs_005/Pos_07060606_effect_of_minoccurs_and_maxoccurs_005.xml new file mode 100644 index 00000000..08fa0033 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060606_minmaxoccurs/Pos_07060606_effect_of_minoccurs_and_maxoccurs_005/Pos_07060606_effect_of_minoccurs_and_maxoccurs_005.xml @@ -0,0 +1,2 @@ + + diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060606_minmaxoccurs/Pos_07060606_effect_of_minoccurs_and_maxoccurs_005/Pos_07060606_effect_of_minoccurs_and_maxoccurs_005.xsd b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060606_minmaxoccurs/Pos_07060606_effect_of_minoccurs_and_maxoccurs_005/Pos_07060606_effect_of_minoccurs_and_maxoccurs_005.xsd new file mode 100644 index 00000000..6168075d --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060606_minmaxoccurs/Pos_07060606_effect_of_minoccurs_and_maxoccurs_005/Pos_07060606_effect_of_minoccurs_and_maxoccurs_005.xsd @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070607_attribute/Pos_070607_attribute__001/Pos_070607_attribute_definitions_attribute_and_attributegroup_references_001.ttcn b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070607_attribute/Pos_070607_attribute__001/Pos_070607_attribute_definitions_attribute_and_attributegroup_references_001.ttcn new file mode 100644 index 00000000..7244dea0 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070607_attribute/Pos_070607_attribute__001/Pos_070607_attribute_definitions_attribute_and_attributegroup_references_001.ttcn @@ -0,0 +1,80 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.6.7, Verify referencing an attributeGroup in a complexType + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_070607_attribute_definitions_attribute_and_attributegroup_references_001 { + + import from schema_Pos_070607_attribute_definitions_attribute_and_attributegroup_references_001 language "XSD" all; + + template E1 m_msg := {bar:=5.0, foo:=omit, ding:="text"}; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_070607_attribute_definitions_attribute_and_attributegroup_references_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_070607_attribute_definitions_attribute_and_attributegroup_references_001.xml", { "Pos_070607_attribute_definitions_attribute_and_attributegroup_references_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_070607_attribute_definitions_attribute_and_attributegroup_references_001(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070607_attribute/Pos_070607_attribute__001/Pos_070607_attribute_definitions_attribute_and_attributegroup_references_001.xml b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070607_attribute/Pos_070607_attribute__001/Pos_070607_attribute_definitions_attribute_and_attributegroup_references_001.xml new file mode 100644 index 00000000..154aa533 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070607_attribute/Pos_070607_attribute__001/Pos_070607_attribute_definitions_attribute_and_attributegroup_references_001.xml @@ -0,0 +1,6 @@ + + +text + diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070607_attribute/Pos_070607_attribute__001/Pos_070607_attribute_definitions_attribute_and_attributegroup_references_001.xsd b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070607_attribute/Pos_070607_attribute__001/Pos_070607_attribute_definitions_attribute_and_attributegroup_references_001.xsd new file mode 100644 index 00000000..c9067939 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070607_attribute/Pos_070607_attribute__001/Pos_070607_attribute_definitions_attribute_and_attributegroup_references_001.xsd @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070607_attribute/Pos_070607_attribute__002/Pos_070607_attribute_definitions_attribute_and_attributegroup_references_002.ttcn b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070607_attribute/Pos_070607_attribute__002/Pos_070607_attribute_definitions_attribute_and_attributegroup_references_002.ttcn new file mode 100644 index 00000000..c09fa13c --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070607_attribute/Pos_070607_attribute__002/Pos_070607_attribute_definitions_attribute_and_attributegroup_references_002.ttcn @@ -0,0 +1,94 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.6.7, Verify mapping of a local attributes, attribute references and attribute group references without a target namespace + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_070607_attribute_definitions_attribute_and_attributegroup_references_002 { + + import from NoTargetNamespace language "XSD" all + with { + extension "File:../Pos_070607_attribute_definitions_attribute_and_attributegroup_references_002.xsd"; + }; + + template E1 m_msg := { + barInAgroup := "text", + barLocal := omit, + dingInAgroup := 1, + dingLocal := omit, + fooInAgroup := omit, + fooLocal := omit, + barGlobal := omit, + dingGlobal := omit, + fooGlobal := omit, + elem := "text" + } + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_070607_attribute_definitions_attribute_and_attributegroup_references_002() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_070607_attribute_definitions_attribute_and_attributegroup_references_002.xml", { "Pos_070607_attribute_definitions_attribute_and_attributegroup_references_002.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_070607_attribute_definitions_attribute_and_attributegroup_references_002(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070607_attribute/Pos_070607_attribute__002/Pos_070607_attribute_definitions_attribute_and_attributegroup_references_002.xml b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070607_attribute/Pos_070607_attribute__002/Pos_070607_attribute_definitions_attribute_and_attributegroup_references_002.xml new file mode 100644 index 00000000..5db9f7de --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070607_attribute/Pos_070607_attribute__002/Pos_070607_attribute_definitions_attribute_and_attributegroup_references_002.xml @@ -0,0 +1,6 @@ + + + text + \ No newline at end of file diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070607_attribute/Pos_070607_attribute__002/Pos_070607_attribute_definitions_attribute_and_attributegroup_references_002.xsd b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070607_attribute/Pos_070607_attribute__002/Pos_070607_attribute_definitions_attribute_and_attributegroup_references_002.xsd new file mode 100644 index 00000000..cb8fbf81 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070607_attribute/Pos_070607_attribute__002/Pos_070607_attribute_definitions_attribute_and_attributegroup_references_002.xsd @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070607_attribute/Pos_070607_attribute__003/Pos_070607_attribute_definitions_attribute_and_attributegroup_references_003.ttcn b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070607_attribute/Pos_070607_attribute__003/Pos_070607_attribute_definitions_attribute_and_attributegroup_references_003.ttcn new file mode 100644 index 00000000..1c04ea8e --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070607_attribute/Pos_070607_attribute__003/Pos_070607_attribute_definitions_attribute_and_attributegroup_references_003.ttcn @@ -0,0 +1,91 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.6.7, Verify mapping of a local attributes, attribute references and attribute group references with a target namespace + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_070607_attribute_definitions_attribute_and_attributegroup_references_003 { + + import from schema_Pos_070607_attribute_definitions_attribute_and_attributegroup_references_003 language "XSD" all; + + template E1 m_msg := { + barInAgroup := "text", + barLocal := "text1", + dingInAgroup := 1, + dingLocal := 2, + fooInAgroup := 1.0, + fooLocal := 2.0, + barGlobal := "text2", + dingGlobal := 1, + fooGlobal := 3.0, + elem := "text1234" + } + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_070607_attribute_definitions_attribute_and_attributegroup_references_003() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_070607_attribute_definitions_attribute_and_attributegroup_references_003.xml", { "Pos_070607_attribute_definitions_attribute_and_attributegroup_references_003.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_070607_attribute_definitions_attribute_and_attributegroup_references_003(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070607_attribute/Pos_070607_attribute__003/Pos_070607_attribute_definitions_attribute_and_attributegroup_references_003.xml b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070607_attribute/Pos_070607_attribute__003/Pos_070607_attribute_definitions_attribute_and_attributegroup_references_003.xml new file mode 100644 index 00000000..2ce39d5e --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070607_attribute/Pos_070607_attribute__003/Pos_070607_attribute_definitions_attribute_and_attributegroup_references_003.xml @@ -0,0 +1,6 @@ + + +text1234 + \ No newline at end of file diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070607_attribute/Pos_070607_attribute__003/Pos_070607_attribute_definitions_attribute_and_attributegroup_references_003.xsd b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070607_attribute/Pos_070607_attribute__003/Pos_070607_attribute_definitions_attribute_and_attributegroup_references_003.xsd new file mode 100644 index 00000000..fc692c22 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070607_attribute/Pos_070607_attribute__003/Pos_070607_attribute_definitions_attribute_and_attributegroup_references_003.xsd @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070608_mixed_content/Neg_070608_mixed_content_005/Neg_070608_mixed_content_001.ttcn b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070608_mixed_content/Neg_070608_mixed_content_005/Neg_070608_mixed_content_001.ttcn new file mode 100644 index 00000000..aa407aac --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070608_mixed_content/Neg_070608_mixed_content_005/Neg_070608_mixed_content_001.ttcn @@ -0,0 +1,95 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 9:7.6.8, Verify that an error is generated if there are too many items in the embed_values field + ** @verdict pass reject +***************************************************/ +// The following requirements are tested: +// In TTCN-3 values the number of components of the embed_values field (the number +// of strings to be inserted) shall not exceed the total number of components +// present in the enclosing enframing record, corresponding to the child element +// elements of the complexType with the mixed="true" attribute, i.e. ignoring fields +// corresponding to attribute elements, the embed_values field itself and the order +// field, if present (see clause 7.6.4), plus 1 (i.e. all components of enclosed +// record of-s). + +module Neg_070608_mixed_content_001 { + + import from schema_Neg_070608_mixed_content_001 language "XSD" all; + + template MyType m_msg := { + embed_values:= { "Arrival status. ", "Wait for further information." }, + order := {}, + a:= omit, + b:= omit + }; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Neg_070608_mixed_content_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Neg_070608_mixed_content_001.xml", { "Neg_070608_mixed_content_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Neg_070608_mixed_content_001(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070608_mixed_content/Neg_070608_mixed_content_005/Neg_070608_mixed_content_001.xml b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070608_mixed_content/Neg_070608_mixed_content_005/Neg_070608_mixed_content_001.xml new file mode 100644 index 00000000..608e2c52 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070608_mixed_content/Neg_070608_mixed_content_005/Neg_070608_mixed_content_001.xml @@ -0,0 +1,2 @@ + +Arrival status. Wait for further information. \ No newline at end of file diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070608_mixed_content/Neg_070608_mixed_content_005/Neg_070608_mixed_content_001.xsd b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070608_mixed_content/Neg_070608_mixed_content_005/Neg_070608_mixed_content_001.xsd new file mode 100644 index 00000000..daa21051 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070608_mixed_content/Neg_070608_mixed_content_005/Neg_070608_mixed_content_001.xsd @@ -0,0 +1,13 @@ + + + + + + + + + + + diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070608_mixed_content/Pos_070608_mixed_content_001/Pos_070608_mixed_content_001.ttcn b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070608_mixed_content/Pos_070608_mixed_content_001/Pos_070608_mixed_content_001.ttcn new file mode 100644 index 00000000..5cbd32a5 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070608_mixed_content/Pos_070608_mixed_content_001/Pos_070608_mixed_content_001.ttcn @@ -0,0 +1,96 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.6.8, Verify transformation of complex type with sequence constructor and mixed content type + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// When mixed content is allowed for a complex type or content, (i.e. the mixed +// attribute is set to "true") an additional record of XSD.String field, with +// the field name "embed_values" shall be generated and inserted as the first +// field of the outer enframing TTCN-3 record type generated for the sequence +// content. +// The embed_values field shall precede all other fields, resulted by the +// translation of the attributes and attribute and attributeGroup references of +// the given complexType. + +module Pos_070608_mixed_content_001 { + + import from schema_Pos_070608_mixed_content_001 language "XSD" all; + + template MyType m_msg := { + embed_values:= {"The ordered ", " has arrived ", "Wait for further information."}, + attrib := omit, + a:= "car", + b:= true + }; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_070608_mixed_content_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_070608_mixed_content_001.xml", { "Pos_070608_mixed_content_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_070608_mixed_content_001(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070608_mixed_content/Pos_070608_mixed_content_001/Pos_070608_mixed_content_001.xml b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070608_mixed_content/Pos_070608_mixed_content_001/Pos_070608_mixed_content_001.xml new file mode 100644 index 00000000..65320c0b --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070608_mixed_content/Pos_070608_mixed_content_001/Pos_070608_mixed_content_001.xml @@ -0,0 +1,2 @@ + +The ordered car has arrived trueWait for further information. \ No newline at end of file diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070608_mixed_content/Pos_070608_mixed_content_001/Pos_070608_mixed_content_001.xsd b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070608_mixed_content/Pos_070608_mixed_content_001/Pos_070608_mixed_content_001.xsd new file mode 100644 index 00000000..52d00d30 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070608_mixed_content/Pos_070608_mixed_content_001/Pos_070608_mixed_content_001.xsd @@ -0,0 +1,14 @@ + + + + + + + + + + + + diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070608_mixed_content/Pos_070608_mixed_content_002/Pos_070608_mixed_content_002.ttcn b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070608_mixed_content/Pos_070608_mixed_content_002/Pos_070608_mixed_content_002.ttcn new file mode 100644 index 00000000..e21ce9a5 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070608_mixed_content/Pos_070608_mixed_content_002/Pos_070608_mixed_content_002.ttcn @@ -0,0 +1,98 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.6.8, Verify transformation of omplex type definition with sequence constructor of multiple occurrences and mixed content type + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// When mixed content is allowed for a complex type or content, (i.e. the mixed +// attribute is set to "true") an additional record of XSD.String field, with +// the field name "embed_values" shall be generated and inserted as the first +// field of the outer enframing TTCN-3 record type generated for the sequence +// content. +// The embed_values field shall precede all other fields, resulted by the +// translation of the attributes and attribute and attributeGroup references of +// the given complexType. + +module Pos_070608_mixed_content_002 { + + import from schema_Pos_070608_mixed_content_002 language "XSD" all; + + template MyType m_msg := { + embed_values := { "The ordered", "has arrived", + "the ordered", "has arrived!", "Wait for further information."}, + sequence_list := { + { a:= "car", b:= false}, + { a:= "bicycle", b:= true} + } + }; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_070608_mixed_content_002() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_070608_mixed_content_002.xml", { "Pos_070608_mixed_content_002.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_070608_mixed_content_002(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070608_mixed_content/Pos_070608_mixed_content_002/Pos_070608_mixed_content_002.xml b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070608_mixed_content/Pos_070608_mixed_content_002/Pos_070608_mixed_content_002.xml new file mode 100644 index 00000000..03674dd9 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070608_mixed_content/Pos_070608_mixed_content_002/Pos_070608_mixed_content_002.xml @@ -0,0 +1,2 @@ + +The orderedcarhas arrivedfalsethe orderedbicyclehas arrived!trueWait for further information. \ No newline at end of file diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070608_mixed_content/Pos_070608_mixed_content_002/Pos_070608_mixed_content_002.xsd b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070608_mixed_content/Pos_070608_mixed_content_002/Pos_070608_mixed_content_002.xsd new file mode 100644 index 00000000..d6ef1b10 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070608_mixed_content/Pos_070608_mixed_content_002/Pos_070608_mixed_content_002.xsd @@ -0,0 +1,13 @@ + + + + + + + + + + + diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070608_mixed_content/Pos_070608_mixed_content_003/Pos_070608_mixed_content_003.ttcn b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070608_mixed_content/Pos_070608_mixed_content_003/Pos_070608_mixed_content_003.ttcn new file mode 100644 index 00000000..c814f32f --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070608_mixed_content/Pos_070608_mixed_content_003/Pos_070608_mixed_content_003.ttcn @@ -0,0 +1,98 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.6.8, Verify transformation of complex type definition with all constructor and mixed content type + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// When mixed content is allowed for a complex type or content, (i.e. the mixed +// attribute is set to "true") an additional record of XSD.String field, with +// the field name "embed_values" shall be generated and inserted as the first +// field of the outer enframing TTCN-3 record type generated for the all +// content. +// The embed_values field shall precede all other fields, resulted by the +// translation of the attributes and attribute and attributeGroup references of +// the given complexType and the order field, if any, generated for the all +// content models. + +module Pos_070608_mixed_content_003 { + + import from schema_Pos_070608_mixed_content_003 language "XSD" all; + + template MyType m_msg := { + {"Arrival status", "product name","Wait for further information."}, + {b,a}, + omit, + "car", + false + }; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_070608_mixed_content_003() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_070608_mixed_content_003.xml", { "Pos_070608_mixed_content_003.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_070608_mixed_content_003(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070608_mixed_content/Pos_070608_mixed_content_003/Pos_070608_mixed_content_003.xml b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070608_mixed_content/Pos_070608_mixed_content_003/Pos_070608_mixed_content_003.xml new file mode 100644 index 00000000..3bbe21c6 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070608_mixed_content/Pos_070608_mixed_content_003/Pos_070608_mixed_content_003.xml @@ -0,0 +1,2 @@ + +Arrival statusfalseproduct namecarWait for further information. \ No newline at end of file diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070608_mixed_content/Pos_070608_mixed_content_003/Pos_070608_mixed_content_003.xsd b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070608_mixed_content/Pos_070608_mixed_content_003/Pos_070608_mixed_content_003.xsd new file mode 100644 index 00000000..b6f09060 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070608_mixed_content/Pos_070608_mixed_content_003/Pos_070608_mixed_content_003.xsd @@ -0,0 +1,14 @@ + + + + + + + + + + + + diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070608_mixed_content/Pos_070608_mixed_content_004/Pos_070608_mixed_content_004.ttcn b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070608_mixed_content/Pos_070608_mixed_content_004/Pos_070608_mixed_content_004.ttcn new file mode 100644 index 00000000..000c601e --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070608_mixed_content/Pos_070608_mixed_content_004/Pos_070608_mixed_content_004.ttcn @@ -0,0 +1,98 @@ +/*************************************************** + ** @author STF 475, updated by STF 521 + ** @version 0.0.2 + ** @version 0.0.2 + ** @purpose 9:7.6.8, Verify transformation of complex type definition with all constructor, optional elements and mixed content type + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// When mixed content is allowed for a complex type or content, (i.e. the mixed +// attribute is set to "true") an additional record of XSD.String field, with +// the field name "embed_values" shall be generated and inserted as the first +// field of the outer enframing TTCN-3 record type generated for the all +// content. +// The embed_values field shall precede all other fields, resulted by the +// translation of the attributes and attribute and attributeGroup references of +// the given complexType and the order field, if any, generated for the all +// content models. + +module Pos_070608_mixed_content_004 { + + import from schema_Pos_070608_mixed_content_004 language "XSD" all; + + template MyType m_msg := { + embed_values:= { "Arrival status" }, + order := {}, + a:= omit, + b:= omit + }; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_070608_mixed_content_004() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_070608_mixed_content_004.xml", { "Pos_070608_mixed_content_004.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_070608_mixed_content_004(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070608_mixed_content/Pos_070608_mixed_content_004/Pos_070608_mixed_content_004.xml b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070608_mixed_content/Pos_070608_mixed_content_004/Pos_070608_mixed_content_004.xml new file mode 100644 index 00000000..1e411eec --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070608_mixed_content/Pos_070608_mixed_content_004/Pos_070608_mixed_content_004.xml @@ -0,0 +1,2 @@ + +Arrival status \ No newline at end of file diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070608_mixed_content/Pos_070608_mixed_content_004/Pos_070608_mixed_content_004.xsd b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070608_mixed_content/Pos_070608_mixed_content_004/Pos_070608_mixed_content_004.xsd new file mode 100644 index 00000000..9a3649aa --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070608_mixed_content/Pos_070608_mixed_content_004/Pos_070608_mixed_content_004.xsd @@ -0,0 +1,13 @@ + + + + + + + + + + + diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070608_mixed_content/Pos_070608_mixed_content_005/Pos_070608_mixed_content_005.ttcn b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070608_mixed_content/Pos_070608_mixed_content_005/Pos_070608_mixed_content_005.ttcn new file mode 100644 index 00000000..8a5ef131 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070608_mixed_content/Pos_070608_mixed_content_005/Pos_070608_mixed_content_005.ttcn @@ -0,0 +1,95 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.6.8, Verify transformation of complex type definition with all constructor, optional elements and mixed content type + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// The following requirements are tested: +// When mixed content is allowed for a complex type or content, (i.e. the mixed +// attribute is set to "true") an additional record of XSD.String field, with +// the field name "embed_values" shall be generated and inserted as the first +// field of the outer enframing TTCN-3 record type generated for the choice +// content. +// The embed_values field shall precede all other fields, resulted by the +// translation of the attributes and attribute and attributeGroup references of +// the given complexType. + +module Pos_070608_mixed_content_005 { + + import from schema_Pos_070608_mixed_content_005 language "XSD" all; + + template MyComplexElem_14 m_msg := { + embed_values:= {"Arrival status", "Wait for further information."}, + choice := { b:= false } + }; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_070608_mixed_content_005() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_070608_mixed_content_005.xml", { "Pos_070608_mixed_content_005.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_070608_mixed_content_005(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070608_mixed_content/Pos_070608_mixed_content_005/Pos_070608_mixed_content_005.xml b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070608_mixed_content/Pos_070608_mixed_content_005/Pos_070608_mixed_content_005.xml new file mode 100644 index 00000000..29466375 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070608_mixed_content/Pos_070608_mixed_content_005/Pos_070608_mixed_content_005.xml @@ -0,0 +1,2 @@ + +Arrival statusfalseWait for further information. \ No newline at end of file diff --git a/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070608_mixed_content/Pos_070608_mixed_content_005/Pos_070608_mixed_content_005.xsd b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070608_mixed_content/Pos_070608_mixed_content_005/Pos_070608_mixed_content_005.xsd new file mode 100644 index 00000000..9c339ce1 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0706_complextype_components/070608_mixed_content/Pos_070608_mixed_content_005/Pos_070608_mixed_content_005.xsd @@ -0,0 +1,13 @@ + + + + + + + + + + + diff --git a/ATS/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070701_the_any_element/Pos_070701_the_any_element_001/Pos_070701_the_any_element_001.ttcn b/ATS/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070701_the_any_element/Pos_070701_the_any_element_001/Pos_070701_the_any_element_001.ttcn new file mode 100644 index 00000000..80bb08e9 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070701_the_any_element/Pos_070701_the_any_element_001/Pos_070701_the_any_element_001.ttcn @@ -0,0 +1,93 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.7.1, Verify conversion of the any element without namespace attribute + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// The XSD any element shall be translated, like other elements, to a field of +// the enframing record type or field or union field (see clauses 7.6, 7.6.5 and +// 7.6.6). The type of this field shall be XSD.String and the name of the field +// shall be the result of applying clause 5.2.2 to "elem". Finally the +// "anyElement..." encoding instruction shall be attached, which shall also +// specify the namespace wildcards and/or list of namespaces which are allowed +// or restricted to qualify the given element, in accordance with the namespace +// attribute of the XSD any element, if present (see details in clause B.3.2). + +module Pos_070701_the_any_element_001 { + + import from schema_Pos_070701_the_any_element_001 language "XSD" all; + + template MyType m_msg := { + elem := "Hello world" + }; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_070701_the_any_element_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_070701_the_any_element_001.xml", { "Pos_070701_the_any_element_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_070701_the_any_element_001(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/ATS/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070701_the_any_element/Pos_070701_the_any_element_001/Pos_070701_the_any_element_001.xml b/ATS/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070701_the_any_element/Pos_070701_the_any_element_001/Pos_070701_the_any_element_001.xml new file mode 100644 index 00000000..cad9e67f --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070701_the_any_element/Pos_070701_the_any_element_001/Pos_070701_the_any_element_001.xml @@ -0,0 +1,2 @@ + +Hello world \ No newline at end of file diff --git a/ATS/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070701_the_any_element/Pos_070701_the_any_element_001/Pos_070701_the_any_element_001.xsd b/ATS/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070701_the_any_element/Pos_070701_the_any_element_001/Pos_070701_the_any_element_001.xsd new file mode 100644 index 00000000..a2d6d310 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070701_the_any_element/Pos_070701_the_any_element_001/Pos_070701_the_any_element_001.xsd @@ -0,0 +1,13 @@ + + + + + + + + + + + diff --git a/ATS/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070701_the_any_element/Pos_070701_the_any_element_002/Pos_070701_the_any_element_002.ttcn b/ATS/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070701_the_any_element/Pos_070701_the_any_element_002/Pos_070701_the_any_element_002.ttcn new file mode 100644 index 00000000..fd9a8d9d --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070701_the_any_element/Pos_070701_the_any_element_002/Pos_070701_the_any_element_002.ttcn @@ -0,0 +1,93 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.7.1, Verify conversion of the any element with ##any namespace + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// The XSD any element shall be translated, like other elements, to a field of +// the enframing record type or field or union field (see clauses 7.6, 7.6.5 and +// 7.6.6). The type of this field shall be XSD.String and the name of the field +// shall be the result of applying clause 5.2.2 to "elem". Finally the +// "anyElement..." encoding instruction shall be attached, which shall also +// specify the namespace wildcards and/or list of namespaces which are allowed +// or restricted to qualify the given element, in accordance with the namespace +// attribute of the XSD any element, if present (see details in clause B.3.2). + +module Pos_070701_the_any_element_002 { + + import from schema_Pos_070701_the_any_element_002 language "XSD" all; + + template MyType m_msg := { + elem := "Hello world" + }; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_070701_the_any_element_002() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_070701_the_any_element_002.xml", { "Pos_070701_the_any_element_002.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_070701_the_any_element_002(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/ATS/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070701_the_any_element/Pos_070701_the_any_element_002/Pos_070701_the_any_element_002.xml b/ATS/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070701_the_any_element/Pos_070701_the_any_element_002/Pos_070701_the_any_element_002.xml new file mode 100644 index 00000000..3aff46cf --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070701_the_any_element/Pos_070701_the_any_element_002/Pos_070701_the_any_element_002.xml @@ -0,0 +1,2 @@ + +Hello world \ No newline at end of file diff --git a/ATS/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070701_the_any_element/Pos_070701_the_any_element_002/Pos_070701_the_any_element_002.xsd b/ATS/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070701_the_any_element/Pos_070701_the_any_element_002/Pos_070701_the_any_element_002.xsd new file mode 100644 index 00000000..4c46de30 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070701_the_any_element/Pos_070701_the_any_element_002/Pos_070701_the_any_element_002.xsd @@ -0,0 +1,13 @@ + + + + + + + + + + + diff --git a/ATS/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070701_the_any_element/Pos_070701_the_any_element_003/Pos_070701_the_any_element_003.ttcn b/ATS/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070701_the_any_element/Pos_070701_the_any_element_003/Pos_070701_the_any_element_003.ttcn new file mode 100644 index 00000000..4a0a0a54 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070701_the_any_element/Pos_070701_the_any_element_003/Pos_070701_the_any_element_003.ttcn @@ -0,0 +1,93 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.7.1, Verify conversion of the any element with ##local namespace + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// The XSD any element shall be translated, like other elements, to a field of +// the enframing record type or field or union field (see clauses 7.6, 7.6.5 and +// 7.6.6). The type of this field shall be XSD.String and the name of the field +// shall be the result of applying clause 5.2.2 to "elem". Finally the +// "anyElement..." encoding instruction shall be attached, which shall also +// specify the namespace wildcards and/or list of namespaces which are allowed +// or restricted to qualify the given element, in accordance with the namespace +// attribute of the XSD any element, if present (see details in clause B.3.2). + +module Pos_070701_the_any_element_003 { + + import from schema_Pos_070701_the_any_element_003 language "XSD" all; + + template MyType m_msg := { + elem := "Hello world" + }; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_070701_the_any_element_003() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_070701_the_any_element_003.xml", { "Pos_070701_the_any_element_003.xsd", "Pos_070701_the_any_element_003_01_xsd.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_070701_the_any_element_003(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/ATS/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070701_the_any_element/Pos_070701_the_any_element_003/Pos_070701_the_any_element_003.xml b/ATS/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070701_the_any_element/Pos_070701_the_any_element_003/Pos_070701_the_any_element_003.xml new file mode 100644 index 00000000..ad928059 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070701_the_any_element/Pos_070701_the_any_element_003/Pos_070701_the_any_element_003.xml @@ -0,0 +1,2 @@ + +Hello world \ No newline at end of file diff --git a/ATS/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070701_the_any_element/Pos_070701_the_any_element_003/Pos_070701_the_any_element_003.xsd b/ATS/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070701_the_any_element/Pos_070701_the_any_element_003/Pos_070701_the_any_element_003.xsd new file mode 100644 index 00000000..a3bc1da1 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070701_the_any_element/Pos_070701_the_any_element_003/Pos_070701_the_any_element_003.xsd @@ -0,0 +1,12 @@ + + + + + + + + + + diff --git a/ATS/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070701_the_any_element/Pos_070701_the_any_element_003/Pos_070701_the_any_element_003_01_xsd.xsd b/ATS/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070701_the_any_element/Pos_070701_the_any_element_003/Pos_070701_the_any_element_003_01_xsd.xsd new file mode 100644 index 00000000..c3893173 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070701_the_any_element/Pos_070701_the_any_element_003/Pos_070701_the_any_element_003_01_xsd.xsd @@ -0,0 +1,4 @@ + + + + diff --git a/ATS/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070701_the_any_element/Pos_070701_the_any_element_004/Pos_070701_the_any_element_004.ttcn b/ATS/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070701_the_any_element/Pos_070701_the_any_element_004/Pos_070701_the_any_element_004.ttcn new file mode 100644 index 00000000..8d05ac6d --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070701_the_any_element/Pos_070701_the_any_element_004/Pos_070701_the_any_element_004.ttcn @@ -0,0 +1,93 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.7.1, Verify conversion of the any element with ##other namespace + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// The XSD any element shall be translated, like other elements, to a field of +// the enframing record type or field or union field (see clauses 7.6, 7.6.5 and +// 7.6.6). The type of this field shall be XSD.String and the name of the field +// shall be the result of applying clause 5.2.2 to "elem". Finally the +// "anyElement..." encoding instruction shall be attached, which shall also +// specify the namespace wildcards and/or list of namespaces which are allowed +// or restricted to qualify the given element, in accordance with the namespace +// attribute of the XSD any element, if present (see details in clause B.3.2). + +module Pos_070701_the_any_element_004 { + + import from schema_Pos_070701_the_any_element_004 language "XSD" all; + + template MyType m_msg := { + elem := "Hello world" + }; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_070701_the_any_element_004() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_070701_the_any_element_004.xml", { "Pos_070701_the_any_element_004.xsd", "Pos_070701_the_any_element_004_1.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_070701_the_any_element_004(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/ATS/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070701_the_any_element/Pos_070701_the_any_element_004/Pos_070701_the_any_element_004.xml b/ATS/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070701_the_any_element/Pos_070701_the_any_element_004/Pos_070701_the_any_element_004.xml new file mode 100644 index 00000000..5cec3747 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070701_the_any_element/Pos_070701_the_any_element_004/Pos_070701_the_any_element_004.xml @@ -0,0 +1,2 @@ + +Hello world \ No newline at end of file diff --git a/ATS/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070701_the_any_element/Pos_070701_the_any_element_004/Pos_070701_the_any_element_004.xsd b/ATS/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070701_the_any_element/Pos_070701_the_any_element_004/Pos_070701_the_any_element_004.xsd new file mode 100644 index 00000000..ac7ee329 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070701_the_any_element/Pos_070701_the_any_element_004/Pos_070701_the_any_element_004.xsd @@ -0,0 +1,12 @@ + + + + + + + + + + diff --git a/ATS/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070701_the_any_element/Pos_070701_the_any_element_004/Pos_070701_the_any_element_004_1.xsd b/ATS/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070701_the_any_element/Pos_070701_the_any_element_004/Pos_070701_the_any_element_004_1.xsd new file mode 100644 index 00000000..e2242cb1 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070701_the_any_element/Pos_070701_the_any_element_004/Pos_070701_the_any_element_004_1.xsd @@ -0,0 +1,6 @@ + + + + diff --git a/ATS/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070701_the_any_element/Pos_070701_the_any_element_005/Pos_070701_the_any_element_005.ttcn b/ATS/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070701_the_any_element/Pos_070701_the_any_element_005/Pos_070701_the_any_element_005.ttcn new file mode 100644 index 00000000..f0a75c31 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070701_the_any_element/Pos_070701_the_any_element_005/Pos_070701_the_any_element_005.ttcn @@ -0,0 +1,93 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.7.1, Verify conversion of the any element with ##targetNamespace namespace + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// The XSD any element shall be translated, like other elements, to a field of +// the enframing record type or field or union field (see clauses 7.6, 7.6.5 and +// 7.6.6). The type of this field shall be XSD.String and the name of the field +// shall be the result of applying clause 5.2.2 to "elem". Finally the +// "anyElement..." encoding instruction shall be attached, which shall also +// specify the namespace wildcards and/or list of namespaces which are allowed +// or restricted to qualify the given element, in accordance with the namespace +// attribute of the XSD any element, if present (see details in clause B.3.2). + +module Pos_070701_the_any_element_005 { + + import from schema_Pos_070701_the_any_element_005 language "XSD" all; + + template MyType m_msg := { + elem := "Hello world" + }; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_070701_the_any_element_005() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_070701_the_any_element_005.xml", { "Pos_070701_the_any_element_005.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_070701_the_any_element_005(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/ATS/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070701_the_any_element/Pos_070701_the_any_element_005/Pos_070701_the_any_element_005.xml b/ATS/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070701_the_any_element/Pos_070701_the_any_element_005/Pos_070701_the_any_element_005.xml new file mode 100644 index 00000000..f85f78ed --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070701_the_any_element/Pos_070701_the_any_element_005/Pos_070701_the_any_element_005.xml @@ -0,0 +1,2 @@ + +Hello world \ No newline at end of file diff --git a/ATS/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070701_the_any_element/Pos_070701_the_any_element_005/Pos_070701_the_any_element_005.xsd b/ATS/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070701_the_any_element/Pos_070701_the_any_element_005/Pos_070701_the_any_element_005.xsd new file mode 100644 index 00000000..d6b44eff --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070701_the_any_element/Pos_070701_the_any_element_005/Pos_070701_the_any_element_005.xsd @@ -0,0 +1,13 @@ + + + + + + + + + + + diff --git a/ATS/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070701_the_any_element/Pos_070701_the_any_element_006/Pos_070701_the_any_element_006.ttcn b/ATS/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070701_the_any_element/Pos_070701_the_any_element_006/Pos_070701_the_any_element_006.ttcn new file mode 100644 index 00000000..02fcccd4 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070701_the_any_element/Pos_070701_the_any_element_006/Pos_070701_the_any_element_006.ttcn @@ -0,0 +1,97 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.7.1, Verify conversion of the any element with URL as namespace into record of + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// The XSD any element shall be translated, like other elements, to a field of +// the enframing record type or field or union field (see clauses 7.6, 7.6.5 and +// 7.6.6). The type of this field shall be XSD.String and the name of the field +// shall be the result of applying clause 5.2.2 to "elem". Finally the +// "anyElement..." encoding instruction shall be attached, which shall also +// specify the namespace wildcards and/or list of namespaces which are allowed +// or restricted to qualify the given element, in accordance with the namespace +// attribute of the XSD any element, if present (see details in clause B.3.2). + +module Pos_070701_the_any_element_006 { + + import from schema_Pos_070701_the_any_element_006 language "XSD" all; + + template MyType m_msg := { + elem_list := { + "banana", + "orange", + "parsley" + } + }; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_070701_the_any_element_006() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_070701_the_any_element_006.xml", { "Pos_070701_the_any_element_006.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_070701_the_any_element_006(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/ATS/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070701_the_any_element/Pos_070701_the_any_element_006/Pos_070701_the_any_element_006.xml b/ATS/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070701_the_any_element/Pos_070701_the_any_element_006/Pos_070701_the_any_element_006.xml new file mode 100644 index 00000000..961847a7 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070701_the_any_element/Pos_070701_the_any_element_006/Pos_070701_the_any_element_006.xml @@ -0,0 +1,6 @@ + + +banana +orange +parsley + \ No newline at end of file diff --git a/ATS/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070701_the_any_element/Pos_070701_the_any_element_006/Pos_070701_the_any_element_006.xsd b/ATS/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070701_the_any_element/Pos_070701_the_any_element_006/Pos_070701_the_any_element_006.xsd new file mode 100644 index 00000000..c43be3c2 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070701_the_any_element/Pos_070701_the_any_element_006/Pos_070701_the_any_element_006.xsd @@ -0,0 +1,14 @@ + + + + + + + + + + + + diff --git a/ATS/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070701_the_any_element/Pos_070701_the_any_element_007/Pos_070701_the_any_element_007.ttcn b/ATS/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070701_the_any_element/Pos_070701_the_any_element_007/Pos_070701_the_any_element_007.ttcn new file mode 100644 index 00000000..a053887c --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070701_the_any_element/Pos_070701_the_any_element_007/Pos_070701_the_any_element_007.ttcn @@ -0,0 +1,63 @@ +/*************************************************** + ** @author STF 548 + ** @version 0.0.1 + ** @purpose 9:7.7.1, Verify conversion of the any element to TTCN-3 anytype + ** @verdict pass accept, ttcn3verdict:pass + ** @configuration any_to_anytype +***************************************************/ + +module Pos_070701_the_any_element_007 { + + import from schema_Pos_070701_the_any_element_007 language "XSD" all; + + template MyType m_msg := { elem := { Test := "abc" } }; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type port P message { + inout all; + } + type component C { + port P p; + } + + testcase TC_Pos_070701_the_any_element_007() runs on C system C { + var Raw v_rcv; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_070701_the_any_element_007(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/ATS/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070701_the_any_element/Pos_070701_the_any_element_007/Pos_070701_the_any_element_007.xml b/ATS/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070701_the_any_element/Pos_070701_the_any_element_007/Pos_070701_the_any_element_007.xml new file mode 100644 index 00000000..97af58f8 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070701_the_any_element/Pos_070701_the_any_element_007/Pos_070701_the_any_element_007.xml @@ -0,0 +1,4 @@ + + + abc + \ No newline at end of file diff --git a/ATS/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070701_the_any_element/Pos_070701_the_any_element_007/Pos_070701_the_any_element_007.xsd b/ATS/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070701_the_any_element/Pos_070701_the_any_element_007/Pos_070701_the_any_element_007.xsd new file mode 100644 index 00000000..9a2416f2 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070701_the_any_element/Pos_070701_the_any_element_007/Pos_070701_the_any_element_007.xsd @@ -0,0 +1,13 @@ + + + + + + + + + + + diff --git a/ATS/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070702_the_anyattribute_element/Pos_070702_the_anyattribute_element_001/Pos_070702_the_anyattribute_element_001.ttcn b/ATS/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070702_the_anyattribute_element/Pos_070702_the_anyattribute_element_001/Pos_070702_the_anyattribute_element_001.ttcn new file mode 100644 index 00000000..91834e63 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070702_the_anyattribute_element/Pos_070702_the_anyattribute_element_001/Pos_070702_the_anyattribute_element_001.ttcn @@ -0,0 +1,93 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.7.2, Verify conversion of anyAttribute element + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// The anyAttribute element shall be translated, like other attributes, to +// a field of the enframing record type or field or union field (see clauses +// 7.6, 7.6.5 and 7.6.6). The type of this field shall be record length +// (1..infinity) of XSD.String. + +module Pos_070702_the_anyattribute_element_001 { + + import from schema_Pos_070702_the_anyattribute_element_001 language "XSD" all; + + template MyType m_msg := { + attr := { + "schema:Pos_070702_the_anyattribute_element_001 bar=""bar""", + "schema:Pos_070702_the_anyattribute_element_001 foo=""foo""" + }, + base := "Hello world!" + }; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_070702_the_anyattribute_element_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_070702_the_anyattribute_element_001.xml", { "Pos_070702_the_anyattribute_element_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_070702_the_anyattribute_element_001(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/ATS/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070702_the_anyattribute_element/Pos_070702_the_anyattribute_element_001/Pos_070702_the_anyattribute_element_001.xml b/ATS/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070702_the_anyattribute_element/Pos_070702_the_anyattribute_element_001/Pos_070702_the_anyattribute_element_001.xml new file mode 100644 index 00000000..d7fe5074 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070702_the_anyattribute_element/Pos_070702_the_anyattribute_element_001/Pos_070702_the_anyattribute_element_001.xml @@ -0,0 +1,2 @@ + +Hello world! \ No newline at end of file diff --git a/ATS/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070702_the_anyattribute_element/Pos_070702_the_anyattribute_element_001/Pos_070702_the_anyattribute_element_001.xsd b/ATS/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070702_the_anyattribute_element/Pos_070702_the_anyattribute_element_001/Pos_070702_the_anyattribute_element_001.xsd new file mode 100644 index 00000000..677e051e --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070702_the_anyattribute_element/Pos_070702_the_anyattribute_element_001/Pos_070702_the_anyattribute_element_001.xsd @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + diff --git a/ATS/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070702_the_anyattribute_element/Pos_070702_the_anyattribute_element_002/Pos_070702_the_anyattribute_element_002.ttcn b/ATS/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070702_the_anyattribute_element/Pos_070702_the_anyattribute_element_002/Pos_070702_the_anyattribute_element_002.ttcn new file mode 100644 index 00000000..83f66075 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070702_the_anyattribute_element/Pos_070702_the_anyattribute_element_002/Pos_070702_the_anyattribute_element_002.ttcn @@ -0,0 +1,89 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.7.2, Verify that anyAttribute is converted into optional field + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// The anyAttribute element shall be translated, like other attributes, to +// a field of the enframing record type or field or union field (see clauses +// 7.6, 7.6.5 and 7.6.6). ... The field shall always be optional. + +module Pos_070702_the_anyattribute_element_002 { + + import from schema_Pos_070702_the_anyattribute_element_002 language "XSD" all; + + template MyType m_msg := { + foo := "foo", + attr := omit, + base := "Hello world!" + }; + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_070702_the_anyattribute_element_002() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_070702_the_anyattribute_element_002.xml", { "Pos_070702_the_anyattribute_element_002.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_070702_the_anyattribute_element_002(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/ATS/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070702_the_anyattribute_element/Pos_070702_the_anyattribute_element_002/Pos_070702_the_anyattribute_element_002.xml b/ATS/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070702_the_anyattribute_element/Pos_070702_the_anyattribute_element_002/Pos_070702_the_anyattribute_element_002.xml new file mode 100644 index 00000000..06faf33b --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070702_the_anyattribute_element/Pos_070702_the_anyattribute_element_002/Pos_070702_the_anyattribute_element_002.xml @@ -0,0 +1,2 @@ + +Hello world! \ No newline at end of file diff --git a/ATS/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070702_the_anyattribute_element/Pos_070702_the_anyattribute_element_002/Pos_070702_the_anyattribute_element_002.xsd b/ATS/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070702_the_anyattribute_element/Pos_070702_the_anyattribute_element_002/Pos_070702_the_anyattribute_element_002.xsd new file mode 100644 index 00000000..027fd300 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070702_the_anyattribute_element/Pos_070702_the_anyattribute_element_002/Pos_070702_the_anyattribute_element_002.xsd @@ -0,0 +1,15 @@ + + + + + + + + + + + + + diff --git a/ATS/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070702_the_anyattribute_element/Pos_070702_the_anyattribute_element_003/Pos_070702_the_anyattribute_element_003.ttcn b/ATS/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070702_the_anyattribute_element/Pos_070702_the_anyattribute_element_003/Pos_070702_the_anyattribute_element_003.ttcn new file mode 100644 index 00000000..5f4e6b60 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070702_the_anyattribute_element/Pos_070702_the_anyattribute_element_003/Pos_070702_the_anyattribute_element_003.ttcn @@ -0,0 +1,91 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.7.2, Verify that the naming rules apply to converted anyAttribute field + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// The name of the field shall be the result of applying clause 5.2.2 to "attr". + +module Pos_070702_the_anyattribute_element_003 { + + import from schema_Pos_070702_the_anyattribute_element_003 language "XSD" all; + + template MyType m_msg := { + attr := "test", + attr_1 := { + "schema:Pos_070702_the_anyattribute_element_003 bar=""bar""", + "schema:Pos_070702_the_anyattribute_element_003 foo=""foo""" + }, + base := "Hello world!" + }; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_070702_the_anyattribute_element_003() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_070702_the_anyattribute_element_003.xml", { "Pos_070702_the_anyattribute_element_003.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_070702_the_anyattribute_element_003(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/ATS/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070702_the_anyattribute_element/Pos_070702_the_anyattribute_element_003/Pos_070702_the_anyattribute_element_003.xml b/ATS/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070702_the_anyattribute_element/Pos_070702_the_anyattribute_element_003/Pos_070702_the_anyattribute_element_003.xml new file mode 100644 index 00000000..372975b1 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070702_the_anyattribute_element/Pos_070702_the_anyattribute_element_003/Pos_070702_the_anyattribute_element_003.xml @@ -0,0 +1,2 @@ + +Hello world! \ No newline at end of file diff --git a/ATS/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070702_the_anyattribute_element/Pos_070702_the_anyattribute_element_003/Pos_070702_the_anyattribute_element_003.xsd b/ATS/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070702_the_anyattribute_element/Pos_070702_the_anyattribute_element_003/Pos_070702_the_anyattribute_element_003.xsd new file mode 100644 index 00000000..1e865af2 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070702_the_anyattribute_element/Pos_070702_the_anyattribute_element_003/Pos_070702_the_anyattribute_element_003.xsd @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + diff --git a/ATS/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070702_the_anyattribute_element/Pos_070702_the_anyattribute_element_004/Pos_070702_the_anyattribute_element_004.ttcn b/ATS/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070702_the_anyattribute_element/Pos_070702_the_anyattribute_element_004/Pos_070702_the_anyattribute_element_004.ttcn new file mode 100644 index 00000000..b9cf2ec8 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070702_the_anyattribute_element/Pos_070702_the_anyattribute_element_004/Pos_070702_the_anyattribute_element_004.ttcn @@ -0,0 +1,96 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.7.2, Verify that conversion of anyAttribute present both in extended type and extension base + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// In the case an XSD component contains more than one anyAttribute elements +// (e.g. by a complex type extending an another complex type already containing +// an anyAttribute), only one new field shall be generated for all the +// anyAttribute elements (with the name resulted from applying clause 5.2.2 to +// "attr") but the namespace specifications of all anyAttribute components shall +// be considered in the "anyAttributes" encoding instruction (see below). + +module Pos_070702_the_anyattribute_element_004 { + + import from schema_Pos_070702_the_anyattribute_element_004 language "XSD" all; + + template MyType m_msg := { + ding := "ding", + attr := { + "schema:Pos_070702_the_anyattribute_element_004 bar=""bar""", + "schema:Pos_070702_the_anyattribute_element_004 foo=""foo""" + }, + field := "Hello world!" + }; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_070702_the_anyattribute_element_004() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_070702_the_anyattribute_element_004.xml", { "Pos_070702_the_anyattribute_element_004.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_070702_the_anyattribute_element_004(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/ATS/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070702_the_anyattribute_element/Pos_070702_the_anyattribute_element_004/Pos_070702_the_anyattribute_element_004.xml b/ATS/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070702_the_anyattribute_element/Pos_070702_the_anyattribute_element_004/Pos_070702_the_anyattribute_element_004.xml new file mode 100644 index 00000000..aed204bf --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070702_the_anyattribute_element/Pos_070702_the_anyattribute_element_004/Pos_070702_the_anyattribute_element_004.xml @@ -0,0 +1,4 @@ + + + Hello world! + \ No newline at end of file diff --git a/ATS/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070702_the_anyattribute_element/Pos_070702_the_anyattribute_element_004/Pos_070702_the_anyattribute_element_004.xsd b/ATS/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070702_the_anyattribute_element/Pos_070702_the_anyattribute_element_004/Pos_070702_the_anyattribute_element_004.xsd new file mode 100644 index 00000000..b7781552 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070702_the_anyattribute_element/Pos_070702_the_anyattribute_element_004/Pos_070702_the_anyattribute_element_004.xsd @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/ATS/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070702_the_anyattribute_element/Pos_070702_the_anyattribute_element_005/Pos_070702_the_anyattribute_element_005.ttcn b/ATS/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070702_the_anyattribute_element/Pos_070702_the_anyattribute_element_005/Pos_070702_the_anyattribute_element_005.ttcn new file mode 100644 index 00000000..1cfb8a1b --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070702_the_anyattribute_element/Pos_070702_the_anyattribute_element_005/Pos_070702_the_anyattribute_element_005.ttcn @@ -0,0 +1,87 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.7.2, Verify that converted anyAttribute field is in correct place + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// The field shall be inserted directly after the fields generated for the XSD +// attribute elements of the same component or, if the component does not +// contain an attribute component, in the place where the first field generated +// for an XSD attribute would be inserted (see clause 7.6.7). + +module Pos_070702_the_anyattribute_element_005 { + + import from schema_Pos_070702_the_anyattribute_element_005 language "XSD" all; + + template MyType m_msg := { "bar", { "schema:Pos_070702_the_anyattribute_element_005 foo=""foo""" }, "ding" } + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_070702_the_anyattribute_element_005() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_070702_the_anyattribute_element_005.xml", { "Pos_070702_the_anyattribute_element_005.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_070702_the_anyattribute_element_005(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/ATS/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070702_the_anyattribute_element/Pos_070702_the_anyattribute_element_005/Pos_070702_the_anyattribute_element_005.xml b/ATS/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070702_the_anyattribute_element/Pos_070702_the_anyattribute_element_005/Pos_070702_the_anyattribute_element_005.xml new file mode 100644 index 00000000..dc1f765b --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070702_the_anyattribute_element/Pos_070702_the_anyattribute_element_005/Pos_070702_the_anyattribute_element_005.xml @@ -0,0 +1,4 @@ + + + ding + \ No newline at end of file diff --git a/ATS/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070702_the_anyattribute_element/Pos_070702_the_anyattribute_element_005/Pos_070702_the_anyattribute_element_005.xsd b/ATS/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070702_the_anyattribute_element/Pos_070702_the_anyattribute_element_005/Pos_070702_the_anyattribute_element_005.xsd new file mode 100644 index 00000000..c179c633 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070702_the_anyattribute_element/Pos_070702_the_anyattribute_element_005/Pos_070702_the_anyattribute_element_005.xsd @@ -0,0 +1,15 @@ + + + + + + + + + + + + + diff --git a/ATS/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070702_the_anyattribute_element/Pos_070702_the_anyattribute_element_006/Pos_070702_the_anyattribute_element_006.ttcn b/ATS/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070702_the_anyattribute_element/Pos_070702_the_anyattribute_element_006/Pos_070702_the_anyattribute_element_006.ttcn new file mode 100644 index 00000000..e121a43e --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070702_the_anyattribute_element/Pos_070702_the_anyattribute_element_006/Pos_070702_the_anyattribute_element_006.ttcn @@ -0,0 +1,63 @@ +/*************************************************** + ** @author STF 548 + ** @version 0.0.1 + ** @purpose 9:7.7.2, Verify conversion of anyAttribute element to TTCN-3 anytype + ** @verdict pass accept, ttcn3verdict:pass + ** @configuration any_to_anytype +***************************************************/ + +module Pos_070702_the_anyattribute_element_006 { + + import from schema_Pos_070702_the_anyattribute_element_006 language "XSD" all; + + template MyType m_msg := { attr := { {Bar := "bar"}, { Foo := "foo" } }, base := "Hello world!" }; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type port P message { + inout all; + } + type component C { + port P p; + } + + testcase TC_Pos_070702_the_anyattribute_element_006() runs on C system C { + var Raw v_rcv; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_070702_the_anyattribute_element_006(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/ATS/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070702_the_anyattribute_element/Pos_070702_the_anyattribute_element_006/Pos_070702_the_anyattribute_element_006.xml b/ATS/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070702_the_anyattribute_element/Pos_070702_the_anyattribute_element_006/Pos_070702_the_anyattribute_element_006.xml new file mode 100644 index 00000000..9d88fc01 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070702_the_anyattribute_element/Pos_070702_the_anyattribute_element_006/Pos_070702_the_anyattribute_element_006.xml @@ -0,0 +1,2 @@ + +Hello world! \ No newline at end of file diff --git a/ATS/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070702_the_anyattribute_element/Pos_070702_the_anyattribute_element_006/Pos_070702_the_anyattribute_element_006.xsd b/ATS/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070702_the_anyattribute_element/Pos_070702_the_anyattribute_element_006/Pos_070702_the_anyattribute_element_006.xsd new file mode 100644 index 00000000..4a0db05a --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070702_the_anyattribute_element/Pos_070702_the_anyattribute_element_006/Pos_070702_the_anyattribute_element_006.xsd @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + diff --git a/ATS/xml/07_mapping_xsd_components/0708_annotation/Pos_0708_annotation_001/Pos_0708_annotation_001.ttcn b/ATS/xml/07_mapping_xsd_components/0708_annotation/Pos_0708_annotation_001/Pos_0708_annotation_001.ttcn new file mode 100644 index 00000000..fe15831d --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0708_annotation/Pos_0708_annotation_001/Pos_0708_annotation_001.ttcn @@ -0,0 +1,85 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.8, Verify that XSD annotation can be processed + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// +//////////////////////////////////////////////////////////////////////////////// + +module Pos_0708_annotation_001 { + + import from schema_Pos_0708_annotation_001 language "XSD" all; + + template MyType m_msg := "test"; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_0708_annotation_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_0708_annotation_001.xml", { "Pos_0708_annotation_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_0708_annotation_001(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/ATS/xml/07_mapping_xsd_components/0708_annotation/Pos_0708_annotation_001/Pos_0708_annotation_001.xml b/ATS/xml/07_mapping_xsd_components/0708_annotation/Pos_0708_annotation_001/Pos_0708_annotation_001.xml new file mode 100644 index 00000000..361fb068 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0708_annotation/Pos_0708_annotation_001/Pos_0708_annotation_001.xml @@ -0,0 +1,2 @@ + +test \ No newline at end of file diff --git a/ATS/xml/07_mapping_xsd_components/0708_annotation/Pos_0708_annotation_001/Pos_0708_annotation_001.xsd b/ATS/xml/07_mapping_xsd_components/0708_annotation/Pos_0708_annotation_001/Pos_0708_annotation_001.xsd new file mode 100644 index 00000000..fe4d6b6c --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0708_annotation/Pos_0708_annotation_001/Pos_0708_annotation_001.xsd @@ -0,0 +1,10 @@ + + + + Note + This is a helping note! + + + diff --git a/ATS/xml/07_mapping_xsd_components/0709_group_components/Pos_0709_group_components_001/Pos_0709_group_components_001.ttcn b/ATS/xml/07_mapping_xsd_components/0709_group_components/Pos_0709_group_components_001/Pos_0709_group_components_001.ttcn new file mode 100644 index 00000000..fb7ca67d --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0709_group_components/Pos_0709_group_components_001/Pos_0709_group_components_001.ttcn @@ -0,0 +1,94 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.9, Verify conversion of group definition with sequence compositor + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// [XSD group definition with a sequence compositor] shall be mapped to TTCN-3 +// type definitions the same way as their child components would be mapped +// inside a complexType with one difference: the "untagged" encoding instruction +// shall be attached to the generated TTCN-3 component, corresponding to the +// group element. + +module Pos_0709_group_components_001 { + + import from schema_Pos_0709_group_components_001 language "XSD" all; + + template ShipAndBill m_groupContent := { + shipTo := "New York", + billTo := "SuperMegaCorp Inc." + } + template MyType m_msg := { + shipAndBill_list := { m_groupContent } + }; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_0709_group_components_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_0709_group_components_001.xml", { "Pos_0709_group_components_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_0709_group_components_001(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/ATS/xml/07_mapping_xsd_components/0709_group_components/Pos_0709_group_components_001/Pos_0709_group_components_001.xml b/ATS/xml/07_mapping_xsd_components/0709_group_components/Pos_0709_group_components_001/Pos_0709_group_components_001.xml new file mode 100644 index 00000000..d42454a2 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0709_group_components/Pos_0709_group_components_001/Pos_0709_group_components_001.xml @@ -0,0 +1,5 @@ + + + New York + SuperMegaCorp Inc. + \ No newline at end of file diff --git a/ATS/xml/07_mapping_xsd_components/0709_group_components/Pos_0709_group_components_001/Pos_0709_group_components_001.xsd b/ATS/xml/07_mapping_xsd_components/0709_group_components/Pos_0709_group_components_001/Pos_0709_group_components_001.xsd new file mode 100644 index 00000000..c5a83788 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0709_group_components/Pos_0709_group_components_001/Pos_0709_group_components_001.xsd @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + diff --git a/ATS/xml/07_mapping_xsd_components/0709_group_components/Pos_0709_group_components_002/Pos_0709_group_components_002.ttcn b/ATS/xml/07_mapping_xsd_components/0709_group_components/Pos_0709_group_components_002/Pos_0709_group_components_002.ttcn new file mode 100644 index 00000000..eabab3bd --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0709_group_components/Pos_0709_group_components_002/Pos_0709_group_components_002.ttcn @@ -0,0 +1,91 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.9, Verify transformation of group definition with sequence compositor + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// [XSD group definition with a choice compositor] shall be mapped to TTCN-3 +// type definitions the same way as their child components would be mapped +// inside a complexType with one difference: the "untagged" encoding instruction +// shall be attached to the generated TTCN-3 component, corresponding to the +// group element. + +module Pos_0709_group_components_002 { + + import from schema_Pos_0709_group_components_002 language "XSD" all; + + template ShipOrBill m_shipOrBill := { shipTo := "New York" }; + template MyType m_msg := { + shipOrBill_list := { m_shipOrBill } + }; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_0709_group_components_002() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_0709_group_components_002.xml", { "Pos_0709_group_components_002.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_0709_group_components_002(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/ATS/xml/07_mapping_xsd_components/0709_group_components/Pos_0709_group_components_002/Pos_0709_group_components_002.xml b/ATS/xml/07_mapping_xsd_components/0709_group_components/Pos_0709_group_components_002/Pos_0709_group_components_002.xml new file mode 100644 index 00000000..f9bf7e50 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0709_group_components/Pos_0709_group_components_002/Pos_0709_group_components_002.xml @@ -0,0 +1,4 @@ + + + New York + \ No newline at end of file diff --git a/ATS/xml/07_mapping_xsd_components/0709_group_components/Pos_0709_group_components_002/Pos_0709_group_components_002.xsd b/ATS/xml/07_mapping_xsd_components/0709_group_components/Pos_0709_group_components_002/Pos_0709_group_components_002.xsd new file mode 100644 index 00000000..621b5508 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0709_group_components/Pos_0709_group_components_002/Pos_0709_group_components_002.xsd @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + diff --git a/ATS/xml/07_mapping_xsd_components/0709_group_components/Pos_0709_group_components_003/Pos_0709_group_components_003.ttcn b/ATS/xml/07_mapping_xsd_components/0709_group_components/Pos_0709_group_components_003/Pos_0709_group_components_003.ttcn new file mode 100644 index 00000000..1b409a83 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0709_group_components/Pos_0709_group_components_003/Pos_0709_group_components_003.ttcn @@ -0,0 +1,97 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.9, Verify conversion of group definition with all compositor + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// [XSD group definition with an all compositor] shall be mapped to TTCN-3 +// type definitions the same way as their child components would be mapped +// inside a complexType with one difference: the "untagged" encoding instruction +// shall be attached to the generated TTCN-3 component, corresponding to the +// group element. + +module Pos_0709_group_components_003 { + + import from schema_Pos_0709_group_components_003 language "XSD" all; + + template ShipAndBill m_groupContent := { + order := { billTo, shipTo }, + shipTo := "New York", + billTo := "SuperMegaCorp Inc." + } + template MyType m_msg := { + order := { billTo, shipTo }, + shipTo := m_groupContent.shipTo, + billTo := m_groupContent.billTo + }; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_0709_group_components_003() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_0709_group_components_003.xml", { "Pos_0709_group_components_003.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_0709_group_components_003(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/ATS/xml/07_mapping_xsd_components/0709_group_components/Pos_0709_group_components_003/Pos_0709_group_components_003.xml b/ATS/xml/07_mapping_xsd_components/0709_group_components/Pos_0709_group_components_003/Pos_0709_group_components_003.xml new file mode 100644 index 00000000..5d89c759 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0709_group_components/Pos_0709_group_components_003/Pos_0709_group_components_003.xml @@ -0,0 +1,5 @@ + + + SuperMegaCorp Inc. + New York + \ No newline at end of file diff --git a/ATS/xml/07_mapping_xsd_components/0709_group_components/Pos_0709_group_components_003/Pos_0709_group_components_003.xsd b/ATS/xml/07_mapping_xsd_components/0709_group_components/Pos_0709_group_components_003/Pos_0709_group_components_003.xsd new file mode 100644 index 00000000..9df0f59f --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0709_group_components/Pos_0709_group_components_003/Pos_0709_group_components_003.xsd @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + diff --git a/ATS/xml/07_mapping_xsd_components/0710_identity/Pos_0710_identity_constraint_definition_schema_components_001/Pos_0710_identity_constraint_definition_schema_components_001.ttcn b/ATS/xml/07_mapping_xsd_components/0710_identity/Pos_0710_identity_constraint_definition_schema_components_001/Pos_0710_identity_constraint_definition_schema_components_001.ttcn new file mode 100644 index 00000000..31acccb8 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0710_identity/Pos_0710_identity_constraint_definition_schema_components_001/Pos_0710_identity_constraint_definition_schema_components_001.ttcn @@ -0,0 +1,98 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.10, Verify that unique elements (and nested selector and field) are ignored during conversion + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// The XSD unique element enables to indicate that some XSD attribute or element +// values shall be unique within a certain scope. As TTCN-3 does not allow +// a similar relational value constraint, mapping of the unique, key and keyref +// elements are not supported by the present document, i.e. these elements shall +// be ignored in the translation process. + +module Pos_0710_identity_constraint_definition_schema_components_001 { + + import from schema_Pos_0710_identity_constraint_definition_schema_components_001 language "XSD" all; + + template MyType m_msg := { + unitInventory_list := { + { + item_list := { { 1004 }, { 1005 }, { 6028 }, { 7450 } }, + unitId := 24 + }, { + item_list := { { 1011 }, { 1042 }, { 5301 }, { 6001 } }, + unitId := 30 + } + } + }; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_0710_identity_constraint_definition_schema_components_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_0710_identity_constraint_definition_schema_components_001.xml", { "Pos_0710_identity_constraint_definition_schema_components_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_0710_identity_constraint_definition_schema_components_001(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/ATS/xml/07_mapping_xsd_components/0710_identity/Pos_0710_identity_constraint_definition_schema_components_001/Pos_0710_identity_constraint_definition_schema_components_001.xml b/ATS/xml/07_mapping_xsd_components/0710_identity/Pos_0710_identity_constraint_definition_schema_components_001/Pos_0710_identity_constraint_definition_schema_components_001.xml new file mode 100644 index 00000000..3b549626 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0710_identity/Pos_0710_identity_constraint_definition_schema_components_001/Pos_0710_identity_constraint_definition_schema_components_001.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ATS/xml/07_mapping_xsd_components/0710_identity/Pos_0710_identity_constraint_definition_schema_components_001/Pos_0710_identity_constraint_definition_schema_components_001.xsd b/ATS/xml/07_mapping_xsd_components/0710_identity/Pos_0710_identity_constraint_definition_schema_components_001/Pos_0710_identity_constraint_definition_schema_components_001.xsd new file mode 100644 index 00000000..9ddfefaf --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0710_identity/Pos_0710_identity_constraint_definition_schema_components_001/Pos_0710_identity_constraint_definition_schema_components_001.xsd @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ATS/xml/07_mapping_xsd_components/0710_identity/Pos_0710_identity_constraint_definition_schema_components_002/Pos_0710_identity_constraint_definition_schema_components_002.ttcn b/ATS/xml/07_mapping_xsd_components/0710_identity/Pos_0710_identity_constraint_definition_schema_components_002/Pos_0710_identity_constraint_definition_schema_components_002.ttcn new file mode 100644 index 00000000..9375c992 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0710_identity/Pos_0710_identity_constraint_definition_schema_components_002/Pos_0710_identity_constraint_definition_schema_components_002.ttcn @@ -0,0 +1,98 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.10, Verify that key elements (and nested selector and field) are ignored during conversion + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// The XSD unique element enables to indicate that some XSD attribute or element +// values shall be unique within a certain scope. As TTCN-3 does not allow +// a similar relational value constraint, mapping of the unique, key and keyref +// elements are not supported by the present document, i.e. these elements shall +// be ignored in the translation process. + +module Pos_0710_identity_constraint_definition_schema_components_002 { + + import from schema_Pos_0710_identity_constraint_definition_schema_components_002 language "XSD" all; + + template MyType m_msg := { + unitInventory_list := { + { + item_list := { { 1004 }, { 1005 }, { 6028 }, { 7450 } }, + unitId := 24 + }, { + item_list := { { 1011 }, { 1042 }, { 5301 }, { 6001 } }, + unitId := 24 + } + } + }; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_0710_identity_constraint_definition_schema_components_002() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_0710_identity_constraint_definition_schema_components_002.xml", { "Pos_0710_identity_constraint_definition_schema_components_002.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_0710_identity_constraint_definition_schema_components_002(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/ATS/xml/07_mapping_xsd_components/0710_identity/Pos_0710_identity_constraint_definition_schema_components_002/Pos_0710_identity_constraint_definition_schema_components_002.xml b/ATS/xml/07_mapping_xsd_components/0710_identity/Pos_0710_identity_constraint_definition_schema_components_002/Pos_0710_identity_constraint_definition_schema_components_002.xml new file mode 100644 index 00000000..81066567 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0710_identity/Pos_0710_identity_constraint_definition_schema_components_002/Pos_0710_identity_constraint_definition_schema_components_002.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ATS/xml/07_mapping_xsd_components/0710_identity/Pos_0710_identity_constraint_definition_schema_components_002/Pos_0710_identity_constraint_definition_schema_components_002.xsd b/ATS/xml/07_mapping_xsd_components/0710_identity/Pos_0710_identity_constraint_definition_schema_components_002/Pos_0710_identity_constraint_definition_schema_components_002.xsd new file mode 100644 index 00000000..4bd20d52 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0710_identity/Pos_0710_identity_constraint_definition_schema_components_002/Pos_0710_identity_constraint_definition_schema_components_002.xsd @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ATS/xml/07_mapping_xsd_components/0710_identity/Pos_0710_identity_constraint_definition_schema_components_003/Pos_0710_identity_constraint_definition_schema_components_003.ttcn b/ATS/xml/07_mapping_xsd_components/0710_identity/Pos_0710_identity_constraint_definition_schema_components_003/Pos_0710_identity_constraint_definition_schema_components_003.ttcn new file mode 100644 index 00000000..a57a1c6d --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0710_identity/Pos_0710_identity_constraint_definition_schema_components_003/Pos_0710_identity_constraint_definition_schema_components_003.ttcn @@ -0,0 +1,107 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.10, Verify that keyRef elements (and nested selector and field) are ignored during conversion + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// The XSD unique element enables to indicate that some XSD attribute or element +// values shall be unique within a certain scope. As TTCN-3 does not allow +// a similar relational value constraint, mapping of the unique, key and keyref +// elements are not supported by the present document, i.e. these elements shall +// be ignored in the translation process. + +module Pos_0710_identity_constraint_definition_schema_components_003 { + + import from schema_Pos_0710_identity_constraint_definition_schema_components_003 language "XSD" all; + + template MyType m_msg := { + unitInventory_list := { + { + item_list := { { 1004 }, { 1005 }, { 6028 }, { 7450 } }, + unitRef := 24 + }, { + item_list := { { 1011 }, { 1042 }, { 5301 }, { 6001 } }, + unitRef := 30 + } + }, + unitDesc_list := { + { + unitId := 24, + desc := "crucial unit" + }, { + unitId := 30, + desc := "very important unit" + } + } + }; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_0710_identity_constraint_definition_schema_components_003() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_0710_identity_constraint_definition_schema_components_003.xml", { "Pos_0710_identity_constraint_definition_schema_components_003.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_0710_identity_constraint_definition_schema_components_003(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/ATS/xml/07_mapping_xsd_components/0710_identity/Pos_0710_identity_constraint_definition_schema_components_003/Pos_0710_identity_constraint_definition_schema_components_003.xml b/ATS/xml/07_mapping_xsd_components/0710_identity/Pos_0710_identity_constraint_definition_schema_components_003/Pos_0710_identity_constraint_definition_schema_components_003.xml new file mode 100644 index 00000000..4a796471 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0710_identity/Pos_0710_identity_constraint_definition_schema_components_003/Pos_0710_identity_constraint_definition_schema_components_003.xml @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + crucial unit + + + very important unit + + \ No newline at end of file diff --git a/ATS/xml/07_mapping_xsd_components/0710_identity/Pos_0710_identity_constraint_definition_schema_components_003/Pos_0710_identity_constraint_definition_schema_components_003.xsd b/ATS/xml/07_mapping_xsd_components/0710_identity/Pos_0710_identity_constraint_definition_schema_components_003/Pos_0710_identity_constraint_definition_schema_components_003.xsd new file mode 100644 index 00000000..d13f34e9 --- /dev/null +++ b/ATS/xml/07_mapping_xsd_components/0710_identity/Pos_0710_identity_constraint_definition_schema_components_003/Pos_0710_identity_constraint_definition_schema_components_003.xsd @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ATS/xml/08_substitutions/0801_element_substitution/080101_head_elements_of_substitution_groups/Pos_080101_head_elements_of_substitution_groups_001/Pos_080101_head_elements_of_substitution_groups_001.ttcn b/ATS/xml/08_substitutions/0801_element_substitution/080101_head_elements_of_substitution_groups/Pos_080101_head_elements_of_substitution_groups_001/Pos_080101_head_elements_of_substitution_groups_001.ttcn new file mode 100644 index 00000000..2a438aa7 --- /dev/null +++ b/ATS/xml/08_substitutions/0801_element_substitution/080101_head_elements_of_substitution_groups/Pos_080101_head_elements_of_substitution_groups_001/Pos_080101_head_elements_of_substitution_groups_001.ttcn @@ -0,0 +1,88 @@ +/*************************************************** + ** @author STF 475, updated by STF 521 + ** @version 0.0.1 + ** @purpose 9:8.1.1, Generic substitution group example + ** @verdict pass accept, ttcn3verdict:pass + ** @configuration elem_subst + ***************************************************/ +module Pos_080101_head_elements_of_substitution_groups_001 { + + import from schema_Pos_080101_head_elements_of_substitution_groups_001 language "XSD" all; + + template Ize m_msg := { + head_list := { + { head := "anything" }, + { member1 := "any thing" }, + { member2 := something }, + { member3 := { bar:= 5, foo := omit, base := "anything else" } } + } + } + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_080101_head_elements_of_substitution_groups_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_080101_head_elements_of_substitution_groups_001.xml", { "Pos_080101_head_elements_of_substitution_groups_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_080101_head_elements_of_substitution_groups_001(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/08_substitutions/0801_element_substitution/080101_head_elements_of_substitution_groups/Pos_080101_head_elements_of_substitution_groups_001/Pos_080101_head_elements_of_substitution_groups_001.xml b/ATS/xml/08_substitutions/0801_element_substitution/080101_head_elements_of_substitution_groups/Pos_080101_head_elements_of_substitution_groups_001/Pos_080101_head_elements_of_substitution_groups_001.xml new file mode 100644 index 00000000..5cb8fc38 --- /dev/null +++ b/ATS/xml/08_substitutions/0801_element_substitution/080101_head_elements_of_substitution_groups/Pos_080101_head_elements_of_substitution_groups_001/Pos_080101_head_elements_of_substitution_groups_001.xml @@ -0,0 +1,4 @@ + + anything +any thing something anything else + \ No newline at end of file diff --git a/ATS/xml/08_substitutions/0801_element_substitution/080101_head_elements_of_substitution_groups/Pos_080101_head_elements_of_substitution_groups_001/Pos_080101_head_elements_of_substitution_groups_001.xsd b/ATS/xml/08_substitutions/0801_element_substitution/080101_head_elements_of_substitution_groups/Pos_080101_head_elements_of_substitution_groups_001/Pos_080101_head_elements_of_substitution_groups_001.xsd new file mode 100644 index 00000000..a4a41fb1 --- /dev/null +++ b/ATS/xml/08_substitutions/0801_element_substitution/080101_head_elements_of_substitution_groups/Pos_080101_head_elements_of_substitution_groups_001/Pos_080101_head_elements_of_substitution_groups_001.xsd @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ATS/xml/08_substitutions/0801_element_substitution/080101_head_elements_of_substitution_groups/Pos_080101_head_elements_of_substitution_groups_002/Pos_080101_head_elements_of_substitution_groups_002.ttcn b/ATS/xml/08_substitutions/0801_element_substitution/080101_head_elements_of_substitution_groups/Pos_080101_head_elements_of_substitution_groups_002/Pos_080101_head_elements_of_substitution_groups_002.ttcn new file mode 100644 index 00000000..9f9f5743 --- /dev/null +++ b/ATS/xml/08_substitutions/0801_element_substitution/080101_head_elements_of_substitution_groups/Pos_080101_head_elements_of_substitution_groups_002/Pos_080101_head_elements_of_substitution_groups_002.ttcn @@ -0,0 +1,84 @@ +/*************************************************** + ** @author STF 475, updated by STF 521 + ** @version 0.0.2 + ** @purpose 9:8.1.1, Show effect of the block and abstract attributes on element substitution + ** @verdict pass accept, ttcn3verdict:pass + ** @configuration elem_subst + ***************************************************/ + +// The test is focused on encoding only. Decoding cannot be used as abstract and block attributes prevent it. + +module Pos_080101_head_elements_of_substitution_groups_002 { + + import from schema_Pos_080101_head_elements_of_substitution_groups_002 language "XSD" all; + + template Ize m_msg := { + head_list := { + { head := "anything" }, + { member1 := "any thing" }, + { member2 := something }, + { member3 := { bar:= 5, foo := omit, base := "anything else" } } + } + } + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_080101_head_elements_of_substitution_groups_002() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.receive(Raw:?) -> value v_rcv { + log("XML message ", v_rcv); + // TODO: in order to enable the check, a validation tool update needed so that it can work without schemas + //if (matchFile(v_rcv, "Pos_080101_head_elements_of_substitution_groups_002.xml", {}, v_matchError)) { + setverdict(pass, "Decoded value matches reference XML"); + //} else { + // setverdict(fail, v_matchError); + //} + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_080101_head_elements_of_substitution_groups_002(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/08_substitutions/0801_element_substitution/080101_head_elements_of_substitution_groups/Pos_080101_head_elements_of_substitution_groups_002/Pos_080101_head_elements_of_substitution_groups_002.xml b/ATS/xml/08_substitutions/0801_element_substitution/080101_head_elements_of_substitution_groups/Pos_080101_head_elements_of_substitution_groups_002/Pos_080101_head_elements_of_substitution_groups_002.xml new file mode 100644 index 00000000..f5ee406a --- /dev/null +++ b/ATS/xml/08_substitutions/0801_element_substitution/080101_head_elements_of_substitution_groups/Pos_080101_head_elements_of_substitution_groups_002/Pos_080101_head_elements_of_substitution_groups_002.xml @@ -0,0 +1,10 @@ + + + +anything + any thing + +something + akarmi +anything else + \ No newline at end of file diff --git a/ATS/xml/08_substitutions/0801_element_substitution/080101_head_elements_of_substitution_groups/Pos_080101_head_elements_of_substitution_groups_002/Pos_080101_head_elements_of_substitution_groups_002.xsd b/ATS/xml/08_substitutions/0801_element_substitution/080101_head_elements_of_substitution_groups/Pos_080101_head_elements_of_substitution_groups_002/Pos_080101_head_elements_of_substitution_groups_002.xsd new file mode 100644 index 00000000..3bc55b9a --- /dev/null +++ b/ATS/xml/08_substitutions/0801_element_substitution/080101_head_elements_of_substitution_groups/Pos_080101_head_elements_of_substitution_groups_002/Pos_080101_head_elements_of_substitution_groups_002.xsd @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ATS/xml/08_substitutions/0801_element_substitution/080101_head_elements_of_substitution_groups/Pos_080101_head_elements_of_substitution_groups_003/Pos_080101_head_elements_of_substitution_groups_003.ttcn b/ATS/xml/08_substitutions/0801_element_substitution/080101_head_elements_of_substitution_groups/Pos_080101_head_elements_of_substitution_groups_003/Pos_080101_head_elements_of_substitution_groups_003.ttcn new file mode 100644 index 00000000..04986ffa --- /dev/null +++ b/ATS/xml/08_substitutions/0801_element_substitution/080101_head_elements_of_substitution_groups/Pos_080101_head_elements_of_substitution_groups_003/Pos_080101_head_elements_of_substitution_groups_003.ttcn @@ -0,0 +1,83 @@ +/*************************************************** + ** @author STF 475, updated by STF 521 + ** @version 0.0.2 + ** @purpose 9:8.1.1, Blocking substitution + ** @verdict pass accept, ttcn3verdict:pass + ** @configuration elem_subst + ***************************************************/ + +// The test is focused on encoding only. Decoding cannot be used as abstract and block attributes prevent it. + +module Pos_080101_head_elements_of_substitution_groups_003 { + + import from schema_Pos_080101_head_elements_of_substitution_groups_003 language "XSD" all; + + template Ize m_msg := { + headNoSubstition_list:= { + { headNoSubstition := "anything" }, + { groupMember1 := "any thing" }, + { groupMember2 := "something" } + } + } + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_080101_head_elements_of_substitution_groups_003() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.receive(Raw:?) -> value v_rcv { + log("XML message ", v_rcv); + // TODO: in order to enable the check, a validation tool update needed so that it can work without schemas + //if (matchFile(v_rcv, "Pos_080101_head_elements_of_substitution_groups_003.xml", {}, v_matchError)) { + setverdict(pass, "Decoded value matches reference XML"); + //} else { + // setverdict(fail, v_matchError); + //} + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_080101_head_elements_of_substitution_groups_003(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/08_substitutions/0801_element_substitution/080101_head_elements_of_substitution_groups/Pos_080101_head_elements_of_substitution_groups_003/Pos_080101_head_elements_of_substitution_groups_003.xml b/ATS/xml/08_substitutions/0801_element_substitution/080101_head_elements_of_substitution_groups/Pos_080101_head_elements_of_substitution_groups_003/Pos_080101_head_elements_of_substitution_groups_003.xml new file mode 100644 index 00000000..1f0404a9 --- /dev/null +++ b/ATS/xml/08_substitutions/0801_element_substitution/080101_head_elements_of_substitution_groups/Pos_080101_head_elements_of_substitution_groups_003/Pos_080101_head_elements_of_substitution_groups_003.xml @@ -0,0 +1,8 @@ + + + anything + +any thing + +something + \ No newline at end of file diff --git a/ATS/xml/08_substitutions/0801_element_substitution/080101_head_elements_of_substitution_groups/Pos_080101_head_elements_of_substitution_groups_003/Pos_080101_head_elements_of_substitution_groups_003.xsd b/ATS/xml/08_substitutions/0801_element_substitution/080101_head_elements_of_substitution_groups/Pos_080101_head_elements_of_substitution_groups_003/Pos_080101_head_elements_of_substitution_groups_003.xsd new file mode 100644 index 00000000..9daba42f --- /dev/null +++ b/ATS/xml/08_substitutions/0801_element_substitution/080101_head_elements_of_substitution_groups/Pos_080101_head_elements_of_substitution_groups_003/Pos_080101_head_elements_of_substitution_groups_003.xsd @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + diff --git a/ATS/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_001/Neg_A_ttcn3_module_xsd_001.ttcn b/ATS/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_001/Neg_A_ttcn3_module_xsd_001.ttcn new file mode 100644 index 00000000..3c296dfa --- /dev/null +++ b/ATS/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_001/Neg_A_ttcn3_module_xsd_001.ttcn @@ -0,0 +1,33 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:A, Ensure the builtin XSD type AnySimpleType allows only valid values + ** @verdict pass reject + ***************************************************/ +module Neg_A_ttcn3_module_xsd_001 { + + import from XSD all; + + template AnySimpleType m_msg := 1; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type component C { + } + + testcase TC_Neg_A_ttcn3_module_xsd_001() runs on C system C { + // set a verdict before since valueof should throw error + setverdict(fail, "Should not be able to create an invalid value of the given built-in XSD type", m_msg); + log(valueof(m_msg)); // if testcase is compiling, valueof is expected to throw an testcase error since the value is invalid + } + + control { + execute(TC_Neg_A_ttcn3_module_xsd_001(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_002/Neg_A_ttcn3_module_xsd_002.ttcn b/ATS/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_002/Neg_A_ttcn3_module_xsd_002.ttcn new file mode 100644 index 00000000..6a32832e --- /dev/null +++ b/ATS/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_002/Neg_A_ttcn3_module_xsd_002.ttcn @@ -0,0 +1,33 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:A, Ensure the builtin XSD type AnyType allows only valid values + ** @verdict pass reject + ***************************************************/ +module Neg_A_ttcn3_module_xsd_002 { + + import from XSD all; + + template AnyType m_msg := {{2},{1}} + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type component C { + } + + testcase TC_Neg_A_ttcn3_module_xsd_002() runs on C system C { + // set a verdict before since valueof should throw error + setverdict(fail, "Should not be able to create an invalid value of the given built-in XSD type", m_msg); + log(valueof(m_msg)); // if testcase is compiling, valueof is expected to throw an testcase error since the value is invalid + } + + control { + execute(TC_Neg_A_ttcn3_module_xsd_002(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_003/Neg_A_ttcn3_module_xsd_003.ttcn b/ATS/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_003/Neg_A_ttcn3_module_xsd_003.ttcn new file mode 100644 index 00000000..bac6c4e7 --- /dev/null +++ b/ATS/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_003/Neg_A_ttcn3_module_xsd_003.ttcn @@ -0,0 +1,33 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:A, Ensure the builtin XSD type String allows only valid values + ** @verdict pass reject + ***************************************************/ +module Neg_A_ttcn3_module_xsd_003 { + + import from XSD all; + + template String m_msg := 1; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type component C { + } + + testcase TC_Neg_A_ttcn3_module_xsd_003() runs on C system C { + // set a verdict before since valueof should throw error + setverdict(fail, "Should not be able to create an invalid value of the given built-in XSD type", m_msg); + log(valueof(m_msg)); // if testcase is compiling, valueof is expected to throw an testcase error since the value is invalid + } + + control { + execute(TC_Neg_A_ttcn3_module_xsd_003(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_004/Neg_A_ttcn3_module_xsd_004.ttcn b/ATS/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_004/Neg_A_ttcn3_module_xsd_004.ttcn new file mode 100644 index 00000000..86a623c1 --- /dev/null +++ b/ATS/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_004/Neg_A_ttcn3_module_xsd_004.ttcn @@ -0,0 +1,33 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:A, Ensure the builtin XSD type NormalizedString allows only valid values + ** @verdict pass reject + ***************************************************/ +module Neg_A_ttcn3_module_xsd_004 { + + import from XSD all; + + template NormalizedString m_msg := 123; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type component C { + } + + testcase TC_Neg_A_ttcn3_module_xsd_004() runs on C system C { + // set a verdict before since valueof should throw error + setverdict(fail, "Should not be able to create an invalid value of the given built-in XSD type", m_msg); + log(valueof(m_msg)); // if testcase is compiling, valueof is expected to throw an testcase error since the value is invalid + } + + control { + execute(TC_Neg_A_ttcn3_module_xsd_004(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_005/Neg_A_ttcn3_module_xsd_005.ttcn b/ATS/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_005/Neg_A_ttcn3_module_xsd_005.ttcn new file mode 100644 index 00000000..dc2bb180 --- /dev/null +++ b/ATS/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_005/Neg_A_ttcn3_module_xsd_005.ttcn @@ -0,0 +1,33 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:A, Ensure the builtin XSD type Token allows only valid values + ** @verdict pass reject + ***************************************************/ +module Neg_A_ttcn3_module_xsd_005 { + + import from XSD all; + + template Token m_msg := 123; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type component C { + } + + testcase TC_Neg_A_ttcn3_module_xsd_005() runs on C system C { + // set a verdict before since valueof should throw error + setverdict(fail, "Should not be able to create an invalid value of the given built-in XSD type", m_msg); + log(valueof(m_msg)); // if testcase is compiling, valueof is expected to throw an testcase error since the value is invalid + } + + control { + execute(TC_Neg_A_ttcn3_module_xsd_005(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_006/Neg_A_ttcn3_module_xsd_006.ttcn b/ATS/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_006/Neg_A_ttcn3_module_xsd_006.ttcn new file mode 100644 index 00000000..de1aaae0 --- /dev/null +++ b/ATS/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_006/Neg_A_ttcn3_module_xsd_006.ttcn @@ -0,0 +1,33 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:A, Ensure the builtin XSD type Name allows only valid values + ** @verdict pass reject + ***************************************************/ +module Neg_A_ttcn3_module_xsd_006 { + + import from XSD all; + + template Name m_msg := "string with whitespace"; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type component C { + } + + testcase TC_Neg_A_ttcn3_module_xsd_006() runs on C system C { + // set a verdict before since valueof should throw error + setverdict(fail, "Should not be able to create an invalid value of the given built-in XSD type", m_msg); + log(valueof(m_msg)); // if testcase is compiling, valueof is expected to throw an testcase error since the value is invalid + } + + control { + execute(TC_Neg_A_ttcn3_module_xsd_006(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_007/Neg_A_ttcn3_module_xsd_007.ttcn b/ATS/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_007/Neg_A_ttcn3_module_xsd_007.ttcn new file mode 100644 index 00000000..d250ad93 --- /dev/null +++ b/ATS/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_007/Neg_A_ttcn3_module_xsd_007.ttcn @@ -0,0 +1,33 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:A, Ensure the builtin XSD type NMTOKEN allows only valid values + ** @verdict pass reject + ***************************************************/ +module Neg_A_ttcn3_module_xsd_007 { + + import from XSD all; + + template NMTOKEN m_msg := "string with whitespace"; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type component C { + } + + testcase TC_Neg_A_ttcn3_module_xsd_007() runs on C system C { + // set a verdict before since valueof should throw error + setverdict(fail, "Should not be able to create an invalid value of the given built-in XSD type", m_msg); + log(valueof(m_msg)); // if testcase is compiling, valueof is expected to throw an testcase error since the value is invalid + } + + control { + execute(TC_Neg_A_ttcn3_module_xsd_007(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_008/Neg_A_ttcn3_module_xsd_008.ttcn b/ATS/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_008/Neg_A_ttcn3_module_xsd_008.ttcn new file mode 100644 index 00000000..a42c30f3 --- /dev/null +++ b/ATS/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_008/Neg_A_ttcn3_module_xsd_008.ttcn @@ -0,0 +1,33 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:A, Ensure the builtin XSD type NCName allows only valid values + ** @verdict pass reject + ***************************************************/ +module Neg_A_ttcn3_module_xsd_008 { + + import from XSD all; + + template NCName m_msg := "string with whitespace"; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type component C { + } + + testcase TC_Neg_A_ttcn3_module_xsd_008() runs on C system C { + // set a verdict before since valueof should throw error + setverdict(fail, "Should not be able to create an invalid value of the given built-in XSD type", m_msg); + log(valueof(m_msg)); // if testcase is compiling, valueof is expected to throw an testcase error since the value is invalid + } + + control { + execute(TC_Neg_A_ttcn3_module_xsd_008(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_009/Neg_A_ttcn3_module_xsd_009.ttcn b/ATS/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_009/Neg_A_ttcn3_module_xsd_009.ttcn new file mode 100644 index 00000000..13d796bd --- /dev/null +++ b/ATS/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_009/Neg_A_ttcn3_module_xsd_009.ttcn @@ -0,0 +1,33 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:A, Ensure the builtin XSD type ID allows only valid values + ** @verdict pass reject + ***************************************************/ +module Neg_A_ttcn3_module_xsd_009 { + + import from XSD all; + + template ID m_msg := "12 34"; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type component C { + } + + testcase TC_Neg_A_ttcn3_module_xsd_009() runs on C system C { + // set a verdict before since valueof should throw error + setverdict(fail, "Should not be able to create an invalid value of the given built-in XSD type", m_msg); + log(valueof(m_msg)); // if testcase is compiling, valueof is expected to throw an testcase error since the value is invalid + } + + control { + execute(TC_Neg_A_ttcn3_module_xsd_009(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_010/Neg_A_ttcn3_module_xsd_010.ttcn b/ATS/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_010/Neg_A_ttcn3_module_xsd_010.ttcn new file mode 100644 index 00000000..40a30ce2 --- /dev/null +++ b/ATS/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_010/Neg_A_ttcn3_module_xsd_010.ttcn @@ -0,0 +1,33 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:A, Ensure the builtin XSD type IDREF allows only valid values + ** @verdict pass reject + ***************************************************/ +module Neg_A_ttcn3_module_xsd_010 { + + import from XSD all; + + template IDREF m_msg := "ID Reference"; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type component C { + } + + testcase TC_Neg_A_ttcn3_module_xsd_010() runs on C system C { + // set a verdict before since valueof should throw error + setverdict(fail, "Should not be able to create an invalid value of the given built-in XSD type", m_msg); + log(valueof(m_msg)); // if testcase is compiling, valueof is expected to throw an testcase error since the value is invalid + } + + control { + execute(TC_Neg_A_ttcn3_module_xsd_010(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_011/Neg_A_ttcn3_module_xsd_011.ttcn b/ATS/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_011/Neg_A_ttcn3_module_xsd_011.ttcn new file mode 100644 index 00000000..21c92113 --- /dev/null +++ b/ATS/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_011/Neg_A_ttcn3_module_xsd_011.ttcn @@ -0,0 +1,33 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:A, Ensure the builtin XSD type ENTITY allows only valid values + ** @verdict pass reject + ***************************************************/ +module Neg_A_ttcn3_module_xsd_011 { + + import from XSD all; + + template ENTITY m_msg := "My Entity"; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type component C { + } + + testcase TC_Neg_A_ttcn3_module_xsd_011() runs on C system C { + // set a verdict before since valueof should throw error + setverdict(fail, "Should not be able to create an invalid value of the given built-in XSD type", m_msg); + log(valueof(m_msg)); // if testcase is compiling, valueof is expected to throw an testcase error since the value is invalid + } + + control { + execute(TC_Neg_A_ttcn3_module_xsd_011(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_012/Neg_A_ttcn3_module_xsd_012.ttcn b/ATS/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_012/Neg_A_ttcn3_module_xsd_012.ttcn new file mode 100644 index 00000000..de867333 --- /dev/null +++ b/ATS/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_012/Neg_A_ttcn3_module_xsd_012.ttcn @@ -0,0 +1,33 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:A, Ensure the builtin XSD type HexBinary allows only valid values + ** @verdict pass reject + ***************************************************/ +module Neg_A_ttcn3_module_xsd_012 { + + import from XSD all; + + template HexBinary m_msg := 11; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type component C { + } + + testcase TC_Neg_A_ttcn3_module_xsd_012() runs on C system C { + // set a verdict before since valueof should throw error + setverdict(fail, "Should not be able to create an invalid value of the given built-in XSD type", m_msg); + log(valueof(m_msg)); // if testcase is compiling, valueof is expected to throw an testcase error since the value is invalid + } + + control { + execute(TC_Neg_A_ttcn3_module_xsd_012(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_013/Neg_A_ttcn3_module_xsd_013.ttcn b/ATS/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_013/Neg_A_ttcn3_module_xsd_013.ttcn new file mode 100644 index 00000000..a7957717 --- /dev/null +++ b/ATS/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_013/Neg_A_ttcn3_module_xsd_013.ttcn @@ -0,0 +1,33 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:A, Ensure the builtin XSD type Base64Binary allows only valid values + ** @verdict pass reject + ***************************************************/ +module Neg_A_ttcn3_module_xsd_013 { + + import from XSD all; + + template Base64Binary m_msg := 123; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type component C { + } + + testcase TC_Neg_A_ttcn3_module_xsd_013() runs on C system C { + // set a verdict before since valueof should throw error + setverdict(fail, "Should not be able to create an invalid value of the given built-in XSD type", m_msg); + log(valueof(m_msg)); // if testcase is compiling, valueof is expected to throw an testcase error since the value is invalid + } + + control { + execute(TC_Neg_A_ttcn3_module_xsd_013(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_014/Neg_A_ttcn3_module_xsd_014.ttcn b/ATS/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_014/Neg_A_ttcn3_module_xsd_014.ttcn new file mode 100644 index 00000000..5cd48d85 --- /dev/null +++ b/ATS/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_014/Neg_A_ttcn3_module_xsd_014.ttcn @@ -0,0 +1,33 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:A, Ensure the builtin XSD type AnyURI allows only valid values + ** @verdict pass reject + ***************************************************/ +module Neg_A_ttcn3_module_xsd_014 { + + import from XSD all; + + template AnyURI m_msg := 123; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type component C { + } + + testcase TC_Neg_A_ttcn3_module_xsd_014() runs on C system C { + // set a verdict before since valueof should throw error + setverdict(fail, "Should not be able to create an invalid value of the given built-in XSD type", m_msg); + log(valueof(m_msg)); // if testcase is compiling, valueof is expected to throw an testcase error since the value is invalid + } + + control { + execute(TC_Neg_A_ttcn3_module_xsd_014(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_015/Neg_A_ttcn3_module_xsd_015.ttcn b/ATS/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_015/Neg_A_ttcn3_module_xsd_015.ttcn new file mode 100644 index 00000000..e35753bd --- /dev/null +++ b/ATS/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_015/Neg_A_ttcn3_module_xsd_015.ttcn @@ -0,0 +1,33 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:A, Ensure the builtin XSD type Language allows only valid values + ** @verdict pass reject + ***************************************************/ +module Neg_A_ttcn3_module_xsd_015 { + + import from XSD all; + + template Language m_msg := "TTCN 3"; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type component C { + } + + testcase TC_Neg_A_ttcn3_module_xsd_015() runs on C system C { + // set a verdict before since valueof should throw error + setverdict(fail, "Should not be able to create an invalid value of the given built-in XSD type", m_msg); + log(valueof(m_msg)); // if testcase is compiling, valueof is expected to throw an testcase error since the value is invalid + } + + control { + execute(TC_Neg_A_ttcn3_module_xsd_015(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_016/Neg_A_ttcn3_module_xsd_016.ttcn b/ATS/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_016/Neg_A_ttcn3_module_xsd_016.ttcn new file mode 100644 index 00000000..5e0b1dda --- /dev/null +++ b/ATS/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_016/Neg_A_ttcn3_module_xsd_016.ttcn @@ -0,0 +1,33 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:A, Ensure the builtin XSD type Integer allows only valid values + ** @verdict pass reject + ***************************************************/ +module Neg_A_ttcn3_module_xsd_016 { + + import from XSD all; + + template Integer m_msg := 1.0; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type component C { + } + + testcase TC_Neg_A_ttcn3_module_xsd_016() runs on C system C { + // set a verdict before since valueof should throw error + setverdict(fail, "Should not be able to create an invalid value of the given built-in XSD type", m_msg); + log(valueof(m_msg)); // if testcase is compiling, valueof is expected to throw an testcase error since the value is invalid + } + + control { + execute(TC_Neg_A_ttcn3_module_xsd_016(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_017/Neg_A_ttcn3_module_xsd_017.ttcn b/ATS/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_017/Neg_A_ttcn3_module_xsd_017.ttcn new file mode 100644 index 00000000..1bdf545b --- /dev/null +++ b/ATS/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_017/Neg_A_ttcn3_module_xsd_017.ttcn @@ -0,0 +1,33 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:A, Ensure the builtin XSD type PositiveInteger allows only valid values + ** @verdict pass reject + ***************************************************/ +module Neg_A_ttcn3_module_xsd_017 { + + import from XSD all; + + template PositiveInteger m_msg := -12; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type component C { + } + + testcase TC_Neg_A_ttcn3_module_xsd_017() runs on C system C { + // set a verdict before since valueof should throw error + setverdict(fail, "Should not be able to create an invalid value of the given built-in XSD type", m_msg); + log(valueof(m_msg)); // if testcase is compiling, valueof is expected to throw an testcase error since the value is invalid + } + + control { + execute(TC_Neg_A_ttcn3_module_xsd_017(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_018/Neg_A_ttcn3_module_xsd_018.ttcn b/ATS/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_018/Neg_A_ttcn3_module_xsd_018.ttcn new file mode 100644 index 00000000..309e710b --- /dev/null +++ b/ATS/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_018/Neg_A_ttcn3_module_xsd_018.ttcn @@ -0,0 +1,33 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:A, Ensure the builtin XSD type NonPositiveInteger allows only valid values + ** @verdict pass reject + ***************************************************/ +module Neg_A_ttcn3_module_xsd_018 { + + import from XSD all; + + template NonPositiveInteger m_msg := 3; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type component C { + } + + testcase TC_Neg_A_ttcn3_module_xsd_018() runs on C system C { + // set a verdict before since valueof should throw error + setverdict(fail, "Should not be able to create an invalid value of the given built-in XSD type", m_msg); + log(valueof(m_msg)); // if testcase is compiling, valueof is expected to throw an testcase error since the value is invalid + } + + control { + execute(TC_Neg_A_ttcn3_module_xsd_018(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_019/Neg_A_ttcn3_module_xsd_019.ttcn b/ATS/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_019/Neg_A_ttcn3_module_xsd_019.ttcn new file mode 100644 index 00000000..f93626e5 --- /dev/null +++ b/ATS/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_019/Neg_A_ttcn3_module_xsd_019.ttcn @@ -0,0 +1,33 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:A, Ensure the builtin XSD type NegativeInteger allows only valid values + ** @verdict pass reject + ***************************************************/ +module Neg_A_ttcn3_module_xsd_019 { + + import from XSD all; + + template NegativeInteger m_msg := 3; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type component C { + } + + testcase TC_Neg_A_ttcn3_module_xsd_019() runs on C system C { + // set a verdict before since valueof should throw error + setverdict(fail, "Should not be able to create an invalid value of the given built-in XSD type", m_msg); + log(valueof(m_msg)); // if testcase is compiling, valueof is expected to throw an testcase error since the value is invalid + } + + control { + execute(TC_Neg_A_ttcn3_module_xsd_019(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_020/Neg_A_ttcn3_module_xsd_020.ttcn b/ATS/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_020/Neg_A_ttcn3_module_xsd_020.ttcn new file mode 100644 index 00000000..c491dfe2 --- /dev/null +++ b/ATS/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_020/Neg_A_ttcn3_module_xsd_020.ttcn @@ -0,0 +1,33 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:A, Ensure the builtin XSD type NonNegativeInteger allows only valid values + ** @verdict pass reject + ***************************************************/ +module Neg_A_ttcn3_module_xsd_020 { + + import from XSD all; + + template NonNegativeInteger m_msg := -1; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type component C { + } + + testcase TC_Neg_A_ttcn3_module_xsd_020() runs on C system C { + // set a verdict before since valueof should throw error + setverdict(fail, "Should not be able to create an invalid value of the given built-in XSD type", m_msg); + log(valueof(m_msg)); // if testcase is compiling, valueof is expected to throw an testcase error since the value is invalid + } + + control { + execute(TC_Neg_A_ttcn3_module_xsd_020(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_021/Neg_A_ttcn3_module_xsd_021.ttcn b/ATS/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_021/Neg_A_ttcn3_module_xsd_021.ttcn new file mode 100644 index 00000000..25f7e6eb --- /dev/null +++ b/ATS/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_021/Neg_A_ttcn3_module_xsd_021.ttcn @@ -0,0 +1,33 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:A, Ensure the builtin XSD type Long allows only valid values + ** @verdict pass reject + ***************************************************/ +module Neg_A_ttcn3_module_xsd_021 { + + import from XSD all; + + template Long m_msg := "1"; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type component C { + } + + testcase TC_Neg_A_ttcn3_module_xsd_021() runs on C system C { + // set a verdict before since valueof should throw error + setverdict(fail, "Should not be able to create an invalid value of the given built-in XSD type", m_msg); + log(valueof(m_msg)); // if testcase is compiling, valueof is expected to throw an testcase error since the value is invalid + } + + control { + execute(TC_Neg_A_ttcn3_module_xsd_021(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_022/Neg_A_ttcn3_module_xsd_022.ttcn b/ATS/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_022/Neg_A_ttcn3_module_xsd_022.ttcn new file mode 100644 index 00000000..38665a53 --- /dev/null +++ b/ATS/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_022/Neg_A_ttcn3_module_xsd_022.ttcn @@ -0,0 +1,33 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:A, Ensure the builtin XSD type UnsignedLong allows only valid values + ** @verdict pass reject + ***************************************************/ +module Neg_A_ttcn3_module_xsd_022 { + + import from XSD all; + + template UnsignedLong m_msg := -3; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type component C { + } + + testcase TC_Neg_A_ttcn3_module_xsd_022() runs on C system C { + // set a verdict before since valueof should throw error + setverdict(fail, "Should not be able to create an invalid value of the given built-in XSD type", m_msg); + log(valueof(m_msg)); // if testcase is compiling, valueof is expected to throw an testcase error since the value is invalid + } + + control { + execute(TC_Neg_A_ttcn3_module_xsd_022(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_023/Neg_A_ttcn3_module_xsd_023.ttcn b/ATS/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_023/Neg_A_ttcn3_module_xsd_023.ttcn new file mode 100644 index 00000000..0fab13f4 --- /dev/null +++ b/ATS/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_023/Neg_A_ttcn3_module_xsd_023.ttcn @@ -0,0 +1,33 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:A, Ensure the builtin XSD type Int allows only valid values + ** @verdict pass reject + ***************************************************/ +module Neg_A_ttcn3_module_xsd_023 { + + import from XSD all; + + template Int m_msg := 3.3; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type component C { + } + + testcase TC_Neg_A_ttcn3_module_xsd_023() runs on C system C { + // set a verdict before since valueof should throw error + setverdict(fail, "Should not be able to create an invalid value of the given built-in XSD type", m_msg); + log(valueof(m_msg)); // if testcase is compiling, valueof is expected to throw an testcase error since the value is invalid + } + + control { + execute(TC_Neg_A_ttcn3_module_xsd_023(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_024/Neg_A_ttcn3_module_xsd_024.ttcn b/ATS/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_024/Neg_A_ttcn3_module_xsd_024.ttcn new file mode 100644 index 00000000..9ae011cc --- /dev/null +++ b/ATS/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_024/Neg_A_ttcn3_module_xsd_024.ttcn @@ -0,0 +1,33 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:A, Ensure the builtin XSD type UnsignedInt allows only valid values + ** @verdict pass reject + ***************************************************/ +module Neg_A_ttcn3_module_xsd_024 { + + import from XSD all; + + template UnsignedInt m_msg := -3; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type component C { + } + + testcase TC_Neg_A_ttcn3_module_xsd_024() runs on C system C { + // set a verdict before since valueof should throw error + setverdict(fail, "Should not be able to create an invalid value of the given built-in XSD type", m_msg); + log(valueof(m_msg)); // if testcase is compiling, valueof is expected to throw an testcase error since the value is invalid + } + + control { + execute(TC_Neg_A_ttcn3_module_xsd_024(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_025/Neg_A_ttcn3_module_xsd_025.ttcn b/ATS/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_025/Neg_A_ttcn3_module_xsd_025.ttcn new file mode 100644 index 00000000..2dea143b --- /dev/null +++ b/ATS/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_025/Neg_A_ttcn3_module_xsd_025.ttcn @@ -0,0 +1,33 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:A, Ensure the builtin XSD type Short allows only valid values + ** @verdict pass reject + ***************************************************/ +module Neg_A_ttcn3_module_xsd_025 { + + import from XSD all; + + template Short m_msg := 32770; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type component C { + } + + testcase TC_Neg_A_ttcn3_module_xsd_025() runs on C system C { + // set a verdict before since valueof should throw error + setverdict(fail, "Should not be able to create an invalid value of the given built-in XSD type", m_msg); + log(valueof(m_msg)); // if testcase is compiling, valueof is expected to throw an testcase error since the value is invalid + } + + control { + execute(TC_Neg_A_ttcn3_module_xsd_025(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_026/Neg_A_ttcn3_module_xsd_026.ttcn b/ATS/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_026/Neg_A_ttcn3_module_xsd_026.ttcn new file mode 100644 index 00000000..53da4c90 --- /dev/null +++ b/ATS/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_026/Neg_A_ttcn3_module_xsd_026.ttcn @@ -0,0 +1,33 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:A, Ensure the builtin XSD type UnsignedShort allows only valid values + ** @verdict pass reject + ***************************************************/ +module Neg_A_ttcn3_module_xsd_026 { + + import from XSD all; + + template UnsignedShort m_msg := -2; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type component C { + } + + testcase TC_Neg_A_ttcn3_module_xsd_026() runs on C system C { + // set a verdict before since valueof should throw error + setverdict(fail, "Should not be able to create an invalid value of the given built-in XSD type", m_msg); + log(valueof(m_msg)); // if testcase is compiling, valueof is expected to throw an testcase error since the value is invalid + } + + control { + execute(TC_Neg_A_ttcn3_module_xsd_026(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_027/Neg_A_ttcn3_module_xsd_027.ttcn b/ATS/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_027/Neg_A_ttcn3_module_xsd_027.ttcn new file mode 100644 index 00000000..d332bf83 --- /dev/null +++ b/ATS/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_027/Neg_A_ttcn3_module_xsd_027.ttcn @@ -0,0 +1,33 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:A, Ensure the builtin XSD type Byte allows only valid values + ** @verdict pass reject + ***************************************************/ +module Neg_A_ttcn3_module_xsd_027 { + + import from XSD all; + + template Byte m_msg := 130; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type component C { + } + + testcase TC_Neg_A_ttcn3_module_xsd_027() runs on C system C { + // set a verdict before since valueof should throw error + setverdict(fail, "Should not be able to create an invalid value of the given built-in XSD type", m_msg); + log(valueof(m_msg)); // if testcase is compiling, valueof is expected to throw an testcase error since the value is invalid + } + + control { + execute(TC_Neg_A_ttcn3_module_xsd_027(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_028/Neg_A_ttcn3_module_xsd_028.ttcn b/ATS/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_028/Neg_A_ttcn3_module_xsd_028.ttcn new file mode 100644 index 00000000..7972df9d --- /dev/null +++ b/ATS/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_028/Neg_A_ttcn3_module_xsd_028.ttcn @@ -0,0 +1,33 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:A, Ensure the builtin XSD type UnsignedByte allows only valid values + ** @verdict pass reject + ***************************************************/ +module Neg_A_ttcn3_module_xsd_028 { + + import from XSD all; + + template UnsignedByte m_msg := -1; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type component C { + } + + testcase TC_Neg_A_ttcn3_module_xsd_028() runs on C system C { + // set a verdict before since valueof should throw error + setverdict(fail, "Should not be able to create an invalid value of the given built-in XSD type", m_msg); + log(valueof(m_msg)); // if testcase is compiling, valueof is expected to throw an testcase error since the value is invalid + } + + control { + execute(TC_Neg_A_ttcn3_module_xsd_028(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_029/Neg_A_ttcn3_module_xsd_029.ttcn b/ATS/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_029/Neg_A_ttcn3_module_xsd_029.ttcn new file mode 100644 index 00000000..bef9680b --- /dev/null +++ b/ATS/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_029/Neg_A_ttcn3_module_xsd_029.ttcn @@ -0,0 +1,33 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:A, Ensure the builtin XSD type Decimal allows only valid values + ** @verdict pass reject + ***************************************************/ +module Neg_A_ttcn3_module_xsd_029 { + + import from XSD all; + + template Decimal m_msg := 1; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type component C { + } + + testcase TC_Neg_A_ttcn3_module_xsd_029() runs on C system C { + // set a verdict before since valueof should throw error + setverdict(fail, "Should not be able to create an invalid value of the given built-in XSD type", m_msg); + log(valueof(m_msg)); // if testcase is compiling, valueof is expected to throw an testcase error since the value is invalid + } + + control { + execute(TC_Neg_A_ttcn3_module_xsd_029(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_030/Neg_A_ttcn3_module_xsd_030.ttcn b/ATS/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_030/Neg_A_ttcn3_module_xsd_030.ttcn new file mode 100644 index 00000000..7d5e370a --- /dev/null +++ b/ATS/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_030/Neg_A_ttcn3_module_xsd_030.ttcn @@ -0,0 +1,33 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:A, Ensure the builtin XSD type Float allows only valid values + ** @verdict pass reject + ***************************************************/ +module Neg_A_ttcn3_module_xsd_030 { + + import from XSD all; + + template Float m_msg := 1; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type component C { + } + + testcase TC_Neg_A_ttcn3_module_xsd_030() runs on C system C { + // set a verdict before since valueof should throw error + setverdict(fail, "Should not be able to create an invalid value of the given built-in XSD type", m_msg); + log(valueof(m_msg)); // if testcase is compiling, valueof is expected to throw an testcase error since the value is invalid + } + + control { + execute(TC_Neg_A_ttcn3_module_xsd_030(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_031/Neg_A_ttcn3_module_xsd_031.ttcn b/ATS/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_031/Neg_A_ttcn3_module_xsd_031.ttcn new file mode 100644 index 00000000..7550a75f --- /dev/null +++ b/ATS/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_031/Neg_A_ttcn3_module_xsd_031.ttcn @@ -0,0 +1,33 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:A, Ensure the builtin XSD type Double allows only valid values + ** @verdict pass reject + ***************************************************/ +module Neg_A_ttcn3_module_xsd_031 { + + import from XSD all; + + template Double m_msg := 1; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type component C { + } + + testcase TC_Neg_A_ttcn3_module_xsd_031() runs on C system C { + // set a verdict before since valueof should throw error + setverdict(fail, "Should not be able to create an invalid value of the given built-in XSD type", m_msg); + log(valueof(m_msg)); // if testcase is compiling, valueof is expected to throw an testcase error since the value is invalid + } + + control { + execute(TC_Neg_A_ttcn3_module_xsd_031(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_032/Neg_A_ttcn3_module_xsd_032.ttcn b/ATS/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_032/Neg_A_ttcn3_module_xsd_032.ttcn new file mode 100644 index 00000000..876406b8 --- /dev/null +++ b/ATS/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_032/Neg_A_ttcn3_module_xsd_032.ttcn @@ -0,0 +1,33 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:A, Ensure the builtin XSD type Duration allows only valid values + ** @verdict pass reject + ***************************************************/ +module Neg_A_ttcn3_module_xsd_032 { + + import from XSD all; + + template Duration m_msg := "30 min"; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type component C { + } + + testcase TC_Neg_A_ttcn3_module_xsd_032() runs on C system C { + // set a verdict before since valueof should throw error + setverdict(fail, "Should not be able to create an invalid value of the given built-in XSD type", m_msg); + log(valueof(m_msg)); // if testcase is compiling, valueof is expected to throw an testcase error since the value is invalid + } + + control { + execute(TC_Neg_A_ttcn3_module_xsd_032(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_033/Neg_A_ttcn3_module_xsd_033.ttcn b/ATS/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_033/Neg_A_ttcn3_module_xsd_033.ttcn new file mode 100644 index 00000000..1dc25a53 --- /dev/null +++ b/ATS/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_033/Neg_A_ttcn3_module_xsd_033.ttcn @@ -0,0 +1,33 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:A, Ensure the builtin XSD type DateTime allows only valid values + ** @verdict pass reject + ***************************************************/ +module Neg_A_ttcn3_module_xsd_033 { + + import from XSD all; + + template DateTime m_msg := "14-12-12-12:00:00"; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type component C { + } + + testcase TC_Neg_A_ttcn3_module_xsd_033() runs on C system C { + // set a verdict before since valueof should throw error + setverdict(fail, "Should not be able to create an invalid value of the given built-in XSD type", m_msg); + log(valueof(m_msg)); // if testcase is compiling, valueof is expected to throw an testcase error since the value is invalid + } + + control { + execute(TC_Neg_A_ttcn3_module_xsd_033(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_034/Neg_A_ttcn3_module_xsd_034.ttcn b/ATS/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_034/Neg_A_ttcn3_module_xsd_034.ttcn new file mode 100644 index 00000000..3c58c6d3 --- /dev/null +++ b/ATS/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_034/Neg_A_ttcn3_module_xsd_034.ttcn @@ -0,0 +1,33 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:A, Ensure the builtin XSD type Time allows only valid values + ** @verdict pass reject + ***************************************************/ +module Neg_A_ttcn3_module_xsd_034 { + + import from XSD all; + + template Time m_msg := "66:66"; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type component C { + } + + testcase TC_Neg_A_ttcn3_module_xsd_034() runs on C system C { + // set a verdict before since valueof should throw error + setverdict(fail, "Should not be able to create an invalid value of the given built-in XSD type", m_msg); + log(valueof(m_msg)); // if testcase is compiling, valueof is expected to throw an testcase error since the value is invalid + } + + control { + execute(TC_Neg_A_ttcn3_module_xsd_034(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_035/Neg_A_ttcn3_module_xsd_035.ttcn b/ATS/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_035/Neg_A_ttcn3_module_xsd_035.ttcn new file mode 100644 index 00000000..e6c0c710 --- /dev/null +++ b/ATS/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_035/Neg_A_ttcn3_module_xsd_035.ttcn @@ -0,0 +1,33 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:A, Ensure the builtin XSD type Date allows only valid values + ** @verdict pass reject + ***************************************************/ +module Neg_A_ttcn3_module_xsd_035 { + + import from XSD all; + + template Date m_msg := "14.13.13"; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type component C { + } + + testcase TC_Neg_A_ttcn3_module_xsd_035() runs on C system C { + // set a verdict before since valueof should throw error + setverdict(fail, "Should not be able to create an invalid value of the given built-in XSD type", m_msg); + log(valueof(m_msg)); // if testcase is compiling, valueof is expected to throw an testcase error since the value is invalid + } + + control { + execute(TC_Neg_A_ttcn3_module_xsd_035(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_036/Neg_A_ttcn3_module_xsd_036.ttcn b/ATS/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_036/Neg_A_ttcn3_module_xsd_036.ttcn new file mode 100644 index 00000000..608ea77d --- /dev/null +++ b/ATS/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_036/Neg_A_ttcn3_module_xsd_036.ttcn @@ -0,0 +1,33 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:A, Ensure the builtin XSD type GYearMonth allows only valid values + ** @verdict pass reject + ***************************************************/ +module Neg_A_ttcn3_module_xsd_036 { + + import from XSD all; + + template GYearMonth m_msg := "14-13"; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type component C { + } + + testcase TC_Neg_A_ttcn3_module_xsd_036() runs on C system C { + // set a verdict before since valueof should throw error + setverdict(fail, "Should not be able to create an invalid value of the given built-in XSD type", m_msg); + log(valueof(m_msg)); // if testcase is compiling, valueof is expected to throw an testcase error since the value is invalid + } + + control { + execute(TC_Neg_A_ttcn3_module_xsd_036(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_037/Neg_A_ttcn3_module_xsd_037.ttcn b/ATS/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_037/Neg_A_ttcn3_module_xsd_037.ttcn new file mode 100644 index 00000000..b73e3dc0 --- /dev/null +++ b/ATS/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_037/Neg_A_ttcn3_module_xsd_037.ttcn @@ -0,0 +1,33 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:A, Ensure the builtin XSD type GYear allows only valid values + ** @verdict pass reject + ***************************************************/ +module Neg_A_ttcn3_module_xsd_037 { + + import from XSD all; + + template GYear m_msg := "14"; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type component C { + } + + testcase TC_Neg_A_ttcn3_module_xsd_037() runs on C system C { + // set a verdict before since valueof should throw error + setverdict(fail, "Should not be able to create an invalid value of the given built-in XSD type", m_msg); + log(valueof(m_msg)); // if testcase is compiling, valueof is expected to throw an testcase error since the value is invalid + } + + control { + execute(TC_Neg_A_ttcn3_module_xsd_037(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_038/Neg_A_ttcn3_module_xsd_038.ttcn b/ATS/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_038/Neg_A_ttcn3_module_xsd_038.ttcn new file mode 100644 index 00000000..8de5dce2 --- /dev/null +++ b/ATS/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_038/Neg_A_ttcn3_module_xsd_038.ttcn @@ -0,0 +1,33 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:A, Ensure the builtin XSD type GMonthDay allows only valid values + ** @verdict pass reject + ***************************************************/ +module Neg_A_ttcn3_module_xsd_038 { + + import from XSD all; + + template GMonthDay m_msg := "12-18"; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type component C { + } + + testcase TC_Neg_A_ttcn3_module_xsd_038() runs on C system C { + // set a verdict before since valueof should throw error + setverdict(fail, "Should not be able to create an invalid value of the given built-in XSD type", m_msg); + log(valueof(m_msg)); // if testcase is compiling, valueof is expected to throw an testcase error since the value is invalid + } + + control { + execute(TC_Neg_A_ttcn3_module_xsd_038(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_039/Neg_A_ttcn3_module_xsd_039.ttcn b/ATS/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_039/Neg_A_ttcn3_module_xsd_039.ttcn new file mode 100644 index 00000000..4b99942e --- /dev/null +++ b/ATS/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_039/Neg_A_ttcn3_module_xsd_039.ttcn @@ -0,0 +1,33 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:A, Ensure the builtin XSD type GDay allows only valid values + ** @verdict pass reject + ***************************************************/ +module Neg_A_ttcn3_module_xsd_039 { + + import from XSD all; + + template GDay m_msg := "18"; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type component C { + } + + testcase TC_Neg_A_ttcn3_module_xsd_039() runs on C system C { + // set a verdict before since valueof should throw error + setverdict(fail, "Should not be able to create an invalid value of the given built-in XSD type", m_msg); + log(valueof(m_msg)); // if testcase is compiling, valueof is expected to throw an testcase error since the value is invalid + } + + control { + execute(TC_Neg_A_ttcn3_module_xsd_039(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_040/Neg_A_ttcn3_module_xsd_040.ttcn b/ATS/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_040/Neg_A_ttcn3_module_xsd_040.ttcn new file mode 100644 index 00000000..d9f052fe --- /dev/null +++ b/ATS/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_040/Neg_A_ttcn3_module_xsd_040.ttcn @@ -0,0 +1,33 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:A, Ensure the builtin XSD type GMonth allows only valid values + ** @verdict pass reject + ***************************************************/ +module Neg_A_ttcn3_module_xsd_040 { + + import from XSD all; + + template GMonth m_msg := "12"; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type component C { + } + + testcase TC_Neg_A_ttcn3_module_xsd_040() runs on C system C { + // set a verdict before since valueof should throw error + setverdict(fail, "Should not be able to create an invalid value of the given built-in XSD type", m_msg); + log(valueof(m_msg)); // if testcase is compiling, valueof is expected to throw an testcase error since the value is invalid + } + + control { + execute(TC_Neg_A_ttcn3_module_xsd_040(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_041/Neg_A_ttcn3_module_xsd_041.ttcn b/ATS/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_041/Neg_A_ttcn3_module_xsd_041.ttcn new file mode 100644 index 00000000..826e91e7 --- /dev/null +++ b/ATS/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_041/Neg_A_ttcn3_module_xsd_041.ttcn @@ -0,0 +1,33 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:A, Ensure the builtin XSD type NMTOKENS allows only valid values + ** @verdict pass reject + ***************************************************/ +module Neg_A_ttcn3_module_xsd_041 { + + import from XSD all; + + template NMTOKENS m_msg := {1, 2} + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type component C { + } + + testcase TC_Neg_A_ttcn3_module_xsd_041() runs on C system C { + // set a verdict before since valueof should throw error + setverdict(fail, "Should not be able to create an invalid value of the given built-in XSD type", m_msg); + log(valueof(m_msg)); // if testcase is compiling, valueof is expected to throw an testcase error since the value is invalid + } + + control { + execute(TC_Neg_A_ttcn3_module_xsd_041(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_042/Neg_A_ttcn3_module_xsd_042.ttcn b/ATS/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_042/Neg_A_ttcn3_module_xsd_042.ttcn new file mode 100644 index 00000000..139280b1 --- /dev/null +++ b/ATS/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_042/Neg_A_ttcn3_module_xsd_042.ttcn @@ -0,0 +1,33 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:A, Ensure the builtin XSD type IDREFS allows only valid values + ** @verdict pass reject + ***************************************************/ +module Neg_A_ttcn3_module_xsd_042 { + + import from XSD all; + + template IDREFS m_msg := {"1 2 3"} + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type component C { + } + + testcase TC_Neg_A_ttcn3_module_xsd_042() runs on C system C { + // set a verdict before since valueof should throw error + setverdict(fail, "Should not be able to create an invalid value of the given built-in XSD type", m_msg); + log(valueof(m_msg)); // if testcase is compiling, valueof is expected to throw an testcase error since the value is invalid + } + + control { + execute(TC_Neg_A_ttcn3_module_xsd_042(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_043/Neg_A_ttcn3_module_xsd_043.ttcn b/ATS/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_043/Neg_A_ttcn3_module_xsd_043.ttcn new file mode 100644 index 00000000..3fad1d12 --- /dev/null +++ b/ATS/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_043/Neg_A_ttcn3_module_xsd_043.ttcn @@ -0,0 +1,33 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:A, Ensure the builtin XSD type ENTITIES allows only valid values + ** @verdict pass reject + ***************************************************/ +module Neg_A_ttcn3_module_xsd_043 { + + import from XSD all; + + template ENTITIES m_msg := {"entity_1 , entity_2"} + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type component C { + } + + testcase TC_Neg_A_ttcn3_module_xsd_043() runs on C system C { + // set a verdict before since valueof should throw error + setverdict(fail, "Should not be able to create an invalid value of the given built-in XSD type", m_msg); + log(valueof(m_msg)); // if testcase is compiling, valueof is expected to throw an testcase error since the value is invalid + } + + control { + execute(TC_Neg_A_ttcn3_module_xsd_043(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_044/Neg_A_ttcn3_module_xsd_044.ttcn b/ATS/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_044/Neg_A_ttcn3_module_xsd_044.ttcn new file mode 100644 index 00000000..56fee9f2 --- /dev/null +++ b/ATS/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_044/Neg_A_ttcn3_module_xsd_044.ttcn @@ -0,0 +1,33 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:A, Ensure the builtin XSD type QName allows only valid values + ** @verdict pass reject + ***************************************************/ +module Neg_A_ttcn3_module_xsd_044 { + + import from XSD all; + + template QName m_msg := {"", "name with whitespace"} + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type component C { + } + + testcase TC_Neg_A_ttcn3_module_xsd_044() runs on C system C { + // set a verdict before since valueof should throw error + setverdict(fail, "Should not be able to create an invalid value of the given built-in XSD type", m_msg); + log(valueof(m_msg)); // if testcase is compiling, valueof is expected to throw an testcase error since the value is invalid + } + + control { + execute(TC_Neg_A_ttcn3_module_xsd_044(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_045/Neg_A_ttcn3_module_xsd_045.ttcn b/ATS/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_045/Neg_A_ttcn3_module_xsd_045.ttcn new file mode 100644 index 00000000..8eae44e0 --- /dev/null +++ b/ATS/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_045/Neg_A_ttcn3_module_xsd_045.ttcn @@ -0,0 +1,33 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:A, Ensure the builtin XSD type Boolean allows only valid values + ** @verdict pass reject + ***************************************************/ +module Neg_A_ttcn3_module_xsd_045 { + + import from XSD all; + + template Boolean m_msg := fail; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type component C { + } + + testcase TC_Neg_A_ttcn3_module_xsd_045() runs on C system C { + // set a verdict before since valueof should throw error + setverdict(fail, "Should not be able to create an invalid value of the given built-in XSD type", m_msg); + log(valueof(m_msg)); // if testcase is compiling, valueof is expected to throw an testcase error since the value is invalid + } + + control { + execute(TC_Neg_A_ttcn3_module_xsd_045(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_046/Neg_A_ttcn3_module_xsd_046.ttcn b/ATS/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_046/Neg_A_ttcn3_module_xsd_046.ttcn new file mode 100644 index 00000000..58313057 --- /dev/null +++ b/ATS/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_046/Neg_A_ttcn3_module_xsd_046.ttcn @@ -0,0 +1,33 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:A, Ensure the builtin XSD type XMLCompatibleString allows only valid values + ** @verdict pass reject + ***************************************************/ +module Neg_A_ttcn3_module_xsd_046 { + + import from XSD all; + + template XMLCompatibleString m_msg := 123; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type component C { + } + + testcase TC_Neg_A_ttcn3_module_xsd_046() runs on C system C { + // set a verdict before since valueof should throw error + setverdict(fail, "Should not be able to create an invalid value of the given built-in XSD type", m_msg); + log(valueof(m_msg)); // if testcase is compiling, valueof is expected to throw an testcase error since the value is invalid + } + + control { + execute(TC_Neg_A_ttcn3_module_xsd_046(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_047/Neg_A_ttcn3_module_xsd_047.ttcn b/ATS/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_047/Neg_A_ttcn3_module_xsd_047.ttcn new file mode 100644 index 00000000..ffd5c862 --- /dev/null +++ b/ATS/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_047/Neg_A_ttcn3_module_xsd_047.ttcn @@ -0,0 +1,33 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:A, Ensure the builtin XSD type XMLStringWithNoWhitespace allows only valid values + ** @verdict pass reject + ***************************************************/ +module Neg_A_ttcn3_module_xsd_047 { + + import from XSD all; + + template XMLStringWithNoWhitespace m_msg := "a b c"; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type component C { + } + + testcase TC_Neg_A_ttcn3_module_xsd_047() runs on C system C { + // set a verdict before since valueof should throw error + setverdict(fail, "Should not be able to create an invalid value of the given built-in XSD type", m_msg); + log(valueof(m_msg)); // if testcase is compiling, valueof is expected to throw an testcase error since the value is invalid + } + + control { + execute(TC_Neg_A_ttcn3_module_xsd_047(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_048/Neg_A_ttcn3_module_xsd_048.ttcn b/ATS/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_048/Neg_A_ttcn3_module_xsd_048.ttcn new file mode 100644 index 00000000..20436eb0 --- /dev/null +++ b/ATS/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_048/Neg_A_ttcn3_module_xsd_048.ttcn @@ -0,0 +1,33 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:A, Ensure the builtin XSD type XMLStringWithNoCRLFHT allows only valid values + ** @verdict pass reject + ***************************************************/ +module Neg_A_ttcn3_module_xsd_048 { + + import from XSD all; + + template XMLStringWithNoCRLFHT m_msg := 123; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type component C { + } + + testcase TC_Neg_A_ttcn3_module_xsd_048() runs on C system C { + // set a verdict before since valueof should throw error + setverdict(fail, "Should not be able to create an invalid value of the given built-in XSD type", m_msg); + log(valueof(m_msg)); // if testcase is compiling, valueof is expected to throw an testcase error since the value is invalid + } + + control { + execute(TC_Neg_A_ttcn3_module_xsd_048(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_001/Pos_A_ttcn3_module_xsd_001.ttcn b/ATS/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_001/Pos_A_ttcn3_module_xsd_001.ttcn new file mode 100644 index 00000000..3e560d3a --- /dev/null +++ b/ATS/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_001/Pos_A_ttcn3_module_xsd_001.ttcn @@ -0,0 +1,38 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:A, Ensure the module XSD is available and contains the builtin XSD type AnySimpleType + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_A_ttcn3_module_xsd_001 { + + import from XSD all; + + template AnySimpleType m_msg :="abc"; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type component C { + } + + testcase TC_Pos_A_ttcn3_module_xsd_001() runs on C system C { + + // encode the message + if (isvalue(m_msg)) { + setverdict(pass, "Built-in XSD type was found and TCI value was created"); + } else { + setverdict(fail, "Failure to create a value of the given built-in XSD type"); + } + } + + control { + execute(TC_Pos_A_ttcn3_module_xsd_001(), PX_TC_EXECUTION_TIMEOUT); + } + +} + diff --git a/ATS/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_002/Pos_A_ttcn3_module_xsd_002.ttcn b/ATS/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_002/Pos_A_ttcn3_module_xsd_002.ttcn new file mode 100644 index 00000000..6babfd8d --- /dev/null +++ b/ATS/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_002/Pos_A_ttcn3_module_xsd_002.ttcn @@ -0,0 +1,37 @@ +/*************************************************** + ** @author STF 475, updated by STF 521 + ** @version 0.0.2 + ** @purpose 9:A, Ensure the module XSD is available and contains the builtin XSD type AnyType + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_A_ttcn3_module_xsd_002 { + + import from XSD all; + + template AnyType m_msg := {embed_values := omit, attr := omit, elem_list := {"a"}} + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type component C { + } + + testcase TC_Pos_A_ttcn3_module_xsd_002() runs on C system C { + + // encode the message + if (isvalue(m_msg)) { + setverdict(pass, "Built-in XSD type was found and TCI value was created"); + } else { + setverdict(fail, "Failure to create a value of the given built-in XSD type"); + } + } + + control { + execute(TC_Pos_A_ttcn3_module_xsd_002(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_003/Pos_A_ttcn3_module_xsd_003.ttcn b/ATS/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_003/Pos_A_ttcn3_module_xsd_003.ttcn new file mode 100644 index 00000000..99e6598d --- /dev/null +++ b/ATS/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_003/Pos_A_ttcn3_module_xsd_003.ttcn @@ -0,0 +1,37 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:A, Ensure the module XSD is available and contains the builtin XSD type String + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_A_ttcn3_module_xsd_003 { + + import from XSD all; + + template String m_msg :="abc"; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type component C { + } + + testcase TC_Pos_A_ttcn3_module_xsd_003() runs on C system C { + + // encode the message + if (isvalue(m_msg)) { + setverdict(pass, "Built-in XSD type was found and TCI value was created"); + } else { + setverdict(fail, "Failure to create a value of the given built-in XSD type"); + } + } + + control { + execute(TC_Pos_A_ttcn3_module_xsd_003(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_004/Pos_A_ttcn3_module_xsd_004.ttcn b/ATS/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_004/Pos_A_ttcn3_module_xsd_004.ttcn new file mode 100644 index 00000000..a5719519 --- /dev/null +++ b/ATS/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_004/Pos_A_ttcn3_module_xsd_004.ttcn @@ -0,0 +1,37 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:A, Ensure the module XSD is available and contains the builtin XSD type NormalizedString + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_A_ttcn3_module_xsd_004 { + + import from XSD all; + + template NormalizedString m_msg :="abc"; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type component C { + } + + testcase TC_Pos_A_ttcn3_module_xsd_004() runs on C system C { + + // encode the message + if (isvalue(m_msg)) { + setverdict(pass, "Built-in XSD type was found and TCI value was created"); + } else { + setverdict(fail, "Failure to create a value of the given built-in XSD type"); + } + } + + control { + execute(TC_Pos_A_ttcn3_module_xsd_004(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_005/Pos_A_ttcn3_module_xsd_005.ttcn b/ATS/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_005/Pos_A_ttcn3_module_xsd_005.ttcn new file mode 100644 index 00000000..e39421f9 --- /dev/null +++ b/ATS/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_005/Pos_A_ttcn3_module_xsd_005.ttcn @@ -0,0 +1,37 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:A, Ensure the module XSD is available and contains the builtin XSD type Token + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_A_ttcn3_module_xsd_005 { + + import from XSD all; + + template Token m_msg := "abc"; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type component C { + } + + testcase TC_Pos_A_ttcn3_module_xsd_005() runs on C system C { + + // encode the message + if (isvalue(m_msg)) { + setverdict(pass, "Built-in XSD type was found and TCI value was created"); + } else { + setverdict(fail, "Failure to create a value of the given built-in XSD type"); + } + } + + control { + execute(TC_Pos_A_ttcn3_module_xsd_005(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_006/Pos_A_ttcn3_module_xsd_006.ttcn b/ATS/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_006/Pos_A_ttcn3_module_xsd_006.ttcn new file mode 100644 index 00000000..80979640 --- /dev/null +++ b/ATS/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_006/Pos_A_ttcn3_module_xsd_006.ttcn @@ -0,0 +1,37 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:A, Ensure the module XSD is available and contains the builtin XSD type Name + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_A_ttcn3_module_xsd_006 { + + import from XSD all; + + template Name m_msg := "name"; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type component C { + } + + testcase TC_Pos_A_ttcn3_module_xsd_006() runs on C system C { + + // encode the message + if (isvalue(m_msg)) { + setverdict(pass, "Built-in XSD type was found and TCI value was created"); + } else { + setverdict(fail, "Failure to create a value of the given built-in XSD type"); + } + } + + control { + execute(TC_Pos_A_ttcn3_module_xsd_006(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_007/Pos_A_ttcn3_module_xsd_007.ttcn b/ATS/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_007/Pos_A_ttcn3_module_xsd_007.ttcn new file mode 100644 index 00000000..507ba82d --- /dev/null +++ b/ATS/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_007/Pos_A_ttcn3_module_xsd_007.ttcn @@ -0,0 +1,37 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:A, Ensure the module XSD is available and contains the builtin XSD type NMTOKEN + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_A_ttcn3_module_xsd_007 { + + import from XSD all; + + template NMTOKEN m_msg := "NMToken"; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type component C { + } + + testcase TC_Pos_A_ttcn3_module_xsd_007() runs on C system C { + + // encode the message + if (isvalue(m_msg)) { + setverdict(pass, "Built-in XSD type was found and TCI value was created"); + } else { + setverdict(fail, "Failure to create a value of the given built-in XSD type"); + } + } + + control { + execute(TC_Pos_A_ttcn3_module_xsd_007(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_008/Pos_A_ttcn3_module_xsd_008.ttcn b/ATS/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_008/Pos_A_ttcn3_module_xsd_008.ttcn new file mode 100644 index 00000000..2d054ae4 --- /dev/null +++ b/ATS/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_008/Pos_A_ttcn3_module_xsd_008.ttcn @@ -0,0 +1,37 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:A, Ensure the module XSD is available and contains the builtin XSD type NCName + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_A_ttcn3_module_xsd_008 { + + import from XSD all; + + template NCName m_msg := "SomeName-WithoutSpace"; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type component C { + } + + testcase TC_Pos_A_ttcn3_module_xsd_008() runs on C system C { + + // encode the message + if (isvalue(m_msg)) { + setverdict(pass, "Built-in XSD type was found and TCI value was created"); + } else { + setverdict(fail, "Failure to create a value of the given built-in XSD type"); + } + } + + control { + execute(TC_Pos_A_ttcn3_module_xsd_008(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_009/Pos_A_ttcn3_module_xsd_009.ttcn b/ATS/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_009/Pos_A_ttcn3_module_xsd_009.ttcn new file mode 100644 index 00000000..aa4acaba --- /dev/null +++ b/ATS/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_009/Pos_A_ttcn3_module_xsd_009.ttcn @@ -0,0 +1,37 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:A, Ensure the module XSD is available and contains the builtin XSD type ID + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_A_ttcn3_module_xsd_009 { + + import from XSD all; + + template ID m_msg := "1234"; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type component C { + } + + testcase TC_Pos_A_ttcn3_module_xsd_009() runs on C system C { + + // encode the message + if (isvalue(m_msg)) { + setverdict(pass, "Built-in XSD type was found and TCI value was created"); + } else { + setverdict(fail, "Failure to create a value of the given built-in XSD type"); + } + } + + control { + execute(TC_Pos_A_ttcn3_module_xsd_009(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_010/Pos_A_ttcn3_module_xsd_010.ttcn b/ATS/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_010/Pos_A_ttcn3_module_xsd_010.ttcn new file mode 100644 index 00000000..18e9bbe8 --- /dev/null +++ b/ATS/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_010/Pos_A_ttcn3_module_xsd_010.ttcn @@ -0,0 +1,37 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:A, Ensure the module XSD is available and contains the builtin XSD type IDREF + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_A_ttcn3_module_xsd_010 { + + import from XSD all; + + template IDREF m_msg := "ID-Reference"; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type component C { + } + + testcase TC_Pos_A_ttcn3_module_xsd_010() runs on C system C { + + // encode the message + if (isvalue(m_msg)) { + setverdict(pass, "Built-in XSD type was found and TCI value was created"); + } else { + setverdict(fail, "Failure to create a value of the given built-in XSD type"); + } + } + + control { + execute(TC_Pos_A_ttcn3_module_xsd_010(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_011/Pos_A_ttcn3_module_xsd_011.ttcn b/ATS/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_011/Pos_A_ttcn3_module_xsd_011.ttcn new file mode 100644 index 00000000..19cbdc26 --- /dev/null +++ b/ATS/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_011/Pos_A_ttcn3_module_xsd_011.ttcn @@ -0,0 +1,37 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:A, Ensure the module XSD is available and contains the builtin XSD type ENTITY + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_A_ttcn3_module_xsd_011 { + + import from XSD all; + + template ENTITY m_msg := "MyEntity"; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type component C { + } + + testcase TC_Pos_A_ttcn3_module_xsd_011() runs on C system C { + + // encode the message + if (isvalue(m_msg)) { + setverdict(pass, "Built-in XSD type was found and TCI value was created"); + } else { + setverdict(fail, "Failure to create a value of the given built-in XSD type"); + } + } + + control { + execute(TC_Pos_A_ttcn3_module_xsd_011(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_012/Pos_A_ttcn3_module_xsd_012.ttcn b/ATS/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_012/Pos_A_ttcn3_module_xsd_012.ttcn new file mode 100644 index 00000000..95cd9047 --- /dev/null +++ b/ATS/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_012/Pos_A_ttcn3_module_xsd_012.ttcn @@ -0,0 +1,37 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:A, Ensure the module XSD is available and contains the builtin XSD type HexBinary + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_A_ttcn3_module_xsd_012 { + + import from XSD all; + + template HexBinary m_msg := '11001100'O; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type component C { + } + + testcase TC_Pos_A_ttcn3_module_xsd_012() runs on C system C { + + // encode the message + if (isvalue(m_msg)) { + setverdict(pass, "Built-in XSD type was found and TCI value was created"); + } else { + setverdict(fail, "Failure to create a value of the given built-in XSD type"); + } + } + + control { + execute(TC_Pos_A_ttcn3_module_xsd_012(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_013/Pos_A_ttcn3_module_xsd_013.ttcn b/ATS/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_013/Pos_A_ttcn3_module_xsd_013.ttcn new file mode 100644 index 00000000..4ff950df --- /dev/null +++ b/ATS/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_013/Pos_A_ttcn3_module_xsd_013.ttcn @@ -0,0 +1,37 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:A, Ensure the module XSD is available and contains the builtin XSD type Base64Binary + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_A_ttcn3_module_xsd_013 { + + import from XSD all; + + template Base64Binary m_msg := 'A12654778899'O; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type component C { + } + + testcase TC_Pos_A_ttcn3_module_xsd_013() runs on C system C { + + // encode the message + if (isvalue(m_msg)) { + setverdict(pass, "Built-in XSD type was found and TCI value was created"); + } else { + setverdict(fail, "Failure to create a value of the given built-in XSD type"); + } + } + + control { + execute(TC_Pos_A_ttcn3_module_xsd_013(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_014/Pos_A_ttcn3_module_xsd_014.ttcn b/ATS/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_014/Pos_A_ttcn3_module_xsd_014.ttcn new file mode 100644 index 00000000..1412e4cf --- /dev/null +++ b/ATS/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_014/Pos_A_ttcn3_module_xsd_014.ttcn @@ -0,0 +1,37 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:A, Ensure the module XSD is available and contains the builtin XSD type AnyURI + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_A_ttcn3_module_xsd_014 { + + import from XSD all; + + template AnyURI m_msg := "abc"; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type component C { + } + + testcase TC_Pos_A_ttcn3_module_xsd_014() runs on C system C { + + // encode the message + if (isvalue(m_msg)) { + setverdict(pass, "Built-in XSD type was found and TCI value was created"); + } else { + setverdict(fail, "Failure to create a value of the given built-in XSD type"); + } + } + + control { + execute(TC_Pos_A_ttcn3_module_xsd_014(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_015/Pos_A_ttcn3_module_xsd_015.ttcn b/ATS/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_015/Pos_A_ttcn3_module_xsd_015.ttcn new file mode 100644 index 00000000..ab9879f9 --- /dev/null +++ b/ATS/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_015/Pos_A_ttcn3_module_xsd_015.ttcn @@ -0,0 +1,37 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:A, Ensure the module XSD is available and contains the builtin XSD type Language + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_A_ttcn3_module_xsd_015 { + + import from XSD all; + + template Language m_msg := "De-AT"; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type component C { + } + + testcase TC_Pos_A_ttcn3_module_xsd_015() runs on C system C { + + // encode the message + if (isvalue(m_msg)) { + setverdict(pass, "Built-in XSD type was found and TCI value was created"); + } else { + setverdict(fail, "Failure to create a value of the given built-in XSD type"); + } + } + + control { + execute(TC_Pos_A_ttcn3_module_xsd_015(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_016/Pos_A_ttcn3_module_xsd_016.ttcn b/ATS/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_016/Pos_A_ttcn3_module_xsd_016.ttcn new file mode 100644 index 00000000..7fbdbbf3 --- /dev/null +++ b/ATS/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_016/Pos_A_ttcn3_module_xsd_016.ttcn @@ -0,0 +1,37 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:A, Ensure the module XSD is available and contains the builtin XSD type Integer + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_A_ttcn3_module_xsd_016 { + + import from XSD all; + + template Integer m_msg := 123; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type component C { + } + + testcase TC_Pos_A_ttcn3_module_xsd_016() runs on C system C { + + // encode the message + if (isvalue(m_msg)) { + setverdict(pass, "Built-in XSD type was found and TCI value was created"); + } else { + setverdict(fail, "Failure to create a value of the given built-in XSD type"); + } + } + + control { + execute(TC_Pos_A_ttcn3_module_xsd_016(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_017/Pos_A_ttcn3_module_xsd_017.ttcn b/ATS/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_017/Pos_A_ttcn3_module_xsd_017.ttcn new file mode 100644 index 00000000..62ed0f1a --- /dev/null +++ b/ATS/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_017/Pos_A_ttcn3_module_xsd_017.ttcn @@ -0,0 +1,37 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:A, Ensure the module XSD is available and contains the builtin XSD type PositiveInteger + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_A_ttcn3_module_xsd_017 { + + import from XSD all; + + template PositiveInteger m_msg := 12; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type component C { + } + + testcase TC_Pos_A_ttcn3_module_xsd_017() runs on C system C { + + // encode the message + if (isvalue(m_msg)) { + setverdict(pass, "Built-in XSD type was found and TCI value was created"); + } else { + setverdict(fail, "Failure to create a value of the given built-in XSD type"); + } + } + + control { + execute(TC_Pos_A_ttcn3_module_xsd_017(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_018/Pos_A_ttcn3_module_xsd_018.ttcn b/ATS/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_018/Pos_A_ttcn3_module_xsd_018.ttcn new file mode 100644 index 00000000..ef8928de --- /dev/null +++ b/ATS/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_018/Pos_A_ttcn3_module_xsd_018.ttcn @@ -0,0 +1,37 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:A, Ensure the module XSD is available and contains the builtin XSD type NonPositiveInteger + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_A_ttcn3_module_xsd_018 { + + import from XSD all; + + template NonPositiveInteger m_msg := -3; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type component C { + } + + testcase TC_Pos_A_ttcn3_module_xsd_018() runs on C system C { + + // encode the message + if (isvalue(m_msg)) { + setverdict(pass, "Built-in XSD type was found and TCI value was created"); + } else { + setverdict(fail, "Failure to create a value of the given built-in XSD type"); + } + } + + control { + execute(TC_Pos_A_ttcn3_module_xsd_018(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_019/Pos_A_ttcn3_module_xsd_019.ttcn b/ATS/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_019/Pos_A_ttcn3_module_xsd_019.ttcn new file mode 100644 index 00000000..65e21a9f --- /dev/null +++ b/ATS/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_019/Pos_A_ttcn3_module_xsd_019.ttcn @@ -0,0 +1,37 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:A, Ensure the module XSD is available and contains the builtin XSD type NegativeInteger + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_A_ttcn3_module_xsd_019 { + + import from XSD all; + + template NegativeInteger m_msg := -10; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type component C { + } + + testcase TC_Pos_A_ttcn3_module_xsd_019() runs on C system C { + + // encode the message + if (isvalue(m_msg)) { + setverdict(pass, "Built-in XSD type was found and TCI value was created"); + } else { + setverdict(fail, "Failure to create a value of the given built-in XSD type"); + } + } + + control { + execute(TC_Pos_A_ttcn3_module_xsd_019(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_020/Pos_A_ttcn3_module_xsd_020.ttcn b/ATS/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_020/Pos_A_ttcn3_module_xsd_020.ttcn new file mode 100644 index 00000000..419d70c0 --- /dev/null +++ b/ATS/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_020/Pos_A_ttcn3_module_xsd_020.ttcn @@ -0,0 +1,37 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:A, Ensure the module XSD is available and contains the builtin XSD type NonNegativeInteger + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_A_ttcn3_module_xsd_020 { + + import from XSD all; + + template NonNegativeInteger m_msg := 2; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type component C { + } + + testcase TC_Pos_A_ttcn3_module_xsd_020() runs on C system C { + + // encode the message + if (isvalue(m_msg)) { + setverdict(pass, "Built-in XSD type was found and TCI value was created"); + } else { + setverdict(fail, "Failure to create a value of the given built-in XSD type"); + } + } + + control { + execute(TC_Pos_A_ttcn3_module_xsd_020(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_021/Pos_A_ttcn3_module_xsd_021.ttcn b/ATS/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_021/Pos_A_ttcn3_module_xsd_021.ttcn new file mode 100644 index 00000000..500ced4f --- /dev/null +++ b/ATS/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_021/Pos_A_ttcn3_module_xsd_021.ttcn @@ -0,0 +1,37 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:A, Ensure the module XSD is available and contains the builtin XSD type Long + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_A_ttcn3_module_xsd_021 { + + import from XSD all; + + template Long m_msg := 123; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type component C { + } + + testcase TC_Pos_A_ttcn3_module_xsd_021() runs on C system C { + + // encode the message + if (isvalue(m_msg)) { + setverdict(pass, "Built-in XSD type was found and TCI value was created"); + } else { + setverdict(fail, "Failure to create a value of the given built-in XSD type"); + } + } + + control { + execute(TC_Pos_A_ttcn3_module_xsd_021(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_022/Pos_A_ttcn3_module_xsd_022.ttcn b/ATS/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_022/Pos_A_ttcn3_module_xsd_022.ttcn new file mode 100644 index 00000000..59d768c0 --- /dev/null +++ b/ATS/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_022/Pos_A_ttcn3_module_xsd_022.ttcn @@ -0,0 +1,37 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:A, Ensure the module XSD is available and contains the builtin XSD type UnsignedLong + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_A_ttcn3_module_xsd_022 { + + import from XSD all; + + template UnsignedLong m_msg := 10; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type component C { + } + + testcase TC_Pos_A_ttcn3_module_xsd_022() runs on C system C { + + // encode the message + if (isvalue(m_msg)) { + setverdict(pass, "Built-in XSD type was found and TCI value was created"); + } else { + setverdict(fail, "Failure to create a value of the given built-in XSD type"); + } + } + + control { + execute(TC_Pos_A_ttcn3_module_xsd_022(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_023/Pos_A_ttcn3_module_xsd_023.ttcn b/ATS/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_023/Pos_A_ttcn3_module_xsd_023.ttcn new file mode 100644 index 00000000..fe1edc39 --- /dev/null +++ b/ATS/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_023/Pos_A_ttcn3_module_xsd_023.ttcn @@ -0,0 +1,37 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:A, Ensure the module XSD is available and contains the builtin XSD type Int + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_A_ttcn3_module_xsd_023 { + + import from XSD all; + + template Int m_msg := 23; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type component C { + } + + testcase TC_Pos_A_ttcn3_module_xsd_023() runs on C system C { + + // encode the message + if (isvalue(m_msg)) { + setverdict(pass, "Built-in XSD type was found and TCI value was created"); + } else { + setverdict(fail, "Failure to create a value of the given built-in XSD type"); + } + } + + control { + execute(TC_Pos_A_ttcn3_module_xsd_023(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_024/Pos_A_ttcn3_module_xsd_024.ttcn b/ATS/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_024/Pos_A_ttcn3_module_xsd_024.ttcn new file mode 100644 index 00000000..f8264686 --- /dev/null +++ b/ATS/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_024/Pos_A_ttcn3_module_xsd_024.ttcn @@ -0,0 +1,37 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:A, Ensure the module XSD is available and contains the builtin XSD type UnsignedInt + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_A_ttcn3_module_xsd_024 { + + import from XSD all; + + template UnsignedInt m_msg := 3; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type component C { + } + + testcase TC_Pos_A_ttcn3_module_xsd_024() runs on C system C { + + // encode the message + if (isvalue(m_msg)) { + setverdict(pass, "Built-in XSD type was found and TCI value was created"); + } else { + setverdict(fail, "Failure to create a value of the given built-in XSD type"); + } + } + + control { + execute(TC_Pos_A_ttcn3_module_xsd_024(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_025/Pos_A_ttcn3_module_xsd_025.ttcn b/ATS/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_025/Pos_A_ttcn3_module_xsd_025.ttcn new file mode 100644 index 00000000..b7a590ba --- /dev/null +++ b/ATS/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_025/Pos_A_ttcn3_module_xsd_025.ttcn @@ -0,0 +1,37 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:A, Ensure the module XSD is available and contains the builtin XSD type Short + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_A_ttcn3_module_xsd_025 { + + import from XSD all; + + template Short m_msg := 32767; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type component C { + } + + testcase TC_Pos_A_ttcn3_module_xsd_025() runs on C system C { + + // encode the message + if (isvalue(m_msg)) { + setverdict(pass, "Built-in XSD type was found and TCI value was created"); + } else { + setverdict(fail, "Failure to create a value of the given built-in XSD type"); + } + } + + control { + execute(TC_Pos_A_ttcn3_module_xsd_025(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_026/Pos_A_ttcn3_module_xsd_026.ttcn b/ATS/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_026/Pos_A_ttcn3_module_xsd_026.ttcn new file mode 100644 index 00000000..accf0572 --- /dev/null +++ b/ATS/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_026/Pos_A_ttcn3_module_xsd_026.ttcn @@ -0,0 +1,37 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:A, Ensure the module XSD is available and contains the builtin XSD type UnsignedShort + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_A_ttcn3_module_xsd_026 { + + import from XSD all; + + template UnsignedShort m_msg := 65535; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type component C { + } + + testcase TC_Pos_A_ttcn3_module_xsd_026() runs on C system C { + + // encode the message + if (isvalue(m_msg)) { + setverdict(pass, "Built-in XSD type was found and TCI value was created"); + } else { + setverdict(fail, "Failure to create a value of the given built-in XSD type"); + } + } + + control { + execute(TC_Pos_A_ttcn3_module_xsd_026(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_027/Pos_A_ttcn3_module_xsd_027.ttcn b/ATS/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_027/Pos_A_ttcn3_module_xsd_027.ttcn new file mode 100644 index 00000000..1ed145ab --- /dev/null +++ b/ATS/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_027/Pos_A_ttcn3_module_xsd_027.ttcn @@ -0,0 +1,37 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:A, Ensure the module XSD is available and contains the builtin XSD type Byte + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_A_ttcn3_module_xsd_027 { + + import from XSD all; + + template Byte m_msg := 127; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type component C { + } + + testcase TC_Pos_A_ttcn3_module_xsd_027() runs on C system C { + + // encode the message + if (isvalue(m_msg)) { + setverdict(pass, "Built-in XSD type was found and TCI value was created"); + } else { + setverdict(fail, "Failure to create a value of the given built-in XSD type"); + } + } + + control { + execute(TC_Pos_A_ttcn3_module_xsd_027(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_028/Pos_A_ttcn3_module_xsd_028.ttcn b/ATS/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_028/Pos_A_ttcn3_module_xsd_028.ttcn new file mode 100644 index 00000000..ecb8d394 --- /dev/null +++ b/ATS/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_028/Pos_A_ttcn3_module_xsd_028.ttcn @@ -0,0 +1,37 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:A, Ensure the module XSD is available and contains the builtin XSD type UnsignedByte + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_A_ttcn3_module_xsd_028 { + + import from XSD all; + + template UnsignedByte m_msg := 255; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type component C { + } + + testcase TC_Pos_A_ttcn3_module_xsd_028() runs on C system C { + + // encode the message + if (isvalue(m_msg)) { + setverdict(pass, "Built-in XSD type was found and TCI value was created"); + } else { + setverdict(fail, "Failure to create a value of the given built-in XSD type"); + } + } + + control { + execute(TC_Pos_A_ttcn3_module_xsd_028(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_029/Pos_A_ttcn3_module_xsd_029.ttcn b/ATS/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_029/Pos_A_ttcn3_module_xsd_029.ttcn new file mode 100644 index 00000000..9fd59a47 --- /dev/null +++ b/ATS/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_029/Pos_A_ttcn3_module_xsd_029.ttcn @@ -0,0 +1,37 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:A, Ensure the module XSD is available and contains the builtin XSD type Decimal + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_A_ttcn3_module_xsd_029 { + + import from XSD all; + + template Decimal m_msg := 1.0; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type component C { + } + + testcase TC_Pos_A_ttcn3_module_xsd_029() runs on C system C { + + // encode the message + if (isvalue(m_msg)) { + setverdict(pass, "Built-in XSD type was found and TCI value was created"); + } else { + setverdict(fail, "Failure to create a value of the given built-in XSD type"); + } + } + + control { + execute(TC_Pos_A_ttcn3_module_xsd_029(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_030/Pos_A_ttcn3_module_xsd_030.ttcn b/ATS/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_030/Pos_A_ttcn3_module_xsd_030.ttcn new file mode 100644 index 00000000..b01e061e --- /dev/null +++ b/ATS/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_030/Pos_A_ttcn3_module_xsd_030.ttcn @@ -0,0 +1,37 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:A, Ensure the module XSD is available and contains the builtin XSD type Float + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_A_ttcn3_module_xsd_030 { + + import from XSD all; + + template Float m_msg := 1.0; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type component C { + } + + testcase TC_Pos_A_ttcn3_module_xsd_030() runs on C system C { + + // encode the message + if (isvalue(m_msg)) { + setverdict(pass, "Built-in XSD type was found and TCI value was created"); + } else { + setverdict(fail, "Failure to create a value of the given built-in XSD type"); + } + } + + control { + execute(TC_Pos_A_ttcn3_module_xsd_030(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_031/Pos_A_ttcn3_module_xsd_031.ttcn b/ATS/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_031/Pos_A_ttcn3_module_xsd_031.ttcn new file mode 100644 index 00000000..930dd107 --- /dev/null +++ b/ATS/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_031/Pos_A_ttcn3_module_xsd_031.ttcn @@ -0,0 +1,37 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:A, Ensure the module XSD is available and contains the builtin XSD type Double + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_A_ttcn3_module_xsd_031 { + + import from XSD all; + + template Double m_msg := 1.0; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type component C { + } + + testcase TC_Pos_A_ttcn3_module_xsd_031() runs on C system C { + + // encode the message + if (isvalue(m_msg)) { + setverdict(pass, "Built-in XSD type was found and TCI value was created"); + } else { + setverdict(fail, "Failure to create a value of the given built-in XSD type"); + } + } + + control { + execute(TC_Pos_A_ttcn3_module_xsd_031(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_032/Pos_A_ttcn3_module_xsd_032.ttcn b/ATS/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_032/Pos_A_ttcn3_module_xsd_032.ttcn new file mode 100644 index 00000000..017a96b3 --- /dev/null +++ b/ATS/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_032/Pos_A_ttcn3_module_xsd_032.ttcn @@ -0,0 +1,37 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:A, Ensure the module XSD is available and contains the builtin XSD type Duration + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_A_ttcn3_module_xsd_032 { + + import from XSD all; + + template Duration m_msg := "P1Y2M2DT2H22M"; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type component C { + } + + testcase TC_Pos_A_ttcn3_module_xsd_032() runs on C system C { + + // encode the message + if (isvalue(m_msg)) { + setverdict(pass, "Built-in XSD type was found and TCI value was created"); + } else { + setverdict(fail, "Failure to create a value of the given built-in XSD type"); + } + } + + control { + execute(TC_Pos_A_ttcn3_module_xsd_032(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_033/Pos_A_ttcn3_module_xsd_033.ttcn b/ATS/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_033/Pos_A_ttcn3_module_xsd_033.ttcn new file mode 100644 index 00000000..751c9ba0 --- /dev/null +++ b/ATS/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_033/Pos_A_ttcn3_module_xsd_033.ttcn @@ -0,0 +1,37 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:A, Ensure the module XSD is available and contains the builtin XSD type DateTime + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_A_ttcn3_module_xsd_033 { + + import from XSD all; + + template DateTime m_msg := "2014-12-12T12:00:00"; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type component C { + } + + testcase TC_Pos_A_ttcn3_module_xsd_033() runs on C system C { + + // encode the message + if (isvalue(m_msg)) { + setverdict(pass, "Built-in XSD type was found and TCI value was created"); + } else { + setverdict(fail, "Failure to create a value of the given built-in XSD type"); + } + } + + control { + execute(TC_Pos_A_ttcn3_module_xsd_033(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_034/Pos_A_ttcn3_module_xsd_034.ttcn b/ATS/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_034/Pos_A_ttcn3_module_xsd_034.ttcn new file mode 100644 index 00000000..0acb7dc5 --- /dev/null +++ b/ATS/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_034/Pos_A_ttcn3_module_xsd_034.ttcn @@ -0,0 +1,37 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:A, Ensure the module XSD is available and contains the builtin XSD type Time + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_A_ttcn3_module_xsd_034 { + + import from XSD all; + + template Time m_msg := "12:12:00-05:00"; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type component C { + } + + testcase TC_Pos_A_ttcn3_module_xsd_034() runs on C system C { + + // encode the message + if (isvalue(m_msg)) { + setverdict(pass, "Built-in XSD type was found and TCI value was created"); + } else { + setverdict(fail, "Failure to create a value of the given built-in XSD type"); + } + } + + control { + execute(TC_Pos_A_ttcn3_module_xsd_034(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_035/Pos_A_ttcn3_module_xsd_035.ttcn b/ATS/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_035/Pos_A_ttcn3_module_xsd_035.ttcn new file mode 100644 index 00000000..e16d5d1b --- /dev/null +++ b/ATS/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_035/Pos_A_ttcn3_module_xsd_035.ttcn @@ -0,0 +1,37 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:A, Ensure the module XSD is available and contains the builtin XSD type Date + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_A_ttcn3_module_xsd_035 { + + import from XSD all; + + template Date m_msg := "2014-12-18"; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type component C { + } + + testcase TC_Pos_A_ttcn3_module_xsd_035() runs on C system C { + + // encode the message + if (isvalue(m_msg)) { + setverdict(pass, "Built-in XSD type was found and TCI value was created"); + } else { + setverdict(fail, "Failure to create a value of the given built-in XSD type"); + } + } + + control { + execute(TC_Pos_A_ttcn3_module_xsd_035(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_036/Pos_A_ttcn3_module_xsd_036.ttcn b/ATS/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_036/Pos_A_ttcn3_module_xsd_036.ttcn new file mode 100644 index 00000000..082e1807 --- /dev/null +++ b/ATS/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_036/Pos_A_ttcn3_module_xsd_036.ttcn @@ -0,0 +1,37 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:A, Ensure the module XSD is available and contains the builtin XSD type GYearMonth + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_A_ttcn3_module_xsd_036 { + + import from XSD all; + + template GYearMonth m_msg := "2014-12"; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type component C { + } + + testcase TC_Pos_A_ttcn3_module_xsd_036() runs on C system C { + + // encode the message + if (isvalue(m_msg)) { + setverdict(pass, "Built-in XSD type was found and TCI value was created"); + } else { + setverdict(fail, "Failure to create a value of the given built-in XSD type"); + } + } + + control { + execute(TC_Pos_A_ttcn3_module_xsd_036(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_037/Pos_A_ttcn3_module_xsd_037.ttcn b/ATS/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_037/Pos_A_ttcn3_module_xsd_037.ttcn new file mode 100644 index 00000000..aae7e680 --- /dev/null +++ b/ATS/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_037/Pos_A_ttcn3_module_xsd_037.ttcn @@ -0,0 +1,37 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:A, Ensure the module XSD is available and contains the builtin XSD type GYear + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_A_ttcn3_module_xsd_037 { + + import from XSD all; + + template GYear m_msg := "2014"; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type component C { + } + + testcase TC_Pos_A_ttcn3_module_xsd_037() runs on C system C { + + // encode the message + if (isvalue(m_msg)) { + setverdict(pass, "Built-in XSD type was found and TCI value was created"); + } else { + setverdict(fail, "Failure to create a value of the given built-in XSD type"); + } + } + + control { + execute(TC_Pos_A_ttcn3_module_xsd_037(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_038/Pos_A_ttcn3_module_xsd_038.ttcn b/ATS/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_038/Pos_A_ttcn3_module_xsd_038.ttcn new file mode 100644 index 00000000..863677cf --- /dev/null +++ b/ATS/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_038/Pos_A_ttcn3_module_xsd_038.ttcn @@ -0,0 +1,37 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:A, Ensure the module XSD is available and contains the builtin XSD type GMonthDay + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_A_ttcn3_module_xsd_038 { + + import from XSD all; + + template GMonthDay m_msg := "--12-18"; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type component C { + } + + testcase TC_Pos_A_ttcn3_module_xsd_038() runs on C system C { + + // encode the message + if (isvalue(m_msg)) { + setverdict(pass, "Built-in XSD type was found and TCI value was created"); + } else { + setverdict(fail, "Failure to create a value of the given built-in XSD type"); + } + } + + control { + execute(TC_Pos_A_ttcn3_module_xsd_038(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_039/Pos_A_ttcn3_module_xsd_039.ttcn b/ATS/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_039/Pos_A_ttcn3_module_xsd_039.ttcn new file mode 100644 index 00000000..00a90f96 --- /dev/null +++ b/ATS/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_039/Pos_A_ttcn3_module_xsd_039.ttcn @@ -0,0 +1,37 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:A, Ensure the module XSD is available and contains the builtin XSD type GDay + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_A_ttcn3_module_xsd_039 { + + import from XSD all; + + template GDay m_msg := "---18"; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type component C { + } + + testcase TC_Pos_A_ttcn3_module_xsd_039() runs on C system C { + + // encode the message + if (isvalue(m_msg)) { + setverdict(pass, "Built-in XSD type was found and TCI value was created"); + } else { + setverdict(fail, "Failure to create a value of the given built-in XSD type"); + } + } + + control { + execute(TC_Pos_A_ttcn3_module_xsd_039(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_040/Pos_A_ttcn3_module_xsd_040.ttcn b/ATS/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_040/Pos_A_ttcn3_module_xsd_040.ttcn new file mode 100644 index 00000000..9894f463 --- /dev/null +++ b/ATS/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_040/Pos_A_ttcn3_module_xsd_040.ttcn @@ -0,0 +1,37 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:A, Ensure the module XSD is available and contains the builtin XSD type GMonth + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_A_ttcn3_module_xsd_040 { + + import from XSD all; + + template GMonth m_msg := "--12"; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type component C { + } + + testcase TC_Pos_A_ttcn3_module_xsd_040() runs on C system C { + + // encode the message + if (isvalue(m_msg)) { + setverdict(pass, "Built-in XSD type was found and TCI value was created"); + } else { + setverdict(fail, "Failure to create a value of the given built-in XSD type"); + } + } + + control { + execute(TC_Pos_A_ttcn3_module_xsd_040(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_041/Pos_A_ttcn3_module_xsd_041.ttcn b/ATS/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_041/Pos_A_ttcn3_module_xsd_041.ttcn new file mode 100644 index 00000000..3f682b92 --- /dev/null +++ b/ATS/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_041/Pos_A_ttcn3_module_xsd_041.ttcn @@ -0,0 +1,37 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:A, Ensure the module XSD is available and contains the builtin XSD type NMTOKENS + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_A_ttcn3_module_xsd_041 { + + import from XSD all; + + template NMTOKENS m_msg := {"a", "b"} + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type component C { + } + + testcase TC_Pos_A_ttcn3_module_xsd_041() runs on C system C { + + // encode the message + if (isvalue(m_msg)) { + setverdict(pass, "Built-in XSD type was found and TCI value was created"); + } else { + setverdict(fail, "Failure to create a value of the given built-in XSD type"); + } + } + + control { + execute(TC_Pos_A_ttcn3_module_xsd_041(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_042/Pos_A_ttcn3_module_xsd_042.ttcn b/ATS/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_042/Pos_A_ttcn3_module_xsd_042.ttcn new file mode 100644 index 00000000..b1c392b0 --- /dev/null +++ b/ATS/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_042/Pos_A_ttcn3_module_xsd_042.ttcn @@ -0,0 +1,37 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:A, Ensure the module XSD is available and contains the builtin XSD type IDREFS + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_A_ttcn3_module_xsd_042 { + + import from XSD all; + + template IDREFS m_msg := {"123"} + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type component C { + } + + testcase TC_Pos_A_ttcn3_module_xsd_042() runs on C system C { + + // encode the message + if (isvalue(m_msg)) { + setverdict(pass, "Built-in XSD type was found and TCI value was created"); + } else { + setverdict(fail, "Failure to create a value of the given built-in XSD type"); + } + } + + control { + execute(TC_Pos_A_ttcn3_module_xsd_042(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_043/Pos_A_ttcn3_module_xsd_043.ttcn b/ATS/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_043/Pos_A_ttcn3_module_xsd_043.ttcn new file mode 100644 index 00000000..4eea69dd --- /dev/null +++ b/ATS/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_043/Pos_A_ttcn3_module_xsd_043.ttcn @@ -0,0 +1,37 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:A, Ensure the module XSD is available and contains the builtin XSD type ENTITIES + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_A_ttcn3_module_xsd_043 { + + import from XSD all; + + template ENTITIES m_msg := {"entity_1", "entity_2"} + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type component C { + } + + testcase TC_Pos_A_ttcn3_module_xsd_043() runs on C system C { + + // encode the message + if (isvalue(m_msg)) { + setverdict(pass, "Built-in XSD type was found and TCI value was created"); + } else { + setverdict(fail, "Failure to create a value of the given built-in XSD type"); + } + } + + control { + execute(TC_Pos_A_ttcn3_module_xsd_043(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_044/Pos_A_ttcn3_module_xsd_044.ttcn b/ATS/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_044/Pos_A_ttcn3_module_xsd_044.ttcn new file mode 100644 index 00000000..41611a11 --- /dev/null +++ b/ATS/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_044/Pos_A_ttcn3_module_xsd_044.ttcn @@ -0,0 +1,37 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:A, Ensure the module XSD is available and contains the builtin XSD type QName + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_A_ttcn3_module_xsd_044 { + + import from XSD all; + + template QName m_msg := {"http://example.com", "name"} + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type component C { + } + + testcase TC_Pos_A_ttcn3_module_xsd_044() runs on C system C { + + // encode the message + if (isvalue(m_msg)) { + setverdict(pass, "Built-in XSD type was found and TCI value was created"); + } else { + setverdict(fail, "Failure to create a value of the given built-in XSD type"); + } + } + + control { + execute(TC_Pos_A_ttcn3_module_xsd_044(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_045/Pos_A_ttcn3_module_xsd_045.ttcn b/ATS/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_045/Pos_A_ttcn3_module_xsd_045.ttcn new file mode 100644 index 00000000..955007e2 --- /dev/null +++ b/ATS/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_045/Pos_A_ttcn3_module_xsd_045.ttcn @@ -0,0 +1,37 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:A, Ensure the module XSD is available and contains the builtin XSD type Boolean + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_A_ttcn3_module_xsd_045 { + + import from XSD all; + + template Boolean m_msg := true; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type component C { + } + + testcase TC_Pos_A_ttcn3_module_xsd_045() runs on C system C { + + // encode the message + if (isvalue(m_msg)) { + setverdict(pass, "Built-in XSD type was found and TCI value was created"); + } else { + setverdict(fail, "Failure to create a value of the given built-in XSD type"); + } + } + + control { + execute(TC_Pos_A_ttcn3_module_xsd_045(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_046/Pos_A_ttcn3_module_xsd_046.ttcn b/ATS/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_046/Pos_A_ttcn3_module_xsd_046.ttcn new file mode 100644 index 00000000..59911d0e --- /dev/null +++ b/ATS/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_046/Pos_A_ttcn3_module_xsd_046.ttcn @@ -0,0 +1,37 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:A, Ensure the module XSD is available and contains the builtin XSD type XMLCompatibleString + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_A_ttcn3_module_xsd_046 { + + import from XSD all; + + template XMLCompatibleString m_msg := "x"; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type component C { + } + + testcase TC_Pos_A_ttcn3_module_xsd_046() runs on C system C { + + // encode the message + if (isvalue(m_msg)) { + setverdict(pass, "Built-in XSD type was found and TCI value was created"); + } else { + setverdict(fail, "Failure to create a value of the given built-in XSD type"); + } + } + + control { + execute(TC_Pos_A_ttcn3_module_xsd_046(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_047/Pos_A_ttcn3_module_xsd_047.ttcn b/ATS/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_047/Pos_A_ttcn3_module_xsd_047.ttcn new file mode 100644 index 00000000..570143ec --- /dev/null +++ b/ATS/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_047/Pos_A_ttcn3_module_xsd_047.ttcn @@ -0,0 +1,37 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:A, Ensure the module XSD is available and contains the builtin XSD type XMLStringWithNoWhitespace + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_A_ttcn3_module_xsd_047 { + + import from XSD all; + + template XMLStringWithNoWhitespace m_msg := "StringWithNoWhitespace"; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type component C { + } + + testcase TC_Pos_A_ttcn3_module_xsd_047() runs on C system C { + + // encode the message + if (isvalue(m_msg)) { + setverdict(pass, "Built-in XSD type was found and TCI value was created"); + } else { + setverdict(fail, "Failure to create a value of the given built-in XSD type"); + } + } + + control { + execute(TC_Pos_A_ttcn3_module_xsd_047(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_048/Pos_A_ttcn3_module_xsd_048.ttcn b/ATS/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_048/Pos_A_ttcn3_module_xsd_048.ttcn new file mode 100644 index 00000000..ce9dffb7 --- /dev/null +++ b/ATS/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_048/Pos_A_ttcn3_module_xsd_048.ttcn @@ -0,0 +1,37 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:A, Ensure the module XSD is available and contains the builtin XSD type XMLStringWithNoCRLFHT + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_A_ttcn3_module_xsd_048 { + + import from XSD all; + + template XMLStringWithNoCRLFHT m_msg := "abc"; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type component C { + } + + testcase TC_Pos_A_ttcn3_module_xsd_048() runs on C system C { + + // encode the message + if (isvalue(m_msg)) { + setverdict(pass, "Built-in XSD type was found and TCI value was created"); + } else { + setverdict(fail, "Failure to create a value of the given built-in XSD type"); + } + } + + control { + execute(TC_Pos_A_ttcn3_module_xsd_048(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/ATS/xml/B_encoding_instructions/B03_encoding_instructions/B0327_no_type/Pos_B0327_no_type_001/Pos_B0327_no_type_001.ttcn b/ATS/xml/B_encoding_instructions/B03_encoding_instructions/B0327_no_type/Pos_B0327_no_type_001/Pos_B0327_no_type_001.ttcn new file mode 100644 index 00000000..7d405f57 --- /dev/null +++ b/ATS/xml/B_encoding_instructions/B03_encoding_instructions/B0327_no_type/Pos_B0327_no_type_001/Pos_B0327_no_type_001.ttcn @@ -0,0 +1,90 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 9:B.3.27, The noType insturction overriding "useUnion" + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// The "noType" encoding variant can be applied to any TTCN-3 value or template, +// where normally an xsi:type attribute would be generated when encoding this element +// (see clause 5.1.5). This is normally the result of the "useType" or "useUnion" +// encoding instructions appended to the type of the value or template. This is +// especially useful for suppressing the type identification attribute for elements +// derived from simpleType via union. The "noType" encoding instruction takes +// precedence over the "useType" and "useUnion" encoding instructions. + +module Pos_B0327_no_type_001 { + + import from schema_Pos_B0327_no_type_001 language "XSD" all; + + template MyType m_msg := { integer_ := 5 } with { variant "noType" }; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_B0327_no_type_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_B0327_no_type_001.xml", { "Pos_B0327_no_type_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_B0327_no_type_001(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/ATS/xml/B_encoding_instructions/B03_encoding_instructions/B0327_no_type/Pos_B0327_no_type_001/Pos_B0327_no_type_001.xml b/ATS/xml/B_encoding_instructions/B03_encoding_instructions/B0327_no_type/Pos_B0327_no_type_001/Pos_B0327_no_type_001.xml new file mode 100644 index 00000000..a22095dc --- /dev/null +++ b/ATS/xml/B_encoding_instructions/B03_encoding_instructions/B0327_no_type/Pos_B0327_no_type_001/Pos_B0327_no_type_001.xml @@ -0,0 +1,2 @@ + +5 \ No newline at end of file diff --git a/ATS/xml/B_encoding_instructions/B03_encoding_instructions/B0327_no_type/Pos_B0327_no_type_001/Pos_B0327_no_type_001.xsd b/ATS/xml/B_encoding_instructions/B03_encoding_instructions/B0327_no_type/Pos_B0327_no_type_001/Pos_B0327_no_type_001.xsd new file mode 100644 index 00000000..4ee22e34 --- /dev/null +++ b/ATS/xml/B_encoding_instructions/B03_encoding_instructions/B0327_no_type/Pos_B0327_no_type_001/Pos_B0327_no_type_001.xsd @@ -0,0 +1,9 @@ + + + + + + + diff --git a/ATS/xml/B_encoding_instructions/B03_encoding_instructions/B0329_xml_header_control/B0329_xml_header_control_001/B0329_xml_header_control_001.ttcn b/ATS/xml/B_encoding_instructions/B03_encoding_instructions/B0329_xml_header_control/B0329_xml_header_control_001/B0329_xml_header_control_001.ttcn new file mode 100644 index 00000000..882bb999 --- /dev/null +++ b/ATS/xml/B_encoding_instructions/B03_encoding_instructions/B0329_xml_header_control/B0329_xml_header_control_001/B0329_xml_header_control_001.ttcn @@ -0,0 +1,26 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 9:6.2.1, Use of the xmlHeader parameter in the enc_value function + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_B0329_xml_header_control_001 { + + import from schema_Pos_B0329_xml_header_control_001 language "XSD" all; + + template Test m_msg := "abc"; + + type component C { + } + + testcase TC_Pos_B0329_xml_header_control_001() runs on C { + var universal charstring v_encoded := encvalue_unichar(m_msg, -, "xmlHeader"); + // Naive test for XML header presence. If needed, more complicated one should be implemented + if (lengthof(v_encoded) >= 5 and substr(v_encoded, 0, 5) == " + + + diff --git a/ATS/xml/B_encoding_instructions/B03_encoding_instructions/B0329_xml_header_control/B0329_xml_header_control_002/B0329_xml_header_control_002.ttcn b/ATS/xml/B_encoding_instructions/B03_encoding_instructions/B0329_xml_header_control/B0329_xml_header_control_002/B0329_xml_header_control_002.ttcn new file mode 100644 index 00000000..9b25f29f --- /dev/null +++ b/ATS/xml/B_encoding_instructions/B03_encoding_instructions/B0329_xml_header_control/B0329_xml_header_control_002/B0329_xml_header_control_002.ttcn @@ -0,0 +1,26 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 9:6.2.1, Use of the noXmlHeader parameter in the enc_value function + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_B0329_xml_header_control_002 { + + import from schema_Pos_B0329_xml_header_control_002 language "XSD" all; + + template Test m_msg := "abc"; + + type component C { + } + + testcase TC_Pos_B0329_xml_header_control_002() runs on C { + var universal charstring v_encoded := encvalue_unichar(m_msg, -, "noXmlHeader"); + // Naive test for XML header presence. If needed, more complicated one should be implemented + if (lengthof(v_encoded) >= 5 and substr(v_encoded, 0, 5) == " + + + diff --git a/ATS/xml/B_encoding_instructions/B_top_level/Neg_B_top_level_001/Neg_B_top_level_001.ttcn b/ATS/xml/B_encoding_instructions/B_top_level/Neg_B_top_level_001/Neg_B_top_level_001.ttcn new file mode 100644 index 00000000..c5abfa7d --- /dev/null +++ b/ATS/xml/B_encoding_instructions/B_top_level/Neg_B_top_level_001/Neg_B_top_level_001.ttcn @@ -0,0 +1,68 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 9:7.5.1, Verify that XSD types cannot be encoded + ** @verdict pass reject +***************************************************/ +// The following requirements are tested: +// If templates or values of types with the "XML" encode attribute (or any of its synonyms +// – i.e. TTCN-3 types that are a result of conversion from XSD) are used as an argument of +// a communication operation, a variant attribute containing the "element" encoding instruction +// shall be assigned to it. Using a value or template of a type that doesn’t contain this +// encoding instruction shall cause an error. + +module Neg_B_top_level_001 { + + import from schema_Neg_B_top_level_001 "XSD" all; + + template Elem_simple_restr m_msg := 1; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type universal charstring Raw; + + type port P message { + inout all; + } + type component C { + port P p; + } + + testcase TC_Neg_B_top_level_001() runs on C system C { + var Raw v_rcv; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Neg_B_top_level_001(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/ATS/xml/B_encoding_instructions/B_top_level/Neg_B_top_level_001/Neg_B_top_level_001.xsd b/ATS/xml/B_encoding_instructions/B_top_level/Neg_B_top_level_001/Neg_B_top_level_001.xsd new file mode 100644 index 00000000..03ea0acf --- /dev/null +++ b/ATS/xml/B_encoding_instructions/B_top_level/Neg_B_top_level_001/Neg_B_top_level_001.xsd @@ -0,0 +1,8 @@ + + + + + + diff --git a/ATS/xml/README.txt b/ATS/xml/README.txt new file mode 100644 index 00000000..f5de2fec --- /dev/null +++ b/ATS/xml/README.txt @@ -0,0 +1,92 @@ +TTCN-3 Part 9 (XML) conformance test suite preliminary (unofficial) instructions +======================================================= + +These are preliminary instructions on how to use the TTCN-3 conformance test suite. +Unlike ATSs in the usual context, this ATS does _not_ provide any means for test +automation, but the TTCN-3 files provide the test inputs for the TTCN-3 tool - in this case +the TTCN-3 tool is the IUT. This means that test automation has to be somehow scripted, however, +from the provided ATS it should be clear how the output should be interpreted. + +1) ATS organization + + The ATS is organized according to the clauses of the TTCN-3 standard part 1. There are + either positive syntactic tests, negative syntactic tests, positive semantic tests, or + negative semantic tests. + + Except for the negative syntactic tests, all TTCN-3 files from the other three categories + are always syntactically correct. In addition, the positive syntactic tests are designed + to be semantically correct as well. The negative semantic tests are designed to violate the + semantics only in the one property that is subject of the test - at least to the degree that + it is possible. Because all test cases are syntactically correct (except for the negative + syntactic tests), the semantic and negative semantic tests are syntactically correct as well. + + Every TTCN-3 module corresponds to one TTCN-3 conformance test. Where more than one module is + needed, the TTCN-3 file contains multiple modules. + +2) Document tags + + Every module is annotated with document tags. Of relevance for the test automation tooling + is the @verdict tag on top of each module (tag usage adaption in the TTCN-3 maintenance STF + is pending). It is composed of three parts: the tag, the conformance verdict, and keywords + regarding the expected output. + + @verdict pass accept, ttcn3verdict:pass + + Hence the format of this tag is a three column entry with "@verdict", "pass", and + "accept, ttcn3verdict:pass, manual:'Freetext validation'". + In order to reach the "pass" verdict, the TTCN-3 tool under test, the IUT, must accept the + TTCN-3 module as test input. The result of its execution must be the TTCN-3 verdict pass. + When needed, a manual inspection of the execution results is required. + Therefore, if the TTCN-3 verdict is pass after the execution of the module, the IUT passes + the conformance test. If the tool output is anything else, or it does not comply + with the manual inspection, it fails the conformance test. + + The keywords in use to describe the third column, i.e. the expected output by the IUT, are (currently) as + follows: + + reject + accept, noexecution + accept, ttcn3verdict:none + accept, ttcn3verdict:pass + accept, ttcn3verdict:inconc + accept, ttcn3verdict:fail + accept, ttcn3verdict:error + accept, ttcn3verdict:xxx, manual:"Validation inspection, free text" (see Note) + + Note: 'xxx' for ttcn3verdict is a placeholder for verdict value. The actual test cases must + have one of the allowed values 'none', 'pass', 'inconc', 'fail', or 'error' in place of 'xxx'. + + "reject" implies that the TTCN-3 module is either rejected at compile-time or at execution time. + In the conformance test, we do not differentiate between these two cases as the standard does not + make any statement where semantic checks have to be performed. + + "accept, noexecution" implies that the TTCN-3 module should be accepted by the TTCN-3 tool after + the syntactic check. For passing the conformance test, the module simply has to be accepted and + an execution is not necessary. + + "accept, ttcn3vercit:xxx" implies that the TTCN-3 module should be accepted by the TTCN-3 tool + after the syntactic check and that an execution should take place. The result of the execution + should be a TTCN-3 verdict and the "xxx" denotes what verdict is the exepcted verdict. If the + verdict differs from the specified "xxx", the conformance test fails. Otherwise, it passes. + + In the usual case, each TTCN-3 file contains only one test case. In these cases the verdict + determination is clear. In a few cases, the TTCN-3 file contains more than one test case. + In that case, the overall conformance verdict is determined according to the TTCN-3 verdict + overwrite rules applied to the results of each test case. Let's say we have two test cases. + The first test case ends with the verdict "fail" and the second one ends with the verdict "pass". + Then the overall verdict is "fail". + + The manual results inspection is a free text describing how a valid out should look like. The text + is informal since different tools have different logging formats and facilities. The instruction + is surrounded by single or double quotas on a single line: + + @verdict pass, testverdict:pass, manual:'The following elements are logged: charstring "Extra", record { 1, "HELLO"}, integer template "?". Make sure the elements are logged at setverdict, at MTC end, and at test case end.' + + All notations are designed to be easily machine readable. Therefore, the test automation using + some sort of scripting will only take a small amount of time. + +3) Other prerequisites + + In order to test communication and matching behavior, we expect that the test cases are executed + using a loopback adapter. + -- GitLab